@salable/sdk 1.0.6 → 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.
@@ -57,13 +57,71 @@ export interface BatchCartActionsResponseSchema_data_results extends Parsable {
57
57
  status?: string | null;
58
58
  }
59
59
  export type BatchCartActionsResponseSchema_data_results_status = string;
60
- export interface BatchSubscriptionActionsRequestSchema extends Parsable {
60
+ export interface BatchReceiptActionsRequestSchema extends Parsable {
61
61
  /**
62
62
  * The action property
63
63
  */
64
+ action?: BatchReceiptActionsRequestSchema_action | null;
65
+ /**
66
+ * The receiptIds property
67
+ */
68
+ receiptIds?: string[] | null;
69
+ }
70
+ export type BatchReceiptActionsRequestSchema_action = (typeof BatchReceiptActionsRequestSchema_actionObject)[keyof typeof BatchReceiptActionsRequestSchema_actionObject];
71
+ export interface BatchReceiptActionsResponseSchema extends Parsable {
72
+ /**
73
+ * The data property
74
+ */
75
+ data?: BatchReceiptActionsResponseSchema_data | null;
76
+ /**
77
+ * The type property
78
+ */
79
+ type?: string | null;
80
+ }
81
+ export interface BatchReceiptActionsResponseSchema_data extends Parsable {
82
+ /**
83
+ * The failed property
84
+ */
85
+ failed?: number | null;
86
+ /**
87
+ * The results property
88
+ */
89
+ results?: BatchReceiptActionsResponseSchema_data_results[] | null;
90
+ /**
91
+ * The skipped property
92
+ */
93
+ skipped?: number | null;
94
+ /**
95
+ * The succeeded property
96
+ */
97
+ succeeded?: number | null;
98
+ /**
99
+ * The total property
100
+ */
101
+ total?: number | null;
102
+ }
103
+ export interface BatchReceiptActionsResponseSchema_data_results extends Parsable {
104
+ /**
105
+ * The id property
106
+ */
107
+ id?: string | null;
108
+ /**
109
+ * The reason property
110
+ */
111
+ reason?: string | null;
112
+ /**
113
+ * The status property
114
+ */
115
+ status?: string | null;
116
+ }
117
+ export type BatchReceiptActionsResponseSchema_data_results_status = string;
118
+ export interface BatchSubscriptionActionsRequestSchema extends Parsable {
119
+ /**
120
+ * The action to perform on all provided subscriptions. One of `cancel`, `enable-auto-renew`, `disable-auto-renew`, `delete`. The `delete` action is only available in test mode.
121
+ */
64
122
  action?: BatchSubscriptionActionsRequestSchema_action | null;
65
123
  /**
66
- * The subscriptionIds property
124
+ * The IDs of the subscriptions to apply the action to. Maximum of 100 IDs per request.
67
125
  */
68
126
  subscriptionIds?: string[] | null;
69
127
  }
@@ -244,6 +302,36 @@ export declare function createBatchCartActionsResponseSchema_dataFromDiscriminat
244
302
  * @returns {BatchCartActionsResponseSchema}
245
303
  */
246
304
  export declare function createBatchCartActionsResponseSchemaFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
305
+ /**
306
+ * Creates a new instance of the appropriate class based on discriminator value
307
+ * @param parseNode The parse node to use to read the discriminator value and create the object
308
+ * @returns {BatchReceiptActionsRequestSchema}
309
+ */
310
+ export declare function createBatchReceiptActionsRequestSchemaFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
311
+ /**
312
+ * Creates a new instance of the appropriate class based on discriminator value
313
+ * @param parseNode The parse node to use to read the discriminator value and create the object
314
+ * @returns {string}
315
+ */
316
+ export declare function createBatchReceiptActionsResponseSchema_data_results_statusFromDiscriminatorValue(parseNode: ParseNode | undefined): string | undefined;
317
+ /**
318
+ * Creates a new instance of the appropriate class based on discriminator value
319
+ * @param parseNode The parse node to use to read the discriminator value and create the object
320
+ * @returns {BatchReceiptActionsResponseSchema_data_results}
321
+ */
322
+ export declare function createBatchReceiptActionsResponseSchema_data_resultsFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
323
+ /**
324
+ * Creates a new instance of the appropriate class based on discriminator value
325
+ * @param parseNode The parse node to use to read the discriminator value and create the object
326
+ * @returns {BatchReceiptActionsResponseSchema_data}
327
+ */
328
+ export declare function createBatchReceiptActionsResponseSchema_dataFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
329
+ /**
330
+ * Creates a new instance of the appropriate class based on discriminator value
331
+ * @param parseNode The parse node to use to read the discriminator value and create the object
332
+ * @returns {BatchReceiptActionsResponseSchema}
333
+ */
334
+ export declare function createBatchReceiptActionsResponseSchemaFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
247
335
  /**
248
336
  * Creates a new instance of the appropriate class based on discriminator value
249
337
  * @param parseNode The parse node to use to read the discriminator value and create the object
@@ -2692,21 +2780,24 @@ export interface CreatePlanResponseSchema_data extends Parsable {
2692
2780
  }
2693
2781
  export interface CreatePortalRequestSchema extends Parsable {
2694
2782
  /**
2695
- * The features property
2783
+ * The portal features to enable for this session.
2696
2784
  */
2697
2785
  features?: CreatePortalRequestSchema_features | null;
2698
2786
  /**
2699
- * The returnUrl property
2787
+ * The URL to redirect customers to after they have finished managing their subscription in the portal.
2700
2788
  */
2701
2789
  returnUrl?: string | null;
2702
2790
  }
2791
+ /**
2792
+ * The portal features to enable for this session.
2793
+ */
2703
2794
  export interface CreatePortalRequestSchema_features extends Parsable {
2704
2795
  /**
2705
2796
  * Enables a customer to update their personal information.
2706
2797
  */
2707
2798
  customerUpdate?: CreatePortalRequestSchema_features_customerUpdate | null;
2708
2799
  /**
2709
- * Enables a customer to view invoice history.
2800
+ * Enables a customer to view their invoice history.
2710
2801
  */
2711
2802
  invoiceHistory?: CreatePortalRequestSchema_features_invoiceHistory | null;
2712
2803
  /**
@@ -2714,7 +2805,7 @@ export interface CreatePortalRequestSchema_features extends Parsable {
2714
2805
  */
2715
2806
  paymentMethodUpdate?: CreatePortalRequestSchema_features_paymentMethodUpdate | null;
2716
2807
  /**
2717
- * The subscriptionCancel property
2808
+ * Enables a customer to cancel their subscription.
2718
2809
  */
2719
2810
  subscriptionCancel?: CreatePortalRequestSchema_features_subscriptionCancel | null;
2720
2811
  }
@@ -2723,21 +2814,21 @@ export interface CreatePortalRequestSchema_features extends Parsable {
2723
2814
  */
2724
2815
  export interface CreatePortalRequestSchema_features_customerUpdate extends Parsable {
2725
2816
  /**
2726
- * Define what you want to allow customers to be able to update.
2817
+ * The customer fields that can be updated. Accepted values: `name`, `email`, `address`, `phone`, `shipping`.
2727
2818
  */
2728
2819
  allowedUpdates?: CreatePortalRequestSchema_features_customerUpdate_allowedUpdates[] | null;
2729
2820
  /**
2730
- * The enabled property
2821
+ * Whether to enable this feature in the portal.
2731
2822
  */
2732
2823
  enabled?: boolean | null;
2733
2824
  }
2734
2825
  export type CreatePortalRequestSchema_features_customerUpdate_allowedUpdates = (typeof CreatePortalRequestSchema_features_customerUpdate_allowedUpdatesObject)[keyof typeof CreatePortalRequestSchema_features_customerUpdate_allowedUpdatesObject];
2735
2826
  /**
2736
- * Enables a customer to view invoice history.
2827
+ * Enables a customer to view their invoice history.
2737
2828
  */
2738
2829
  export interface CreatePortalRequestSchema_features_invoiceHistory extends Parsable {
2739
2830
  /**
2740
- * The enabled property
2831
+ * Whether to enable this feature in the portal.
2741
2832
  */
2742
2833
  enabled?: boolean | null;
2743
2834
  }
@@ -2746,17 +2837,20 @@ export interface CreatePortalRequestSchema_features_invoiceHistory extends Parsa
2746
2837
  */
2747
2838
  export interface CreatePortalRequestSchema_features_paymentMethodUpdate extends Parsable {
2748
2839
  /**
2749
- * The enabled property
2840
+ * Whether to enable this feature in the portal.
2750
2841
  */
2751
2842
  enabled?: boolean | null;
2752
2843
  }
2844
+ /**
2845
+ * Enables a customer to cancel their subscription.
2846
+ */
2753
2847
  export interface CreatePortalRequestSchema_features_subscriptionCancel extends Parsable {
2754
2848
  /**
2755
- * The enabled property
2849
+ * Whether to enable this feature in the portal.
2756
2850
  */
2757
2851
  enabled?: boolean | null;
2758
2852
  /**
2759
- * "now" - cancels the subscription immediately. "end" - schedules the subscription to cancel at the end of the billing period.
2853
+ * `now` cancels the subscription immediately. `end` schedules cancellation at the end of the current billing period.
2760
2854
  */
2761
2855
  when?: CreatePortalRequestSchema_features_subscriptionCancel_when | null;
2762
2856
  }
@@ -3194,6 +3288,30 @@ export declare function deserializeIntoBatchCartActionsResponseSchema_data(batch
3194
3288
  * @returns {Record<string, (node: ParseNode) => void>}
3195
3289
  */
3196
3290
  export declare function deserializeIntoBatchCartActionsResponseSchema_data_results(batchCartActionsResponseSchema_data_results?: Partial<BatchCartActionsResponseSchema_data_results> | undefined): Record<string, (node: ParseNode) => void>;
3291
+ /**
3292
+ * The deserialization information for the current model
3293
+ * @param BatchReceiptActionsRequestSchema The instance to deserialize into.
3294
+ * @returns {Record<string, (node: ParseNode) => void>}
3295
+ */
3296
+ export declare function deserializeIntoBatchReceiptActionsRequestSchema(batchReceiptActionsRequestSchema?: Partial<BatchReceiptActionsRequestSchema> | undefined): Record<string, (node: ParseNode) => void>;
3297
+ /**
3298
+ * The deserialization information for the current model
3299
+ * @param BatchReceiptActionsResponseSchema The instance to deserialize into.
3300
+ * @returns {Record<string, (node: ParseNode) => void>}
3301
+ */
3302
+ export declare function deserializeIntoBatchReceiptActionsResponseSchema(batchReceiptActionsResponseSchema?: Partial<BatchReceiptActionsResponseSchema> | undefined): Record<string, (node: ParseNode) => void>;
3303
+ /**
3304
+ * The deserialization information for the current model
3305
+ * @param BatchReceiptActionsResponseSchema_data The instance to deserialize into.
3306
+ * @returns {Record<string, (node: ParseNode) => void>}
3307
+ */
3308
+ export declare function deserializeIntoBatchReceiptActionsResponseSchema_data(batchReceiptActionsResponseSchema_data?: Partial<BatchReceiptActionsResponseSchema_data> | undefined): Record<string, (node: ParseNode) => void>;
3309
+ /**
3310
+ * The deserialization information for the current model
3311
+ * @param BatchReceiptActionsResponseSchema_data_results The instance to deserialize into.
3312
+ * @returns {Record<string, (node: ParseNode) => void>}
3313
+ */
3314
+ export declare function deserializeIntoBatchReceiptActionsResponseSchema_data_results(batchReceiptActionsResponseSchema_data_results?: Partial<BatchReceiptActionsResponseSchema_data_results> | undefined): Record<string, (node: ParseNode) => void>;
3197
3315
  /**
3198
3316
  * The deserialization information for the current model
3199
3317
  * @param BatchSubscriptionActionsRequestSchema The instance to deserialize into.
@@ -14165,6 +14283,42 @@ export declare function serializeBatchCartActionsResponseSchema_data_results(wri
14165
14283
  * @param writer Serialization writer to use to serialize this model
14166
14284
  */
14167
14285
  export declare function serializeBatchCartActionsResponseSchema_data_results_status(writer: SerializationWriter, key: string, batchCartActionsResponseSchema_data_results_status: Parsable | BatchCartActionsResponseSchema_data_results_status | undefined, isSerializingDerivedType?: boolean): void;
14286
+ /**
14287
+ * Serializes information the current object
14288
+ * @param BatchReceiptActionsRequestSchema The instance to serialize from.
14289
+ * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
14290
+ * @param writer Serialization writer to use to serialize this model
14291
+ */
14292
+ export declare function serializeBatchReceiptActionsRequestSchema(writer: SerializationWriter, batchReceiptActionsRequestSchema?: Partial<BatchReceiptActionsRequestSchema> | undefined | null, isSerializingDerivedType?: boolean): void;
14293
+ /**
14294
+ * Serializes information the current object
14295
+ * @param BatchReceiptActionsResponseSchema The instance to serialize from.
14296
+ * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
14297
+ * @param writer Serialization writer to use to serialize this model
14298
+ */
14299
+ export declare function serializeBatchReceiptActionsResponseSchema(writer: SerializationWriter, batchReceiptActionsResponseSchema?: Partial<BatchReceiptActionsResponseSchema> | undefined | null, isSerializingDerivedType?: boolean): void;
14300
+ /**
14301
+ * Serializes information the current object
14302
+ * @param BatchReceiptActionsResponseSchema_data The instance to serialize from.
14303
+ * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
14304
+ * @param writer Serialization writer to use to serialize this model
14305
+ */
14306
+ export declare function serializeBatchReceiptActionsResponseSchema_data(writer: SerializationWriter, batchReceiptActionsResponseSchema_data?: Partial<BatchReceiptActionsResponseSchema_data> | undefined | null, isSerializingDerivedType?: boolean): void;
14307
+ /**
14308
+ * Serializes information the current object
14309
+ * @param BatchReceiptActionsResponseSchema_data_results The instance to serialize from.
14310
+ * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
14311
+ * @param writer Serialization writer to use to serialize this model
14312
+ */
14313
+ export declare function serializeBatchReceiptActionsResponseSchema_data_results(writer: SerializationWriter, batchReceiptActionsResponseSchema_data_results?: Partial<BatchReceiptActionsResponseSchema_data_results> | undefined | null, isSerializingDerivedType?: boolean): void;
14314
+ /**
14315
+ * Serializes information the current object
14316
+ * @param BatchReceiptActionsResponseSchema_data_results_status The instance to serialize from.
14317
+ * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
14318
+ * @param key The name of the property to write in the serialization.
14319
+ * @param writer Serialization writer to use to serialize this model
14320
+ */
14321
+ export declare function serializeBatchReceiptActionsResponseSchema_data_results_status(writer: SerializationWriter, key: string, batchReceiptActionsResponseSchema_data_results_status: Parsable | BatchReceiptActionsResponseSchema_data_results_status | undefined, isSerializingDerivedType?: boolean): void;
14168
14322
  /**
14169
14323
  * Serializes information the current object
14170
14324
  * @param BatchSubscriptionActionsRequestSchema The instance to serialize from.
@@ -17472,73 +17626,79 @@ export interface UpdateProductResponseSchema_data extends Parsable {
17472
17626
  }
17473
17627
  export interface UpdateSubscriptionItemsRequestSchema extends Parsable {
17474
17628
  /**
17475
- * The items property
17629
+ * The list of plan changes to apply to the subscription.
17476
17630
  */
17477
17631
  items?: (UpdateSubscriptionItemsRequestSchema_itemsMember1 | UpdateSubscriptionItemsRequestSchema_itemsMember2 | UpdateSubscriptionItemsRequestSchema_itemsMember3)[] | null;
17478
17632
  /**
17479
- * The proration property
17633
+ * 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`.
17480
17634
  */
17481
17635
  proration?: UpdateSubscriptionItemsRequestSchema_proration | null;
17482
17636
  }
17483
17637
  export type UpdateSubscriptionItemsRequestSchema_items = UpdateSubscriptionItemsRequestSchema_itemsMember1 | UpdateSubscriptionItemsRequestSchema_itemsMember2 | UpdateSubscriptionItemsRequestSchema_itemsMember3;
17484
17638
  export interface UpdateSubscriptionItemsRequestSchema_itemsMember1 extends Parsable {
17485
17639
  /**
17486
- * The action property
17640
+ * Remove the specified plan from the subscription.
17487
17641
  */
17488
17642
  action?: string | null;
17489
17643
  /**
17490
- * The planId property
17644
+ * The ID of the plan to act on.
17491
17645
  */
17492
17646
  planId?: string | null;
17493
17647
  }
17494
17648
  export interface UpdateSubscriptionItemsRequestSchema_itemsMember2 extends Parsable {
17495
17649
  /**
17496
- * The action property
17650
+ * Add a new plan to the subscription.
17497
17651
  */
17498
17652
  action?: string | null;
17499
17653
  /**
17500
- * The grantee property
17654
+ * Your internal identifier for the entity that will receive access to the added plan. Required for non-per-seat plans.
17501
17655
  */
17502
17656
  grantee?: string | null;
17503
17657
  /**
17504
- * The metadata property
17658
+ * Per-line-item quantity overrides, keyed by line item ID.
17505
17659
  */
17506
17660
  metadata?: UpdateSubscriptionItemsRequestSchema_itemsMember2_metadata | null;
17507
17661
  /**
17508
- * The planId property
17662
+ * The ID of the plan to act on.
17509
17663
  */
17510
17664
  planId?: string | null;
17511
17665
  }
17666
+ /**
17667
+ * Per-line-item quantity overrides, keyed by line item ID.
17668
+ */
17512
17669
  export interface UpdateSubscriptionItemsRequestSchema_itemsMember2_metadata extends AdditionalDataHolder, Parsable {
17513
17670
  }
17514
17671
  export interface UpdateSubscriptionItemsRequestSchema_itemsMember3 extends Parsable {
17515
17672
  /**
17516
- * The action property
17673
+ * Replace the specified plan with a different plan, preserving the existing grantee group.
17517
17674
  */
17518
17675
  action?: string | null;
17519
17676
  /**
17520
- * The metadata property
17677
+ * Per-line-item quantity overrides, keyed by line item ID.
17521
17678
  */
17522
17679
  metadata?: UpdateSubscriptionItemsRequestSchema_itemsMember3_metadata | null;
17523
17680
  /**
17524
- * The newPlanId property
17681
+ * The ID of the plan to replace the existing plan with.
17525
17682
  */
17526
17683
  newPlanId?: string | null;
17527
17684
  /**
17528
- * The planId property
17685
+ * The ID of the plan to act on.
17529
17686
  */
17530
17687
  planId?: string | null;
17531
17688
  }
17689
+ /**
17690
+ * Per-line-item quantity overrides, keyed by line item ID.
17691
+ */
17532
17692
  export interface UpdateSubscriptionItemsRequestSchema_itemsMember3_metadata extends AdditionalDataHolder, Parsable {
17533
17693
  }
17534
17694
  export type UpdateSubscriptionItemsRequestSchema_proration = (typeof UpdateSubscriptionItemsRequestSchema_prorationObject)[keyof typeof UpdateSubscriptionItemsRequestSchema_prorationObject];
17535
17695
  export interface UpdateSubscriptionPlanLineItemSchema extends Parsable {
17536
17696
  /**
17537
- * The proration property
17697
+ * Controls how Stripe handles proration when the quantity changes mid-billing-period. One of `always_invoice`, `create_prorations`, `none`.
17538
17698
  */
17539
17699
  proration?: UpdateSubscriptionPlanLineItemSchema_proration | null;
17540
17700
  /**
17541
- * The quantity property
17701
+ * The new quantity for this subscription plan line item. Must be within the line item's minimum and maximum allowed quantities, and cannot be less than the number of current grantees on the attached group.
17542
17702
  */
17543
17703
  quantity?: number | null;
17544
17704
  }
@@ -17557,6 +17717,12 @@ export type UpdateWebhookRequestSchema_events = (typeof UpdateWebhookRequestSche
17557
17717
  export declare const BatchCartActionsRequestSchema_actionObject: {
17558
17718
  readonly Abandon: "abandon";
17559
17719
  };
17720
+ export declare const BatchReceiptActionsRequestSchema_actionObject: {
17721
+ readonly Delete: "delete";
17722
+ };
17723
+ /**
17724
+ * The action to perform on all provided subscriptions. One of `cancel`, `enable-auto-renew`, `disable-auto-renew`, `delete`. The `delete` action is only available in test mode.
17725
+ */
17560
17726
  export declare const BatchSubscriptionActionsRequestSchema_actionObject: {
17561
17727
  readonly Cancel: "cancel";
17562
17728
  readonly EnableAutoRenew: "enable-auto-renew";
@@ -17723,7 +17889,7 @@ export declare const CreatePortalRequestSchema_features_customerUpdate_allowedUp
17723
17889
  readonly Shipping: "shipping";
17724
17890
  };
17725
17891
  /**
17726
- * "now" - cancels the subscription immediately. "end" - schedules the subscription to cancel at the end of the billing period.
17892
+ * `now` cancels the subscription immediately. `end` schedules cancellation at the end of the current billing period.
17727
17893
  */
17728
17894
  export declare const CreatePortalRequestSchema_features_subscriptionCancel_whenObject: {
17729
17895
  readonly Now: "now";
@@ -18234,11 +18400,17 @@ export declare const UpdateProductRequestSchema_settings_cardPrefillPreferenceOb
18234
18400
  readonly Always: "always";
18235
18401
  readonly Choice: "choice";
18236
18402
  };
18403
+ /**
18404
+ * 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`.
18405
+ */
18237
18406
  export declare const UpdateSubscriptionItemsRequestSchema_prorationObject: {
18238
18407
  readonly Always_invoice: "always_invoice";
18239
18408
  readonly Create_prorations: "create_prorations";
18240
18409
  readonly None: "none";
18241
18410
  };
18411
+ /**
18412
+ * Controls how Stripe handles proration when the quantity changes mid-billing-period. One of `always_invoice`, `create_prorations`, `none`.
18413
+ */
18242
18414
  export declare const UpdateSubscriptionPlanLineItemSchema_prorationObject: {
18243
18415
  readonly Always_invoice: "always_invoice";
18244
18416
  readonly Create_prorations: "create_prorations";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salable/sdk",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",