@deliverart/sdk-js-payment 2.36.0-dev.0 → 2.37.0-dev.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/README.md CHANGED
@@ -8,6 +8,20 @@ Payment management package for the DeliverArt JavaScript SDK.
8
8
  npm install @deliverart/sdk-js-payment @deliverart/sdk-js-core
9
9
  ```
10
10
 
11
+ ## Additional order payments
12
+
13
+ `GetPaymentInfo` reads an amendment's separate Stripe payment without polling Stripe.
14
+ While its asynchronous Checkout is being prepared, `sessionUrl` and `expiresAt`
15
+ are both `null`. Once ready, they contain the stored link and expiration timestamp.
16
+ Only render a payment action when `sessionUrl` is non-null. Expired, failed, or paid
17
+ sessions return a null link; expiration alone is not evidence of a failed payment.
18
+ The amount is a decimal string for the additional balance, not the original order
19
+ payment. Creating a link does not confirm receipt of money.
20
+
21
+ The existing `/orders/{id}/pay` full-order flow and generic payment PATCH/DELETE
22
+ cannot replace a payment once amendment settlement accounting is active. Use the
23
+ order's settlement operations instead. The original payment stays unchanged.
24
+
11
25
  ## Exported Types
12
26
 
13
27
  ### Core Types
package/dist/index.cjs CHANGED
@@ -308,7 +308,7 @@ var paymentInfoBaseSchema = import_zod.z.object({
308
308
  var paymentInfoStripeSchema = paymentInfoBaseSchema.extend({
309
309
  method: import_zod.z.literal("stripe"),
310
310
  sessionUrl: import_zod.z.string().nullable(),
311
- expiresAt: import_sdk_js_global_types3.datetimeSchema
311
+ expiresAt: import_sdk_js_global_types3.datetimeSchema.nullable()
312
312
  });
313
313
  var paymentInfoBankTransferSchema = paymentInfoBaseSchema.extend({
314
314
  method: import_zod.z.literal("bank_transfer"),
package/dist/index.d.cts CHANGED
@@ -351,7 +351,7 @@ declare const paymentInfoStripeSchema: z.ZodObject<{
351
351
  amount: z.ZodString;
352
352
  method: z.ZodLiteral<"stripe">;
353
353
  sessionUrl: z.ZodNullable<z.ZodString>;
354
- expiresAt: z.ZodString;
354
+ expiresAt: z.ZodNullable<z.ZodString>;
355
355
  }, z.core.$strip>;
356
356
  type PaymentInfoStripe = z.infer<typeof paymentInfoStripeSchema>;
357
357
  declare const paymentInfoBankTransferSchema: z.ZodObject<{
@@ -416,7 +416,7 @@ declare const paymentInfoSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
416
416
  amount: z.ZodString;
417
417
  method: z.ZodLiteral<"stripe">;
418
418
  sessionUrl: z.ZodNullable<z.ZodString>;
419
- expiresAt: z.ZodString;
419
+ expiresAt: z.ZodNullable<z.ZodString>;
420
420
  }, z.core.$strip>, z.ZodObject<{
421
421
  id: z.ZodString;
422
422
  status: z.ZodEnum<{
@@ -2028,7 +2028,7 @@ declare const getPaymentInfoResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject
2028
2028
  amount: z.ZodString;
2029
2029
  method: z.ZodLiteral<"stripe">;
2030
2030
  sessionUrl: z.ZodNullable<z.ZodString>;
2031
- expiresAt: z.ZodString;
2031
+ expiresAt: z.ZodNullable<z.ZodString>;
2032
2032
  }, z.core.$strip>, z.ZodObject<{
2033
2033
  id: z.ZodString;
2034
2034
  status: z.ZodEnum<{
@@ -2092,7 +2092,7 @@ declare class GetPaymentInfo extends AbstractApiRequest<typeof getPaymentInfoInp
2092
2092
  amount: z.ZodString;
2093
2093
  method: z.ZodLiteral<"stripe">;
2094
2094
  sessionUrl: z.ZodNullable<z.ZodString>;
2095
- expiresAt: z.ZodString;
2095
+ expiresAt: z.ZodNullable<z.ZodString>;
2096
2096
  }, z.core.$strip>, z.ZodObject<{
2097
2097
  id: z.ZodString;
2098
2098
  status: z.ZodEnum<{
package/dist/index.d.ts CHANGED
@@ -351,7 +351,7 @@ declare const paymentInfoStripeSchema: z.ZodObject<{
351
351
  amount: z.ZodString;
352
352
  method: z.ZodLiteral<"stripe">;
353
353
  sessionUrl: z.ZodNullable<z.ZodString>;
354
- expiresAt: z.ZodString;
354
+ expiresAt: z.ZodNullable<z.ZodString>;
355
355
  }, z.core.$strip>;
356
356
  type PaymentInfoStripe = z.infer<typeof paymentInfoStripeSchema>;
357
357
  declare const paymentInfoBankTransferSchema: z.ZodObject<{
@@ -416,7 +416,7 @@ declare const paymentInfoSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
416
416
  amount: z.ZodString;
417
417
  method: z.ZodLiteral<"stripe">;
418
418
  sessionUrl: z.ZodNullable<z.ZodString>;
419
- expiresAt: z.ZodString;
419
+ expiresAt: z.ZodNullable<z.ZodString>;
420
420
  }, z.core.$strip>, z.ZodObject<{
421
421
  id: z.ZodString;
422
422
  status: z.ZodEnum<{
@@ -2028,7 +2028,7 @@ declare const getPaymentInfoResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject
2028
2028
  amount: z.ZodString;
2029
2029
  method: z.ZodLiteral<"stripe">;
2030
2030
  sessionUrl: z.ZodNullable<z.ZodString>;
2031
- expiresAt: z.ZodString;
2031
+ expiresAt: z.ZodNullable<z.ZodString>;
2032
2032
  }, z.core.$strip>, z.ZodObject<{
2033
2033
  id: z.ZodString;
2034
2034
  status: z.ZodEnum<{
@@ -2092,7 +2092,7 @@ declare class GetPaymentInfo extends AbstractApiRequest<typeof getPaymentInfoInp
2092
2092
  amount: z.ZodString;
2093
2093
  method: z.ZodLiteral<"stripe">;
2094
2094
  sessionUrl: z.ZodNullable<z.ZodString>;
2095
- expiresAt: z.ZodString;
2095
+ expiresAt: z.ZodNullable<z.ZodString>;
2096
2096
  }, z.core.$strip>, z.ZodObject<{
2097
2097
  id: z.ZodString;
2098
2098
  status: z.ZodEnum<{
package/dist/index.js CHANGED
@@ -164,7 +164,7 @@ var paymentInfoBaseSchema = z.object({
164
164
  var paymentInfoStripeSchema = paymentInfoBaseSchema.extend({
165
165
  method: z.literal("stripe"),
166
166
  sessionUrl: z.string().nullable(),
167
- expiresAt: datetimeSchema
167
+ expiresAt: datetimeSchema.nullable()
168
168
  });
169
169
  var paymentInfoBankTransferSchema = paymentInfoBaseSchema.extend({
170
170
  method: z.literal("bank_transfer"),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deliverart/sdk-js-payment",
3
3
  "description": "Deliverart JavaScript SDK for Payment Management",
4
- "version": "2.36.0-dev.0",
4
+ "version": "2.37.0-dev.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -19,15 +19,16 @@
19
19
  ],
20
20
  "dependencies": {
21
21
  "zod": "4.3.5",
22
- "@deliverart/sdk-js-global-types": "2.36.0-dev.0",
23
- "@deliverart/sdk-js-point-of-sale": "2.36.0-dev.0",
24
- "@deliverart/sdk-js-core": "2.36.0-dev.0"
22
+ "@deliverart/sdk-js-core": "2.37.0-dev.0",
23
+ "@deliverart/sdk-js-global-types": "2.37.0-dev.0",
24
+ "@deliverart/sdk-js-point-of-sale": "2.37.0-dev.0"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"
28
28
  },
29
29
  "scripts": {
30
30
  "build": "tsup src/index.ts --dts --format esm,cjs",
31
- "dev": "tsup src/index.ts --dts --watch"
31
+ "dev": "tsup src/index.ts --dts --watch",
32
+ "test": "node --test tests/*.test.mjs"
32
33
  }
33
34
  }