@ominity/api-typescript 1.4.7 → 1.5.0
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/commonjs/funcs/commerce/customerSubscriptions.d.ts +6 -0
- package/dist/commonjs/funcs/commerce/customerSubscriptions.d.ts.map +1 -1
- package/dist/commonjs/funcs/commerce/customerSubscriptions.js +13 -1
- package/dist/commonjs/funcs/commerce/customerSubscriptions.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +1 -1
- package/dist/commonjs/models/commerce/index.d.ts +1 -0
- package/dist/commonjs/models/commerce/index.d.ts.map +1 -1
- package/dist/commonjs/models/commerce/index.js +1 -0
- package/dist/commonjs/models/commerce/index.js.map +1 -1
- package/dist/commonjs/models/commerce/subscription-change.d.ts +72 -0
- package/dist/commonjs/models/commerce/subscription-change.d.ts.map +1 -0
- package/dist/commonjs/models/commerce/subscription-change.js +96 -0
- package/dist/commonjs/models/commerce/subscription-change.js.map +1 -0
- package/dist/commonjs/models/commerce/subscription.d.ts +3 -1
- package/dist/commonjs/models/commerce/subscription.d.ts.map +1 -1
- package/dist/commonjs/models/commerce/subscription.js +2 -1
- package/dist/commonjs/models/commerce/subscription.js.map +1 -1
- package/dist/commonjs/models/errors/error-response.d.ts +6 -0
- package/dist/commonjs/models/errors/error-response.d.ts.map +1 -1
- package/dist/commonjs/models/errors/error-response.js +8 -1
- package/dist/commonjs/models/errors/error-response.js.map +1 -1
- package/dist/commonjs/models/operations/commerce-customer-subscriptions.d.ts +61 -0
- package/dist/commonjs/models/operations/commerce-customer-subscriptions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/commerce-customer-subscriptions.js +17 -1
- package/dist/commonjs/models/operations/commerce-customer-subscriptions.js.map +1 -1
- package/dist/commonjs/sdk/commerce/customer-subscriptions.d.ts +15 -0
- package/dist/commonjs/sdk/commerce/customer-subscriptions.d.ts.map +1 -1
- package/dist/commonjs/sdk/commerce/customer-subscriptions.js +15 -0
- package/dist/commonjs/sdk/commerce/customer-subscriptions.js.map +1 -1
- package/dist/esm/funcs/commerce/customerSubscriptions.d.ts +6 -0
- package/dist/esm/funcs/commerce/customerSubscriptions.d.ts.map +1 -1
- package/dist/esm/funcs/commerce/customerSubscriptions.js +6 -0
- package/dist/esm/funcs/commerce/customerSubscriptions.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +1 -1
- package/dist/esm/models/commerce/index.d.ts +1 -0
- package/dist/esm/models/commerce/index.d.ts.map +1 -1
- package/dist/esm/models/commerce/index.js +1 -0
- package/dist/esm/models/commerce/index.js.map +1 -1
- package/dist/esm/models/commerce/subscription-change.d.ts +72 -0
- package/dist/esm/models/commerce/subscription-change.d.ts.map +1 -0
- package/dist/esm/models/commerce/subscription-change.js +60 -0
- package/dist/esm/models/commerce/subscription-change.js.map +1 -0
- package/dist/esm/models/commerce/subscription.d.ts +3 -1
- package/dist/esm/models/commerce/subscription.d.ts.map +1 -1
- package/dist/esm/models/commerce/subscription.js +2 -1
- package/dist/esm/models/commerce/subscription.js.map +1 -1
- package/dist/esm/models/errors/error-response.d.ts +6 -0
- package/dist/esm/models/errors/error-response.d.ts.map +1 -1
- package/dist/esm/models/errors/error-response.js +8 -1
- package/dist/esm/models/errors/error-response.js.map +1 -1
- package/dist/esm/models/operations/commerce-customer-subscriptions.d.ts +61 -0
- package/dist/esm/models/operations/commerce-customer-subscriptions.d.ts.map +1 -1
- package/dist/esm/models/operations/commerce-customer-subscriptions.js +16 -0
- package/dist/esm/models/operations/commerce-customer-subscriptions.js.map +1 -1
- package/dist/esm/sdk/commerce/customer-subscriptions.d.ts +15 -0
- package/dist/esm/sdk/commerce/customer-subscriptions.d.ts.map +1 -1
- package/dist/esm/sdk/commerce/customer-subscriptions.js +16 -1
- package/dist/esm/sdk/commerce/customer-subscriptions.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/commerce/customerSubscriptions.ts +6 -0
- package/src/lib/config.ts +1 -1
- package/src/models/commerce/index.ts +1 -0
- package/src/models/commerce/subscription-change.ts +137 -0
- package/src/models/commerce/subscription.ts +5 -2
- package/src/models/errors/error-response.ts +13 -1
- package/src/models/operations/commerce-customer-subscriptions.ts +37 -0
- package/src/sdk/commerce/customer-subscriptions.ts +16 -1
- package/tests/core-operations.test.mjs +125 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commerce-customer-subscriptions.js","sourceRoot":"","sources":["../../../../src/models/operations/commerce-customer-subscriptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA4B;AAC5B,uDAAwE;AACxE,iEAAuF;
|
|
1
|
+
{"version":3,"file":"commerce-customer-subscriptions.js","sourceRoot":"","sources":["../../../../src/models/operations/commerce-customer-subscriptions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA4B;AAC5B,uDAAwE;AACxE,iEAAuF;AACvF,+EAAwK;AAExK,6CAAwF;AAI3E,QAAA,+CAA+C,GAAgD,uCAA0B,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AACnK,QAAA,+CAA+C,GAAG,IAAA,4BAAe,EAAC,eAAe,EAAE,4CAA0B,CAAC,CAAC;AAI/G,QAAA,6CAA6C,GAA8C,CAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAC5L,QAAA,6CAA6C,GAAG,4CAA0B,CAAC;AAI3E,QAAA,gDAAgD,GAAiD,CAAC,CAAC,MA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C,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AACtM,QAAA,4DAA4D,GAAoB,CAAC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -5,9 +5,24 @@ export declare class CustomerSubscriptions extends ClientSDK {
|
|
|
5
5
|
get(request: operations.GetCustomerSubscriptionRequest, options?: RequestOptions): Promise<operations.GetCustomerSubscriptionResponse>;
|
|
6
6
|
create(request: operations.CreateCustomerSubscriptionRequest, options?: RequestOptions): Promise<operations.CreateCustomerSubscriptionResponse>;
|
|
7
7
|
update(request: operations.UpdateCustomerSubscriptionRequest, options?: RequestOptions): Promise<operations.UpdateCustomerSubscriptionResponse>;
|
|
8
|
+
/** Cancels the subscription straight away. Use `cancel` to cancel according to the cancellation policy (notice, minimum term, period end). */
|
|
8
9
|
delete(request: operations.DeleteCustomerSubscriptionRequest, options?: RequestOptions): Promise<void>;
|
|
9
10
|
renew(request: operations.RenewCustomerSubscriptionRequest, options?: RequestOptions): Promise<operations.RenewCustomerSubscriptionResponse>;
|
|
11
|
+
/** The plans the customer may change the subscription to, each quoted at the default timing. */
|
|
12
|
+
listTransitions(request: operations.ListCustomerSubscriptionTransitionsRequest, options?: RequestOptions): Promise<operations.ListCustomerSubscriptionTransitionsResponse>;
|
|
13
|
+
/** Quotes a change to another offer. Confirm it with `confirmChange` before `quoteExpiresAt`. */
|
|
14
|
+
quoteChange(request: operations.QuoteCustomerSubscriptionChangeRequest, options?: RequestOptions): Promise<operations.QuoteCustomerSubscriptionChangeResponse>;
|
|
15
|
+
/** Confirms a quoted change. An immediate upgrade that needs payment returns the order to pay as `orderId` / `links.checkout`. */
|
|
16
|
+
confirmChange(request: operations.ConfirmCustomerSubscriptionChangeRequest, options?: RequestOptions): Promise<operations.ConfirmCustomerSubscriptionChangeResponse>;
|
|
17
|
+
/** Withdraws a scheduled change, or an immediate upgrade that was not paid yet. */
|
|
18
|
+
cancelChange(request: operations.CancelCustomerSubscriptionChangeRequest, options?: RequestOptions): Promise<void>;
|
|
19
|
+
/** Without `quoteId` quotes the cancellation; with the quote's `id` confirms it. It can be revoked until it takes effect. */
|
|
20
|
+
cancel(request: operations.CancelCustomerSubscriptionRequest, options?: RequestOptions): Promise<operations.CancelCustomerSubscriptionResponse>;
|
|
21
|
+
/** Revokes a scheduled cancellation; the subscription keeps renewing. */
|
|
22
|
+
revokeCancellation(request: operations.RevokeCustomerSubscriptionCancellationRequest, options?: RequestOptions): Promise<void>;
|
|
23
|
+
/** @deprecated Use `listTransitions`. The server may answer 410 Gone once the legacy endpoints are retired. */
|
|
10
24
|
listTransitionProducts(request: operations.ListCustomerSubscriptionTransitionProductsRequest, options?: RequestOptions): Promise<operations.ListCustomerSubscriptionTransitionProductsResponse>;
|
|
25
|
+
/** @deprecated Use `quoteChange`. The server may answer 410 Gone once the legacy endpoints are retired. */
|
|
11
26
|
getTransitionProduct(request: operations.GetCustomerSubscriptionTransitionProductRequest, options?: RequestOptions): Promise<operations.GetCustomerSubscriptionTransitionProductResponse>;
|
|
12
27
|
}
|
|
13
28
|
//# sourceMappingURL=customer-subscriptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer-subscriptions.d.ts","sourceRoot":"","sources":["../../../../src/sdk/commerce/customer-subscriptions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAE/D,qBAAa,qBAAsB,SAAQ,SAAS;IAC5C,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,gCAAgC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,iCAAiC,CAAC;IAC3I,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,8BAA8B,EA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ustomerSubscriptions extends sdks_js_1.ClientSDK {
|
|
|
9
9
|
async get(request, options) { return (0, fp_js_1.unwrapAsync)((0, index_js_1.customerSubscriptionsGet)(this, request, options)); }
|
|
10
10
|
async create(request, options) { return (0, fp_js_1.unwrapAsync)((0, index_js_1.customerSubscriptionsCreate)(this, request, options)); }
|
|
11
11
|
async update(request, options) { return (0, fp_js_1.unwrapAsync)((0, index_js_1.customerSubscriptionsUpdate)(this, request, options)); }
|
|
12
|
+
/** Cancels the subscription straight away. Use `cancel` to cancel according to the cancellation policy (notice, minimum term, period end). */
|
|
12
13
|
async delete(request, options) { return (0, fp_js_1.unwrapAsync)((0, index_js_1.customerSubscriptionsDelete)(this, request, options)); }
|
|
13
14
|
async renew(request, options) { return (0, fp_js_1.unwrapAsync)((0, index_js_1.customerSubscriptionsRenew)(this, request, options)); }
|
|
15
|
+
/** The plans the customer may change the subscription to, each quoted at the default timing. */
|
|
16
|
+
async listTransitions(request, options) { return (0, fp_js_1.unwrapAsync)((0, index_js_1.customerSubscriptionsListTransitions)(this, request, options)); }
|
|
17
|
+
/** Quotes a change to another offer. Confirm it with `confirmChange` before `quoteExpiresAt`. */
|
|
18
|
+
async quoteChange(request, options) { return (0, fp_js_1.unwrapAsync)((0, index_js_1.customerSubscriptionsQuoteChange)(this, request, options)); }
|
|
19
|
+
/** Confirms a quoted change. An immediate upgrade that needs payment returns the order to pay as `orderId` / `links.checkout`. */
|
|
20
|
+
async confirmChange(request, options) { return (0, fp_js_1.unwrapAsync)((0, index_js_1.customerSubscriptionsConfirmChange)(this, request, options)); }
|
|
21
|
+
/** Withdraws a scheduled change, or an immediate upgrade that was not paid yet. */
|
|
22
|
+
async cancelChange(request, options) { return (0, fp_js_1.unwrapAsync)((0, index_js_1.customerSubscriptionsCancelChange)(this, request, options)); }
|
|
23
|
+
/** Without `quoteId` quotes the cancellation; with the quote's `id` confirms it. It can be revoked until it takes effect. */
|
|
24
|
+
async cancel(request, options) { return (0, fp_js_1.unwrapAsync)((0, index_js_1.customerSubscriptionsCancel)(this, request, options)); }
|
|
25
|
+
/** Revokes a scheduled cancellation; the subscription keeps renewing. */
|
|
26
|
+
async revokeCancellation(request, options) { return (0, fp_js_1.unwrapAsync)((0, index_js_1.customerSubscriptionsRevokeCancellation)(this, request, options)); }
|
|
27
|
+
/** @deprecated Use `listTransitions`. The server may answer 410 Gone once the legacy endpoints are retired. */
|
|
14
28
|
async listTransitionProducts(request, options) { return (0, fp_js_1.unwrapAsync)((0, index_js_1.customerSubscriptionsListTransitionProducts)(this, request, options)); }
|
|
29
|
+
/** @deprecated Use `quoteChange`. The server may answer 410 Gone once the legacy endpoints are retired. */
|
|
15
30
|
async getTransitionProduct(request, options) { return (0, fp_js_1.unwrapAsync)((0, index_js_1.customerSubscriptionsGetTransitionProduct)(this, request, options)); }
|
|
16
31
|
}
|
|
17
32
|
exports.CustomerSubscriptions = CustomerSubscriptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customer-subscriptions.js","sourceRoot":"","sources":["../../../../src/sdk/commerce/customer-subscriptions.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"customer-subscriptions.js","sourceRoot":"","sources":["../../../../src/sdk/commerce/customer-subscriptions.ts"],"names":[],"mappings":";;;AAAA,4DAAogB;AACpgB,+CAA8D;AAE9D,6CAAgD;AAChD,MAAa,qBAAsB,SAAQ,mBAAS;IAClD,KAAK,CAAC,IAAI,CAAC,OAAoD,EAAE,OAAwB,IAA2D,OAAO,IAAA,mBAAW,EAAC,IAAA,oCAAyB,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5N,KAAK,CAAC,GAAG,CAAC,OAAkD,EAAE,OAAwB,IAAyD,OAAO,IAAA,mBAAW,EAAC,IAAA,mCAAwB,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACtN,KAAK,CAAC,MAAM,CAAC,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AE,OAAwB,IAAmB,OAAO,IAAA,mBAAW,EAAC,IAAA,4CAAiC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3M,6HAA6H;IAC7H,KAAK,CAAC,MAAM,CAAC,OAAqD,EAAE,OAAwB,IAA4D,OAAO,IAAA,mBAAW,EAAC,IAAA,sCAA2B,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAClO,yEAAyE;IACzE,KAAK,CAAC,kBAAkB,CAAC,OAAiE,EAAE,OAAwB,IAAmB,OAAO,IAAA,mBAAW,EAAC,IAAA,kDAAuC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7N,+GAA+G;IAC/G,KAAK,CAAC,sBAAsB,CAAC,OAAqE,EAAE,OAAwB,IAA4E,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAA2C,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAClS,2GAA2G;IAC3G,KAAK,CAAC,oBAAoB,CAAC,OAAmE,EAAE,OAAwB,IAA0E,OAAO,IAAA,mBAAW,EAAC,IAAA,oDAAyC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;CAC3R;AAxBD,sDAwBC"}
|
|
@@ -8,4 +8,10 @@ export declare const customerSubscriptionsDelete: (client: ClientSDK, request: o
|
|
|
8
8
|
export declare const customerSubscriptionsRenew: (client: ClientSDK, request: operations.RenewCustomerSubscriptionRequest, options?: RequestOptions) => import("../../types/async.js").APIPromise<import("../../types/fp.js").Result<import("../../models/index.js").Subscription, import("../../lib/operation.js").OperationError>>;
|
|
9
9
|
export declare const customerSubscriptionsListTransitionProducts: (client: ClientSDK, request: operations.ListCustomerSubscriptionTransitionProductsRequest, options?: RequestOptions) => import("../../types/async.js").APIPromise<import("../../types/fp.js").Result<import("../../models/pagination.js").Paginated<import("../../models/index.js").Product>, import("../../lib/operation.js").OperationError>>;
|
|
10
10
|
export declare const customerSubscriptionsGetTransitionProduct: (client: ClientSDK, request: operations.GetCustomerSubscriptionTransitionProductRequest, options?: RequestOptions) => import("../../types/async.js").APIPromise<import("../../types/fp.js").Result<import("../../models/index.js").Product, import("../../lib/operation.js").OperationError>>;
|
|
11
|
+
export declare const customerSubscriptionsListTransitions: (client: ClientSDK, request: operations.ListCustomerSubscriptionTransitionsRequest, options?: RequestOptions) => import("../../types/async.js").APIPromise<import("../../types/fp.js").Result<operations.ListCustomerSubscriptionTransitionsResponse, import("../../lib/operation.js").OperationError>>;
|
|
12
|
+
export declare const customerSubscriptionsQuoteChange: (client: ClientSDK, request: operations.QuoteCustomerSubscriptionChangeRequest, options?: RequestOptions) => import("../../types/async.js").APIPromise<import("../../types/fp.js").Result<import("../../models/index.js").SubscriptionChange, import("../../lib/operation.js").OperationError>>;
|
|
13
|
+
export declare const customerSubscriptionsConfirmChange: (client: ClientSDK, request: operations.ConfirmCustomerSubscriptionChangeRequest, options?: RequestOptions) => import("../../types/async.js").APIPromise<import("../../types/fp.js").Result<import("../../models/index.js").SubscriptionChange, import("../../lib/operation.js").OperationError>>;
|
|
14
|
+
export declare const customerSubscriptionsCancelChange: (client: ClientSDK, request: operations.CancelCustomerSubscriptionChangeRequest, options?: RequestOptions) => import("../../types/async.js").APIPromise<import("../../types/fp.js").Result<void, import("../../lib/operation.js").OperationError>>;
|
|
15
|
+
export declare const customerSubscriptionsCancel: (client: ClientSDK, request: operations.CancelCustomerSubscriptionRequest, options?: RequestOptions) => import("../../types/async.js").APIPromise<import("../../types/fp.js").Result<import("../../models/index.js").SubscriptionChange, import("../../lib/operation.js").OperationError>>;
|
|
16
|
+
export declare const customerSubscriptionsRevokeCancellation: (client: ClientSDK, request: operations.RevokeCustomerSubscriptionCancellationRequest, options?: RequestOptions) => import("../../types/async.js").APIPromise<import("../../types/fp.js").Result<void, import("../../lib/operation.js").OperationError>>;
|
|
11
17
|
//# sourceMappingURL=customerSubscriptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customerSubscriptions.d.ts","sourceRoot":"","sources":["../../../../src/funcs/commerce/customerSubscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAE/D,eAAO,MAAM,yBAAyB,GAAI,QAAQ,SAAS,EAAE,SAAS,UAAU,CAAC,gCAAgC,EAAE,UAAU,cAAc,iOAA4W,CAAC;AACxf,eAAO,MAAM,wBAAwB,GAAI,QAAQ,SAAS,EAAE,SAAS,UAAU,CAAC,8BAA8B,EAAE,UAAU,cAAc,iLAA+W,CAAC;AACxf,eAAO,MAAM,2BAA2B,GAAI,QAAQ,SAAS,EAAE,SAAS,UAAU,CAAC,iCAAiC,EAAE,UAAU,cAAc,iLAAyW,CAAC;AACxf,eAAO,MAAM,2BAA2B,GAAI,QAAQ,SAAS,EAAE,SAAS,UAAU,CAAC,iCAAiC,EAAE,UAAU,cAAc,iLAAkX,CAAC;AACjgB,eAAO,MAAM,2BAA2B,GAAI,QAAQ,SAAS,EAAE,SAAS,UAAU,CAAC,iCAAiC,EAAE,UAAU,cAAc,yIAAwY,CAAC;AACvhB,eAAO,MAAM,0BAA0B,GAAI,QAAQ,SAAS,EAAE,SAAS,UAAU,CAAC,gCAAgC,EAAE,UAAU,cAAc,iLAA4X,CAAC;AACzgB,eAAO,MAAM,2CAA2C,GAAI,QAAQ,SAAS,EAAE,SAAS,UAAU,CAAC,iDAAiD,EAAE,UAAU,cAAc,4NAA+b,CAAC;AAC9mB,eAAO,MAAM,yCAAyC,GAAI,QAAQ,SAAS,EAAE,SAAS,UAAU,CAAC,+CAA+C,EAAE,UAAU,cAAc,4KAAwc,CAAC"}
|
|
1
|
+
{"version":3,"file":"customerSubscriptions.d.ts","sour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,UAAU,CAAC,sCAAsC,EAAE,UAAU,cAAc,uLAA0Z,CAAC;AACnjB,eAAO,MAAM,kCAAkC,GAAI,QAAQ,SAAS,EAAE,SAAS,UAAU,CAAC,wCAAwC,EAAE,UAAU,cAAc,uLAA0Z,CAAC;AACvjB,eAAO,MAAM,iCAAiC,GAAI,QAAQ,SAAS,EAAE,SAAS,UAAU,CAAC,uCAAuC,EAAE,UAAU,cAAc,yIAAgd,CAAC;AAC3mB,eAAO,MAAM,2BAA2B,GAAI,QAAQ,SAAS,EAAE,SAAS,UAAU,CAAC,iCAAiC,EAAE,UAAU,cAAc,uLAAgZ,CAAC;AAC/hB,eAAO,MAAM,uCAAuC,GAAI,QAAQ,SAAS,EAAE,SAAS,UAAU,CAAC,6CAA6C,EAAE,UAAU,cAAc,yIAAqc,CAAC"}
|
|
@@ -8,4 +8,10 @@ export const customerSubscriptionsDelete = (client, request, options) => execute
|
|
|
8
8
|
export const customerSubscriptionsRenew = (client, request, options) => executeOperation(client, request, { operationID: "commerce.customerSubscriptions.renew", method: "POST", path: (v) => `/commerce/customers/${v.customerId}/subscriptions/${v.id}/renew`, requestSchema: operations.RenewCustomerSubscriptionRequest$outboundSchema, responseSchema: operations.RenewCustomerSubscriptionResponse$inboundSchema, query: encodeOperationQuery }, options);
|
|
9
9
|
export const customerSubscriptionsListTransitionProducts = (client, request, options) => executeOperation(client, request, { operationID: "commerce.customerSubscriptions.listTransitionProducts", method: "GET", path: (v) => `/commerce/customers/${v.customerId}/subscriptions/${v.subscriptionId}/transition`, requestSchema: operations.ListCustomerSubscriptionTransitionProductsRequest$outboundSchema, responseSchema: operations.ListCustomerSubscriptionTransitionProductsResponse$inboundSchema, query: encodeOperationQuery }, options);
|
|
10
10
|
export const customerSubscriptionsGetTransitionProduct = (client, request, options) => executeOperation(client, request, { operationID: "commerce.customerSubscriptions.getTransitionProduct", method: "GET", path: (v) => `/commerce/customers/${v.customerId}/subscriptions/${v.subscriptionId}/transition/${v.productId}`, requestSchema: operations.GetCustomerSubscriptionTransitionProductRequest$outboundSchema, responseSchema: operations.GetCustomerSubscriptionTransitionProductResponse$inboundSchema, query: encodeOperationQuery }, options);
|
|
11
|
+
export const customerSubscriptionsListTransitions = (client, request, options) => executeOperation(client, request, { operationID: "commerce.customerSubscriptions.listTransitions", method: "GET", path: (v) => `/commerce/customers/${v.customerId}/subscriptions/${v.subscriptionId}/transitions`, requestSchema: operations.ListCustomerSubscriptionTransitionsRequest$outboundSchema, responseSchema: operations.ListCustomerSubscriptionTransitionsResponse$inboundSchema }, options);
|
|
12
|
+
export const customerSubscriptionsQuoteChange = (client, request, options) => executeOperation(client, request, { operationID: "commerce.customerSubscriptions.quoteChange", method: "POST", path: (v) => `/commerce/customers/${v.customerId}/subscriptions/${v.subscriptionId}/changes/quote`, requestSchema: operations.QuoteCustomerSubscriptionChangeRequest$outboundSchema, responseSchema: operations.QuoteCustomerSubscriptionChangeResponse$inboundSchema, body: (v) => v.data }, options);
|
|
13
|
+
export const customerSubscriptionsConfirmChange = (client, request, options) => executeOperation(client, request, { operationID: "commerce.customerSubscriptions.confirmChange", method: "POST", path: (v) => `/commerce/customers/${v.customerId}/subscriptions/${v.subscriptionId}/changes`, requestSchema: operations.ConfirmCustomerSubscriptionChangeRequest$outboundSchema, responseSchema: operations.ConfirmCustomerSubscriptionChangeResponse$inboundSchema, body: (v) => v.data }, options);
|
|
14
|
+
export const customerSubscriptionsCancelChange = (client, request, options) => executeOperation(client, request, { operationID: "commerce.customerSubscriptions.cancelChange", method: "DELETE", path: (v) => `/commerce/customers/${v.customerId}/subscriptions/${v.subscriptionId}/changes/${encodeURIComponent(v.changeId)}`, requestSchema: operations.CancelCustomerSubscriptionChangeRequest$outboundSchema, responseSchema: operations.CancelCustomerSubscriptionChangeResponse$inboundSchema, responseType: "void", successStatus: 204 }, options);
|
|
15
|
+
export const customerSubscriptionsCancel = (client, request, options) => executeOperation(client, request, { operationID: "commerce.customerSubscriptions.cancel", method: "POST", path: (v) => `/commerce/customers/${v.customerId}/subscriptions/${v.subscriptionId}/cancellation`, requestSchema: operations.CancelCustomerSubscriptionRequest$outboundSchema, responseSchema: operations.CancelCustomerSubscriptionResponse$inboundSchema, body: (v) => v.data ?? {} }, options);
|
|
16
|
+
export const customerSubscriptionsRevokeCancellation = (client, request, options) => executeOperation(client, request, { operationID: "commerce.customerSubscriptions.revokeCancellation", method: "DELETE", path: (v) => `/commerce/customers/${v.customerId}/subscriptions/${v.subscriptionId}/cancellation`, requestSchema: operations.RevokeCustomerSubscriptionCancellationRequest$outboundSchema, responseSchema: operations.RevokeCustomerSubscriptionCancellationResponse$inboundSchema, responseType: "void", successStatus: 204 }, options);
|
|
11
17
|
//# sourceMappingURL=customerSubscriptions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customerSubscriptions.js","sourceRoot":"","sources":["../../../../src/funcs/commerce/customerSubscriptions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAE/D,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,MAAiB,EAAE,OAAoD,EAAE,OAAwB,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,WAAW,EAAE,qCAAqC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,uBAAuB,CAAC,CAAC,UAAU,gBAAgB,EAAE,aAAa,EAAE,UAAU,CAAC,+CAA+C,EAAE,cAAc,EAAE,UAAU,CAAC,+CAA+C,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,OAAO,CAAC,CAAC;AACxf,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,MAAiB,EAAE,OAAkD,EAAE,OAAwB,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,WA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EAAE,WAAW,EAAE,uCAAuC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,uBAAuB,CAAC,CAAC,UAAU,kBAAkB,CAAC,CAAC,cAAc,eAAe,EAAE,aAAa,EAAE,UAAU,CAAC,gDAAgD,EAAE,cAAc,EAAE,UAAU,CAAC,gDAAgD,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;AAC/hB,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,MAAiB,EAAE,OAAiE,EAAE,OAAwB,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,WAAW,EAAE,mDAAmD,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,uBAAuB,CAAC,CAAC,UAAU,kBAAkB,CAAC,CAAC,cAAc,eAAe,EAAE,aAAa,EAAE,UAAU,CAAC,4DAA4D,EAAE,cAAc,EAAE,UAAU,CAAC,4DAA4D,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,EAAE,OAAO,CAAC,CAAC"}
|
package/dist/esm/lib/config.d.ts
CHANGED
|
@@ -42,12 +42,12 @@ export type SDKOptions = {
|
|
|
42
42
|
debugLogger?: Logger;
|
|
43
43
|
};
|
|
44
44
|
export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
45
|
-
export declare const SDK_VERSION = "1.
|
|
45
|
+
export declare const SDK_VERSION = "1.5.0";
|
|
46
46
|
export declare const SDK_METADATA: {
|
|
47
47
|
readonly language: "typescript";
|
|
48
48
|
readonly openapiDocVersion: "manual";
|
|
49
|
-
readonly sdkVersion: "1.
|
|
49
|
+
readonly sdkVersion: "1.5.0";
|
|
50
50
|
readonly genVersion: "manual";
|
|
51
|
-
readonly userAgent: "ominity-sdk/typescript 1.
|
|
51
|
+
readonly userAgent: "ominity-sdk/typescript 1.5.0";
|
|
52
52
|
};
|
|
53
53
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/esm/lib/config.js
CHANGED
|
@@ -19,7 +19,7 @@ function applyApiVersion(url, apiVersion) {
|
|
|
19
19
|
url.pathname = `${currentPath}${versionSuffix}`;
|
|
20
20
|
return url;
|
|
21
21
|
}
|
|
22
|
-
export const SDK_VERSION = "1.
|
|
22
|
+
export const SDK_VERSION = "1.5.0";
|
|
23
23
|
export const SDK_METADATA = {
|
|
24
24
|
language: "typescript",
|
|
25
25
|
openapiDocVersion: "manual",
|
|
@@ -24,5 +24,6 @@ export * from "./customer-user-permission.js";
|
|
|
24
24
|
export * from "./customer-group.js";
|
|
25
25
|
export * from "./mandate.js";
|
|
26
26
|
export * from "./subscription.js";
|
|
27
|
+
export * from "./subscription-change.js";
|
|
27
28
|
export * from "./shipping-class.js";
|
|
28
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/commerce/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC;AAE3C,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/commerce/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC;AAE3C,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC"}
|
|
@@ -27,5 +27,6 @@ export * from "./customer-user-permission.js";
|
|
|
27
27
|
export * from "./customer-group.js";
|
|
28
28
|
export * from "./mandate.js";
|
|
29
29
|
export * from "./subscription.js";
|
|
30
|
+
export * from "./subscription-change.js";
|
|
30
31
|
export * from "./shipping-class.js";
|
|
31
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/commerce/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC;AAE3C,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/commerce/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC;AAE3C,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { CurrencyAmount } from "../common/amount.js";
|
|
3
|
+
import { HalLinks } from "../hal.js";
|
|
4
|
+
import { Product } from "./product.js";
|
|
5
|
+
/** `change` for a plan change, `cancel` for a cancellation. */
|
|
6
|
+
export type SubscriptionChangeType = "change" | "cancel" | (string & {});
|
|
7
|
+
export type SubscriptionChangeStatus = "quoted" | "pending" | "awaiting_payment" | "applied" | "cancelled" | "expired" | "failed" | (string & {});
|
|
8
|
+
export type SubscriptionChangeTiming = "immediate" | "period_end" | (string & {});
|
|
9
|
+
/** The plan on one side of a change. */
|
|
10
|
+
export type SubscriptionChangePlan = {
|
|
11
|
+
productId: number | null;
|
|
12
|
+
offerId: number | null;
|
|
13
|
+
intervalId: number | null;
|
|
14
|
+
recurringAmount: CurrencyAmount | null;
|
|
15
|
+
quantity: number | null;
|
|
16
|
+
};
|
|
17
|
+
export type SubscriptionChangeQuoteLine = {
|
|
18
|
+
type: string | null;
|
|
19
|
+
description: string | null;
|
|
20
|
+
amount: CurrencyAmount;
|
|
21
|
+
tax: CurrencyAmount;
|
|
22
|
+
taxRate: number | null;
|
|
23
|
+
};
|
|
24
|
+
export type SubscriptionChangeQuote = {
|
|
25
|
+
lines: SubscriptionChangeQuoteLine[];
|
|
26
|
+
charge: CurrencyAmount;
|
|
27
|
+
credit: CurrencyAmount;
|
|
28
|
+
settlement: string | null;
|
|
29
|
+
};
|
|
30
|
+
/** A quoted, scheduled or applied plan change or cancellation. */
|
|
31
|
+
export type SubscriptionChange = {
|
|
32
|
+
resource: "subscription_change";
|
|
33
|
+
id: string;
|
|
34
|
+
subscriptionId: number;
|
|
35
|
+
type: SubscriptionChangeType;
|
|
36
|
+
direction: string | null;
|
|
37
|
+
status: SubscriptionChangeStatus;
|
|
38
|
+
timing: SubscriptionChangeTiming | null;
|
|
39
|
+
effectiveAt: string | null;
|
|
40
|
+
from: SubscriptionChangePlan;
|
|
41
|
+
to: SubscriptionChangePlan;
|
|
42
|
+
quote: SubscriptionChangeQuote;
|
|
43
|
+
warnings: string[];
|
|
44
|
+
quoteExpiresAt: string | null;
|
|
45
|
+
/** The order to pay for an immediate upgrade; also linked as `links.checkout`. */
|
|
46
|
+
orderId: number | null;
|
|
47
|
+
createdAt: string | null;
|
|
48
|
+
links?: HalLinks;
|
|
49
|
+
};
|
|
50
|
+
/** A plan the customer may change the subscription to, quoted at the default timing. */
|
|
51
|
+
export type SubscriptionTransition = {
|
|
52
|
+
productId: number;
|
|
53
|
+
offerId: number;
|
|
54
|
+
direction: string | null;
|
|
55
|
+
timing: SubscriptionChangeTiming | null;
|
|
56
|
+
effectiveAt: string | null;
|
|
57
|
+
allowed: boolean;
|
|
58
|
+
reasons: string[];
|
|
59
|
+
charge: CurrencyAmount;
|
|
60
|
+
product: Product;
|
|
61
|
+
};
|
|
62
|
+
/** @internal */
|
|
63
|
+
export declare const SubscriptionChangePlan$inboundSchema: z.ZodType<SubscriptionChangePlan>;
|
|
64
|
+
/** @internal */
|
|
65
|
+
export declare const SubscriptionChangeQuoteLine$inboundSchema: z.ZodType<SubscriptionChangeQuoteLine>;
|
|
66
|
+
/** @internal */
|
|
67
|
+
export declare const SubscriptionChangeQuote$inboundSchema: z.ZodType<SubscriptionChangeQuote>;
|
|
68
|
+
/** @internal */
|
|
69
|
+
export declare const SubscriptionChange$inboundSchema: z.ZodType<SubscriptionChange>;
|
|
70
|
+
/** @internal */
|
|
71
|
+
export declare const SubscriptionTransition$inboundSchema: z.ZodType<SubscriptionTransition>;
|
|
72
|
+
//# sourceMappingURL=subscription-change.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription-change.d.ts","sourceRoot":"","sources":["../../../../src/models/commerce/subscription-change.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,cAAc,EAAgC,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,QAAQ,EAA0B,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAyB,MAAM,cAAc,CAAC;AAE9D,+DAA+D;AAC/D,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEzE,MAAM,MAAM,wBAAwB,GAChC,QAAQ,GACR,SAAS,GACT,kBAAkB,GAClB,SAAS,GACT,WAAW,GACX,SAAS,GACT,QAAQ,GACR,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,MAAM,MAAM,wBAAwB,GAAG,WAAW,GAAG,YAAY,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElF,wCAAwC;AACxC,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,eAAe,EAAE,cAAc,GAAG,IAAI,CAAC;IACvC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,WAAW,EAAE,MAAM,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AO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAAC,sBAAsB,CAMjF,CAAC;AAEH,gBAAgB;AAChB,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAM3F,CAAC;AAEH,gBAAgB;AAChB,eAAO,MAAM,qCAAqC,EAAE,CAAC,CAAC,OAAO,CAAC,uBAAuB,CAKnF,CAAC;AAEH,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAiBc,CAAC;AAE1F,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,OAAO,CAAC,sBAAsB,CAUzE,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
3
|
+
import { CurrencyAmount$inboundSchema } from "../common/amount.js";
|
|
4
|
+
import { HalLinks$inboundSchema } from "../hal.js";
|
|
5
|
+
import { Product$inboundSchema } from "./product.js";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const SubscriptionChangePlan$inboundSchema = z.object({
|
|
8
|
+
productId: z.number().int().nullable(),
|
|
9
|
+
offerId: z.number().int().nullable(),
|
|
10
|
+
intervalId: z.number().int().nullable(),
|
|
11
|
+
recurringAmount: CurrencyAmount$inboundSchema.nullable(),
|
|
12
|
+
quantity: z.number().int().nullable(),
|
|
13
|
+
});
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const SubscriptionChangeQuoteLine$inboundSchema = z.object({
|
|
16
|
+
type: z.string().nullable(),
|
|
17
|
+
description: z.string().nullable(),
|
|
18
|
+
amount: CurrencyAmount$inboundSchema,
|
|
19
|
+
tax: CurrencyAmount$inboundSchema,
|
|
20
|
+
taxRate: z.number().nullable(),
|
|
21
|
+
});
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const SubscriptionChangeQuote$inboundSchema = z.object({
|
|
24
|
+
lines: z.array(SubscriptionChangeQuoteLine$inboundSchema),
|
|
25
|
+
charge: CurrencyAmount$inboundSchema,
|
|
26
|
+
credit: CurrencyAmount$inboundSchema,
|
|
27
|
+
settlement: z.string().nullable(),
|
|
28
|
+
});
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const SubscriptionChange$inboundSchema = z.object({
|
|
31
|
+
resource: z.literal("subscription_change"),
|
|
32
|
+
id: z.string(),
|
|
33
|
+
subscriptionId: z.number().int(),
|
|
34
|
+
type: z.string(),
|
|
35
|
+
direction: z.string().nullable(),
|
|
36
|
+
status: z.string(),
|
|
37
|
+
timing: z.string().nullable(),
|
|
38
|
+
effectiveAt: z.string().nullable(),
|
|
39
|
+
from: SubscriptionChangePlan$inboundSchema,
|
|
40
|
+
to: SubscriptionChangePlan$inboundSchema,
|
|
41
|
+
quote: SubscriptionChangeQuote$inboundSchema,
|
|
42
|
+
warnings: z.array(z.string()),
|
|
43
|
+
quoteExpiresAt: z.string().nullable(),
|
|
44
|
+
orderId: z.number().int().nullable(),
|
|
45
|
+
createdAt: z.string().nullable(),
|
|
46
|
+
_links: HalLinks$inboundSchema.optional(),
|
|
47
|
+
}).loose().transform((value) => remap$(value, { _links: "links" }));
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const SubscriptionTransition$inboundSchema = z.object({
|
|
50
|
+
productId: z.number().int(),
|
|
51
|
+
offerId: z.number().int(),
|
|
52
|
+
direction: z.string().nullable(),
|
|
53
|
+
timing: z.string().nullable(),
|
|
54
|
+
effectiveAt: z.string().nullable(),
|
|
55
|
+
allowed: z.boolean(),
|
|
56
|
+
reasons: z.array(z.string()),
|
|
57
|
+
charge: CurrencyAmount$inboundSchema,
|
|
58
|
+
product: Product$inboundSchema,
|
|
59
|
+
}).loose();
|
|
60
|
+
//# sourceMappingURL=subscription-change.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription-change.js","sourceRoot":"","sources":["../../../../src/models/commerce/subscription-change.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAkB,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAY,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAW,qBAAqB,EAAE,MAAM,cAAc,CAAC;AA2E9D,gBAAgB;AAChB,MAAM,CAAC,MAAM,oCAAoC,GAAsC,CAAC,CAAC,MAAM,CAAC;IAC9F,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACtC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACpC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACvC,eAAe,EAAE,4BAA4B,CAAC,QAAQ,EAAE;IACxD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC;AAEH,gBAAgB;AAChB,MAAM,CAAC,MAAM,yCAAyC,GAA2C,CAAC,CAAC,MAAM,CAAC;IACxG,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,MAAM,EAAE,4BAA4B;IACpC,GAAG,EAAE,4BAA4B;IACjC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAEH,g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,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAuB,CAAC,CAAC;AAE1F,gBAAgB;AAChB,MAAM,CAAC,MAAM,oCAAoC,GAAsC,CAAC,CAAC,MAAM,CAAC;IAC9F,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACzB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC5B,MAAM,EAAE,4BAA4B;IACpC,OAAO,EAAE,qBAAqB;CAC/B,CAAC,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -6,11 +6,13 @@ import { SubscriptionInterval } from "./subscription-interval.js";
|
|
|
6
6
|
export type SubscriptionPeriod = {
|
|
7
7
|
startedAt: string;
|
|
8
8
|
endsAt: string;
|
|
9
|
-
daysLeft: number;
|
|
9
|
+
daysLeft: number | null;
|
|
10
10
|
};
|
|
11
11
|
export type Subscription = {
|
|
12
12
|
resource: "subscription";
|
|
13
13
|
id: number;
|
|
14
|
+
/** Readable reference; its format is configured per install. */
|
|
15
|
+
reference?: string | null | undefined;
|
|
14
16
|
customerId: number;
|
|
15
17
|
productId: number;
|
|
16
18
|
intervalId: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../../../src/models/commerce/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO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,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAIzE,CAAC;AAEH,gBAAgB;AAChB,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CA0B7D,CAAC"}
|
|
@@ -8,12 +8,13 @@ import { SubscriptionInterval$inboundSchema } from "./subscription-interval.js";
|
|
|
8
8
|
export const SubscriptionPeriod$inboundSchema = z.object({
|
|
9
9
|
startedAt: z.string(),
|
|
10
10
|
endsAt: z.string(),
|
|
11
|
-
daysLeft: z.number(),
|
|
11
|
+
daysLeft: z.number().nullable(),
|
|
12
12
|
});
|
|
13
13
|
/** @internal */
|
|
14
14
|
export const Subscription$inboundSchema = z.object({
|
|
15
15
|
resource: z.literal("subscription"),
|
|
16
16
|
id: z.number().int(),
|
|
17
|
+
reference: z.string().nullable().optional(),
|
|
17
18
|
customerId: z.number().int(),
|
|
18
19
|
productId: z.number().int(),
|
|
19
20
|
intervalId: z.number().int(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../../../src/models/commerce/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAkB,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAY,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAW,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AM,EAAE;IAClB,WAAW,EAAE,4BAA4B;IACzC,eAAe,EAAE,4BAA4B;IAC7C,aAAa,EAAE,gCAAgC;IAC/C,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE;IACvB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC;QAClB,OAAO,EAAE,qBAAqB,CAAC,QAAQ,EAAE;QACzC,QAAQ,EAAE,kCAAkC,CAAC,QAAQ,EAAE;KACxD,CAAC,CAAC,QAAQ,EAAE;IACb,MAAM,EAAE,sBAAsB,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAC,KAAK,EAAE,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE;IAC7B,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAiB,CAAC;IACxE,IAAI,KAAK,CAAC,SAAS,EAAE,OAAO;QAAE,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC;IAC7E,IAAI,KAAK,CAAC,SAAS,EAAE,QAAQ;QAAE,YAAY,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC;IAChF,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC,CAAC"}
|
|
@@ -18,6 +18,10 @@ export type ErrorResponseData = {
|
|
|
18
18
|
* A detailed human-readable description of the error that occurred.
|
|
19
19
|
*/
|
|
20
20
|
detail: string;
|
|
21
|
+
/**
|
|
22
|
+
* Stable, machine-readable reason of a refusal, e.g. `subscription.next_period_locked`.
|
|
23
|
+
*/
|
|
24
|
+
code?: string | undefined;
|
|
21
25
|
/**
|
|
22
26
|
* Optional validation errors keyed by field name.
|
|
23
27
|
*/
|
|
@@ -31,6 +35,7 @@ export declare class ErrorResponse extends OminityError {
|
|
|
31
35
|
status: number;
|
|
32
36
|
title: string;
|
|
33
37
|
detail: string;
|
|
38
|
+
code?: string | undefined;
|
|
34
39
|
fields?: Record<string, string[]> | undefined;
|
|
35
40
|
links: ErrorResponseLinks;
|
|
36
41
|
/** The original data that was passed to this error instance. */
|
|
@@ -48,6 +53,7 @@ export type ErrorResponse$Outbound = {
|
|
|
48
53
|
status: number;
|
|
49
54
|
title: string;
|
|
50
55
|
detail: string;
|
|
56
|
+
code?: string | undefined;
|
|
51
57
|
fields?: Record<string, string[]> | undefined;
|
|
52
58
|
_links: ErrorResponseLinks$Outbound;
|
|
53
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-response.d.ts","sourceRoot":"","sources":["../../../../src/models/errors/error-response.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACL,kBAAkB,EAElB,2BAA2B,EAC5B,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC;IAC9C,KAAK,EAAE,kBAAkB,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,qBAAa,aAAc,SAAQ,YAAY;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC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AAE,iBAAiB,CAAC;gBAGvB,GAAG,EAAE,iBAAiB,EACtB,QAAQ,EAAE;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;CAgBnE;AAID,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,OAAO,CACjD,aAAa,EACb,OAAO,CAwBP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC;IAC9C,MAAM,EAAE,2BAA2B,CAAC;CACrC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,OAAO,CAClD,sBAAsB,EACtB,aAAa,CAYX,CAAC"}
|
|
@@ -19,6 +19,8 @@ export class ErrorResponse extends OminityError {
|
|
|
19
19
|
this.status = err.status;
|
|
20
20
|
this.title = err.title;
|
|
21
21
|
this.detail = err.detail;
|
|
22
|
+
if (err.code != null)
|
|
23
|
+
this.code = err.code;
|
|
22
24
|
if (err.fields != null)
|
|
23
25
|
this.fields = err.fields;
|
|
24
26
|
this.links = err.links;
|
|
@@ -31,13 +33,17 @@ export const ErrorResponse$inboundSchema = z.object({
|
|
|
31
33
|
status: types.number(),
|
|
32
34
|
title: types.string(),
|
|
33
35
|
detail: types.string(),
|
|
36
|
+
code: z.optional(z.string()),
|
|
34
37
|
fields: z.optional(ErrorResponseFieldsSchema),
|
|
38
|
+
errors: z.optional(ErrorResponseFieldsSchema),
|
|
35
39
|
_links: z.lazy(() => ErrorResponseLinks$inboundSchema),
|
|
36
40
|
request$: z.custom(x => x instanceof Request),
|
|
37
41
|
response$: z.custom(x => x instanceof Response),
|
|
38
42
|
body$: z.string(),
|
|
39
43
|
}).transform((v) => {
|
|
40
|
-
|
|
44
|
+
// The API sends validation messages as `errors`.
|
|
45
|
+
const { errors, ...rest } = v;
|
|
46
|
+
const remapped = remap$({ ...rest, fields: rest.fields ?? errors }, {
|
|
41
47
|
"_links": "links",
|
|
42
48
|
});
|
|
43
49
|
return new ErrorResponse(remapped, {
|
|
@@ -54,6 +60,7 @@ export const ErrorResponse$outboundSchema = z.custom(v => v instanceof ErrorResp
|
|
|
54
60
|
status: data.status,
|
|
55
61
|
title: data.title,
|
|
56
62
|
detail: data.detail,
|
|
63
|
+
code: data.code,
|
|
57
64
|
fields: data.fields,
|
|
58
65
|
_links: data.links,
|
|
59
66
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-response.js","sourceRoot":"","sources":["../../../../src/models/errors/error-response.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,KAAK,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAEL,gCAAgC,GAEjC,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"error-response.js","sourceRoot":"","sources":["../../../../src/models/errors/error-response.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,KAAK,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAEL,gCAAgC,GAEjC,MAAM,2BAA2B,CAAC;AA8BnC;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AK;QACjB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,MAAM,EAAE,IAAI,CAAC,KAAK;KACnB,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { Product } from "../commerce/product.js";
|
|
3
3
|
import { Subscription } from "../commerce/subscription.js";
|
|
4
|
+
import { SubscriptionChange, SubscriptionTransition } from "../commerce/subscription-change.js";
|
|
4
5
|
import { Paginated } from "../pagination.js";
|
|
5
6
|
import { ListRequest } from "./helpers.js";
|
|
6
7
|
export type ListCustomerSubscriptionsRequest = ListRequest & {
|
|
@@ -49,6 +50,7 @@ export type RenewCustomerSubscriptionRequest = {
|
|
|
49
50
|
export type RenewCustomerSubscriptionResponse = Subscription;
|
|
50
51
|
export declare const RenewCustomerSubscriptionRequest$outboundSchema: z.ZodType<RenewCustomerSubscriptionRequest>;
|
|
51
52
|
export declare const RenewCustomerSubscriptionResponse$inboundSchema: z.ZodType<Subscription, unknown, z.core.$ZodTypeInternals<Subscription, unknown>>;
|
|
53
|
+
/** @deprecated Use `ListCustomerSubscriptionTransitionsRequest` (`GET .../transitions`). */
|
|
52
54
|
export type ListCustomerSubscriptionTransitionProductsRequest = ListRequest & {
|
|
53
55
|
customerId: number;
|
|
54
56
|
subscriptionId: number;
|
|
@@ -56,6 +58,7 @@ export type ListCustomerSubscriptionTransitionProductsRequest = ListRequest & {
|
|
|
56
58
|
export type ListCustomerSubscriptionTransitionProductsResponse = Paginated<Product>;
|
|
57
59
|
export declare const ListCustomerSubscriptionTransitionProductsRequest$outboundSchema: z.ZodType<ListCustomerSubscriptionTransitionProductsRequest>;
|
|
58
60
|
export declare const ListCustomerSubscriptionTransitionProductsResponse$inboundSchema: z.ZodType<Paginated<Product>, unknown, z.core.$ZodTypeInternals<Paginated<Product>, unknown>>;
|
|
61
|
+
/** @deprecated Use `QuoteCustomerSubscriptionChangeRequest` (`POST .../changes/quote`). */
|
|
59
62
|
export type GetCustomerSubscriptionTransitionProductRequest = {
|
|
60
63
|
customerId: number;
|
|
61
64
|
subscriptionId: number;
|
|
@@ -65,4 +68,62 @@ export type GetCustomerSubscriptionTransitionProductRequest = {
|
|
|
65
68
|
export type GetCustomerSubscriptionTransitionProductResponse = Product;
|
|
66
69
|
export declare const GetCustomerSubscriptionTransitionProductRequest$outboundSchema: z.ZodType<GetCustomerSubscriptionTransitionProductRequest>;
|
|
67
70
|
export declare const GetCustomerSubscriptionTransitionProductResponse$inboundSchema: z.ZodType<Product, unknown, z.core.$ZodTypeInternals<Product, unknown>>;
|
|
71
|
+
export type ListCustomerSubscriptionTransitionsRequest = {
|
|
72
|
+
customerId: number;
|
|
73
|
+
subscriptionId: number;
|
|
74
|
+
};
|
|
75
|
+
export type ListCustomerSubscriptionTransitionsResponse = {
|
|
76
|
+
count: number;
|
|
77
|
+
items: SubscriptionTransition[];
|
|
78
|
+
};
|
|
79
|
+
export declare const ListCustomerSubscriptionTransitionsRequest$outboundSchema: z.ZodType<ListCustomerSubscriptionTransitionsRequest>;
|
|
80
|
+
export declare const ListCustomerSubscriptionTransitionsResponse$inboundSchema: z.ZodType<ListCustomerSubscriptionTransitionsResponse>;
|
|
81
|
+
export type QuoteCustomerSubscriptionChangeRequest = {
|
|
82
|
+
customerId: number;
|
|
83
|
+
subscriptionId: number;
|
|
84
|
+
data: {
|
|
85
|
+
toOfferId: number;
|
|
86
|
+
timing?: "immediate" | "period_end" | undefined;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export type QuoteCustomerSubscriptionChangeResponse = SubscriptionChange;
|
|
90
|
+
export declare const QuoteCustomerSubscriptionChangeRequest$outboundSchema: z.ZodType<QuoteCustomerSubscriptionChangeRequest>;
|
|
91
|
+
export declare const QuoteCustomerSubscriptionChangeResponse$inboundSchema: z.ZodType<SubscriptionChange, unknown, z.core.$ZodTypeInternals<SubscriptionChange, unknown>>;
|
|
92
|
+
export type ConfirmCustomerSubscriptionChangeRequest = {
|
|
93
|
+
customerId: number;
|
|
94
|
+
subscriptionId: number;
|
|
95
|
+
data: {
|
|
96
|
+
quoteId: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
export type ConfirmCustomerSubscriptionChangeResponse = SubscriptionChange;
|
|
100
|
+
export declare const ConfirmCustomerSubscriptionChangeRequest$outboundSchema: z.ZodType<ConfirmCustomerSubscriptionChangeRequest>;
|
|
101
|
+
export declare const ConfirmCustomerSubscriptionChangeResponse$inboundSchema: z.ZodType<SubscriptionChange, unknown, z.core.$ZodTypeInternals<SubscriptionChange, unknown>>;
|
|
102
|
+
export type CancelCustomerSubscriptionChangeRequest = {
|
|
103
|
+
customerId: number;
|
|
104
|
+
subscriptionId: number;
|
|
105
|
+
changeId: string;
|
|
106
|
+
};
|
|
107
|
+
export type CancelCustomerSubscriptionChangeResponse = void;
|
|
108
|
+
export declare const CancelCustomerSubscriptionChangeRequest$outboundSchema: z.ZodType<CancelCustomerSubscriptionChangeRequest>;
|
|
109
|
+
export declare const CancelCustomerSubscriptionChangeResponse$inboundSchema: z.ZodType<void>;
|
|
110
|
+
/** Without `quoteId` the cancellation is quoted; with the `id` of that quote it is confirmed. */
|
|
111
|
+
export type CancelCustomerSubscriptionRequest = {
|
|
112
|
+
customerId: number;
|
|
113
|
+
subscriptionId: number;
|
|
114
|
+
data?: {
|
|
115
|
+
quoteId?: string | undefined;
|
|
116
|
+
timing?: "immediate" | "period_end" | undefined;
|
|
117
|
+
} | undefined;
|
|
118
|
+
};
|
|
119
|
+
export type CancelCustomerSubscriptionResponse = SubscriptionChange;
|
|
120
|
+
export declare const CancelCustomerSubscriptionRequest$outboundSchema: z.ZodType<CancelCustomerSubscriptionRequest>;
|
|
121
|
+
export declare const CancelCustomerSubscriptionResponse$inboundSchema: z.ZodType<SubscriptionChange, unknown, z.core.$ZodTypeInternals<SubscriptionChange, unknown>>;
|
|
122
|
+
export type RevokeCustomerSubscriptionCancellationRequest = {
|
|
123
|
+
customerId: number;
|
|
124
|
+
subscriptionId: number;
|
|
125
|
+
};
|
|
126
|
+
export type RevokeCustomerSubscriptionCancellationResponse = void;
|
|
127
|
+
export declare const RevokeCustomerSubscriptionCancellationRequest$outboundSchema: z.ZodType<RevokeCustomerSubscriptionCancellationRequest>;
|
|
128
|
+
export declare const RevokeCustomerSubscriptionCancellationResponse$inboundSchema: z.ZodType<void>;
|
|
68
129
|
//# sourceMappingURL=commerce-customer-subscriptions.d.ts.map
|