Skip to content

Commit e50e777

Browse files
committed
feat: add all files that are needed to generate the package
1 parent 599062c commit e50e777

File tree

14 files changed

+1176
-2
lines changed

14 files changed

+1176
-2
lines changed

.github/workflows/publish.yaml

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
name: Publish new version
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'The version to release'
8+
required: false
9+
default: ""
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
generate-api-docs:
16+
name: Update version and build python module
17+
runs-on: ubuntu-latest
18+
permissions:
19+
id-token: write
20+
contents: read
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Get API docs
26+
run: |
27+
curl -sL -o accounting-openapi.yaml https://api.us1.cloudbeds.com/accounting/accounting-openapi.yaml
28+
29+
- name: Get next version
30+
run: |
31+
if [ -n "${{ inputs.version }}" ]; then
32+
echo "next_version=${{ inputs.version }}" >> $GITHUB_ENV
33+
echo "Version provided: ${{ inputs.version }}"
34+
else
35+
current_version=$(cat VERSION)
36+
echo "Current version: $current_version"
37+
38+
IFS='.' read -r major minor patch <<< "$current_version"
39+
minor=$((minor + 1))
40+
next_version="$major.$minor.$patch"
41+
echo "Next version: $next_version"
42+
43+
echo "next_version=$next_version" >> $GITHUB_ENV
44+
fi
45+
46+
- name: Setup Java
47+
uses: actions/setup-java@v4
48+
with:
49+
java-version: 23
50+
distribution: corretto
51+
52+
- name: Install OpenAPI generator
53+
run: |
54+
OPENAPI_GENERATOR_VERSION=$(cat .openapi-generator/VERSION)
55+
curl -s https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/$OPENAPI_GENERATOR_VERSION/openapi-generator-cli-$OPENAPI_GENERATOR_VERSION.jar -o openapi-generator-cli.jar
56+
57+
- name: Bump version in VERSION and openapitools.json
58+
run: |
59+
echo ${{ env.next_version }} > VERSION
60+
sed -i 's/"packageVersion": "[0-9]*\.[0-9]*\.[0-9]*"/"packageVersion": "${{ env.next_version }}"/' openapitools.json
61+
62+
- name: Generate API docs
63+
run: |
64+
find $(cat PACKAGE) -mindepth 1 ! -name 'py.typed' -delete
65+
java -jar openapi-generator-cli.jar generate -c openapitools.json
66+
67+
- name: Git Setup
68+
if: inputs.version == ''
69+
run: |
70+
git config --global user.name "github-actions"
71+
git config --global user.email "[email protected]"
72+
73+
- name: Update repository with new version
74+
if: inputs.version == ''
75+
run: |
76+
git add VERSION openapitools.json $(cat PACKAGE) README.md .openapi-generator/FILES
77+
git commit -m "Bump version to ${{ env.next_version }}"
78+
git push
79+
80+
build-release:
81+
name: Build release distribution
82+
runs-on: ubuntu-latest
83+
needs: generate-api-docs
84+
env:
85+
UV_VERSION: 0.5.31
86+
steps:
87+
- name: Checkout code
88+
uses: actions/checkout@v4
89+
with:
90+
ref: ${{ github.ref_name }}
91+
92+
- name: Setup Python
93+
uses: actions/setup-python@v5
94+
with:
95+
python-version-file: .python-version
96+
97+
- name: Build release distributions
98+
run: |
99+
pip install "uv==${{ env.UV_VERSION }}"
100+
uv sync --locked --no-dev
101+
uv build
102+
103+
- name: Upload distributions
104+
uses: actions/upload-artifact@v4
105+
with:
106+
name: release-dists
107+
path: dist/
108+
109+
- name: Create Release
110+
if: inputs.version == ''
111+
env:
112+
GITHUB_TOKEN: ${{ github.token }}
113+
run: >-
114+
gh release create $(cat VERSION)
115+
--notes $(cat VERSION)
116+
--target ${{ github.ref_name }}
117+
--title $(cat VERSION)
118+
119+
pypi-publish:
120+
name: Publish to PyPI
121+
runs-on: ubuntu-latest
122+
needs: build-release
123+
environment:
124+
name: pypi
125+
permissions:
126+
id-token: write
127+
steps:
128+
- name: Retrieve release distributions
129+
uses: actions/download-artifact@v4
130+
with:
131+
name: release-dists
132+
path: dist/
133+
134+
- name: Publish release distributions to PyPI
135+
uses: pypa/gh-action-pypi-publish@release/v1
136+
with:
137+
packages-dir: dist/

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ wheels/
1010
.venv
1111
.idea
1212

13-
public_accessa/
13+
accounting-openapi.yaml
1414
*.jar

.openapi-generator-ignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

.openapi-generator/FILES

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
README.md
2+
cloudbeds_accounting/__init__.py
3+
cloudbeds_accounting/api/__init__.py
4+
cloudbeds_accounting/api/accounts_receivable_ledger_api.py
5+
cloudbeds_accounting/api/custom_general_ledger_codes_api.py
6+
cloudbeds_accounting/api/custom_transaction_codes_api.py
7+
cloudbeds_accounting/api/deposits_api.py
8+
cloudbeds_accounting/api/internal_transaction_codes_api.py
9+
cloudbeds_accounting/api/transactions_api.py
10+
cloudbeds_accounting/api/trial_balance_api.py
11+
cloudbeds_accounting/api_client.py
12+
cloudbeds_accounting/api_response.py
13+
cloudbeds_accounting/configuration.py
14+
cloudbeds_accounting/docs/Account.md
15+
cloudbeds_accounting/docs/AccountCategory.md
16+
cloudbeds_accounting/docs/AccountsReceivableLedgerApi.md
17+
cloudbeds_accounting/docs/AccountsReceivableLedgerPaginated.md
18+
cloudbeds_accounting/docs/AccountsReceivableLedgerPatchRequest.md
19+
cloudbeds_accounting/docs/AccountsReceivableLedgerPostRequest.md
20+
cloudbeds_accounting/docs/AccountsReceivableLedgerReservationBalanceTransferResponse.md
21+
cloudbeds_accounting/docs/AccountsReceivableLedgerReservationBalanceTransferResponseTransaction.md
22+
cloudbeds_accounting/docs/AccountsReceivableLedgerResponse.md
23+
cloudbeds_accounting/docs/AccountsReceivableLedgerStatus.md
24+
cloudbeds_accounting/docs/AccountsReceivableLedgerTotalsResponse.md
25+
cloudbeds_accounting/docs/Action.md
26+
cloudbeds_accounting/docs/AndOrGroup.md
27+
cloudbeds_accounting/docs/AndOrGroupAndInner.md
28+
cloudbeds_accounting/docs/ApiAccountingError.md
29+
cloudbeds_accounting/docs/ApiErrorCode.md
30+
cloudbeds_accounting/docs/AsyncEventResponse.md
31+
cloudbeds_accounting/docs/ChartOfAccountType.md
32+
cloudbeds_accounting/docs/ConditionalOperator.md
33+
cloudbeds_accounting/docs/CustomGeneralLedgerCodeModel.md
34+
cloudbeds_accounting/docs/CustomGeneralLedgerCodesApi.md
35+
cloudbeds_accounting/docs/CustomGeneralLedgerCodesUpdateRequest.md
36+
cloudbeds_accounting/docs/CustomTransactionCodesApi.md
37+
cloudbeds_accounting/docs/CustomTransactionCodesModel.md
38+
cloudbeds_accounting/docs/CustomTransactionCodesUpdateModel.md
39+
cloudbeds_accounting/docs/CustomTransactionCodesUpdateRequest.md
40+
cloudbeds_accounting/docs/DepositBalanceResponse.md
41+
cloudbeds_accounting/docs/DepositsApi.md
42+
cloudbeds_accounting/docs/ExtendedTransactionPaginated.md
43+
cloudbeds_accounting/docs/ExtendedTransactionResponse.md
44+
cloudbeds_accounting/docs/FieldFilter.md
45+
cloudbeds_accounting/docs/Filters.md
46+
cloudbeds_accounting/docs/GetAccountsReceivableLedgerTotalsFilterParameter.md
47+
cloudbeds_accounting/docs/GetAccountsReceivableLedgerTransactionsFilterParameter.md
48+
cloudbeds_accounting/docs/GetAccountsReceivableLedgersFilterParameter.md
49+
cloudbeds_accounting/docs/GetDepositTransactionsFilterParameter.md
50+
cloudbeds_accounting/docs/InternalTransactionCodeGroupEnum.md
51+
cloudbeds_accounting/docs/InternalTransactionCodeResponse.md
52+
cloudbeds_accounting/docs/InternalTransactionCodesApi.md
53+
cloudbeds_accounting/docs/InternalTransactionCodesListResponse.md
54+
cloudbeds_accounting/docs/ListTransactionsPaginated.md
55+
cloudbeds_accounting/docs/ListTransactionsRequest.md
56+
cloudbeds_accounting/docs/LogicalOperator.md
57+
cloudbeds_accounting/docs/PageDetails.md
58+
cloudbeds_accounting/docs/ReservationStatus.md
59+
cloudbeds_accounting/docs/Sort.md
60+
cloudbeds_accounting/docs/SortDirection.md
61+
cloudbeds_accounting/docs/SourceKind.md
62+
cloudbeds_accounting/docs/TransactionItemMappingModel.md
63+
cloudbeds_accounting/docs/TransactionItemMappingRequest.md
64+
cloudbeds_accounting/docs/TransactionItemMappingUpdateModel.md
65+
cloudbeds_accounting/docs/TransactionResponse.md
66+
cloudbeds_accounting/docs/TransactionState.md
67+
cloudbeds_accounting/docs/TransactionsApi.md
68+
cloudbeds_accounting/docs/TransferDepositPostRequest.md
69+
cloudbeds_accounting/docs/TrialBalanceApi.md
70+
cloudbeds_accounting/docs/TrialBalanceConfigurationStatusResponse.md
71+
cloudbeds_accounting/docs/TrialBalanceReportCodeInfo.md
72+
cloudbeds_accounting/docs/TrialBalanceReportGuestLedger.md
73+
cloudbeds_accounting/docs/TrialBalanceReportLedgerBalances.md
74+
cloudbeds_accounting/docs/TrialBalanceReportResponse.md
75+
cloudbeds_accounting/docs/TrialBalanceReportSummary.md
76+
cloudbeds_accounting/docs/TrialBalanceRequest.md
77+
cloudbeds_accounting/docs/TrialBalanceResponse.md
78+
cloudbeds_accounting/docs/UserModel.md
79+
cloudbeds_accounting/exceptions.py
80+
cloudbeds_accounting/models/__init__.py
81+
cloudbeds_accounting/models/account.py
82+
cloudbeds_accounting/models/account_category.py
83+
cloudbeds_accounting/models/accounts_receivable_ledger_paginated.py
84+
cloudbeds_accounting/models/accounts_receivable_ledger_patch_request.py
85+
cloudbeds_accounting/models/accounts_receivable_ledger_post_request.py
86+
cloudbeds_accounting/models/accounts_receivable_ledger_reservation_balance_transfer_response.py
87+
cloudbeds_accounting/models/accounts_receivable_ledger_reservation_balance_transfer_response_transaction.py
88+
cloudbeds_accounting/models/accounts_receivable_ledger_response.py
89+
cloudbeds_accounting/models/accounts_receivable_ledger_status.py
90+
cloudbeds_accounting/models/accounts_receivable_ledger_totals_response.py
91+
cloudbeds_accounting/models/action.py
92+
cloudbeds_accounting/models/and_or_group.py
93+
cloudbeds_accounting/models/and_or_group_and_inner.py
94+
cloudbeds_accounting/models/api_accounting_error.py
95+
cloudbeds_accounting/models/api_error_code.py
96+
cloudbeds_accounting/models/async_event_response.py
97+
cloudbeds_accounting/models/chart_of_account_type.py
98+
cloudbeds_accounting/models/conditional_operator.py
99+
cloudbeds_accounting/models/custom_general_ledger_code_model.py
100+
cloudbeds_accounting/models/custom_general_ledger_codes_update_request.py
101+
cloudbeds_accounting/models/custom_transaction_codes_model.py
102+
cloudbeds_accounting/models/custom_transaction_codes_update_model.py
103+
cloudbeds_accounting/models/custom_transaction_codes_update_request.py
104+
cloudbeds_accounting/models/deposit_balance_response.py
105+
cloudbeds_accounting/models/extended_transaction_paginated.py
106+
cloudbeds_accounting/models/extended_transaction_response.py
107+
cloudbeds_accounting/models/field_filter.py
108+
cloudbeds_accounting/models/filters.py
109+
cloudbeds_accounting/models/get_accounts_receivable_ledger_totals_filter_parameter.py
110+
cloudbeds_accounting/models/get_accounts_receivable_ledger_transactions_filter_parameter.py
111+
cloudbeds_accounting/models/get_accounts_receivable_ledgers_filter_parameter.py
112+
cloudbeds_accounting/models/get_deposit_transactions_filter_parameter.py
113+
cloudbeds_accounting/models/internal_transaction_code_group_enum.py
114+
cloudbeds_accounting/models/internal_transaction_code_response.py
115+
cloudbeds_accounting/models/internal_transaction_codes_list_response.py
116+
cloudbeds_accounting/models/list_transactions_paginated.py
117+
cloudbeds_accounting/models/list_transactions_request.py
118+
cloudbeds_accounting/models/logical_operator.py
119+
cloudbeds_accounting/models/page_details.py
120+
cloudbeds_accounting/models/reservation_status.py
121+
cloudbeds_accounting/models/sort.py
122+
cloudbeds_accounting/models/sort_direction.py
123+
cloudbeds_accounting/models/source_kind.py
124+
cloudbeds_accounting/models/transaction_item_mapping_model.py
125+
cloudbeds_accounting/models/transaction_item_mapping_request.py
126+
cloudbeds_accounting/models/transaction_item_mapping_update_model.py
127+
cloudbeds_accounting/models/transaction_response.py
128+
cloudbeds_accounting/models/transaction_state.py
129+
cloudbeds_accounting/models/transfer_deposit_post_request.py
130+
cloudbeds_accounting/models/trial_balance_configuration_status_response.py
131+
cloudbeds_accounting/models/trial_balance_report_code_info.py
132+
cloudbeds_accounting/models/trial_balance_report_guest_ledger.py
133+
cloudbeds_accounting/models/trial_balance_report_ledger_balances.py
134+
cloudbeds_accounting/models/trial_balance_report_response.py
135+
cloudbeds_accounting/models/trial_balance_report_summary.py
136+
cloudbeds_accounting/models/trial_balance_request.py
137+
cloudbeds_accounting/models/trial_balance_response.py
138+
cloudbeds_accounting/models/user_model.py
139+
cloudbeds_accounting/rest.py
140+
cloudbeds_accounting/test/__init__.py
141+
cloudbeds_accounting/test/test_account.py
142+
cloudbeds_accounting/test/test_account_category.py
143+
cloudbeds_accounting/test/test_accounts_receivable_ledger_api.py
144+
cloudbeds_accounting/test/test_accounts_receivable_ledger_paginated.py
145+
cloudbeds_accounting/test/test_accounts_receivable_ledger_patch_request.py
146+
cloudbeds_accounting/test/test_accounts_receivable_ledger_post_request.py
147+
cloudbeds_accounting/test/test_accounts_receivable_ledger_reservation_balance_transfer_response.py
148+
cloudbeds_accounting/test/test_accounts_receivable_ledger_reservation_balance_transfer_response_transaction.py
149+
cloudbeds_accounting/test/test_accounts_receivable_ledger_response.py
150+
cloudbeds_accounting/test/test_accounts_receivable_ledger_status.py
151+
cloudbeds_accounting/test/test_accounts_receivable_ledger_totals_response.py
152+
cloudbeds_accounting/test/test_action.py
153+
cloudbeds_accounting/test/test_and_or_group.py
154+
cloudbeds_accounting/test/test_and_or_group_and_inner.py
155+
cloudbeds_accounting/test/test_api_accounting_error.py
156+
cloudbeds_accounting/test/test_api_error_code.py
157+
cloudbeds_accounting/test/test_async_event_response.py
158+
cloudbeds_accounting/test/test_chart_of_account_type.py
159+
cloudbeds_accounting/test/test_conditional_operator.py
160+
cloudbeds_accounting/test/test_custom_general_ledger_code_model.py
161+
cloudbeds_accounting/test/test_custom_general_ledger_codes_api.py
162+
cloudbeds_accounting/test/test_custom_general_ledger_codes_update_request.py
163+
cloudbeds_accounting/test/test_custom_transaction_codes_api.py
164+
cloudbeds_accounting/test/test_custom_transaction_codes_model.py
165+
cloudbeds_accounting/test/test_custom_transaction_codes_update_model.py
166+
cloudbeds_accounting/test/test_custom_transaction_codes_update_request.py
167+
cloudbeds_accounting/test/test_deposit_balance_response.py
168+
cloudbeds_accounting/test/test_deposits_api.py
169+
cloudbeds_accounting/test/test_extended_transaction_paginated.py
170+
cloudbeds_accounting/test/test_extended_transaction_response.py
171+
cloudbeds_accounting/test/test_field_filter.py
172+
cloudbeds_accounting/test/test_filters.py
173+
cloudbeds_accounting/test/test_get_accounts_receivable_ledger_totals_filter_parameter.py
174+
cloudbeds_accounting/test/test_get_accounts_receivable_ledger_transactions_filter_parameter.py
175+
cloudbeds_accounting/test/test_get_accounts_receivable_ledgers_filter_parameter.py
176+
cloudbeds_accounting/test/test_get_deposit_transactions_filter_parameter.py
177+
cloudbeds_accounting/test/test_internal_transaction_code_group_enum.py
178+
cloudbeds_accounting/test/test_internal_transaction_code_response.py
179+
cloudbeds_accounting/test/test_internal_transaction_codes_api.py
180+
cloudbeds_accounting/test/test_internal_transaction_codes_list_response.py
181+
cloudbeds_accounting/test/test_list_transactions_paginated.py
182+
cloudbeds_accounting/test/test_list_transactions_request.py
183+
cloudbeds_accounting/test/test_logical_operator.py
184+
cloudbeds_accounting/test/test_page_details.py
185+
cloudbeds_accounting/test/test_reservation_status.py
186+
cloudbeds_accounting/test/test_sort.py
187+
cloudbeds_accounting/test/test_sort_direction.py
188+
cloudbeds_accounting/test/test_source_kind.py
189+
cloudbeds_accounting/test/test_transaction_item_mapping_model.py
190+
cloudbeds_accounting/test/test_transaction_item_mapping_request.py
191+
cloudbeds_accounting/test/test_transaction_item_mapping_update_model.py
192+
cloudbeds_accounting/test/test_transaction_response.py
193+
cloudbeds_accounting/test/test_transaction_state.py
194+
cloudbeds_accounting/test/test_transactions_api.py
195+
cloudbeds_accounting/test/test_transfer_deposit_post_request.py
196+
cloudbeds_accounting/test/test_trial_balance_api.py
197+
cloudbeds_accounting/test/test_trial_balance_configuration_status_response.py
198+
cloudbeds_accounting/test/test_trial_balance_report_code_info.py
199+
cloudbeds_accounting/test/test_trial_balance_report_guest_ledger.py
200+
cloudbeds_accounting/test/test_trial_balance_report_ledger_balances.py
201+
cloudbeds_accounting/test/test_trial_balance_report_response.py
202+
cloudbeds_accounting/test/test_trial_balance_report_summary.py
203+
cloudbeds_accounting/test/test_trial_balance_request.py
204+
cloudbeds_accounting/test/test_trial_balance_response.py
205+
cloudbeds_accounting/test/test_user_model.py

.openapi-generator/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7.11.0

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

0 commit comments

Comments
 (0)