Skip to content

Commit a97cdb3

Browse files
authored
Merge pull request #164 from flowglad/release-please--branches--main--changes--next--components--node
release: 0.19.1
2 parents 448022a + b0c7ee4 commit a97cdb3

File tree

12 files changed

+569
-21
lines changed

12 files changed

+569
-21
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.19.0"
2+
".": "0.19.1"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 46
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/flowglad%2Fflowglad-c33de7567de263e6b5dde11d185128cffc46b51220921c663ff21aaa9662e105.yml
3-
openapi_spec_hash: fa9d7eeda6ebf7419218576074172593
4-
config_hash: 685a7225f4f24d19cb521bff0da5ef10
1+
configured_endpoints: 47
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/flowglad%2Fflowglad-2373e020bc9a415249b387fcec33e7dc51910b16bbb31271c6a43dd72b5881ca.yml
3+
openapi_spec_hash: 3eb536322e3f9a324d7155488a6d2db7
4+
config_hash: 67ca63fcd5d20f837ad72100ba11dd71

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
# Changelog
2+
## 0.19.1 (2025-04-10)
3+
4+
Full Changelog: [v0.19.0...v0.19.1](https://github.com/flowglad/flowglad-node/compare/v0.19.0...v0.19.1)
5+
6+
### Bug Fixes
7+
8+
* **api:** fix missing priceId on CheckoutSessionCreateParams ([e48ce4e](https://github.com/flowglad/flowglad-node/commit/e48ce4e167d67d621b3f517c297ee25f874632c1))
9+
* **api:** fix refund payment, better types on checkout session creation ([862204c](https://github.com/flowglad/flowglad-node/commit/862204c4cab30f85a91bf9885cddc968ce2c6a24))
10+
211
## 0.19.0 (2025-04-10)
312

413
Full Changelog: [v0.18.3...v0.19.0](https://github.com/flowglad/flowglad-node/compare/v0.18.3...v0.19.0)

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,13 @@ Types:
128128

129129
- <code><a href="./src/resources/payments.ts">PaymentRetrieveResponse</a></code>
130130
- <code><a href="./src/resources/payments.ts">PaymentListResponse</a></code>
131+
- <code><a href="./src/resources/payments.ts">PaymentRefundResponse</a></code>
131132

132133
Methods:
133134

134135
- <code title="get /api/v1/payments/{id}">client.payments.<a href="./src/resources/payments.ts">retrieve</a>(id) -> PaymentRetrieveResponse</code>
135136
- <code title="get /api/v1/payments">client.payments.<a href="./src/resources/payments.ts">list</a>({ ...params }) -> PaymentListResponse</code>
137+
- <code title="post /api/v1/payments/{id}/refund">client.payments.<a href="./src/resources/payments.ts">refund</a>(id, { ...params }) -> PaymentRefundResponse</code>
136138

137139
# PaymentMethods
138140

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@flowglad/node",
3-
"version": "0.19.0",
3+
"version": "0.19.1",
44
"description": "The official TypeScript library for the Flowglad API",
55
"author": "Flowglad <[email protected]>",
66
"types": "dist/index.d.ts",

src/client.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ import {
8585
import {
8686
PaymentListParams,
8787
PaymentListResponse,
88+
PaymentRefundParams,
89+
PaymentRefundResponse,
8890
PaymentRetrieveResponse,
8991
Payments,
9092
} from './resources/payments';
@@ -907,7 +909,9 @@ export declare namespace Flowglad {
907909
Payments as Payments,
908910
type PaymentRetrieveResponse as PaymentRetrieveResponse,
909911
type PaymentListResponse as PaymentListResponse,
912+
type PaymentRefundResponse as PaymentRefundResponse,
910913
type PaymentListParams as PaymentListParams,
914+
type PaymentRefundParams as PaymentRefundParams,
911915
};
912916

913917
export {

src/resources/checkout-sessions.ts

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,13 @@ export namespace CheckoutSessionListResponse {
11361136
}
11371137

11381138
export interface CheckoutSessionCreateParams {
1139-
checkoutSession: {
1139+
checkoutSession:
1140+
| CheckoutSessionCreateParams.ProductCheckoutSession
1141+
| CheckoutSessionCreateParams.AddPaymentMethodCheckoutSession;
1142+
}
1143+
1144+
export namespace CheckoutSessionCreateParams {
1145+
export interface ProductCheckoutSession {
11401146
/**
11411147
* The URL to redirect to after the purchase is cancelled or fails
11421148
*/
@@ -1152,11 +1158,7 @@ export interface CheckoutSessionCreateParams {
11521158
*/
11531159
successUrl: string;
11541160

1155-
/**
1156-
* The type of checkout session to create. Currently only `product` and
1157-
* `add_payment_method` are supported. All other types will throw an error.
1158-
*/
1159-
type: 'product' | 'purchase' | 'invoice' | 'add_payment_method';
1161+
type: 'product';
11601162

11611163
/**
11621164
* Metadata that will get added to the purchase or subscription created when this
@@ -1172,23 +1174,52 @@ export interface CheckoutSessionCreateParams {
11721174

11731175
/**
11741176
* The quantity of the purchase or subscription created when this checkout session
1175-
* succeeds. Ignored if the checkout session is of type `invoice`.
1177+
* succeeds. Ignored if the checkout session is of type `invoice`. If not provided, defaults to 1.
11761178
*/
11771179
quantity?: number;
11781180

1181+
/**
1182+
* The ID of the price the customer shall purchase.
1183+
*/
1184+
priceId: string;
1185+
}
1186+
1187+
export interface AddPaymentMethodCheckoutSession {
1188+
/**
1189+
* The URL to redirect to after the purchase is cancelled or fails
1190+
*/
1191+
cancelUrl: string;
1192+
1193+
/**
1194+
* The id of the Customer for this purchase session, as defined in your system
1195+
*/
1196+
customerExternalId: string;
1197+
1198+
/**
1199+
* The URL to redirect to after the purchase is successful
1200+
*/
1201+
successUrl: string;
1202+
11791203
/**
11801204
* The id of the subscription that the payment method will be added to as the
11811205
* default payment method.
11821206
*/
1183-
targetSubscriptionId?: string;
1207+
targetSubscriptionId: string;
1208+
1209+
type: 'add_payment_method';
11841210

11851211
/**
1186-
* The id of the price to purchase. Required if the checkout session is of type
1187-
* `product`. Ignored if the checkout session is of type `purchase`, `invoice`, or
1188-
* `add_payment_method`.
1212+
* Metadata that will get added to the purchase or subscription created when this
1213+
* checkout session succeeds. Ignored if the checkout session is of type `invoice`.
11891214
*/
1190-
priceId?: string;
1191-
};
1215+
outputMetadata?: Record<string, unknown>;
1216+
1217+
/**
1218+
* The name of the purchase or subscription created when this checkout session
1219+
* succeeds. Ignored if the checkout session is of type `invoice`.
1220+
*/
1221+
outputName?: string;
1222+
}
11921223
}
11931224

11941225
export interface CheckoutSessionListParams {

src/resources/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ export {
6666
Payments,
6767
type PaymentRetrieveResponse,
6868
type PaymentListResponse,
69+
type PaymentRefundResponse,
6970
type PaymentListParams,
71+
type PaymentRefundParams,
7072
} from './payments';
7173
export {
7274
Prices,

0 commit comments

Comments
 (0)