@salable/sdk 1.0.15 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -60,7 +60,7 @@ export interface CartItemsRequestBuilder extends BaseRequestBuilder<CartItemsReq
|
|
|
60
60
|
*/
|
|
61
61
|
byId(id: string): CartItemsItemRequestBuilder;
|
|
62
62
|
/**
|
|
63
|
-
*
|
|
63
|
+
* Adds a plan to an existing cart. Each cart item represents one plan a customer intends to purchase.
|
|
64
64
|
* @param body The request body
|
|
65
65
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
66
66
|
* @returns {Promise<CartItemsPostResponse>}
|
|
@@ -72,7 +72,7 @@ export interface CartItemsRequestBuilder extends BaseRequestBuilder<CartItemsReq
|
|
|
72
72
|
*/
|
|
73
73
|
post(body: CreateCartItemRequestSchema, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<CartItemsPostResponse | undefined>;
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
75
|
+
* Adds a plan to an existing cart. Each cart item represents one plan a customer intends to purchase.
|
|
76
76
|
* @param body The request body
|
|
77
77
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
78
78
|
* @returns {RequestInformation}
|
|
@@ -17,7 +17,7 @@ export interface CartsRequestBuilder extends BaseRequestBuilder<CartsRequestBuil
|
|
|
17
17
|
*/
|
|
18
18
|
byId(id: string): CartsItemRequestBuilder;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Returns a list of active carts in reverse chronological order by creation date.
|
|
21
21
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
22
22
|
* @returns {Promise<GetCartListSchema>}
|
|
23
23
|
* @throws {ErrorResponseBody} error when the service returns a 401 status code
|
|
@@ -27,7 +27,7 @@ export interface CartsRequestBuilder extends BaseRequestBuilder<CartsRequestBuil
|
|
|
27
27
|
*/
|
|
28
28
|
get(requestConfiguration?: RequestConfiguration<CartsRequestBuilderGetQueryParameters> | undefined): Promise<GetCartListSchema | undefined>;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Creates a new Cart for the specified owner. A Cart supports multi-Plan purchases on a single Subscription which enables plugin and add-on pricing models. Carts may also be created without a grantee, this allows customer to assemble a purchase before signing up; the Cart can then be attached to their account at sign-in.
|
|
31
31
|
* @param body The request body
|
|
32
32
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
33
33
|
* @returns {Promise<CreateCartResponseSchema>}
|
|
@@ -39,13 +39,13 @@ export interface CartsRequestBuilder extends BaseRequestBuilder<CartsRequestBuil
|
|
|
39
39
|
*/
|
|
40
40
|
post(body: CreateCartRequestSchema, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<CreateCartResponseSchema | undefined>;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Returns a list of active carts in reverse chronological order by creation date.
|
|
43
43
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
44
44
|
* @returns {RequestInformation}
|
|
45
45
|
*/
|
|
46
46
|
toGetRequestInformation(requestConfiguration?: RequestConfiguration<CartsRequestBuilderGetQueryParameters> | undefined): RequestInformation;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Creates a new Cart for the specified owner. A Cart supports multi-Plan purchases on a single Subscription which enables plugin and add-on pricing models. Carts may also be created without a grantee, this allows customer to assemble a purchase before signing up; the Cart can then be attached to their account at sign-in.
|
|
49
49
|
* @param body The request body
|
|
50
50
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
51
51
|
* @returns {RequestInformation}
|
|
@@ -53,21 +53,36 @@ export interface CartsRequestBuilder extends BaseRequestBuilder<CartsRequestBuil
|
|
|
53
53
|
toPostRequestInformation(body: CreateCartRequestSchema, requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Returns a list of active carts in reverse chronological order by creation date.
|
|
57
57
|
*/
|
|
58
58
|
export interface CartsRequestBuilderGetQueryParameters {
|
|
59
|
+
/**
|
|
60
|
+
* Return records after this cursor for forward pagination. Use the `nextCursor` from a previous response.
|
|
61
|
+
*/
|
|
59
62
|
after?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Return records before this cursor for backwards pagination. Use the `previousCursor` from a previous response.
|
|
65
|
+
*/
|
|
60
66
|
before?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Expand related resources inline. Accepts a comma-separated list. Supported values: `owner`.
|
|
69
|
+
*/
|
|
61
70
|
expand?: GetExpandQueryParameterType[];
|
|
62
71
|
/**
|
|
63
72
|
* The number of records returned in a response. Value between 1 and 100. Defaults to 25.
|
|
64
73
|
*/
|
|
65
74
|
limit?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Filter by owner ID. Accepts a comma-separated list of owner IDs.
|
|
77
|
+
*/
|
|
66
78
|
ownerId?: string[];
|
|
67
79
|
/**
|
|
68
|
-
* Search by
|
|
80
|
+
* Search carts by ID.
|
|
69
81
|
*/
|
|
70
82
|
search?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Filter by cart status. Accepts a comma-separated list. One of `active`, `abandoned`, `complete`.
|
|
85
|
+
*/
|
|
71
86
|
status?: GetStatusQueryParameterType[];
|
|
72
87
|
}
|
|
73
88
|
export type GetExpandQueryParameterType = (typeof GetExpandQueryParameterTypeObject)[keyof typeof GetExpandQueryParameterTypeObject];
|
|
@@ -5,7 +5,7 @@ import { type BaseRequestBuilder, type RequestConfiguration, type RequestInforma
|
|
|
5
5
|
*/
|
|
6
6
|
export interface CheckoutRequestBuilder extends BaseRequestBuilder<CheckoutRequestBuilder> {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Generates a Stripe checkout link for the items in the Cart.
|
|
9
9
|
* @param body The request body
|
|
10
10
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
11
11
|
* @returns {Promise<GenerateCheckoutLinkSchema>}
|
|
@@ -18,7 +18,7 @@ export interface CheckoutRequestBuilder extends BaseRequestBuilder<CheckoutReque
|
|
|
18
18
|
*/
|
|
19
19
|
post(body: GenerateCheckoutLinkRequestSchema, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<GenerateCheckoutLinkSchema | undefined>;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Generates a Stripe checkout link for the items in the Cart.
|
|
22
22
|
* @param body The request body
|
|
23
23
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
24
24
|
* @returns {RequestInformation}
|
|
@@ -10,7 +10,7 @@ export interface CartsItemRequestBuilder extends BaseRequestBuilder<CartsItemReq
|
|
|
10
10
|
*/
|
|
11
11
|
get checkout(): CheckoutRequestBuilder;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Marks the specified Cart as abandoned. The Cart record is preserved with its status set to abandoned, after which it can no longer be modified or checked out. Only active Carts can be abandoned.
|
|
14
14
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
15
15
|
* @throws {ErrorResponseBody} error when the service returns a 400 status code
|
|
16
16
|
* @throws {ErrorResponseBody} error when the service returns a 401 status code
|
|
@@ -21,7 +21,7 @@ export interface CartsItemRequestBuilder extends BaseRequestBuilder<CartsItemReq
|
|
|
21
21
|
*/
|
|
22
22
|
delete(requestConfiguration?: RequestConfiguration<object> | undefined): Promise<void>;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Retrieves the details of a Cart.
|
|
25
25
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
26
26
|
* @returns {Promise<GetCartDetailSchema>}
|
|
27
27
|
* @throws {ErrorResponseBody} error when the service returns a 400 status code
|
|
@@ -33,7 +33,7 @@ export interface CartsItemRequestBuilder extends BaseRequestBuilder<CartsItemReq
|
|
|
33
33
|
*/
|
|
34
34
|
get(requestConfiguration?: RequestConfiguration<object> | undefined): Promise<GetCartDetailSchema | undefined>;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Updates the specified Cart, only active Carts can be updated. The `cartItems` array updates existing items by ID; pass `granteeId` to change the Grantee, or metadata keyed by Line Item slug to set quantities. To add or remove Cart Items, use the Cart Items endpoints.
|
|
37
37
|
* @param body The request body
|
|
38
38
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
39
39
|
* @throws {ErrorResponseBody} error when the service returns a 400 status code
|
|
@@ -45,19 +45,19 @@ export interface CartsItemRequestBuilder extends BaseRequestBuilder<CartsItemReq
|
|
|
45
45
|
*/
|
|
46
46
|
put(body: UpdateCartRequestSchema, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<void>;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Marks the specified Cart as abandoned. The Cart record is preserved with its status set to abandoned, after which it can no longer be modified or checked out. Only active Carts can be abandoned.
|
|
49
49
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
50
50
|
* @returns {RequestInformation}
|
|
51
51
|
*/
|
|
52
52
|
toDeleteRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Retrieves the details of a Cart.
|
|
55
55
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
56
56
|
* @returns {RequestInformation}
|
|
57
57
|
*/
|
|
58
58
|
toGetRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* Updates the specified Cart, only active Carts can be updated. The `cartItems` array updates existing items by ID; pass `granteeId` to change the Grantee, or metadata keyed by Line Item slug to set quantities. To add or remove Cart Items, use the Cart Items endpoints.
|
|
61
61
|
* @param body The request body
|
|
62
62
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
63
63
|
* @returns {RequestInformation}
|
|
@@ -364,51 +364,51 @@ export declare function createBatchSubscriptionActionsResponseSchema_dataFromDis
|
|
|
364
364
|
export declare function createBatchSubscriptionActionsResponseSchemaFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
|
|
365
365
|
export interface CreateCartItemRequestSchema extends Parsable {
|
|
366
366
|
/**
|
|
367
|
-
* The
|
|
367
|
+
* The ID of the cart to add this item to. The cart's status must be active.
|
|
368
368
|
*/
|
|
369
369
|
cartId?: string | null;
|
|
370
370
|
/**
|
|
371
|
-
* The grantee
|
|
371
|
+
* The grantee to assign this cart item to. Pass any identifier like a user ID to assign to an individual grantee. If the value is not provided, the cart `owner` is used. To assign to a group, pass a group ID prefixed with `grp_`, useful for onboarding entire teams (only applicable to per-seat). The grantee will receive access to the plan's when the subscription is active.
|
|
372
372
|
*/
|
|
373
373
|
grantee?: string | null;
|
|
374
374
|
/**
|
|
375
|
-
* The interval
|
|
375
|
+
* The billing interval for this cart item. One of `day`, `week`, `month`, `year`. If the cart already has an interval set, this value must match it.
|
|
376
376
|
*/
|
|
377
377
|
interval?: CreateCartItemRequestSchema_interval | null;
|
|
378
378
|
/**
|
|
379
|
-
* The
|
|
379
|
+
* The number of intervals between billing cycles. If the cart already has an interval count set, this value must match it.
|
|
380
380
|
*/
|
|
381
381
|
intervalCount?: number | null;
|
|
382
382
|
/**
|
|
383
|
-
*
|
|
383
|
+
* Optional per-line-item configuration, keyed by line item slug. Use this to set the quantity for per-seat line items. Not applicable to metered line items or per-seat line items with a flat-rate billing scheme.
|
|
384
384
|
*/
|
|
385
385
|
metadata?: CreateCartItemRequestSchema_metadata | null;
|
|
386
386
|
/**
|
|
387
|
-
* The
|
|
387
|
+
* The ID of the plan to add to the cart. Each plan can only appear once per cart.
|
|
388
388
|
*/
|
|
389
389
|
planId?: string | null;
|
|
390
390
|
}
|
|
391
391
|
export type CreateCartItemRequestSchema_interval = (typeof CreateCartItemRequestSchema_intervalObject)[keyof typeof CreateCartItemRequestSchema_intervalObject];
|
|
392
392
|
/**
|
|
393
|
-
*
|
|
393
|
+
* Optional per-line-item configuration, keyed by line item slug. Use this to set the quantity for per-seat line items. Not applicable to metered line items or per-seat line items with a flat-rate billing scheme.
|
|
394
394
|
*/
|
|
395
395
|
export interface CreateCartItemRequestSchema_metadata extends AdditionalDataHolder, Parsable {
|
|
396
396
|
}
|
|
397
397
|
export interface CreateCartRequestSchema extends Parsable {
|
|
398
398
|
/**
|
|
399
|
-
* The currency
|
|
399
|
+
* The three-letter ISO 4217 currency code for the cart. If currency is not provided and all line items have the same default currency, the cart will use Geolocation.
|
|
400
400
|
*/
|
|
401
401
|
currency?: CreateCartRequestSchema_currency | null;
|
|
402
402
|
/**
|
|
403
|
-
* The interval
|
|
403
|
+
* The billing interval for the cart. If set to one of `day`, `week`, `month`, `year`. Must be set alongside `intervalCount`. If set to `null` the cart will be treated as a one off purchase.
|
|
404
404
|
*/
|
|
405
405
|
interval?: CreateCartRequestSchema_interval | null;
|
|
406
406
|
/**
|
|
407
|
-
* The
|
|
407
|
+
* The number of intervals between billing cycles. Must be set if `interval` is not `null`.
|
|
408
408
|
*/
|
|
409
409
|
intervalCount?: number | null;
|
|
410
410
|
/**
|
|
411
|
-
*
|
|
411
|
+
* An owner is an identifier used to scope Subscriptions, carts, and usage records in Salable. Typically a user ID for individual subscriptions or organization ID for team subscriptions.
|
|
412
412
|
*/
|
|
413
413
|
owner?: string | null;
|
|
414
414
|
}
|
|
@@ -17414,12 +17414,18 @@ export declare const BatchSubscriptionActionsRequestSchema_actionObject: {
|
|
|
17414
17414
|
readonly DisableAutoRenew: "disable-auto-renew";
|
|
17415
17415
|
readonly Delete: "delete";
|
|
17416
17416
|
};
|
|
17417
|
+
/**
|
|
17418
|
+
* The billing interval for this cart item. One of `day`, `week`, `month`, `year`. If the cart already has an interval set, this value must match it.
|
|
17419
|
+
*/
|
|
17417
17420
|
export declare const CreateCartItemRequestSchema_intervalObject: {
|
|
17418
17421
|
readonly Day: "day";
|
|
17419
17422
|
readonly Week: "week";
|
|
17420
17423
|
readonly Month: "month";
|
|
17421
17424
|
readonly Year: "year";
|
|
17422
17425
|
};
|
|
17426
|
+
/**
|
|
17427
|
+
* The three-letter ISO 4217 currency code for the cart. If currency is not provided and all line items have the same default currency, the cart will use Geolocation.
|
|
17428
|
+
*/
|
|
17423
17429
|
export declare const CreateCartRequestSchema_currencyObject: {
|
|
17424
17430
|
readonly USD: "USD";
|
|
17425
17431
|
readonly AED: "AED";
|
|
@@ -17560,6 +17566,9 @@ export declare const CreateCartRequestSchema_currencyObject: {
|
|
|
17560
17566
|
readonly KWD: "KWD";
|
|
17561
17567
|
readonly OMR: "OMR";
|
|
17562
17568
|
};
|
|
17569
|
+
/**
|
|
17570
|
+
* The billing interval for the cart. If set to one of `day`, `week`, `month`, `year`. Must be set alongside `intervalCount`. If set to `null` the cart will be treated as a one off purchase.
|
|
17571
|
+
*/
|
|
17563
17572
|
export declare const CreateCartRequestSchema_intervalObject: {
|
|
17564
17573
|
readonly Day: "day";
|
|
17565
17574
|
readonly Week: "week";
|