priceos 1.0.21 → 1.0.22
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/README.md +28 -1
- package/dist/{chunk-SMK7KTGQ.js → chunk-E3XCMBGY.js} +70 -26
- package/dist/chunk-E3XCMBGY.js.map +1 -0
- package/dist/client.d.ts +2 -3
- package/dist/embed/pricing-table.global.js +7 -7
- package/dist/gen/openapi.d.ts +192 -312
- package/dist/index.cjs +69 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/next.cjs +215 -38
- package/dist/next.cjs.map +1 -1
- package/dist/next.js +147 -14
- package/dist/next.js.map +1 -1
- package/dist/react.cjs +104 -73
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.ts +29 -6
- package/dist/react.js +102 -73
- package/dist/react.js.map +1 -1
- package/dist/types.d.ts +3 -6
- package/package.json +1 -1
- package/dist/chunk-SMK7KTGQ.js.map +0 -1
package/dist/gen/openapi.d.ts
CHANGED
|
@@ -118,6 +118,8 @@ export interface paths {
|
|
|
118
118
|
customerId?: string;
|
|
119
119
|
/** @description Stripe customer ID. */
|
|
120
120
|
stripeCustomerId?: string;
|
|
121
|
+
/** @description Stripe customer's default payment method ID (`pm_...`) or null when none is set. */
|
|
122
|
+
stripeDefaultPaymentMethodId: string | null;
|
|
121
123
|
/** @description Customer name. */
|
|
122
124
|
name?: string;
|
|
123
125
|
/** @description Customer email address. */
|
|
@@ -413,6 +415,8 @@ export interface paths {
|
|
|
413
415
|
customerId?: string;
|
|
414
416
|
/** @description Stripe customer ID. */
|
|
415
417
|
stripeCustomerId?: string;
|
|
418
|
+
/** @description Stripe customer's default payment method ID (`pm_...`) or null when none is set. */
|
|
419
|
+
stripeDefaultPaymentMethodId: string | null;
|
|
416
420
|
/** @description Customer name. */
|
|
417
421
|
name?: string;
|
|
418
422
|
/** @description Customer email address. */
|
|
@@ -815,6 +819,8 @@ export interface paths {
|
|
|
815
819
|
customerId?: string;
|
|
816
820
|
/** @description Stripe customer ID. */
|
|
817
821
|
stripeCustomerId?: string;
|
|
822
|
+
/** @description Stripe customer's default payment method ID (`pm_...`) or null when none is set. */
|
|
823
|
+
stripeDefaultPaymentMethodId: string | null;
|
|
818
824
|
/** @description Customer name. */
|
|
819
825
|
name?: string;
|
|
820
826
|
/** @description Customer email address. */
|
|
@@ -1130,6 +1136,8 @@ export interface paths {
|
|
|
1130
1136
|
customerId?: string;
|
|
1131
1137
|
/** @description Stripe customer ID. */
|
|
1132
1138
|
stripeCustomerId?: string;
|
|
1139
|
+
/** @description Stripe customer's default payment method ID (`pm_...`) or null when none is set. */
|
|
1140
|
+
stripeDefaultPaymentMethodId: string | null;
|
|
1133
1141
|
/** @description Customer name. */
|
|
1134
1142
|
name?: string;
|
|
1135
1143
|
/** @description Customer email address. */
|
|
@@ -1345,7 +1353,7 @@ export interface paths {
|
|
|
1345
1353
|
get?: never;
|
|
1346
1354
|
put?: never;
|
|
1347
1355
|
/**
|
|
1348
|
-
*
|
|
1356
|
+
* Open customer portal
|
|
1349
1357
|
* @description Create a Stripe customer portal session URL for a customer.
|
|
1350
1358
|
*/
|
|
1351
1359
|
post: {
|
|
@@ -1451,6 +1459,145 @@ export interface paths {
|
|
|
1451
1459
|
patch?: never;
|
|
1452
1460
|
trace?: never;
|
|
1453
1461
|
};
|
|
1462
|
+
"/v1/customers/{customerId}/checkout": {
|
|
1463
|
+
parameters: {
|
|
1464
|
+
query?: never;
|
|
1465
|
+
header?: never;
|
|
1466
|
+
path?: never;
|
|
1467
|
+
cookie?: never;
|
|
1468
|
+
};
|
|
1469
|
+
get?: never;
|
|
1470
|
+
put?: never;
|
|
1471
|
+
/**
|
|
1472
|
+
* Checkout
|
|
1473
|
+
* @description Create a Stripe checkout session URL for a customer and Stripe product key. Creates the customer in PriceOS if missing.
|
|
1474
|
+
*/
|
|
1475
|
+
post: {
|
|
1476
|
+
parameters: {
|
|
1477
|
+
query?: never;
|
|
1478
|
+
header: {
|
|
1479
|
+
/** @description API key from your PriceOS dashboard. */
|
|
1480
|
+
"x-api-key": string;
|
|
1481
|
+
};
|
|
1482
|
+
path: {
|
|
1483
|
+
/** @description Customer ID (internal or Stripe). */
|
|
1484
|
+
customerId: string;
|
|
1485
|
+
};
|
|
1486
|
+
cookie?: never;
|
|
1487
|
+
};
|
|
1488
|
+
requestBody: {
|
|
1489
|
+
content: {
|
|
1490
|
+
"application/json": {
|
|
1491
|
+
/** @description Stripe product key configured in PriceOS. Must reference a Stripe product (not a custom product). */
|
|
1492
|
+
stripeProductKey: string;
|
|
1493
|
+
/**
|
|
1494
|
+
* Format: uri
|
|
1495
|
+
* @description Optional checkout success redirect URL.
|
|
1496
|
+
*/
|
|
1497
|
+
successUrl?: string;
|
|
1498
|
+
/** @description Optional customer info used when creating/updating the customer. */
|
|
1499
|
+
customerInfo?: {
|
|
1500
|
+
/** @description Optional customer name. */
|
|
1501
|
+
name?: string | null;
|
|
1502
|
+
/** @description Optional customer email address. */
|
|
1503
|
+
email?: string | null;
|
|
1504
|
+
};
|
|
1505
|
+
/** @description Optional Stripe Checkout Session params to merge into the request. */
|
|
1506
|
+
checkoutParams?: {
|
|
1507
|
+
[key: string]: unknown;
|
|
1508
|
+
};
|
|
1509
|
+
};
|
|
1510
|
+
};
|
|
1511
|
+
};
|
|
1512
|
+
responses: {
|
|
1513
|
+
/** @description Customer checkout session */
|
|
1514
|
+
200: {
|
|
1515
|
+
headers: {
|
|
1516
|
+
[name: string]: unknown;
|
|
1517
|
+
};
|
|
1518
|
+
content: {
|
|
1519
|
+
/**
|
|
1520
|
+
* @example {
|
|
1521
|
+
* "url": "https://checkout.stripe.com/c/pay/cs_test_123"
|
|
1522
|
+
* }
|
|
1523
|
+
*/
|
|
1524
|
+
"application/json": {
|
|
1525
|
+
/**
|
|
1526
|
+
* Format: uri
|
|
1527
|
+
* @description Stripe checkout URL.
|
|
1528
|
+
*/
|
|
1529
|
+
url: string;
|
|
1530
|
+
};
|
|
1531
|
+
};
|
|
1532
|
+
};
|
|
1533
|
+
/** @description Bad request */
|
|
1534
|
+
400: {
|
|
1535
|
+
headers: {
|
|
1536
|
+
[name: string]: unknown;
|
|
1537
|
+
};
|
|
1538
|
+
content: {
|
|
1539
|
+
"application/json": {
|
|
1540
|
+
/** @description Error message. */
|
|
1541
|
+
error: string;
|
|
1542
|
+
};
|
|
1543
|
+
};
|
|
1544
|
+
};
|
|
1545
|
+
/** @description Unauthorized */
|
|
1546
|
+
401: {
|
|
1547
|
+
headers: {
|
|
1548
|
+
[name: string]: unknown;
|
|
1549
|
+
};
|
|
1550
|
+
content: {
|
|
1551
|
+
"application/json": {
|
|
1552
|
+
/** @description Error message. */
|
|
1553
|
+
error: string;
|
|
1554
|
+
};
|
|
1555
|
+
};
|
|
1556
|
+
};
|
|
1557
|
+
/** @description Not found */
|
|
1558
|
+
404: {
|
|
1559
|
+
headers: {
|
|
1560
|
+
[name: string]: unknown;
|
|
1561
|
+
};
|
|
1562
|
+
content: {
|
|
1563
|
+
"application/json": {
|
|
1564
|
+
/** @description Error message. */
|
|
1565
|
+
error: string;
|
|
1566
|
+
};
|
|
1567
|
+
};
|
|
1568
|
+
};
|
|
1569
|
+
/** @description Conflict */
|
|
1570
|
+
409: {
|
|
1571
|
+
headers: {
|
|
1572
|
+
[name: string]: unknown;
|
|
1573
|
+
};
|
|
1574
|
+
content: {
|
|
1575
|
+
"application/json": {
|
|
1576
|
+
/** @description Error message. */
|
|
1577
|
+
error: string;
|
|
1578
|
+
};
|
|
1579
|
+
};
|
|
1580
|
+
};
|
|
1581
|
+
/** @description Server error */
|
|
1582
|
+
500: {
|
|
1583
|
+
headers: {
|
|
1584
|
+
[name: string]: unknown;
|
|
1585
|
+
};
|
|
1586
|
+
content: {
|
|
1587
|
+
"application/json": {
|
|
1588
|
+
/** @description Error message. */
|
|
1589
|
+
error: string;
|
|
1590
|
+
};
|
|
1591
|
+
};
|
|
1592
|
+
};
|
|
1593
|
+
};
|
|
1594
|
+
};
|
|
1595
|
+
delete?: never;
|
|
1596
|
+
options?: never;
|
|
1597
|
+
head?: never;
|
|
1598
|
+
patch?: never;
|
|
1599
|
+
trace?: never;
|
|
1600
|
+
};
|
|
1454
1601
|
"/v1/usage/set": {
|
|
1455
1602
|
parameters: {
|
|
1456
1603
|
query?: never;
|
|
@@ -1485,8 +1632,6 @@ export interface paths {
|
|
|
1485
1632
|
used: number;
|
|
1486
1633
|
/** @description Stable unique identifier for this event. Reuse it on retries for idempotency and to reference the event later. */
|
|
1487
1634
|
idempotencyKey?: string;
|
|
1488
|
-
/** @description Deprecated alias for idempotencyKey. Prefer idempotencyKey. */
|
|
1489
|
-
eventKey?: string;
|
|
1490
1635
|
/** @description Optional metadata for the adjustment event (string key/value pairs). */
|
|
1491
1636
|
metadata?: {
|
|
1492
1637
|
[key: string]: string;
|
|
@@ -2265,8 +2410,6 @@ export interface paths {
|
|
|
2265
2410
|
amount?: number;
|
|
2266
2411
|
/** @description Stable unique identifier for this event. Reuse it on retries for idempotency and to reference the event later. */
|
|
2267
2412
|
idempotencyKey?: string;
|
|
2268
|
-
/** @description Deprecated alias for idempotencyKey. Prefer idempotencyKey. */
|
|
2269
|
-
eventKey?: string;
|
|
2270
2413
|
/** @description Unix timestamp (ms) when the event occurred. */
|
|
2271
2414
|
occurredAt?: number;
|
|
2272
2415
|
/** @description Optional metadata for the event (string key/value pairs). */
|
|
@@ -2834,34 +2977,29 @@ export interface paths {
|
|
|
2834
2977
|
};
|
|
2835
2978
|
content: {
|
|
2836
2979
|
"application/json": {
|
|
2837
|
-
/** @description Usage event. */
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
source: "usage" | "usage_set_adjustment";
|
|
2854
|
-
/** @description Event metadata (string key/value pairs). */
|
|
2855
|
-
metadata?: {
|
|
2856
|
-
[key: string]: string;
|
|
2857
|
-
};
|
|
2858
|
-
/** @description Whether the usage event is voided. */
|
|
2859
|
-
isVoid: boolean;
|
|
2860
|
-
/** @description Unix timestamp (ms) when the event was voided. */
|
|
2861
|
-
voidedAt?: number | null;
|
|
2862
|
-
/** @description Reason the event was voided. */
|
|
2863
|
-
voidedReason?: string | null;
|
|
2980
|
+
/** @description Usage event ID. */
|
|
2981
|
+
id: string;
|
|
2982
|
+
/** @description Usage amount recorded. */
|
|
2983
|
+
amount: number;
|
|
2984
|
+
/** @description Unix timestamp (ms) when the event occurred. */
|
|
2985
|
+
occurredAt: number;
|
|
2986
|
+
/** @description Stable unique identifier for this event. Reuse it on retries for idempotency and to reference the event later. */
|
|
2987
|
+
idempotencyKey?: string | null;
|
|
2988
|
+
/**
|
|
2989
|
+
* @description Usage event source.
|
|
2990
|
+
* @enum {string}
|
|
2991
|
+
*/
|
|
2992
|
+
source: "usage" | "usage_set_adjustment";
|
|
2993
|
+
/** @description Event metadata (string key/value pairs). */
|
|
2994
|
+
metadata?: {
|
|
2995
|
+
[key: string]: string;
|
|
2864
2996
|
};
|
|
2997
|
+
/** @description Whether the usage event is voided. */
|
|
2998
|
+
isVoid: boolean;
|
|
2999
|
+
/** @description Unix timestamp (ms) when the event was voided. */
|
|
3000
|
+
voidedAt?: number | null;
|
|
3001
|
+
/** @description Reason the event was voided. */
|
|
3002
|
+
voidedReason?: string | null;
|
|
2865
3003
|
};
|
|
2866
3004
|
};
|
|
2867
3005
|
};
|
|
@@ -2941,8 +3079,6 @@ export interface paths {
|
|
|
2941
3079
|
occurredAt?: number;
|
|
2942
3080
|
/** @description Stable unique identifier for this event. Reuse it on retries for idempotency and to reference the event later. Use null to clear. */
|
|
2943
3081
|
idempotencyKey?: string | null;
|
|
2944
|
-
/** @description Deprecated alias for idempotencyKey. Prefer idempotencyKey. Use null to clear. */
|
|
2945
|
-
eventKey?: string | null;
|
|
2946
3082
|
/** @description Optional updated metadata (string key/value pairs). Use null to clear. */
|
|
2947
3083
|
metadata?: {
|
|
2948
3084
|
[key: string]: string;
|
|
@@ -2958,34 +3094,29 @@ export interface paths {
|
|
|
2958
3094
|
};
|
|
2959
3095
|
content: {
|
|
2960
3096
|
"application/json": {
|
|
2961
|
-
/** @description Usage event. */
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
source: "usage" | "usage_set_adjustment";
|
|
2978
|
-
/** @description Event metadata (string key/value pairs). */
|
|
2979
|
-
metadata?: {
|
|
2980
|
-
[key: string]: string;
|
|
2981
|
-
};
|
|
2982
|
-
/** @description Whether the usage event is voided. */
|
|
2983
|
-
isVoid: boolean;
|
|
2984
|
-
/** @description Unix timestamp (ms) when the event was voided. */
|
|
2985
|
-
voidedAt?: number | null;
|
|
2986
|
-
/** @description Reason the event was voided. */
|
|
2987
|
-
voidedReason?: string | null;
|
|
3097
|
+
/** @description Usage event ID. */
|
|
3098
|
+
id: string;
|
|
3099
|
+
/** @description Usage amount recorded. */
|
|
3100
|
+
amount: number;
|
|
3101
|
+
/** @description Unix timestamp (ms) when the event occurred. */
|
|
3102
|
+
occurredAt: number;
|
|
3103
|
+
/** @description Stable unique identifier for this event. Reuse it on retries for idempotency and to reference the event later. */
|
|
3104
|
+
idempotencyKey?: string | null;
|
|
3105
|
+
/**
|
|
3106
|
+
* @description Usage event source.
|
|
3107
|
+
* @enum {string}
|
|
3108
|
+
*/
|
|
3109
|
+
source: "usage" | "usage_set_adjustment";
|
|
3110
|
+
/** @description Event metadata (string key/value pairs). */
|
|
3111
|
+
metadata?: {
|
|
3112
|
+
[key: string]: string;
|
|
2988
3113
|
};
|
|
3114
|
+
/** @description Whether the usage event is voided. */
|
|
3115
|
+
isVoid: boolean;
|
|
3116
|
+
/** @description Unix timestamp (ms) when the event was voided. */
|
|
3117
|
+
voidedAt?: number | null;
|
|
3118
|
+
/** @description Reason the event was voided. */
|
|
3119
|
+
voidedReason?: string | null;
|
|
2989
3120
|
};
|
|
2990
3121
|
};
|
|
2991
3122
|
};
|
|
@@ -3126,251 +3257,6 @@ export interface paths {
|
|
|
3126
3257
|
patch?: never;
|
|
3127
3258
|
trace?: never;
|
|
3128
3259
|
};
|
|
3129
|
-
"/v1/usage/idempotency-key/{idempotencyKey}": {
|
|
3130
|
-
parameters: {
|
|
3131
|
-
query?: never;
|
|
3132
|
-
header?: never;
|
|
3133
|
-
path?: never;
|
|
3134
|
-
cookie?: never;
|
|
3135
|
-
};
|
|
3136
|
-
/**
|
|
3137
|
-
* Get usage event by idempotency key
|
|
3138
|
-
* @description Get a usage event by idempotency key.
|
|
3139
|
-
*/
|
|
3140
|
-
get: {
|
|
3141
|
-
parameters: {
|
|
3142
|
-
query?: never;
|
|
3143
|
-
header: {
|
|
3144
|
-
/** @description API key from your PriceOS dashboard. */
|
|
3145
|
-
"x-api-key": string;
|
|
3146
|
-
};
|
|
3147
|
-
path: {
|
|
3148
|
-
/** @description Usage event idempotency key. */
|
|
3149
|
-
idempotencyKey: string;
|
|
3150
|
-
};
|
|
3151
|
-
cookie?: never;
|
|
3152
|
-
};
|
|
3153
|
-
requestBody?: never;
|
|
3154
|
-
responses: {
|
|
3155
|
-
/** @description Usage event */
|
|
3156
|
-
200: {
|
|
3157
|
-
headers: {
|
|
3158
|
-
[name: string]: unknown;
|
|
3159
|
-
};
|
|
3160
|
-
content: {
|
|
3161
|
-
"application/json": {
|
|
3162
|
-
/** @description Usage event. */
|
|
3163
|
-
usageEvent: {
|
|
3164
|
-
/** @description Usage event ID. */
|
|
3165
|
-
id: string;
|
|
3166
|
-
/** @description Usage amount recorded. */
|
|
3167
|
-
amount: number;
|
|
3168
|
-
/** @description Unix timestamp (ms) when the event occurred. */
|
|
3169
|
-
occurredAt: number;
|
|
3170
|
-
/** @description Stable unique identifier for this event. Reuse it on retries for idempotency and to reference the event later. */
|
|
3171
|
-
idempotencyKey?: string | null;
|
|
3172
|
-
/** @description Deprecated alias for idempotencyKey. Prefer idempotencyKey. */
|
|
3173
|
-
eventKey?: string | null;
|
|
3174
|
-
/**
|
|
3175
|
-
* @description Usage event source.
|
|
3176
|
-
* @enum {string}
|
|
3177
|
-
*/
|
|
3178
|
-
source: "usage" | "usage_set_adjustment";
|
|
3179
|
-
/** @description Event metadata (string key/value pairs). */
|
|
3180
|
-
metadata?: {
|
|
3181
|
-
[key: string]: string;
|
|
3182
|
-
};
|
|
3183
|
-
/** @description Whether the usage event is voided. */
|
|
3184
|
-
isVoid: boolean;
|
|
3185
|
-
/** @description Unix timestamp (ms) when the event was voided. */
|
|
3186
|
-
voidedAt?: number | null;
|
|
3187
|
-
/** @description Reason the event was voided. */
|
|
3188
|
-
voidedReason?: string | null;
|
|
3189
|
-
};
|
|
3190
|
-
};
|
|
3191
|
-
};
|
|
3192
|
-
};
|
|
3193
|
-
/** @description Bad request */
|
|
3194
|
-
400: {
|
|
3195
|
-
headers: {
|
|
3196
|
-
[name: string]: unknown;
|
|
3197
|
-
};
|
|
3198
|
-
content: {
|
|
3199
|
-
"application/json": {
|
|
3200
|
-
/** @description Error message. */
|
|
3201
|
-
error: string;
|
|
3202
|
-
};
|
|
3203
|
-
};
|
|
3204
|
-
};
|
|
3205
|
-
/** @description Unauthorized */
|
|
3206
|
-
401: {
|
|
3207
|
-
headers: {
|
|
3208
|
-
[name: string]: unknown;
|
|
3209
|
-
};
|
|
3210
|
-
content: {
|
|
3211
|
-
"application/json": {
|
|
3212
|
-
/** @description Error message. */
|
|
3213
|
-
error: string;
|
|
3214
|
-
};
|
|
3215
|
-
};
|
|
3216
|
-
};
|
|
3217
|
-
/** @description Not found */
|
|
3218
|
-
404: {
|
|
3219
|
-
headers: {
|
|
3220
|
-
[name: string]: unknown;
|
|
3221
|
-
};
|
|
3222
|
-
content: {
|
|
3223
|
-
"application/json": {
|
|
3224
|
-
/** @description Error message. */
|
|
3225
|
-
error: string;
|
|
3226
|
-
};
|
|
3227
|
-
};
|
|
3228
|
-
};
|
|
3229
|
-
/** @description Server error */
|
|
3230
|
-
500: {
|
|
3231
|
-
headers: {
|
|
3232
|
-
[name: string]: unknown;
|
|
3233
|
-
};
|
|
3234
|
-
content: {
|
|
3235
|
-
"application/json": {
|
|
3236
|
-
/** @description Error message. */
|
|
3237
|
-
error: string;
|
|
3238
|
-
};
|
|
3239
|
-
};
|
|
3240
|
-
};
|
|
3241
|
-
};
|
|
3242
|
-
};
|
|
3243
|
-
put?: never;
|
|
3244
|
-
post?: never;
|
|
3245
|
-
delete?: never;
|
|
3246
|
-
options?: never;
|
|
3247
|
-
head?: never;
|
|
3248
|
-
patch?: never;
|
|
3249
|
-
trace?: never;
|
|
3250
|
-
};
|
|
3251
|
-
"/v1/usage/event-key/{eventKey}": {
|
|
3252
|
-
parameters: {
|
|
3253
|
-
query?: never;
|
|
3254
|
-
header?: never;
|
|
3255
|
-
path?: never;
|
|
3256
|
-
cookie?: never;
|
|
3257
|
-
};
|
|
3258
|
-
/**
|
|
3259
|
-
* Get usage event by event key (legacy)
|
|
3260
|
-
* @deprecated
|
|
3261
|
-
* @description Legacy alias for get usage event by idempotency key.
|
|
3262
|
-
*/
|
|
3263
|
-
get: {
|
|
3264
|
-
parameters: {
|
|
3265
|
-
query?: never;
|
|
3266
|
-
header: {
|
|
3267
|
-
/** @description API key from your PriceOS dashboard. */
|
|
3268
|
-
"x-api-key": string;
|
|
3269
|
-
};
|
|
3270
|
-
path: {
|
|
3271
|
-
/** @description Legacy usage event key. */
|
|
3272
|
-
eventKey: string;
|
|
3273
|
-
};
|
|
3274
|
-
cookie?: never;
|
|
3275
|
-
};
|
|
3276
|
-
requestBody?: never;
|
|
3277
|
-
responses: {
|
|
3278
|
-
/** @description Usage event */
|
|
3279
|
-
200: {
|
|
3280
|
-
headers: {
|
|
3281
|
-
[name: string]: unknown;
|
|
3282
|
-
};
|
|
3283
|
-
content: {
|
|
3284
|
-
"application/json": {
|
|
3285
|
-
/** @description Usage event. */
|
|
3286
|
-
usageEvent: {
|
|
3287
|
-
/** @description Usage event ID. */
|
|
3288
|
-
id: string;
|
|
3289
|
-
/** @description Usage amount recorded. */
|
|
3290
|
-
amount: number;
|
|
3291
|
-
/** @description Unix timestamp (ms) when the event occurred. */
|
|
3292
|
-
occurredAt: number;
|
|
3293
|
-
/** @description Stable unique identifier for this event. Reuse it on retries for idempotency and to reference the event later. */
|
|
3294
|
-
idempotencyKey?: string | null;
|
|
3295
|
-
/** @description Deprecated alias for idempotencyKey. Prefer idempotencyKey. */
|
|
3296
|
-
eventKey?: string | null;
|
|
3297
|
-
/**
|
|
3298
|
-
* @description Usage event source.
|
|
3299
|
-
* @enum {string}
|
|
3300
|
-
*/
|
|
3301
|
-
source: "usage" | "usage_set_adjustment";
|
|
3302
|
-
/** @description Event metadata (string key/value pairs). */
|
|
3303
|
-
metadata?: {
|
|
3304
|
-
[key: string]: string;
|
|
3305
|
-
};
|
|
3306
|
-
/** @description Whether the usage event is voided. */
|
|
3307
|
-
isVoid: boolean;
|
|
3308
|
-
/** @description Unix timestamp (ms) when the event was voided. */
|
|
3309
|
-
voidedAt?: number | null;
|
|
3310
|
-
/** @description Reason the event was voided. */
|
|
3311
|
-
voidedReason?: string | null;
|
|
3312
|
-
};
|
|
3313
|
-
};
|
|
3314
|
-
};
|
|
3315
|
-
};
|
|
3316
|
-
/** @description Bad request */
|
|
3317
|
-
400: {
|
|
3318
|
-
headers: {
|
|
3319
|
-
[name: string]: unknown;
|
|
3320
|
-
};
|
|
3321
|
-
content: {
|
|
3322
|
-
"application/json": {
|
|
3323
|
-
/** @description Error message. */
|
|
3324
|
-
error: string;
|
|
3325
|
-
};
|
|
3326
|
-
};
|
|
3327
|
-
};
|
|
3328
|
-
/** @description Unauthorized */
|
|
3329
|
-
401: {
|
|
3330
|
-
headers: {
|
|
3331
|
-
[name: string]: unknown;
|
|
3332
|
-
};
|
|
3333
|
-
content: {
|
|
3334
|
-
"application/json": {
|
|
3335
|
-
/** @description Error message. */
|
|
3336
|
-
error: string;
|
|
3337
|
-
};
|
|
3338
|
-
};
|
|
3339
|
-
};
|
|
3340
|
-
/** @description Not found */
|
|
3341
|
-
404: {
|
|
3342
|
-
headers: {
|
|
3343
|
-
[name: string]: unknown;
|
|
3344
|
-
};
|
|
3345
|
-
content: {
|
|
3346
|
-
"application/json": {
|
|
3347
|
-
/** @description Error message. */
|
|
3348
|
-
error: string;
|
|
3349
|
-
};
|
|
3350
|
-
};
|
|
3351
|
-
};
|
|
3352
|
-
/** @description Server error */
|
|
3353
|
-
500: {
|
|
3354
|
-
headers: {
|
|
3355
|
-
[name: string]: unknown;
|
|
3356
|
-
};
|
|
3357
|
-
content: {
|
|
3358
|
-
"application/json": {
|
|
3359
|
-
/** @description Error message. */
|
|
3360
|
-
error: string;
|
|
3361
|
-
};
|
|
3362
|
-
};
|
|
3363
|
-
};
|
|
3364
|
-
};
|
|
3365
|
-
};
|
|
3366
|
-
put?: never;
|
|
3367
|
-
post?: never;
|
|
3368
|
-
delete?: never;
|
|
3369
|
-
options?: never;
|
|
3370
|
-
head?: never;
|
|
3371
|
-
patch?: never;
|
|
3372
|
-
trace?: never;
|
|
3373
|
-
};
|
|
3374
3260
|
"/v1/usage/{id}/void": {
|
|
3375
3261
|
parameters: {
|
|
3376
3262
|
query?: never;
|
|
@@ -3423,8 +3309,6 @@ export interface paths {
|
|
|
3423
3309
|
occurredAt: number;
|
|
3424
3310
|
/** @description Stable unique identifier for this event. Reuse it on retries for idempotency and to reference the event later. */
|
|
3425
3311
|
idempotencyKey?: string | null;
|
|
3426
|
-
/** @description Deprecated alias for idempotencyKey. Prefer idempotencyKey. */
|
|
3427
|
-
eventKey?: string | null;
|
|
3428
3312
|
/**
|
|
3429
3313
|
* @description Usage event source.
|
|
3430
3314
|
* @enum {string}
|
|
@@ -3655,8 +3539,6 @@ export interface paths {
|
|
|
3655
3539
|
amount?: number;
|
|
3656
3540
|
/** @description Stable unique identifier for this event. Reuse it on retries for idempotency and to reference the event later. */
|
|
3657
3541
|
idempotencyKey?: string;
|
|
3658
|
-
/** @description Deprecated alias for idempotencyKey. Prefer idempotencyKey. */
|
|
3659
|
-
eventKey?: string;
|
|
3660
3542
|
/** @description Unix timestamp (ms) when the event occurred. */
|
|
3661
3543
|
occurredAt?: number;
|
|
3662
3544
|
/** @description Optional metadata for the event (string key/value pairs). */
|
|
@@ -3836,8 +3718,6 @@ export interface paths {
|
|
|
3836
3718
|
occurredAt: number;
|
|
3837
3719
|
/** @description Stable unique identifier for this event. Reuse it on retries for idempotency and to reference the event later. */
|
|
3838
3720
|
idempotencyKey?: string | null;
|
|
3839
|
-
/** @description Deprecated alias for idempotencyKey. Prefer idempotencyKey. */
|
|
3840
|
-
eventKey?: string | null;
|
|
3841
3721
|
/**
|
|
3842
3722
|
* @description Usage event source.
|
|
3843
3723
|
* @enum {string}
|