@schematichq/schematic-react 1.14.0 → 1.16.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.
@@ -59,6 +59,15 @@ export declare interface BillingActions {
59
59
  createSetupIntent(): Promise<SetupIntent>;
60
60
  /** Cancels the subscription at period end and reloads what that changes. */
61
61
  unsubscribe(): Promise<void>;
62
+ /** Sets the company's tax ID and takes the list it answers with. */
63
+ updateTaxId(taxId: TaxIdInput): Promise<void>;
64
+ /** Opens a checkout; the store holds nothing of it, `useCheckout` does. */
65
+ createCheckout(selections: CheckoutSelections): Promise<CheckoutWrite>;
66
+ getCheckout(id: string): Promise<Checkout>;
67
+ updateCheckout(id: string, version: number, selections: CheckoutSelections): Promise<CheckoutWrite>;
68
+ finalizeCheckout(id: string, version: number, options?: {
69
+ sessionId?: string;
70
+ }): Promise<CheckoutResult>;
62
71
  }
63
72
 
64
73
  declare namespace billingApi {
@@ -69,6 +78,30 @@ declare namespace billingApi {
69
78
  ApiErrorToJSON,
70
79
  ApiErrorToJSONTyped,
71
80
  ApiError,
81
+ instanceOfBillingCreditAutoTopupAvailability,
82
+ BillingCreditAutoTopupAvailabilityFromJSON,
83
+ BillingCreditAutoTopupAvailabilityFromJSONTyped,
84
+ BillingCreditAutoTopupAvailabilityToJSON,
85
+ BillingCreditAutoTopupAvailabilityToJSONTyped,
86
+ BillingCreditAutoTopupAvailability,
87
+ instanceOfBillingCreditBundleType,
88
+ BillingCreditBundleTypeFromJSON,
89
+ BillingCreditBundleTypeFromJSONTyped,
90
+ BillingCreditBundleTypeToJSON,
91
+ BillingCreditBundleTypeToJSONTyped,
92
+ BillingCreditBundleType,
93
+ instanceOfBillingCreditExpiryType,
94
+ BillingCreditExpiryTypeFromJSON,
95
+ BillingCreditExpiryTypeFromJSONTyped,
96
+ BillingCreditExpiryTypeToJSON,
97
+ BillingCreditExpiryTypeToJSONTyped,
98
+ BillingCreditExpiryType,
99
+ instanceOfBillingCreditExpiryUnit,
100
+ BillingCreditExpiryUnitFromJSON,
101
+ BillingCreditExpiryUnitFromJSONTyped,
102
+ BillingCreditExpiryUnitToJSON,
103
+ BillingCreditExpiryUnitToJSONTyped,
104
+ BillingCreditExpiryUnit,
72
105
  instanceOfBillingCreditGrantReason,
73
106
  BillingCreditGrantReasonFromJSON,
74
107
  BillingCreditGrantReasonFromJSONTyped,
@@ -99,18 +132,102 @@ declare namespace billingApi {
99
132
  BillingProviderTypeToJSON,
100
133
  BillingProviderTypeToJSONTyped,
101
134
  BillingProviderType,
135
+ instanceOfBillingStrategy,
136
+ BillingStrategyFromJSON,
137
+ BillingStrategyFromJSONTyped,
138
+ BillingStrategyToJSON,
139
+ BillingStrategyToJSONTyped,
140
+ BillingStrategy,
141
+ instanceOfBillingSubscriptionTrialEndSetting,
142
+ BillingSubscriptionTrialEndSettingFromJSON,
143
+ BillingSubscriptionTrialEndSettingFromJSONTyped,
144
+ BillingSubscriptionTrialEndSettingToJSON,
145
+ BillingSubscriptionTrialEndSettingToJSONTyped,
146
+ BillingSubscriptionTrialEndSetting,
102
147
  instanceOfBillingTiersMode,
103
148
  BillingTiersModeFromJSON,
104
149
  BillingTiersModeFromJSONTyped,
105
150
  BillingTiersModeToJSON,
106
151
  BillingTiersModeToJSONTyped,
107
152
  BillingTiersMode,
153
+ instanceOfCatalogAutoTopupResponseData,
154
+ CatalogAutoTopupResponseDataFromJSON,
155
+ CatalogAutoTopupResponseDataFromJSONTyped,
156
+ CatalogAutoTopupResponseDataToJSON,
157
+ CatalogAutoTopupResponseDataToJSONTyped,
158
+ CatalogAutoTopupResponseData,
159
+ instanceOfCatalogBundleCurrencyPriceResponseData,
160
+ CatalogBundleCurrencyPriceResponseDataFromJSON,
161
+ CatalogBundleCurrencyPriceResponseDataFromJSONTyped,
162
+ CatalogBundleCurrencyPriceResponseDataToJSON,
163
+ CatalogBundleCurrencyPriceResponseDataToJSONTyped,
164
+ CatalogBundleCurrencyPriceResponseData,
165
+ instanceOfCatalogCapabilitiesResponseData,
166
+ CatalogCapabilitiesResponseDataFromJSON,
167
+ CatalogCapabilitiesResponseDataFromJSONTyped,
168
+ CatalogCapabilitiesResponseDataToJSON,
169
+ CatalogCapabilitiesResponseDataToJSONTyped,
170
+ CatalogCapabilitiesResponseData,
171
+ instanceOfCatalogCheckoutFieldResponseData,
172
+ CatalogCheckoutFieldResponseDataFromJSON,
173
+ CatalogCheckoutFieldResponseDataFromJSONTyped,
174
+ CatalogCheckoutFieldResponseDataToJSON,
175
+ CatalogCheckoutFieldResponseDataToJSONTyped,
176
+ CatalogCheckoutFieldResponseData,
177
+ instanceOfCatalogCheckoutSettingsResponseData,
178
+ CatalogCheckoutSettingsResponseDataFromJSON,
179
+ CatalogCheckoutSettingsResponseDataFromJSONTyped,
180
+ CatalogCheckoutSettingsResponseDataToJSON,
181
+ CatalogCheckoutSettingsResponseDataToJSONTyped,
182
+ CatalogCheckoutSettingsResponseData,
183
+ instanceOfCatalogCompanyPlanResponseData,
184
+ CatalogCompanyPlanResponseDataFromJSON,
185
+ CatalogCompanyPlanResponseDataFromJSONTyped,
186
+ CatalogCompanyPlanResponseDataToJSON,
187
+ CatalogCompanyPlanResponseDataToJSONTyped,
188
+ CatalogCompanyPlanResponseData,
189
+ instanceOfCatalogCreditBundleResponseData,
190
+ CatalogCreditBundleResponseDataFromJSON,
191
+ CatalogCreditBundleResponseDataFromJSONTyped,
192
+ CatalogCreditBundleResponseDataToJSON,
193
+ CatalogCreditBundleResponseDataToJSONTyped,
194
+ CatalogCreditBundleResponseData,
108
195
  instanceOfCatalogCreditGrantResponseData,
109
196
  CatalogCreditGrantResponseDataFromJSON,
110
197
  CatalogCreditGrantResponseDataFromJSONTyped,
111
198
  CatalogCreditGrantResponseDataToJSON,
112
199
  CatalogCreditGrantResponseDataToJSONTyped,
113
200
  CatalogCreditGrantResponseData,
201
+ instanceOfCatalogCurrencyPricesResponseData,
202
+ CatalogCurrencyPricesResponseDataFromJSON,
203
+ CatalogCurrencyPricesResponseDataFromJSONTyped,
204
+ CatalogCurrencyPricesResponseDataToJSON,
205
+ CatalogCurrencyPricesResponseDataToJSONTyped,
206
+ CatalogCurrencyPricesResponseData,
207
+ instanceOfCatalogCustomPlanCTAResponseData,
208
+ CatalogCustomPlanCTAResponseDataFromJSON,
209
+ CatalogCustomPlanCTAResponseDataFromJSONTyped,
210
+ CatalogCustomPlanCTAResponseDataToJSON,
211
+ CatalogCustomPlanCTAResponseDataToJSONTyped,
212
+ CatalogCustomPlanCTAResponseData,
213
+ instanceOfCatalogPlanEntitlementResponseData,
214
+ CatalogPlanEntitlementResponseDataFromJSON,
215
+ CatalogPlanEntitlementResponseDataFromJSONTyped,
216
+ CatalogPlanEntitlementResponseDataToJSON,
217
+ CatalogPlanEntitlementResponseDataToJSONTyped,
218
+ CatalogPlanEntitlementResponseData,
219
+ instanceOfCatalogPlanRefResponseData,
220
+ CatalogPlanRefResponseDataFromJSON,
221
+ CatalogPlanRefResponseDataFromJSONTyped,
222
+ CatalogPlanRefResponseDataToJSON,
223
+ CatalogPlanRefResponseDataToJSONTyped,
224
+ CatalogPlanRefResponseData,
225
+ instanceOfCatalogPlanResponseData,
226
+ CatalogPlanResponseDataFromJSON,
227
+ CatalogPlanResponseDataFromJSONTyped,
228
+ CatalogPlanResponseDataToJSON,
229
+ CatalogPlanResponseDataToJSONTyped,
230
+ CatalogPlanResponseData,
114
231
  instanceOfCatalogPriceResponseData,
115
232
  CatalogPriceResponseDataFromJSON,
116
233
  CatalogPriceResponseDataFromJSONTyped,
@@ -123,12 +240,120 @@ declare namespace billingApi {
123
240
  CatalogPriceTierResponseDataToJSON,
124
241
  CatalogPriceTierResponseDataToJSONTyped,
125
242
  CatalogPriceTierResponseData,
243
+ instanceOfCatalogUsageViolationResponseData,
244
+ CatalogUsageViolationResponseDataFromJSON,
245
+ CatalogUsageViolationResponseDataFromJSONTyped,
246
+ CatalogUsageViolationResponseDataToJSON,
247
+ CatalogUsageViolationResponseDataToJSONTyped,
248
+ CatalogUsageViolationResponseData,
249
+ instanceOfChargeType,
250
+ ChargeTypeFromJSON,
251
+ ChargeTypeFromJSONTyped,
252
+ ChargeTypeToJSON,
253
+ ChargeTypeToJSONTyped,
254
+ ChargeType,
255
+ instanceOfCheckoutBundlePurchaseBehavior,
256
+ CheckoutBundlePurchaseBehaviorFromJSON,
257
+ CheckoutBundlePurchaseBehaviorFromJSONTyped,
258
+ CheckoutBundlePurchaseBehaviorToJSON,
259
+ CheckoutBundlePurchaseBehaviorToJSONTyped,
260
+ CheckoutBundlePurchaseBehavior,
261
+ instanceOfCheckoutChargeTiming,
262
+ CheckoutChargeTimingFromJSON,
263
+ CheckoutChargeTimingFromJSONTyped,
264
+ CheckoutChargeTimingToJSON,
265
+ CheckoutChargeTimingToJSONTyped,
266
+ CheckoutChargeTiming,
267
+ instanceOfCheckoutDraftResponseData,
268
+ CheckoutDraftResponseDataFromJSON,
269
+ CheckoutDraftResponseDataFromJSONTyped,
270
+ CheckoutDraftResponseDataToJSON,
271
+ CheckoutDraftResponseDataToJSONTyped,
272
+ CheckoutDraftResponseData,
273
+ instanceOfCheckoutFieldValue,
274
+ CheckoutFieldValueFromJSON,
275
+ CheckoutFieldValueFromJSONTyped,
276
+ CheckoutFieldValueToJSON,
277
+ CheckoutFieldValueToJSONTyped,
278
+ CheckoutFieldValue,
279
+ instanceOfCheckoutIntent,
280
+ CheckoutIntentFromJSON,
281
+ CheckoutIntentFromJSONTyped,
282
+ CheckoutIntentToJSON,
283
+ CheckoutIntentToJSONTyped,
284
+ CheckoutIntent,
285
+ instanceOfCheckoutPriceSnapshot,
286
+ CheckoutPriceSnapshotFromJSON,
287
+ CheckoutPriceSnapshotFromJSONTyped,
288
+ CheckoutPriceSnapshotToJSON,
289
+ CheckoutPriceSnapshotToJSONTyped,
290
+ CheckoutPriceSnapshot,
291
+ instanceOfCheckoutPriceSnapshotDiscount,
292
+ CheckoutPriceSnapshotDiscountFromJSON,
293
+ CheckoutPriceSnapshotDiscountFromJSONTyped,
294
+ CheckoutPriceSnapshotDiscountToJSON,
295
+ CheckoutPriceSnapshotDiscountToJSONTyped,
296
+ CheckoutPriceSnapshotDiscount,
297
+ instanceOfCheckoutPriceSnapshotProration,
298
+ CheckoutPriceSnapshotProrationFromJSON,
299
+ CheckoutPriceSnapshotProrationFromJSONTyped,
300
+ CheckoutPriceSnapshotProrationToJSON,
301
+ CheckoutPriceSnapshotProrationToJSONTyped,
302
+ CheckoutPriceSnapshotProration,
303
+ instanceOfCheckoutPriceSnapshotProrationLine,
304
+ CheckoutPriceSnapshotProrationLineFromJSON,
305
+ CheckoutPriceSnapshotProrationLineFromJSONTyped,
306
+ CheckoutPriceSnapshotProrationLineToJSON,
307
+ CheckoutPriceSnapshotProrationLineToJSONTyped,
308
+ CheckoutPriceSnapshotProrationLine,
309
+ instanceOfCheckoutProblemCode,
310
+ CheckoutProblemCodeFromJSON,
311
+ CheckoutProblemCodeFromJSONTyped,
312
+ CheckoutProblemCodeToJSON,
313
+ CheckoutProblemCodeToJSONTyped,
314
+ CheckoutProblemCode,
315
+ instanceOfCheckoutProblemResponseData,
316
+ CheckoutProblemResponseDataFromJSON,
317
+ CheckoutProblemResponseDataFromJSONTyped,
318
+ CheckoutProblemResponseDataToJSON,
319
+ CheckoutProblemResponseDataToJSONTyped,
320
+ CheckoutProblemResponseData,
321
+ instanceOfCheckoutProblemSource,
322
+ CheckoutProblemSourceFromJSON,
323
+ CheckoutProblemSourceFromJSONTyped,
324
+ CheckoutProblemSourceToJSON,
325
+ CheckoutProblemSourceToJSONTyped,
326
+ CheckoutProblemSource,
327
+ instanceOfCheckoutResponseData,
328
+ CheckoutResponseDataFromJSON,
329
+ CheckoutResponseDataFromJSONTyped,
330
+ CheckoutResponseDataToJSON,
331
+ CheckoutResponseDataToJSONTyped,
332
+ CheckoutResponseData,
333
+ instanceOfCheckoutSelectionsResponseData,
334
+ CheckoutSelectionsResponseDataFromJSON,
335
+ CheckoutSelectionsResponseDataFromJSONTyped,
336
+ CheckoutSelectionsResponseDataToJSON,
337
+ CheckoutSelectionsResponseDataToJSONTyped,
338
+ CheckoutSelectionsResponseData,
339
+ instanceOfCheckoutStatus,
340
+ CheckoutStatusFromJSON,
341
+ CheckoutStatusFromJSONTyped,
342
+ CheckoutStatusToJSON,
343
+ CheckoutStatusToJSONTyped,
344
+ CheckoutStatus,
126
345
  instanceOfCheckoutUnsubscribeResponse,
127
346
  CheckoutUnsubscribeResponseFromJSON,
128
347
  CheckoutUnsubscribeResponseFromJSONTyped,
129
348
  CheckoutUnsubscribeResponseToJSON,
130
349
  CheckoutUnsubscribeResponseToJSONTyped,
131
350
  CheckoutUnsubscribeResponse,
351
+ instanceOfCompanyCatalogResponseData,
352
+ CompanyCatalogResponseDataFromJSON,
353
+ CompanyCatalogResponseDataFromJSONTyped,
354
+ CompanyCatalogResponseDataToJSON,
355
+ CompanyCatalogResponseDataToJSONTyped,
356
+ CompanyCatalogResponseData,
132
357
  instanceOfCompanyContextCustomPlanBillingResponseData,
133
358
  CompanyContextCustomPlanBillingResponseDataFromJSON,
134
359
  CompanyContextCustomPlanBillingResponseDataFromJSONTyped,
@@ -249,6 +474,18 @@ declare namespace billingApi {
249
474
  CompanyPaymentMethodsResponseDataToJSON,
250
475
  CompanyPaymentMethodsResponseDataToJSONTyped,
251
476
  CompanyPaymentMethodsResponseData,
477
+ instanceOfCompanyPlanInvalidReason,
478
+ CompanyPlanInvalidReasonFromJSON,
479
+ CompanyPlanInvalidReasonFromJSONTyped,
480
+ CompanyPlanInvalidReasonToJSON,
481
+ CompanyPlanInvalidReasonToJSONTyped,
482
+ CompanyPlanInvalidReason,
483
+ instanceOfCompanyTaxIDView,
484
+ CompanyTaxIDViewFromJSON,
485
+ CompanyTaxIDViewFromJSONTyped,
486
+ CompanyTaxIDViewToJSON,
487
+ CompanyTaxIDViewToJSONTyped,
488
+ CompanyTaxIDView,
252
489
  instanceOfCompanyUpcomingInvoiceResponseData,
253
490
  CompanyUpcomingInvoiceResponseDataFromJSON,
254
491
  CompanyUpcomingInvoiceResponseDataFromJSONTyped,
@@ -261,6 +498,18 @@ declare namespace billingApi {
261
498
  CompanyUserUsageResponseDataToJSON,
262
499
  CompanyUserUsageResponseDataToJSONTyped,
263
500
  CompanyUserUsageResponseData,
501
+ instanceOfCreateCheckoutRequest,
502
+ CreateCheckoutRequestFromJSON,
503
+ CreateCheckoutRequestFromJSONTyped,
504
+ CreateCheckoutRequestToJSON,
505
+ CreateCheckoutRequestToJSONTyped,
506
+ CreateCheckoutRequest,
507
+ instanceOfCreateCheckoutResponse,
508
+ CreateCheckoutResponseFromJSON,
509
+ CreateCheckoutResponseFromJSONTyped,
510
+ CreateCheckoutResponseToJSON,
511
+ CreateCheckoutResponseToJSONTyped,
512
+ CreateCheckoutResponse,
264
513
  instanceOfCreateSetupIntentResponse,
265
514
  CreateSetupIntentResponseFromJSON,
266
515
  CreateSetupIntentResponseFromJSONTyped,
@@ -315,6 +564,42 @@ declare namespace billingApi {
315
564
  FeatureTypeToJSON,
316
565
  FeatureTypeToJSONTyped,
317
566
  FeatureType,
567
+ instanceOfFinalizeCheckoutRequest,
568
+ FinalizeCheckoutRequestFromJSON,
569
+ FinalizeCheckoutRequestFromJSONTyped,
570
+ FinalizeCheckoutRequestToJSON,
571
+ FinalizeCheckoutRequestToJSONTyped,
572
+ FinalizeCheckoutRequest,
573
+ instanceOfFinalizeCheckoutResponse,
574
+ FinalizeCheckoutResponseFromJSON,
575
+ FinalizeCheckoutResponseFromJSONTyped,
576
+ FinalizeCheckoutResponseToJSON,
577
+ FinalizeCheckoutResponseToJSONTyped,
578
+ FinalizeCheckoutResponse,
579
+ instanceOfGetCatalogViewByIDResponse,
580
+ GetCatalogViewByIDResponseFromJSON,
581
+ GetCatalogViewByIDResponseFromJSONTyped,
582
+ GetCatalogViewByIDResponseToJSON,
583
+ GetCatalogViewByIDResponseToJSONTyped,
584
+ GetCatalogViewByIDResponse,
585
+ instanceOfGetCatalogViewResponse,
586
+ GetCatalogViewResponseFromJSON,
587
+ GetCatalogViewResponseFromJSONTyped,
588
+ GetCatalogViewResponseToJSON,
589
+ GetCatalogViewResponseToJSONTyped,
590
+ GetCatalogViewResponse,
591
+ instanceOfGetCheckoutResponse,
592
+ GetCheckoutResponseFromJSON,
593
+ GetCheckoutResponseFromJSONTyped,
594
+ GetCheckoutResponseToJSON,
595
+ GetCheckoutResponseToJSONTyped,
596
+ GetCheckoutResponse,
597
+ instanceOfGetCheckoutTaxIDResponse,
598
+ GetCheckoutTaxIDResponseFromJSON,
599
+ GetCheckoutTaxIDResponseFromJSONTyped,
600
+ GetCheckoutTaxIDResponseToJSON,
601
+ GetCheckoutTaxIDResponseToJSONTyped,
602
+ GetCheckoutTaxIDResponse,
318
603
  instanceOfGetCompanyCreditBalancesResponse,
319
604
  GetCompanyCreditBalancesResponseFromJSON,
320
605
  GetCompanyCreditBalancesResponseFromJSONTyped,
@@ -381,12 +666,36 @@ declare namespace billingApi {
381
666
  GetCompanyUpcomingInvoiceResponseToJSON,
382
667
  GetCompanyUpcomingInvoiceResponseToJSONTyped,
383
668
  GetCompanyUpcomingInvoiceResponse,
669
+ instanceOfGetPublicCatalogByIDResponse,
670
+ GetPublicCatalogByIDResponseFromJSON,
671
+ GetPublicCatalogByIDResponseFromJSONTyped,
672
+ GetPublicCatalogByIDResponseToJSON,
673
+ GetPublicCatalogByIDResponseToJSONTyped,
674
+ GetPublicCatalogByIDResponse,
675
+ instanceOfGetPublicCatalogResponse,
676
+ GetPublicCatalogResponseFromJSON,
677
+ GetPublicCatalogResponseFromJSONTyped,
678
+ GetPublicCatalogResponseToJSON,
679
+ GetPublicCatalogResponseToJSONTyped,
680
+ GetPublicCatalogResponse,
384
681
  instanceOfInvoiceStatus,
385
682
  InvoiceStatusFromJSON,
386
683
  InvoiceStatusFromJSONTyped,
387
684
  InvoiceStatusToJSON,
388
685
  InvoiceStatusToJSONTyped,
389
686
  InvoiceStatus,
687
+ instanceOfListCheckoutsParams,
688
+ ListCheckoutsParamsFromJSON,
689
+ ListCheckoutsParamsFromJSONTyped,
690
+ ListCheckoutsParamsToJSON,
691
+ ListCheckoutsParamsToJSONTyped,
692
+ ListCheckoutsParams,
693
+ instanceOfListCheckoutsResponse,
694
+ ListCheckoutsResponseFromJSON,
695
+ ListCheckoutsResponseFromJSONTyped,
696
+ ListCheckoutsResponseToJSON,
697
+ ListCheckoutsResponseToJSONTyped,
698
+ ListCheckoutsResponse,
390
699
  instanceOfMetricPeriod,
391
700
  MetricPeriodFromJSON,
392
701
  MetricPeriodFromJSONTyped,
@@ -411,12 +720,108 @@ declare namespace billingApi {
411
720
  PlanCreditGrantScalingToJSON,
412
721
  PlanCreditGrantScalingToJSONTyped,
413
722
  PlanCreditGrantScaling,
723
+ instanceOfPlanPriceCadence,
724
+ PlanPriceCadenceFromJSON,
725
+ PlanPriceCadenceFromJSONTyped,
726
+ PlanPriceCadenceToJSON,
727
+ PlanPriceCadenceToJSONTyped,
728
+ PlanPriceCadence,
729
+ instanceOfProrationBehavior,
730
+ ProrationBehaviorFromJSON,
731
+ ProrationBehaviorFromJSONTyped,
732
+ ProrationBehaviorToJSON,
733
+ ProrationBehaviorToJSONTyped,
734
+ ProrationBehavior,
735
+ instanceOfProrationLineKind,
736
+ ProrationLineKindFromJSON,
737
+ ProrationLineKindFromJSONTyped,
738
+ ProrationLineKindToJSON,
739
+ ProrationLineKindToJSONTyped,
740
+ ProrationLineKind,
741
+ instanceOfPublicCatalogResponseData,
742
+ PublicCatalogResponseDataFromJSON,
743
+ PublicCatalogResponseDataFromJSONTyped,
744
+ PublicCatalogResponseDataToJSON,
745
+ PublicCatalogResponseDataToJSONTyped,
746
+ PublicCatalogResponseData,
747
+ instanceOfScheduledDowngradeConfigBehavior,
748
+ ScheduledDowngradeConfigBehaviorFromJSON,
749
+ ScheduledDowngradeConfigBehaviorFromJSONTyped,
750
+ ScheduledDowngradeConfigBehaviorToJSON,
751
+ ScheduledDowngradeConfigBehaviorToJSONTyped,
752
+ ScheduledDowngradeConfigBehavior,
414
753
  instanceOfSetupIntentResponseData,
415
754
  SetupIntentResponseDataFromJSON,
416
755
  SetupIntentResponseDataFromJSONTyped,
417
756
  SetupIntentResponseDataToJSON,
418
757
  SetupIntentResponseDataToJSONTyped,
419
758
  SetupIntentResponseData,
759
+ instanceOfTaxIDInput,
760
+ TaxIDInputFromJSON,
761
+ TaxIDInputFromJSONTyped,
762
+ TaxIDInputToJSON,
763
+ TaxIDInputToJSONTyped,
764
+ TaxIDInput,
765
+ instanceOfTaxIdType,
766
+ TaxIdTypeFromJSON,
767
+ TaxIdTypeFromJSONTyped,
768
+ TaxIdTypeToJSON,
769
+ TaxIdTypeToJSONTyped,
770
+ TaxIdType,
771
+ instanceOfUpdateAddOnRequestBody,
772
+ UpdateAddOnRequestBodyFromJSON,
773
+ UpdateAddOnRequestBodyFromJSONTyped,
774
+ UpdateAddOnRequestBodyToJSON,
775
+ UpdateAddOnRequestBodyToJSONTyped,
776
+ UpdateAddOnRequestBody,
777
+ instanceOfUpdateAutoTopupOverrideRequestBody,
778
+ UpdateAutoTopupOverrideRequestBodyFromJSON,
779
+ UpdateAutoTopupOverrideRequestBodyFromJSONTyped,
780
+ UpdateAutoTopupOverrideRequestBodyToJSON,
781
+ UpdateAutoTopupOverrideRequestBodyToJSONTyped,
782
+ UpdateAutoTopupOverrideRequestBody,
783
+ instanceOfUpdateCheckoutRequest,
784
+ UpdateCheckoutRequestFromJSON,
785
+ UpdateCheckoutRequestFromJSONTyped,
786
+ UpdateCheckoutRequestToJSON,
787
+ UpdateCheckoutRequestToJSONTyped,
788
+ UpdateCheckoutRequest,
789
+ instanceOfUpdateCheckoutResponse,
790
+ UpdateCheckoutResponseFromJSON,
791
+ UpdateCheckoutResponseFromJSONTyped,
792
+ UpdateCheckoutResponseToJSON,
793
+ UpdateCheckoutResponseToJSONTyped,
794
+ UpdateCheckoutResponse,
795
+ instanceOfUpdateCheckoutTaxIDRequestBody,
796
+ UpdateCheckoutTaxIDRequestBodyFromJSON,
797
+ UpdateCheckoutTaxIDRequestBodyFromJSONTyped,
798
+ UpdateCheckoutTaxIDRequestBodyToJSON,
799
+ UpdateCheckoutTaxIDRequestBodyToJSONTyped,
800
+ UpdateCheckoutTaxIDRequestBody,
801
+ instanceOfUpdateCheckoutTaxIDResponse,
802
+ UpdateCheckoutTaxIDResponseFromJSON,
803
+ UpdateCheckoutTaxIDResponseFromJSONTyped,
804
+ UpdateCheckoutTaxIDResponseToJSON,
805
+ UpdateCheckoutTaxIDResponseToJSONTyped,
806
+ UpdateCheckoutTaxIDResponse,
807
+ instanceOfUpdateCheckoutTaxIDResponseData,
808
+ UpdateCheckoutTaxIDResponseDataFromJSON,
809
+ UpdateCheckoutTaxIDResponseDataFromJSONTyped,
810
+ UpdateCheckoutTaxIDResponseDataToJSON,
811
+ UpdateCheckoutTaxIDResponseDataToJSONTyped,
812
+ UpdateCheckoutTaxIDResponseData,
813
+ instanceOfUpdateCreditBundleRequestBody,
814
+ UpdateCreditBundleRequestBodyFromJSON,
815
+ UpdateCreditBundleRequestBodyFromJSONTyped,
816
+ UpdateCreditBundleRequestBodyToJSON,
817
+ UpdateCreditBundleRequestBodyToJSONTyped,
818
+ UpdateCreditBundleRequestBody,
819
+ instanceOfUpdatePayInAdvanceRequestBody,
820
+ UpdatePayInAdvanceRequestBodyFromJSON,
821
+ UpdatePayInAdvanceRequestBodyFromJSONTyped,
822
+ UpdatePayInAdvanceRequestBodyToJSON,
823
+ UpdatePayInAdvanceRequestBodyToJSONTyped,
824
+ UpdatePayInAdvanceRequestBody,
420
825
  instanceOfUpdatePaymentMethodRequestBody,
421
826
  UpdatePaymentMethodRequestBodyFromJSON,
422
827
  UpdatePaymentMethodRequestBodyFromJSONTyped,
@@ -439,6 +844,30 @@ declare namespace billingApi {
439
844
  * ship.
440
845
  */
441
846
  declare interface BillingClient {
847
+ /** The environment's catalog, or the one `catalogId` names. */
848
+ fetchCatalog(query?: CatalogQuery): Promise<Catalog>;
849
+ /**
850
+ * The same catalog with no company's standing in it, read with the
851
+ * publishable key whether or not a session is active.
852
+ */
853
+ fetchPublicCatalog(query?: CatalogQuery): Promise<PublicCatalog>;
854
+ /** Whether `fetchPublicCatalog` has a key to read with. */
855
+ readonly hasPublishableKey: boolean;
856
+ /** Opens a checkout, priced when the cart is priceable. */
857
+ createCheckout(selections: CheckoutSelections): Promise<CheckoutWrite>;
858
+ getCheckout(id: string): Promise<Checkout>;
859
+ /**
860
+ * Replaces the cart and re-prices it. `version` is the one the caller last
861
+ * read; a stale one is a 409.
862
+ */
863
+ updateCheckout(id: string, version: number, selections: CheckoutSelections): Promise<CheckoutWrite>;
864
+ /**
865
+ * Charges the cart at `version`. `sessionId` is the one the last write
866
+ * answered with; without it the finalize starts a session of its own.
867
+ */
868
+ finalizeCheckout(id: string, version: number, options?: {
869
+ sessionId?: string;
870
+ }): Promise<CheckoutResult>;
442
871
  fetchInvoices(params: InvoicesRequest): Promise<InvoicesResult>;
443
872
  /** `null` when the company has no next bill. */
444
873
  fetchUpcomingInvoice(): Promise<UpcomingInvoice | null>;
@@ -458,6 +887,10 @@ declare interface BillingClient {
458
887
  cancelSubscription(): Promise<void>;
459
888
  /** Empty when the company is entitled to nothing. */
460
889
  fetchFeatureUsage(): Promise<FeatureUsage[]>;
890
+ /** Empty when the company has none on file. */
891
+ fetchTaxIds(): Promise<TaxId[]>;
892
+ /** Sets the company's tax ID, and answers with every one now on file. */
893
+ updateTaxId(taxId: TaxIdInput): Promise<TaxId[]>;
461
894
  /** One event-based feature's usage by user over its metric period. */
462
895
  fetchFeatureUserUsage(params: FeatureUserUsageRequest): Promise<FeatureUserUsage>;
463
896
  /** Empty when the company holds no credits and its plan draws on none. */
@@ -474,6 +907,53 @@ declare interface BillingClient {
474
907
 
475
908
  declare type BillingClientOptions = SessionOptions;
476
909
 
910
+ /**
911
+ *
912
+ * @export
913
+ */
914
+ declare const BillingCreditAutoTopupAvailability: {
915
+ readonly Off: "off";
916
+ readonly Automatic: "automatic";
917
+ readonly UserControlled: "user_controlled";
918
+ };
919
+
920
+ declare type BillingCreditAutoTopupAvailability = (typeof BillingCreditAutoTopupAvailability)[keyof typeof BillingCreditAutoTopupAvailability];
921
+
922
+ /**
923
+ *
924
+ * @export
925
+ */
926
+ declare const BillingCreditBundleType: {
927
+ readonly Fixed: "fixed";
928
+ };
929
+
930
+ declare type BillingCreditBundleType = (typeof BillingCreditBundleType)[keyof typeof BillingCreditBundleType];
931
+
932
+ /**
933
+ *
934
+ * @export
935
+ */
936
+ declare const BillingCreditExpiryType: {
937
+ readonly Duration: "duration";
938
+ readonly EndOfBillingPeriod: "end_of_billing_period";
939
+ readonly EndOfNextBillingPeriod: "end_of_next_billing_period";
940
+ readonly EndOfTrial: "end_of_trial";
941
+ readonly NoExpiry: "no_expiry";
942
+ };
943
+
944
+ declare type BillingCreditExpiryType = (typeof BillingCreditExpiryType)[keyof typeof BillingCreditExpiryType];
945
+
946
+ /**
947
+ *
948
+ * @export
949
+ */
950
+ declare const BillingCreditExpiryUnit: {
951
+ readonly BillingPeriods: "billing_periods";
952
+ readonly Days: "days";
953
+ };
954
+
955
+ declare type BillingCreditExpiryUnit = (typeof BillingCreditExpiryUnit)[keyof typeof BillingCreditExpiryUnit];
956
+
477
957
  /**
478
958
  *
479
959
  * @export
@@ -565,6 +1045,17 @@ export declare interface BillingDataSource {
565
1045
  invalidateAll: () => void;
566
1046
  /** Absent on a source that only reads. */
567
1047
  actions?: BillingActions;
1048
+ /**
1049
+ * The session changing under the source, for state kept outside the store
1050
+ * — a checkout in progress belongs to the session it was opened in. Absent
1051
+ * on a source whose session never changes.
1052
+ */
1053
+ onSessionChange?: (listener: (event: SessionEvent) => void) => () => void;
1054
+ /**
1055
+ * Which catalog a reader sees now; it changes only with the session, so
1056
+ * `onSessionChange` says when to ask again. Absent, the company's view.
1057
+ */
1058
+ catalogSource?: () => CatalogSource;
568
1059
  }
569
1060
 
570
1061
  /** Per-resource status overrides, for fixtures that simulate loading and failure. */
@@ -600,6 +1091,11 @@ declare interface BillingPrefetchOptions {
600
1091
  names: BillingResourceName_2[];
601
1092
  /** The invoice query to prefetch for; the element must ask the same one. */
602
1093
  invoices?: InvoiceQuery;
1094
+ /**
1095
+ * The catalog to prefetch, as `catalog` or `publicCatalog`; the element
1096
+ * must ask the same one.
1097
+ */
1098
+ catalog?: CatalogQuery;
603
1099
  }
604
1100
 
605
1101
  /**
@@ -634,13 +1130,13 @@ export declare function BillingProvider({ billingClient, children, initialData,
634
1130
 
635
1131
  /**
636
1132
  * What `BillingProvider` asks of its client: the session it reads under, the
637
- * fetch behind each resource above, and the payment-method actions the hooks
638
- * expose. schematic-js's `SchematicBillingClient`
1133
+ * fetch behind each resource above, and the payment-method and checkout
1134
+ * actions the hooks expose. schematic-js's `SchematicBillingClient`
639
1135
  * satisfies it, and so does a host's own client that implements only this
640
1136
  * much. Named apart from schematic-js's `BillingClient`, which is the whole
641
1137
  * interface; this is the part the hooks here call.
642
1138
  */
643
- export declare type BillingProviderClient = Pick<BillingClient, "sessionStatus" | "sessionKey" | "setSession" | "onSessionChange" | "fetchInvoices" | "fetchUpcomingInvoice" | "fetchPaymentMethods" | "createSetupIntent" | "updatePaymentMethod" | "deletePaymentMethod" | "fetchFeatureUsage" | "fetchFeatureUserUsage" | "fetchCreditBalances" | "fetchCreditUserUsage" | "fetchCompany" | "cancelSubscription">;
1139
+ export declare type BillingProviderClient = Pick<BillingClient, "sessionStatus" | "sessionKey" | "setSession" | "onSessionChange" | "fetchCatalog" | "createCheckout" | "getCheckout" | "updateCheckout" | "finalizeCheckout" | "fetchInvoices" | "fetchUpcomingInvoice" | "fetchPaymentMethods" | "createSetupIntent" | "updatePaymentMethod" | "deletePaymentMethod" | "fetchFeatureUsage" | "fetchFeatureUserUsage" | "fetchCreditBalances" | "fetchCreditUserUsage" | "fetchCompany" | "cancelSubscription" | "fetchTaxIds" | "updateTaxId"> & Partial<Pick<BillingClient, "fetchPublicCatalog" | "hasPublishableKey">>;
644
1140
 
645
1141
  declare interface BillingProviderDataProps {
646
1142
  /**
@@ -679,8 +1175,21 @@ declare interface BillingProviderDataProps {
679
1175
  */
680
1176
  export declare type BillingProviderProps = BillingProviderDataProps & SchematicI18nConfig;
681
1177
 
1178
+ /**
1179
+ *
1180
+ * @export
1181
+ */
1182
+ declare const BillingProviderType: {
1183
+ readonly Metronome: "metronome";
1184
+ readonly Orb: "orb";
1185
+ readonly Schematic: "schematic";
1186
+ readonly Stripe: "stripe";
1187
+ };
1188
+
1189
+ declare type BillingProviderType = (typeof BillingProviderType)[keyof typeof BillingProviderType];
1190
+
682
1191
  /** The resources this package serves; a key of schematic-js's contract. */
683
- export declare type BillingResourceName = "invoices" | "upcomingInvoice" | "paymentMethods" | "featureUsage" | "creditBalances" | "company";
1192
+ export declare type BillingResourceName = "catalog" | "publicCatalog" | "invoices" | "upcomingInvoice" | "paymentMethods" | "featureUsage" | "creditBalances" | "company" | "taxIds";
684
1193
 
685
1194
  declare type BillingResourceName_2 = keyof BillingResources_2;
686
1195
 
@@ -688,12 +1197,15 @@ export declare type BillingResourceParams = Pick<BillingResourceParams_2, Billin
688
1197
 
689
1198
  /** `Record<string, never>` marks a singleton; anything else is keyed. */
690
1199
  declare interface BillingResourceParams_2 {
1200
+ catalog: CatalogQuery;
1201
+ publicCatalog: CatalogQuery;
691
1202
  invoices: InvoiceQuery;
692
1203
  upcomingInvoice: Record<string, never>;
693
1204
  paymentMethods: Record<string, never>;
694
1205
  featureUsage: Record<string, never>;
695
1206
  creditBalances: Record<string, never>;
696
1207
  company: Record<string, never>;
1208
+ taxIds: Record<string, never>;
697
1209
  }
698
1210
 
699
1211
  export declare type BillingResources = Pick<BillingResources_2, BillingResourceName>;
@@ -706,6 +1218,17 @@ export declare type BillingResources = Pick<BillingResources_2, BillingResourceN
706
1218
  * session's data keys it by that and serves only the active one.
707
1219
  */
708
1220
  declare interface BillingResources_2 {
1221
+ /**
1222
+ * `GET /catalog/view`, or `GET /catalogs/{catalog_id}/view` for a
1223
+ * `catalogId`: the catalog as the company sees it.
1224
+ */
1225
+ catalog: Catalog;
1226
+ /**
1227
+ * `GET /public/catalog`, or `GET /public/catalogs/{catalog_id}`: the
1228
+ * catalog read with the publishable key. It belongs to no session, so a
1229
+ * session starting, changing or ending leaves it loaded.
1230
+ */
1231
+ publicCatalog: PublicCatalog;
709
1232
  /** `GET /company/invoices?limit&offset&include_pending`. */
710
1233
  invoices: InvoicePage;
711
1234
  /**
@@ -732,8 +1255,36 @@ declare interface BillingResources_2 {
732
1255
  creditBalances: CreditBalanceEntry[];
733
1256
  /** `GET /company`. */
734
1257
  company: Company;
1258
+ /**
1259
+ * `GET /checkout/tax-id`. Empty is a loaded value — the company has none on
1260
+ * file — so only `undefined` means not loaded.
1261
+ */
1262
+ taxIds: TaxId[];
735
1263
  }
736
1264
 
1265
+ /**
1266
+ *
1267
+ * @export
1268
+ */
1269
+ declare const BillingStrategy: {
1270
+ readonly SchematicManaged: "schematic_managed";
1271
+ readonly ProviderManaged: "provider_managed";
1272
+ readonly NoBilling: "no_billing";
1273
+ };
1274
+
1275
+ declare type BillingStrategy = (typeof BillingStrategy)[keyof typeof BillingStrategy];
1276
+
1277
+ /**
1278
+ *
1279
+ * @export
1280
+ */
1281
+ declare const BillingSubscriptionTrialEndSetting: {
1282
+ readonly Cancel: "cancel";
1283
+ readonly Subscribe: "subscribe";
1284
+ };
1285
+
1286
+ declare type BillingSubscriptionTrialEndSetting = (typeof BillingSubscriptionTrialEndSetting)[keyof typeof BillingSubscriptionTrialEndSetting];
1287
+
737
1288
  /**
738
1289
  *
739
1290
  * @export
@@ -747,154 +1298,154 @@ declare type BillingTiersMode = (typeof BillingTiersMode)[keyof typeof BillingTi
747
1298
 
748
1299
  declare type BooleanListenerFn = (value: boolean) => void;
749
1300
 
1301
+ /**
1302
+ * What the company can buy, and how it stands against each of it. What the
1303
+ * server has already decided, so a consumer never re-derives it:
1304
+ *
1305
+ * * On each plan and add-on, `current`, `valid` with its `invalidReason` and
1306
+ * `usageViolations`, and `companyCanTrial`.
1307
+ * * `capabilities.checkout` — whether this company can check out at all.
1308
+ * * `checkoutSettings` — what checkout collects, custom fields included.
1309
+ * * `compatiblePlanIds` on add-ons and bundles — `undefined` means every
1310
+ * plan, and an empty list none.
1311
+ */
1312
+ export declare type Catalog = CompanyCatalogResponseData;
1313
+
1314
+ export declare type CatalogAutoTopup = CatalogAutoTopupResponseData;
1315
+
750
1316
  /**
751
1317
  *
752
1318
  * @export
753
- * @interface CatalogCreditGrantResponseData
1319
+ * @interface CatalogAutoTopupResponseData
754
1320
  */
755
- declare interface CatalogCreditGrantResponseData {
1321
+ declare interface CatalogAutoTopupResponseData {
756
1322
  /**
757
- * Flat credit amount granted to the company regardless of scaling.
1323
+ * Credits bought per top-up, as the plan sets it.
758
1324
  * @type {number}
759
- * @memberof CatalogCreditGrantResponseData
1325
+ * @memberof CatalogAutoTopupResponseData
760
1326
  */
761
- companyCreditAmount: number;
1327
+ amount?: number | null;
762
1328
  /**
763
- * Credits granted; for per_license scaling this is the amount per license unit.
764
- * @type {number}
765
- * @memberof CatalogCreditGrantResponseData
1329
+ * automatic tops up on the plan's settings; user_controlled lets the company choose its own.
1330
+ * @type {BillingCreditAutoTopupAvailability}
1331
+ * @memberof CatalogAutoTopupResponseData
766
1332
  */
767
- creditAmount: number;
1333
+ availability: BillingCreditAutoTopupAvailability;
768
1334
  /**
769
- *
770
- * @type {string}
771
- * @memberof CatalogCreditGrantResponseData
1335
+ * The company's own amount, when it has chosen one.
1336
+ * @type {number}
1337
+ * @memberof CatalogAutoTopupResponseData
772
1338
  */
773
- creditIcon?: string | null;
1339
+ companyAmount?: number | null;
774
1340
  /**
775
- *
776
- * @type {string}
777
- * @memberof CatalogCreditGrantResponseData
1341
+ * Whether the company has turned top-ups on, when it has chosen.
1342
+ * @type {boolean}
1343
+ * @memberof CatalogAutoTopupResponseData
778
1344
  */
779
- creditId: string;
1345
+ companyEnabled?: boolean | null;
780
1346
  /**
781
- *
782
- * @type {string}
783
- * @memberof CatalogCreditGrantResponseData
1347
+ * The company's own threshold, when it has chosen one.
1348
+ * @type {number}
1349
+ * @memberof CatalogAutoTopupResponseData
784
1350
  */
785
- creditName: string;
1351
+ companyThresholdCredits?: number | null;
786
1352
  /**
787
1353
  *
788
1354
  * @type {string}
789
- * @memberof CatalogCreditGrantResponseData
1355
+ * @memberof CatalogAutoTopupResponseData
790
1356
  */
791
- creditPluralName?: string | null;
1357
+ creditId: string;
792
1358
  /**
793
- *
794
- * @type {string}
795
- * @memberof CatalogCreditGrantResponseData
1359
+ * The credit's unit price in each other currency it is sold in.
1360
+ * @type {Array<CatalogBundleCurrencyPriceResponseData>}
1361
+ * @memberof CatalogAutoTopupResponseData
796
1362
  */
797
- creditSingularName?: string | null;
1363
+ currencyPrices: Array<CatalogBundleCurrencyPriceResponseData>;
798
1364
  /**
799
- *
800
- * @type {string}
801
- * @memberof CatalogCreditGrantResponseData
1365
+ * Whether the plan tops up by default.
1366
+ * @type {boolean}
1367
+ * @memberof CatalogAutoTopupResponseData
802
1368
  */
803
- id: string;
1369
+ enabled: boolean;
804
1370
  /**
805
1371
  *
806
1372
  * @type {string}
807
- * @memberof CatalogCreditGrantResponseData
1373
+ * @memberof CatalogAutoTopupResponseData
808
1374
  */
809
- licenseId?: string | null;
1375
+ planCreditGrantId: string;
810
1376
  /**
811
- *
812
- * @type {BillingPlanCreditGrantResetCadence}
813
- * @memberof CatalogCreditGrantResponseData
1377
+ * The balance below which a top-up runs, as the plan sets it.
1378
+ * @type {number}
1379
+ * @memberof CatalogAutoTopupResponseData
814
1380
  */
815
- resetCadence?: BillingPlanCreditGrantResetCadence | null;
1381
+ thresholdCredits?: number | null;
816
1382
  /**
817
- *
818
- * @type {PlanCreditGrantScaling}
819
- * @memberof CatalogCreditGrantResponseData
1383
+ * The credit's price per unit, which a top-up is charged at.
1384
+ * @type {CatalogPriceResponseData}
1385
+ * @memberof CatalogAutoTopupResponseData
820
1386
  */
821
- scaling: PlanCreditGrantScaling;
1387
+ unitPrice?: CatalogPriceResponseData;
822
1388
  }
823
1389
 
824
1390
  /**
825
1391
  *
826
1392
  * @export
827
- * @interface CatalogPriceResponseData
1393
+ * @interface CatalogBundleCurrencyPriceResponseData
828
1394
  */
829
- declare interface CatalogPriceResponseData {
1395
+ declare interface CatalogBundleCurrencyPriceResponseData {
830
1396
  /**
831
1397
  *
832
1398
  * @type {Currency}
833
- * @memberof CatalogPriceResponseData
1399
+ * @memberof CatalogBundleCurrencyPriceResponseData
834
1400
  */
835
1401
  currency: Currency;
836
1402
  /**
837
1403
  *
838
- * @type {string}
839
- * @memberof CatalogPriceResponseData
840
- */
841
- id: string;
842
- /**
843
- *
844
- * @type {BillingProductPriceInterval}
845
- * @memberof CatalogPriceResponseData
846
- */
847
- interval: BillingProductPriceInterval;
848
- /**
849
- *
850
- * @type {number}
851
- * @memberof CatalogPriceResponseData
852
- */
853
- intervalCount: number;
854
- /**
855
- * Per-unit price of the final tier, precomputed for overage display.
856
- * @type {string}
857
- * @memberof CatalogPriceResponseData
858
- */
859
- overageUnitPriceDecimal?: string | null;
860
- /**
861
- * Units covered per priced package; a price of $10 with package_size 1000 charges $10 per 1000 units.
862
- * @type {number}
863
- * @memberof CatalogPriceResponseData
864
- */
865
- packageSize: number;
866
- /**
867
- *
868
- * @type {number}
869
- * @memberof CatalogPriceResponseData
870
- */
871
- price: number;
872
- /**
873
- *
874
- * @type {string}
875
- * @memberof CatalogPriceResponseData
1404
+ * @type {CatalogPriceResponseData}
1405
+ * @memberof CatalogBundleCurrencyPriceResponseData
876
1406
  */
877
- priceDecimal?: string | null;
1407
+ price?: CatalogPriceResponseData;
878
1408
  /**
879
1409
  *
880
- * @type {Array<CatalogPriceTierResponseData>}
881
- * @memberof CatalogPriceResponseData
1410
+ * @type {CatalogPriceResponseData}
1411
+ * @memberof CatalogBundleCurrencyPriceResponseData
882
1412
  */
883
- priceTiers: Array<CatalogPriceTierResponseData>;
1413
+ unitPrice?: CatalogPriceResponseData;
1414
+ }
1415
+
1416
+ /**
1417
+ * Schematic API
1418
+ * Schematic API
1419
+ *
1420
+ * The version of the OpenAPI document: 0.1
1421
+ *
1422
+ *
1423
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1424
+ * https://openapi-generator.tech
1425
+ * Do not edit the class manually.
1426
+ */
1427
+ /**
1428
+ *
1429
+ * @export
1430
+ * @interface CatalogCapabilitiesResponseData
1431
+ */
1432
+ declare interface CatalogCapabilitiesResponseData {
884
1433
  /**
885
- *
886
- * @type {BillingPriceScheme}
887
- * @memberof CatalogPriceResponseData
1434
+ * Whether the consumer may hide the 'powered by Schematic' badge (the account's badge-hideable entitlement); false means the badge must be shown.
1435
+ * @type {boolean}
1436
+ * @memberof CatalogCapabilitiesResponseData
888
1437
  */
889
- scheme: BillingPriceScheme;
1438
+ badgeVisibility: boolean;
890
1439
  /**
891
1440
  *
892
- * @type {BillingTiersMode}
893
- * @memberof CatalogPriceResponseData
1441
+ * @type {boolean}
1442
+ * @memberof CatalogCapabilitiesResponseData
894
1443
  */
895
- tiersMode?: BillingTiersMode | null;
1444
+ checkout: boolean;
896
1445
  }
897
1446
 
1447
+ export declare type CatalogCheckoutField = CatalogCheckoutFieldResponseData;
1448
+
898
1449
  /**
899
1450
  * Schematic API
900
1451
  * Schematic API
@@ -909,277 +1460,2299 @@ declare interface CatalogPriceResponseData {
909
1460
  /**
910
1461
  *
911
1462
  * @export
912
- * @interface CatalogPriceTierResponseData
1463
+ * @interface CatalogCheckoutFieldResponseData
913
1464
  */
914
- declare interface CatalogPriceTierResponseData {
1465
+ declare interface CatalogCheckoutFieldResponseData {
915
1466
  /**
916
1467
  *
917
- * @type {number}
918
- * @memberof CatalogPriceTierResponseData
919
- */
920
- flatPrice?: number | null;
921
- /**
922
- * Lower bound of the tier (inclusive).
923
- * @type {number}
924
- * @memberof CatalogPriceTierResponseData
1468
+ * @type {string}
1469
+ * @memberof CatalogCheckoutFieldResponseData
925
1470
  */
926
- from: number;
1471
+ helperText?: string | null;
927
1472
  /**
928
1473
  *
929
- * @type {number}
930
- * @memberof CatalogPriceTierResponseData
1474
+ * @type {string}
1475
+ * @memberof CatalogCheckoutFieldResponseData
931
1476
  */
932
- perUnitPrice?: number | null;
1477
+ id: string;
933
1478
  /**
934
1479
  *
935
1480
  * @type {string}
936
- * @memberof CatalogPriceTierResponseData
1481
+ * @memberof CatalogCheckoutFieldResponseData
937
1482
  */
938
- perUnitPriceDecimal?: string | null;
1483
+ name: string;
939
1484
  /**
940
- * Upper bound of the tier (inclusive); null means unbounded.
941
- * @type {number}
942
- * @memberof CatalogPriceTierResponseData
1485
+ * A checkout with this field empty is refused with custom_field_required.
1486
+ * @type {boolean}
1487
+ * @memberof CatalogCheckoutFieldResponseData
943
1488
  */
944
- to?: number | null;
1489
+ required: boolean;
1490
+ /**
1491
+ * The company's saved value, when it has one.
1492
+ * @type {string}
1493
+ * @memberof CatalogCheckoutFieldResponseData
1494
+ */
1495
+ value?: string | null;
945
1496
  }
946
1497
 
947
1498
  /**
948
1499
  *
949
1500
  * @export
950
- * @interface CheckFlagResponse
1501
+ * @interface CatalogCheckoutSettingsResponseData
951
1502
  */
952
- declare interface CheckFlagResponse {
1503
+ declare interface CatalogCheckoutSettingsResponseData {
953
1504
  /**
954
1505
  *
955
- * @type {CheckFlagResponseData}
956
- * @memberof CheckFlagResponse
1506
+ * @type {CheckoutBundlePurchaseBehavior}
1507
+ * @memberof CatalogCheckoutSettingsResponseData
957
1508
  */
958
- data: CheckFlagResponseData;
1509
+ bundlePurchaseBehavior: CheckoutBundlePurchaseBehavior;
959
1510
  /**
960
- * Input parameters
961
- * @type {object}
962
- * @memberof CheckFlagResponse
1511
+ *
1512
+ * @type {boolean}
1513
+ * @memberof CatalogCheckoutSettingsResponseData
963
1514
  */
964
- params: object;
965
- }
966
-
967
- /**
968
- *
969
- * @export
970
- * @interface CheckFlagResponseData
971
- */
972
- declare interface CheckFlagResponseData {
1515
+ collectAddress: boolean;
973
1516
  /**
974
- * If company keys were provided and matched a company, its ID
975
- * @type {string}
976
- * @memberof CheckFlagResponseData
1517
+ *
1518
+ * @type {boolean}
1519
+ * @memberof CatalogCheckoutSettingsResponseData
977
1520
  */
978
- companyId?: string | null;
1521
+ collectEmail: boolean;
979
1522
  /**
980
- * If a feature entitlement rule was matched, its entitlement details
981
- * @type {FeatureEntitlement}
982
- * @memberof CheckFlagResponseData
983
- */
1523
+ *
1524
+ * @type {boolean}
1525
+ * @memberof CatalogCheckoutSettingsResponseData
1526
+ */
1527
+ collectPhone: boolean;
1528
+ /**
1529
+ *
1530
+ * @type {boolean}
1531
+ * @memberof CatalogCheckoutSettingsResponseData
1532
+ */
1533
+ collectTaxId: boolean;
1534
+ /**
1535
+ * The custom fields checkout collects; a checkout sends their values as custom_field_values by id.
1536
+ * @type {Array<CatalogCheckoutFieldResponseData>}
1537
+ * @memberof CatalogCheckoutSettingsResponseData
1538
+ */
1539
+ customFields: Array<CatalogCheckoutFieldResponseData>;
1540
+ /**
1541
+ *
1542
+ * @type {ProrationBehavior}
1543
+ * @memberof CatalogCheckoutSettingsResponseData
1544
+ */
1545
+ prorationBehavior: ProrationBehavior;
1546
+ /**
1547
+ *
1548
+ * @type {boolean}
1549
+ * @memberof CatalogCheckoutSettingsResponseData
1550
+ */
1551
+ taxCollectionEnabled: boolean;
1552
+ }
1553
+
1554
+ /**
1555
+ *
1556
+ * @export
1557
+ * @interface CatalogCompanyPlanResponseData
1558
+ */
1559
+ declare interface CatalogCompanyPlanResponseData {
1560
+ /**
1561
+ * The plan's included credits that top up automatically or let the company choose to. Empty for add-ons.
1562
+ * @type {Array<CatalogAutoTopupResponseData>}
1563
+ * @memberof CatalogCompanyPlanResponseData
1564
+ */
1565
+ autoTopups: Array<CatalogAutoTopupResponseData>;
1566
+ /**
1567
+ *
1568
+ * @type {Array<PlanPriceCadence>}
1569
+ * @memberof CatalogCompanyPlanResponseData
1570
+ */
1571
+ availablePeriods: Array<PlanPriceCadence>;
1572
+ /**
1573
+ *
1574
+ * @type {BillingStrategy}
1575
+ * @memberof CatalogCompanyPlanResponseData
1576
+ */
1577
+ billingStrategy: BillingStrategy;
1578
+ /**
1579
+ *
1580
+ * @type {ChargeType}
1581
+ * @memberof CatalogCompanyPlanResponseData
1582
+ */
1583
+ chargeType: ChargeType;
1584
+ /**
1585
+ *
1586
+ * @type {boolean}
1587
+ * @memberof CatalogCompanyPlanResponseData
1588
+ */
1589
+ companyCanTrial: boolean;
1590
+ /**
1591
+ * For add-ons, the plans this add-on may be purchased with. Null means compatible with every plan.
1592
+ * @type {Array<string>}
1593
+ * @memberof CatalogCompanyPlanResponseData
1594
+ */
1595
+ compatiblePlanIds?: Array<string> | null;
1596
+ /**
1597
+ *
1598
+ * @type {Array<CatalogCurrencyPricesResponseData>}
1599
+ * @memberof CatalogCompanyPlanResponseData
1600
+ */
1601
+ currencyPrices: Array<CatalogCurrencyPricesResponseData>;
1602
+ /**
1603
+ *
1604
+ * @type {boolean}
1605
+ * @memberof CatalogCompanyPlanResponseData
1606
+ */
1607
+ current: boolean;
1608
+ /**
1609
+ *
1610
+ * @type {string}
1611
+ * @memberof CatalogCompanyPlanResponseData
1612
+ */
1613
+ description: string;
1614
+ /**
1615
+ *
1616
+ * @type {Array<CatalogPlanEntitlementResponseData>}
1617
+ * @memberof CatalogCompanyPlanResponseData
1618
+ */
1619
+ entitlements: Array<CatalogPlanEntitlementResponseData>;
1620
+ /**
1621
+ *
1622
+ * @type {string}
1623
+ * @memberof CatalogCompanyPlanResponseData
1624
+ */
1625
+ icon: string;
1626
+ /**
1627
+ *
1628
+ * @type {string}
1629
+ * @memberof CatalogCompanyPlanResponseData
1630
+ */
1631
+ id: string;
1632
+ /**
1633
+ *
1634
+ * @type {Array<CatalogCreditGrantResponseData>}
1635
+ * @memberof CatalogCompanyPlanResponseData
1636
+ */
1637
+ includedCreditGrants: Array<CatalogCreditGrantResponseData>;
1638
+ /**
1639
+ *
1640
+ * @type {CompanyPlanInvalidReason}
1641
+ * @memberof CatalogCompanyPlanResponseData
1642
+ */
1643
+ invalidReason?: CompanyPlanInvalidReason | null;
1644
+ /**
1645
+ *
1646
+ * @type {boolean}
1647
+ * @memberof CatalogCompanyPlanResponseData
1648
+ */
1649
+ isTrialable: boolean;
1650
+ /**
1651
+ *
1652
+ * @type {CatalogPriceResponseData}
1653
+ * @memberof CatalogCompanyPlanResponseData
1654
+ */
1655
+ monthlyPrice?: CatalogPriceResponseData;
1656
+ /**
1657
+ *
1658
+ * @type {string}
1659
+ * @memberof CatalogCompanyPlanResponseData
1660
+ */
1661
+ name: string;
1662
+ /**
1663
+ *
1664
+ * @type {CatalogPriceResponseData}
1665
+ * @memberof CatalogCompanyPlanResponseData
1666
+ */
1667
+ oneTimePrice?: CatalogPriceResponseData;
1668
+ /**
1669
+ *
1670
+ * @type {CatalogPriceResponseData}
1671
+ * @memberof CatalogCompanyPlanResponseData
1672
+ */
1673
+ quarterlyPrice?: CatalogPriceResponseData;
1674
+ /**
1675
+ *
1676
+ * @type {number}
1677
+ * @memberof CatalogCompanyPlanResponseData
1678
+ */
1679
+ trialDays?: number | null;
1680
+ /**
1681
+ *
1682
+ * @type {Array<CatalogUsageViolationResponseData>}
1683
+ * @memberof CatalogCompanyPlanResponseData
1684
+ */
1685
+ usageViolations: Array<CatalogUsageViolationResponseData>;
1686
+ /**
1687
+ *
1688
+ * @type {boolean}
1689
+ * @memberof CatalogCompanyPlanResponseData
1690
+ */
1691
+ valid: boolean;
1692
+ /**
1693
+ *
1694
+ * @type {CatalogPriceResponseData}
1695
+ * @memberof CatalogCompanyPlanResponseData
1696
+ */
1697
+ yearlyPrice?: CatalogPriceResponseData;
1698
+ }
1699
+
1700
+ export declare type CatalogCreditBundle = CatalogCreditBundleResponseData;
1701
+
1702
+ /**
1703
+ *
1704
+ * @export
1705
+ * @interface CatalogCreditBundleResponseData
1706
+ */
1707
+ declare interface CatalogCreditBundleResponseData {
1708
+ /**
1709
+ *
1710
+ * @type {BillingCreditBundleType}
1711
+ * @memberof CatalogCreditBundleResponseData
1712
+ */
1713
+ bundleType: BillingCreditBundleType;
1714
+ /**
1715
+ * The plans whose companies may purchase this bundle. Null means compatible with every plan.
1716
+ * @type {Array<string>}
1717
+ * @memberof CatalogCreditBundleResponseData
1718
+ */
1719
+ compatiblePlanIds?: Array<string> | null;
1720
+ /**
1721
+ *
1722
+ * @type {string}
1723
+ * @memberof CatalogCreditBundleResponseData
1724
+ */
1725
+ creditIcon?: string | null;
1726
+ /**
1727
+ *
1728
+ * @type {string}
1729
+ * @memberof CatalogCreditBundleResponseData
1730
+ */
1731
+ creditId: string;
1732
+ /**
1733
+ *
1734
+ * @type {string}
1735
+ * @memberof CatalogCreditBundleResponseData
1736
+ */
1737
+ creditName: string;
1738
+ /**
1739
+ *
1740
+ * @type {string}
1741
+ * @memberof CatalogCreditBundleResponseData
1742
+ */
1743
+ creditPluralName?: string | null;
1744
+ /**
1745
+ *
1746
+ * @type {string}
1747
+ * @memberof CatalogCreditBundleResponseData
1748
+ */
1749
+ creditSingularName?: string | null;
1750
+ /**
1751
+ *
1752
+ * @type {Array<CatalogBundleCurrencyPriceResponseData>}
1753
+ * @memberof CatalogCreditBundleResponseData
1754
+ */
1755
+ currencyPrices: Array<CatalogBundleCurrencyPriceResponseData>;
1756
+ /**
1757
+ *
1758
+ * @type {BillingCreditExpiryType}
1759
+ * @memberof CatalogCreditBundleResponseData
1760
+ */
1761
+ expiryType: BillingCreditExpiryType;
1762
+ /**
1763
+ *
1764
+ * @type {BillingCreditExpiryUnit}
1765
+ * @memberof CatalogCreditBundleResponseData
1766
+ */
1767
+ expiryUnit: BillingCreditExpiryUnit;
1768
+ /**
1769
+ *
1770
+ * @type {number}
1771
+ * @memberof CatalogCreditBundleResponseData
1772
+ */
1773
+ expiryUnitCount?: number | null;
1774
+ /**
1775
+ *
1776
+ * @type {string}
1777
+ * @memberof CatalogCreditBundleResponseData
1778
+ */
1779
+ id: string;
1780
+ /**
1781
+ *
1782
+ * @type {string}
1783
+ * @memberof CatalogCreditBundleResponseData
1784
+ */
1785
+ name: string;
1786
+ /**
1787
+ *
1788
+ * @type {CatalogPriceResponseData}
1789
+ * @memberof CatalogCreditBundleResponseData
1790
+ */
1791
+ price?: CatalogPriceResponseData;
1792
+ /**
1793
+ * Credits granted per purchase; null means the buyer chooses a custom quantity priced via unit_price.
1794
+ * @type {number}
1795
+ * @memberof CatalogCreditBundleResponseData
1796
+ */
1797
+ quantity?: number | null;
1798
+ /**
1799
+ *
1800
+ * @type {CatalogPriceResponseData}
1801
+ * @memberof CatalogCreditBundleResponseData
1802
+ */
1803
+ unitPrice?: CatalogPriceResponseData;
1804
+ }
1805
+
1806
+ /**
1807
+ *
1808
+ * @export
1809
+ * @interface CatalogCreditGrantResponseData
1810
+ */
1811
+ declare interface CatalogCreditGrantResponseData {
1812
+ /**
1813
+ * Flat credit amount granted to the company regardless of scaling.
1814
+ * @type {number}
1815
+ * @memberof CatalogCreditGrantResponseData
1816
+ */
1817
+ companyCreditAmount: number;
1818
+ /**
1819
+ * Credits granted; for per_license scaling this is the amount per license unit.
1820
+ * @type {number}
1821
+ * @memberof CatalogCreditGrantResponseData
1822
+ */
1823
+ creditAmount: number;
1824
+ /**
1825
+ *
1826
+ * @type {string}
1827
+ * @memberof CatalogCreditGrantResponseData
1828
+ */
1829
+ creditIcon?: string | null;
1830
+ /**
1831
+ *
1832
+ * @type {string}
1833
+ * @memberof CatalogCreditGrantResponseData
1834
+ */
1835
+ creditId: string;
1836
+ /**
1837
+ *
1838
+ * @type {string}
1839
+ * @memberof CatalogCreditGrantResponseData
1840
+ */
1841
+ creditName: string;
1842
+ /**
1843
+ *
1844
+ * @type {string}
1845
+ * @memberof CatalogCreditGrantResponseData
1846
+ */
1847
+ creditPluralName?: string | null;
1848
+ /**
1849
+ *
1850
+ * @type {string}
1851
+ * @memberof CatalogCreditGrantResponseData
1852
+ */
1853
+ creditSingularName?: string | null;
1854
+ /**
1855
+ *
1856
+ * @type {string}
1857
+ * @memberof CatalogCreditGrantResponseData
1858
+ */
1859
+ id: string;
1860
+ /**
1861
+ *
1862
+ * @type {string}
1863
+ * @memberof CatalogCreditGrantResponseData
1864
+ */
1865
+ licenseId?: string | null;
1866
+ /**
1867
+ *
1868
+ * @type {BillingPlanCreditGrantResetCadence}
1869
+ * @memberof CatalogCreditGrantResponseData
1870
+ */
1871
+ resetCadence?: BillingPlanCreditGrantResetCadence | null;
1872
+ /**
1873
+ *
1874
+ * @type {PlanCreditGrantScaling}
1875
+ * @memberof CatalogCreditGrantResponseData
1876
+ */
1877
+ scaling: PlanCreditGrantScaling;
1878
+ /**
1879
+ * Whether the catalog shows this credit on the plan. Display-only: a hidden grant is still granted and priced at checkout.
1880
+ * @type {boolean}
1881
+ * @memberof CatalogCreditGrantResponseData
1882
+ */
1883
+ visible: boolean;
1884
+ }
1885
+
1886
+ /**
1887
+ *
1888
+ * @export
1889
+ * @interface CatalogCurrencyPricesResponseData
1890
+ */
1891
+ declare interface CatalogCurrencyPricesResponseData {
1892
+ /**
1893
+ *
1894
+ * @type {Currency}
1895
+ * @memberof CatalogCurrencyPricesResponseData
1896
+ */
1897
+ currency: Currency;
1898
+ /**
1899
+ *
1900
+ * @type {CatalogPriceResponseData}
1901
+ * @memberof CatalogCurrencyPricesResponseData
1902
+ */
1903
+ monthlyPrice?: CatalogPriceResponseData;
1904
+ /**
1905
+ *
1906
+ * @type {CatalogPriceResponseData}
1907
+ * @memberof CatalogCurrencyPricesResponseData
1908
+ */
1909
+ oneTimePrice?: CatalogPriceResponseData;
1910
+ /**
1911
+ *
1912
+ * @type {CatalogPriceResponseData}
1913
+ * @memberof CatalogCurrencyPricesResponseData
1914
+ */
1915
+ quarterlyPrice?: CatalogPriceResponseData;
1916
+ /**
1917
+ *
1918
+ * @type {CatalogPriceResponseData}
1919
+ * @memberof CatalogCurrencyPricesResponseData
1920
+ */
1921
+ yearlyPrice?: CatalogPriceResponseData;
1922
+ }
1923
+
1924
+ /**
1925
+ * Schematic API
1926
+ * Schematic API
1927
+ *
1928
+ * The version of the OpenAPI document: 0.1
1929
+ *
1930
+ *
1931
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1932
+ * https://openapi-generator.tech
1933
+ * Do not edit the class manually.
1934
+ */
1935
+ /**
1936
+ *
1937
+ * @export
1938
+ * @interface CatalogCustomPlanCTAResponseData
1939
+ */
1940
+ declare interface CatalogCustomPlanCTAResponseData {
1941
+ /**
1942
+ *
1943
+ * @type {string}
1944
+ * @memberof CatalogCustomPlanCTAResponseData
1945
+ */
1946
+ ctaText?: string | null;
1947
+ /**
1948
+ *
1949
+ * @type {string}
1950
+ * @memberof CatalogCustomPlanCTAResponseData
1951
+ */
1952
+ ctaUrl?: string | null;
1953
+ /**
1954
+ *
1955
+ * @type {string}
1956
+ * @memberof CatalogCustomPlanCTAResponseData
1957
+ */
1958
+ priceText?: string | null;
1959
+ }
1960
+
1961
+ export declare type CatalogEntitlement = CatalogPlanEntitlementResponseData;
1962
+
1963
+ export declare type CatalogPlan = CatalogCompanyPlanResponseData;
1964
+
1965
+ /**
1966
+ *
1967
+ * @export
1968
+ * @interface CatalogPlanEntitlementResponseData
1969
+ */
1970
+ declare interface CatalogPlanEntitlementResponseData {
1971
+ /**
1972
+ * Credits consumed per unit of usage, for credit-burndown entitlements.
1973
+ * @type {number}
1974
+ * @memberof CatalogPlanEntitlementResponseData
1975
+ */
1976
+ consumptionRate?: number | null;
1977
+ /**
1978
+ * How many units of usage the plan's fixed included credit grants cover (⌊granted credits ÷ consumption rate⌋). Null when there is no fixed grant or the grant scales per license.
1979
+ * @type {number}
1980
+ * @memberof CatalogPlanEntitlementResponseData
1981
+ */
1982
+ creditEquivalentLimit?: number | null;
1983
+ /**
1984
+ *
1985
+ * @type {string}
1986
+ * @memberof CatalogPlanEntitlementResponseData
1987
+ */
1988
+ creditIcon?: string | null;
1989
+ /**
1990
+ *
1991
+ * @type {string}
1992
+ * @memberof CatalogPlanEntitlementResponseData
1993
+ */
1994
+ creditId?: string | null;
1995
+ /**
1996
+ *
1997
+ * @type {string}
1998
+ * @memberof CatalogPlanEntitlementResponseData
1999
+ */
2000
+ creditName?: string | null;
2001
+ /**
2002
+ *
2003
+ * @type {string}
2004
+ * @memberof CatalogPlanEntitlementResponseData
2005
+ */
2006
+ creditPluralName?: string | null;
2007
+ /**
2008
+ *
2009
+ * @type {string}
2010
+ * @memberof CatalogPlanEntitlementResponseData
2011
+ */
2012
+ creditSingularName?: string | null;
2013
+ /**
2014
+ *
2015
+ * @type {Array<CatalogCurrencyPricesResponseData>}
2016
+ * @memberof CatalogPlanEntitlementResponseData
2017
+ */
2018
+ currencyPrices: Array<CatalogCurrencyPricesResponseData>;
2019
+ /**
2020
+ *
2021
+ * @type {string}
2022
+ * @memberof CatalogPlanEntitlementResponseData
2023
+ */
2024
+ featureDescription: string;
2025
+ /**
2026
+ *
2027
+ * @type {string}
2028
+ * @memberof CatalogPlanEntitlementResponseData
2029
+ */
2030
+ featureIcon: string;
2031
+ /**
2032
+ *
2033
+ * @type {string}
2034
+ * @memberof CatalogPlanEntitlementResponseData
2035
+ */
2036
+ featureId: string;
2037
+ /**
2038
+ *
2039
+ * @type {string}
2040
+ * @memberof CatalogPlanEntitlementResponseData
2041
+ */
2042
+ featureName: string;
2043
+ /**
2044
+ *
2045
+ * @type {string}
2046
+ * @memberof CatalogPlanEntitlementResponseData
2047
+ */
2048
+ featurePluralName?: string | null;
2049
+ /**
2050
+ *
2051
+ * @type {string}
2052
+ * @memberof CatalogPlanEntitlementResponseData
2053
+ */
2054
+ featureSingularName?: string | null;
2055
+ /**
2056
+ *
2057
+ * @type {FeatureType}
2058
+ * @memberof CatalogPlanEntitlementResponseData
2059
+ */
2060
+ featureType: FeatureType;
2061
+ /**
2062
+ *
2063
+ * @type {string}
2064
+ * @memberof CatalogPlanEntitlementResponseData
2065
+ */
2066
+ id: string;
2067
+ /**
2068
+ *
2069
+ * @type {string}
2070
+ * @memberof CatalogPlanEntitlementResponseData
2071
+ */
2072
+ licenseId?: string | null;
2073
+ /**
2074
+ *
2075
+ * @type {CatalogPriceResponseData}
2076
+ * @memberof CatalogPlanEntitlementResponseData
2077
+ */
2078
+ meteredMonthlyPrice?: CatalogPriceResponseData;
2079
+ /**
2080
+ *
2081
+ * @type {CatalogPriceResponseData}
2082
+ * @memberof CatalogPlanEntitlementResponseData
2083
+ */
2084
+ meteredQuarterlyPrice?: CatalogPriceResponseData;
2085
+ /**
2086
+ *
2087
+ * @type {CatalogPriceResponseData}
2088
+ * @memberof CatalogPlanEntitlementResponseData
2089
+ */
2090
+ meteredYearlyPrice?: CatalogPriceResponseData;
2091
+ /**
2092
+ *
2093
+ * @type {MetricPeriod}
2094
+ * @memberof CatalogPlanEntitlementResponseData
2095
+ */
2096
+ metricPeriod?: MetricPeriod_2 | null;
2097
+ /**
2098
+ *
2099
+ * @type {MetricPeriodMonthReset}
2100
+ * @memberof CatalogPlanEntitlementResponseData
2101
+ */
2102
+ metricPeriodMonthReset?: MetricPeriodMonthReset_2 | null;
2103
+ /**
2104
+ *
2105
+ * @type {EntitlementPriceBehavior}
2106
+ * @memberof CatalogPlanEntitlementResponseData
2107
+ */
2108
+ priceBehavior?: EntitlementPriceBehavior | null;
2109
+ /**
2110
+ *
2111
+ * @type {number}
2112
+ * @memberof CatalogPlanEntitlementResponseData
2113
+ */
2114
+ softLimit?: number | null;
2115
+ /**
2116
+ *
2117
+ * @type {boolean}
2118
+ * @memberof CatalogPlanEntitlementResponseData
2119
+ */
2120
+ valueBool?: boolean | null;
2121
+ /**
2122
+ *
2123
+ * @type {number}
2124
+ * @memberof CatalogPlanEntitlementResponseData
2125
+ */
2126
+ valueNumeric?: number | null;
2127
+ /**
2128
+ *
2129
+ * @type {EntitlementValueType}
2130
+ * @memberof CatalogPlanEntitlementResponseData
2131
+ */
2132
+ valueType: EntitlementValueType_2;
2133
+ /**
2134
+ * The default warning-tier value, when configured.
2135
+ * @type {number}
2136
+ * @memberof CatalogPlanEntitlementResponseData
2137
+ */
2138
+ warningThreshold?: number | null;
2139
+ }
2140
+
2141
+ /**
2142
+ * Schematic API
2143
+ * Schematic API
2144
+ *
2145
+ * The version of the OpenAPI document: 0.1
2146
+ *
2147
+ *
2148
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2149
+ * https://openapi-generator.tech
2150
+ * Do not edit the class manually.
2151
+ */
2152
+ /**
2153
+ *
2154
+ * @export
2155
+ * @interface CatalogPlanRefResponseData
2156
+ */
2157
+ declare interface CatalogPlanRefResponseData {
2158
+ /**
2159
+ *
2160
+ * @type {string}
2161
+ * @memberof CatalogPlanRefResponseData
2162
+ */
2163
+ id: string;
2164
+ /**
2165
+ *
2166
+ * @type {string}
2167
+ * @memberof CatalogPlanRefResponseData
2168
+ */
2169
+ name: string;
2170
+ }
2171
+
2172
+ /**
2173
+ *
2174
+ * @export
2175
+ * @interface CatalogPlanResponseData
2176
+ */
2177
+ declare interface CatalogPlanResponseData {
2178
+ /**
2179
+ *
2180
+ * @type {Array<PlanPriceCadence>}
2181
+ * @memberof CatalogPlanResponseData
2182
+ */
2183
+ availablePeriods: Array<PlanPriceCadence>;
2184
+ /**
2185
+ *
2186
+ * @type {BillingStrategy}
2187
+ * @memberof CatalogPlanResponseData
2188
+ */
2189
+ billingStrategy: BillingStrategy;
2190
+ /**
2191
+ *
2192
+ * @type {ChargeType}
2193
+ * @memberof CatalogPlanResponseData
2194
+ */
2195
+ chargeType: ChargeType;
2196
+ /**
2197
+ * For add-ons, the plans this add-on may be purchased with. Null means compatible with every plan.
2198
+ * @type {Array<string>}
2199
+ * @memberof CatalogPlanResponseData
2200
+ */
2201
+ compatiblePlanIds?: Array<string> | null;
2202
+ /**
2203
+ *
2204
+ * @type {Array<CatalogCurrencyPricesResponseData>}
2205
+ * @memberof CatalogPlanResponseData
2206
+ */
2207
+ currencyPrices: Array<CatalogCurrencyPricesResponseData>;
2208
+ /**
2209
+ *
2210
+ * @type {string}
2211
+ * @memberof CatalogPlanResponseData
2212
+ */
2213
+ description: string;
2214
+ /**
2215
+ *
2216
+ * @type {Array<CatalogPlanEntitlementResponseData>}
2217
+ * @memberof CatalogPlanResponseData
2218
+ */
2219
+ entitlements: Array<CatalogPlanEntitlementResponseData>;
2220
+ /**
2221
+ *
2222
+ * @type {string}
2223
+ * @memberof CatalogPlanResponseData
2224
+ */
2225
+ icon: string;
2226
+ /**
2227
+ *
2228
+ * @type {string}
2229
+ * @memberof CatalogPlanResponseData
2230
+ */
2231
+ id: string;
2232
+ /**
2233
+ *
2234
+ * @type {Array<CatalogCreditGrantResponseData>}
2235
+ * @memberof CatalogPlanResponseData
2236
+ */
2237
+ includedCreditGrants: Array<CatalogCreditGrantResponseData>;
2238
+ /**
2239
+ *
2240
+ * @type {boolean}
2241
+ * @memberof CatalogPlanResponseData
2242
+ */
2243
+ isTrialable: boolean;
2244
+ /**
2245
+ *
2246
+ * @type {CatalogPriceResponseData}
2247
+ * @memberof CatalogPlanResponseData
2248
+ */
2249
+ monthlyPrice?: CatalogPriceResponseData;
2250
+ /**
2251
+ *
2252
+ * @type {string}
2253
+ * @memberof CatalogPlanResponseData
2254
+ */
2255
+ name: string;
2256
+ /**
2257
+ *
2258
+ * @type {CatalogPriceResponseData}
2259
+ * @memberof CatalogPlanResponseData
2260
+ */
2261
+ oneTimePrice?: CatalogPriceResponseData;
2262
+ /**
2263
+ *
2264
+ * @type {CatalogPriceResponseData}
2265
+ * @memberof CatalogPlanResponseData
2266
+ */
2267
+ quarterlyPrice?: CatalogPriceResponseData;
2268
+ /**
2269
+ *
2270
+ * @type {number}
2271
+ * @memberof CatalogPlanResponseData
2272
+ */
2273
+ trialDays?: number | null;
2274
+ /**
2275
+ *
2276
+ * @type {CatalogPriceResponseData}
2277
+ * @memberof CatalogPlanResponseData
2278
+ */
2279
+ yearlyPrice?: CatalogPriceResponseData;
2280
+ }
2281
+
2282
+ /**
2283
+ *
2284
+ * @export
2285
+ * @interface CatalogPriceResponseData
2286
+ */
2287
+ declare interface CatalogPriceResponseData {
2288
+ /**
2289
+ *
2290
+ * @type {Currency}
2291
+ * @memberof CatalogPriceResponseData
2292
+ */
2293
+ currency: Currency;
2294
+ /**
2295
+ *
2296
+ * @type {string}
2297
+ * @memberof CatalogPriceResponseData
2298
+ */
2299
+ id: string;
2300
+ /**
2301
+ *
2302
+ * @type {BillingProductPriceInterval}
2303
+ * @memberof CatalogPriceResponseData
2304
+ */
2305
+ interval: BillingProductPriceInterval;
2306
+ /**
2307
+ *
2308
+ * @type {number}
2309
+ * @memberof CatalogPriceResponseData
2310
+ */
2311
+ intervalCount: number;
2312
+ /**
2313
+ * Per-unit price of the final tier, precomputed for overage display.
2314
+ * @type {string}
2315
+ * @memberof CatalogPriceResponseData
2316
+ */
2317
+ overageUnitPriceDecimal?: string | null;
2318
+ /**
2319
+ * Units covered per priced package; a price of $10 with package_size 1000 charges $10 per 1000 units.
2320
+ * @type {number}
2321
+ * @memberof CatalogPriceResponseData
2322
+ */
2323
+ packageSize: number;
2324
+ /**
2325
+ *
2326
+ * @type {number}
2327
+ * @memberof CatalogPriceResponseData
2328
+ */
2329
+ price: number;
2330
+ /**
2331
+ *
2332
+ * @type {string}
2333
+ * @memberof CatalogPriceResponseData
2334
+ */
2335
+ priceDecimal?: string | null;
2336
+ /**
2337
+ *
2338
+ * @type {Array<CatalogPriceTierResponseData>}
2339
+ * @memberof CatalogPriceResponseData
2340
+ */
2341
+ priceTiers: Array<CatalogPriceTierResponseData>;
2342
+ /**
2343
+ *
2344
+ * @type {BillingPriceScheme}
2345
+ * @memberof CatalogPriceResponseData
2346
+ */
2347
+ scheme: BillingPriceScheme;
2348
+ /**
2349
+ *
2350
+ * @type {BillingTiersMode}
2351
+ * @memberof CatalogPriceResponseData
2352
+ */
2353
+ tiersMode?: BillingTiersMode | null;
2354
+ }
2355
+
2356
+ /**
2357
+ * Schematic API
2358
+ * Schematic API
2359
+ *
2360
+ * The version of the OpenAPI document: 0.1
2361
+ *
2362
+ *
2363
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2364
+ * https://openapi-generator.tech
2365
+ * Do not edit the class manually.
2366
+ */
2367
+ /**
2368
+ *
2369
+ * @export
2370
+ * @interface CatalogPriceTierResponseData
2371
+ */
2372
+ declare interface CatalogPriceTierResponseData {
2373
+ /**
2374
+ *
2375
+ * @type {number}
2376
+ * @memberof CatalogPriceTierResponseData
2377
+ */
2378
+ flatPrice?: number | null;
2379
+ /**
2380
+ * Lower bound of the tier (inclusive).
2381
+ * @type {number}
2382
+ * @memberof CatalogPriceTierResponseData
2383
+ */
2384
+ from: number;
2385
+ /**
2386
+ *
2387
+ * @type {number}
2388
+ * @memberof CatalogPriceTierResponseData
2389
+ */
2390
+ perUnitPrice?: number | null;
2391
+ /**
2392
+ *
2393
+ * @type {string}
2394
+ * @memberof CatalogPriceTierResponseData
2395
+ */
2396
+ perUnitPriceDecimal?: string | null;
2397
+ /**
2398
+ * Upper bound of the tier (inclusive); null means unbounded.
2399
+ * @type {number}
2400
+ * @memberof CatalogPriceTierResponseData
2401
+ */
2402
+ to?: number | null;
2403
+ }
2404
+
2405
+ /** Each catalog is its own resource; none names the environment's own. */
2406
+ export declare interface CatalogQuery {
2407
+ catalogId?: string;
2408
+ }
2409
+
2410
+ /** Which catalog `useCatalog` reads: `catalog` or `publicCatalog`. */
2411
+ export declare type CatalogSource = CatalogView["source"];
2412
+
2413
+ /**
2414
+ * Schematic API
2415
+ * Schematic API
2416
+ *
2417
+ * The version of the OpenAPI document: 0.1
2418
+ *
2419
+ *
2420
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2421
+ * https://openapi-generator.tech
2422
+ * Do not edit the class manually.
2423
+ */
2424
+ /**
2425
+ *
2426
+ * @export
2427
+ * @interface CatalogUsageViolationResponseData
2428
+ */
2429
+ declare interface CatalogUsageViolationResponseData {
2430
+ /**
2431
+ *
2432
+ * @type {string}
2433
+ * @memberof CatalogUsageViolationResponseData
2434
+ */
2435
+ featureId: string;
2436
+ /**
2437
+ *
2438
+ * @type {string}
2439
+ * @memberof CatalogUsageViolationResponseData
2440
+ */
2441
+ featureName: string;
2442
+ /**
2443
+ * The limit the target plan would impose; null means unlimited.
2444
+ * @type {number}
2445
+ * @memberof CatalogUsageViolationResponseData
2446
+ */
2447
+ limit?: number | null;
2448
+ /**
2449
+ *
2450
+ * @type {number}
2451
+ * @memberof CatalogUsageViolationResponseData
2452
+ */
2453
+ usage: number;
2454
+ }
2455
+
2456
+ /**
2457
+ * A catalog as whoever is reading it sees it. Tagged rather than merged: a
2458
+ * public plan is not one the company has no standing against, and filling
2459
+ * `valid` in for it would say something the server did not.
2460
+ */
2461
+ export declare type CatalogView = {
2462
+ source: "company";
2463
+ catalog: Catalog;
2464
+ } | {
2465
+ source: "public";
2466
+ catalog: PublicCatalog;
2467
+ };
2468
+
2469
+ /**
2470
+ *
2471
+ * @export
2472
+ */
2473
+ declare const ChargeType: {
2474
+ readonly Free: "free";
2475
+ readonly None: "none";
2476
+ readonly OneTime: "one_time";
2477
+ readonly Recurring: "recurring";
2478
+ };
2479
+
2480
+ declare type ChargeType = (typeof ChargeType)[keyof typeof ChargeType];
2481
+
2482
+ /**
2483
+ *
2484
+ * @export
2485
+ * @interface CheckFlagResponse
2486
+ */
2487
+ declare interface CheckFlagResponse {
2488
+ /**
2489
+ *
2490
+ * @type {CheckFlagResponseData}
2491
+ * @memberof CheckFlagResponse
2492
+ */
2493
+ data: CheckFlagResponseData;
2494
+ /**
2495
+ * Input parameters
2496
+ * @type {object}
2497
+ * @memberof CheckFlagResponse
2498
+ */
2499
+ params: object;
2500
+ }
2501
+
2502
+ /**
2503
+ *
2504
+ * @export
2505
+ * @interface CheckFlagResponseData
2506
+ */
2507
+ declare interface CheckFlagResponseData {
2508
+ /**
2509
+ * If company keys were provided and matched a company, its ID
2510
+ * @type {string}
2511
+ * @memberof CheckFlagResponseData
2512
+ */
2513
+ companyId?: string | null;
2514
+ /**
2515
+ * If a feature entitlement rule was matched, its entitlement details
2516
+ * @type {FeatureEntitlement}
2517
+ * @memberof CheckFlagResponseData
2518
+ */
984
2519
  entitlement?: FeatureEntitlement;
985
2520
  /**
986
- * If an error occurred while checking the flag, the error message
2521
+ * If an error occurred while checking the flag, the error message
2522
+ * @type {string}
2523
+ * @memberof CheckFlagResponseData
2524
+ */
2525
+ error?: string | null;
2526
+ /**
2527
+ * Deprecated: Use Entitlement.Allocation instead.
2528
+ * @type {number}
2529
+ * @memberof CheckFlagResponseData
2530
+ * @deprecated
2531
+ */
2532
+ featureAllocation?: number | null;
2533
+ /**
2534
+ * Deprecated: Use Entitlement.Usage instead.
2535
+ * @type {number}
2536
+ * @memberof CheckFlagResponseData
2537
+ * @deprecated
2538
+ */
2539
+ featureUsage?: number | null;
2540
+ /**
2541
+ * Deprecated: Use Entitlement.EventName instead.
2542
+ * @type {string}
2543
+ * @memberof CheckFlagResponseData
2544
+ * @deprecated
2545
+ */
2546
+ featureUsageEvent?: string | null;
2547
+ /**
2548
+ * Deprecated: Use Entitlement.MetricPeriod instead.
2549
+ * @type {MetricPeriod}
2550
+ * @memberof CheckFlagResponseData
2551
+ * @deprecated
2552
+ */
2553
+ featureUsagePeriod?: MetricPeriod | null;
2554
+ /**
2555
+ * Deprecated: Use Entitlement.MetricResetAt instead.
2556
+ * @type {Date}
2557
+ * @memberof CheckFlagResponseData
2558
+ * @deprecated
2559
+ */
2560
+ featureUsageResetAt?: Date | null;
2561
+ /**
2562
+ * The key used to check the flag
2563
+ * @type {string}
2564
+ * @memberof CheckFlagResponseData
2565
+ */
2566
+ flag: string;
2567
+ /**
2568
+ * If a flag was found, its ID
2569
+ * @type {string}
2570
+ * @memberof CheckFlagResponseData
2571
+ */
2572
+ flagId?: string | null;
2573
+ /**
2574
+ * A human-readable explanation of the result
2575
+ * @type {string}
2576
+ * @memberof CheckFlagResponseData
2577
+ */
2578
+ reason: string;
2579
+ /**
2580
+ * If a rule was found, its ID
2581
+ * @type {string}
2582
+ * @memberof CheckFlagResponseData
2583
+ */
2584
+ ruleId?: string | null;
2585
+ /**
2586
+ * If a rule was found, its type
2587
+ * @type {RuleType}
2588
+ * @memberof CheckFlagResponseData
2589
+ */
2590
+ ruleType?: RuleType_2 | null;
2591
+ /**
2592
+ * If user keys were provided and matched a user, its ID
2593
+ * @type {string}
2594
+ * @memberof CheckFlagResponseData
2595
+ */
2596
+ userId?: string | null;
2597
+ /**
2598
+ * A boolean flag check result; for feature entitlements, this represents whether further consumption of the feature is permitted
2599
+ * @type {boolean}
2600
+ * @memberof CheckFlagResponseData
2601
+ */
2602
+ value: boolean;
2603
+ }
2604
+
2605
+ declare function CheckFlagResponseFromJSON(json: any): CheckFlagResponse;
2606
+
2607
+ export declare type CheckFlagReturn = {
2608
+ /** The company has access to the feature, but has exceeded the usage limit */
2609
+ featureUsageExceeded?: boolean;
2610
+ /** If company keys were provided and matched a company, its ID */
2611
+ companyId?: string;
2612
+ /** If the company has a credit-based entitlement for this feature, the ID of the credit */
2613
+ creditId?: string;
2614
+ /** If the company has a credit-based entitlement for this feature, the credit available to fund new consumption excluding any open lease hold (the value lease-holding SDKs gate on) */
2615
+ creditRemaining?: number;
2616
+ /** If the company has a credit-based entitlement for this feature, the unspent amount held by an open credit lease, 0 when none is open */
2617
+ creditReserved?: number;
2618
+ /** If the company has a credit-based entitlement for this feature, the spendable balance including any open lease hold (creditRemaining + creditReserved); the number to display to end users */
2619
+ creditSettled?: number;
2620
+ /** If an error occurred while checking the flag, the error message */
2621
+ error?: string;
2622
+ /** If a numeric feature entitlement rule was matched, its allocation */
2623
+ featureAllocation?: number;
2624
+ /** If a numeric feature entitlement rule was matched, the company's usage */
2625
+ featureUsage?: number;
2626
+ /** Event representing the feature usage */
2627
+ featureUsageEvent?: string;
2628
+ /** For event-based feature entitlement rules, the period over which usage is tracked (current_month, current_day, current_week, all_time) */
2629
+ featureUsagePeriod?: UsagePeriod;
2630
+ /** For event-based feature entitlement rules, when the usage period will reset */
2631
+ featureUsageResetAt?: Date;
2632
+ /** The key used to check the flag */
2633
+ flag: string;
2634
+ /** If a flag was found, its ID */
2635
+ flagId?: string;
2636
+ /** A human-readable explanation of the result */
2637
+ reason: string;
2638
+ /** If a rule was found, its ID */
2639
+ ruleId?: string;
2640
+ /** If a rule was found, its type */
2641
+ ruleType?: RuleType;
2642
+ /** For usage-based pricing, the soft limit for overage charges or the next tier boundary */
2643
+ softLimit?: number;
2644
+ /** If user keys were provided and matched a user, its ID */
2645
+ userId?: string;
2646
+ /** A boolean flag check result; for feature entitlements, this represents whether further consumption of the feature is permitted */
2647
+ value: boolean;
2648
+ /** Customer-defined usage warning thresholds configured on this entitlement */
2649
+ warningTiers?: WarningTier[];
2650
+ };
2651
+
2652
+ declare const CheckFlagReturnFromJSON: (json: any) => CheckFlagReturn;
2653
+
2654
+ declare type CheckFlagReturnListenerFn = (value: CheckFlagReturn) => void;
2655
+
2656
+ /**
2657
+ *
2658
+ * @export
2659
+ * @interface CheckFlagsResponse
2660
+ */
2661
+ declare interface CheckFlagsResponse {
2662
+ /**
2663
+ *
2664
+ * @type {CheckFlagsResponseData}
2665
+ * @memberof CheckFlagsResponse
2666
+ */
2667
+ data: CheckFlagsResponseData;
2668
+ /**
2669
+ * Input parameters
2670
+ * @type {object}
2671
+ * @memberof CheckFlagsResponse
2672
+ */
2673
+ params: object;
2674
+ }
2675
+
2676
+ /**
2677
+ *
2678
+ * @export
2679
+ * @interface CheckFlagsResponseData
2680
+ */
2681
+ declare interface CheckFlagsResponseData {
2682
+ /**
2683
+ * Lease-aware credit balances keyed by credit ID, covering every credit type the company holds a balance in
2684
+ * @type {{ [key: string]: CompanyCreditBalance; }}
2685
+ * @memberof CheckFlagsResponseData
2686
+ */
2687
+ creditBalances?: {
2688
+ [key: string]: CompanyCreditBalance;
2689
+ };
2690
+ /**
2691
+ * Credit spend policies binding the evaluated company and user; empty when none bind. Each response carries the whole set, so replace any previously received set with it. Advisory: the flag values do not reflect them, since a check names no draw amount
2692
+ * @type {Array<CreditSpendPolicy>}
2693
+ * @memberof CheckFlagsResponseData
2694
+ */
2695
+ creditSpendPolicies: Array<CreditSpendPolicy_2>;
2696
+ /**
2697
+ *
2698
+ * @type {Array<CheckFlagResponseData>}
2699
+ * @memberof CheckFlagsResponseData
2700
+ */
2701
+ flags: Array<CheckFlagResponseData>;
2702
+ /**
2703
+ *
2704
+ * @type {DatastreamCompanyPlan}
2705
+ * @memberof CheckFlagsResponseData
2706
+ */
2707
+ plan?: DatastreamCompanyPlan;
2708
+ }
2709
+
2710
+ declare function CheckFlagsResponseFromJSON(json: any): CheckFlagsResponse;
2711
+
2712
+ declare type CheckOptions = {
2713
+ context?: SchematicContext;
2714
+ fallback?: boolean;
2715
+ key: string;
2716
+ };
2717
+
2718
+ /**
2719
+ * One checkout as the server holds it: its `selections`, the `version` a
2720
+ * write must name, the price it was last priced at (`priceSnapshot`, absent
2721
+ * until the cart is priceable), and what is wrong with it (`problems`).
2722
+ */
2723
+ export declare type Checkout = CheckoutDraftResponseData;
2724
+
2725
+ /** The header a checkout's session rides in, both ways. */
2726
+ declare const CHECKOUT_SESSION_HEADER = "X-Checkout-Session-ID";
2727
+
2728
+ /**
2729
+ *
2730
+ * @export
2731
+ */
2732
+ declare const CheckoutBundlePurchaseBehavior: {
2733
+ readonly Individual: "individual";
2734
+ readonly Quantity: "quantity";
2735
+ };
2736
+
2737
+ declare type CheckoutBundlePurchaseBehavior = (typeof CheckoutBundlePurchaseBehavior)[keyof typeof CheckoutBundlePurchaseBehavior];
2738
+
2739
+ /**
2740
+ *
2741
+ * @export
2742
+ */
2743
+ declare const CheckoutChargeTiming: {
2744
+ readonly AtRenewal: "at_renewal";
2745
+ readonly None: "none";
2746
+ readonly Now: "now";
2747
+ };
2748
+
2749
+ declare type CheckoutChargeTiming = (typeof CheckoutChargeTiming)[keyof typeof CheckoutChargeTiming];
2750
+
2751
+ /**
2752
+ * One write at a time: each needs the version the last answered with. A
2753
+ * write asked for while one is out waits, and a newer one replaces it and
2754
+ * answers everybody waiting on it.
2755
+ */
2756
+ export declare class CheckoutDraft {
2757
+ private readonly transport;
2758
+ private readonly listeners;
2759
+ private _state;
2760
+ private checkoutId;
2761
+ private version;
2762
+ private sessionId;
2763
+ /** Bumped by reset, so an answer for a discarded draft lands nowhere. */
2764
+ private generation;
2765
+ private inFlight;
2766
+ private queued;
2767
+ constructor(transport: CheckoutTransport, options?: CheckoutDraftOptions);
2768
+ /**
2769
+ * Starts over whenever the session changes to somebody else: another
2770
+ * reader's cart is not this one's to finalize. Returns the unsubscribe.
2771
+ */
2772
+ watchSession(onSessionChange: BillingClient["onSessionChange"]): () => void;
2773
+ get state(): CheckoutDraftState;
2774
+ subscribe(listener: () => void): () => void;
2775
+ /**
2776
+ * Reads the checkout this draft was opened on, for a resume. A draft with
2777
+ * no checkout yet has nothing to read.
2778
+ */
2779
+ load(): Promise<Checkout | undefined>;
2780
+ /**
2781
+ * Replaces the cart and re-prices it. Resolves with the checkout the write
2782
+ * that carried this cart left — a later cart's, when a newer call replaced
2783
+ * it before it was sent — or `undefined` when the draft was reset first.
2784
+ */
2785
+ setSelections(selections: CheckoutSelections): Promise<Checkout | undefined>;
2786
+ /**
2787
+ * Charges the checkout at the version the last write left, once every
2788
+ * write asked for has landed. A refusal on the cart's problems puts them on
2789
+ * the state and rejects; so does anything else.
2790
+ */
2791
+ finalize(): Promise<CheckoutResult>;
2792
+ /** Drops the checkout; the next write opens a new one. */
2793
+ reset(): void;
2794
+ /** Resolves once nothing is in flight or queued. */
2795
+ private settled;
2796
+ private pump;
2797
+ private write;
2798
+ /**
2799
+ * A 409 is a stale version or a checkout no longer open; one read tells
2800
+ * which, replaying on the current version or opening a new checkout with
2801
+ * the same cart. A second conflict is somebody else's and surfaces.
2802
+ */
2803
+ private updateWithReplay;
2804
+ private finalizeOnce;
2805
+ private refresh;
2806
+ private adopt;
2807
+ private update;
2808
+ }
2809
+
2810
+ declare interface CheckoutDraftOptions {
2811
+ /** Resume this checkout rather than opening one on the first write. */
2812
+ checkoutId?: string;
2813
+ }
2814
+
2815
+ /**
2816
+ *
2817
+ * @export
2818
+ * @interface CheckoutDraftResponseData
2819
+ */
2820
+ declare interface CheckoutDraftResponseData {
2821
+ /**
2822
+ *
2823
+ * @type {string}
2824
+ * @memberof CheckoutDraftResponseData
2825
+ */
2826
+ companyId: string;
2827
+ /**
2828
+ *
2829
+ * @type {Date}
2830
+ * @memberof CheckoutDraftResponseData
2831
+ */
2832
+ completedAt?: Date | null;
2833
+ /**
2834
+ *
2835
+ * @type {Date}
2836
+ * @memberof CheckoutDraftResponseData
2837
+ */
2838
+ createdAt: Date;
2839
+ /**
2840
+ *
2841
+ * @type {Date}
2842
+ * @memberof CheckoutDraftResponseData
2843
+ */
2844
+ expiresAt?: Date | null;
2845
+ /**
2846
+ *
2847
+ * @type {string}
2848
+ * @memberof CheckoutDraftResponseData
2849
+ */
2850
+ id: string;
2851
+ /**
2852
+ *
2853
+ * @type {Date}
2854
+ * @memberof CheckoutDraftResponseData
2855
+ */
2856
+ lastActivityAt: Date;
2857
+ /**
2858
+ *
2859
+ * @type {CheckoutPriceSnapshot}
2860
+ * @memberof CheckoutDraftResponseData
2861
+ */
2862
+ priceSnapshot?: CheckoutPriceSnapshot;
2863
+ /**
2864
+ *
2865
+ * @type {Date}
2866
+ * @memberof CheckoutDraftResponseData
2867
+ */
2868
+ pricedAt?: Date | null;
2869
+ /**
2870
+ *
2871
+ * @type {Array<CheckoutProblemResponseData>}
2872
+ * @memberof CheckoutDraftResponseData
2873
+ */
2874
+ problems: Array<CheckoutProblemResponseData>;
2875
+ /**
2876
+ *
2877
+ * @type {CheckoutSelectionsResponseData}
2878
+ * @memberof CheckoutDraftResponseData
2879
+ */
2880
+ selections: CheckoutSelectionsResponseData;
2881
+ /**
2882
+ *
2883
+ * @type {string}
2884
+ * @memberof CheckoutDraftResponseData
2885
+ */
2886
+ shareToken?: string | null;
2887
+ /**
2888
+ *
2889
+ * @type {CheckoutStatus}
2890
+ * @memberof CheckoutDraftResponseData
2891
+ */
2892
+ status: CheckoutStatus;
2893
+ /**
2894
+ *
2895
+ * @type {Date}
2896
+ * @memberof CheckoutDraftResponseData
2897
+ */
2898
+ updatedAt: Date;
2899
+ /**
2900
+ *
2901
+ * @type {number}
2902
+ * @memberof CheckoutDraftResponseData
2903
+ */
2904
+ version: number;
2905
+ }
2906
+
2907
+ export declare interface CheckoutDraftState {
2908
+ /** The checkout as the last write left it; `undefined` until the first. */
2909
+ checkout: Checkout | undefined;
2910
+ /**
2911
+ * What the server last found wrong: the priced checkout's problems, or the
2912
+ * list a refused finalize answered with.
2913
+ */
2914
+ problems: CheckoutProblem[];
2915
+ /** A write is in flight or waiting behind one. */
2916
+ isPricing: boolean;
2917
+ isFinalizing: boolean;
2918
+ /** The last write or finalize that failed other than on its problems. */
2919
+ error: Error | undefined;
2920
+ /** What the finalize charged, once it has. */
2921
+ result: CheckoutResult | undefined;
2922
+ }
2923
+
2924
+ /**
2925
+ * Schematic API
2926
+ * Schematic API
2927
+ *
2928
+ * The version of the OpenAPI document: 0.1
2929
+ *
2930
+ *
2931
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2932
+ * https://openapi-generator.tech
2933
+ * Do not edit the class manually.
2934
+ */
2935
+ /**
2936
+ *
2937
+ * @export
2938
+ * @interface CheckoutFieldValue
2939
+ */
2940
+ declare interface CheckoutFieldValue {
2941
+ /**
2942
+ *
2943
+ * @type {string}
2944
+ * @memberof CheckoutFieldValue
2945
+ */
2946
+ id: string;
2947
+ /**
2948
+ *
2949
+ * @type {string}
2950
+ * @memberof CheckoutFieldValue
2951
+ */
2952
+ value: string;
2953
+ }
2954
+
2955
+ export declare interface CheckoutHandle extends CheckoutDraftState {
2956
+ /** What the cart was last priced at; `undefined` until it is priceable. */
2957
+ snapshot: CheckoutPriceSnapshot | undefined;
2958
+ /**
2959
+ * Replaces the cart and re-prices it. Calls made while a write is out are
2960
+ * coalesced into the newest, so a component can call this on every change.
2961
+ * Rejects with the write's failure, which also lands on `error`.
2962
+ */
2963
+ setSelections: (selections: CheckoutSelections) => Promise<Checkout | undefined>;
2964
+ /**
2965
+ * Charges the cart once every write has landed, then reloads the billing
2966
+ * data the purchase changed. A refusal on the cart's problems puts them on
2967
+ * `problems` and rejects.
2968
+ */
2969
+ finalize: () => Promise<CheckoutResult>;
2970
+ /** Drops the checkout; the next write opens a new one. */
2971
+ reset: () => void;
2972
+ }
2973
+
2974
+ /**
2975
+ *
2976
+ * @export
2977
+ */
2978
+ declare const CheckoutIntent: {
2979
+ readonly Cancel: "cancel";
2980
+ readonly Change: "change";
2981
+ };
2982
+
2983
+ declare type CheckoutIntent = (typeof CheckoutIntent)[keyof typeof CheckoutIntent];
2984
+
2985
+ /**
2986
+ *
2987
+ * @export
2988
+ * @interface CheckoutPriceSnapshot
2989
+ */
2990
+ export declare interface CheckoutPriceSnapshot {
2991
+ /**
2992
+ *
2993
+ * @type {number}
2994
+ * @memberof CheckoutPriceSnapshot
2995
+ */
2996
+ amountOff: number;
2997
+ /**
2998
+ *
2999
+ * @type {Currency}
3000
+ * @memberof CheckoutPriceSnapshot
3001
+ */
3002
+ currency: Currency;
3003
+ /**
3004
+ *
3005
+ * @type {number}
3006
+ * @memberof CheckoutPriceSnapshot
3007
+ */
3008
+ customerBalanceApplied: number;
3009
+ /**
3010
+ *
3011
+ * @type {number}
3012
+ * @memberof CheckoutPriceSnapshot
3013
+ */
3014
+ customerBalanceRemaining: number;
3015
+ /**
3016
+ *
3017
+ * @type {number}
3018
+ * @memberof CheckoutPriceSnapshot
3019
+ */
3020
+ discountAmount: number;
3021
+ /**
3022
+ *
3023
+ * @type {Array<CheckoutPriceSnapshotDiscount>}
3024
+ * @memberof CheckoutPriceSnapshot
3025
+ */
3026
+ discounts: Array<CheckoutPriceSnapshotDiscount>;
3027
+ /**
3028
+ *
3029
+ * @type {number}
3030
+ * @memberof CheckoutPriceSnapshot
3031
+ */
3032
+ dueNow: number;
3033
+ /**
3034
+ *
3035
+ * @type {boolean}
3036
+ * @memberof CheckoutPriceSnapshot
3037
+ */
3038
+ isScheduledDowngrade: boolean;
3039
+ /**
3040
+ *
3041
+ * @type {number}
3042
+ * @memberof CheckoutPriceSnapshot
3043
+ */
3044
+ newCharges: number;
3045
+ /**
3046
+ *
3047
+ * @type {boolean}
3048
+ * @memberof CheckoutPriceSnapshot
3049
+ */
3050
+ optInRequired: boolean;
3051
+ /**
3052
+ *
3053
+ * @type {string}
3054
+ * @memberof CheckoutPriceSnapshot
3055
+ */
3056
+ optInText?: string | null;
3057
+ /**
3058
+ *
3059
+ * @type {string}
3060
+ * @memberof CheckoutPriceSnapshot
3061
+ */
3062
+ optInTitle?: string | null;
3063
+ /**
3064
+ *
3065
+ * @type {boolean}
3066
+ * @memberof CheckoutPriceSnapshot
3067
+ */
3068
+ paymentMethodRequired: boolean;
3069
+ /**
3070
+ *
3071
+ * @type {number}
3072
+ * @memberof CheckoutPriceSnapshot
3073
+ */
3074
+ percentOff: number;
3075
+ /**
3076
+ *
3077
+ * @type {Date}
3078
+ * @memberof CheckoutPriceSnapshot
3079
+ */
3080
+ periodStart: Date;
3081
+ /**
3082
+ *
3083
+ * @type {Date}
3084
+ * @memberof CheckoutPriceSnapshot
3085
+ */
3086
+ pricedAt: Date;
3087
+ /**
3088
+ *
3089
+ * @type {boolean}
3090
+ * @memberof CheckoutPriceSnapshot
3091
+ */
3092
+ promoCodeApplied: boolean;
3093
+ /**
3094
+ *
3095
+ * @type {number}
3096
+ * @memberof CheckoutPriceSnapshot
3097
+ */
3098
+ proration: number;
3099
+ /**
3100
+ *
3101
+ * @type {CheckoutPriceSnapshotProration}
3102
+ * @memberof CheckoutPriceSnapshot
3103
+ */
3104
+ prorationDetail?: CheckoutPriceSnapshotProration;
3105
+ /**
3106
+ *
3107
+ * @type {Date}
3108
+ * @memberof CheckoutPriceSnapshot
3109
+ */
3110
+ scheduledChangeTime?: Date | null;
3111
+ /**
3112
+ *
3113
+ * @type {number}
3114
+ * @memberof CheckoutPriceSnapshot
3115
+ */
3116
+ taxAmount?: number | null;
3117
+ /**
3118
+ *
3119
+ * @type {number}
3120
+ * @memberof CheckoutPriceSnapshot
3121
+ */
3122
+ totalPerBillingPeriod: number;
3123
+ /**
3124
+ *
3125
+ * @type {Date}
3126
+ * @memberof CheckoutPriceSnapshot
3127
+ */
3128
+ trialEnd?: Date | null;
3129
+ }
3130
+
3131
+ /**
3132
+ *
3133
+ * @export
3134
+ * @interface CheckoutPriceSnapshotDiscount
3135
+ */
3136
+ declare interface CheckoutPriceSnapshotDiscount {
3137
+ /**
3138
+ *
3139
+ * @type {number}
3140
+ * @memberof CheckoutPriceSnapshotDiscount
3141
+ */
3142
+ amountOff?: number | null;
3143
+ /**
3144
+ *
3145
+ * @type {string}
3146
+ * @memberof CheckoutPriceSnapshotDiscount
3147
+ */
3148
+ couponExternalId: string;
3149
+ /**
3150
+ *
3151
+ * @type {string}
3152
+ * @memberof CheckoutPriceSnapshotDiscount
3153
+ */
3154
+ couponName: string;
3155
+ /**
3156
+ *
3157
+ * @type {Currency}
3158
+ * @memberof CheckoutPriceSnapshotDiscount
3159
+ */
3160
+ currency?: Currency | null;
3161
+ /**
3162
+ *
3163
+ * @type {string}
3164
+ * @memberof CheckoutPriceSnapshotDiscount
3165
+ */
3166
+ customerFacingCode?: string | null;
3167
+ /**
3168
+ *
3169
+ * @type {string}
3170
+ * @memberof CheckoutPriceSnapshotDiscount
3171
+ */
3172
+ duration: string;
3173
+ /**
3174
+ *
3175
+ * @type {number}
3176
+ * @memberof CheckoutPriceSnapshotDiscount
3177
+ */
3178
+ durationInMonths?: number | null;
3179
+ /**
3180
+ *
3181
+ * @type {number}
3182
+ * @memberof CheckoutPriceSnapshotDiscount
3183
+ */
3184
+ percentOff?: number | null;
3185
+ /**
3186
+ *
987
3187
  * @type {string}
988
- * @memberof CheckFlagResponseData
3188
+ * @memberof CheckoutPriceSnapshotDiscount
989
3189
  */
990
- error?: string | null;
3190
+ promoCodeExternalId?: string | null;
3191
+ }
3192
+
3193
+ /**
3194
+ *
3195
+ * @export
3196
+ * @interface CheckoutPriceSnapshotProration
3197
+ */
3198
+ declare interface CheckoutPriceSnapshotProration {
991
3199
  /**
992
- * Deprecated: Use Entitlement.Allocation instead.
3200
+ *
3201
+ * @type {Date}
3202
+ * @memberof CheckoutPriceSnapshotProration
3203
+ */
3204
+ billedAt?: Date | null;
3205
+ /**
3206
+ *
993
3207
  * @type {number}
994
- * @memberof CheckFlagResponseData
995
- * @deprecated
3208
+ * @memberof CheckoutPriceSnapshotProration
996
3209
  */
997
- featureAllocation?: number | null;
3210
+ charge: number;
998
3211
  /**
999
- * Deprecated: Use Entitlement.Usage instead.
3212
+ *
1000
3213
  * @type {number}
1001
- * @memberof CheckFlagResponseData
1002
- * @deprecated
3214
+ * @memberof CheckoutPriceSnapshotProration
1003
3215
  */
1004
- featureUsage?: number | null;
3216
+ credit: number;
1005
3217
  /**
1006
- * Deprecated: Use Entitlement.EventName instead.
1007
- * @type {string}
1008
- * @memberof CheckFlagResponseData
1009
- * @deprecated
3218
+ *
3219
+ * @type {Array<CheckoutPriceSnapshotProrationLine>}
3220
+ * @memberof CheckoutPriceSnapshotProration
1010
3221
  */
1011
- featureUsageEvent?: string | null;
3222
+ lines: Array<CheckoutPriceSnapshotProrationLine>;
1012
3223
  /**
1013
- * Deprecated: Use Entitlement.MetricPeriod instead.
1014
- * @type {MetricPeriod}
1015
- * @memberof CheckFlagResponseData
1016
- * @deprecated
3224
+ *
3225
+ * @type {CheckoutChargeTiming}
3226
+ * @memberof CheckoutPriceSnapshotProration
1017
3227
  */
1018
- featureUsagePeriod?: MetricPeriod | null;
3228
+ timing: CheckoutChargeTiming;
1019
3229
  /**
1020
- * Deprecated: Use Entitlement.MetricResetAt instead.
3230
+ *
3231
+ * @type {number}
3232
+ * @memberof CheckoutPriceSnapshotProration
3233
+ */
3234
+ total: number;
3235
+ }
3236
+
3237
+ /**
3238
+ *
3239
+ * @export
3240
+ * @interface CheckoutPriceSnapshotProrationLine
3241
+ */
3242
+ declare interface CheckoutPriceSnapshotProrationLine {
3243
+ /**
3244
+ *
3245
+ * @type {number}
3246
+ * @memberof CheckoutPriceSnapshotProrationLine
3247
+ */
3248
+ amount: number;
3249
+ /**
3250
+ *
3251
+ * @type {ProrationLineKind}
3252
+ * @memberof CheckoutPriceSnapshotProrationLine
3253
+ */
3254
+ kind: ProrationLineKind;
3255
+ /**
3256
+ *
1021
3257
  * @type {Date}
1022
- * @memberof CheckFlagResponseData
1023
- * @deprecated
3258
+ * @memberof CheckoutPriceSnapshotProrationLine
1024
3259
  */
1025
- featureUsageResetAt?: Date | null;
3260
+ periodEnd?: Date | null;
1026
3261
  /**
1027
- * The key used to check the flag
3262
+ *
3263
+ * @type {Date}
3264
+ * @memberof CheckoutPriceSnapshotProrationLine
3265
+ */
3266
+ periodStart?: Date | null;
3267
+ /**
3268
+ *
1028
3269
  * @type {string}
1029
- * @memberof CheckFlagResponseData
3270
+ * @memberof CheckoutPriceSnapshotProrationLine
1030
3271
  */
1031
- flag: string;
3272
+ planId?: string | null;
1032
3273
  /**
1033
- * If a flag was found, its ID
3274
+ *
1034
3275
  * @type {string}
1035
- * @memberof CheckFlagResponseData
3276
+ * @memberof CheckoutPriceSnapshotProrationLine
1036
3277
  */
1037
- flagId?: string | null;
3278
+ priceId?: string | null;
1038
3279
  /**
1039
- * A human-readable explanation of the result
3280
+ *
3281
+ * @type {number}
3282
+ * @memberof CheckoutPriceSnapshotProrationLine
3283
+ */
3284
+ quantity?: number | null;
3285
+ }
3286
+
3287
+ /**
3288
+ * Something the last price found wrong. `blocking` means a finalize would be
3289
+ * refused while it stands; the ids say what it is about, so a client can show
3290
+ * it next to the thing it concerns.
3291
+ */
3292
+ export declare type CheckoutProblem = CheckoutProblemResponseData;
3293
+
3294
+ /**
3295
+ *
3296
+ * @export
3297
+ */
3298
+ export declare const CheckoutProblemCode: {
3299
+ readonly AddOnConflictsWithPlan: "add_on_conflicts_with_plan";
3300
+ readonly AddOnIntervalMismatch: "add_on_interval_mismatch";
3301
+ readonly AddOnRequiresBilledPlan: "add_on_requires_billed_plan";
3302
+ readonly AddOnUnavailable: "add_on_unavailable";
3303
+ readonly BillingCycleAnchorConflictsWithTrial: "billing_cycle_anchor_conflicts_with_trial";
3304
+ readonly BillingCycleAnchorMustBeFuture: "billing_cycle_anchor_must_be_future";
3305
+ readonly BillingCycleAnchorNeedsNewSubscription: "billing_cycle_anchor_needs_new_subscription";
3306
+ readonly BillingCycleAnchorWithoutPlan: "billing_cycle_anchor_without_plan";
3307
+ readonly BillingStartDateMustBePast: "billing_start_date_must_be_past";
3308
+ readonly BillingStartDateNeedsNewSubscription: "billing_start_date_needs_new_subscription";
3309
+ readonly BillingStartDateNeedsRenewalDate: "billing_start_date_needs_renewal_date";
3310
+ readonly BillingStartDateNotBeforeRenewalDate: "billing_start_date_not_before_renewal_date";
3311
+ readonly BillingStartDateTooFarInPast: "billing_start_date_too_far_in_past";
3312
+ readonly CheckoutSuperseded: "checkout_superseded";
3313
+ readonly CreditBundleIncompatible: "credit_bundle_incompatible";
3314
+ readonly CreditBundleUnavailable: "credit_bundle_unavailable";
3315
+ readonly CreditBundlesActivateOnPayment: "credit_bundles_activate_on_payment";
3316
+ readonly CurrencyMismatch: "currency_mismatch";
3317
+ readonly CustomFieldRequired: "custom_field_required";
3318
+ readonly DiscountIneligible: "discount_ineligible";
3319
+ readonly DowngradeNotPermitted: "downgrade_not_permitted";
3320
+ readonly EndDateMustBeFuture: "end_date_must_be_future";
3321
+ readonly EndDateNeedsNewSubscription: "end_date_needs_new_subscription";
3322
+ readonly EndDateNotAfterRenewalDate: "end_date_not_after_renewal_date";
3323
+ readonly FreeFirstPeriodActivatesOnPayment: "free_first_period_activates_on_payment";
3324
+ readonly InvoiceEmailRequired: "invoice_email_required";
3325
+ readonly InvoicedSubscriptionConflictsWithTrial: "invoiced_subscription_conflicts_with_trial";
3326
+ readonly InvoicedSubscriptionNeedsNewSubscription: "invoiced_subscription_needs_new_subscription";
3327
+ readonly InvoicedSubscriptionRequiresPlan: "invoiced_subscription_requires_plan";
3328
+ readonly OptInRequired: "opt_in_required";
3329
+ readonly PayInAdvancePriceInvalid: "pay_in_advance_price_invalid";
3330
+ readonly PayInAdvanceRequired: "pay_in_advance_required";
3331
+ readonly PaymentMethodRequired: "payment_method_required";
3332
+ readonly PlanNotTrialable: "plan_not_trialable";
3333
+ readonly PlanUnavailable: "plan_unavailable";
3334
+ readonly PriceUnavailable: "price_unavailable";
3335
+ readonly ProrateFirstPeriodWithoutAnchor: "prorate_first_period_without_anchor";
3336
+ readonly ProviderRejected: "provider_rejected";
3337
+ readonly ScheduledChangeBlocksPurchase: "scheduled_change_blocks_purchase";
3338
+ readonly ScheduledChangePending: "scheduled_change_pending";
3339
+ readonly SelectionInvalid: "selection_invalid";
3340
+ readonly SubscriptionCurrencyChange: "subscription_currency_change";
3341
+ readonly TrialEndMustBeFuture: "trial_end_must_be_future";
3342
+ readonly TrialEndTooFar: "trial_end_too_far";
3343
+ readonly TrialExcludesAddOns: "trial_excludes_add_ons";
3344
+ readonly TrialExcludesUsageBased: "trial_excludes_usage_based";
3345
+ readonly UsagePriceMissingForInterval: "usage_price_missing_for_interval";
3346
+ readonly UsageOverLimit: "usage_over_limit";
3347
+ };
3348
+
3349
+ export declare type CheckoutProblemCode = (typeof CheckoutProblemCode)[keyof typeof CheckoutProblemCode];
3350
+
3351
+ /**
3352
+ *
3353
+ * @export
3354
+ * @interface CheckoutProblemResponseData
3355
+ */
3356
+ declare interface CheckoutProblemResponseData {
3357
+ /**
3358
+ * Whether completing the checkout would be refused while this stands.
3359
+ * @type {boolean}
3360
+ * @memberof CheckoutProblemResponseData
3361
+ */
3362
+ blocking: boolean;
3363
+ /**
3364
+ *
1040
3365
  * @type {string}
1041
- * @memberof CheckFlagResponseData
3366
+ * @memberof CheckoutProblemResponseData
1042
3367
  */
1043
- reason: string;
3368
+ bundleId?: string | null;
1044
3369
  /**
1045
- * If a rule was found, its ID
3370
+ *
3371
+ * @type {CheckoutProblemCode}
3372
+ * @memberof CheckoutProblemResponseData
3373
+ */
3374
+ code: CheckoutProblemCode;
3375
+ /**
3376
+ * The currency this problem is about, when it is about one.
3377
+ * @type {Currency}
3378
+ * @memberof CheckoutProblemResponseData
3379
+ */
3380
+ currency?: Currency;
3381
+ /**
3382
+ * Diagnostic detail for operators, including what the billing provider said. Never shown to a customer.
1046
3383
  * @type {string}
1047
- * @memberof CheckFlagResponseData
3384
+ * @memberof CheckoutProblemResponseData
1048
3385
  */
1049
- ruleId?: string | null;
3386
+ detail?: string;
1050
3387
  /**
1051
- * If a rule was found, its type
1052
- * @type {RuleType}
1053
- * @memberof CheckFlagResponseData
3388
+ *
3389
+ * @type {string}
3390
+ * @memberof CheckoutProblemResponseData
1054
3391
  */
1055
- ruleType?: RuleType_2 | null;
3392
+ featureId?: string | null;
1056
3393
  /**
1057
- * If user keys were provided and matched a user, its ID
3394
+ *
1058
3395
  * @type {string}
1059
- * @memberof CheckFlagResponseData
3396
+ * @memberof CheckoutProblemResponseData
1060
3397
  */
1061
- userId?: string | null;
3398
+ fieldId?: string | null;
1062
3399
  /**
1063
- * A boolean flag check result; for feature entitlements, this represents whether further consumption of the feature is permitted
1064
- * @type {boolean}
1065
- * @memberof CheckFlagResponseData
3400
+ * What is wrong, in words safe for anyone allowed to read the checkout.
3401
+ * @type {string}
3402
+ * @memberof CheckoutProblemResponseData
1066
3403
  */
1067
- value: boolean;
3404
+ message: string;
3405
+ /**
3406
+ *
3407
+ * @type {string}
3408
+ * @memberof CheckoutProblemResponseData
3409
+ */
3410
+ paymentMethodId?: string | null;
3411
+ /**
3412
+ *
3413
+ * @type {string}
3414
+ * @memberof CheckoutProblemResponseData
3415
+ */
3416
+ planId?: string | null;
3417
+ /**
3418
+ *
3419
+ * @type {string}
3420
+ * @memberof CheckoutProblemResponseData
3421
+ */
3422
+ priceId?: string | null;
3423
+ /**
3424
+ *
3425
+ * @type {CheckoutProblemSource}
3426
+ * @memberof CheckoutProblemResponseData
3427
+ */
3428
+ source: CheckoutProblemSource;
1068
3429
  }
1069
3430
 
1070
- declare function CheckFlagResponseFromJSON(json: any): CheckFlagResponse;
3431
+ /**
3432
+ * The problems a refused write or finalize carried, or `undefined` when the
3433
+ * error is not one: a finalize the server stops on a blocking problem answers
3434
+ * 400 with the list beside its message.
3435
+ */
3436
+ export declare function checkoutProblemsOf(error: unknown): CheckoutProblem[] | undefined;
1071
3437
 
1072
- export declare type CheckFlagReturn = {
1073
- /** The company has access to the feature, but has exceeded the usage limit */
1074
- featureUsageExceeded?: boolean;
1075
- /** If company keys were provided and matched a company, its ID */
1076
- companyId?: string;
1077
- /** If the company has a credit-based entitlement for this feature, the ID of the credit */
1078
- creditId?: string;
1079
- /** If the company has a credit-based entitlement for this feature, the credit available to fund new consumption excluding any open lease hold (the value lease-holding SDKs gate on) */
1080
- creditRemaining?: number;
1081
- /** If the company has a credit-based entitlement for this feature, the unspent amount held by an open credit lease, 0 when none is open */
1082
- creditReserved?: number;
1083
- /** If the company has a credit-based entitlement for this feature, the spendable balance including any open lease hold (creditRemaining + creditReserved); the number to display to end users */
1084
- creditSettled?: number;
1085
- /** If an error occurred while checking the flag, the error message */
1086
- error?: string;
1087
- /** If a numeric feature entitlement rule was matched, its allocation */
1088
- featureAllocation?: number;
1089
- /** If a numeric feature entitlement rule was matched, the company's usage */
1090
- featureUsage?: number;
1091
- /** Event representing the feature usage */
1092
- featureUsageEvent?: string;
1093
- /** For event-based feature entitlement rules, the period over which usage is tracked (current_month, current_day, current_week, all_time) */
1094
- featureUsagePeriod?: UsagePeriod;
1095
- /** For event-based feature entitlement rules, when the usage period will reset */
1096
- featureUsageResetAt?: Date;
1097
- /** The key used to check the flag */
1098
- flag: string;
1099
- /** If a flag was found, its ID */
1100
- flagId?: string;
1101
- /** A human-readable explanation of the result */
1102
- reason: string;
1103
- /** If a rule was found, its ID */
1104
- ruleId?: string;
1105
- /** If a rule was found, its type */
1106
- ruleType?: RuleType;
1107
- /** For usage-based pricing, the soft limit for overage charges or the next tier boundary */
1108
- softLimit?: number;
1109
- /** If user keys were provided and matched a user, its ID */
1110
- userId?: string;
1111
- /** A boolean flag check result; for feature entitlements, this represents whether further consumption of the feature is permitted */
1112
- value: boolean;
1113
- /** Customer-defined usage warning thresholds configured on this entitlement */
1114
- warningTiers?: WarningTier[];
3438
+ /**
3439
+ *
3440
+ * @export
3441
+ */
3442
+ declare const CheckoutProblemSource: {
3443
+ readonly Provider: "provider";
3444
+ readonly Requirement: "requirement";
3445
+ readonly Validation: "validation";
1115
3446
  };
1116
3447
 
1117
- declare const CheckFlagReturnFromJSON: (json: any) => CheckFlagReturn;
1118
-
1119
- declare type CheckFlagReturnListenerFn = (value: CheckFlagReturn) => void;
3448
+ declare type CheckoutProblemSource = (typeof CheckoutProblemSource)[keyof typeof CheckoutProblemSource];
1120
3449
 
1121
3450
  /**
1122
3451
  *
1123
3452
  * @export
1124
- * @interface CheckFlagsResponse
3453
+ * @interface CheckoutResponseData
1125
3454
  */
1126
- declare interface CheckFlagsResponse {
3455
+ declare interface CheckoutResponseData {
3456
+ /**
3457
+ *
3458
+ * @type {string}
3459
+ * @memberof CheckoutResponseData
3460
+ */
3461
+ applicationId?: string | null;
3462
+ /**
3463
+ *
3464
+ * @type {number}
3465
+ * @memberof CheckoutResponseData
3466
+ */
3467
+ cancelAt?: number | null;
3468
+ /**
3469
+ *
3470
+ * @type {boolean}
3471
+ * @memberof CheckoutResponseData
3472
+ */
3473
+ cancelAtPeriodEnd: boolean;
3474
+ /**
3475
+ *
3476
+ * @type {string}
3477
+ * @memberof CheckoutResponseData
3478
+ */
3479
+ companyId?: string | null;
3480
+ /**
3481
+ *
3482
+ * @type {string}
3483
+ * @memberof CheckoutResponseData
3484
+ */
3485
+ confirmPaymentIntentClientSecret?: string | null;
3486
+ /**
3487
+ *
3488
+ * @type {string}
3489
+ * @memberof CheckoutResponseData
3490
+ */
3491
+ confirmPaymentIntentId?: string | null;
3492
+ /**
3493
+ *
3494
+ * @type {Date}
3495
+ * @memberof CheckoutResponseData
3496
+ */
3497
+ createdAt: Date;
3498
+ /**
3499
+ *
3500
+ * @type {Currency}
3501
+ * @memberof CheckoutResponseData
3502
+ */
3503
+ currency: Currency;
3504
+ /**
3505
+ *
3506
+ * @type {string}
3507
+ * @memberof CheckoutResponseData
3508
+ */
3509
+ customerExternalId: string;
3510
+ /**
3511
+ *
3512
+ * @type {string}
3513
+ * @memberof CheckoutResponseData
3514
+ */
3515
+ defaultPaymentMethodId?: string | null;
3516
+ /**
3517
+ *
3518
+ * @type {Date}
3519
+ * @memberof CheckoutResponseData
3520
+ */
3521
+ expiredAt?: Date | null;
3522
+ /**
3523
+ *
3524
+ * @type {string}
3525
+ * @memberof CheckoutResponseData
3526
+ */
3527
+ id: string;
1127
3528
  /**
1128
3529
  *
1129
- * @type {CheckFlagsResponseData}
1130
- * @memberof CheckFlagsResponse
3530
+ * @type {string}
3531
+ * @memberof CheckoutResponseData
1131
3532
  */
1132
- data: CheckFlagsResponseData;
3533
+ interval: string;
1133
3534
  /**
1134
- * Input parameters
3535
+ *
1135
3536
  * @type {object}
1136
- * @memberof CheckFlagsResponse
3537
+ * @memberof CheckoutResponseData
1137
3538
  */
1138
- params: object;
3539
+ metadata?: object;
3540
+ /**
3541
+ *
3542
+ * @type {number}
3543
+ * @memberof CheckoutResponseData
3544
+ */
3545
+ periodEnd: number;
3546
+ /**
3547
+ *
3548
+ * @type {number}
3549
+ * @memberof CheckoutResponseData
3550
+ */
3551
+ periodStart: number;
3552
+ /**
3553
+ *
3554
+ * @type {BillingProviderType}
3555
+ * @memberof CheckoutResponseData
3556
+ */
3557
+ providerType: BillingProviderType;
3558
+ /**
3559
+ *
3560
+ * @type {Date}
3561
+ * @memberof CheckoutResponseData
3562
+ */
3563
+ scheduledChangeTime?: Date | null;
3564
+ /**
3565
+ *
3566
+ * @type {ScheduledDowngradeConfigBehavior}
3567
+ * @memberof CheckoutResponseData
3568
+ */
3569
+ scheduledDowngradeBehavior?: ScheduledDowngradeConfigBehavior | null;
3570
+ /**
3571
+ *
3572
+ * @type {string}
3573
+ * @memberof CheckoutResponseData
3574
+ */
3575
+ status: string;
3576
+ /**
3577
+ *
3578
+ * @type {string}
3579
+ * @memberof CheckoutResponseData
3580
+ */
3581
+ subscriptionExternalId: string;
3582
+ /**
3583
+ *
3584
+ * @type {number}
3585
+ * @memberof CheckoutResponseData
3586
+ */
3587
+ totalPrice: number;
3588
+ /**
3589
+ *
3590
+ * @type {number}
3591
+ * @memberof CheckoutResponseData
3592
+ */
3593
+ trialEnd?: number | null;
3594
+ /**
3595
+ *
3596
+ * @type {BillingSubscriptionTrialEndSetting}
3597
+ * @memberof CheckoutResponseData
3598
+ */
3599
+ trialEndSetting?: BillingSubscriptionTrialEndSetting | null;
3600
+ }
3601
+
3602
+ /** What a finalize charged: the subscription, and a 3-D Secure secret when the payment needs one. */
3603
+ export declare type CheckoutResult = CheckoutResponseData;
3604
+
3605
+ /**
3606
+ * The cart, sent whole on every write: an update replaces the stored cart, so
3607
+ * a field left out is a field cleared. No plan and price is a cart with only
3608
+ * credit bundles, or nothing at all.
3609
+ */
3610
+ export declare interface CheckoutSelections {
3611
+ addOns?: UpdateAddOnRequestBody[];
3612
+ autoTopupOverrides?: UpdateAutoTopupOverrideRequestBody[];
3613
+ creditBundles?: UpdateCreditBundleRequestBody[];
3614
+ /** ISO 4217. A cart that prices in another currency reports a problem. */
3615
+ currency?: string;
3616
+ customFieldValues?: CheckoutFieldValue[];
3617
+ /** `cancel` ends the subscription; the default is a change to the cart. */
3618
+ intent?: "change" | "cancel";
3619
+ optInAccepted?: boolean;
3620
+ payInAdvance?: UpdatePayInAdvanceRequestBody[];
3621
+ /** The provider's id of a method already on file. */
3622
+ paymentMethodId?: string;
3623
+ planId?: string;
3624
+ priceId?: string;
3625
+ promoCode?: string;
3626
+ skipTrial?: boolean;
1139
3627
  }
1140
3628
 
1141
3629
  /**
1142
3630
  *
1143
3631
  * @export
1144
- * @interface CheckFlagsResponseData
3632
+ * @interface CheckoutSelectionsResponseData
1145
3633
  */
1146
- declare interface CheckFlagsResponseData {
3634
+ declare interface CheckoutSelectionsResponseData {
1147
3635
  /**
1148
- * Lease-aware credit balances keyed by credit ID, covering every credit type the company holds a balance in
1149
- * @type {{ [key: string]: CompanyCreditBalance; }}
1150
- * @memberof CheckFlagsResponseData
3636
+ *
3637
+ * @type {Array<UpdateAddOnRequestBody>}
3638
+ * @memberof CheckoutSelectionsResponseData
1151
3639
  */
1152
- creditBalances?: {
1153
- [key: string]: CompanyCreditBalance;
1154
- };
3640
+ addOnIds: Array<UpdateAddOnRequestBody>;
1155
3641
  /**
1156
- * Credit spend policies binding the evaluated company and user; empty when none bind. Each response carries the whole set, so replace any previously received set with it. Advisory: the flag values do not reflect them, since a check names no draw amount
1157
- * @type {Array<CreditSpendPolicy>}
1158
- * @memberof CheckFlagsResponseData
3642
+ *
3643
+ * @type {Array<UpdateAutoTopupOverrideRequestBody>}
3644
+ * @memberof CheckoutSelectionsResponseData
1159
3645
  */
1160
- creditSpendPolicies: Array<CreditSpendPolicy_2>;
3646
+ autoTopupOverrides: Array<UpdateAutoTopupOverrideRequestBody>;
1161
3647
  /**
1162
3648
  *
1163
- * @type {Array<CheckFlagResponseData>}
1164
- * @memberof CheckFlagsResponseData
3649
+ * @type {string}
3650
+ * @memberof CheckoutSelectionsResponseData
1165
3651
  */
1166
- flags: Array<CheckFlagResponseData>;
3652
+ billingEntityId?: string | null;
1167
3653
  /**
1168
3654
  *
1169
- * @type {DatastreamCompanyPlan}
1170
- * @memberof CheckFlagsResponseData
3655
+ * @type {string}
3656
+ * @memberof CheckoutSelectionsResponseData
1171
3657
  */
1172
- plan?: DatastreamCompanyPlan;
3658
+ couponExternalId?: string | null;
3659
+ /**
3660
+ *
3661
+ * @type {Array<UpdateCreditBundleRequestBody>}
3662
+ * @memberof CheckoutSelectionsResponseData
3663
+ */
3664
+ creditBundles: Array<UpdateCreditBundleRequestBody>;
3665
+ /**
3666
+ * The currency the cart is being built in, as the create or last update named it; null when neither did.
3667
+ * @type {string}
3668
+ * @memberof CheckoutSelectionsResponseData
3669
+ */
3670
+ currency?: string | null;
3671
+ /**
3672
+ *
3673
+ * @type {Array<CheckoutFieldValue>}
3674
+ * @memberof CheckoutSelectionsResponseData
3675
+ */
3676
+ customFieldValues: Array<CheckoutFieldValue>;
3677
+ /**
3678
+ * What the checkout does to the subscription.
3679
+ * @type {CheckoutIntent}
3680
+ * @memberof CheckoutSelectionsResponseData
3681
+ */
3682
+ intent: CheckoutIntent;
3683
+ /**
3684
+ *
3685
+ * @type {string}
3686
+ * @memberof CheckoutSelectionsResponseData
3687
+ */
3688
+ newPlanId?: string | null;
3689
+ /**
3690
+ *
3691
+ * @type {string}
3692
+ * @memberof CheckoutSelectionsResponseData
3693
+ */
3694
+ newPriceId?: string | null;
3695
+ /**
3696
+ *
3697
+ * @type {boolean}
3698
+ * @memberof CheckoutSelectionsResponseData
3699
+ */
3700
+ optInAccepted?: boolean | null;
3701
+ /**
3702
+ *
3703
+ * @type {Array<UpdatePayInAdvanceRequestBody>}
3704
+ * @memberof CheckoutSelectionsResponseData
3705
+ */
3706
+ payInAdvance: Array<UpdatePayInAdvanceRequestBody>;
3707
+ /**
3708
+ *
3709
+ * @type {string}
3710
+ * @memberof CheckoutSelectionsResponseData
3711
+ */
3712
+ paymentMethodId?: string | null;
3713
+ /**
3714
+ *
3715
+ * @type {string}
3716
+ * @memberof CheckoutSelectionsResponseData
3717
+ */
3718
+ promoCode?: string | null;
3719
+ /**
3720
+ *
3721
+ * @type {boolean}
3722
+ * @memberof CheckoutSelectionsResponseData
3723
+ */
3724
+ skipTrial: boolean;
1173
3725
  }
1174
3726
 
1175
- declare function CheckFlagsResponseFromJSON(json: any): CheckFlagsResponse;
3727
+ /** The selections as the API reads them. */
3728
+ declare function checkoutSelectionsToJSON(selections: CheckoutSelections): Record<string, unknown>;
1176
3729
 
1177
- declare type CheckOptions = {
1178
- context?: SchematicContext;
1179
- fallback?: boolean;
1180
- key: string;
3730
+ /**
3731
+ *
3732
+ * @export
3733
+ */
3734
+ export declare const CheckoutStatus: {
3735
+ readonly Abandoned: "abandoned";
3736
+ readonly Completed: "completed";
3737
+ readonly Expired: "expired";
3738
+ readonly Open: "open";
1181
3739
  };
1182
3740
 
3741
+ export declare type CheckoutStatus = (typeof CheckoutStatus)[keyof typeof CheckoutStatus];
3742
+
3743
+ /** The calls a draft makes, so a test or a host's own client can stand in. */
3744
+ export declare type CheckoutTransport = Pick<BillingClient, "createCheckout" | "getCheckout" | "updateCheckout" | "finalizeCheckout">;
3745
+
3746
+ /**
3747
+ * A write's answer: the checkout, and the session the server priced it
3748
+ * under. Sent back on the finalize that follows, the session is what turns a
3749
+ * second submit of the same cart into a 409 rather than a second charge.
3750
+ */
3751
+ export declare interface CheckoutWrite {
3752
+ checkout: Checkout;
3753
+ sessionId?: string;
3754
+ }
3755
+
1183
3756
  export declare type CheckPlanReturn = {
1184
3757
  id: string;
1185
3758
  name: string;
@@ -1202,6 +3775,116 @@ declare type CheckPlanReturnListenerFn = (value: CheckPlanReturn) => void;
1202
3775
  */
1203
3776
  export declare type Company = CompanyContextResponseData;
1204
3777
 
3778
+ /**
3779
+ *
3780
+ * @export
3781
+ * @interface CompanyCatalogResponseData
3782
+ */
3783
+ declare interface CompanyCatalogResponseData {
3784
+ /**
3785
+ *
3786
+ * @type {Array<CatalogCompanyPlanResponseData>}
3787
+ * @memberof CompanyCatalogResponseData
3788
+ */
3789
+ addOns: Array<CatalogCompanyPlanResponseData>;
3790
+ /**
3791
+ *
3792
+ * @type {CatalogCapabilitiesResponseData}
3793
+ * @memberof CompanyCatalogResponseData
3794
+ */
3795
+ capabilities: CatalogCapabilitiesResponseData;
3796
+ /**
3797
+ *
3798
+ * @type {CatalogCheckoutSettingsResponseData}
3799
+ * @memberof CompanyCatalogResponseData
3800
+ */
3801
+ checkoutSettings: CatalogCheckoutSettingsResponseData;
3802
+ /**
3803
+ *
3804
+ * @type {Array<CatalogCreditBundleResponseData>}
3805
+ * @memberof CompanyCatalogResponseData
3806
+ */
3807
+ creditBundles: Array<CatalogCreditBundleResponseData>;
3808
+ /**
3809
+ * Present when the catalog offers a custom plan; absent when custom plans are hidden.
3810
+ * @type {CatalogCustomPlanCTAResponseData}
3811
+ * @memberof CompanyCatalogResponseData
3812
+ */
3813
+ customPlanCta?: CatalogCustomPlanCTAResponseData;
3814
+ /**
3815
+ * ISO 4217 currency of every top-level price slot; currency_prices carries the others.
3816
+ * @type {Currency}
3817
+ * @memberof CompanyCatalogResponseData
3818
+ */
3819
+ defaultCurrency: Currency;
3820
+ /**
3821
+ *
3822
+ * @type {string}
3823
+ * @memberof CompanyCatalogResponseData
3824
+ */
3825
+ description?: string | null;
3826
+ /**
3827
+ *
3828
+ * @type {string}
3829
+ * @memberof CompanyCatalogResponseData
3830
+ */
3831
+ id: string;
3832
+ /**
3833
+ *
3834
+ * @type {string}
3835
+ * @memberof CompanyCatalogResponseData
3836
+ */
3837
+ name: string;
3838
+ /**
3839
+ *
3840
+ * @type {Array<CatalogCompanyPlanResponseData>}
3841
+ * @memberof CompanyCatalogResponseData
3842
+ */
3843
+ plans: Array<CatalogCompanyPlanResponseData>;
3844
+ /**
3845
+ *
3846
+ * @type {boolean}
3847
+ * @memberof CompanyCatalogResponseData
3848
+ */
3849
+ preventSelfServiceDowngrade: boolean;
3850
+ /**
3851
+ *
3852
+ * @type {string}
3853
+ * @memberof CompanyCatalogResponseData
3854
+ */
3855
+ preventSelfServiceDowngradeButtonText?: string | null;
3856
+ /**
3857
+ *
3858
+ * @type {string}
3859
+ * @memberof CompanyCatalogResponseData
3860
+ */
3861
+ preventSelfServiceDowngradeUrl?: string | null;
3862
+ /**
3863
+ *
3864
+ * @type {string}
3865
+ * @memberof CompanyCatalogResponseData
3866
+ */
3867
+ pricingModel?: string | null;
3868
+ /**
3869
+ *
3870
+ * @type {string}
3871
+ * @memberof CompanyCatalogResponseData
3872
+ */
3873
+ pricingUrl?: string | null;
3874
+ /**
3875
+ * The plan a trialing company lands on when its trial ends, when configured and offered by this catalog. Catalog configuration, surfaced here so the trial notice can render before any plan change.
3876
+ * @type {CatalogPlanRefResponseData}
3877
+ * @memberof CompanyCatalogResponseData
3878
+ */
3879
+ trialExpiryPlan?: CatalogPlanRefResponseData;
3880
+ /**
3881
+ * Whether starting a trial requires a payment method; a null value means required.
3882
+ * @type {boolean}
3883
+ * @memberof CompanyCatalogResponseData
3884
+ */
3885
+ trialPaymentMethodRequired?: boolean | null;
3886
+ }
3887
+
1205
3888
  /**
1206
3889
  *
1207
3890
  * @export
@@ -1504,6 +4187,18 @@ declare interface CompanyCreditAutoTopupResponseData {
1504
4187
  * @interface CompanyCreditBalance
1505
4188
  */
1506
4189
  export declare interface CompanyCreditBalance {
4190
+ /**
4191
+ * For a postpaid credit, how far below zero the balance may run. Absent when the credit is not postpaid or postpaid has no limit
4192
+ * @type {number}
4193
+ * @memberof CompanyCreditBalance
4194
+ */
4195
+ overdraftLimit?: number | null;
4196
+ /**
4197
+ * Whether consumption may continue past a zero balance. When true and overdraft_limit is absent, the balance has no floor
4198
+ * @type {boolean}
4199
+ * @memberof CompanyCreditBalance
4200
+ */
4201
+ postpaid: boolean;
1507
4202
  /**
1508
4203
  * Remaining credit, excluding any open lease hold (the value SDKs gate on)
1509
4204
  * @type {number}
@@ -2326,18 +5021,78 @@ declare interface CompanyPaymentMethodResponseData {
2326
5021
  */
2327
5022
  isDefault: boolean;
2328
5023
  /**
2329
- * The Stripe payment method type, such as card or us_bank_account.
5024
+ * The Stripe payment method type, such as card or us_bank_account.
5025
+ * @type {string}
5026
+ * @memberof CompanyPaymentMethodResponseData
5027
+ */
5028
+ type: string;
5029
+ }
5030
+
5031
+ /** A plan or add-on the company holds, at the price it is billed. */
5032
+ export declare type CompanyPlan = CompanyContextPlanResponseData;
5033
+
5034
+ /**
5035
+ *
5036
+ * @export
5037
+ */
5038
+ declare const CompanyPlanInvalidReason: {
5039
+ readonly DowngradeNotPermitted: "downgrade_not_permitted";
5040
+ readonly FeatureUsageExceeded: "feature_usage_exceeded";
5041
+ };
5042
+
5043
+ declare type CompanyPlanInvalidReason = (typeof CompanyPlanInvalidReason)[keyof typeof CompanyPlanInvalidReason];
5044
+
5045
+ export declare type CompanySubscription = CompanyContextSubscriptionResponseData;
5046
+
5047
+ /**
5048
+ * Schematic API
5049
+ * Schematic API
5050
+ *
5051
+ * The version of the OpenAPI document: 0.1
5052
+ *
5053
+ *
5054
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
5055
+ * https://openapi-generator.tech
5056
+ * Do not edit the class manually.
5057
+ */
5058
+ /**
5059
+ *
5060
+ * @export
5061
+ * @interface CompanyTaxIDView
5062
+ */
5063
+ declare interface CompanyTaxIDView {
5064
+ /**
5065
+ *
5066
+ * @type {string}
5067
+ * @memberof CompanyTaxIDView
5068
+ */
5069
+ country: string;
5070
+ /**
5071
+ *
5072
+ * @type {string}
5073
+ * @memberof CompanyTaxIDView
5074
+ */
5075
+ id: string;
5076
+ /**
5077
+ *
5078
+ * @type {string}
5079
+ * @memberof CompanyTaxIDView
5080
+ */
5081
+ type: string;
5082
+ /**
5083
+ *
5084
+ * @type {string}
5085
+ * @memberof CompanyTaxIDView
5086
+ */
5087
+ value: string;
5088
+ /**
5089
+ *
2330
5090
  * @type {string}
2331
- * @memberof CompanyPaymentMethodResponseData
5091
+ * @memberof CompanyTaxIDView
2332
5092
  */
2333
- type: string;
5093
+ verificationStatus?: string | null;
2334
5094
  }
2335
5095
 
2336
- /** A plan or add-on the company holds, at the price it is billed. */
2337
- export declare type CompanyPlan = CompanyContextPlanResponseData;
2338
-
2339
- export declare type CompanySubscription = CompanyContextSubscriptionResponseData;
2340
-
2341
5096
  /**
2342
5097
  *
2343
5098
  * @export
@@ -2541,6 +5296,12 @@ export declare type CreditSpendPolicy = {
2541
5296
  * @interface CreditSpendPolicy
2542
5297
  */
2543
5298
  declare interface CreditSpendPolicy_2 {
5299
+ /**
5300
+ * For a user policy, the company it applies in
5301
+ * @type {string}
5302
+ * @memberof CreditSpendPolicy
5303
+ */
5304
+ companyId?: string | null;
2544
5305
  /**
2545
5306
  * How much of the limit is already spent in the current period
2546
5307
  * @type {number}
@@ -2862,6 +5623,8 @@ declare interface DatastreamCompanyPlan {
2862
5623
 
2863
5624
  declare function DatastreamCompanyPlanFromJSON(json: any): DatastreamCompanyPlan;
2864
5625
 
5626
+ export declare const DEFAULT_CATALOG_QUERY: CatalogQuery;
5627
+
2865
5628
  export declare const DEFAULT_INVOICE_QUERY: InvoiceQuery;
2866
5629
 
2867
5630
  export declare type Discount = CompanyDiscountResponseData;
@@ -2888,6 +5651,7 @@ declare type EntitlementPriceBehavior = (typeof EntitlementPriceBehavior)[keyof
2888
5651
  */
2889
5652
  declare const EntitlementType: {
2890
5653
  readonly CompanyOverride: "company_override";
5654
+ readonly PlanCreditGrant: "plan_credit_grant";
2891
5655
  readonly PlanEntitlement: "plan_entitlement";
2892
5656
  readonly Unknown: "unknown";
2893
5657
  };
@@ -3345,6 +6109,12 @@ declare const MetricPeriodMonthReset_2: {
3345
6109
 
3346
6110
  declare type MetricPeriodMonthReset_2 = (typeof MetricPeriodMonthReset_2)[keyof typeof MetricPeriodMonthReset_2];
3347
6111
 
6112
+ /** As `normalizeInvoiceQuery`: only the catalog id keys a catalog. */
6113
+ export declare function normalizeCatalogQuery(query: CatalogQuery): CatalogQuery;
6114
+
6115
+ /** As for invoices: `{ catalogId: undefined }` is the same resource as `{}`. */
6116
+ declare function normalizeCatalogQuery_2(query: CatalogQuery): CatalogQuery;
6117
+
3348
6118
  /**
3349
6119
  * Keeps only the fields the request reads. The store keys a row set by the
3350
6120
  * query's shape, so a field the API never sees would key a row set of its
@@ -3407,9 +6177,131 @@ declare type PlanCreditGrantScaling = (typeof PlanCreditGrantScaling)[keyof type
3407
6177
 
3408
6178
  declare type PlanListenerFn = CheckPlanReturnListenerFn | EmptyListenerFn;
3409
6179
 
6180
+ /**
6181
+ *
6182
+ * @export
6183
+ */
6184
+ declare const PlanPriceCadence: {
6185
+ readonly Monthly: "monthly";
6186
+ readonly Quarterly: "quarterly";
6187
+ readonly Yearly: "yearly";
6188
+ };
6189
+
6190
+ declare type PlanPriceCadence = (typeof PlanPriceCadence)[keyof typeof PlanPriceCadence];
6191
+
6192
+ /**
6193
+ *
6194
+ * @export
6195
+ */
6196
+ declare const ProrationBehavior: {
6197
+ readonly CreateProrations: "create_prorations";
6198
+ readonly InvoiceImmediately: "invoice_immediately";
6199
+ };
6200
+
6201
+ declare type ProrationBehavior = (typeof ProrationBehavior)[keyof typeof ProrationBehavior];
6202
+
6203
+ /**
6204
+ *
6205
+ * @export
6206
+ */
6207
+ declare const ProrationLineKind: {
6208
+ readonly Charge: "charge";
6209
+ readonly Credit: "credit";
6210
+ };
6211
+
6212
+ declare type ProrationLineKind = (typeof ProrationLineKind)[keyof typeof ProrationLineKind];
6213
+
6214
+ /**
6215
+ * The catalog with no company to stand against it: no `current`, `valid` or
6216
+ * trial standing on its plans, and no checkout settings, since nobody is
6217
+ * signed in to check out.
6218
+ */
6219
+ export declare type PublicCatalog = PublicCatalogResponseData;
6220
+
6221
+ export declare type PublicCatalogPlan = CatalogPlanResponseData;
6222
+
6223
+ /**
6224
+ *
6225
+ * @export
6226
+ * @interface PublicCatalogResponseData
6227
+ */
6228
+ declare interface PublicCatalogResponseData {
6229
+ /**
6230
+ *
6231
+ * @type {Array<CatalogPlanResponseData>}
6232
+ * @memberof PublicCatalogResponseData
6233
+ */
6234
+ addOns: Array<CatalogPlanResponseData>;
6235
+ /**
6236
+ *
6237
+ * @type {CatalogCapabilitiesResponseData}
6238
+ * @memberof PublicCatalogResponseData
6239
+ */
6240
+ capabilities: CatalogCapabilitiesResponseData;
6241
+ /**
6242
+ *
6243
+ * @type {Array<CatalogCreditBundleResponseData>}
6244
+ * @memberof PublicCatalogResponseData
6245
+ */
6246
+ creditBundles: Array<CatalogCreditBundleResponseData>;
6247
+ /**
6248
+ * Present when the catalog offers a custom plan; absent when custom plans are hidden.
6249
+ * @type {CatalogCustomPlanCTAResponseData}
6250
+ * @memberof PublicCatalogResponseData
6251
+ */
6252
+ customPlanCta?: CatalogCustomPlanCTAResponseData;
6253
+ /**
6254
+ * ISO 4217 currency of every top-level price slot; currency_prices carries the others.
6255
+ * @type {Currency}
6256
+ * @memberof PublicCatalogResponseData
6257
+ */
6258
+ defaultCurrency: Currency;
6259
+ /**
6260
+ *
6261
+ * @type {string}
6262
+ * @memberof PublicCatalogResponseData
6263
+ */
6264
+ description?: string | null;
6265
+ /**
6266
+ *
6267
+ * @type {string}
6268
+ * @memberof PublicCatalogResponseData
6269
+ */
6270
+ id: string;
6271
+ /**
6272
+ *
6273
+ * @type {string}
6274
+ * @memberof PublicCatalogResponseData
6275
+ */
6276
+ name: string;
6277
+ /**
6278
+ *
6279
+ * @type {Array<CatalogPlanResponseData>}
6280
+ * @memberof PublicCatalogResponseData
6281
+ */
6282
+ plans: Array<CatalogPlanResponseData>;
6283
+ /**
6284
+ *
6285
+ * @type {string}
6286
+ * @memberof PublicCatalogResponseData
6287
+ */
6288
+ pricingModel?: string | null;
6289
+ /**
6290
+ *
6291
+ * @type {string}
6292
+ * @memberof PublicCatalogResponseData
6293
+ */
6294
+ pricingUrl?: string | null;
6295
+ }
6296
+
3410
6297
  declare interface RequestOptions {
3411
6298
  method?: string;
3412
6299
  body?: unknown;
6300
+ /**
6301
+ * Sent beside the client's own. The credential is the session's and cannot
6302
+ * be replaced from here.
6303
+ */
6304
+ headers?: Record<string, string>;
3413
6305
  /**
3414
6306
  * Success statuses that carry no body — a 204 for a resource that is
3415
6307
  * legitimately absent. The request resolves `undefined` for them, which
@@ -3468,6 +6360,17 @@ declare type RuleType_2 = (typeof RuleType_2)[keyof typeof RuleType_2];
3468
6360
 
3469
6361
  export declare type ScheduledDowngrade = CompanyContextScheduledDowngradeResponseData;
3470
6362
 
6363
+ /**
6364
+ *
6365
+ * @export
6366
+ */
6367
+ declare const ScheduledDowngradeConfigBehavior: {
6368
+ readonly EndOfBillingPeriod: "end_of_billing_period";
6369
+ readonly None: "none";
6370
+ };
6371
+
6372
+ declare type ScheduledDowngradeConfigBehavior = (typeof ScheduledDowngradeConfigBehavior)[keyof typeof ScheduledDowngradeConfigBehavior];
6373
+
3471
6374
  export declare class Schematic {
3472
6375
  private _additionalHeaders;
3473
6376
  private apiKey;
@@ -3521,6 +6424,8 @@ export declare class Schematic {
3521
6424
  constructor(apiKey: string, options?: SchematicOptions);
3522
6425
  get apiUrl(): string;
3523
6426
  get additionalHeaders(): Record<string, string>;
6427
+ /** The key flags are read with, for a billing client reading beside it. */
6428
+ get publishableKey(): string;
3524
6429
  /**
3525
6430
  * Resolve fallback value according to priority order:
3526
6431
  * 1. Callsite fallback value (if provided)
@@ -3772,8 +6677,18 @@ declare class SchematicBillingClient implements BillingClient {
3772
6677
  constructor(options?: BillingClientOptions | SchematicSession);
3773
6678
  get sessionKey(): string | undefined;
3774
6679
  get sessionStatus(): SessionStatus;
6680
+ get hasPublishableKey(): boolean;
3775
6681
  setSession(session: SessionInput): void;
3776
6682
  onSessionChange(listener: (event: SessionEvent) => void): () => void;
6683
+ fetchCatalog(query?: CatalogQuery): Promise<Catalog>;
6684
+ fetchPublicCatalog(query?: CatalogQuery): Promise<PublicCatalog>;
6685
+ createCheckout(selections: CheckoutSelections): Promise<CheckoutWrite>;
6686
+ getCheckout(id: string): Promise<Checkout>;
6687
+ updateCheckout(id: string, version: number, selections: CheckoutSelections): Promise<CheckoutWrite>;
6688
+ finalizeCheckout(id: string, version: number, options?: {
6689
+ sessionId?: string;
6690
+ }): Promise<CheckoutResult>;
6691
+ private checkoutWrite;
3777
6692
  fetchInvoices(params: InvoicesRequest): Promise<InvoicesResult>;
3778
6693
  fetchUpcomingInvoice(): Promise<UpcomingInvoice | null>;
3779
6694
  fetchPaymentMethods(): Promise<PaymentMethod[]>;
@@ -3781,6 +6696,8 @@ declare class SchematicBillingClient implements BillingClient {
3781
6696
  updatePaymentMethod(externalId: string): Promise<void>;
3782
6697
  deletePaymentMethod(id: string): Promise<void>;
3783
6698
  cancelSubscription(): Promise<void>;
6699
+ fetchTaxIds(): Promise<TaxId[]>;
6700
+ updateTaxId(taxId: TaxIdInput): Promise<TaxId[]>;
3784
6701
  fetchFeatureUsage(): Promise<FeatureUsage[]>;
3785
6702
  fetchCompany(): Promise<Company>;
3786
6703
  fetchCreditBalances(): Promise<CreditBalanceEntry[]>;
@@ -3849,9 +6766,12 @@ declare namespace SchematicJS {
3849
6766
  export {
3850
6767
  CheckFlagResponseFromJSON,
3851
6768
  CheckFlagsResponseFromJSON,
6769
+ checkoutProblemsOf,
6770
+ checkoutSelectionsToJSON,
3852
6771
  DatastreamCompanyPlanFromJSON,
3853
6772
  EventBodyFlagCheckToJSON,
3854
6773
  fetchBillingData,
6774
+ normalizeCatalogQuery_2 as normalizeCatalogQuery,
3855
6775
  normalizeInvoiceQuery_2 as normalizeInvoiceQuery,
3856
6776
  sessionKey,
3857
6777
  AccessToken,
@@ -3866,18 +6786,54 @@ declare namespace SchematicJS {
3866
6786
  BillingResourceParams_2 as BillingResourceParams,
3867
6787
  BillingResources_2 as BillingResources,
3868
6788
  BooleanListenerFn,
6789
+ Catalog,
6790
+ CatalogAutoTopup,
6791
+ CatalogAutoTopupResponseData,
6792
+ CatalogBundleCurrencyPriceResponseData,
6793
+ CatalogCheckoutField,
6794
+ CatalogCheckoutFieldResponseData,
6795
+ CatalogCheckoutSettingsResponseData,
6796
+ CatalogCompanyPlanResponseData,
6797
+ CatalogCreditBundle,
6798
+ CatalogCreditBundleResponseData,
3869
6799
  CatalogCreditGrantResponseData,
6800
+ CatalogCurrencyPricesResponseData,
6801
+ CatalogEntitlement,
6802
+ CatalogPlan,
6803
+ CatalogPlanEntitlementResponseData,
6804
+ CatalogPlanResponseData,
3870
6805
  CatalogPriceResponseData,
3871
6806
  CatalogPriceTierResponseData,
6807
+ CatalogQuery,
6808
+ CatalogView,
3872
6809
  CheckFlagResponseData,
3873
6810
  CheckFlagReturn,
3874
6811
  CheckFlagReturnFromJSON,
3875
6812
  CheckFlagReturnListenerFn,
3876
6813
  CheckOptions,
6814
+ Checkout,
6815
+ CHECKOUT_SESSION_HEADER,
6816
+ CheckoutDraft,
6817
+ CheckoutDraftOptions,
6818
+ CheckoutDraftResponseData,
6819
+ CheckoutDraftState,
6820
+ CheckoutIntent,
6821
+ CheckoutPriceSnapshot,
6822
+ CheckoutProblem,
6823
+ CheckoutProblemCode,
6824
+ CheckoutProblemResponseData,
6825
+ CheckoutProblemSource,
6826
+ CheckoutResponseData,
6827
+ CheckoutResult,
6828
+ CheckoutSelections,
6829
+ CheckoutStatus,
6830
+ CheckoutTransport,
6831
+ CheckoutWrite,
3877
6832
  CheckPlanReturn,
3878
6833
  CheckPlanReturnFromJSON,
3879
6834
  CheckPlanReturnListenerFn,
3880
6835
  Company,
6836
+ CompanyCatalogResponseData,
3881
6837
  CompanyContextCustomPlanBillingResponseData,
3882
6838
  CompanyContextPlanResponseData,
3883
6839
  CompanyContextResponseData,
@@ -3897,6 +6853,7 @@ declare namespace SchematicJS {
3897
6853
  CompanyPaymentMethodResponseData,
3898
6854
  CompanyPlan,
3899
6855
  CompanySubscription,
6856
+ CompanyTaxIDView,
3900
6857
  CompanyUpcomingInvoiceResponseData,
3901
6858
  CompanyUserUsageResponseData,
3902
6859
  ContextSignatureProvider,
@@ -3921,6 +6878,7 @@ declare namespace SchematicJS {
3921
6878
  CreditUserUsage,
3922
6879
  CreditUserUsageRow,
3923
6880
  CustomPlanBilling,
6881
+ DEFAULT_CATALOG_QUERY,
3924
6882
  DEFAULT_INVOICE_QUERY,
3925
6883
  Discount,
3926
6884
  EmptyListenerFn,
@@ -3948,6 +6906,9 @@ declare namespace SchematicJS {
3948
6906
  PendingListenerFn,
3949
6907
  PerLicenseCreditGrant,
3950
6908
  PlanListenerFn,
6909
+ PublicCatalog,
6910
+ PublicCatalogPlan,
6911
+ PublicCatalogResponseData,
3951
6912
  RequestOptions,
3952
6913
  ResourceState,
3953
6914
  RuleType,
@@ -3967,6 +6928,10 @@ declare namespace SchematicJS {
3967
6928
  SetupIntentResponseData,
3968
6929
  SINGLETON,
3969
6930
  StoragePersister,
6931
+ TaxId,
6932
+ TaxIDInput,
6933
+ TaxIdInput,
6934
+ TaxIdType,
3970
6935
  TOKEN_CACHE_SIZE,
3971
6936
  Traits,
3972
6937
  TrialStatus,
@@ -4066,6 +7031,7 @@ declare class SchematicSession {
4066
7031
  private readonly _apiUrl;
4067
7032
  private readonly _headers;
4068
7033
  private readonly _fetch;
7034
+ private readonly _publishableKey;
4069
7035
  private _session;
4070
7036
  private readonly _tokens;
4071
7037
  private readonly _resolving;
@@ -4078,6 +7044,7 @@ declare class SchematicSession {
4078
7044
  private readonly _listeners;
4079
7045
  constructor(options?: SessionOptions);
4080
7046
  get key(): string | undefined;
7047
+ get hasPublishableKey(): boolean;
4081
7048
  get status(): SessionStatus;
4082
7049
  /** Only a statement that changes which pair is read counts as a change. */
4083
7050
  set(session: SessionInput): void;
@@ -4098,6 +7065,21 @@ declare class SchematicSession {
4098
7065
  * otherwise come back as the answer to a question asked for another pair.
4099
7066
  */
4100
7067
  request(path: string, options?: RequestOptions): Promise<unknown>;
7068
+ /**
7069
+ * A read under the publishable key, whatever the session. Nothing is
7070
+ * refreshed or retried, since the key does not expire, and a session
7071
+ * changing mid-flight does not void the answer: it is the same for
7072
+ * everyone.
7073
+ */
7074
+ requestPublic(path: string): Promise<unknown>;
7075
+ /**
7076
+ * `request`, with the headers the answer came back with — for a resource
7077
+ * whose protocol rides beside the body, as a checkout's session does.
7078
+ */
7079
+ requestWithResponse(path: string, options?: RequestOptions): Promise<{
7080
+ body: unknown;
7081
+ headers: Headers;
7082
+ }>;
4101
7083
  }
4102
7084
 
4103
7085
  /**
@@ -4148,6 +7130,11 @@ declare function sessionKey(session: Session): string;
4148
7130
 
4149
7131
  declare interface SessionOptions {
4150
7132
  session?: SessionInput;
7133
+ /**
7134
+ * For the reads that belong to no session: the public catalog, which a
7135
+ * page renders before anyone has signed in.
7136
+ */
7137
+ publishableKey?: string;
4151
7138
  apiUrl?: string;
4152
7139
  additionalHeaders?: Record<string, string>;
4153
7140
  /** Override for tests and non-browser runtimes. */
@@ -4220,6 +7207,89 @@ export declare type StoragePersister = {
4220
7207
  /** Copy overrides by key. Keys are the element package's `StringKey`s. */
4221
7208
  export declare type StringOverrides = Record<string, string | undefined>;
4222
7209
 
7210
+ /** One tax ID on file, as the provider verified it. */
7211
+ export declare type TaxId = CompanyTaxIDView;
7212
+
7213
+ /**
7214
+ *
7215
+ * @export
7216
+ * @interface TaxIDInput
7217
+ */
7218
+ declare interface TaxIDInput {
7219
+ /**
7220
+ *
7221
+ * @type {TaxIdType}
7222
+ * @memberof TaxIDInput
7223
+ */
7224
+ type: TaxIdType;
7225
+ /**
7226
+ *
7227
+ * @type {string}
7228
+ * @memberof TaxIDInput
7229
+ */
7230
+ value: string;
7231
+ }
7232
+
7233
+ /** A tax ID to set: its provider type (`eu_vat`, `us_ein`, …) and value. */
7234
+ export declare type TaxIdInput = TaxIDInput;
7235
+
7236
+ export declare interface TaxIdsHandle extends ResourceHandle<TaxId[]> {
7237
+ /**
7238
+ * Sets the company's tax ID; `data` holds what is on file once it has.
7239
+ * Rejects with the failure and records it on `mutationError`.
7240
+ */
7241
+ update: (taxId: TaxIdInput) => Promise<void>;
7242
+ isMutating: boolean;
7243
+ mutationError: Error | undefined;
7244
+ }
7245
+
7246
+ /**
7247
+ *
7248
+ * @export
7249
+ */
7250
+ declare const TaxIdType: {
7251
+ readonly AeTrn: "ae_trn";
7252
+ readonly AuAbn: "au_abn";
7253
+ readonly AuArn: "au_arn";
7254
+ readonly BrCnpj: "br_cnpj";
7255
+ readonly BrCpf: "br_cpf";
7256
+ readonly CaBn: "ca_bn";
7257
+ readonly CaGstHst: "ca_gst_hst";
7258
+ readonly CaPstBc: "ca_pst_bc";
7259
+ readonly CaPstMb: "ca_pst_mb";
7260
+ readonly CaPstSk: "ca_pst_sk";
7261
+ readonly CaQst: "ca_qst";
7262
+ readonly ChUid: "ch_uid";
7263
+ readonly ChVat: "ch_vat";
7264
+ readonly EuVat: "eu_vat";
7265
+ readonly GbVat: "gb_vat";
7266
+ readonly HkBr: "hk_br";
7267
+ readonly IdNpwp: "id_npwp";
7268
+ readonly IlVat: "il_vat";
7269
+ readonly InGst: "in_gst";
7270
+ readonly JpCn: "jp_cn";
7271
+ readonly JpRn: "jp_rn";
7272
+ readonly JpTrn: "jp_trn";
7273
+ readonly KrBrn: "kr_brn";
7274
+ readonly MxRfc: "mx_rfc";
7275
+ readonly MyFrp: "my_frp";
7276
+ readonly MyItn: "my_itn";
7277
+ readonly MySst: "my_sst";
7278
+ readonly NoVat: "no_vat";
7279
+ readonly NzGst: "nz_gst";
7280
+ readonly PhTin: "ph_tin";
7281
+ readonly SaVat: "sa_vat";
7282
+ readonly SgGst: "sg_gst";
7283
+ readonly SgUen: "sg_uen";
7284
+ readonly ThVat: "th_vat";
7285
+ readonly TrTin: "tr_tin";
7286
+ readonly TwVat: "tw_vat";
7287
+ readonly UsEin: "us_ein";
7288
+ readonly ZaVat: "za_vat";
7289
+ };
7290
+
7291
+ declare type TaxIdType = (typeof TaxIdType)[keyof typeof TaxIdType];
7292
+
4223
7293
  /**
4224
7294
  * Sessions whose credentials are kept. A reader switching between the
4225
7295
  * organizations they belong to walks a handful of them and comes back, and
@@ -4282,6 +7352,142 @@ export declare interface UnsubscribeHandle {
4282
7352
 
4283
7353
  export declare type UpcomingInvoice = CompanyUpcomingInvoiceResponseData;
4284
7354
 
7355
+ /**
7356
+ * Schematic API
7357
+ * Schematic API
7358
+ *
7359
+ * The version of the OpenAPI document: 0.1
7360
+ *
7361
+ *
7362
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
7363
+ * https://openapi-generator.tech
7364
+ * Do not edit the class manually.
7365
+ */
7366
+ /**
7367
+ *
7368
+ * @export
7369
+ * @interface UpdateAddOnRequestBody
7370
+ */
7371
+ declare interface UpdateAddOnRequestBody {
7372
+ /**
7373
+ *
7374
+ * @type {string}
7375
+ * @memberof UpdateAddOnRequestBody
7376
+ */
7377
+ addOnId: string;
7378
+ /**
7379
+ *
7380
+ * @type {string}
7381
+ * @memberof UpdateAddOnRequestBody
7382
+ */
7383
+ priceId: string;
7384
+ }
7385
+
7386
+ /**
7387
+ * Schematic API
7388
+ * Schematic API
7389
+ *
7390
+ * The version of the OpenAPI document: 0.1
7391
+ *
7392
+ *
7393
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
7394
+ * https://openapi-generator.tech
7395
+ * Do not edit the class manually.
7396
+ */
7397
+ /**
7398
+ *
7399
+ * @export
7400
+ * @interface UpdateAutoTopupOverrideRequestBody
7401
+ */
7402
+ declare interface UpdateAutoTopupOverrideRequestBody {
7403
+ /**
7404
+ *
7405
+ * @type {number}
7406
+ * @memberof UpdateAutoTopupOverrideRequestBody
7407
+ */
7408
+ autoTopupAmount?: number | null;
7409
+ /**
7410
+ *
7411
+ * @type {boolean}
7412
+ * @memberof UpdateAutoTopupOverrideRequestBody
7413
+ */
7414
+ autoTopupEnabled?: boolean | null;
7415
+ /**
7416
+ *
7417
+ * @type {number}
7418
+ * @memberof UpdateAutoTopupOverrideRequestBody
7419
+ */
7420
+ autoTopupThresholdCredits?: number | null;
7421
+ /**
7422
+ *
7423
+ * @type {string}
7424
+ * @memberof UpdateAutoTopupOverrideRequestBody
7425
+ */
7426
+ planCreditGrantId: string;
7427
+ }
7428
+
7429
+ /**
7430
+ * Schematic API
7431
+ * Schematic API
7432
+ *
7433
+ * The version of the OpenAPI document: 0.1
7434
+ *
7435
+ *
7436
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
7437
+ * https://openapi-generator.tech
7438
+ * Do not edit the class manually.
7439
+ */
7440
+ /**
7441
+ *
7442
+ * @export
7443
+ * @interface UpdateCreditBundleRequestBody
7444
+ */
7445
+ declare interface UpdateCreditBundleRequestBody {
7446
+ /**
7447
+ *
7448
+ * @type {string}
7449
+ * @memberof UpdateCreditBundleRequestBody
7450
+ */
7451
+ bundleId: string;
7452
+ /**
7453
+ *
7454
+ * @type {number}
7455
+ * @memberof UpdateCreditBundleRequestBody
7456
+ */
7457
+ quantity: number;
7458
+ }
7459
+
7460
+ /**
7461
+ * Schematic API
7462
+ * Schematic API
7463
+ *
7464
+ * The version of the OpenAPI document: 0.1
7465
+ *
7466
+ *
7467
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
7468
+ * https://openapi-generator.tech
7469
+ * Do not edit the class manually.
7470
+ */
7471
+ /**
7472
+ *
7473
+ * @export
7474
+ * @interface UpdatePayInAdvanceRequestBody
7475
+ */
7476
+ declare interface UpdatePayInAdvanceRequestBody {
7477
+ /**
7478
+ *
7479
+ * @type {string}
7480
+ * @memberof UpdatePayInAdvanceRequestBody
7481
+ */
7482
+ priceId: string;
7483
+ /**
7484
+ *
7485
+ * @type {number}
7486
+ * @memberof UpdatePayInAdvanceRequestBody
7487
+ */
7488
+ quantity: number;
7489
+ }
7490
+
4285
7491
  export declare enum UsagePeriod {
4286
7492
  ALL_TIME = "all_time",
4287
7493
  CURRENT_DAY = "current_day",
@@ -4291,6 +7497,30 @@ export declare enum UsagePeriod {
4291
7497
 
4292
7498
  export declare function useBillingDataSource(): BillingDataSource;
4293
7499
 
7500
+ /**
7501
+ * The catalog as whoever is reading sees it. Signed in, the company's view:
7502
+ * what it can buy, and how it stands against each plan and add-on. Signed
7503
+ * out, or before the session resolves, the public catalog, read with the
7504
+ * publishable key; `data.source` says which, and a session starting swaps
7505
+ * one for the other. Without a `catalogId`, the catalog the environment
7506
+ * sells; an inline object literal is fine, the hook keys by value.
7507
+ */
7508
+ export declare function useCatalog(query?: CatalogQuery): ResourceHandle<CatalogView>;
7509
+
7510
+ /**
7511
+ * A persisted checkout: the first `setSelections` opens it, each later one
7512
+ * replaces the cart and re-prices it, and `finalize` charges it. The server
7513
+ * has no notion of steps, and neither does this: a component sequences its
7514
+ * own and hands over the whole cart each time it changes. One checkout per
7515
+ * component that calls this; the session changing drops it.
7516
+ */
7517
+ export declare function useCheckout(options?: UseCheckoutOptions): CheckoutHandle;
7518
+
7519
+ export declare interface UseCheckoutOptions {
7520
+ /** Resume this checkout rather than opening one on the first write. */
7521
+ checkoutId?: string;
7522
+ }
7523
+
4294
7524
  /**
4295
7525
  * The company's plan and add-ons at their billed prices, its subscription,
4296
7526
  * any scheduled downgrade and any pending custom plan billing. `undefined`
@@ -4413,6 +7643,12 @@ export declare function useSchematicTranslate(): Translate | undefined;
4413
7643
  */
4414
7644
  export declare function useSetupIntent(): SetupIntentHandle;
4415
7645
 
7646
+ /**
7647
+ * The tax IDs on the company's billing customer, with the write that sets
7648
+ * one. `data` is empty when there are none; `undefined` means not loaded.
7649
+ */
7650
+ export declare function useTaxIds(): TaxIdsHandle;
7651
+
4416
7652
  /**
4417
7653
  * Cancels the company's subscription. Subscribes to no resource: read the
4418
7654
  * subscription's state from `useCompany`, which reloads once this lands.