Skip to content
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

API Updates for beta branch #1561

Merged
merged 67 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
40f9d22
API Updates (#1524)
dcr-stripe Aug 23, 2022
592d47b
Add beta readme.md section (#1520)
pakrym-stripe Aug 23, 2022
2bb0f50
Bump version to 10.4.0
dcr-stripe Aug 23, 2022
a2544be
Add coveralls
anniel-stripe Aug 23, 2022
213136a
Identify node version in COVERALLS_FLAG_NAME
anniel-stripe Aug 23, 2022
03a7f0d
Merge pull request #1526 from stripe/anniel-coveralls
anniel-stripe Aug 23, 2022
c356496
Update README.md to use a new NOTE notation (#1528)
pakrym-stripe Aug 24, 2022
3c65dab
fix: Update FetchHttpClient to send empty string for empty POST/PUT/P…
dcr-stripe Aug 24, 2022
e3545a0
Bump version to 10.5.0
dcr-stripe Aug 24, 2022
0298722
Regen yarn.lock. (#1531)
dcr-stripe Aug 25, 2022
966d8e9
Update coveralls step to run for one node version, remove finish step
anniel-stripe Aug 25, 2022
7d9972d
Merge pull request #1532 from stripe/anniel-coveralls-update
anniel-stripe Aug 26, 2022
51ff04e
API Updates (#1534)
dcr-stripe Aug 26, 2022
08d113d
Bump version to 10.6.0
dcr-stripe Aug 26, 2022
0115ee2
Add tsconfig, update package.json, rename lib to src, add build CI step
anniel-stripe Aug 30, 2022
1d27e63
Update configuration and dependencies, update imports in tests
anniel-stripe Aug 30, 2022
fefbaa7
Fix linting errors
anniel-stripe Aug 30, 2022
58ef5c6
API Updates (#1540)
pakrym-stripe Aug 31, 2022
18f88e4
Bump version to 10.7.0
pakrym-stripe Aug 31, 2022
27eadd3
Convert StripeResource to Typescript, add linting rules, fix tsconfig…
anniel-stripe Aug 31, 2022
48c719a
Update tsconfig.json to include JS files
anniel-stripe Aug 31, 2022
2a567fe
Rename build to lib, add more eslint rules, add prepack script, updat…
anniel-stripe Aug 31, 2022
999dae4
Ignore lib/
anniel-stripe Aug 31, 2022
6daeda7
Remove prepack script, instead add build step to publish CI
anniel-stripe Aug 31, 2022
f2cd99d
Add back prepack script
anniel-stripe Aug 31, 2022
e70e05f
Update main field
anniel-stripe Aug 31, 2022
5e2b92b
Merge branch 'master' into anniel-ts-build
anniel-stripe Aug 31, 2022
0805f7b
Remove unnecessary null check
anniel-stripe Aug 31, 2022
7d20c8e
Merge pull request #1539 from stripe/anniel-ts-build
anniel-stripe Sep 1, 2022
abd9eea
Migrate StripeMethod to Typescript
anniel-stripe Sep 1, 2022
796d947
Migrate autoPagination, makeRequest, stripe, StripeMethod to TS. Adju…
anniel-stripe Sep 2, 2022
aa07eb4
Migrate Error, update import/export in StripeResource and autoPagination
anniel-stripe Sep 2, 2022
6fb6573
Merge pull request #1543 from stripe/anniel-ts-infrastructure
anniel-stripe Sep 6, 2022
9c0d3a4
API Updates (#1544)
yejia-stripe Sep 6, 2022
dc6893e
Bump version to 10.8.0
yejia-stripe Sep 6, 2022
668f1a3
Run yarn install in prepack script (#1545)
yejia-stripe Sep 6, 2022
e4a31c2
Revert Typescript changes
anniel-stripe Sep 7, 2022
68e22cf
Merge pull request #1547 from stripe/anniel-revert-typescript
anniel-stripe Sep 7, 2022
af933a3
Bump version to 10.8.0
yejia-stripe Sep 7, 2022
3d7274a
API Updates (#1549)
yejia-stripe Sep 9, 2022
be894de
Bump version to 10.9.0
yejia-stripe Sep 9, 2022
dcba64a
Configure Typescript build and CI
anniel-stripe Sep 13, 2022
b523144
Migrate stripe, StripeResource, StripeMethod, autoPagination, makeReq…
anniel-stripe Sep 13, 2022
649e6fb
Enable no-var-requires, update imports/exports
anniel-stripe Sep 13, 2022
a9a6df9
Update src/stripe.ts
anniel-stripe Sep 14, 2022
fa5918a
Remove unnecessary nyc-config-typescript dependency
anniel-stripe Sep 14, 2022
3d63ada
Add test projects with CommonJS and ES6 imports
anniel-stripe Sep 14, 2022
354b7ac
Convert all module.exports to export = , convert all const = require …
anniel-stripe Sep 14, 2022
c9cd4b5
Check in lib/ and add CI step to validate lib/ is up-to-date
anniel-stripe Sep 14, 2022
b0953fd
Add .gitattributes marking lib as generated
anniel-stripe Sep 15, 2022
1d30e90
API Updates (#1552)
kamil-stripe Sep 15, 2022
9c0da25
Bump version to 10.10.0
kamil-stripe Sep 15, 2022
52c0dea
Reviewer comments
anniel-stripe Sep 19, 2022
15ccbca
Add sed command after build
anniel-stripe Sep 19, 2022
bac7630
Merge branch 'master' into anniel-typescript-take2
anniel-stripe Sep 19, 2022
c7180d9
Split up build script
anniel-stripe Sep 21, 2022
dac146d
API Updates (#1560)
pakrym-stripe Sep 22, 2022
eda7bff
Bump version to 10.11.0
pakrym-stripe Sep 22, 2022
2e98838
Add prettier-format script
anniel-stripe Sep 22, 2022
dc4f523
Merge branch 'master' into anniel-typescript-take2
anniel-stripe Sep 22, 2022
fffee63
Merge pull request #1551 from stripe/anniel-typescript-take2
anniel-stripe Sep 22, 2022
2a3d64e
Restore lib after generating
anniel-stripe Sep 23, 2022
17c5a21
Merge pull request #1562 from stripe/anniel-build-after-codegen
anniel-stripe Sep 23, 2022
260c8a2
Set version to 10.11.0 to simplify merge
pakrym-stripe Sep 26, 2022
024b64a
Include latest changes from the master branch
pakrym-stripe Sep 26, 2022
e42079d
Reset version to 10.6.0-beta.1
pakrym-stripe Sep 26, 2022
2cf9632
Codegen for openapi v196
pakrym-stripe Sep 26, 2022
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
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*.node*.js
node_modules
node_modules
lib
testProjects
26 changes: 26 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,4 +249,30 @@ module.exports = {
},
plugins: ['prettier'],
extends: ['plugin:prettier/recommended'],
overrides: [
{
files: ["**/*.ts"],
parser: "@typescript-eslint/parser",
plugins: ['@typescript-eslint', 'prettier'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
rules: {
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/no-empty-interface': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/triple-slash-reference': 0,
'@typescript-eslint/ban-ts-ignore': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/no-var-requires': 0,
'prefer-rest-params': 'off',
},
},
],
};
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib/** linguist-generated
26 changes: 14 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,21 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-

- name: Node check
run: find . -name "*.js" -type f -not -path "./node_modules/*" -not -path "./\.*" -exec node --check {} \;
- name: Build Typescript
run: yarn && yarn build

- name: Check for changes
run: |
if [[ `git status --porcelain` ]]; then
git diff
>&2 echo "Changes detected after compiling TypeScript. Please run yarn build and check in all compiled files in lib/."
exit 1
else
exit 0
fi

- name: Lint
run: yarn && yarn lint
run: yarn lint

test:
name: Test (${{ matrix.node }})
Expand Down Expand Up @@ -92,19 +102,11 @@ jobs:

- name: Coveralls
run: yarn report && yarn coveralls
if: matrix.node == '18'
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: node-${{ matrix.node }}
COVERALLS_SERVICE_NUMBER: ${{ github.run_id }}

finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
run: curl "https://coveralls.io/webhook?repo_token=${{ secrets.GITHUB_TOKEN }}&repo_name=${{ github.repository }}" -d "payload[build_num]=${{ github.run_id }}&payload[status]=done"

publish:
name: Publish
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ tags
.nyc_output
coverage
.idea
testProjects/**/node_modules
testProjects/**/package-lock.json
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,54 @@
# Changelog

## 10.11.0 - 2022-09-22
* [#1560](https://github.com/stripe/stripe-node/pull/1560) API Updates
* Add support for `terms_of_service` on `Checkout.Session.consent_collection`, `Checkout.Session.consent`, `CheckoutSessionCreateParams.consent_collection`, `PaymentLink.consent_collection`, and `PaymentLinkCreateParams.consent_collection`
* ⚠️ Remove support for `plan` on `CheckoutSessionCreateParams.payment_method_options.card.installments`. The property was mistakenly released and never worked.
* Add support for `statement_descriptor` on `PaymentIntentIncrementAuthorizationParams`
* Change `SubscriptionSchedule.phases[].currency` to be required

## 10.10.0 - 2022-09-15
* [#1552](https://github.com/stripe/stripe-node/pull/1552) API Updates
* Add support for `pix` on `Charge.payment_method_details`, `Checkout.Session.payment_method_options`, `CheckoutSessionCreateParams.payment_method_options`, `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentMethodCreateParams`, `PaymentMethod`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentCreateParams.payment_method_data`, and `SetupIntentUpdateParams.payment_method_data`
* Add support for new value `pix` on enum `CheckoutSessionCreateParams.payment_method_types[]`
* Add support for new value `pix` on enums `CustomerListPaymentMethodsParams.type` and `PaymentMethodListParams.type`
* Add support for `from_invoice` on `InvoiceCreateParams` and `Invoice`
* Add support for `latest_revision` on `Invoice`
* Add support for `amount` on `IssuingDisputeCreateParams` and `IssuingDisputeUpdateParams`
* Add support for new value `pix` on enums `PaymentIntentConfirmParams.payment_method_data.type`, `PaymentIntentCreateParams.payment_method_data.type`, `PaymentIntentUpdateParams.payment_method_data.type`, `SetupIntentConfirmParams.payment_method_data.type`, `SetupIntentCreateParams.payment_method_data.type`, and `SetupIntentUpdateParams.payment_method_data.type`
* Add support for `pix_display_qr_code` on `PaymentIntent.next_action`
* Add support for new value `pix` on enums `PaymentLink.payment_method_types[]`, `PaymentLinkCreateParams.payment_method_types[]`, and `PaymentLinkUpdateParams.payment_method_types[]`
* Add support for new value `pix` on enum `PaymentMethodCreateParams.type`
* Add support for new value `pix` on enum `PaymentMethod.type`
* Add support for `created` on `Treasury.CreditReversal` and `Treasury.DebitReversal`

## 10.9.0 - 2022-09-09
* [#1549](https://github.com/stripe/stripe-node/pull/1549) API Updates
* Add support for new value `terminal_reader_splashscreen` on enums `File.purpose` and `FileListParams.purpose`
* Add support for `require_signature` on `Issuing.Card.shipping` and `IssuingCardCreateParams.shipping`

## 10.8.0 - 2022-09-07
* [#1544](https://github.com/stripe/stripe-node/pull/1544) API Updates
* Add support for new value `terminal_reader_splashscreen` on enums `File.purpose` and `FileListParams.purpose`

## 10.7.0 - 2022-08-31
* [#1540](https://github.com/stripe/stripe-node/pull/1540) API Updates
* Add support for new values `de-CH`, `en-CH`, `en-PL`, `en-PT`, `fr-CH`, `it-CH`, `pl-PL`, and `pt-PT` on enums `OrderCreateParams.payment.settings.payment_method_options.klarna.preferred_locale`, `OrderUpdateParams.payment.settings.payment_method_options.klarna.preferred_locale`, `PaymentIntentConfirmParams.payment_method_options.klarna.preferred_locale`, `PaymentIntentCreateParams.payment_method_options.klarna.preferred_locale`, and `PaymentIntentUpdateParams.payment_method_options.klarna.preferred_locale`
* Add support for `description` on `PaymentLink.subscription_data` and `PaymentLinkCreateParams.subscription_data`

## 10.6.0 - 2022-08-26
* [#1534](https://github.com/stripe/stripe-node/pull/1534) API Updates
* Change `Account.company.name`, `Charge.refunds`, `PaymentIntent.charges`, `Product.caption`, `Product.statement_descriptor`, `Product.unit_label`, `Terminal.Configuration.tipping.aud.fixed_amounts`, `Terminal.Configuration.tipping.aud.percentages`, `Terminal.Configuration.tipping.cad.fixed_amounts`, `Terminal.Configuration.tipping.cad.percentages`, `Terminal.Configuration.tipping.chf.fixed_amounts`, `Terminal.Configuration.tipping.chf.percentages`, `Terminal.Configuration.tipping.czk.fixed_amounts`, `Terminal.Configuration.tipping.czk.percentages`, `Terminal.Configuration.tipping.dkk.fixed_amounts`, `Terminal.Configuration.tipping.dkk.percentages`, `Terminal.Configuration.tipping.eur.fixed_amounts`, `Terminal.Configuration.tipping.eur.percentages`, `Terminal.Configuration.tipping.gbp.fixed_amounts`, `Terminal.Configuration.tipping.gbp.percentages`, `Terminal.Configuration.tipping.hkd.fixed_amounts`, `Terminal.Configuration.tipping.hkd.percentages`, `Terminal.Configuration.tipping.myr.fixed_amounts`, `Terminal.Configuration.tipping.myr.percentages`, `Terminal.Configuration.tipping.nok.fixed_amounts`, `Terminal.Configuration.tipping.nok.percentages`, `Terminal.Configuration.tipping.nzd.fixed_amounts`, `Terminal.Configuration.tipping.nzd.percentages`, `Terminal.Configuration.tipping.sek.fixed_amounts`, `Terminal.Configuration.tipping.sek.percentages`, `Terminal.Configuration.tipping.sgd.fixed_amounts`, `Terminal.Configuration.tipping.sgd.percentages`, `Terminal.Configuration.tipping.usd.fixed_amounts`, `Terminal.Configuration.tipping.usd.percentages`, `Treasury.FinancialAccount.active_features`, `Treasury.FinancialAccount.pending_features`, `Treasury.FinancialAccount.platform_restrictions`, and `Treasury.FinancialAccount.restricted_features` to be optional
* This is a bug fix. These fields were all actually optional and not guaranteed to be returned by the Stripe API, however the type annotations did not correctly reflect this.
* Fixes https://github.com/stripe/stripe-node/issues/1518.
* Add support for `login_page` on `BillingPortal.Configuration`, `BillingPortalConfigurationCreateParams`, and `BillingPortalConfigurationUpdateParams`
* Add support for new value `deutsche_bank_ag` on enums `Charge.payment_method_details.eps.bank`, `PaymentIntentConfirmParams.payment_method_data.eps.bank`, `PaymentIntentCreateParams.payment_method_data.eps.bank`, `PaymentIntentUpdateParams.payment_method_data.eps.bank`, `PaymentMethod.eps.bank`, `PaymentMethodCreateParams.eps.bank`, `SetupIntentConfirmParams.payment_method_data.eps.bank`, `SetupIntentCreateParams.payment_method_data.eps.bank`, and `SetupIntentUpdateParams.payment_method_data.eps.bank`
* Add support for `customs` and `phone_number` on `Issuing.Card.shipping` and `IssuingCardCreateParams.shipping`
* Add support for `description` on `Quote.subscription_data`, `QuoteCreateParams.subscription_data`, `QuoteUpdateParams.subscription_data`, `SubscriptionSchedule.default_settings`, `SubscriptionSchedule.phases[]`, `SubscriptionScheduleCreateParams.default_settings`, `SubscriptionScheduleCreateParams.phases[]`, `SubscriptionScheduleUpdateParams.default_settings`, and `SubscriptionScheduleUpdateParams.phases[]`

* [#1532](https://github.com/stripe/stripe-node/pull/1532) Update coveralls step to run for one node version, remove finish step
* [#1531](https://github.com/stripe/stripe-node/pull/1531) Regen yarn.lock.

## 10.6.0-beta.1 - 2022-08-26
* [#1529](https://github.com/stripe/stripe-node/pull/1529) API Updates for beta branch
* Updated stable APIs to the latest version
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ update-version:
@perl -pi -e 's|"version": "[.\-\d\w]+"|"version": "$(VERSION)"|' package.json

codegen-format:
yarn && yarn fix
yarn && yarn fix && yarn build
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v185
v196
45 changes: 15 additions & 30 deletions lib/Error.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions lib/ResourceNamespace.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions lib/StripeMethod.basic.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 2 additions & 9 deletions lib/StripeMethod.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading