@solvapay/server 2.6.0 → 2.7.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 +37 -51
- package/dist/edge.js +2 -0
- package/dist/fetch/index.d.cts +18 -18
- package/dist/fetch/index.d.ts +18 -18
- package/dist/index.cjs +2 -0
- package/dist/index.d.cts +37 -51
- package/dist/index.d.ts +37 -51
- package/dist/index.js +2 -0
- 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;
|
|
829
831
|
/** @description Credits deducted per metered item (wallet coverage: remainingUnits = balance / creditsPerUnit) */
|
|
830
832
|
creditsPerUnit: number;
|
|
831
833
|
currency: string;
|
|
832
|
-
/** @description How many metered items the credit balance still covers (`balance / creditsPerUnit`) */
|
|
833
|
-
remainingUnits?: number;
|
|
834
|
-
/** @description Credits per minor unit of `currency` (typically 100) */
|
|
835
|
-
creditsPerMinorUnit?: number;
|
|
836
834
|
/** @description USD → display-currency rate used with creditsPerMinorUnit */
|
|
837
835
|
displayExchangeRate?: number;
|
|
836
|
+
/** @description How many metered items the credit balance still covers (`balance / creditsPerUnit`) */
|
|
837
|
+
remainingUnits?: 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
|
+
* @example cancelled
|
|
1209
1209
|
* @enum {string}
|
|
1210
1210
|
*/
|
|
1211
|
-
status: '
|
|
1211
|
+
status: 'cancelled';
|
|
1212
1212
|
};
|
|
1213
1213
|
ProcessPaymentFailed: {
|
|
1214
1214
|
/**
|
|
1215
|
-
*
|
|
1215
|
+
* @example failed
|
|
1216
1216
|
* @enum {string}
|
|
1217
1217
|
*/
|
|
1218
|
-
status: '
|
|
1218
|
+
status: 'failed';
|
|
1219
1219
|
};
|
|
1220
1220
|
ProcessPaymentIntentDto: {
|
|
1221
1221
|
customerRef: string;
|
|
@@ -1224,25 +1224,25 @@ interface components {
|
|
|
1224
1224
|
};
|
|
1225
1225
|
ProcessPaymentProcessing: {
|
|
1226
1226
|
/**
|
|
1227
|
-
*
|
|
1227
|
+
* @example processing
|
|
1228
1228
|
* @enum {string}
|
|
1229
1229
|
*/
|
|
1230
|
-
status: '
|
|
1230
|
+
status: 'processing';
|
|
1231
1231
|
};
|
|
1232
1232
|
ProcessPaymentSucceededBare: {
|
|
1233
1233
|
/**
|
|
1234
|
-
*
|
|
1234
|
+
* @example succeeded
|
|
1235
1235
|
* @enum {string}
|
|
1236
1236
|
*/
|
|
1237
|
-
status: '
|
|
1237
|
+
status: 'succeeded';
|
|
1238
1238
|
};
|
|
1239
1239
|
ProcessPaymentSucceededOneTime: {
|
|
1240
1240
|
oneTimePurchase: components['schemas']['OneTimePurchaseInfo'];
|
|
1241
1241
|
/**
|
|
1242
|
-
*
|
|
1242
|
+
* @example succeeded
|
|
1243
1243
|
* @enum {string}
|
|
1244
1244
|
*/
|
|
1245
|
-
status: '
|
|
1245
|
+
status: 'succeeded';
|
|
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
|
+
* @example succeeded
|
|
1256
1256
|
* @enum {string}
|
|
1257
1257
|
*/
|
|
1258
|
-
status: '
|
|
1258
|
+
status: 'succeeded';
|
|
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
|
+
* @example timeout
|
|
1270
1270
|
* @enum {string}
|
|
1271
1271
|
*/
|
|
1272
|
-
status: '
|
|
1272
|
+
status: 'timeout';
|
|
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: deactivation when purchases exist, otherwise soft-delete. Same in sandbox and live.
|
|
3215
3215
|
* @enum {string}
|
|
3216
3216
|
*/
|
|
3217
|
-
action?: '
|
|
3217
|
+
action?: 'deactivated' | 'soft_deleted';
|
|
3218
3218
|
success?: boolean;
|
|
3219
3219
|
};
|
|
3220
3220
|
};
|
|
@@ -3953,38 +3953,20 @@ type OneTimePurchaseInfo = components['schemas']['OneTimePurchaseInfo'];
|
|
|
3953
3953
|
/**
|
|
3954
3954
|
* Result from processing a payment intent.
|
|
3955
3955
|
*
|
|
3956
|
-
*
|
|
3957
|
-
* branches
|
|
3958
|
-
* recurring vs one-time
|
|
3959
|
-
* `purchase === undefined`. A bare `{ status: 'succeeded' }` is
|
|
3960
|
-
* when the webhook race means the backend can't yet enrich the
|
|
3961
|
-
* with the created purchase — callers should fall back to
|
|
3962
|
-
*
|
|
3963
|
-
*
|
|
3964
|
-
*
|
|
3965
|
-
*
|
|
3966
|
-
*
|
|
3956
|
+
* Derived from the generated `/v1/sdk/payment-intents/{id}/process` 200
|
|
3957
|
+
* response. The `succeeded` branches further discriminate on `type` so
|
|
3958
|
+
* consumers can route to recurring vs one-time handling without guarding
|
|
3959
|
+
* against `purchase === undefined`. A bare `{ status: 'succeeded' }` is
|
|
3960
|
+
* returned when the webhook race means the backend can't yet enrich the
|
|
3961
|
+
* response with the created purchase — callers should fall back to
|
|
3962
|
+
* refetching.
|
|
3963
|
+
*
|
|
3964
|
+
* `failed` and `cancelled` are returned when the Stripe PaymentIntent is
|
|
3965
|
+
* in a terminal non-success state and are routed to `onError` by
|
|
3966
|
+
* `reconcilePayment`. `timeout` carries a retry hint and is routed to
|
|
3967
|
+
* the timeout branch.
|
|
3967
3968
|
*/
|
|
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
|
-
};
|
|
3969
|
+
type ProcessPaymentResult = operations['PaymentIntentSdkController_processPaymentIntent']['responses']['200']['content']['application/json'];
|
|
3988
3970
|
/**
|
|
3989
3971
|
* Result from processing a credit-topup payment intent.
|
|
3990
3972
|
*
|
|
@@ -5540,6 +5522,8 @@ declare const PaywallStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
5540
5522
|
creditsPerCall: z.ZodOptional<z.ZodNumber>;
|
|
5541
5523
|
shortfallCredits: z.ZodOptional<z.ZodNumber>;
|
|
5542
5524
|
remainingCalls: z.ZodOptional<z.ZodNumber>;
|
|
5525
|
+
creditsPerMinorUnit: z.ZodOptional<z.ZodNumber>;
|
|
5526
|
+
displayExchangeRate: z.ZodOptional<z.ZodNumber>;
|
|
5543
5527
|
purchaseRef: z.ZodOptional<z.ZodString>;
|
|
5544
5528
|
planStatus: z.ZodOptional<z.ZodString>;
|
|
5545
5529
|
autoRecharge: z.ZodOptional<z.ZodObject<{
|
|
@@ -5587,6 +5571,8 @@ declare const PaywallStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
5587
5571
|
creditsPerCall: z.ZodOptional<z.ZodNumber>;
|
|
5588
5572
|
shortfallCredits: z.ZodOptional<z.ZodNumber>;
|
|
5589
5573
|
remainingCalls: z.ZodOptional<z.ZodNumber>;
|
|
5574
|
+
creditsPerMinorUnit: z.ZodOptional<z.ZodNumber>;
|
|
5575
|
+
displayExchangeRate: z.ZodOptional<z.ZodNumber>;
|
|
5590
5576
|
purchaseRef: z.ZodOptional<z.ZodString>;
|
|
5591
5577
|
planStatus: z.ZodOptional<z.ZodString>;
|
|
5592
5578
|
autoRecharge: z.ZodOptional<z.ZodObject<{
|
package/dist/edge.js
CHANGED
|
@@ -2535,6 +2535,8 @@ 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(),
|
|
2538
2540
|
purchaseRef: z.string().optional(),
|
|
2539
2541
|
planStatus: z.string().optional(),
|
|
2540
2542
|
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;
|
|
826
828
|
/** @description Credits deducted per metered item (wallet coverage: remainingUnits = balance / creditsPerUnit) */
|
|
827
829
|
creditsPerUnit: number;
|
|
828
830
|
currency: string;
|
|
829
|
-
/** @description How many metered items the credit balance still covers (`balance / creditsPerUnit`) */
|
|
830
|
-
remainingUnits?: number;
|
|
831
|
-
/** @description Credits per minor unit of `currency` (typically 100) */
|
|
832
|
-
creditsPerMinorUnit?: number;
|
|
833
831
|
/** @description USD → display-currency rate used with creditsPerMinorUnit */
|
|
834
832
|
displayExchangeRate?: number;
|
|
833
|
+
/** @description How many metered items the credit balance still covers (`balance / creditsPerUnit`) */
|
|
834
|
+
remainingUnits?: 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
|
+
* @example cancelled
|
|
1206
1206
|
* @enum {string}
|
|
1207
1207
|
*/
|
|
1208
|
-
status: '
|
|
1208
|
+
status: 'cancelled';
|
|
1209
1209
|
};
|
|
1210
1210
|
ProcessPaymentFailed: {
|
|
1211
1211
|
/**
|
|
1212
|
-
*
|
|
1212
|
+
* @example failed
|
|
1213
1213
|
* @enum {string}
|
|
1214
1214
|
*/
|
|
1215
|
-
status: '
|
|
1215
|
+
status: 'failed';
|
|
1216
1216
|
};
|
|
1217
1217
|
ProcessPaymentIntentDto: {
|
|
1218
1218
|
customerRef: string;
|
|
@@ -1221,25 +1221,25 @@ interface components {
|
|
|
1221
1221
|
};
|
|
1222
1222
|
ProcessPaymentProcessing: {
|
|
1223
1223
|
/**
|
|
1224
|
-
*
|
|
1224
|
+
* @example processing
|
|
1225
1225
|
* @enum {string}
|
|
1226
1226
|
*/
|
|
1227
|
-
status: '
|
|
1227
|
+
status: 'processing';
|
|
1228
1228
|
};
|
|
1229
1229
|
ProcessPaymentSucceededBare: {
|
|
1230
1230
|
/**
|
|
1231
|
-
*
|
|
1231
|
+
* @example succeeded
|
|
1232
1232
|
* @enum {string}
|
|
1233
1233
|
*/
|
|
1234
|
-
status: '
|
|
1234
|
+
status: 'succeeded';
|
|
1235
1235
|
};
|
|
1236
1236
|
ProcessPaymentSucceededOneTime: {
|
|
1237
1237
|
oneTimePurchase: components['schemas']['OneTimePurchaseInfo'];
|
|
1238
1238
|
/**
|
|
1239
|
-
*
|
|
1239
|
+
* @example succeeded
|
|
1240
1240
|
* @enum {string}
|
|
1241
1241
|
*/
|
|
1242
|
-
status: '
|
|
1242
|
+
status: 'succeeded';
|
|
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
|
+
* @example succeeded
|
|
1253
1253
|
* @enum {string}
|
|
1254
1254
|
*/
|
|
1255
|
-
status: '
|
|
1255
|
+
status: 'succeeded';
|
|
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
|
+
* @example timeout
|
|
1267
1267
|
* @enum {string}
|
|
1268
1268
|
*/
|
|
1269
|
-
status: '
|
|
1269
|
+
status: 'timeout';
|
|
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;
|
|
826
828
|
/** @description Credits deducted per metered item (wallet coverage: remainingUnits = balance / creditsPerUnit) */
|
|
827
829
|
creditsPerUnit: number;
|
|
828
830
|
currency: string;
|
|
829
|
-
/** @description How many metered items the credit balance still covers (`balance / creditsPerUnit`) */
|
|
830
|
-
remainingUnits?: number;
|
|
831
|
-
/** @description Credits per minor unit of `currency` (typically 100) */
|
|
832
|
-
creditsPerMinorUnit?: number;
|
|
833
831
|
/** @description USD → display-currency rate used with creditsPerMinorUnit */
|
|
834
832
|
displayExchangeRate?: number;
|
|
833
|
+
/** @description How many metered items the credit balance still covers (`balance / creditsPerUnit`) */
|
|
834
|
+
remainingUnits?: 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
|
+
* @example cancelled
|
|
1206
1206
|
* @enum {string}
|
|
1207
1207
|
*/
|
|
1208
|
-
status: '
|
|
1208
|
+
status: 'cancelled';
|
|
1209
1209
|
};
|
|
1210
1210
|
ProcessPaymentFailed: {
|
|
1211
1211
|
/**
|
|
1212
|
-
*
|
|
1212
|
+
* @example failed
|
|
1213
1213
|
* @enum {string}
|
|
1214
1214
|
*/
|
|
1215
|
-
status: '
|
|
1215
|
+
status: 'failed';
|
|
1216
1216
|
};
|
|
1217
1217
|
ProcessPaymentIntentDto: {
|
|
1218
1218
|
customerRef: string;
|
|
@@ -1221,25 +1221,25 @@ interface components {
|
|
|
1221
1221
|
};
|
|
1222
1222
|
ProcessPaymentProcessing: {
|
|
1223
1223
|
/**
|
|
1224
|
-
*
|
|
1224
|
+
* @example processing
|
|
1225
1225
|
* @enum {string}
|
|
1226
1226
|
*/
|
|
1227
|
-
status: '
|
|
1227
|
+
status: 'processing';
|
|
1228
1228
|
};
|
|
1229
1229
|
ProcessPaymentSucceededBare: {
|
|
1230
1230
|
/**
|
|
1231
|
-
*
|
|
1231
|
+
* @example succeeded
|
|
1232
1232
|
* @enum {string}
|
|
1233
1233
|
*/
|
|
1234
|
-
status: '
|
|
1234
|
+
status: 'succeeded';
|
|
1235
1235
|
};
|
|
1236
1236
|
ProcessPaymentSucceededOneTime: {
|
|
1237
1237
|
oneTimePurchase: components['schemas']['OneTimePurchaseInfo'];
|
|
1238
1238
|
/**
|
|
1239
|
-
*
|
|
1239
|
+
* @example succeeded
|
|
1240
1240
|
* @enum {string}
|
|
1241
1241
|
*/
|
|
1242
|
-
status: '
|
|
1242
|
+
status: 'succeeded';
|
|
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
|
+
* @example succeeded
|
|
1253
1253
|
* @enum {string}
|
|
1254
1254
|
*/
|
|
1255
|
-
status: '
|
|
1255
|
+
status: 'succeeded';
|
|
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
|
+
* @example timeout
|
|
1267
1267
|
* @enum {string}
|
|
1268
1268
|
*/
|
|
1269
|
-
status: '
|
|
1269
|
+
status: 'timeout';
|
|
1270
1270
|
};
|
|
1271
1271
|
ProductConfigDto: {
|
|
1272
1272
|
/**
|
package/dist/index.cjs
CHANGED
|
@@ -2622,6 +2622,8 @@ 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(),
|
|
2625
2627
|
purchaseRef: import_zod.z.string().optional(),
|
|
2626
2628
|
planStatus: import_zod.z.string().optional(),
|
|
2627
2629
|
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;
|
|
829
831
|
/** @description Credits deducted per metered item (wallet coverage: remainingUnits = balance / creditsPerUnit) */
|
|
830
832
|
creditsPerUnit: number;
|
|
831
833
|
currency: string;
|
|
832
|
-
/** @description How many metered items the credit balance still covers (`balance / creditsPerUnit`) */
|
|
833
|
-
remainingUnits?: number;
|
|
834
|
-
/** @description Credits per minor unit of `currency` (typically 100) */
|
|
835
|
-
creditsPerMinorUnit?: number;
|
|
836
834
|
/** @description USD → display-currency rate used with creditsPerMinorUnit */
|
|
837
835
|
displayExchangeRate?: number;
|
|
836
|
+
/** @description How many metered items the credit balance still covers (`balance / creditsPerUnit`) */
|
|
837
|
+
remainingUnits?: 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
|
+
* @example cancelled
|
|
1209
1209
|
* @enum {string}
|
|
1210
1210
|
*/
|
|
1211
|
-
status: '
|
|
1211
|
+
status: 'cancelled';
|
|
1212
1212
|
};
|
|
1213
1213
|
ProcessPaymentFailed: {
|
|
1214
1214
|
/**
|
|
1215
|
-
*
|
|
1215
|
+
* @example failed
|
|
1216
1216
|
* @enum {string}
|
|
1217
1217
|
*/
|
|
1218
|
-
status: '
|
|
1218
|
+
status: 'failed';
|
|
1219
1219
|
};
|
|
1220
1220
|
ProcessPaymentIntentDto: {
|
|
1221
1221
|
customerRef: string;
|
|
@@ -1224,25 +1224,25 @@ interface components {
|
|
|
1224
1224
|
};
|
|
1225
1225
|
ProcessPaymentProcessing: {
|
|
1226
1226
|
/**
|
|
1227
|
-
*
|
|
1227
|
+
* @example processing
|
|
1228
1228
|
* @enum {string}
|
|
1229
1229
|
*/
|
|
1230
|
-
status: '
|
|
1230
|
+
status: 'processing';
|
|
1231
1231
|
};
|
|
1232
1232
|
ProcessPaymentSucceededBare: {
|
|
1233
1233
|
/**
|
|
1234
|
-
*
|
|
1234
|
+
* @example succeeded
|
|
1235
1235
|
* @enum {string}
|
|
1236
1236
|
*/
|
|
1237
|
-
status: '
|
|
1237
|
+
status: 'succeeded';
|
|
1238
1238
|
};
|
|
1239
1239
|
ProcessPaymentSucceededOneTime: {
|
|
1240
1240
|
oneTimePurchase: components['schemas']['OneTimePurchaseInfo'];
|
|
1241
1241
|
/**
|
|
1242
|
-
*
|
|
1242
|
+
* @example succeeded
|
|
1243
1243
|
* @enum {string}
|
|
1244
1244
|
*/
|
|
1245
|
-
status: '
|
|
1245
|
+
status: 'succeeded';
|
|
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
|
+
* @example succeeded
|
|
1256
1256
|
* @enum {string}
|
|
1257
1257
|
*/
|
|
1258
|
-
status: '
|
|
1258
|
+
status: 'succeeded';
|
|
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
|
+
* @example timeout
|
|
1270
1270
|
* @enum {string}
|
|
1271
1271
|
*/
|
|
1272
|
-
status: '
|
|
1272
|
+
status: 'timeout';
|
|
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: deactivation when purchases exist, otherwise soft-delete. Same in sandbox and live.
|
|
3215
3215
|
* @enum {string}
|
|
3216
3216
|
*/
|
|
3217
|
-
action?: '
|
|
3217
|
+
action?: 'deactivated' | 'soft_deleted';
|
|
3218
3218
|
success?: boolean;
|
|
3219
3219
|
};
|
|
3220
3220
|
};
|
|
@@ -3953,38 +3953,20 @@ type OneTimePurchaseInfo = components['schemas']['OneTimePurchaseInfo'];
|
|
|
3953
3953
|
/**
|
|
3954
3954
|
* Result from processing a payment intent.
|
|
3955
3955
|
*
|
|
3956
|
-
*
|
|
3957
|
-
* branches
|
|
3958
|
-
* recurring vs one-time
|
|
3959
|
-
* `purchase === undefined`. A bare `{ status: 'succeeded' }` is
|
|
3960
|
-
* when the webhook race means the backend can't yet enrich the
|
|
3961
|
-
* with the created purchase — callers should fall back to
|
|
3962
|
-
*
|
|
3963
|
-
*
|
|
3964
|
-
*
|
|
3965
|
-
*
|
|
3966
|
-
*
|
|
3956
|
+
* Derived from the generated `/v1/sdk/payment-intents/{id}/process` 200
|
|
3957
|
+
* response. The `succeeded` branches further discriminate on `type` so
|
|
3958
|
+
* consumers can route to recurring vs one-time handling without guarding
|
|
3959
|
+
* against `purchase === undefined`. A bare `{ status: 'succeeded' }` is
|
|
3960
|
+
* returned when the webhook race means the backend can't yet enrich the
|
|
3961
|
+
* response with the created purchase — callers should fall back to
|
|
3962
|
+
* refetching.
|
|
3963
|
+
*
|
|
3964
|
+
* `failed` and `cancelled` are returned when the Stripe PaymentIntent is
|
|
3965
|
+
* in a terminal non-success state and are routed to `onError` by
|
|
3966
|
+
* `reconcilePayment`. `timeout` carries a retry hint and is routed to
|
|
3967
|
+
* the timeout branch.
|
|
3967
3968
|
*/
|
|
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
|
-
};
|
|
3969
|
+
type ProcessPaymentResult = operations['PaymentIntentSdkController_processPaymentIntent']['responses']['200']['content']['application/json'];
|
|
3988
3970
|
/**
|
|
3989
3971
|
* Result from processing a credit-topup payment intent.
|
|
3990
3972
|
*
|
|
@@ -5628,6 +5610,8 @@ declare const PaywallStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
5628
5610
|
creditsPerCall: z.ZodOptional<z.ZodNumber>;
|
|
5629
5611
|
shortfallCredits: z.ZodOptional<z.ZodNumber>;
|
|
5630
5612
|
remainingCalls: z.ZodOptional<z.ZodNumber>;
|
|
5613
|
+
creditsPerMinorUnit: z.ZodOptional<z.ZodNumber>;
|
|
5614
|
+
displayExchangeRate: z.ZodOptional<z.ZodNumber>;
|
|
5631
5615
|
purchaseRef: z.ZodOptional<z.ZodString>;
|
|
5632
5616
|
planStatus: z.ZodOptional<z.ZodString>;
|
|
5633
5617
|
autoRecharge: z.ZodOptional<z.ZodObject<{
|
|
@@ -5675,6 +5659,8 @@ declare const PaywallStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
5675
5659
|
creditsPerCall: z.ZodOptional<z.ZodNumber>;
|
|
5676
5660
|
shortfallCredits: z.ZodOptional<z.ZodNumber>;
|
|
5677
5661
|
remainingCalls: z.ZodOptional<z.ZodNumber>;
|
|
5662
|
+
creditsPerMinorUnit: z.ZodOptional<z.ZodNumber>;
|
|
5663
|
+
displayExchangeRate: z.ZodOptional<z.ZodNumber>;
|
|
5678
5664
|
purchaseRef: z.ZodOptional<z.ZodString>;
|
|
5679
5665
|
planStatus: z.ZodOptional<z.ZodString>;
|
|
5680
5666
|
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;
|
|
829
831
|
/** @description Credits deducted per metered item (wallet coverage: remainingUnits = balance / creditsPerUnit) */
|
|
830
832
|
creditsPerUnit: number;
|
|
831
833
|
currency: string;
|
|
832
|
-
/** @description How many metered items the credit balance still covers (`balance / creditsPerUnit`) */
|
|
833
|
-
remainingUnits?: number;
|
|
834
|
-
/** @description Credits per minor unit of `currency` (typically 100) */
|
|
835
|
-
creditsPerMinorUnit?: number;
|
|
836
834
|
/** @description USD → display-currency rate used with creditsPerMinorUnit */
|
|
837
835
|
displayExchangeRate?: number;
|
|
836
|
+
/** @description How many metered items the credit balance still covers (`balance / creditsPerUnit`) */
|
|
837
|
+
remainingUnits?: 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
|
+
* @example cancelled
|
|
1209
1209
|
* @enum {string}
|
|
1210
1210
|
*/
|
|
1211
|
-
status: '
|
|
1211
|
+
status: 'cancelled';
|
|
1212
1212
|
};
|
|
1213
1213
|
ProcessPaymentFailed: {
|
|
1214
1214
|
/**
|
|
1215
|
-
*
|
|
1215
|
+
* @example failed
|
|
1216
1216
|
* @enum {string}
|
|
1217
1217
|
*/
|
|
1218
|
-
status: '
|
|
1218
|
+
status: 'failed';
|
|
1219
1219
|
};
|
|
1220
1220
|
ProcessPaymentIntentDto: {
|
|
1221
1221
|
customerRef: string;
|
|
@@ -1224,25 +1224,25 @@ interface components {
|
|
|
1224
1224
|
};
|
|
1225
1225
|
ProcessPaymentProcessing: {
|
|
1226
1226
|
/**
|
|
1227
|
-
*
|
|
1227
|
+
* @example processing
|
|
1228
1228
|
* @enum {string}
|
|
1229
1229
|
*/
|
|
1230
|
-
status: '
|
|
1230
|
+
status: 'processing';
|
|
1231
1231
|
};
|
|
1232
1232
|
ProcessPaymentSucceededBare: {
|
|
1233
1233
|
/**
|
|
1234
|
-
*
|
|
1234
|
+
* @example succeeded
|
|
1235
1235
|
* @enum {string}
|
|
1236
1236
|
*/
|
|
1237
|
-
status: '
|
|
1237
|
+
status: 'succeeded';
|
|
1238
1238
|
};
|
|
1239
1239
|
ProcessPaymentSucceededOneTime: {
|
|
1240
1240
|
oneTimePurchase: components['schemas']['OneTimePurchaseInfo'];
|
|
1241
1241
|
/**
|
|
1242
|
-
*
|
|
1242
|
+
* @example succeeded
|
|
1243
1243
|
* @enum {string}
|
|
1244
1244
|
*/
|
|
1245
|
-
status: '
|
|
1245
|
+
status: 'succeeded';
|
|
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
|
+
* @example succeeded
|
|
1256
1256
|
* @enum {string}
|
|
1257
1257
|
*/
|
|
1258
|
-
status: '
|
|
1258
|
+
status: 'succeeded';
|
|
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
|
+
* @example timeout
|
|
1270
1270
|
* @enum {string}
|
|
1271
1271
|
*/
|
|
1272
|
-
status: '
|
|
1272
|
+
status: 'timeout';
|
|
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: deactivation when purchases exist, otherwise soft-delete. Same in sandbox and live.
|
|
3215
3215
|
* @enum {string}
|
|
3216
3216
|
*/
|
|
3217
|
-
action?: '
|
|
3217
|
+
action?: 'deactivated' | 'soft_deleted';
|
|
3218
3218
|
success?: boolean;
|
|
3219
3219
|
};
|
|
3220
3220
|
};
|
|
@@ -3953,38 +3953,20 @@ type OneTimePurchaseInfo = components['schemas']['OneTimePurchaseInfo'];
|
|
|
3953
3953
|
/**
|
|
3954
3954
|
* Result from processing a payment intent.
|
|
3955
3955
|
*
|
|
3956
|
-
*
|
|
3957
|
-
* branches
|
|
3958
|
-
* recurring vs one-time
|
|
3959
|
-
* `purchase === undefined`. A bare `{ status: 'succeeded' }` is
|
|
3960
|
-
* when the webhook race means the backend can't yet enrich the
|
|
3961
|
-
* with the created purchase — callers should fall back to
|
|
3962
|
-
*
|
|
3963
|
-
*
|
|
3964
|
-
*
|
|
3965
|
-
*
|
|
3966
|
-
*
|
|
3956
|
+
* Derived from the generated `/v1/sdk/payment-intents/{id}/process` 200
|
|
3957
|
+
* response. The `succeeded` branches further discriminate on `type` so
|
|
3958
|
+
* consumers can route to recurring vs one-time handling without guarding
|
|
3959
|
+
* against `purchase === undefined`. A bare `{ status: 'succeeded' }` is
|
|
3960
|
+
* returned when the webhook race means the backend can't yet enrich the
|
|
3961
|
+
* response with the created purchase — callers should fall back to
|
|
3962
|
+
* refetching.
|
|
3963
|
+
*
|
|
3964
|
+
* `failed` and `cancelled` are returned when the Stripe PaymentIntent is
|
|
3965
|
+
* in a terminal non-success state and are routed to `onError` by
|
|
3966
|
+
* `reconcilePayment`. `timeout` carries a retry hint and is routed to
|
|
3967
|
+
* the timeout branch.
|
|
3967
3968
|
*/
|
|
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
|
-
};
|
|
3969
|
+
type ProcessPaymentResult = operations['PaymentIntentSdkController_processPaymentIntent']['responses']['200']['content']['application/json'];
|
|
3988
3970
|
/**
|
|
3989
3971
|
* Result from processing a credit-topup payment intent.
|
|
3990
3972
|
*
|
|
@@ -5628,6 +5610,8 @@ declare const PaywallStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
5628
5610
|
creditsPerCall: z.ZodOptional<z.ZodNumber>;
|
|
5629
5611
|
shortfallCredits: z.ZodOptional<z.ZodNumber>;
|
|
5630
5612
|
remainingCalls: z.ZodOptional<z.ZodNumber>;
|
|
5613
|
+
creditsPerMinorUnit: z.ZodOptional<z.ZodNumber>;
|
|
5614
|
+
displayExchangeRate: z.ZodOptional<z.ZodNumber>;
|
|
5631
5615
|
purchaseRef: z.ZodOptional<z.ZodString>;
|
|
5632
5616
|
planStatus: z.ZodOptional<z.ZodString>;
|
|
5633
5617
|
autoRecharge: z.ZodOptional<z.ZodObject<{
|
|
@@ -5675,6 +5659,8 @@ declare const PaywallStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
5675
5659
|
creditsPerCall: z.ZodOptional<z.ZodNumber>;
|
|
5676
5660
|
shortfallCredits: z.ZodOptional<z.ZodNumber>;
|
|
5677
5661
|
remainingCalls: z.ZodOptional<z.ZodNumber>;
|
|
5662
|
+
creditsPerMinorUnit: z.ZodOptional<z.ZodNumber>;
|
|
5663
|
+
displayExchangeRate: z.ZodOptional<z.ZodNumber>;
|
|
5678
5664
|
purchaseRef: z.ZodOptional<z.ZodString>;
|
|
5679
5665
|
planStatus: z.ZodOptional<z.ZodString>;
|
|
5680
5666
|
autoRecharge: z.ZodOptional<z.ZodObject<{
|
package/dist/index.js
CHANGED
|
@@ -2537,6 +2537,8 @@ 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(),
|
|
2540
2542
|
purchaseRef: z.string().optional(),
|
|
2541
2543
|
planStatus: z.string().optional(),
|
|
2542
2544
|
autoRecharge: z.object({
|