@schematichq/schematic-components 2.25.0 → 2.25.2

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.
@@ -51,6 +51,50 @@ declare interface AvailablePlanOptions {
51
51
  useSelectedPeriod?: boolean;
52
52
  }
53
53
 
54
+ /**
55
+ *
56
+ * @export
57
+ */
58
+ declare const BillingArrearsAnchor: {
59
+ readonly BillingPeriodStart: "billing_period_start";
60
+ readonly MonthEnd: "month_end";
61
+ };
62
+
63
+ declare type BillingArrearsAnchor = (typeof BillingArrearsAnchor)[keyof typeof BillingArrearsAnchor];
64
+
65
+ /**
66
+ *
67
+ * @export
68
+ */
69
+ declare const BillingArrearsAnchor_2: {
70
+ readonly BillingPeriodStart: "billing_period_start";
71
+ readonly MonthEnd: "month_end";
72
+ };
73
+
74
+ declare type BillingArrearsAnchor_2 = (typeof BillingArrearsAnchor_2)[keyof typeof BillingArrearsAnchor_2];
75
+
76
+ /**
77
+ *
78
+ * @export
79
+ */
80
+ declare const BillingArrearsCadence: {
81
+ readonly EndOfBillingPeriod: "end_of_billing_period";
82
+ readonly Monthly: "monthly";
83
+ };
84
+
85
+ declare type BillingArrearsCadence = (typeof BillingArrearsCadence)[keyof typeof BillingArrearsCadence];
86
+
87
+ /**
88
+ *
89
+ * @export
90
+ */
91
+ declare const BillingArrearsCadence_2: {
92
+ readonly EndOfBillingPeriod: "end_of_billing_period";
93
+ readonly Monthly: "monthly";
94
+ };
95
+
96
+ declare type BillingArrearsCadence_2 = (typeof BillingArrearsCadence_2)[keyof typeof BillingArrearsCadence_2];
97
+
54
98
  /**
55
99
  *
56
100
  * @export
@@ -1005,6 +1049,18 @@ declare type BillingPlanCreditGrantResetType_2 = (typeof BillingPlanCreditGrantR
1005
1049
  * @interface BillingPlanCreditGrantResponseData
1006
1050
  */
1007
1051
  declare interface BillingPlanCreditGrantResponseData {
1052
+ /**
1053
+ * Which boundary closes a monthly arrears window. Only meaningful when arrears_cadence is monthly.
1054
+ * @type {BillingArrearsAnchor}
1055
+ * @memberof BillingPlanCreditGrantResponseData
1056
+ */
1057
+ arrearsAnchor?: BillingArrearsAnchor | null;
1058
+ /**
1059
+ * How often postpaid charges are closed and invoiced. Defaults to end_of_billing_period.
1060
+ * @type {BillingArrearsCadence}
1061
+ * @memberof BillingPlanCreditGrantResponseData
1062
+ */
1063
+ arrearsCadence?: BillingArrearsCadence | null;
1008
1064
  /**
1009
1065
  *
1010
1066
  * @type {number}
@@ -1155,6 +1211,12 @@ declare interface BillingPlanCreditGrantResponseData {
1155
1211
  * @memberof BillingPlanCreditGrantResponseData
1156
1212
  */
1157
1213
  licenseId?: string | null;
1214
+ /**
1215
+ * Optional limit on how far the balance may go below zero, in credits. A floor on the balance, not an allowance per invoice window: consumption is denied once the balance would fall below minus this figure, and stays denied until a new grant lands or the negative balance is settled. Absent means no limit.
1216
+ * @type {number}
1217
+ * @memberof BillingPlanCreditGrantResponseData
1218
+ */
1219
+ overdraftLimit?: number | null;
1158
1220
  /**
1159
1221
  *
1160
1222
  * @type {PreviewObjectResponseData}
@@ -1180,6 +1242,24 @@ declare interface BillingPlanCreditGrantResponseData {
1180
1242
  * @memberof BillingPlanCreditGrantResponseData
1181
1243
  */
1182
1244
  planVersionId?: string | null;
1245
+ /**
1246
+ * Whether consumption may continue past a zero balance, accruing at postpaid_rate_per_unit rather than being denied.
1247
+ * @type {boolean}
1248
+ * @memberof BillingPlanCreditGrantResponseData
1249
+ */
1250
+ postpaidEnabled: boolean;
1251
+ /**
1252
+ * Amount charged per credit consumed past zero, in the currency's minor unit. Defaults to the credit's own cost basis when postpaid is enabled without one.
1253
+ * @type {number}
1254
+ * @memberof BillingPlanCreditGrantResponseData
1255
+ */
1256
+ postpaidRatePerUnit?: number | null;
1257
+ /**
1258
+ * Decimal form of postpaid_rate_per_unit, for rates finer than one minor unit.
1259
+ * @type {string}
1260
+ * @memberof BillingPlanCreditGrantResponseData
1261
+ */
1262
+ postpaidRatePerUnitDecimal?: string | null;
1183
1263
  /**
1184
1264
  *
1185
1265
  * @type {BillingPlanCreditGrantResetCadence}
@@ -4274,6 +4354,18 @@ declare interface CompanyOverrideResponseData {
4274
4354
  * @interface CompanyPlanCreditGrantView
4275
4355
  */
4276
4356
  declare interface CompanyPlanCreditGrantView {
4357
+ /**
4358
+ *
4359
+ * @type {BillingArrearsAnchor}
4360
+ * @memberof CompanyPlanCreditGrantView
4361
+ */
4362
+ billingCreditArrearsAnchor?: BillingArrearsAnchor | null;
4363
+ /**
4364
+ *
4365
+ * @type {BillingArrearsCadence}
4366
+ * @memberof CompanyPlanCreditGrantView
4367
+ */
4368
+ billingCreditArrearsCadence?: BillingArrearsCadence | null;
4277
4369
  /**
4278
4370
  *
4279
4371
  * @type {number}
@@ -4340,6 +4432,30 @@ declare interface CompanyPlanCreditGrantView {
4340
4432
  * @memberof CompanyPlanCreditGrantView
4341
4433
  */
4342
4434
  billingCreditCanBuyBundles: boolean;
4435
+ /**
4436
+ *
4437
+ * @type {number}
4438
+ * @memberof CompanyPlanCreditGrantView
4439
+ */
4440
+ billingCreditOverdraftLimit?: number | null;
4441
+ /**
4442
+ *
4443
+ * @type {boolean}
4444
+ * @memberof CompanyPlanCreditGrantView
4445
+ */
4446
+ billingCreditPostpaidEnabled: boolean;
4447
+ /**
4448
+ *
4449
+ * @type {number}
4450
+ * @memberof CompanyPlanCreditGrantView
4451
+ */
4452
+ billingCreditPostpaidRatePerUnit?: number | null;
4453
+ /**
4454
+ *
4455
+ * @type {string}
4456
+ * @memberof CompanyPlanCreditGrantView
4457
+ */
4458
+ billingCreditPostpaidRatePerUnitDecimal?: string | null;
4343
4459
  /**
4344
4460
  *
4345
4461
  * @type {number}
@@ -5823,6 +5939,12 @@ declare interface CreditBundleCurrencyPrice {
5823
5939
  * @interface CreditCompanyGrantView
5824
5940
  */
5825
5941
  declare interface CreditCompanyGrantView {
5942
+ /**
5943
+ *
5944
+ * @type {BillingArrearsCadence}
5945
+ * @memberof CreditCompanyGrantView
5946
+ */
5947
+ arrearsCadence?: BillingArrearsCadence | null;
5826
5948
  /**
5827
5949
  *
5828
5950
  * @type {string}
@@ -5949,6 +6071,42 @@ declare interface CreditCompanyGrantView {
5949
6071
  * @memberof CreditCompanyGrantView
5950
6072
  */
5951
6073
  pluralName?: string | null;
6074
+ /**
6075
+ *
6076
+ * @type {number}
6077
+ * @memberof CreditCompanyGrantView
6078
+ */
6079
+ postpaidChargeAmount?: number | null;
6080
+ /**
6081
+ *
6082
+ * @type {string}
6083
+ * @memberof CreditCompanyGrantView
6084
+ */
6085
+ postpaidChargeCurrency?: string | null;
6086
+ /**
6087
+ *
6088
+ * @type {number}
6089
+ * @memberof CreditCompanyGrantView
6090
+ */
6091
+ postpaidChargedCredits?: number | null;
6092
+ /**
6093
+ *
6094
+ * @type {Date}
6095
+ * @memberof CreditCompanyGrantView
6096
+ */
6097
+ postpaidPeriodEnd?: Date | null;
6098
+ /**
6099
+ *
6100
+ * @type {number}
6101
+ * @memberof CreditCompanyGrantView
6102
+ */
6103
+ postpaidRate?: number | null;
6104
+ /**
6105
+ *
6106
+ * @type {string}
6107
+ * @memberof CreditCompanyGrantView
6108
+ */
6109
+ postpaidRateDecimal?: string | null;
5952
6110
  /**
5953
6111
  *
5954
6112
  * @type {BillingProductPriceResponseData}
@@ -6268,6 +6426,62 @@ declare interface CreditUsageAggregation {
6268
6426
  usageToday?: number | null;
6269
6427
  }
6270
6428
 
6429
+ /**
6430
+ *
6431
+ * @export
6432
+ * @interface CreditUserUsageResponseData
6433
+ */
6434
+ declare interface CreditUserUsageResponseData {
6435
+ /**
6436
+ *
6437
+ * @type {string}
6438
+ * @memberof CreditUserUsageResponseData
6439
+ */
6440
+ billingCreditId: string;
6441
+ /**
6442
+ * The display name of the credit type
6443
+ * @type {string}
6444
+ * @memberof CreditUserUsageResponseData
6445
+ */
6446
+ creditName: string;
6447
+ /**
6448
+ * End of the window the consumption is measured over (exclusive)
6449
+ * @type {Date}
6450
+ * @memberof CreditUserUsageResponseData
6451
+ */
6452
+ endTime: Date;
6453
+ /**
6454
+ * This page of per-user net consumption of the credit within the window, highest first
6455
+ * @type {Array<UserCreditUsageResponseData>}
6456
+ * @memberof CreditUserUsageResponseData
6457
+ */
6458
+ entries: Array<UserCreditUsageResponseData>;
6459
+ /**
6460
+ * Start of the window, the earliest valid-from among the credit's currently-active grants
6461
+ * @type {Date}
6462
+ * @memberof CreditUserUsageResponseData
6463
+ */
6464
+ startTime: Date;
6465
+ /**
6466
+ * Consumption across every user in the window, not just this page
6467
+ * @type {number}
6468
+ * @memberof CreditUserUsageResponseData
6469
+ */
6470
+ total: number;
6471
+ /**
6472
+ * How many users the window has entries for, to page against; excludes unattributed
6473
+ * @type {number}
6474
+ * @memberof CreditUserUsageResponseData
6475
+ */
6476
+ totalUsers: number;
6477
+ /**
6478
+ * Consumption from events sent without a user; not a user, so it is excluded from entries and total_users and returned on every page. Null when the window has none
6479
+ * @type {UserCreditUsageResponseData}
6480
+ * @memberof CreditUserUsageResponseData
6481
+ */
6482
+ unattributed?: UserCreditUsageResponseData;
6483
+ }
6484
+
6271
6485
  declare interface CreditWithCompanyContext {
6272
6486
  id: CreditCompanyGrantView["billingCreditId"];
6273
6487
  name: CreditCompanyGrantView["creditName"];
@@ -6690,6 +6904,9 @@ declare interface DesignProps_4 {
6690
6904
  isVisible: boolean;
6691
6905
  fontStyle: FontStyle;
6692
6906
  };
6907
+ usageByUser: {
6908
+ isVisible: boolean;
6909
+ };
6693
6910
  visibleFeatures?: string[];
6694
6911
  }
6695
6912
 
@@ -6848,6 +7065,8 @@ export declare interface EmbedContextProps extends Omit<EmbedState, SettingsLaye
6848
7065
  getUpcomingInvoice: (id: string) => DebouncedApiPromise<HydrateUpcomingInvoiceResponse>;
6849
7066
  getCustomerBalance: () => DebouncedApiPromise<FetchCustomerBalanceResponse>;
6850
7067
  listInvoices: () => DebouncedApiPromise<ListInvoicesResponse>;
7068
+ getCreditUsageByUser: (billingCreditId: string, limit?: number) => DebouncedApiPromise<GetCreditUsageByUserResponse>;
7069
+ getFeatureUsageByUser: (featureId: string, limit?: number) => DebouncedApiPromise<GetFeatureUsageByUserResponse>;
6851
7070
  createSetupIntent: () => DebouncedApiPromise<GetSetupIntentResponse>;
6852
7071
  updatePaymentMethod: (paymentMethodId: string) => DebouncedApiPromise<UpdatePaymentMethodResponse>;
6853
7072
  deletePaymentMethod: (checkoutId: string) => DebouncedApiPromise<DeletePaymentMethodResponse>;
@@ -8361,6 +8580,56 @@ declare interface FeatureUsageResponseData {
8361
8580
  yearlyUsageBasedPrice?: BillingPriceView;
8362
8581
  }
8363
8582
 
8583
+ /**
8584
+ *
8585
+ * @export
8586
+ * @interface FeatureUserUsageResponseData
8587
+ */
8588
+ declare interface FeatureUserUsageResponseData {
8589
+ /**
8590
+ * End of the feature's current metric period (exclusive)
8591
+ * @type {Date}
8592
+ * @memberof FeatureUserUsageResponseData
8593
+ */
8594
+ endTime: Date;
8595
+ /**
8596
+ *
8597
+ * @type {FeatureResponseData}
8598
+ * @memberof FeatureUserUsageResponseData
8599
+ */
8600
+ feature?: FeatureResponseData;
8601
+ /**
8602
+ * This page of per-user usage of the feature within the period, highest first
8603
+ * @type {Array<UserFeatureUsageResponseData>}
8604
+ * @memberof FeatureUserUsageResponseData
8605
+ */
8606
+ rows: Array<UserFeatureUsageResponseData>;
8607
+ /**
8608
+ * Start of the feature's current metric period
8609
+ * @type {Date}
8610
+ * @memberof FeatureUserUsageResponseData
8611
+ */
8612
+ startTime: Date;
8613
+ /**
8614
+ * Usage across every user in the period, not just this page
8615
+ * @type {number}
8616
+ * @memberof FeatureUserUsageResponseData
8617
+ */
8618
+ total: number;
8619
+ /**
8620
+ * How many users the period has rows for, to page against; excludes unattributed
8621
+ * @type {number}
8622
+ * @memberof FeatureUserUsageResponseData
8623
+ */
8624
+ totalUsers: number;
8625
+ /**
8626
+ * Usage from events sent without a user; not a user, so it is excluded from rows and total_users and returned on every page. Null when the period has none
8627
+ * @type {UserFeatureUsageResponseData}
8628
+ * @memberof FeatureUserUsageResponseData
8629
+ */
8630
+ unattributed?: UserFeatureUsageResponseData;
8631
+ }
8632
+
8364
8633
  declare type FetchAPI = WindowOrWorkerGlobalScope["fetch"];
8365
8634
 
8366
8635
  /**
@@ -8728,6 +8997,108 @@ declare interface GetCheckoutTaxIDResponse {
8728
8997
  params: object;
8729
8998
  }
8730
8999
 
9000
+ /**
9001
+ * Schematic API
9002
+ * Schematic API
9003
+ *
9004
+ * The version of the OpenAPI document: 0.1
9005
+ *
9006
+ *
9007
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9008
+ * https://openapi-generator.tech
9009
+ * Do not edit the class manually.
9010
+ */
9011
+ /**
9012
+ * Input parameters
9013
+ * @export
9014
+ * @interface GetCreditUsageByUserParams
9015
+ */
9016
+ declare interface GetCreditUsageByUserParams {
9017
+ /**
9018
+ * Page limit (default 100)
9019
+ * @type {number}
9020
+ * @memberof GetCreditUsageByUserParams
9021
+ */
9022
+ limit?: number;
9023
+ /**
9024
+ * Page offset (default 0)
9025
+ * @type {number}
9026
+ * @memberof GetCreditUsageByUserParams
9027
+ */
9028
+ offset?: number;
9029
+ }
9030
+
9031
+ /**
9032
+ *
9033
+ * @export
9034
+ * @interface GetCreditUsageByUserResponse
9035
+ */
9036
+ declare interface GetCreditUsageByUserResponse {
9037
+ /**
9038
+ *
9039
+ * @type {CreditUserUsageResponseData}
9040
+ * @memberof GetCreditUsageByUserResponse
9041
+ */
9042
+ data: CreditUserUsageResponseData;
9043
+ /**
9044
+ *
9045
+ * @type {GetCreditUsageByUserParams}
9046
+ * @memberof GetCreditUsageByUserResponse
9047
+ */
9048
+ params: GetCreditUsageByUserParams;
9049
+ }
9050
+
9051
+ /**
9052
+ * Schematic API
9053
+ * Schematic API
9054
+ *
9055
+ * The version of the OpenAPI document: 0.1
9056
+ *
9057
+ *
9058
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9059
+ * https://openapi-generator.tech
9060
+ * Do not edit the class manually.
9061
+ */
9062
+ /**
9063
+ * Input parameters
9064
+ * @export
9065
+ * @interface GetFeatureUsageByUserParams
9066
+ */
9067
+ declare interface GetFeatureUsageByUserParams {
9068
+ /**
9069
+ * Page limit (default 100)
9070
+ * @type {number}
9071
+ * @memberof GetFeatureUsageByUserParams
9072
+ */
9073
+ limit?: number;
9074
+ /**
9075
+ * Page offset (default 0)
9076
+ * @type {number}
9077
+ * @memberof GetFeatureUsageByUserParams
9078
+ */
9079
+ offset?: number;
9080
+ }
9081
+
9082
+ /**
9083
+ *
9084
+ * @export
9085
+ * @interface GetFeatureUsageByUserResponse
9086
+ */
9087
+ declare interface GetFeatureUsageByUserResponse {
9088
+ /**
9089
+ *
9090
+ * @type {FeatureUserUsageResponseData}
9091
+ * @memberof GetFeatureUsageByUserResponse
9092
+ */
9093
+ data: FeatureUserUsageResponseData;
9094
+ /**
9095
+ *
9096
+ * @type {GetFeatureUsageByUserParams}
9097
+ * @memberof GetFeatureUsageByUserResponse
9098
+ */
9099
+ params: GetFeatureUsageByUserParams;
9100
+ }
9101
+
8731
9102
  /**
8732
9103
  *
8733
9104
  * @export
@@ -8805,6 +9176,8 @@ export declare const initialContext: {
8805
9176
  getUpcomingInvoice: () => never;
8806
9177
  getCustomerBalance: () => never;
8807
9178
  listInvoices: () => never;
9179
+ getCreditUsageByUser: () => never;
9180
+ getFeatureUsageByUser: () => never;
8808
9181
  createSetupIntent: () => never;
8809
9182
  updatePaymentMethod: () => never;
8810
9183
  deletePaymentMethod: () => never;
@@ -9483,6 +9856,18 @@ declare type PlanCreditGrantScaling_2 = (typeof PlanCreditGrantScaling_2)[keyof
9483
9856
  * @interface PlanCreditGrantView
9484
9857
  */
9485
9858
  declare interface PlanCreditGrantView {
9859
+ /**
9860
+ *
9861
+ * @type {BillingArrearsAnchor}
9862
+ * @memberof PlanCreditGrantView
9863
+ */
9864
+ billingCreditArrearsAnchor?: BillingArrearsAnchor | null;
9865
+ /**
9866
+ *
9867
+ * @type {BillingArrearsCadence}
9868
+ * @memberof PlanCreditGrantView
9869
+ */
9870
+ billingCreditArrearsCadence?: BillingArrearsCadence | null;
9486
9871
  /**
9487
9872
  *
9488
9873
  * @type {number}
@@ -9549,6 +9934,30 @@ declare interface PlanCreditGrantView {
9549
9934
  * @memberof PlanCreditGrantView
9550
9935
  */
9551
9936
  billingCreditCanBuyBundles: boolean;
9937
+ /**
9938
+ *
9939
+ * @type {number}
9940
+ * @memberof PlanCreditGrantView
9941
+ */
9942
+ billingCreditOverdraftLimit?: number | null;
9943
+ /**
9944
+ *
9945
+ * @type {boolean}
9946
+ * @memberof PlanCreditGrantView
9947
+ */
9948
+ billingCreditPostpaidEnabled: boolean;
9949
+ /**
9950
+ *
9951
+ * @type {number}
9952
+ * @memberof PlanCreditGrantView
9953
+ */
9954
+ billingCreditPostpaidRatePerUnit?: number | null;
9955
+ /**
9956
+ *
9957
+ * @type {string}
9958
+ * @memberof PlanCreditGrantView
9959
+ */
9960
+ billingCreditPostpaidRatePerUnitDecimal?: string | null;
9552
9961
  /**
9553
9962
  *
9554
9963
  * @type {number}
@@ -9706,6 +10115,18 @@ declare interface PlanCreditGrantView {
9706
10115
  * @interface PlanCreditGrantView
9707
10116
  */
9708
10117
  declare interface PlanCreditGrantView_2 {
10118
+ /**
10119
+ *
10120
+ * @type {BillingArrearsAnchor}
10121
+ * @memberof PlanCreditGrantView
10122
+ */
10123
+ billingCreditArrearsAnchor?: BillingArrearsAnchor_2 | null;
10124
+ /**
10125
+ *
10126
+ * @type {BillingArrearsCadence}
10127
+ * @memberof PlanCreditGrantView
10128
+ */
10129
+ billingCreditArrearsCadence?: BillingArrearsCadence_2 | null;
9709
10130
  /**
9710
10131
  *
9711
10132
  * @type {number}
@@ -9772,6 +10193,30 @@ declare interface PlanCreditGrantView_2 {
9772
10193
  * @memberof PlanCreditGrantView
9773
10194
  */
9774
10195
  billingCreditCanBuyBundles: boolean;
10196
+ /**
10197
+ *
10198
+ * @type {number}
10199
+ * @memberof PlanCreditGrantView
10200
+ */
10201
+ billingCreditOverdraftLimit?: number | null;
10202
+ /**
10203
+ *
10204
+ * @type {boolean}
10205
+ * @memberof PlanCreditGrantView
10206
+ */
10207
+ billingCreditPostpaidEnabled: boolean;
10208
+ /**
10209
+ *
10210
+ * @type {number}
10211
+ * @memberof PlanCreditGrantView
10212
+ */
10213
+ billingCreditPostpaidRatePerUnit?: number | null;
10214
+ /**
10215
+ *
10216
+ * @type {string}
10217
+ * @memberof PlanCreditGrantView
10218
+ */
10219
+ billingCreditPostpaidRatePerUnitDecimal?: string | null;
9775
10220
  /**
9776
10221
  *
9777
10222
  * @type {number}
@@ -13644,10 +14089,153 @@ declare interface UsePaymentConfirmationReturn {
13644
14089
  reset: () => void;
13645
14090
  }
13646
14091
 
14092
+ /**
14093
+ *
14094
+ * @export
14095
+ * @interface UserCreditUsageResponseData
14096
+ */
14097
+ declare interface UserCreditUsageResponseData {
14098
+ /**
14099
+ *
14100
+ * @type {string}
14101
+ * @memberof UserCreditUsageResponseData
14102
+ */
14103
+ billingCreditId: string;
14104
+ /**
14105
+ * The display name of the credit type
14106
+ * @type {string}
14107
+ * @memberof UserCreditUsageResponseData
14108
+ */
14109
+ creditName: string;
14110
+ /**
14111
+ * The user's net track-driven consumption of the credit within the window (draws minus refunds)
14112
+ * @type {number}
14113
+ * @memberof UserCreditUsageResponseData
14114
+ */
14115
+ creditsUsed: number;
14116
+ /**
14117
+ * This row's fraction (0-1) of the company's total track-driven consumption of the credit within the window, including unattributed consumption
14118
+ * @type {number}
14119
+ * @memberof UserCreditUsageResponseData
14120
+ */
14121
+ share: number;
14122
+ /**
14123
+ * The user the consumption is attributed to; null for consumption from events sent without a user
14124
+ * @type {UserResponseData}
14125
+ * @memberof UserCreditUsageResponseData
14126
+ */
14127
+ user?: UserResponseData;
14128
+ /**
14129
+ * The user the consumption is attributed to; null for unattributed consumption
14130
+ * @type {string}
14131
+ * @memberof UserCreditUsageResponseData
14132
+ */
14133
+ userId?: string | null;
14134
+ }
14135
+
13647
14136
  export declare function useRequest<TData>(fn: () => Promise<{
13648
14137
  data: TData;
13649
14138
  }> | undefined): [RequestState<TData>, () => Promise<void>];
13650
14139
 
14140
+ /**
14141
+ *
14142
+ * @export
14143
+ * @interface UserFeatureUsageResponseData
14144
+ */
14145
+ declare interface UserFeatureUsageResponseData {
14146
+ /**
14147
+ *
14148
+ * @type {FeatureResponseData}
14149
+ * @memberof UserFeatureUsageResponseData
14150
+ */
14151
+ feature?: FeatureResponseData;
14152
+ /**
14153
+ * When the user last used the feature within the window
14154
+ * @type {Date}
14155
+ * @memberof UserFeatureUsageResponseData
14156
+ */
14157
+ lastSeen: Date;
14158
+ /**
14159
+ * This row's fraction (0-1) of the company's total usage of the feature within the window, including unattributed usage
14160
+ * @type {number}
14161
+ * @memberof UserFeatureUsageResponseData
14162
+ */
14163
+ share: number;
14164
+ /**
14165
+ * The user the usage is attributed to; null for usage from events sent without a user
14166
+ * @type {UserResponseData}
14167
+ * @memberof UserFeatureUsageResponseData
14168
+ */
14169
+ user?: UserResponseData;
14170
+ /**
14171
+ * The user the usage is attributed to; null for unattributed usage
14172
+ * @type {string}
14173
+ * @memberof UserFeatureUsageResponseData
14174
+ */
14175
+ userId?: string | null;
14176
+ /**
14177
+ * The user's usage of the feature within the window
14178
+ * @type {number}
14179
+ * @memberof UserFeatureUsageResponseData
14180
+ */
14181
+ value: number;
14182
+ }
14183
+
14184
+ /**
14185
+ * Schematic API
14186
+ * Schematic API
14187
+ *
14188
+ * The version of the OpenAPI document: 0.1
14189
+ *
14190
+ *
14191
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
14192
+ * https://openapi-generator.tech
14193
+ * Do not edit the class manually.
14194
+ */
14195
+ /**
14196
+ *
14197
+ * @export
14198
+ * @interface UserResponseData
14199
+ */
14200
+ declare interface UserResponseData {
14201
+ /**
14202
+ *
14203
+ * @type {Date}
14204
+ * @memberof UserResponseData
14205
+ */
14206
+ createdAt: Date;
14207
+ /**
14208
+ *
14209
+ * @type {string}
14210
+ * @memberof UserResponseData
14211
+ */
14212
+ environmentId: string;
14213
+ /**
14214
+ *
14215
+ * @type {string}
14216
+ * @memberof UserResponseData
14217
+ */
14218
+ id: string;
14219
+ /**
14220
+ *
14221
+ * @type {Date}
14222
+ * @memberof UserResponseData
14223
+ */
14224
+ lastSeenAt?: Date | null;
14225
+ /**
14226
+ *
14227
+ * @type {string}
14228
+ * @memberof UserResponseData
14229
+ */
14230
+ name: string;
14231
+ /**
14232
+ *
14233
+ * @type {Date}
14234
+ * @memberof UserResponseData
14235
+ */
14236
+ updatedAt: Date;
14237
+ }
14238
+
13651
14239
  /**
13652
14240
  * Returns the currency of the company's active subscription, if any.
13653
14241
  * Stripe does not allow mixing currencies on a subscription, so when