@solvapay/server 2.6.0-preview-002621028f806cdd05da422992f573f05d5a6719 → 2.6.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/edge.d.ts +51 -37
- package/dist/edge.js +0 -2
- package/dist/fetch/index.d.cts +18 -18
- package/dist/fetch/index.d.ts +18 -18
- package/dist/index.cjs +0 -2
- package/dist/index.d.cts +51 -37
- package/dist/index.d.ts +51 -37
- package/dist/index.js +0 -2
- package/package.json +1 -1
package/dist/edge.d.ts
CHANGED
|
@@ -826,15 +826,15 @@ interface components {
|
|
|
826
826
|
LimitBalanceDto: {
|
|
827
827
|
/** @description Credit balance in credits (100 credits = 1 minor currency unit) */
|
|
828
828
|
creditBalance: number;
|
|
829
|
-
/** @description Credits per minor unit of `currency` (typically 100) */
|
|
830
|
-
creditsPerMinorUnit?: number;
|
|
831
829
|
/** @description Credits deducted per metered item (wallet coverage: remainingUnits = balance / creditsPerUnit) */
|
|
832
830
|
creditsPerUnit: number;
|
|
833
831
|
currency: string;
|
|
834
|
-
/** @description USD → display-currency rate used with creditsPerMinorUnit */
|
|
835
|
-
displayExchangeRate?: number;
|
|
836
832
|
/** @description How many metered items the credit balance still covers (`balance / creditsPerUnit`) */
|
|
837
833
|
remainingUnits?: number;
|
|
834
|
+
/** @description Credits per minor unit of `currency` (typically 100) */
|
|
835
|
+
creditsPerMinorUnit?: number;
|
|
836
|
+
/** @description USD → display-currency rate used with creditsPerMinorUnit */
|
|
837
|
+
displayExchangeRate?: number;
|
|
838
838
|
};
|
|
839
839
|
LimitPlanItemDto: {
|
|
840
840
|
/** @description Derived billing cycle */
|
|
@@ -1205,17 +1205,17 @@ interface components {
|
|
|
1205
1205
|
};
|
|
1206
1206
|
ProcessPaymentCancelled: {
|
|
1207
1207
|
/**
|
|
1208
|
-
*
|
|
1208
|
+
* discriminator enum property added by openapi-typescript
|
|
1209
1209
|
* @enum {string}
|
|
1210
1210
|
*/
|
|
1211
|
-
status: '
|
|
1211
|
+
status: 'ProcessPaymentCancelled';
|
|
1212
1212
|
};
|
|
1213
1213
|
ProcessPaymentFailed: {
|
|
1214
1214
|
/**
|
|
1215
|
-
*
|
|
1215
|
+
* discriminator enum property added by openapi-typescript
|
|
1216
1216
|
* @enum {string}
|
|
1217
1217
|
*/
|
|
1218
|
-
status: '
|
|
1218
|
+
status: 'ProcessPaymentFailed';
|
|
1219
1219
|
};
|
|
1220
1220
|
ProcessPaymentIntentDto: {
|
|
1221
1221
|
customerRef: string;
|
|
@@ -1224,25 +1224,25 @@ interface components {
|
|
|
1224
1224
|
};
|
|
1225
1225
|
ProcessPaymentProcessing: {
|
|
1226
1226
|
/**
|
|
1227
|
-
*
|
|
1227
|
+
* discriminator enum property added by openapi-typescript
|
|
1228
1228
|
* @enum {string}
|
|
1229
1229
|
*/
|
|
1230
|
-
status: '
|
|
1230
|
+
status: 'ProcessPaymentProcessing';
|
|
1231
1231
|
};
|
|
1232
1232
|
ProcessPaymentSucceededBare: {
|
|
1233
1233
|
/**
|
|
1234
|
-
*
|
|
1234
|
+
* discriminator enum property added by openapi-typescript
|
|
1235
1235
|
* @enum {string}
|
|
1236
1236
|
*/
|
|
1237
|
-
status: '
|
|
1237
|
+
status: 'ProcessPaymentSucceededBare';
|
|
1238
1238
|
};
|
|
1239
1239
|
ProcessPaymentSucceededOneTime: {
|
|
1240
1240
|
oneTimePurchase: components['schemas']['OneTimePurchaseInfo'];
|
|
1241
1241
|
/**
|
|
1242
|
-
*
|
|
1242
|
+
* discriminator enum property added by openapi-typescript
|
|
1243
1243
|
* @enum {string}
|
|
1244
1244
|
*/
|
|
1245
|
-
status: '
|
|
1245
|
+
status: 'ProcessPaymentSucceededOneTime';
|
|
1246
1246
|
/**
|
|
1247
1247
|
* @example one-time
|
|
1248
1248
|
* @enum {string}
|
|
@@ -1252,10 +1252,10 @@ interface components {
|
|
|
1252
1252
|
ProcessPaymentSucceededRecurring: {
|
|
1253
1253
|
purchase: components['schemas']['SdkPurchaseResponse'];
|
|
1254
1254
|
/**
|
|
1255
|
-
*
|
|
1255
|
+
* discriminator enum property added by openapi-typescript
|
|
1256
1256
|
* @enum {string}
|
|
1257
1257
|
*/
|
|
1258
|
-
status: '
|
|
1258
|
+
status: 'ProcessPaymentSucceededRecurring';
|
|
1259
1259
|
/**
|
|
1260
1260
|
* @example recurring
|
|
1261
1261
|
* @enum {string}
|
|
@@ -1266,10 +1266,10 @@ interface components {
|
|
|
1266
1266
|
/** @description Detail message describing the timeout */
|
|
1267
1267
|
message?: string;
|
|
1268
1268
|
/**
|
|
1269
|
-
*
|
|
1269
|
+
* discriminator enum property added by openapi-typescript
|
|
1270
1270
|
* @enum {string}
|
|
1271
1271
|
*/
|
|
1272
|
-
status: '
|
|
1272
|
+
status: 'ProcessPaymentTimeout';
|
|
1273
1273
|
};
|
|
1274
1274
|
ProductConfigDto: {
|
|
1275
1275
|
/**
|
|
@@ -3211,10 +3211,10 @@ interface operations {
|
|
|
3211
3211
|
content: {
|
|
3212
3212
|
'application/json': {
|
|
3213
3213
|
/**
|
|
3214
|
-
* Outcome of the delete:
|
|
3214
|
+
* Outcome of the delete: hard delete in sandbox, soft-delete or deactivation in live depending on existing purchases
|
|
3215
3215
|
* @enum {string}
|
|
3216
3216
|
*/
|
|
3217
|
-
action?: 'deactivated' | 'soft_deleted';
|
|
3217
|
+
action?: 'deleted' | 'deactivated' | 'soft_deleted';
|
|
3218
3218
|
success?: boolean;
|
|
3219
3219
|
};
|
|
3220
3220
|
};
|
|
@@ -3953,20 +3953,38 @@ type OneTimePurchaseInfo = components['schemas']['OneTimePurchaseInfo'];
|
|
|
3953
3953
|
/**
|
|
3954
3954
|
* Result from processing a payment intent.
|
|
3955
3955
|
*
|
|
3956
|
-
*
|
|
3957
|
-
*
|
|
3958
|
-
*
|
|
3959
|
-
*
|
|
3960
|
-
*
|
|
3961
|
-
*
|
|
3962
|
-
*
|
|
3963
|
-
*
|
|
3964
|
-
*
|
|
3965
|
-
*
|
|
3966
|
-
*
|
|
3967
|
-
* the timeout branch.
|
|
3956
|
+
* Mirrors the backend's discriminated `oneOf` response. The `succeeded`
|
|
3957
|
+
* branches are further discriminated on `type` so consumers can route to
|
|
3958
|
+
* recurring vs one-time purchase handling without guarding against
|
|
3959
|
+
* `purchase === undefined`. A bare `{ status: 'succeeded' }` is returned
|
|
3960
|
+
* when the webhook race means the backend can't yet enrich the response
|
|
3961
|
+
* with the created purchase — callers should fall back to refetching.
|
|
3962
|
+
*
|
|
3963
|
+
* `failed` and `cancelled` are returned by the backend when the Stripe
|
|
3964
|
+
* PaymentIntent is in a terminal non-success state and are routed to
|
|
3965
|
+
* `onError` by `reconcilePayment`. `timeout` carries a retry hint and is
|
|
3966
|
+
* routed to the timeout branch.
|
|
3968
3967
|
*/
|
|
3969
|
-
type ProcessPaymentResult =
|
|
3968
|
+
type ProcessPaymentResult = {
|
|
3969
|
+
status: 'succeeded';
|
|
3970
|
+
type: 'recurring';
|
|
3971
|
+
purchase: PurchaseInfo;
|
|
3972
|
+
} | {
|
|
3973
|
+
status: 'succeeded';
|
|
3974
|
+
type: 'one-time';
|
|
3975
|
+
oneTimePurchase: OneTimePurchaseInfo;
|
|
3976
|
+
} | {
|
|
3977
|
+
status: 'succeeded';
|
|
3978
|
+
} | {
|
|
3979
|
+
status: 'processing';
|
|
3980
|
+
} | {
|
|
3981
|
+
status: 'timeout';
|
|
3982
|
+
message?: string;
|
|
3983
|
+
} | {
|
|
3984
|
+
status: 'failed';
|
|
3985
|
+
} | {
|
|
3986
|
+
status: 'cancelled';
|
|
3987
|
+
};
|
|
3970
3988
|
/**
|
|
3971
3989
|
* Result from processing a credit-topup payment intent.
|
|
3972
3990
|
*
|
|
@@ -5522,8 +5540,6 @@ declare const PaywallStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
5522
5540
|
creditsPerCall: z.ZodOptional<z.ZodNumber>;
|
|
5523
5541
|
shortfallCredits: z.ZodOptional<z.ZodNumber>;
|
|
5524
5542
|
remainingCalls: z.ZodOptional<z.ZodNumber>;
|
|
5525
|
-
creditsPerMinorUnit: z.ZodOptional<z.ZodNumber>;
|
|
5526
|
-
displayExchangeRate: z.ZodOptional<z.ZodNumber>;
|
|
5527
5543
|
purchaseRef: z.ZodOptional<z.ZodString>;
|
|
5528
5544
|
planStatus: z.ZodOptional<z.ZodString>;
|
|
5529
5545
|
autoRecharge: z.ZodOptional<z.ZodObject<{
|
|
@@ -5571,8 +5587,6 @@ declare const PaywallStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
5571
5587
|
creditsPerCall: z.ZodOptional<z.ZodNumber>;
|
|
5572
5588
|
shortfallCredits: z.ZodOptional<z.ZodNumber>;
|
|
5573
5589
|
remainingCalls: z.ZodOptional<z.ZodNumber>;
|
|
5574
|
-
creditsPerMinorUnit: z.ZodOptional<z.ZodNumber>;
|
|
5575
|
-
displayExchangeRate: z.ZodOptional<z.ZodNumber>;
|
|
5576
5590
|
purchaseRef: z.ZodOptional<z.ZodString>;
|
|
5577
5591
|
planStatus: z.ZodOptional<z.ZodString>;
|
|
5578
5592
|
autoRecharge: z.ZodOptional<z.ZodObject<{
|
package/dist/edge.js
CHANGED
|
@@ -2535,8 +2535,6 @@ var recoveryFields2 = {
|
|
|
2535
2535
|
creditsPerCall: z.number().optional(),
|
|
2536
2536
|
shortfallCredits: z.number().optional(),
|
|
2537
2537
|
remainingCalls: z.number().optional(),
|
|
2538
|
-
creditsPerMinorUnit: z.number().optional(),
|
|
2539
|
-
displayExchangeRate: z.number().optional(),
|
|
2540
2538
|
purchaseRef: z.string().optional(),
|
|
2541
2539
|
planStatus: z.string().optional(),
|
|
2542
2540
|
autoRecharge: z.object({
|
package/dist/fetch/index.d.cts
CHANGED
|
@@ -823,15 +823,15 @@ interface components {
|
|
|
823
823
|
LimitBalanceDto: {
|
|
824
824
|
/** @description Credit balance in credits (100 credits = 1 minor currency unit) */
|
|
825
825
|
creditBalance: number;
|
|
826
|
-
/** @description Credits per minor unit of `currency` (typically 100) */
|
|
827
|
-
creditsPerMinorUnit?: number;
|
|
828
826
|
/** @description Credits deducted per metered item (wallet coverage: remainingUnits = balance / creditsPerUnit) */
|
|
829
827
|
creditsPerUnit: number;
|
|
830
828
|
currency: string;
|
|
831
|
-
/** @description USD → display-currency rate used with creditsPerMinorUnit */
|
|
832
|
-
displayExchangeRate?: number;
|
|
833
829
|
/** @description How many metered items the credit balance still covers (`balance / creditsPerUnit`) */
|
|
834
830
|
remainingUnits?: number;
|
|
831
|
+
/** @description Credits per minor unit of `currency` (typically 100) */
|
|
832
|
+
creditsPerMinorUnit?: number;
|
|
833
|
+
/** @description USD → display-currency rate used with creditsPerMinorUnit */
|
|
834
|
+
displayExchangeRate?: number;
|
|
835
835
|
};
|
|
836
836
|
LimitPlanItemDto: {
|
|
837
837
|
/** @description Derived billing cycle */
|
|
@@ -1202,17 +1202,17 @@ interface components {
|
|
|
1202
1202
|
};
|
|
1203
1203
|
ProcessPaymentCancelled: {
|
|
1204
1204
|
/**
|
|
1205
|
-
*
|
|
1205
|
+
* discriminator enum property added by openapi-typescript
|
|
1206
1206
|
* @enum {string}
|
|
1207
1207
|
*/
|
|
1208
|
-
status: '
|
|
1208
|
+
status: 'ProcessPaymentCancelled';
|
|
1209
1209
|
};
|
|
1210
1210
|
ProcessPaymentFailed: {
|
|
1211
1211
|
/**
|
|
1212
|
-
*
|
|
1212
|
+
* discriminator enum property added by openapi-typescript
|
|
1213
1213
|
* @enum {string}
|
|
1214
1214
|
*/
|
|
1215
|
-
status: '
|
|
1215
|
+
status: 'ProcessPaymentFailed';
|
|
1216
1216
|
};
|
|
1217
1217
|
ProcessPaymentIntentDto: {
|
|
1218
1218
|
customerRef: string;
|
|
@@ -1221,25 +1221,25 @@ interface components {
|
|
|
1221
1221
|
};
|
|
1222
1222
|
ProcessPaymentProcessing: {
|
|
1223
1223
|
/**
|
|
1224
|
-
*
|
|
1224
|
+
* discriminator enum property added by openapi-typescript
|
|
1225
1225
|
* @enum {string}
|
|
1226
1226
|
*/
|
|
1227
|
-
status: '
|
|
1227
|
+
status: 'ProcessPaymentProcessing';
|
|
1228
1228
|
};
|
|
1229
1229
|
ProcessPaymentSucceededBare: {
|
|
1230
1230
|
/**
|
|
1231
|
-
*
|
|
1231
|
+
* discriminator enum property added by openapi-typescript
|
|
1232
1232
|
* @enum {string}
|
|
1233
1233
|
*/
|
|
1234
|
-
status: '
|
|
1234
|
+
status: 'ProcessPaymentSucceededBare';
|
|
1235
1235
|
};
|
|
1236
1236
|
ProcessPaymentSucceededOneTime: {
|
|
1237
1237
|
oneTimePurchase: components['schemas']['OneTimePurchaseInfo'];
|
|
1238
1238
|
/**
|
|
1239
|
-
*
|
|
1239
|
+
* discriminator enum property added by openapi-typescript
|
|
1240
1240
|
* @enum {string}
|
|
1241
1241
|
*/
|
|
1242
|
-
status: '
|
|
1242
|
+
status: 'ProcessPaymentSucceededOneTime';
|
|
1243
1243
|
/**
|
|
1244
1244
|
* @example one-time
|
|
1245
1245
|
* @enum {string}
|
|
@@ -1249,10 +1249,10 @@ interface components {
|
|
|
1249
1249
|
ProcessPaymentSucceededRecurring: {
|
|
1250
1250
|
purchase: components['schemas']['SdkPurchaseResponse'];
|
|
1251
1251
|
/**
|
|
1252
|
-
*
|
|
1252
|
+
* discriminator enum property added by openapi-typescript
|
|
1253
1253
|
* @enum {string}
|
|
1254
1254
|
*/
|
|
1255
|
-
status: '
|
|
1255
|
+
status: 'ProcessPaymentSucceededRecurring';
|
|
1256
1256
|
/**
|
|
1257
1257
|
* @example recurring
|
|
1258
1258
|
* @enum {string}
|
|
@@ -1263,10 +1263,10 @@ interface components {
|
|
|
1263
1263
|
/** @description Detail message describing the timeout */
|
|
1264
1264
|
message?: string;
|
|
1265
1265
|
/**
|
|
1266
|
-
*
|
|
1266
|
+
* discriminator enum property added by openapi-typescript
|
|
1267
1267
|
* @enum {string}
|
|
1268
1268
|
*/
|
|
1269
|
-
status: '
|
|
1269
|
+
status: 'ProcessPaymentTimeout';
|
|
1270
1270
|
};
|
|
1271
1271
|
ProductConfigDto: {
|
|
1272
1272
|
/**
|
package/dist/fetch/index.d.ts
CHANGED
|
@@ -823,15 +823,15 @@ interface components {
|
|
|
823
823
|
LimitBalanceDto: {
|
|
824
824
|
/** @description Credit balance in credits (100 credits = 1 minor currency unit) */
|
|
825
825
|
creditBalance: number;
|
|
826
|
-
/** @description Credits per minor unit of `currency` (typically 100) */
|
|
827
|
-
creditsPerMinorUnit?: number;
|
|
828
826
|
/** @description Credits deducted per metered item (wallet coverage: remainingUnits = balance / creditsPerUnit) */
|
|
829
827
|
creditsPerUnit: number;
|
|
830
828
|
currency: string;
|
|
831
|
-
/** @description USD → display-currency rate used with creditsPerMinorUnit */
|
|
832
|
-
displayExchangeRate?: number;
|
|
833
829
|
/** @description How many metered items the credit balance still covers (`balance / creditsPerUnit`) */
|
|
834
830
|
remainingUnits?: number;
|
|
831
|
+
/** @description Credits per minor unit of `currency` (typically 100) */
|
|
832
|
+
creditsPerMinorUnit?: number;
|
|
833
|
+
/** @description USD → display-currency rate used with creditsPerMinorUnit */
|
|
834
|
+
displayExchangeRate?: number;
|
|
835
835
|
};
|
|
836
836
|
LimitPlanItemDto: {
|
|
837
837
|
/** @description Derived billing cycle */
|
|
@@ -1202,17 +1202,17 @@ interface components {
|
|
|
1202
1202
|
};
|
|
1203
1203
|
ProcessPaymentCancelled: {
|
|
1204
1204
|
/**
|
|
1205
|
-
*
|
|
1205
|
+
* discriminator enum property added by openapi-typescript
|
|
1206
1206
|
* @enum {string}
|
|
1207
1207
|
*/
|
|
1208
|
-
status: '
|
|
1208
|
+
status: 'ProcessPaymentCancelled';
|
|
1209
1209
|
};
|
|
1210
1210
|
ProcessPaymentFailed: {
|
|
1211
1211
|
/**
|
|
1212
|
-
*
|
|
1212
|
+
* discriminator enum property added by openapi-typescript
|
|
1213
1213
|
* @enum {string}
|
|
1214
1214
|
*/
|
|
1215
|
-
status: '
|
|
1215
|
+
status: 'ProcessPaymentFailed';
|
|
1216
1216
|
};
|
|
1217
1217
|
ProcessPaymentIntentDto: {
|
|
1218
1218
|
customerRef: string;
|
|
@@ -1221,25 +1221,25 @@ interface components {
|
|
|
1221
1221
|
};
|
|
1222
1222
|
ProcessPaymentProcessing: {
|
|
1223
1223
|
/**
|
|
1224
|
-
*
|
|
1224
|
+
* discriminator enum property added by openapi-typescript
|
|
1225
1225
|
* @enum {string}
|
|
1226
1226
|
*/
|
|
1227
|
-
status: '
|
|
1227
|
+
status: 'ProcessPaymentProcessing';
|
|
1228
1228
|
};
|
|
1229
1229
|
ProcessPaymentSucceededBare: {
|
|
1230
1230
|
/**
|
|
1231
|
-
*
|
|
1231
|
+
* discriminator enum property added by openapi-typescript
|
|
1232
1232
|
* @enum {string}
|
|
1233
1233
|
*/
|
|
1234
|
-
status: '
|
|
1234
|
+
status: 'ProcessPaymentSucceededBare';
|
|
1235
1235
|
};
|
|
1236
1236
|
ProcessPaymentSucceededOneTime: {
|
|
1237
1237
|
oneTimePurchase: components['schemas']['OneTimePurchaseInfo'];
|
|
1238
1238
|
/**
|
|
1239
|
-
*
|
|
1239
|
+
* discriminator enum property added by openapi-typescript
|
|
1240
1240
|
* @enum {string}
|
|
1241
1241
|
*/
|
|
1242
|
-
status: '
|
|
1242
|
+
status: 'ProcessPaymentSucceededOneTime';
|
|
1243
1243
|
/**
|
|
1244
1244
|
* @example one-time
|
|
1245
1245
|
* @enum {string}
|
|
@@ -1249,10 +1249,10 @@ interface components {
|
|
|
1249
1249
|
ProcessPaymentSucceededRecurring: {
|
|
1250
1250
|
purchase: components['schemas']['SdkPurchaseResponse'];
|
|
1251
1251
|
/**
|
|
1252
|
-
*
|
|
1252
|
+
* discriminator enum property added by openapi-typescript
|
|
1253
1253
|
* @enum {string}
|
|
1254
1254
|
*/
|
|
1255
|
-
status: '
|
|
1255
|
+
status: 'ProcessPaymentSucceededRecurring';
|
|
1256
1256
|
/**
|
|
1257
1257
|
* @example recurring
|
|
1258
1258
|
* @enum {string}
|
|
@@ -1263,10 +1263,10 @@ interface components {
|
|
|
1263
1263
|
/** @description Detail message describing the timeout */
|
|
1264
1264
|
message?: string;
|
|
1265
1265
|
/**
|
|
1266
|
-
*
|
|
1266
|
+
* discriminator enum property added by openapi-typescript
|
|
1267
1267
|
* @enum {string}
|
|
1268
1268
|
*/
|
|
1269
|
-
status: '
|
|
1269
|
+
status: 'ProcessPaymentTimeout';
|
|
1270
1270
|
};
|
|
1271
1271
|
ProductConfigDto: {
|
|
1272
1272
|
/**
|
package/dist/index.cjs
CHANGED
|
@@ -2622,8 +2622,6 @@ var recoveryFields2 = {
|
|
|
2622
2622
|
creditsPerCall: import_zod.z.number().optional(),
|
|
2623
2623
|
shortfallCredits: import_zod.z.number().optional(),
|
|
2624
2624
|
remainingCalls: import_zod.z.number().optional(),
|
|
2625
|
-
creditsPerMinorUnit: import_zod.z.number().optional(),
|
|
2626
|
-
displayExchangeRate: import_zod.z.number().optional(),
|
|
2627
2625
|
purchaseRef: import_zod.z.string().optional(),
|
|
2628
2626
|
planStatus: import_zod.z.string().optional(),
|
|
2629
2627
|
autoRecharge: import_zod.z.object({
|
package/dist/index.d.cts
CHANGED
|
@@ -826,15 +826,15 @@ interface components {
|
|
|
826
826
|
LimitBalanceDto: {
|
|
827
827
|
/** @description Credit balance in credits (100 credits = 1 minor currency unit) */
|
|
828
828
|
creditBalance: number;
|
|
829
|
-
/** @description Credits per minor unit of `currency` (typically 100) */
|
|
830
|
-
creditsPerMinorUnit?: number;
|
|
831
829
|
/** @description Credits deducted per metered item (wallet coverage: remainingUnits = balance / creditsPerUnit) */
|
|
832
830
|
creditsPerUnit: number;
|
|
833
831
|
currency: string;
|
|
834
|
-
/** @description USD → display-currency rate used with creditsPerMinorUnit */
|
|
835
|
-
displayExchangeRate?: number;
|
|
836
832
|
/** @description How many metered items the credit balance still covers (`balance / creditsPerUnit`) */
|
|
837
833
|
remainingUnits?: number;
|
|
834
|
+
/** @description Credits per minor unit of `currency` (typically 100) */
|
|
835
|
+
creditsPerMinorUnit?: number;
|
|
836
|
+
/** @description USD → display-currency rate used with creditsPerMinorUnit */
|
|
837
|
+
displayExchangeRate?: number;
|
|
838
838
|
};
|
|
839
839
|
LimitPlanItemDto: {
|
|
840
840
|
/** @description Derived billing cycle */
|
|
@@ -1205,17 +1205,17 @@ interface components {
|
|
|
1205
1205
|
};
|
|
1206
1206
|
ProcessPaymentCancelled: {
|
|
1207
1207
|
/**
|
|
1208
|
-
*
|
|
1208
|
+
* discriminator enum property added by openapi-typescript
|
|
1209
1209
|
* @enum {string}
|
|
1210
1210
|
*/
|
|
1211
|
-
status: '
|
|
1211
|
+
status: 'ProcessPaymentCancelled';
|
|
1212
1212
|
};
|
|
1213
1213
|
ProcessPaymentFailed: {
|
|
1214
1214
|
/**
|
|
1215
|
-
*
|
|
1215
|
+
* discriminator enum property added by openapi-typescript
|
|
1216
1216
|
* @enum {string}
|
|
1217
1217
|
*/
|
|
1218
|
-
status: '
|
|
1218
|
+
status: 'ProcessPaymentFailed';
|
|
1219
1219
|
};
|
|
1220
1220
|
ProcessPaymentIntentDto: {
|
|
1221
1221
|
customerRef: string;
|
|
@@ -1224,25 +1224,25 @@ interface components {
|
|
|
1224
1224
|
};
|
|
1225
1225
|
ProcessPaymentProcessing: {
|
|
1226
1226
|
/**
|
|
1227
|
-
*
|
|
1227
|
+
* discriminator enum property added by openapi-typescript
|
|
1228
1228
|
* @enum {string}
|
|
1229
1229
|
*/
|
|
1230
|
-
status: '
|
|
1230
|
+
status: 'ProcessPaymentProcessing';
|
|
1231
1231
|
};
|
|
1232
1232
|
ProcessPaymentSucceededBare: {
|
|
1233
1233
|
/**
|
|
1234
|
-
*
|
|
1234
|
+
* discriminator enum property added by openapi-typescript
|
|
1235
1235
|
* @enum {string}
|
|
1236
1236
|
*/
|
|
1237
|
-
status: '
|
|
1237
|
+
status: 'ProcessPaymentSucceededBare';
|
|
1238
1238
|
};
|
|
1239
1239
|
ProcessPaymentSucceededOneTime: {
|
|
1240
1240
|
oneTimePurchase: components['schemas']['OneTimePurchaseInfo'];
|
|
1241
1241
|
/**
|
|
1242
|
-
*
|
|
1242
|
+
* discriminator enum property added by openapi-typescript
|
|
1243
1243
|
* @enum {string}
|
|
1244
1244
|
*/
|
|
1245
|
-
status: '
|
|
1245
|
+
status: 'ProcessPaymentSucceededOneTime';
|
|
1246
1246
|
/**
|
|
1247
1247
|
* @example one-time
|
|
1248
1248
|
* @enum {string}
|
|
@@ -1252,10 +1252,10 @@ interface components {
|
|
|
1252
1252
|
ProcessPaymentSucceededRecurring: {
|
|
1253
1253
|
purchase: components['schemas']['SdkPurchaseResponse'];
|
|
1254
1254
|
/**
|
|
1255
|
-
*
|
|
1255
|
+
* discriminator enum property added by openapi-typescript
|
|
1256
1256
|
* @enum {string}
|
|
1257
1257
|
*/
|
|
1258
|
-
status: '
|
|
1258
|
+
status: 'ProcessPaymentSucceededRecurring';
|
|
1259
1259
|
/**
|
|
1260
1260
|
* @example recurring
|
|
1261
1261
|
* @enum {string}
|
|
@@ -1266,10 +1266,10 @@ interface components {
|
|
|
1266
1266
|
/** @description Detail message describing the timeout */
|
|
1267
1267
|
message?: string;
|
|
1268
1268
|
/**
|
|
1269
|
-
*
|
|
1269
|
+
* discriminator enum property added by openapi-typescript
|
|
1270
1270
|
* @enum {string}
|
|
1271
1271
|
*/
|
|
1272
|
-
status: '
|
|
1272
|
+
status: 'ProcessPaymentTimeout';
|
|
1273
1273
|
};
|
|
1274
1274
|
ProductConfigDto: {
|
|
1275
1275
|
/**
|
|
@@ -3211,10 +3211,10 @@ interface operations {
|
|
|
3211
3211
|
content: {
|
|
3212
3212
|
'application/json': {
|
|
3213
3213
|
/**
|
|
3214
|
-
* Outcome of the delete:
|
|
3214
|
+
* Outcome of the delete: hard delete in sandbox, soft-delete or deactivation in live depending on existing purchases
|
|
3215
3215
|
* @enum {string}
|
|
3216
3216
|
*/
|
|
3217
|
-
action?: 'deactivated' | 'soft_deleted';
|
|
3217
|
+
action?: 'deleted' | 'deactivated' | 'soft_deleted';
|
|
3218
3218
|
success?: boolean;
|
|
3219
3219
|
};
|
|
3220
3220
|
};
|
|
@@ -3953,20 +3953,38 @@ type OneTimePurchaseInfo = components['schemas']['OneTimePurchaseInfo'];
|
|
|
3953
3953
|
/**
|
|
3954
3954
|
* Result from processing a payment intent.
|
|
3955
3955
|
*
|
|
3956
|
-
*
|
|
3957
|
-
*
|
|
3958
|
-
*
|
|
3959
|
-
*
|
|
3960
|
-
*
|
|
3961
|
-
*
|
|
3962
|
-
*
|
|
3963
|
-
*
|
|
3964
|
-
*
|
|
3965
|
-
*
|
|
3966
|
-
*
|
|
3967
|
-
* the timeout branch.
|
|
3956
|
+
* Mirrors the backend's discriminated `oneOf` response. The `succeeded`
|
|
3957
|
+
* branches are further discriminated on `type` so consumers can route to
|
|
3958
|
+
* recurring vs one-time purchase handling without guarding against
|
|
3959
|
+
* `purchase === undefined`. A bare `{ status: 'succeeded' }` is returned
|
|
3960
|
+
* when the webhook race means the backend can't yet enrich the response
|
|
3961
|
+
* with the created purchase — callers should fall back to refetching.
|
|
3962
|
+
*
|
|
3963
|
+
* `failed` and `cancelled` are returned by the backend when the Stripe
|
|
3964
|
+
* PaymentIntent is in a terminal non-success state and are routed to
|
|
3965
|
+
* `onError` by `reconcilePayment`. `timeout` carries a retry hint and is
|
|
3966
|
+
* routed to the timeout branch.
|
|
3968
3967
|
*/
|
|
3969
|
-
type ProcessPaymentResult =
|
|
3968
|
+
type ProcessPaymentResult = {
|
|
3969
|
+
status: 'succeeded';
|
|
3970
|
+
type: 'recurring';
|
|
3971
|
+
purchase: PurchaseInfo;
|
|
3972
|
+
} | {
|
|
3973
|
+
status: 'succeeded';
|
|
3974
|
+
type: 'one-time';
|
|
3975
|
+
oneTimePurchase: OneTimePurchaseInfo;
|
|
3976
|
+
} | {
|
|
3977
|
+
status: 'succeeded';
|
|
3978
|
+
} | {
|
|
3979
|
+
status: 'processing';
|
|
3980
|
+
} | {
|
|
3981
|
+
status: 'timeout';
|
|
3982
|
+
message?: string;
|
|
3983
|
+
} | {
|
|
3984
|
+
status: 'failed';
|
|
3985
|
+
} | {
|
|
3986
|
+
status: 'cancelled';
|
|
3987
|
+
};
|
|
3970
3988
|
/**
|
|
3971
3989
|
* Result from processing a credit-topup payment intent.
|
|
3972
3990
|
*
|
|
@@ -5610,8 +5628,6 @@ declare const PaywallStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
5610
5628
|
creditsPerCall: z.ZodOptional<z.ZodNumber>;
|
|
5611
5629
|
shortfallCredits: z.ZodOptional<z.ZodNumber>;
|
|
5612
5630
|
remainingCalls: z.ZodOptional<z.ZodNumber>;
|
|
5613
|
-
creditsPerMinorUnit: z.ZodOptional<z.ZodNumber>;
|
|
5614
|
-
displayExchangeRate: z.ZodOptional<z.ZodNumber>;
|
|
5615
5631
|
purchaseRef: z.ZodOptional<z.ZodString>;
|
|
5616
5632
|
planStatus: z.ZodOptional<z.ZodString>;
|
|
5617
5633
|
autoRecharge: z.ZodOptional<z.ZodObject<{
|
|
@@ -5659,8 +5675,6 @@ declare const PaywallStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
5659
5675
|
creditsPerCall: z.ZodOptional<z.ZodNumber>;
|
|
5660
5676
|
shortfallCredits: z.ZodOptional<z.ZodNumber>;
|
|
5661
5677
|
remainingCalls: z.ZodOptional<z.ZodNumber>;
|
|
5662
|
-
creditsPerMinorUnit: z.ZodOptional<z.ZodNumber>;
|
|
5663
|
-
displayExchangeRate: z.ZodOptional<z.ZodNumber>;
|
|
5664
5678
|
purchaseRef: z.ZodOptional<z.ZodString>;
|
|
5665
5679
|
planStatus: z.ZodOptional<z.ZodString>;
|
|
5666
5680
|
autoRecharge: z.ZodOptional<z.ZodObject<{
|
package/dist/index.d.ts
CHANGED
|
@@ -826,15 +826,15 @@ interface components {
|
|
|
826
826
|
LimitBalanceDto: {
|
|
827
827
|
/** @description Credit balance in credits (100 credits = 1 minor currency unit) */
|
|
828
828
|
creditBalance: number;
|
|
829
|
-
/** @description Credits per minor unit of `currency` (typically 100) */
|
|
830
|
-
creditsPerMinorUnit?: number;
|
|
831
829
|
/** @description Credits deducted per metered item (wallet coverage: remainingUnits = balance / creditsPerUnit) */
|
|
832
830
|
creditsPerUnit: number;
|
|
833
831
|
currency: string;
|
|
834
|
-
/** @description USD → display-currency rate used with creditsPerMinorUnit */
|
|
835
|
-
displayExchangeRate?: number;
|
|
836
832
|
/** @description How many metered items the credit balance still covers (`balance / creditsPerUnit`) */
|
|
837
833
|
remainingUnits?: number;
|
|
834
|
+
/** @description Credits per minor unit of `currency` (typically 100) */
|
|
835
|
+
creditsPerMinorUnit?: number;
|
|
836
|
+
/** @description USD → display-currency rate used with creditsPerMinorUnit */
|
|
837
|
+
displayExchangeRate?: number;
|
|
838
838
|
};
|
|
839
839
|
LimitPlanItemDto: {
|
|
840
840
|
/** @description Derived billing cycle */
|
|
@@ -1205,17 +1205,17 @@ interface components {
|
|
|
1205
1205
|
};
|
|
1206
1206
|
ProcessPaymentCancelled: {
|
|
1207
1207
|
/**
|
|
1208
|
-
*
|
|
1208
|
+
* discriminator enum property added by openapi-typescript
|
|
1209
1209
|
* @enum {string}
|
|
1210
1210
|
*/
|
|
1211
|
-
status: '
|
|
1211
|
+
status: 'ProcessPaymentCancelled';
|
|
1212
1212
|
};
|
|
1213
1213
|
ProcessPaymentFailed: {
|
|
1214
1214
|
/**
|
|
1215
|
-
*
|
|
1215
|
+
* discriminator enum property added by openapi-typescript
|
|
1216
1216
|
* @enum {string}
|
|
1217
1217
|
*/
|
|
1218
|
-
status: '
|
|
1218
|
+
status: 'ProcessPaymentFailed';
|
|
1219
1219
|
};
|
|
1220
1220
|
ProcessPaymentIntentDto: {
|
|
1221
1221
|
customerRef: string;
|
|
@@ -1224,25 +1224,25 @@ interface components {
|
|
|
1224
1224
|
};
|
|
1225
1225
|
ProcessPaymentProcessing: {
|
|
1226
1226
|
/**
|
|
1227
|
-
*
|
|
1227
|
+
* discriminator enum property added by openapi-typescript
|
|
1228
1228
|
* @enum {string}
|
|
1229
1229
|
*/
|
|
1230
|
-
status: '
|
|
1230
|
+
status: 'ProcessPaymentProcessing';
|
|
1231
1231
|
};
|
|
1232
1232
|
ProcessPaymentSucceededBare: {
|
|
1233
1233
|
/**
|
|
1234
|
-
*
|
|
1234
|
+
* discriminator enum property added by openapi-typescript
|
|
1235
1235
|
* @enum {string}
|
|
1236
1236
|
*/
|
|
1237
|
-
status: '
|
|
1237
|
+
status: 'ProcessPaymentSucceededBare';
|
|
1238
1238
|
};
|
|
1239
1239
|
ProcessPaymentSucceededOneTime: {
|
|
1240
1240
|
oneTimePurchase: components['schemas']['OneTimePurchaseInfo'];
|
|
1241
1241
|
/**
|
|
1242
|
-
*
|
|
1242
|
+
* discriminator enum property added by openapi-typescript
|
|
1243
1243
|
* @enum {string}
|
|
1244
1244
|
*/
|
|
1245
|
-
status: '
|
|
1245
|
+
status: 'ProcessPaymentSucceededOneTime';
|
|
1246
1246
|
/**
|
|
1247
1247
|
* @example one-time
|
|
1248
1248
|
* @enum {string}
|
|
@@ -1252,10 +1252,10 @@ interface components {
|
|
|
1252
1252
|
ProcessPaymentSucceededRecurring: {
|
|
1253
1253
|
purchase: components['schemas']['SdkPurchaseResponse'];
|
|
1254
1254
|
/**
|
|
1255
|
-
*
|
|
1255
|
+
* discriminator enum property added by openapi-typescript
|
|
1256
1256
|
* @enum {string}
|
|
1257
1257
|
*/
|
|
1258
|
-
status: '
|
|
1258
|
+
status: 'ProcessPaymentSucceededRecurring';
|
|
1259
1259
|
/**
|
|
1260
1260
|
* @example recurring
|
|
1261
1261
|
* @enum {string}
|
|
@@ -1266,10 +1266,10 @@ interface components {
|
|
|
1266
1266
|
/** @description Detail message describing the timeout */
|
|
1267
1267
|
message?: string;
|
|
1268
1268
|
/**
|
|
1269
|
-
*
|
|
1269
|
+
* discriminator enum property added by openapi-typescript
|
|
1270
1270
|
* @enum {string}
|
|
1271
1271
|
*/
|
|
1272
|
-
status: '
|
|
1272
|
+
status: 'ProcessPaymentTimeout';
|
|
1273
1273
|
};
|
|
1274
1274
|
ProductConfigDto: {
|
|
1275
1275
|
/**
|
|
@@ -3211,10 +3211,10 @@ interface operations {
|
|
|
3211
3211
|
content: {
|
|
3212
3212
|
'application/json': {
|
|
3213
3213
|
/**
|
|
3214
|
-
* Outcome of the delete:
|
|
3214
|
+
* Outcome of the delete: hard delete in sandbox, soft-delete or deactivation in live depending on existing purchases
|
|
3215
3215
|
* @enum {string}
|
|
3216
3216
|
*/
|
|
3217
|
-
action?: 'deactivated' | 'soft_deleted';
|
|
3217
|
+
action?: 'deleted' | 'deactivated' | 'soft_deleted';
|
|
3218
3218
|
success?: boolean;
|
|
3219
3219
|
};
|
|
3220
3220
|
};
|
|
@@ -3953,20 +3953,38 @@ type OneTimePurchaseInfo = components['schemas']['OneTimePurchaseInfo'];
|
|
|
3953
3953
|
/**
|
|
3954
3954
|
* Result from processing a payment intent.
|
|
3955
3955
|
*
|
|
3956
|
-
*
|
|
3957
|
-
*
|
|
3958
|
-
*
|
|
3959
|
-
*
|
|
3960
|
-
*
|
|
3961
|
-
*
|
|
3962
|
-
*
|
|
3963
|
-
*
|
|
3964
|
-
*
|
|
3965
|
-
*
|
|
3966
|
-
*
|
|
3967
|
-
* the timeout branch.
|
|
3956
|
+
* Mirrors the backend's discriminated `oneOf` response. The `succeeded`
|
|
3957
|
+
* branches are further discriminated on `type` so consumers can route to
|
|
3958
|
+
* recurring vs one-time purchase handling without guarding against
|
|
3959
|
+
* `purchase === undefined`. A bare `{ status: 'succeeded' }` is returned
|
|
3960
|
+
* when the webhook race means the backend can't yet enrich the response
|
|
3961
|
+
* with the created purchase — callers should fall back to refetching.
|
|
3962
|
+
*
|
|
3963
|
+
* `failed` and `cancelled` are returned by the backend when the Stripe
|
|
3964
|
+
* PaymentIntent is in a terminal non-success state and are routed to
|
|
3965
|
+
* `onError` by `reconcilePayment`. `timeout` carries a retry hint and is
|
|
3966
|
+
* routed to the timeout branch.
|
|
3968
3967
|
*/
|
|
3969
|
-
type ProcessPaymentResult =
|
|
3968
|
+
type ProcessPaymentResult = {
|
|
3969
|
+
status: 'succeeded';
|
|
3970
|
+
type: 'recurring';
|
|
3971
|
+
purchase: PurchaseInfo;
|
|
3972
|
+
} | {
|
|
3973
|
+
status: 'succeeded';
|
|
3974
|
+
type: 'one-time';
|
|
3975
|
+
oneTimePurchase: OneTimePurchaseInfo;
|
|
3976
|
+
} | {
|
|
3977
|
+
status: 'succeeded';
|
|
3978
|
+
} | {
|
|
3979
|
+
status: 'processing';
|
|
3980
|
+
} | {
|
|
3981
|
+
status: 'timeout';
|
|
3982
|
+
message?: string;
|
|
3983
|
+
} | {
|
|
3984
|
+
status: 'failed';
|
|
3985
|
+
} | {
|
|
3986
|
+
status: 'cancelled';
|
|
3987
|
+
};
|
|
3970
3988
|
/**
|
|
3971
3989
|
* Result from processing a credit-topup payment intent.
|
|
3972
3990
|
*
|
|
@@ -5610,8 +5628,6 @@ declare const PaywallStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
5610
5628
|
creditsPerCall: z.ZodOptional<z.ZodNumber>;
|
|
5611
5629
|
shortfallCredits: z.ZodOptional<z.ZodNumber>;
|
|
5612
5630
|
remainingCalls: z.ZodOptional<z.ZodNumber>;
|
|
5613
|
-
creditsPerMinorUnit: z.ZodOptional<z.ZodNumber>;
|
|
5614
|
-
displayExchangeRate: z.ZodOptional<z.ZodNumber>;
|
|
5615
5631
|
purchaseRef: z.ZodOptional<z.ZodString>;
|
|
5616
5632
|
planStatus: z.ZodOptional<z.ZodString>;
|
|
5617
5633
|
autoRecharge: z.ZodOptional<z.ZodObject<{
|
|
@@ -5659,8 +5675,6 @@ declare const PaywallStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
5659
5675
|
creditsPerCall: z.ZodOptional<z.ZodNumber>;
|
|
5660
5676
|
shortfallCredits: z.ZodOptional<z.ZodNumber>;
|
|
5661
5677
|
remainingCalls: z.ZodOptional<z.ZodNumber>;
|
|
5662
|
-
creditsPerMinorUnit: z.ZodOptional<z.ZodNumber>;
|
|
5663
|
-
displayExchangeRate: z.ZodOptional<z.ZodNumber>;
|
|
5664
5678
|
purchaseRef: z.ZodOptional<z.ZodString>;
|
|
5665
5679
|
planStatus: z.ZodOptional<z.ZodString>;
|
|
5666
5680
|
autoRecharge: z.ZodOptional<z.ZodObject<{
|
package/dist/index.js
CHANGED
|
@@ -2537,8 +2537,6 @@ var recoveryFields2 = {
|
|
|
2537
2537
|
creditsPerCall: z.number().optional(),
|
|
2538
2538
|
shortfallCredits: z.number().optional(),
|
|
2539
2539
|
remainingCalls: z.number().optional(),
|
|
2540
|
-
creditsPerMinorUnit: z.number().optional(),
|
|
2541
|
-
displayExchangeRate: z.number().optional(),
|
|
2542
2540
|
purchaseRef: z.string().optional(),
|
|
2543
2541
|
planStatus: z.string().optional(),
|
|
2544
2542
|
autoRecharge: z.object({
|