Skip to content

chore(next => main): release 0.1.0 #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: Create releases
on:
push:
branches:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/open-release-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Open release PRs
on:
push:
branches:
- next

jobs:
release:
name: release
if: github.ref == 'refs/heads/next' && github.repository == 'Finch-API/finch-api-python'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: stainless-api/trigger-release-please@v1
id: release
with:
repo: ${{ github.event.repository.full_name }}
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
branch-with-changes: next
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.0.11"
".": "0.1.0"
}
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## 0.1.0 (2023-08-29)

Full Changelog: [v0.0.11...v0.1.0](https://github.com/Finch-API/finch-api-python/compare/v0.0.11...v0.1.0)

### ⚠ BREAKING CHANGES

* **client:** restructure some methods ([#80](https://github.com/Finch-API/finch-api-python/issues/80))

### Features

* **client:** restructure some methods ([#80](https://github.com/Finch-API/finch-api-python/issues/80)) ([21abe3d](https://github.com/Finch-API/finch-api-python/commit/21abe3d79c572eb6cb232edac37b2d89bf3061e8))


### Chores

* **ci:** setup workflows to create releases and release PRs ([#77](https://github.com/Finch-API/finch-api-python/issues/77)) ([2af3cc1](https://github.com/Finch-API/finch-api-python/commit/2af3cc1013ba8ceb409699a17058a758ae9916ca))

## [0.0.11](https://github.com/Finch-API/finch-api-python/compare/v0.0.10...v0.0.11) (2023-08-26)


Expand Down
146 changes: 73 additions & 73 deletions api.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "finch-api"
version = "0.0.11"
version = "0.1.0"
description = "Client library for the Finch API"
readme = "README.md"
authors = ["Finch <[email protected]>"]
Expand Down
8 changes: 4 additions & 4 deletions src/finch/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@


class Finch(SyncAPIClient):
ats: resources.ATS
hris: resources.HRIS
ats: resources.ATS
providers: resources.Providers
account: resources.Account

Expand Down Expand Up @@ -112,8 +112,8 @@ def __init__(
_strict_response_validation=_strict_response_validation,
)

self.ats = resources.ATS(self)
self.hris = resources.HRIS(self)
self.ats = resources.ATS(self)
self.providers = resources.Providers(self)
self.account = resources.Account(self)

Expand Down Expand Up @@ -268,8 +268,8 @@ def get_auth_url(


class AsyncFinch(AsyncAPIClient):
ats: resources.AsyncATS
hris: resources.AsyncHRIS
ats: resources.AsyncATS
providers: resources.AsyncProviders
account: resources.AsyncAccount

Expand Down Expand Up @@ -335,8 +335,8 @@ def __init__(
_strict_response_validation=_strict_response_validation,
)

self.ats = resources.AsyncATS(self)
self.hris = resources.AsyncHRIS(self)
self.ats = resources.AsyncATS(self)
self.providers = resources.AsyncProviders(self)
self.account = resources.AsyncAccount(self)

Expand Down
2 changes: 1 addition & 1 deletion src/finch/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless.

__title__ = "finch"
__version__ = "0.0.11" # x-release-please-version
__version__ = "0.1.0" # x-release-please-version
2 changes: 1 addition & 1 deletion src/finch/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
from .account import Account, AsyncAccount
from .providers import Providers, AsyncProviders

__all__ = ["ATS", "AsyncATS", "HRIS", "AsyncHRIS", "Providers", "AsyncProviders", "Account", "AsyncAccount"]
__all__ = ["HRIS", "AsyncHRIS", "ATS", "AsyncATS", "Providers", "AsyncProviders", "Account", "AsyncAccount"]
11 changes: 7 additions & 4 deletions src/finch/resources/hris/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,23 @@
from .benefits import Benefits, AsyncBenefits
from .payments import Payments, AsyncPayments
from .directory import Directory, AsyncDirectory
from .employments import Employments, AsyncEmployments
from .individuals import Individuals, AsyncIndividuals
from .pay_statements import PayStatements, AsyncPayStatements

__all__ = [
"CompanyResource",
"AsyncCompanyResource",
"Payments",
"AsyncPayments",
"PayStatements",
"AsyncPayStatements",
"Directory",
"AsyncDirectory",
"Individuals",
"AsyncIndividuals",
"Employments",
"AsyncEmployments",
"Payments",
"AsyncPayments",
"PayStatements",
"AsyncPayStatements",
"Benefits",
"AsyncBenefits",
"HRIS",
Expand Down
10 changes: 5 additions & 5 deletions src/finch/resources/hris/benefits/individuals.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
EnrolledIndividual,
UnenrolledIndividual,
IndividualEnrolledIDsResponse,
individual_unenroll_params,
individual_enroll_many_params,
individual_unenroll_many_params,
individual_retrieve_many_benefits_params,
)

Expand Down Expand Up @@ -147,7 +147,7 @@ def retrieve_many_benefits(
model=IndividualBenefit,
)

def unenroll(
def unenroll_many(
self,
benefit_id: str,
*,
Expand Down Expand Up @@ -179,7 +179,7 @@ def unenroll(
f"/employer/benefits/{benefit_id}/individuals",
page=SyncSinglePage[UnenrolledIndividual],
body=maybe_transform(
{"individual_ids": individual_ids}, individual_unenroll_params.IndividualUnenrollParams
{"individual_ids": individual_ids}, individual_unenroll_many_params.IndividualUnenrollManyParams
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
Expand Down Expand Up @@ -314,7 +314,7 @@ def retrieve_many_benefits(
model=IndividualBenefit,
)

def unenroll(
def unenroll_many(
self,
benefit_id: str,
*,
Expand Down Expand Up @@ -346,7 +346,7 @@ def unenroll(
f"/employer/benefits/{benefit_id}/individuals",
page=AsyncSinglePage[UnenrolledIndividual],
body=maybe_transform(
{"individual_ids": individual_ids}, individual_unenroll_params.IndividualUnenrollParams
{"individual_ids": individual_ids}, individual_unenroll_many_params.IndividualUnenrollManyParams
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,21 @@

from typing import List

from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._utils import maybe_transform
from ...._resource import SyncAPIResource, AsyncAPIResource
from ....pagination import SyncResponsesPage, AsyncResponsesPage
from ...._base_client import AsyncPaginator, make_request_options
from ....types.hris.individuals import (
EmploymentDataResponse,
employment_data_retrieve_many_params,
)
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._utils import maybe_transform
from ..._resource import SyncAPIResource, AsyncAPIResource
from ...pagination import SyncResponsesPage, AsyncResponsesPage
from ...types.hris import EmploymentDataResponse, employment_retrieve_many_params
from ..._base_client import AsyncPaginator, make_request_options

__all__ = ["EmploymentData", "AsyncEmploymentData"]
__all__ = ["Employments", "AsyncEmployments"]


class EmploymentData(SyncAPIResource):
class Employments(SyncAPIResource):
def retrieve_many(
self,
*,
requests: List[employment_data_retrieve_many_params.Request],
requests: List[employment_retrieve_many_params.Request],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -50,9 +47,7 @@ def retrieve_many(
return self._get_api_list(
"/employer/employment",
page=SyncResponsesPage[EmploymentDataResponse],
body=maybe_transform(
{"requests": requests}, employment_data_retrieve_many_params.EmploymentDataRetrieveManyParams
),
body=maybe_transform({"requests": requests}, employment_retrieve_many_params.EmploymentRetrieveManyParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand All @@ -61,11 +56,11 @@ def retrieve_many(
)


class AsyncEmploymentData(AsyncAPIResource):
class AsyncEmployments(AsyncAPIResource):
def retrieve_many(
self,
*,
requests: List[employment_data_retrieve_many_params.Request],
requests: List[employment_retrieve_many_params.Request],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -94,9 +89,7 @@ def retrieve_many(
return self._get_api_list(
"/employer/employment",
page=AsyncResponsesPage[EmploymentDataResponse],
body=maybe_transform(
{"requests": requests}, employment_data_retrieve_many_params.EmploymentDataRetrieveManyParams
),
body=maybe_transform({"requests": requests}, employment_retrieve_many_params.EmploymentRetrieveManyParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand Down
21 changes: 13 additions & 8 deletions src/finch/resources/hris/hris.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from .payments import Payments, AsyncPayments
from .directory import Directory, AsyncDirectory
from ..._resource import SyncAPIResource, AsyncAPIResource
from .employments import Employments, AsyncEmployments
from .individuals import Individuals, AsyncIndividuals
from .pay_statements import PayStatements, AsyncPayStatements

Expand All @@ -20,35 +21,39 @@

class HRIS(SyncAPIResource):
company: CompanyResource
payments: Payments
pay_statements: PayStatements
directory: Directory
individuals: Individuals
employments: Employments
payments: Payments
pay_statements: PayStatements
benefits: Benefits

def __init__(self, client: Finch) -> None:
super().__init__(client)
self.company = CompanyResource(client)
self.payments = Payments(client)
self.pay_statements = PayStatements(client)
self.directory = Directory(client)
self.individuals = Individuals(client)
self.employments = Employments(client)
self.payments = Payments(client)
self.pay_statements = PayStatements(client)
self.benefits = Benefits(client)


class AsyncHRIS(AsyncAPIResource):
company: AsyncCompanyResource
payments: AsyncPayments
pay_statements: AsyncPayStatements
directory: AsyncDirectory
individuals: AsyncIndividuals
employments: AsyncEmployments
payments: AsyncPayments
pay_statements: AsyncPayStatements
benefits: AsyncBenefits

def __init__(self, client: AsyncFinch) -> None:
super().__init__(client)
self.company = AsyncCompanyResource(client)
self.payments = AsyncPayments(client)
self.pay_statements = AsyncPayStatements(client)
self.directory = AsyncDirectory(client)
self.individuals = AsyncIndividuals(client)
self.employments = AsyncEmployments(client)
self.payments = AsyncPayments(client)
self.pay_statements = AsyncPayStatements(client)
self.benefits = AsyncBenefits(client)
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,19 @@

from __future__ import annotations

from typing import TYPE_CHECKING, List, Optional
from typing import List, Optional

from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._utils import maybe_transform
from ...._resource import SyncAPIResource, AsyncAPIResource
from ....pagination import SyncResponsesPage, AsyncResponsesPage
from ....types.hris import IndividualResponse, individual_retrieve_many_params
from ...._base_client import AsyncPaginator, make_request_options
from .employment_data import EmploymentData, AsyncEmploymentData

if TYPE_CHECKING:
from ...._client import Finch, AsyncFinch
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._utils import maybe_transform
from ..._resource import SyncAPIResource, AsyncAPIResource
from ...pagination import SyncResponsesPage, AsyncResponsesPage
from ...types.hris import IndividualResponse, individual_retrieve_many_params
from ..._base_client import AsyncPaginator, make_request_options

__all__ = ["Individuals", "AsyncIndividuals"]


class Individuals(SyncAPIResource):
employment_data: EmploymentData

def __init__(self, client: Finch) -> None:
super().__init__(client)
self.employment_data = EmploymentData(client)

def retrieve_many(
self,
*,
Expand Down Expand Up @@ -68,12 +58,6 @@ def retrieve_many(


class AsyncIndividuals(AsyncAPIResource):
employment_data: AsyncEmploymentData

def __init__(self, client: AsyncFinch) -> None:
super().__init__(client)
self.employment_data = AsyncEmploymentData(client)

def retrieve_many(
self,
*,
Expand Down
6 changes: 0 additions & 6 deletions src/finch/resources/hris/individuals/__init__.py

This file was deleted.

5 changes: 5 additions & 0 deletions src/finch/types/hris/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from .benefit_type import BenefitType as BenefitType
from .pay_statement import PayStatement as PayStatement
from .company_benefit import CompanyBenefit as CompanyBenefit
from .employment_data import EmploymentData as EmploymentData
from .benefit_frequency import BenefitFrequency as BenefitFrequency
from .supported_benefit import SupportedBenefit as SupportedBenefit
from .benfit_contribution import BenfitContribution as BenfitContribution
Expand All @@ -17,9 +18,13 @@
from .benefit_update_params import BenefitUpdateParams as BenefitUpdateParams
from .pay_statement_response import PayStatementResponse as PayStatementResponse
from .individual_in_directory import IndividualInDirectory as IndividualInDirectory
from .employment_data_response import EmploymentDataResponse as EmploymentDataResponse
from .pay_statement_response_body import (
PayStatementResponseBody as PayStatementResponseBody,
)
from .employment_retrieve_many_params import (
EmploymentRetrieveManyParams as EmploymentRetrieveManyParams,
)
from .individual_retrieve_many_params import (
IndividualRetrieveManyParams as IndividualRetrieveManyParams,
)
Expand Down
Loading