@salable/sdk 1.0.7 → 1.0.8
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.
- package/dist/index.es.js +4 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/sdk/api/subscriptionPlanLineItems/item/index.d.ts +21 -7
- package/dist/sdk/api/subscriptionPlanLineItems/item/sync/index.d.ts +2 -2
- package/dist/sdk/api/subscriptionPlans/index.d.ts +21 -3
- package/dist/sdk/api/subscriptionPlans/item/index.d.ts +22 -5
- package/dist/sdk/api/subscriptionPlans/item/seats/index.d.ts +16 -3
- package/dist/sdk/api/subscriptions/batch/index.d.ts +2 -2
- package/dist/sdk/api/subscriptions/index.d.ts +55 -13
- package/dist/sdk/api/subscriptions/item/autoRenew/index.d.ts +7 -5
- package/dist/sdk/api/subscriptions/item/index.d.ts +6 -3
- package/dist/sdk/api/subscriptions/item/invoices/index.d.ts +2 -2
- package/dist/sdk/api/subscriptions/item/portal/index.d.ts +2 -2
- package/dist/sdk/models/index.d.ts +49 -28
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type GetSubscriptionPlanLineItemSchema, type UpdateSubscriptionPlanLineItemSchema } from '../../../models/index.js';
|
|
2
2
|
import { type SyncRequestBuilder } from './sync/index.js';
|
|
3
3
|
import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
|
|
4
|
+
export type GetExpandQueryParameterType = (typeof GetExpandQueryParameterTypeObject)[keyof typeof GetExpandQueryParameterTypeObject];
|
|
4
5
|
/**
|
|
5
6
|
* Builds and executes requests for operations under /api/subscription-plan-line-items/{id}
|
|
6
7
|
*/
|
|
@@ -10,7 +11,7 @@ export interface SubscriptionPlanLineItemsItemRequestBuilder extends BaseRequest
|
|
|
10
11
|
*/
|
|
11
12
|
get sync(): SyncRequestBuilder;
|
|
12
13
|
/**
|
|
13
|
-
*
|
|
14
|
+
* Retrieves the details of a subscription plan line item.
|
|
14
15
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
15
16
|
* @returns {Promise<GetSubscriptionPlanLineItemSchema>}
|
|
16
17
|
* @throws {ErrorResponseBody} error when the service returns a 400 status code
|
|
@@ -20,9 +21,9 @@ export interface SubscriptionPlanLineItemsItemRequestBuilder extends BaseRequest
|
|
|
20
21
|
* @throws {ErrorResponseBody} error when the service returns a 405 status code
|
|
21
22
|
* @throws {ErrorResponseBody} error when the service returns a 500 status code
|
|
22
23
|
*/
|
|
23
|
-
get(requestConfiguration?: RequestConfiguration<
|
|
24
|
+
get(requestConfiguration?: RequestConfiguration<SubscriptionPlanLineItemsItemRequestBuilderGetQueryParameters> | undefined): Promise<GetSubscriptionPlanLineItemSchema | undefined>;
|
|
24
25
|
/**
|
|
25
|
-
*
|
|
26
|
+
* Updates the quantity of a subscription plan line item. The new quantity must be within the line item's configured minimum and maximum bounds, and cannot be lower than the current number of grantees on the attached group. For Stripe subscriptions, a proration behaviour must be specified.
|
|
26
27
|
* @param body The request body
|
|
27
28
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
28
29
|
* @throws {ErrorResponseBody} error when the service returns a 400 status code
|
|
@@ -34,23 +35,36 @@ export interface SubscriptionPlanLineItemsItemRequestBuilder extends BaseRequest
|
|
|
34
35
|
*/
|
|
35
36
|
put(body: UpdateSubscriptionPlanLineItemSchema, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<void>;
|
|
36
37
|
/**
|
|
37
|
-
*
|
|
38
|
+
* Retrieves the details of a subscription plan line item.
|
|
38
39
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
39
40
|
* @returns {RequestInformation}
|
|
40
41
|
*/
|
|
41
|
-
toGetRequestInformation(requestConfiguration?: RequestConfiguration<
|
|
42
|
+
toGetRequestInformation(requestConfiguration?: RequestConfiguration<SubscriptionPlanLineItemsItemRequestBuilderGetQueryParameters> | undefined): RequestInformation;
|
|
42
43
|
/**
|
|
43
|
-
*
|
|
44
|
+
* Updates the quantity of a subscription plan line item. The new quantity must be within the line item's configured minimum and maximum bounds, and cannot be lower than the current number of grantees on the attached group. For Stripe subscriptions, a proration behaviour must be specified.
|
|
44
45
|
* @param body The request body
|
|
45
46
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
46
47
|
* @returns {RequestInformation}
|
|
47
48
|
*/
|
|
48
49
|
toPutRequestInformation(body: UpdateSubscriptionPlanLineItemSchema, requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
|
|
49
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Retrieves the details of a subscription plan line item.
|
|
53
|
+
*/
|
|
54
|
+
export interface SubscriptionPlanLineItemsItemRequestBuilderGetQueryParameters {
|
|
55
|
+
/**
|
|
56
|
+
* Expand related resources inline. Accepts a comma-separated list. Supported values: `lineItem`, `subscriptionPlan`.
|
|
57
|
+
*/
|
|
58
|
+
expand?: GetExpandQueryParameterType[];
|
|
59
|
+
}
|
|
50
60
|
/**
|
|
51
61
|
* Uri template for the request builder.
|
|
52
62
|
*/
|
|
53
|
-
export declare const SubscriptionPlanLineItemsItemRequestBuilderUriTemplate = "{+baseurl}/api/subscription-plan-line-items/{id}";
|
|
63
|
+
export declare const SubscriptionPlanLineItemsItemRequestBuilderUriTemplate = "{+baseurl}/api/subscription-plan-line-items/{id}{?expand}";
|
|
64
|
+
export declare const GetExpandQueryParameterTypeObject: {
|
|
65
|
+
readonly LineItem: "lineItem";
|
|
66
|
+
readonly SubscriptionPlan: "subscriptionPlan";
|
|
67
|
+
};
|
|
54
68
|
/**
|
|
55
69
|
* Metadata for all the navigation properties in the request builder.
|
|
56
70
|
*/
|
|
@@ -4,7 +4,7 @@ import { type BaseRequestBuilder, type RequestConfiguration, type RequestInforma
|
|
|
4
4
|
*/
|
|
5
5
|
export interface SyncRequestBuilder extends BaseRequestBuilder<SyncRequestBuilder> {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Syncs a subscription plan line item to the latest available price for its associated line item. When synced, the corresponding Stripe subscription item is also updated to use the new price.
|
|
8
8
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
9
9
|
* @throws {ErrorResponseBody} error when the service returns a 400 status code
|
|
10
10
|
* @throws {ErrorResponseBody} error when the service returns a 401 status code
|
|
@@ -15,7 +15,7 @@ export interface SyncRequestBuilder extends BaseRequestBuilder<SyncRequestBuilde
|
|
|
15
15
|
*/
|
|
16
16
|
put(requestConfiguration?: RequestConfiguration<object> | undefined): Promise<void>;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Syncs a subscription plan line item to the latest available price for its associated line item. When synced, the corresponding Stripe subscription item is also updated to use the new price.
|
|
19
19
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
20
20
|
* @returns {RequestInformation}
|
|
21
21
|
*/
|
|
@@ -395,7 +395,7 @@ export interface SubscriptionPlansRequestBuilder extends BaseRequestBuilder<Subs
|
|
|
395
395
|
*/
|
|
396
396
|
byId(id: string): SubscriptionPlansItemRequestBuilder;
|
|
397
397
|
/**
|
|
398
|
-
*
|
|
398
|
+
* Returns a list of subscription plans. Each subscription plan represents a plan that a subscription is currently enrolled in. Subscription plans are returned sorted by creation date, with the most recently created appearing first.
|
|
399
399
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
400
400
|
* @returns {Promise<SubscriptionPlansGetResponse>}
|
|
401
401
|
* @throws {ErrorResponseBody} error when the service returns a 400 status code
|
|
@@ -407,25 +407,43 @@ export interface SubscriptionPlansRequestBuilder extends BaseRequestBuilder<Subs
|
|
|
407
407
|
*/
|
|
408
408
|
get(requestConfiguration?: RequestConfiguration<SubscriptionPlansRequestBuilderGetQueryParameters> | undefined): Promise<SubscriptionPlansGetResponse | undefined>;
|
|
409
409
|
/**
|
|
410
|
-
*
|
|
410
|
+
* Returns a list of subscription plans. Each subscription plan represents a plan that a subscription is currently enrolled in. Subscription plans are returned sorted by creation date, with the most recently created appearing first.
|
|
411
411
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
412
412
|
* @returns {RequestInformation}
|
|
413
413
|
*/
|
|
414
414
|
toGetRequestInformation(requestConfiguration?: RequestConfiguration<SubscriptionPlansRequestBuilderGetQueryParameters> | undefined): RequestInformation;
|
|
415
415
|
}
|
|
416
416
|
/**
|
|
417
|
-
*
|
|
417
|
+
* Returns a list of subscription plans. Each subscription plan represents a plan that a subscription is currently enrolled in. Subscription plans are returned sorted by creation date, with the most recently created appearing first.
|
|
418
418
|
*/
|
|
419
419
|
export interface SubscriptionPlansRequestBuilderGetQueryParameters {
|
|
420
|
+
/**
|
|
421
|
+
* Return records after this cursor for forward pagination. Use the `nextCursor` from a previous response.
|
|
422
|
+
*/
|
|
420
423
|
after?: string;
|
|
424
|
+
/**
|
|
425
|
+
* Return records before this cursor for backwards pagination. Use the `previousCursor` from a previous response.
|
|
426
|
+
*/
|
|
421
427
|
before?: string;
|
|
428
|
+
/**
|
|
429
|
+
* Expand related resources inline. Accepts a comma-separated list. Supported values: `subscriptionPlanLineItems`, `plan`.
|
|
430
|
+
*/
|
|
422
431
|
expand?: GetExpandQueryParameterType[];
|
|
423
432
|
/**
|
|
424
433
|
* The number of records returned in a response. Value between 1 and 100. Defaults to 25.
|
|
425
434
|
*/
|
|
426
435
|
limit?: string;
|
|
436
|
+
/**
|
|
437
|
+
* Returns only subscription plans belonging to this owner.
|
|
438
|
+
*/
|
|
427
439
|
owner?: string;
|
|
440
|
+
/**
|
|
441
|
+
* Accepts a comma-separated list. Returns subscription plans linked to any of the specified plans.
|
|
442
|
+
*/
|
|
428
443
|
plans?: string;
|
|
444
|
+
/**
|
|
445
|
+
* Defaults to `active`.
|
|
446
|
+
*/
|
|
429
447
|
status?: GetStatusQueryParameterType;
|
|
430
448
|
}
|
|
431
449
|
/**
|
|
@@ -324,6 +324,7 @@ export declare function deserializeIntoSubscriptionPlansGetResponse_data_subscri
|
|
|
324
324
|
* @returns {Record<string, (node: ParseNode) => void>}
|
|
325
325
|
*/
|
|
326
326
|
export declare function deserializeIntoSubscriptionPlansGetResponse_data_subscriptionPlanLineItems_data_usage_stripeSubscriptionItemIdMember1(subscriptionPlansGetResponse_data_subscriptionPlanLineItems_data_usage_stripeSubscriptionItemIdMember1?: Partial<SubscriptionPlansGetResponse_data_subscriptionPlanLineItems_data_usage_stripeSubscriptionItemIdMember1> | undefined): Record<string, (node: ParseNode) => void>;
|
|
327
|
+
export type GetExpandQueryParameterType = (typeof GetExpandQueryParameterTypeObject)[keyof typeof GetExpandQueryParameterTypeObject];
|
|
327
328
|
/**
|
|
328
329
|
* Serializes information the current object
|
|
329
330
|
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
|
|
@@ -1106,7 +1107,7 @@ export interface SubscriptionPlansItemRequestBuilder extends BaseRequestBuilder<
|
|
|
1106
1107
|
*/
|
|
1107
1108
|
get seats(): SeatsRequestBuilder;
|
|
1108
1109
|
/**
|
|
1109
|
-
*
|
|
1110
|
+
* Retrieves the details of an existing subscription plan.
|
|
1110
1111
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
1111
1112
|
* @returns {Promise<SubscriptionPlansGetResponse>}
|
|
1112
1113
|
* @throws {ErrorResponseBody} error when the service returns a 400 status code
|
|
@@ -1116,18 +1117,34 @@ export interface SubscriptionPlansItemRequestBuilder extends BaseRequestBuilder<
|
|
|
1116
1117
|
* @throws {ErrorResponseBody} error when the service returns a 405 status code
|
|
1117
1118
|
* @throws {ErrorResponseBody} error when the service returns a 500 status code
|
|
1118
1119
|
*/
|
|
1119
|
-
get(requestConfiguration?: RequestConfiguration<
|
|
1120
|
+
get(requestConfiguration?: RequestConfiguration<SubscriptionPlansItemRequestBuilderGetQueryParameters> | undefined): Promise<SubscriptionPlansGetResponse | undefined>;
|
|
1120
1121
|
/**
|
|
1121
|
-
*
|
|
1122
|
+
* Retrieves the details of an existing subscription plan.
|
|
1122
1123
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
1123
1124
|
* @returns {RequestInformation}
|
|
1124
1125
|
*/
|
|
1125
|
-
toGetRequestInformation(requestConfiguration?: RequestConfiguration<
|
|
1126
|
+
toGetRequestInformation(requestConfiguration?: RequestConfiguration<SubscriptionPlansItemRequestBuilderGetQueryParameters> | undefined): RequestInformation;
|
|
1127
|
+
}
|
|
1128
|
+
/**
|
|
1129
|
+
* Retrieves the details of an existing subscription plan.
|
|
1130
|
+
*/
|
|
1131
|
+
export interface SubscriptionPlansItemRequestBuilderGetQueryParameters {
|
|
1132
|
+
/**
|
|
1133
|
+
* Expand related resources inline. Accepts a comma-separated list. Supported values: `plan`, `subscription`, `subscriptionPlanLineItems`, `owner`, `group`.
|
|
1134
|
+
*/
|
|
1135
|
+
expand?: GetExpandQueryParameterType[];
|
|
1126
1136
|
}
|
|
1127
1137
|
/**
|
|
1128
1138
|
* Uri template for the request builder.
|
|
1129
1139
|
*/
|
|
1130
|
-
export declare const SubscriptionPlansItemRequestBuilderUriTemplate = "{+baseurl}/api/subscription-plans/{id}";
|
|
1140
|
+
export declare const SubscriptionPlansItemRequestBuilderUriTemplate = "{+baseurl}/api/subscription-plans/{id}{?expand}";
|
|
1141
|
+
export declare const GetExpandQueryParameterTypeObject: {
|
|
1142
|
+
readonly Plan: "plan";
|
|
1143
|
+
readonly Subscription: "subscription";
|
|
1144
|
+
readonly SubscriptionPlanLineItems: "subscriptionPlanLineItems";
|
|
1145
|
+
readonly Owner: "owner";
|
|
1146
|
+
readonly Group: "group";
|
|
1147
|
+
};
|
|
1131
1148
|
/**
|
|
1132
1149
|
* Metadata for all the navigation properties in the request builder.
|
|
1133
1150
|
*/
|
|
@@ -13,16 +13,21 @@ export declare function createSeatsPutRequestBodyFromDiscriminatorValue(parseNod
|
|
|
13
13
|
export declare function deserializeIntoSeatsPutRequestBody(seatsPutRequestBody?: Partial<SeatsPutRequestBody> | undefined): Record<string, (node: ParseNode) => void>;
|
|
14
14
|
export interface SeatsPutRequestBody extends AdditionalDataHolder, Parsable {
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Controls how Stripe handles proration when the seat quantity changes mid-billing-period. One of `always_invoice`, `create_prorations`, `none`.
|
|
17
|
+
*/
|
|
18
|
+
proration?: SeatsPutRequestBody_proration | null;
|
|
19
|
+
/**
|
|
20
|
+
* The new seat quantity. Must be within the line item's minimum and maximum allowed quantities, and cannot be less than the number of current grantees on the group.
|
|
17
21
|
*/
|
|
18
22
|
quantity?: number | null;
|
|
19
23
|
}
|
|
24
|
+
export type SeatsPutRequestBody_proration = (typeof SeatsPutRequestBody_prorationObject)[keyof typeof SeatsPutRequestBody_prorationObject];
|
|
20
25
|
/**
|
|
21
26
|
* Builds and executes requests for operations under /api/subscription-plans/{id}/seats
|
|
22
27
|
*/
|
|
23
28
|
export interface SeatsRequestBuilder extends BaseRequestBuilder<SeatsRequestBuilder> {
|
|
24
29
|
/**
|
|
25
|
-
*
|
|
30
|
+
* Updates the seat quantity on a per-seat subscription plan. The new quantity must be within the line item's minimum and maximum limits and cannot be less than the number of current grantees on the group.
|
|
26
31
|
* @param body The request body
|
|
27
32
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
28
33
|
* @throws {ErrorResponseBody} error when the service returns a 400 status code
|
|
@@ -34,7 +39,7 @@ export interface SeatsRequestBuilder extends BaseRequestBuilder<SeatsRequestBuil
|
|
|
34
39
|
*/
|
|
35
40
|
put(body: SeatsPutRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<void>;
|
|
36
41
|
/**
|
|
37
|
-
*
|
|
42
|
+
* Updates the seat quantity on a per-seat subscription plan. The new quantity must be within the line item's minimum and maximum limits and cannot be less than the number of current grantees on the group.
|
|
38
43
|
* @param body The request body
|
|
39
44
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
40
45
|
* @returns {RequestInformation}
|
|
@@ -52,6 +57,14 @@ export declare function serializeSeatsPutRequestBody(writer: SerializationWriter
|
|
|
52
57
|
* Uri template for the request builder.
|
|
53
58
|
*/
|
|
54
59
|
export declare const SeatsRequestBuilderUriTemplate = "{+baseurl}/api/subscription-plans/{id}/seats";
|
|
60
|
+
/**
|
|
61
|
+
* Controls how Stripe handles proration when the seat quantity changes mid-billing-period. One of `always_invoice`, `create_prorations`, `none`.
|
|
62
|
+
*/
|
|
63
|
+
export declare const SeatsPutRequestBody_prorationObject: {
|
|
64
|
+
readonly Always_invoice: "always_invoice";
|
|
65
|
+
readonly Create_prorations: "create_prorations";
|
|
66
|
+
readonly None: "none";
|
|
67
|
+
};
|
|
55
68
|
/**
|
|
56
69
|
* Metadata for all the requests in the request builder.
|
|
57
70
|
*/
|
|
@@ -5,7 +5,7 @@ import { type BaseRequestBuilder, type RequestConfiguration, type RequestInforma
|
|
|
5
5
|
*/
|
|
6
6
|
export interface BatchRequestBuilder extends BaseRequestBuilder<BatchRequestBuilder> {
|
|
7
7
|
/**
|
|
8
|
-
* Perform batch actions on multiple subscriptions. Supports cancel, enable-auto-renew, disable-auto-renew, and delete (test mode only).
|
|
8
|
+
* Perform batch actions on multiple subscriptions. Supports cancel, enable-auto-renew, disable-auto-renew, and delete (test mode only).
|
|
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<BatchSubscriptionActionsResponseSchema>}
|
|
@@ -18,7 +18,7 @@ export interface BatchRequestBuilder extends BaseRequestBuilder<BatchRequestBuil
|
|
|
18
18
|
*/
|
|
19
19
|
post(body: BatchSubscriptionActionsRequestSchema, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<BatchSubscriptionActionsResponseSchema | undefined>;
|
|
20
20
|
/**
|
|
21
|
-
* Perform batch actions on multiple subscriptions. Supports cancel, enable-auto-renew, disable-auto-renew, and delete (test mode only).
|
|
21
|
+
* Perform batch actions on multiple subscriptions. Supports cancel, enable-auto-renew, disable-auto-renew, and delete (test mode only).
|
|
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}
|
|
@@ -100,49 +100,52 @@ export declare function serializeSubscriptionsPostResponse(writer: Serialization
|
|
|
100
100
|
export declare function serializeSubscriptionsPostResponse_data(writer: SerializationWriter, subscriptionsPostResponse_data?: Partial<SubscriptionsPostResponse_data> | undefined | null, isSerializingDerivedType?: boolean): void;
|
|
101
101
|
export interface SubscriptionsPostRequestBody extends Parsable {
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
103
|
+
* When `true`, the subscription will be cancelled at the end of the current billing period rather than renewing.
|
|
104
104
|
*/
|
|
105
105
|
cancelAtPeriodEnd?: boolean | null;
|
|
106
106
|
/**
|
|
107
|
-
*
|
|
107
|
+
* A fixed date on which the subscription expires. Cannot be used together with `isPerpetual`.
|
|
108
108
|
*/
|
|
109
109
|
expiryDate?: Date | null;
|
|
110
110
|
/**
|
|
111
|
-
*
|
|
111
|
+
* A grantee is any entity that receives access to features or entitlements through a Subscription. These can represent users, teams, projects, boards, workspaces, or any other entity in your application that needs feature access.
|
|
112
112
|
*/
|
|
113
113
|
grantee?: string | null;
|
|
114
114
|
/**
|
|
115
|
-
* The interval
|
|
115
|
+
* The billing interval for the subscription. One of `day`, `week`, `month`, `year`.
|
|
116
116
|
*/
|
|
117
117
|
interval?: SubscriptionsPostRequestBody_interval | null;
|
|
118
118
|
/**
|
|
119
|
-
* The
|
|
119
|
+
* The number of intervals between each billing cycle. For example, `2` with interval `month` means every 2 months.
|
|
120
120
|
*/
|
|
121
121
|
intervalCount?: number | null;
|
|
122
122
|
/**
|
|
123
|
-
*
|
|
123
|
+
* When `true`, the subscription never expires. Cannot be used together with `expiryDate` or `cancelAtPeriodEnd`.
|
|
124
124
|
*/
|
|
125
125
|
isPerpetual?: boolean | null;
|
|
126
126
|
/**
|
|
127
|
-
*
|
|
127
|
+
* 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.
|
|
128
128
|
*/
|
|
129
129
|
owner?: string | null;
|
|
130
130
|
/**
|
|
131
|
-
* The plans
|
|
131
|
+
* The plans to include in this subscription. At least one plan is required.
|
|
132
132
|
*/
|
|
133
133
|
plans?: SubscriptionsPostRequestBody_plans[] | null;
|
|
134
134
|
}
|
|
135
135
|
export type SubscriptionsPostRequestBody_interval = (typeof SubscriptionsPostRequestBody_intervalObject)[keyof typeof SubscriptionsPostRequestBody_intervalObject];
|
|
136
136
|
export interface SubscriptionsPostRequestBody_plans extends Parsable {
|
|
137
137
|
/**
|
|
138
|
-
*
|
|
138
|
+
* Per-line-item quantity overrides, keyed by line item slug. Only applicable to non-metered line items with a maxQuantity more than 1.
|
|
139
139
|
*/
|
|
140
140
|
metadata?: SubscriptionsPostRequestBody_plans_metadata | null;
|
|
141
141
|
/**
|
|
142
|
-
* The
|
|
142
|
+
* The ID of the plan to subscribe to.
|
|
143
143
|
*/
|
|
144
144
|
planId?: string | null;
|
|
145
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* Per-line-item quantity overrides, keyed by line item slug. Only applicable to non-metered line items with a maxQuantity more than 1.
|
|
148
|
+
*/
|
|
146
149
|
export interface SubscriptionsPostRequestBody_plans_metadata extends AdditionalDataHolder, Parsable {
|
|
147
150
|
}
|
|
148
151
|
export interface SubscriptionsPostResponse extends AdditionalDataHolder, Parsable {
|
|
@@ -236,7 +239,7 @@ export interface SubscriptionsRequestBuilder extends BaseRequestBuilder<Subscrip
|
|
|
236
239
|
*/
|
|
237
240
|
byId(id: string): SubscriptionsItemRequestBuilder;
|
|
238
241
|
/**
|
|
239
|
-
*
|
|
242
|
+
* Returns a list of your subscriptions. The subscriptions are returned sorted by creation date, with the most recently created subscriptions appearing first.
|
|
240
243
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
241
244
|
* @returns {Promise<GetSubscriptionListSchema>}
|
|
242
245
|
* @throws {ErrorResponseBody} error when the service returns a 401 status code
|
|
@@ -257,7 +260,7 @@ export interface SubscriptionsRequestBuilder extends BaseRequestBuilder<Subscrip
|
|
|
257
260
|
*/
|
|
258
261
|
post(body: SubscriptionsPostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<SubscriptionsPostResponse | undefined>;
|
|
259
262
|
/**
|
|
260
|
-
*
|
|
263
|
+
* Returns a list of your subscriptions. The subscriptions are returned sorted by creation date, with the most recently created subscriptions appearing first.
|
|
261
264
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
262
265
|
* @returns {RequestInformation}
|
|
263
266
|
*/
|
|
@@ -271,24 +274,60 @@ export interface SubscriptionsRequestBuilder extends BaseRequestBuilder<Subscrip
|
|
|
271
274
|
toPostRequestInformation(body: SubscriptionsPostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
|
|
272
275
|
}
|
|
273
276
|
/**
|
|
274
|
-
*
|
|
277
|
+
* Returns a list of your subscriptions. The subscriptions are returned sorted by creation date, with the most recently created subscriptions appearing first.
|
|
275
278
|
*/
|
|
276
279
|
export interface SubscriptionsRequestBuilderGetQueryParameters {
|
|
280
|
+
/**
|
|
281
|
+
* Return records after this cursor for forward pagination. Use the `nextCursor` from a previous response.
|
|
282
|
+
*/
|
|
277
283
|
after?: string;
|
|
284
|
+
/**
|
|
285
|
+
* Return records before this cursor for backwards pagination. Use the `previousCursor` from a previous response.
|
|
286
|
+
*/
|
|
278
287
|
before?: string;
|
|
288
|
+
/**
|
|
289
|
+
* Expand related resources inline. Accepts a comma-separated list. Supported values: `owner`, `subscriptionPlans`.
|
|
290
|
+
*/
|
|
279
291
|
expand?: GetExpandQueryParameterType[];
|
|
292
|
+
/**
|
|
293
|
+
* Returns only the subscription with this exact ID.
|
|
294
|
+
*/
|
|
280
295
|
id?: string;
|
|
281
296
|
/**
|
|
282
297
|
* The number of records returned in a response. Value between 1 and 100. Defaults to 25.
|
|
283
298
|
*/
|
|
284
299
|
limit?: string;
|
|
300
|
+
/**
|
|
301
|
+
* Returns only subscriptions belonging to this owner.
|
|
302
|
+
*/
|
|
285
303
|
owner?: string;
|
|
304
|
+
/**
|
|
305
|
+
* Accepts a comma-separated list. Returns subscriptions that include any of the specified plans.
|
|
306
|
+
*/
|
|
286
307
|
plans?: string[];
|
|
308
|
+
/**
|
|
309
|
+
* Returns subscriptions that include a subscription plan line item linked to this price.
|
|
310
|
+
*/
|
|
287
311
|
priceId?: string;
|
|
312
|
+
/**
|
|
313
|
+
* Accepts a comma-separated list. Returns subscriptions that include a plan belonging to any of the specified products.
|
|
314
|
+
*/
|
|
288
315
|
products?: string[];
|
|
316
|
+
/**
|
|
317
|
+
* Search across subscription IDs, Stripe subscription IDs, owner values, plan IDs, plan names, product IDs, product names, price IDs, and Stripe price IDs.
|
|
318
|
+
*/
|
|
289
319
|
search?: string;
|
|
320
|
+
/**
|
|
321
|
+
* Sort results by a field and direction. Format: `field:direction` (eg `createdAt:asc`).
|
|
322
|
+
*/
|
|
290
323
|
sort?: string;
|
|
324
|
+
/**
|
|
325
|
+
* Accepts a comma-separated list of statuses (eg `active,canceled`).
|
|
326
|
+
*/
|
|
291
327
|
status?: string;
|
|
328
|
+
/**
|
|
329
|
+
* Returns subscriptions that include a subscription plan line item with this Stripe price ID.
|
|
330
|
+
*/
|
|
292
331
|
stripePriceId?: string;
|
|
293
332
|
}
|
|
294
333
|
/**
|
|
@@ -299,6 +338,9 @@ export declare const GetExpandQueryParameterTypeObject: {
|
|
|
299
338
|
readonly Owner: "owner";
|
|
300
339
|
readonly SubscriptionPlans: "subscriptionPlans";
|
|
301
340
|
};
|
|
341
|
+
/**
|
|
342
|
+
* The billing interval for the subscription. One of `day`, `week`, `month`, `year`.
|
|
343
|
+
*/
|
|
302
344
|
export declare const SubscriptionsPostRequestBody_intervalObject: {
|
|
303
345
|
readonly Day: "day";
|
|
304
346
|
readonly Week: "week";
|
|
@@ -4,7 +4,7 @@ import { type BaseRequestBuilder, type RequestConfiguration, type RequestInforma
|
|
|
4
4
|
*/
|
|
5
5
|
export interface AutoRenewRequestBuilder extends BaseRequestBuilder<AutoRenewRequestBuilder> {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Enables or disables auto-renew for a subscription. Disabling auto-renew will cancel the subscription at the end of the current billing period. Does not apply to perpetual subscriptions.
|
|
8
8
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
9
9
|
* @throws {ErrorResponseBody} error when the service returns a 400 status code
|
|
10
10
|
* @throws {ErrorResponseBody} error when the service returns a 401 status code
|
|
@@ -15,24 +15,26 @@ export interface AutoRenewRequestBuilder extends BaseRequestBuilder<AutoRenewReq
|
|
|
15
15
|
*/
|
|
16
16
|
put(requestConfiguration?: RequestConfiguration<AutoRenewRequestBuilderPutQueryParameters> | undefined): Promise<void>;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Enables or disables auto-renew for a subscription. Disabling auto-renew will cancel the subscription at the end of the current billing period. Does not apply to perpetual subscriptions.
|
|
19
19
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
20
20
|
* @returns {RequestInformation}
|
|
21
21
|
*/
|
|
22
22
|
toPutRequestInformation(requestConfiguration?: RequestConfiguration<AutoRenewRequestBuilderPutQueryParameters> | undefined): RequestInformation;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Enables or disables auto-renew for a subscription. Disabling auto-renew will cancel the subscription at the end of the current billing period. Does not apply to perpetual subscriptions.
|
|
26
26
|
*/
|
|
27
27
|
export interface AutoRenewRequestBuilderPutQueryParameters {
|
|
28
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Whether to enable or disable auto-renew. Use `enable` to resume renewal at period end, or `disable` to cancel at period end.
|
|
30
|
+
*/
|
|
29
31
|
status?: PutStatusQueryParameterType;
|
|
30
32
|
}
|
|
31
33
|
export type PutStatusQueryParameterType = (typeof PutStatusQueryParameterTypeObject)[keyof typeof PutStatusQueryParameterTypeObject];
|
|
32
34
|
/**
|
|
33
35
|
* Uri template for the request builder.
|
|
34
36
|
*/
|
|
35
|
-
export declare const AutoRenewRequestBuilderUriTemplate = "{+baseurl}/api/subscriptions/{id}/auto-renew?
|
|
37
|
+
export declare const AutoRenewRequestBuilderUriTemplate = "{+baseurl}/api/subscriptions/{id}/auto-renew?status={status}";
|
|
36
38
|
/**
|
|
37
39
|
* Metadata for all the requests in the request builder.
|
|
38
40
|
*/
|
|
@@ -43,7 +43,7 @@ export interface SubscriptionsItemRequestBuilder extends BaseRequestBuilder<Subs
|
|
|
43
43
|
*/
|
|
44
44
|
delete(requestConfiguration?: RequestConfiguration<object> | undefined): Promise<void>;
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Retrieves the details of a subscription.
|
|
47
47
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
48
48
|
* @returns {Promise<GetSubscriptionDetailSchema>}
|
|
49
49
|
* @throws {ErrorResponseBody} error when the service returns a 400 status code
|
|
@@ -60,16 +60,19 @@ export interface SubscriptionsItemRequestBuilder extends BaseRequestBuilder<Subs
|
|
|
60
60
|
*/
|
|
61
61
|
toDeleteRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
|
|
62
62
|
/**
|
|
63
|
-
*
|
|
63
|
+
* Retrieves the details of a subscription.
|
|
64
64
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
65
65
|
* @returns {RequestInformation}
|
|
66
66
|
*/
|
|
67
67
|
toGetRequestInformation(requestConfiguration?: RequestConfiguration<SubscriptionsItemRequestBuilderGetQueryParameters> | undefined): RequestInformation;
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
|
-
*
|
|
70
|
+
* Retrieves the details of a subscription.
|
|
71
71
|
*/
|
|
72
72
|
export interface SubscriptionsItemRequestBuilderGetQueryParameters {
|
|
73
|
+
/**
|
|
74
|
+
* Expand related resources inline. Accepts a comma-separated list. Supported values: `owner`, `subscriptionPlans`.
|
|
75
|
+
*/
|
|
73
76
|
expand?: GetExpandQueryParameterType[];
|
|
74
77
|
}
|
|
75
78
|
/**
|
|
@@ -5,7 +5,7 @@ import { type BaseRequestBuilder, type RequestConfiguration, type RequestInforma
|
|
|
5
5
|
*/
|
|
6
6
|
export interface InvoicesRequestBuilder extends BaseRequestBuilder<InvoicesRequestBuilder> {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Returns a list of invoices for the specified subscription, including an upcoming invoice preview if the subscription is active and not set to cancel at period end. Not available for Salable-only or perpetual subscriptions.
|
|
9
9
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
10
10
|
* @returns {Promise<GetSubscriptionInvoicesSchema>}
|
|
11
11
|
* @throws {ErrorResponseBody} error when the service returns a 400 status code
|
|
@@ -17,7 +17,7 @@ export interface InvoicesRequestBuilder extends BaseRequestBuilder<InvoicesReque
|
|
|
17
17
|
*/
|
|
18
18
|
get(requestConfiguration?: RequestConfiguration<object> | undefined): Promise<GetSubscriptionInvoicesSchema | undefined>;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Returns a list of invoices for the specified subscription, including an upcoming invoice preview if the subscription is active and not set to cancel at period end. Not available for Salable-only or perpetual subscriptions.
|
|
21
21
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
22
22
|
* @returns {RequestInformation}
|
|
23
23
|
*/
|
|
@@ -5,7 +5,7 @@ import { type BaseRequestBuilder, type RequestConfiguration, type RequestInforma
|
|
|
5
5
|
*/
|
|
6
6
|
export interface PortalRequestBuilder extends BaseRequestBuilder<PortalRequestBuilder> {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Creates a Stripe billing portal session for the specified subscription, returning a URL to redirect the customer to. The portal features available are configured per request.
|
|
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<CreatePortalResponseSchema>}
|
|
@@ -17,7 +17,7 @@ export interface PortalRequestBuilder extends BaseRequestBuilder<PortalRequestBu
|
|
|
17
17
|
*/
|
|
18
18
|
post(body: CreatePortalRequestSchema, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<CreatePortalResponseSchema | undefined>;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Creates a Stripe billing portal session for the specified subscription, returning a URL to redirect the customer to. The portal features available are configured per request.
|
|
21
21
|
* @param body The request body
|
|
22
22
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
23
23
|
* @returns {RequestInformation}
|