@salable/sdk 1.0.19 → 1.0.21
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 +31 -0
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -1
- package/dist/sdk/api/plans/index.d.ts +12 -2
- package/dist/sdk/api/subscriptions/item/index.d.ts +21 -1
- package/dist/sdk/models/index.d.ts +36 -0
- package/package.json +1 -1
|
@@ -4,6 +4,8 @@ import { type SaveRequestBuilder } from './save/index.js';
|
|
|
4
4
|
import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
|
|
5
5
|
export type GetCurrencyQueryParameterType = (typeof GetCurrencyQueryParameterTypeObject)[keyof typeof GetCurrencyQueryParameterTypeObject];
|
|
6
6
|
export type GetExpandQueryParameterType = (typeof GetExpandQueryParameterTypeObject)[keyof typeof GetExpandQueryParameterTypeObject];
|
|
7
|
+
export type GetIncludeArchivedQueryParameterType = (typeof GetIncludeArchivedQueryParameterTypeObject)[keyof typeof GetIncludeArchivedQueryParameterTypeObject];
|
|
8
|
+
export type GetIncludeFilterOptionsQueryParameterType = (typeof GetIncludeFilterOptionsQueryParameterTypeObject)[keyof typeof GetIncludeFilterOptionsQueryParameterTypeObject];
|
|
7
9
|
export type GetIntervalQueryParameterType = (typeof GetIntervalQueryParameterTypeObject)[keyof typeof GetIntervalQueryParameterTypeObject];
|
|
8
10
|
/**
|
|
9
11
|
* Builds and executes requests for operations under /api/plans
|
|
@@ -61,8 +63,8 @@ export interface PlansRequestBuilderGetQueryParameters {
|
|
|
61
63
|
before?: string;
|
|
62
64
|
currency?: GetCurrencyQueryParameterType;
|
|
63
65
|
expand?: GetExpandQueryParameterType[];
|
|
64
|
-
includeArchived?:
|
|
65
|
-
includeFilterOptions?:
|
|
66
|
+
includeArchived?: GetIncludeArchivedQueryParameterType;
|
|
67
|
+
includeFilterOptions?: GetIncludeFilterOptionsQueryParameterType;
|
|
66
68
|
interval?: GetIntervalQueryParameterType;
|
|
67
69
|
intervalCount?: string;
|
|
68
70
|
isActive?: string;
|
|
@@ -223,6 +225,14 @@ export declare const GetExpandQueryParameterTypeObject: {
|
|
|
223
225
|
readonly Product: "product";
|
|
224
226
|
readonly TierTag: "tierTag";
|
|
225
227
|
};
|
|
228
|
+
export declare const GetIncludeArchivedQueryParameterTypeObject: {
|
|
229
|
+
readonly TrueEscaped: "true";
|
|
230
|
+
readonly FalseEscaped: "false";
|
|
231
|
+
};
|
|
232
|
+
export declare const GetIncludeFilterOptionsQueryParameterTypeObject: {
|
|
233
|
+
readonly TrueEscaped: "true";
|
|
234
|
+
readonly FalseEscaped: "false";
|
|
235
|
+
};
|
|
226
236
|
export declare const GetIntervalQueryParameterTypeObject: {
|
|
227
237
|
readonly Day: "day";
|
|
228
238
|
readonly Week: "week";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type GetSubscriptionDetailSchema } from '../../../models/index.js';
|
|
1
|
+
import { type GetSubscriptionDetailSchema, type UpdateSalableOnlySubscriptionRequestSchema } from '../../../models/index.js';
|
|
2
2
|
import { type AutoRenewRequestBuilder } from './autoRenew/index.js';
|
|
3
3
|
import { type CancelRequestBuilder } from './cancel/index.js';
|
|
4
4
|
import { type InvoicesRequestBuilder } from './invoices/index.js';
|
|
@@ -53,6 +53,19 @@ export interface SubscriptionsItemRequestBuilder extends BaseRequestBuilder<Subs
|
|
|
53
53
|
* @throws {ErrorResponseBody} error when the service returns a 405 status code
|
|
54
54
|
*/
|
|
55
55
|
get(requestConfiguration?: RequestConfiguration<SubscriptionsItemRequestBuilderGetQueryParameters> | undefined): Promise<GetSubscriptionDetailSchema | undefined>;
|
|
56
|
+
/**
|
|
57
|
+
* Updates the interval and intervalCount on a Salable Only subscription. Both fields must be set together or both set to null. Setting both to null removes the interval from the subscription, which is only permitted if the subscription has no metered line items.
|
|
58
|
+
* @param body The request body
|
|
59
|
+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
60
|
+
* @throws {ErrorResponseBody} error when the service returns a 400 status code
|
|
61
|
+
* @throws {ErrorResponseBody} error when the service returns a 401 status code
|
|
62
|
+
* @throws {ErrorResponseBody} error when the service returns a 403 status code
|
|
63
|
+
* @throws {ErrorResponseBody} error when the service returns a 404 status code
|
|
64
|
+
* @throws {ErrorResponseBody} error when the service returns a 405 status code
|
|
65
|
+
* @throws {ErrorResponseBody} error when the service returns a 429 status code
|
|
66
|
+
* @throws {ErrorResponseBody} error when the service returns a 500 status code
|
|
67
|
+
*/
|
|
68
|
+
put(body: UpdateSalableOnlySubscriptionRequestSchema, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<void>;
|
|
56
69
|
/**
|
|
57
70
|
* Permanently deletes a subscription. This endpoint is only available in test mode. For recurring subscriptions that are not already canceled, this will first cancel the subscription on Stripe before deleting it.
|
|
58
71
|
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
@@ -65,6 +78,13 @@ export interface SubscriptionsItemRequestBuilder extends BaseRequestBuilder<Subs
|
|
|
65
78
|
* @returns {RequestInformation}
|
|
66
79
|
*/
|
|
67
80
|
toGetRequestInformation(requestConfiguration?: RequestConfiguration<SubscriptionsItemRequestBuilderGetQueryParameters> | undefined): RequestInformation;
|
|
81
|
+
/**
|
|
82
|
+
* Updates the interval and intervalCount on a Salable Only subscription. Both fields must be set together or both set to null. Setting both to null removes the interval from the subscription, which is only permitted if the subscription has no metered line items.
|
|
83
|
+
* @param body The request body
|
|
84
|
+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
85
|
+
* @returns {RequestInformation}
|
|
86
|
+
*/
|
|
87
|
+
toPutRequestInformation(body: UpdateSalableOnlySubscriptionRequestSchema, requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
|
|
68
88
|
}
|
|
69
89
|
/**
|
|
70
90
|
* Retrieves the details of a subscription.
|
|
@@ -3149,6 +3149,12 @@ export declare function createUpdateProductResponseSchema_dataFromDiscriminatorV
|
|
|
3149
3149
|
* @returns {UpdateProductResponseSchema}
|
|
3150
3150
|
*/
|
|
3151
3151
|
export declare function createUpdateProductResponseSchemaFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
|
|
3152
|
+
/**
|
|
3153
|
+
* Creates a new instance of the appropriate class based on discriminator value
|
|
3154
|
+
* @param parseNode The parse node to use to read the discriminator value and create the object
|
|
3155
|
+
* @returns {UpdateSalableOnlySubscriptionRequestSchema}
|
|
3156
|
+
*/
|
|
3157
|
+
export declare function createUpdateSalableOnlySubscriptionRequestSchemaFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
|
|
3152
3158
|
/**
|
|
3153
3159
|
* Creates a new instance of the appropriate class based on discriminator value
|
|
3154
3160
|
* @param parseNode The parse node to use to read the discriminator value and create the object
|
|
@@ -5596,6 +5602,12 @@ export declare function deserializeIntoUpdateProductResponseSchema(updateProduct
|
|
|
5596
5602
|
* @returns {Record<string, (node: ParseNode) => void>}
|
|
5597
5603
|
*/
|
|
5598
5604
|
export declare function deserializeIntoUpdateProductResponseSchema_data(updateProductResponseSchema_data?: Partial<UpdateProductResponseSchema_data> | undefined): Record<string, (node: ParseNode) => void>;
|
|
5605
|
+
/**
|
|
5606
|
+
* The deserialization information for the current model
|
|
5607
|
+
* @param UpdateSalableOnlySubscriptionRequestSchema The instance to deserialize into.
|
|
5608
|
+
* @returns {Record<string, (node: ParseNode) => void>}
|
|
5609
|
+
*/
|
|
5610
|
+
export declare function deserializeIntoUpdateSalableOnlySubscriptionRequestSchema(updateSalableOnlySubscriptionRequestSchema?: Partial<UpdateSalableOnlySubscriptionRequestSchema> | undefined): Record<string, (node: ParseNode) => void>;
|
|
5599
5611
|
/**
|
|
5600
5612
|
* The deserialization information for the current model
|
|
5601
5613
|
* @param UpdateSubscriptionItemsRequestSchema The instance to deserialize into.
|
|
@@ -16739,6 +16751,13 @@ export declare function serializeUpdateProductResponseSchema(writer: Serializati
|
|
|
16739
16751
|
* @param writer Serialization writer to use to serialize this model
|
|
16740
16752
|
*/
|
|
16741
16753
|
export declare function serializeUpdateProductResponseSchema_data(writer: SerializationWriter, updateProductResponseSchema_data?: Partial<UpdateProductResponseSchema_data> | undefined | null, isSerializingDerivedType?: boolean): void;
|
|
16754
|
+
/**
|
|
16755
|
+
* Serializes information the current object
|
|
16756
|
+
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
|
|
16757
|
+
* @param UpdateSalableOnlySubscriptionRequestSchema The instance to serialize from.
|
|
16758
|
+
* @param writer Serialization writer to use to serialize this model
|
|
16759
|
+
*/
|
|
16760
|
+
export declare function serializeUpdateSalableOnlySubscriptionRequestSchema(writer: SerializationWriter, updateSalableOnlySubscriptionRequestSchema?: Partial<UpdateSalableOnlySubscriptionRequestSchema> | undefined | null, isSerializingDerivedType?: boolean): void;
|
|
16742
16761
|
/**
|
|
16743
16762
|
* Serializes information the current object
|
|
16744
16763
|
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
|
|
@@ -17309,6 +17328,17 @@ export interface UpdateProductResponseSchema_data extends Parsable {
|
|
|
17309
17328
|
*/
|
|
17310
17329
|
updatedAt?: string | null;
|
|
17311
17330
|
}
|
|
17331
|
+
export interface UpdateSalableOnlySubscriptionRequestSchema extends Parsable {
|
|
17332
|
+
/**
|
|
17333
|
+
* The interval property
|
|
17334
|
+
*/
|
|
17335
|
+
interval?: UpdateSalableOnlySubscriptionRequestSchema_interval | null;
|
|
17336
|
+
/**
|
|
17337
|
+
* The intervalCount property
|
|
17338
|
+
*/
|
|
17339
|
+
intervalCount?: number | null;
|
|
17340
|
+
}
|
|
17341
|
+
export type UpdateSalableOnlySubscriptionRequestSchema_interval = (typeof UpdateSalableOnlySubscriptionRequestSchema_intervalObject)[keyof typeof UpdateSalableOnlySubscriptionRequestSchema_intervalObject];
|
|
17312
17342
|
export interface UpdateSubscriptionItemsRequestSchema extends Parsable {
|
|
17313
17343
|
/**
|
|
17314
17344
|
* The list of plan changes to apply to the subscription.
|
|
@@ -18094,6 +18124,12 @@ export declare const UpdateProductRequestSchema_settings_cardPrefillPreferenceOb
|
|
|
18094
18124
|
readonly Always: "always";
|
|
18095
18125
|
readonly Choice: "choice";
|
|
18096
18126
|
};
|
|
18127
|
+
export declare const UpdateSalableOnlySubscriptionRequestSchema_intervalObject: {
|
|
18128
|
+
readonly Day: "day";
|
|
18129
|
+
readonly Week: "week";
|
|
18130
|
+
readonly Month: "month";
|
|
18131
|
+
readonly Year: "year";
|
|
18132
|
+
};
|
|
18097
18133
|
/**
|
|
18098
18134
|
* Controls how Stripe handles proration when items change mid-billing-period. Required for paid subscriptions; not applicable to Salable-only subscriptions. One of `always_invoice`, `create_prorations`, `none`.
|
|
18099
18135
|
*/
|