@schematichq/schematic-react 1.12.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/schematic-react.cjs.js +548 -13
- package/dist/schematic-react.d.ts +558 -21
- package/dist/schematic-react.esm.js +548 -13
- package/package.json +4 -4
|
@@ -121,6 +121,42 @@ declare namespace billingApi {
|
|
|
121
121
|
CatalogPriceTierResponseDataToJSON,
|
|
122
122
|
CatalogPriceTierResponseDataToJSONTyped,
|
|
123
123
|
CatalogPriceTierResponseData,
|
|
124
|
+
instanceOfCompanyContextCustomPlanBillingResponseData,
|
|
125
|
+
CompanyContextCustomPlanBillingResponseDataFromJSON,
|
|
126
|
+
CompanyContextCustomPlanBillingResponseDataFromJSONTyped,
|
|
127
|
+
CompanyContextCustomPlanBillingResponseDataToJSON,
|
|
128
|
+
CompanyContextCustomPlanBillingResponseDataToJSONTyped,
|
|
129
|
+
CompanyContextCustomPlanBillingResponseData,
|
|
130
|
+
instanceOfCompanyContextPlanResponseData,
|
|
131
|
+
CompanyContextPlanResponseDataFromJSON,
|
|
132
|
+
CompanyContextPlanResponseDataFromJSONTyped,
|
|
133
|
+
CompanyContextPlanResponseDataToJSON,
|
|
134
|
+
CompanyContextPlanResponseDataToJSONTyped,
|
|
135
|
+
CompanyContextPlanResponseData,
|
|
136
|
+
instanceOfCompanyContextResponseData,
|
|
137
|
+
CompanyContextResponseDataFromJSON,
|
|
138
|
+
CompanyContextResponseDataFromJSONTyped,
|
|
139
|
+
CompanyContextResponseDataToJSON,
|
|
140
|
+
CompanyContextResponseDataToJSONTyped,
|
|
141
|
+
CompanyContextResponseData,
|
|
142
|
+
instanceOfCompanyContextScheduledDowngradeResponseData,
|
|
143
|
+
CompanyContextScheduledDowngradeResponseDataFromJSON,
|
|
144
|
+
CompanyContextScheduledDowngradeResponseDataFromJSONTyped,
|
|
145
|
+
CompanyContextScheduledDowngradeResponseDataToJSON,
|
|
146
|
+
CompanyContextScheduledDowngradeResponseDataToJSONTyped,
|
|
147
|
+
CompanyContextScheduledDowngradeResponseData,
|
|
148
|
+
instanceOfCompanyContextSubscriptionResponseData,
|
|
149
|
+
CompanyContextSubscriptionResponseDataFromJSON,
|
|
150
|
+
CompanyContextSubscriptionResponseDataFromJSONTyped,
|
|
151
|
+
CompanyContextSubscriptionResponseDataToJSON,
|
|
152
|
+
CompanyContextSubscriptionResponseDataToJSONTyped,
|
|
153
|
+
CompanyContextSubscriptionResponseData,
|
|
154
|
+
instanceOfCompanyCreditAutoTopupResponseData,
|
|
155
|
+
CompanyCreditAutoTopupResponseDataFromJSON,
|
|
156
|
+
CompanyCreditAutoTopupResponseDataFromJSONTyped,
|
|
157
|
+
CompanyCreditAutoTopupResponseDataToJSON,
|
|
158
|
+
CompanyCreditAutoTopupResponseDataToJSONTyped,
|
|
159
|
+
CompanyCreditAutoTopupResponseData,
|
|
124
160
|
instanceOfCompanyCreditBalanceResponseData,
|
|
125
161
|
CompanyCreditBalanceResponseDataFromJSON,
|
|
126
162
|
CompanyCreditBalanceResponseDataFromJSONTyped,
|
|
@@ -223,6 +259,18 @@ declare namespace billingApi {
|
|
|
223
259
|
CreateSetupIntentResponseToJSON,
|
|
224
260
|
CreateSetupIntentResponseToJSONTyped,
|
|
225
261
|
CreateSetupIntentResponse,
|
|
262
|
+
instanceOfCurrency,
|
|
263
|
+
CurrencyFromJSON,
|
|
264
|
+
CurrencyFromJSONTyped,
|
|
265
|
+
CurrencyToJSON,
|
|
266
|
+
CurrencyToJSONTyped,
|
|
267
|
+
Currency,
|
|
268
|
+
instanceOfCustomPlanActivationStrategy,
|
|
269
|
+
CustomPlanActivationStrategyFromJSON,
|
|
270
|
+
CustomPlanActivationStrategyFromJSONTyped,
|
|
271
|
+
CustomPlanActivationStrategyToJSON,
|
|
272
|
+
CustomPlanActivationStrategyToJSONTyped,
|
|
273
|
+
CustomPlanActivationStrategy,
|
|
226
274
|
instanceOfDeletePaymentMethodResponse,
|
|
227
275
|
DeletePaymentMethodResponseFromJSON,
|
|
228
276
|
DeletePaymentMethodResponseFromJSONTyped,
|
|
@@ -313,6 +361,12 @@ declare namespace billingApi {
|
|
|
313
361
|
GetCompanyPaymentMethodsResponseToJSON,
|
|
314
362
|
GetCompanyPaymentMethodsResponseToJSONTyped,
|
|
315
363
|
GetCompanyPaymentMethodsResponse,
|
|
364
|
+
instanceOfGetCompanyResponse,
|
|
365
|
+
GetCompanyResponseFromJSON,
|
|
366
|
+
GetCompanyResponseFromJSONTyped,
|
|
367
|
+
GetCompanyResponseToJSON,
|
|
368
|
+
GetCompanyResponseToJSONTyped,
|
|
369
|
+
GetCompanyResponse,
|
|
316
370
|
instanceOfGetCompanyUpcomingInvoiceResponse,
|
|
317
371
|
GetCompanyUpcomingInvoiceResponseFromJSON,
|
|
318
372
|
GetCompanyUpcomingInvoiceResponseFromJSONTyped,
|
|
@@ -396,6 +450,8 @@ declare interface BillingClient {
|
|
|
396
450
|
fetchCreditBalances(): Promise<CreditBalanceEntry[]>;
|
|
397
451
|
/** One credit's consumption by user over the span of its live grants. */
|
|
398
452
|
fetchCreditUserUsage(params: CreditUserUsageRequest): Promise<CreditUserUsage>;
|
|
453
|
+
/** The company's plan, add-ons, and subscription state. */
|
|
454
|
+
fetchCompany(): Promise<Company>;
|
|
399
455
|
readonly sessionStatus: SessionStatus;
|
|
400
456
|
readonly sessionKey: string | undefined;
|
|
401
457
|
setSession(session: SessionInput): void;
|
|
@@ -570,7 +626,7 @@ export declare function BillingProvider({ billingClient, children, initialData,
|
|
|
570
626
|
* much. Named apart from schematic-js's `BillingClient`, which is the whole
|
|
571
627
|
* interface; this is the part the hooks here call.
|
|
572
628
|
*/
|
|
573
|
-
export declare type BillingProviderClient = Pick<BillingClient, "sessionStatus" | "sessionKey" | "setSession" | "onSessionChange" | "fetchInvoices" | "fetchUpcomingInvoice" | "fetchPaymentMethods" | "createSetupIntent" | "updatePaymentMethod" | "deletePaymentMethod" | "fetchFeatureUsage" | "fetchFeatureUserUsage" | "fetchCreditBalances" | "fetchCreditUserUsage">;
|
|
629
|
+
export declare type BillingProviderClient = Pick<BillingClient, "sessionStatus" | "sessionKey" | "setSession" | "onSessionChange" | "fetchInvoices" | "fetchUpcomingInvoice" | "fetchPaymentMethods" | "createSetupIntent" | "updatePaymentMethod" | "deletePaymentMethod" | "fetchFeatureUsage" | "fetchFeatureUserUsage" | "fetchCreditBalances" | "fetchCreditUserUsage" | "fetchCompany">;
|
|
574
630
|
|
|
575
631
|
declare interface BillingProviderDataProps {
|
|
576
632
|
/**
|
|
@@ -610,7 +666,7 @@ declare interface BillingProviderDataProps {
|
|
|
610
666
|
export declare type BillingProviderProps = BillingProviderDataProps & SchematicI18nConfig;
|
|
611
667
|
|
|
612
668
|
/** The resources this package serves; a key of schematic-js's contract. */
|
|
613
|
-
export declare type BillingResourceName = "invoices" | "upcomingInvoice" | "paymentMethods" | "featureUsage" | "creditBalances";
|
|
669
|
+
export declare type BillingResourceName = "invoices" | "upcomingInvoice" | "paymentMethods" | "featureUsage" | "creditBalances" | "company";
|
|
614
670
|
|
|
615
671
|
declare type BillingResourceName_2 = keyof BillingResources_2;
|
|
616
672
|
|
|
@@ -623,6 +679,7 @@ declare interface BillingResourceParams_2 {
|
|
|
623
679
|
paymentMethods: Record<string, never>;
|
|
624
680
|
featureUsage: Record<string, never>;
|
|
625
681
|
creditBalances: Record<string, never>;
|
|
682
|
+
company: Record<string, never>;
|
|
626
683
|
}
|
|
627
684
|
|
|
628
685
|
export declare type BillingResources = Pick<BillingResources_2, BillingResourceName>;
|
|
@@ -659,6 +716,8 @@ declare interface BillingResources_2 {
|
|
|
659
716
|
* loaded.
|
|
660
717
|
*/
|
|
661
718
|
creditBalances: CreditBalanceEntry[];
|
|
719
|
+
/** `GET /company`. */
|
|
720
|
+
company: Company;
|
|
662
721
|
}
|
|
663
722
|
|
|
664
723
|
/**
|
|
@@ -756,10 +815,10 @@ declare interface CatalogCreditGrantResponseData {
|
|
|
756
815
|
declare interface CatalogPriceResponseData {
|
|
757
816
|
/**
|
|
758
817
|
*
|
|
759
|
-
* @type {
|
|
818
|
+
* @type {Currency}
|
|
760
819
|
* @memberof CatalogPriceResponseData
|
|
761
820
|
*/
|
|
762
|
-
currency:
|
|
821
|
+
currency: Currency;
|
|
763
822
|
/**
|
|
764
823
|
*
|
|
765
824
|
* @type {string}
|
|
@@ -1118,6 +1177,302 @@ declare const CheckPlanReturnFromJSON: (json: any) => CheckPlanReturn;
|
|
|
1118
1177
|
|
|
1119
1178
|
declare type CheckPlanReturnListenerFn = (value: CheckPlanReturn) => void;
|
|
1120
1179
|
|
|
1180
|
+
/**
|
|
1181
|
+
* The company. The server has already made the embed's derivations from its
|
|
1182
|
+
* hydrated `company`:
|
|
1183
|
+
*
|
|
1184
|
+
* * `subscription` is absent when the company has none, or several.
|
|
1185
|
+
* * `subscription.period` comes from its first recurring product, else its
|
|
1186
|
+
* interval; `subscription.nextBillAt` is the embed's next bill date.
|
|
1187
|
+
* * `customPlanBilling` is the newest pending one, with its `dueAt`.
|
|
1188
|
+
*/
|
|
1189
|
+
export declare type Company = CompanyContextResponseData;
|
|
1190
|
+
|
|
1191
|
+
/**
|
|
1192
|
+
*
|
|
1193
|
+
* @export
|
|
1194
|
+
* @interface CompanyContextCustomPlanBillingResponseData
|
|
1195
|
+
*/
|
|
1196
|
+
declare interface CompanyContextCustomPlanBillingResponseData {
|
|
1197
|
+
/**
|
|
1198
|
+
* on_payment: the plan activates once the invoice is paid. on_publish: the plan is active and ends unless the invoice is paid.
|
|
1199
|
+
* @type {CustomPlanActivationStrategy}
|
|
1200
|
+
* @memberof CompanyContextCustomPlanBillingResponseData
|
|
1201
|
+
*/
|
|
1202
|
+
activationStrategy: CustomPlanActivationStrategy;
|
|
1203
|
+
/**
|
|
1204
|
+
* When payment is due: days_until_due after the billing was published, else created.
|
|
1205
|
+
* @type {Date}
|
|
1206
|
+
* @memberof CompanyContextCustomPlanBillingResponseData
|
|
1207
|
+
*/
|
|
1208
|
+
dueAt: Date;
|
|
1209
|
+
/**
|
|
1210
|
+
* Where the company pays the invoice.
|
|
1211
|
+
* @type {string}
|
|
1212
|
+
* @memberof CompanyContextCustomPlanBillingResponseData
|
|
1213
|
+
*/
|
|
1214
|
+
invoiceUrl?: string | null;
|
|
1215
|
+
/**
|
|
1216
|
+
*
|
|
1217
|
+
* @type {string}
|
|
1218
|
+
* @memberof CompanyContextCustomPlanBillingResponseData
|
|
1219
|
+
*/
|
|
1220
|
+
planId: string;
|
|
1221
|
+
/**
|
|
1222
|
+
*
|
|
1223
|
+
* @type {string}
|
|
1224
|
+
* @memberof CompanyContextCustomPlanBillingResponseData
|
|
1225
|
+
*/
|
|
1226
|
+
planName?: string | null;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* Schematic API
|
|
1231
|
+
* Schematic API
|
|
1232
|
+
*
|
|
1233
|
+
* The version of the OpenAPI document: 0.1
|
|
1234
|
+
*
|
|
1235
|
+
*
|
|
1236
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1237
|
+
* https://openapi-generator.tech
|
|
1238
|
+
* Do not edit the class manually.
|
|
1239
|
+
*/
|
|
1240
|
+
/**
|
|
1241
|
+
*
|
|
1242
|
+
* @export
|
|
1243
|
+
* @interface CompanyContextPlanResponseData
|
|
1244
|
+
*/
|
|
1245
|
+
declare interface CompanyContextPlanResponseData {
|
|
1246
|
+
/**
|
|
1247
|
+
*
|
|
1248
|
+
* @type {string}
|
|
1249
|
+
* @memberof CompanyContextPlanResponseData
|
|
1250
|
+
*/
|
|
1251
|
+
description?: string | null;
|
|
1252
|
+
/**
|
|
1253
|
+
*
|
|
1254
|
+
* @type {string}
|
|
1255
|
+
* @memberof CompanyContextPlanResponseData
|
|
1256
|
+
*/
|
|
1257
|
+
id: string;
|
|
1258
|
+
/**
|
|
1259
|
+
* The credits the plan grants, in the plan's order.
|
|
1260
|
+
* @type {Array<string>}
|
|
1261
|
+
* @memberof CompanyContextPlanResponseData
|
|
1262
|
+
*/
|
|
1263
|
+
includedCreditIds: Array<string>;
|
|
1264
|
+
/**
|
|
1265
|
+
*
|
|
1266
|
+
* @type {string}
|
|
1267
|
+
* @memberof CompanyContextPlanResponseData
|
|
1268
|
+
*/
|
|
1269
|
+
name: string;
|
|
1270
|
+
/**
|
|
1271
|
+
* The period the plan is billed in: day, week, month, quarter, year, or one-time. Null when it is not billed.
|
|
1272
|
+
* @type {string}
|
|
1273
|
+
* @memberof CompanyContextPlanResponseData
|
|
1274
|
+
*/
|
|
1275
|
+
period?: string | null;
|
|
1276
|
+
/**
|
|
1277
|
+
* What the company is billed per period, in minor units of the subscription's currency. Null when it is not billed.
|
|
1278
|
+
* @type {number}
|
|
1279
|
+
* @memberof CompanyContextPlanResponseData
|
|
1280
|
+
*/
|
|
1281
|
+
price?: number | null;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
*
|
|
1286
|
+
* @export
|
|
1287
|
+
* @interface CompanyContextResponseData
|
|
1288
|
+
*/
|
|
1289
|
+
declare interface CompanyContextResponseData {
|
|
1290
|
+
/**
|
|
1291
|
+
* The add-ons the company holds.
|
|
1292
|
+
* @type {Array<CompanyContextPlanResponseData>}
|
|
1293
|
+
* @memberof CompanyContextResponseData
|
|
1294
|
+
*/
|
|
1295
|
+
addOns: Array<CompanyContextPlanResponseData>;
|
|
1296
|
+
/**
|
|
1297
|
+
* The newest custom plan billing awaiting payment or activation; null when none is pending.
|
|
1298
|
+
* @type {CompanyContextCustomPlanBillingResponseData}
|
|
1299
|
+
* @memberof CompanyContextResponseData
|
|
1300
|
+
*/
|
|
1301
|
+
customPlanBilling?: CompanyContextCustomPlanBillingResponseData;
|
|
1302
|
+
/**
|
|
1303
|
+
*
|
|
1304
|
+
* @type {string}
|
|
1305
|
+
* @memberof CompanyContextResponseData
|
|
1306
|
+
*/
|
|
1307
|
+
id: string;
|
|
1308
|
+
/**
|
|
1309
|
+
*
|
|
1310
|
+
* @type {string}
|
|
1311
|
+
* @memberof CompanyContextResponseData
|
|
1312
|
+
*/
|
|
1313
|
+
name: string;
|
|
1314
|
+
/**
|
|
1315
|
+
* The company's base plan; null when it has none.
|
|
1316
|
+
* @type {CompanyContextPlanResponseData}
|
|
1317
|
+
* @memberof CompanyContextResponseData
|
|
1318
|
+
*/
|
|
1319
|
+
plan?: CompanyContextPlanResponseData;
|
|
1320
|
+
/**
|
|
1321
|
+
* A plan change scheduled for the end of the billing period; null when none is.
|
|
1322
|
+
* @type {CompanyContextScheduledDowngradeResponseData}
|
|
1323
|
+
* @memberof CompanyContextResponseData
|
|
1324
|
+
*/
|
|
1325
|
+
scheduledDowngrade?: CompanyContextScheduledDowngradeResponseData;
|
|
1326
|
+
/**
|
|
1327
|
+
* The company's subscription; null when it has none, or several.
|
|
1328
|
+
* @type {CompanyContextSubscriptionResponseData}
|
|
1329
|
+
* @memberof CompanyContextResponseData
|
|
1330
|
+
*/
|
|
1331
|
+
subscription?: CompanyContextSubscriptionResponseData;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
/**
|
|
1335
|
+
* Schematic API
|
|
1336
|
+
* Schematic API
|
|
1337
|
+
*
|
|
1338
|
+
* The version of the OpenAPI document: 0.1
|
|
1339
|
+
*
|
|
1340
|
+
*
|
|
1341
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1342
|
+
* https://openapi-generator.tech
|
|
1343
|
+
* Do not edit the class manually.
|
|
1344
|
+
*/
|
|
1345
|
+
/**
|
|
1346
|
+
*
|
|
1347
|
+
* @export
|
|
1348
|
+
* @interface CompanyContextScheduledDowngradeResponseData
|
|
1349
|
+
*/
|
|
1350
|
+
declare interface CompanyContextScheduledDowngradeResponseData {
|
|
1351
|
+
/**
|
|
1352
|
+
*
|
|
1353
|
+
* @type {string}
|
|
1354
|
+
* @memberof CompanyContextScheduledDowngradeResponseData
|
|
1355
|
+
*/
|
|
1356
|
+
fromPlanId: string;
|
|
1357
|
+
/**
|
|
1358
|
+
*
|
|
1359
|
+
* @type {string}
|
|
1360
|
+
* @memberof CompanyContextScheduledDowngradeResponseData
|
|
1361
|
+
*/
|
|
1362
|
+
fromPlanName: string;
|
|
1363
|
+
/**
|
|
1364
|
+
*
|
|
1365
|
+
* @type {string}
|
|
1366
|
+
* @memberof CompanyContextScheduledDowngradeResponseData
|
|
1367
|
+
*/
|
|
1368
|
+
toPlanId: string;
|
|
1369
|
+
/**
|
|
1370
|
+
*
|
|
1371
|
+
* @type {string}
|
|
1372
|
+
* @memberof CompanyContextScheduledDowngradeResponseData
|
|
1373
|
+
*/
|
|
1374
|
+
toPlanName: string;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
/**
|
|
1378
|
+
*
|
|
1379
|
+
* @export
|
|
1380
|
+
* @interface CompanyContextSubscriptionResponseData
|
|
1381
|
+
*/
|
|
1382
|
+
declare interface CompanyContextSubscriptionResponseData {
|
|
1383
|
+
/**
|
|
1384
|
+
* When the subscription is set to end.
|
|
1385
|
+
* @type {Date}
|
|
1386
|
+
* @memberof CompanyContextSubscriptionResponseData
|
|
1387
|
+
*/
|
|
1388
|
+
cancelAt?: Date | null;
|
|
1389
|
+
/**
|
|
1390
|
+
*
|
|
1391
|
+
* @type {boolean}
|
|
1392
|
+
* @memberof CompanyContextSubscriptionResponseData
|
|
1393
|
+
*/
|
|
1394
|
+
cancelAtPeriodEnd: boolean;
|
|
1395
|
+
/**
|
|
1396
|
+
*
|
|
1397
|
+
* @type {Currency}
|
|
1398
|
+
* @memberof CompanyContextSubscriptionResponseData
|
|
1399
|
+
*/
|
|
1400
|
+
currency: Currency;
|
|
1401
|
+
/**
|
|
1402
|
+
* When the current period ends, and the company is next billed unless its trial is set to cancel: the period end, else the stored next bill's due date. Null when the subscription cancels at period end or neither is known.
|
|
1403
|
+
* @type {Date}
|
|
1404
|
+
* @memberof CompanyContextSubscriptionResponseData
|
|
1405
|
+
*/
|
|
1406
|
+
nextBillAt?: Date | null;
|
|
1407
|
+
/**
|
|
1408
|
+
* The period the subscription bills in: day, week, month, quarter, or year.
|
|
1409
|
+
* @type {string}
|
|
1410
|
+
* @memberof CompanyContextSubscriptionResponseData
|
|
1411
|
+
*/
|
|
1412
|
+
period?: string | null;
|
|
1413
|
+
/**
|
|
1414
|
+
*
|
|
1415
|
+
* @type {Date}
|
|
1416
|
+
* @memberof CompanyContextSubscriptionResponseData
|
|
1417
|
+
*/
|
|
1418
|
+
periodEnd?: Date | null;
|
|
1419
|
+
/**
|
|
1420
|
+
* Provider vocabulary: trialing, active, past_due, and so on.
|
|
1421
|
+
* @type {string}
|
|
1422
|
+
* @memberof CompanyContextSubscriptionResponseData
|
|
1423
|
+
*/
|
|
1424
|
+
status: string;
|
|
1425
|
+
/**
|
|
1426
|
+
*
|
|
1427
|
+
* @type {Date}
|
|
1428
|
+
* @memberof CompanyContextSubscriptionResponseData
|
|
1429
|
+
*/
|
|
1430
|
+
trialEnd?: Date | null;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
/**
|
|
1434
|
+
* Schematic API
|
|
1435
|
+
* Schematic API
|
|
1436
|
+
*
|
|
1437
|
+
* The version of the OpenAPI document: 0.1
|
|
1438
|
+
*
|
|
1439
|
+
*
|
|
1440
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1441
|
+
* https://openapi-generator.tech
|
|
1442
|
+
* Do not edit the class manually.
|
|
1443
|
+
*/
|
|
1444
|
+
/**
|
|
1445
|
+
*
|
|
1446
|
+
* @export
|
|
1447
|
+
* @interface CompanyCreditAutoTopupResponseData
|
|
1448
|
+
*/
|
|
1449
|
+
declare interface CompanyCreditAutoTopupResponseData {
|
|
1450
|
+
/**
|
|
1451
|
+
* Credits each top-up adds.
|
|
1452
|
+
* @type {number}
|
|
1453
|
+
* @memberof CompanyCreditAutoTopupResponseData
|
|
1454
|
+
*/
|
|
1455
|
+
amount?: number | null;
|
|
1456
|
+
/**
|
|
1457
|
+
* Whether top-ups run: the company's choice when self_service, else the plan's; false when the plan turns top-ups off.
|
|
1458
|
+
* @type {boolean}
|
|
1459
|
+
* @memberof CompanyCreditAutoTopupResponseData
|
|
1460
|
+
*/
|
|
1461
|
+
enabled: boolean;
|
|
1462
|
+
/**
|
|
1463
|
+
* Whether the company may change these settings itself.
|
|
1464
|
+
* @type {boolean}
|
|
1465
|
+
* @memberof CompanyCreditAutoTopupResponseData
|
|
1466
|
+
*/
|
|
1467
|
+
selfService: boolean;
|
|
1468
|
+
/**
|
|
1469
|
+
* The remaining balance that triggers a top-up.
|
|
1470
|
+
* @type {number}
|
|
1471
|
+
* @memberof CompanyCreditAutoTopupResponseData
|
|
1472
|
+
*/
|
|
1473
|
+
thresholdCredits?: number | null;
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1121
1476
|
/**
|
|
1122
1477
|
* Schematic API
|
|
1123
1478
|
* Schematic API
|
|
@@ -1161,6 +1516,12 @@ export declare interface CompanyCreditBalance {
|
|
|
1161
1516
|
* @interface CompanyCreditBalanceResponseData
|
|
1162
1517
|
*/
|
|
1163
1518
|
declare interface CompanyCreditBalanceResponseData {
|
|
1519
|
+
/**
|
|
1520
|
+
* How the credit tops itself up; null unless the company's base plan grants it.
|
|
1521
|
+
* @type {CompanyCreditAutoTopupResponseData}
|
|
1522
|
+
* @memberof CompanyCreditBalanceResponseData
|
|
1523
|
+
*/
|
|
1524
|
+
autoTopup?: CompanyCreditAutoTopupResponseData;
|
|
1164
1525
|
/**
|
|
1165
1526
|
* How the plan's grants of this credit add up per period; null unless the plan grants it per license and the license count is known.
|
|
1166
1527
|
* @type {CompanyCreditCompositionResponseData}
|
|
@@ -1505,17 +1866,6 @@ declare interface CompanyCreditUserUsageRowResponseData {
|
|
|
1505
1866
|
userId: string;
|
|
1506
1867
|
}
|
|
1507
1868
|
|
|
1508
|
-
/**
|
|
1509
|
-
* Schematic API
|
|
1510
|
-
* Schematic API
|
|
1511
|
-
*
|
|
1512
|
-
* The version of the OpenAPI document: 0.1
|
|
1513
|
-
*
|
|
1514
|
-
*
|
|
1515
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1516
|
-
* https://openapi-generator.tech
|
|
1517
|
-
* Do not edit the class manually.
|
|
1518
|
-
*/
|
|
1519
1869
|
/**
|
|
1520
1870
|
*
|
|
1521
1871
|
* @export
|
|
@@ -1536,10 +1886,10 @@ declare interface CompanyDiscountResponseData {
|
|
|
1536
1886
|
couponName: string;
|
|
1537
1887
|
/**
|
|
1538
1888
|
*
|
|
1539
|
-
* @type {
|
|
1889
|
+
* @type {Currency}
|
|
1540
1890
|
* @memberof CompanyDiscountResponseData
|
|
1541
1891
|
*/
|
|
1542
|
-
currency?:
|
|
1892
|
+
currency?: Currency | null;
|
|
1543
1893
|
/**
|
|
1544
1894
|
*
|
|
1545
1895
|
* @type {string}
|
|
@@ -1836,10 +2186,10 @@ declare interface CompanyInvoiceResponseData {
|
|
|
1836
2186
|
createdAt: Date;
|
|
1837
2187
|
/**
|
|
1838
2188
|
*
|
|
1839
|
-
* @type {
|
|
2189
|
+
* @type {Currency}
|
|
1840
2190
|
* @memberof CompanyInvoiceResponseData
|
|
1841
2191
|
*/
|
|
1842
|
-
currency:
|
|
2192
|
+
currency: Currency;
|
|
1843
2193
|
/**
|
|
1844
2194
|
*
|
|
1845
2195
|
* @type {Date}
|
|
@@ -1969,6 +2319,11 @@ declare interface CompanyPaymentMethodResponseData {
|
|
|
1969
2319
|
type: string;
|
|
1970
2320
|
}
|
|
1971
2321
|
|
|
2322
|
+
/** A plan or add-on the company holds, at the price it is billed. */
|
|
2323
|
+
export declare type CompanyPlan = CompanyContextPlanResponseData;
|
|
2324
|
+
|
|
2325
|
+
export declare type CompanySubscription = CompanyContextSubscriptionResponseData;
|
|
2326
|
+
|
|
1972
2327
|
/**
|
|
1973
2328
|
*
|
|
1974
2329
|
* @export
|
|
@@ -1983,10 +2338,10 @@ declare interface CompanyUpcomingInvoiceResponseData {
|
|
|
1983
2338
|
amountDue: number;
|
|
1984
2339
|
/**
|
|
1985
2340
|
*
|
|
1986
|
-
* @type {
|
|
2341
|
+
* @type {Currency}
|
|
1987
2342
|
* @memberof CompanyUpcomingInvoiceResponseData
|
|
1988
2343
|
*/
|
|
1989
|
-
currency:
|
|
2344
|
+
currency: Currency;
|
|
1990
2345
|
/**
|
|
1991
2346
|
* How much of the company's existing balance this invoice consumes.
|
|
1992
2347
|
* @type {number}
|
|
@@ -2098,6 +2453,8 @@ declare interface CompanyUserUsageResponseData {
|
|
|
2098
2453
|
*/
|
|
2099
2454
|
declare type ContextSignatureProvider = (context: SchematicContext) => string | Promise<string>;
|
|
2100
2455
|
|
|
2456
|
+
export declare type CreditAutoTopup = CompanyCreditAutoTopupResponseData;
|
|
2457
|
+
|
|
2101
2458
|
/** A company's lease-aware balance for a single credit type */
|
|
2102
2459
|
export declare type CreditBalance = {
|
|
2103
2460
|
/** Spendable balance including any open lease hold (remaining + reserved); the number to display to end users */
|
|
@@ -2119,6 +2476,8 @@ export declare type CreditBalance = {
|
|
|
2119
2476
|
* * Each grant carries `resetsAt` or `expiresAt`, never both.
|
|
2120
2477
|
* * `purchasable` — a bundle of it is on offer to the company's plan.
|
|
2121
2478
|
* * `composition` — how a per-license plan grant adds up per period.
|
|
2479
|
+
* * `autoTopup` — auto top-up for a credit the base plan grants, with the
|
|
2480
|
+
* company's own settings applied.
|
|
2122
2481
|
*/
|
|
2123
2482
|
export declare type CreditBalanceEntry = CompanyCreditBalanceResponseData;
|
|
2124
2483
|
|
|
@@ -2299,6 +2658,162 @@ declare interface CreditUserUsageRequest {
|
|
|
2299
2658
|
|
|
2300
2659
|
export declare type CreditUserUsageRow = CompanyCreditUserUsageRowResponseData;
|
|
2301
2660
|
|
|
2661
|
+
/**
|
|
2662
|
+
*
|
|
2663
|
+
* @export
|
|
2664
|
+
*/
|
|
2665
|
+
declare const Currency: {
|
|
2666
|
+
readonly Aed: "aed";
|
|
2667
|
+
readonly Afn: "afn";
|
|
2668
|
+
readonly All: "all";
|
|
2669
|
+
readonly Amd: "amd";
|
|
2670
|
+
readonly Ang: "ang";
|
|
2671
|
+
readonly Aoa: "aoa";
|
|
2672
|
+
readonly Ars: "ars";
|
|
2673
|
+
readonly Aud: "aud";
|
|
2674
|
+
readonly Awg: "awg";
|
|
2675
|
+
readonly Azn: "azn";
|
|
2676
|
+
readonly Bam: "bam";
|
|
2677
|
+
readonly Bbd: "bbd";
|
|
2678
|
+
readonly Bdt: "bdt";
|
|
2679
|
+
readonly Bif: "bif";
|
|
2680
|
+
readonly Bmd: "bmd";
|
|
2681
|
+
readonly Bnd: "bnd";
|
|
2682
|
+
readonly Bob: "bob";
|
|
2683
|
+
readonly Brl: "brl";
|
|
2684
|
+
readonly Bsd: "bsd";
|
|
2685
|
+
readonly Bwp: "bwp";
|
|
2686
|
+
readonly Byn: "byn";
|
|
2687
|
+
readonly Bzd: "bzd";
|
|
2688
|
+
readonly Cad: "cad";
|
|
2689
|
+
readonly Cdf: "cdf";
|
|
2690
|
+
readonly Chf: "chf";
|
|
2691
|
+
readonly Clp: "clp";
|
|
2692
|
+
readonly Cny: "cny";
|
|
2693
|
+
readonly Cop: "cop";
|
|
2694
|
+
readonly Crc: "crc";
|
|
2695
|
+
readonly Cve: "cve";
|
|
2696
|
+
readonly Czk: "czk";
|
|
2697
|
+
readonly Djf: "djf";
|
|
2698
|
+
readonly Dkk: "dkk";
|
|
2699
|
+
readonly Dop: "dop";
|
|
2700
|
+
readonly Dzd: "dzd";
|
|
2701
|
+
readonly Egp: "egp";
|
|
2702
|
+
readonly Etb: "etb";
|
|
2703
|
+
readonly Eur: "eur";
|
|
2704
|
+
readonly Fjd: "fjd";
|
|
2705
|
+
readonly Fkp: "fkp";
|
|
2706
|
+
readonly Gbp: "gbp";
|
|
2707
|
+
readonly Gel: "gel";
|
|
2708
|
+
readonly Gip: "gip";
|
|
2709
|
+
readonly Gmd: "gmd";
|
|
2710
|
+
readonly Gnf: "gnf";
|
|
2711
|
+
readonly Gtq: "gtq";
|
|
2712
|
+
readonly Gyd: "gyd";
|
|
2713
|
+
readonly Hkd: "hkd";
|
|
2714
|
+
readonly Hnl: "hnl";
|
|
2715
|
+
readonly Htg: "htg";
|
|
2716
|
+
readonly Huf: "huf";
|
|
2717
|
+
readonly Idr: "idr";
|
|
2718
|
+
readonly Ils: "ils";
|
|
2719
|
+
readonly Inr: "inr";
|
|
2720
|
+
readonly Isk: "isk";
|
|
2721
|
+
readonly Jmd: "jmd";
|
|
2722
|
+
readonly Jpy: "jpy";
|
|
2723
|
+
readonly Kes: "kes";
|
|
2724
|
+
readonly Kgs: "kgs";
|
|
2725
|
+
readonly Khr: "khr";
|
|
2726
|
+
readonly Kmf: "kmf";
|
|
2727
|
+
readonly Krw: "krw";
|
|
2728
|
+
readonly Kyd: "kyd";
|
|
2729
|
+
readonly Kzt: "kzt";
|
|
2730
|
+
readonly Lak: "lak";
|
|
2731
|
+
readonly Lbp: "lbp";
|
|
2732
|
+
readonly Lkr: "lkr";
|
|
2733
|
+
readonly Lrd: "lrd";
|
|
2734
|
+
readonly Lsl: "lsl";
|
|
2735
|
+
readonly Mad: "mad";
|
|
2736
|
+
readonly Mdl: "mdl";
|
|
2737
|
+
readonly Mga: "mga";
|
|
2738
|
+
readonly Mkd: "mkd";
|
|
2739
|
+
readonly Mmk: "mmk";
|
|
2740
|
+
readonly Mnt: "mnt";
|
|
2741
|
+
readonly Mop: "mop";
|
|
2742
|
+
readonly Mur: "mur";
|
|
2743
|
+
readonly Mvr: "mvr";
|
|
2744
|
+
readonly Mwk: "mwk";
|
|
2745
|
+
readonly Mxn: "mxn";
|
|
2746
|
+
readonly Myr: "myr";
|
|
2747
|
+
readonly Mzn: "mzn";
|
|
2748
|
+
readonly Nad: "nad";
|
|
2749
|
+
readonly Ngn: "ngn";
|
|
2750
|
+
readonly Nio: "nio";
|
|
2751
|
+
readonly Nok: "nok";
|
|
2752
|
+
readonly Npr: "npr";
|
|
2753
|
+
readonly Nzd: "nzd";
|
|
2754
|
+
readonly Pab: "pab";
|
|
2755
|
+
readonly Pen: "pen";
|
|
2756
|
+
readonly Pgk: "pgk";
|
|
2757
|
+
readonly Php: "php";
|
|
2758
|
+
readonly Pkr: "pkr";
|
|
2759
|
+
readonly Pln: "pln";
|
|
2760
|
+
readonly Pyg: "pyg";
|
|
2761
|
+
readonly Qar: "qar";
|
|
2762
|
+
readonly Ron: "ron";
|
|
2763
|
+
readonly Rsd: "rsd";
|
|
2764
|
+
readonly Rub: "rub";
|
|
2765
|
+
readonly Rwf: "rwf";
|
|
2766
|
+
readonly Sar: "sar";
|
|
2767
|
+
readonly Sbd: "sbd";
|
|
2768
|
+
readonly Scr: "scr";
|
|
2769
|
+
readonly Sek: "sek";
|
|
2770
|
+
readonly Sgd: "sgd";
|
|
2771
|
+
readonly Shp: "shp";
|
|
2772
|
+
readonly Sle: "sle";
|
|
2773
|
+
readonly Sos: "sos";
|
|
2774
|
+
readonly Srd: "srd";
|
|
2775
|
+
readonly Std: "std";
|
|
2776
|
+
readonly Szl: "szl";
|
|
2777
|
+
readonly Thb: "thb";
|
|
2778
|
+
readonly Tjs: "tjs";
|
|
2779
|
+
readonly Top: "top";
|
|
2780
|
+
readonly Try: "try";
|
|
2781
|
+
readonly Ttd: "ttd";
|
|
2782
|
+
readonly Twd: "twd";
|
|
2783
|
+
readonly Tzs: "tzs";
|
|
2784
|
+
readonly Uah: "uah";
|
|
2785
|
+
readonly Ugx: "ugx";
|
|
2786
|
+
readonly Usd: "usd";
|
|
2787
|
+
readonly Uyu: "uyu";
|
|
2788
|
+
readonly Uzs: "uzs";
|
|
2789
|
+
readonly Vnd: "vnd";
|
|
2790
|
+
readonly Vuv: "vuv";
|
|
2791
|
+
readonly Wst: "wst";
|
|
2792
|
+
readonly Xaf: "xaf";
|
|
2793
|
+
readonly Xcd: "xcd";
|
|
2794
|
+
readonly Xcg: "xcg";
|
|
2795
|
+
readonly Xof: "xof";
|
|
2796
|
+
readonly Xpf: "xpf";
|
|
2797
|
+
readonly Yer: "yer";
|
|
2798
|
+
readonly Zar: "zar";
|
|
2799
|
+
readonly Zmw: "zmw";
|
|
2800
|
+
};
|
|
2801
|
+
|
|
2802
|
+
declare type Currency = (typeof Currency)[keyof typeof Currency];
|
|
2803
|
+
|
|
2804
|
+
/**
|
|
2805
|
+
*
|
|
2806
|
+
* @export
|
|
2807
|
+
*/
|
|
2808
|
+
declare const CustomPlanActivationStrategy: {
|
|
2809
|
+
readonly Payment: "on_payment";
|
|
2810
|
+
readonly Publish: "on_publish";
|
|
2811
|
+
};
|
|
2812
|
+
|
|
2813
|
+
declare type CustomPlanActivationStrategy = (typeof CustomPlanActivationStrategy)[keyof typeof CustomPlanActivationStrategy];
|
|
2814
|
+
|
|
2815
|
+
export declare type CustomPlanBilling = CompanyContextCustomPlanBillingResponseData;
|
|
2816
|
+
|
|
2302
2817
|
/**
|
|
2303
2818
|
*
|
|
2304
2819
|
* @export
|
|
@@ -2937,6 +3452,8 @@ declare const RuleType_2: {
|
|
|
2937
3452
|
|
|
2938
3453
|
declare type RuleType_2 = (typeof RuleType_2)[keyof typeof RuleType_2];
|
|
2939
3454
|
|
|
3455
|
+
export declare type ScheduledDowngrade = CompanyContextScheduledDowngradeResponseData;
|
|
3456
|
+
|
|
2940
3457
|
export declare class Schematic {
|
|
2941
3458
|
private _additionalHeaders;
|
|
2942
3459
|
private apiKey;
|
|
@@ -3250,6 +3767,7 @@ declare class SchematicBillingClient implements BillingClient {
|
|
|
3250
3767
|
updatePaymentMethod(externalId: string): Promise<void>;
|
|
3251
3768
|
deletePaymentMethod(id: string): Promise<void>;
|
|
3252
3769
|
fetchFeatureUsage(): Promise<FeatureUsage[]>;
|
|
3770
|
+
fetchCompany(): Promise<Company>;
|
|
3253
3771
|
fetchCreditBalances(): Promise<CreditBalanceEntry[]>;
|
|
3254
3772
|
fetchCreditUserUsage(params: CreditUserUsageRequest): Promise<CreditUserUsage>;
|
|
3255
3773
|
fetchFeatureUserUsage(params: FeatureUserUsageRequest): Promise<FeatureUserUsage>;
|
|
@@ -3344,6 +3862,13 @@ declare namespace SchematicJS {
|
|
|
3344
3862
|
CheckPlanReturn,
|
|
3345
3863
|
CheckPlanReturnFromJSON,
|
|
3346
3864
|
CheckPlanReturnListenerFn,
|
|
3865
|
+
Company,
|
|
3866
|
+
CompanyContextCustomPlanBillingResponseData,
|
|
3867
|
+
CompanyContextPlanResponseData,
|
|
3868
|
+
CompanyContextResponseData,
|
|
3869
|
+
CompanyContextScheduledDowngradeResponseData,
|
|
3870
|
+
CompanyContextSubscriptionResponseData,
|
|
3871
|
+
CompanyCreditAutoTopupResponseData,
|
|
3347
3872
|
CompanyCreditBalance,
|
|
3348
3873
|
CompanyCreditBalanceResponseData,
|
|
3349
3874
|
CompanyCreditCompositionResponseData,
|
|
@@ -3355,9 +3880,12 @@ declare namespace SchematicJS {
|
|
|
3355
3880
|
CompanyFeatureUserUsageResponseData,
|
|
3356
3881
|
CompanyInvoiceResponseData,
|
|
3357
3882
|
CompanyPaymentMethodResponseData,
|
|
3883
|
+
CompanyPlan,
|
|
3884
|
+
CompanySubscription,
|
|
3358
3885
|
CompanyUpcomingInvoiceResponseData,
|
|
3359
3886
|
CompanyUserUsageResponseData,
|
|
3360
3887
|
ContextSignatureProvider,
|
|
3888
|
+
CreditAutoTopup,
|
|
3361
3889
|
CreditBalance,
|
|
3362
3890
|
CreditBalanceEntry,
|
|
3363
3891
|
CreditBalanceListenerFn,
|
|
@@ -3377,6 +3905,7 @@ declare namespace SchematicJS {
|
|
|
3377
3905
|
CreditSpendWindow,
|
|
3378
3906
|
CreditUserUsage,
|
|
3379
3907
|
CreditUserUsageRow,
|
|
3908
|
+
CustomPlanBilling,
|
|
3380
3909
|
DEFAULT_INVOICE_QUERY,
|
|
3381
3910
|
Discount,
|
|
3382
3911
|
EmptyListenerFn,
|
|
@@ -3407,6 +3936,7 @@ declare namespace SchematicJS {
|
|
|
3407
3936
|
RequestOptions,
|
|
3408
3937
|
ResourceState,
|
|
3409
3938
|
RuleType,
|
|
3939
|
+
ScheduledDowngrade,
|
|
3410
3940
|
Schematic,
|
|
3411
3941
|
SchematicApiError,
|
|
3412
3942
|
SchematicBillingClient,
|
|
@@ -3733,6 +4263,13 @@ export declare enum UsagePeriod {
|
|
|
3733
4263
|
|
|
3734
4264
|
export declare function useBillingDataSource(): BillingDataSource;
|
|
3735
4265
|
|
|
4266
|
+
/**
|
|
4267
|
+
* The company's plan and add-ons at their billed prices, its subscription,
|
|
4268
|
+
* any scheduled downgrade and any pending custom plan billing. `undefined`
|
|
4269
|
+
* means not loaded.
|
|
4270
|
+
*/
|
|
4271
|
+
export declare function useCompany(): ResourceHandle<Company>;
|
|
4272
|
+
|
|
3736
4273
|
/**
|
|
3737
4274
|
* The company's credit balances, one per credit. `data` is empty when it
|
|
3738
4275
|
* holds no credits and its plan draws on none; `undefined` means not loaded.
|