diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 763462fa..43fd5a73 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -9,9 +9,7 @@ "postCreateCommand": "yarn install", "customizations": { "vscode": { - "extensions": [ - "esbenp.prettier-vscode" - ] + "extensions": ["esbenp.prettier-vscode"] } } } diff --git a/.eslintcache b/.eslintcache new file mode 100644 index 00000000..53667580 --- /dev/null +++ b/.eslintcache @@ -0,0 +1 @@ +[{"/home/tempuser-wcfu2u/run/codegen-output/orb/orb-node/src/resources/subscription-changes.ts":"1","/home/tempuser-wcfu2u/run/codegen-output/orb/orb-node/tests/api-resources/subscription-changes.test.ts":"2"},{"size":11543,"mtime":1759170667831},{"size":3488,"mtime":1759170667831}] \ No newline at end of file diff --git a/.gitignore b/.gitignore index d98d51a8..2412bb77 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ dist dist-deno /*.tgz .idea/ +.eslintcache diff --git a/.release-please-manifest.json b/.release-please-manifest.json index af6c62f4..c99ba658 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "5.11.0" + ".": "5.12.0" } diff --git a/.stats.yml b/.stats.yml index d522ff7b..b0dfd8e3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 118 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-42aa43f3893eef31a351e066bf0cf8c56da8c857ccbb45eb7dd58739ad43bd86.yml -openapi_spec_hash: e6b8c1e707036539d88a7b79af864a49 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-c075f748a7de8ecdccf11a8f2374682b0efd84f1318147274a838bf2fdd73b58.yml +openapi_spec_hash: ae918b8f348f1b7d3252a59dac36c453 config_hash: 1f73a949b649ecfe6ec68ba1bb459dc2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 46b1d17c..f5ed2e84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## 5.12.0 (2025-09-29) + +Full Changelog: [v5.11.0...v5.12.0](https://github.com/orbcorp/orb-node/compare/v5.11.0...v5.12.0) + +### Features + +* **api:** api update ([b0d5c86](https://github.com/orbcorp/orb-node/commit/b0d5c86e281ce0b40e24ce8cebc236d966118142)) + + +### Performance Improvements + +* faster formatting ([50c7725](https://github.com/orbcorp/orb-node/commit/50c77253c12be122ea838a3c00542f638713b2e5)) + + +### Chores + +* **internal:** codegen related update ([f7e1b19](https://github.com/orbcorp/orb-node/commit/f7e1b190045dc737efee567fa1e8846f842a1315)) +* **internal:** fix incremental formatting in some cases ([e4ce871](https://github.com/orbcorp/orb-node/commit/e4ce87131ac73f953c2b062a7bc6b74fd598c040)) +* **internal:** ignore .eslintcache ([ed5c44b](https://github.com/orbcorp/orb-node/commit/ed5c44b015bfc48032e2950d49fb547b48decc76)) +* **internal:** remove deprecated `compilerOptions.baseUrl` from tsconfig.json ([9da5396](https://github.com/orbcorp/orb-node/commit/9da53961a69eedcb3ed6178f91992bc7dce5ed68)) + ## 5.11.0 (2025-09-19) Full Changelog: [v5.10.0...v5.11.0](https://github.com/orbcorp/orb-node/compare/v5.10.0...v5.11.0) diff --git a/package.json b/package.json index eaacb393..697b516f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orb-billing", - "version": "5.11.0", + "version": "5.12.0", "description": "The official TypeScript library for the Orb API", "author": "Orb ", "types": "dist/index.d.ts", diff --git a/release-please-config.json b/release-please-config.json index 624ed99e..1ebd0bde 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -60,8 +60,5 @@ } ], "release-type": "node", - "extra-files": [ - "src/version.ts", - "README.md" - ] + "extra-files": ["src/version.ts", "README.md"] } diff --git a/scripts/fast-format b/scripts/fast-format new file mode 100755 index 00000000..8a8e9d59 --- /dev/null +++ b/scripts/fast-format @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +set -euo pipefail + +echo "Script started with $# arguments" +echo "Arguments: $*" +echo "Script location: $(dirname "$0")" + +cd "$(dirname "$0")/.." +echo "Changed to directory: $(pwd)" + +if [ $# -eq 0 ]; then + echo "Usage: $0 [additional-formatter-args...]" + echo "The file should contain one file path per line" + exit 1 +fi + +FILE_LIST="$1" + +echo "Looking for file: $FILE_LIST" + +if [ ! -f "$FILE_LIST" ]; then + echo "Error: File '$FILE_LIST' not found" + exit 1 +fi + +echo "==> Running eslint --fix" +ESLINT_FILES="$(grep '\.ts$' "$FILE_LIST" || true)" +if ! [ -z "$ESLINT_FILES" ]; then + echo "$ESLINT_FILES" | ESLINT_USE_FLAT_CONFIG="false" xargs ./node_modules/.bin/eslint --cache --fix +fi + +echo "==> Running prettier --write" +# format things eslint didn't +PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)" +if ! [ -z "$PRETTIER_FILES" ]; then + echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \ + --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \ + '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' +fi diff --git a/src/resources/subscription-changes.ts b/src/resources/subscription-changes.ts index 668da6a0..7b4ea301 100644 --- a/src/resources/subscription-changes.ts +++ b/src/resources/subscription-changes.ts @@ -321,7 +321,14 @@ export interface SubscriptionChangeApplyParams { description?: string | null; /** - * Amount already collected to apply to the customer's balance. + * Mark all pending invoices that are payable as paid. If amount is also provided, + * mark as paid and credit the difference to the customer's balance. + */ + mark_as_paid?: boolean | null; + + /** + * Amount already collected to apply to the customer's balance. If mark_as_paid is + * also provided, credit the difference to the customer's balance. */ previously_collected_amount?: string | null; } diff --git a/src/version.ts b/src/version.ts index 5c2d9a75..5ae28544 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '5.11.0'; // x-release-please-version +export const VERSION = '5.12.0'; // x-release-please-version diff --git a/tests/api-resources/subscription-changes.test.ts b/tests/api-resources/subscription-changes.test.ts index e64703c3..84a12de9 100644 --- a/tests/api-resources/subscription-changes.test.ts +++ b/tests/api-resources/subscription-changes.test.ts @@ -50,7 +50,11 @@ describe('resource subscriptionChanges', () => { await expect( client.subscriptionChanges.apply( 'subscription_change_id', - { description: 'description', previously_collected_amount: 'previously_collected_amount' }, + { + description: 'description', + mark_as_paid: true, + previously_collected_amount: 'previously_collected_amount', + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Orb.NotFoundError); diff --git a/tsconfig.build.json b/tsconfig.build.json index f9dae055..fea18611 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -5,8 +5,8 @@ "compilerOptions": { "rootDir": "./dist/src", "paths": { - "orb-billing/*": ["dist/src/*"], - "orb-billing": ["dist/src/index.ts"], + "orb-billing/*": ["./dist/src/*"], + "orb-billing": ["./dist/src/index.ts"] }, "noEmit": false, "declaration": true, diff --git a/tsconfig.json b/tsconfig.json index 653818c4..f684c28b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,11 +7,10 @@ "module": "commonjs", "moduleResolution": "node", "esModuleInterop": true, - "baseUrl": "./", "paths": { - "orb-billing/_shims/auto/*": ["src/_shims/auto/*-node"], - "orb-billing/*": ["src/*"], - "orb-billing": ["src/index.ts"] + "orb-billing/_shims/auto/*": ["./src/_shims/auto/*-node"], + "orb-billing/*": ["./src/*"], + "orb-billing": ["./src/index.ts"] }, "noEmit": true, @@ -32,7 +31,7 @@ "noUncheckedIndexedAccess": true, "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true, - "isolatedModules": false, + "isolatedModules": false, "skipLibCheck": true }