@deliverart/sdk-js-order 2.4.7 → 2.4.9

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/index.cjs CHANGED
@@ -12272,11 +12272,13 @@ var MarkOrderAsRead = class extends import_sdk_js_core20.AbstractApiRequest {
12272
12272
  // src/requests/orders/PayOrder.ts
12273
12273
  var import_sdk_js_core21 = require("@deliverart/sdk-js-core");
12274
12274
  var import_sdk_js_payment2 = require("@deliverart/sdk-js-payment");
12275
- var payOrderInputSchema = external_exports.undefined();
12275
+ var payOrderInputSchema = external_exports.object({
12276
+ method: import_sdk_js_payment2.paymentMethodSchema
12277
+ });
12276
12278
  var payOrderResponseSchema = import_sdk_js_payment2.paymentInfoSchema;
12277
12279
  var PayOrder = class extends import_sdk_js_core21.AbstractApiRequest {
12278
- constructor(orderId) {
12279
- super(void 0);
12280
+ constructor(orderId, method) {
12281
+ super({ method });
12280
12282
  this.method = "POST";
12281
12283
  this.contentType = "application/json";
12282
12284
  this.accept = "application/json";
package/dist/index.d.cts CHANGED
@@ -4,6 +4,7 @@ import { MenuItemIri, MenuItemPriceOverrideNullableIri, MenuItemModifierIri } fr
4
4
  import { SalesModeNullableIri } from '@deliverart/sdk-js-sales-mode';
5
5
  import { z } from 'zod';
6
6
  import { AbstractApiRequest } from '@deliverart/sdk-js-core';
7
+ import { PaymentMethod } from '@deliverart/sdk-js-payment';
7
8
 
8
9
  declare const orderFeeDtoSchema: z.ZodObject<{
9
10
  key: z.ZodString;
@@ -7644,14 +7645,23 @@ declare class MarkOrderAsRead extends AbstractApiRequest<typeof markOrderAsReadI
7644
7645
  getPath(): string;
7645
7646
  }
7646
7647
 
7647
- declare const payOrderInputSchema: z.ZodUndefined;
7648
+ declare const payOrderInputSchema: z.ZodObject<{
7649
+ method: z.ZodEnum<{
7650
+ stripe: "stripe";
7651
+ bank_transfer: "bank_transfer";
7652
+ cash: "cash";
7653
+ credit_card: "credit_card";
7654
+ }>;
7655
+ }, z.core.$strip>;
7648
7656
  type PayOrderInput = z.infer<typeof payOrderInputSchema>;
7649
7657
  declare const payOrderResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7658
+ id: z.ZodString;
7650
7659
  amount: z.ZodString;
7651
7660
  method: z.ZodLiteral<"stripe">;
7652
7661
  sessionUrl: z.ZodString;
7653
7662
  expiresAt: z.ZodString;
7654
7663
  }, z.core.$strip>, z.ZodObject<{
7664
+ id: z.ZodString;
7655
7665
  amount: z.ZodString;
7656
7666
  method: z.ZodLiteral<"bank_transfer">;
7657
7667
  iban: z.ZodString;
@@ -7662,9 +7672,11 @@ declare const payOrderResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7662
7672
  currency: z.ZodString;
7663
7673
  description: z.ZodString;
7664
7674
  }, z.core.$strip>, z.ZodObject<{
7675
+ id: z.ZodString;
7665
7676
  amount: z.ZodString;
7666
7677
  method: z.ZodLiteral<"cash">;
7667
7678
  }, z.core.$strip>, z.ZodObject<{
7679
+ id: z.ZodString;
7668
7680
  amount: z.ZodString;
7669
7681
  method: z.ZodLiteral<"credit_card">;
7670
7682
  }, z.core.$strip>]>;
@@ -7673,13 +7685,22 @@ declare class PayOrder extends AbstractApiRequest<typeof payOrderInputSchema, ty
7673
7685
  readonly method = "POST";
7674
7686
  readonly contentType = "application/json";
7675
7687
  readonly accept = "application/json";
7676
- readonly inputSchema: z.ZodUndefined;
7688
+ readonly inputSchema: z.ZodObject<{
7689
+ method: z.ZodEnum<{
7690
+ stripe: "stripe";
7691
+ bank_transfer: "bank_transfer";
7692
+ cash: "cash";
7693
+ credit_card: "credit_card";
7694
+ }>;
7695
+ }, z.core.$strip>;
7677
7696
  readonly outputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7697
+ id: z.ZodString;
7678
7698
  amount: z.ZodString;
7679
7699
  method: z.ZodLiteral<"stripe">;
7680
7700
  sessionUrl: z.ZodString;
7681
7701
  expiresAt: z.ZodString;
7682
7702
  }, z.core.$strip>, z.ZodObject<{
7703
+ id: z.ZodString;
7683
7704
  amount: z.ZodString;
7684
7705
  method: z.ZodLiteral<"bank_transfer">;
7685
7706
  iban: z.ZodString;
@@ -7690,16 +7711,18 @@ declare class PayOrder extends AbstractApiRequest<typeof payOrderInputSchema, ty
7690
7711
  currency: z.ZodString;
7691
7712
  description: z.ZodString;
7692
7713
  }, z.core.$strip>, z.ZodObject<{
7714
+ id: z.ZodString;
7693
7715
  amount: z.ZodString;
7694
7716
  method: z.ZodLiteral<"cash">;
7695
7717
  }, z.core.$strip>, z.ZodObject<{
7718
+ id: z.ZodString;
7696
7719
  amount: z.ZodString;
7697
7720
  method: z.ZodLiteral<"credit_card">;
7698
7721
  }, z.core.$strip>]>;
7699
7722
  readonly querySchema: undefined;
7700
7723
  readonly headersSchema: undefined;
7701
7724
  private readonly orderId;
7702
- constructor(orderId: string);
7725
+ constructor(orderId: string, method: PaymentMethod);
7703
7726
  getPath(): string;
7704
7727
  }
7705
7728
 
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { MenuItemIri, MenuItemPriceOverrideNullableIri, MenuItemModifierIri } fr
4
4
  import { SalesModeNullableIri } from '@deliverart/sdk-js-sales-mode';
5
5
  import { z } from 'zod';
6
6
  import { AbstractApiRequest } from '@deliverart/sdk-js-core';
7
+ import { PaymentMethod } from '@deliverart/sdk-js-payment';
7
8
 
8
9
  declare const orderFeeDtoSchema: z.ZodObject<{
9
10
  key: z.ZodString;
@@ -7644,14 +7645,23 @@ declare class MarkOrderAsRead extends AbstractApiRequest<typeof markOrderAsReadI
7644
7645
  getPath(): string;
7645
7646
  }
7646
7647
 
7647
- declare const payOrderInputSchema: z.ZodUndefined;
7648
+ declare const payOrderInputSchema: z.ZodObject<{
7649
+ method: z.ZodEnum<{
7650
+ stripe: "stripe";
7651
+ bank_transfer: "bank_transfer";
7652
+ cash: "cash";
7653
+ credit_card: "credit_card";
7654
+ }>;
7655
+ }, z.core.$strip>;
7648
7656
  type PayOrderInput = z.infer<typeof payOrderInputSchema>;
7649
7657
  declare const payOrderResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7658
+ id: z.ZodString;
7650
7659
  amount: z.ZodString;
7651
7660
  method: z.ZodLiteral<"stripe">;
7652
7661
  sessionUrl: z.ZodString;
7653
7662
  expiresAt: z.ZodString;
7654
7663
  }, z.core.$strip>, z.ZodObject<{
7664
+ id: z.ZodString;
7655
7665
  amount: z.ZodString;
7656
7666
  method: z.ZodLiteral<"bank_transfer">;
7657
7667
  iban: z.ZodString;
@@ -7662,9 +7672,11 @@ declare const payOrderResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7662
7672
  currency: z.ZodString;
7663
7673
  description: z.ZodString;
7664
7674
  }, z.core.$strip>, z.ZodObject<{
7675
+ id: z.ZodString;
7665
7676
  amount: z.ZodString;
7666
7677
  method: z.ZodLiteral<"cash">;
7667
7678
  }, z.core.$strip>, z.ZodObject<{
7679
+ id: z.ZodString;
7668
7680
  amount: z.ZodString;
7669
7681
  method: z.ZodLiteral<"credit_card">;
7670
7682
  }, z.core.$strip>]>;
@@ -7673,13 +7685,22 @@ declare class PayOrder extends AbstractApiRequest<typeof payOrderInputSchema, ty
7673
7685
  readonly method = "POST";
7674
7686
  readonly contentType = "application/json";
7675
7687
  readonly accept = "application/json";
7676
- readonly inputSchema: z.ZodUndefined;
7688
+ readonly inputSchema: z.ZodObject<{
7689
+ method: z.ZodEnum<{
7690
+ stripe: "stripe";
7691
+ bank_transfer: "bank_transfer";
7692
+ cash: "cash";
7693
+ credit_card: "credit_card";
7694
+ }>;
7695
+ }, z.core.$strip>;
7677
7696
  readonly outputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7697
+ id: z.ZodString;
7678
7698
  amount: z.ZodString;
7679
7699
  method: z.ZodLiteral<"stripe">;
7680
7700
  sessionUrl: z.ZodString;
7681
7701
  expiresAt: z.ZodString;
7682
7702
  }, z.core.$strip>, z.ZodObject<{
7703
+ id: z.ZodString;
7683
7704
  amount: z.ZodString;
7684
7705
  method: z.ZodLiteral<"bank_transfer">;
7685
7706
  iban: z.ZodString;
@@ -7690,16 +7711,18 @@ declare class PayOrder extends AbstractApiRequest<typeof payOrderInputSchema, ty
7690
7711
  currency: z.ZodString;
7691
7712
  description: z.ZodString;
7692
7713
  }, z.core.$strip>, z.ZodObject<{
7714
+ id: z.ZodString;
7693
7715
  amount: z.ZodString;
7694
7716
  method: z.ZodLiteral<"cash">;
7695
7717
  }, z.core.$strip>, z.ZodObject<{
7718
+ id: z.ZodString;
7696
7719
  amount: z.ZodString;
7697
7720
  method: z.ZodLiteral<"credit_card">;
7698
7721
  }, z.core.$strip>]>;
7699
7722
  readonly querySchema: undefined;
7700
7723
  readonly headersSchema: undefined;
7701
7724
  private readonly orderId;
7702
- constructor(orderId: string);
7725
+ constructor(orderId: string, method: PaymentMethod);
7703
7726
  getPath(): string;
7704
7727
  }
7705
7728
 
package/dist/index.js CHANGED
@@ -12171,12 +12171,14 @@ var MarkOrderAsRead = class extends AbstractApiRequest20 {
12171
12171
 
12172
12172
  // src/requests/orders/PayOrder.ts
12173
12173
  import { AbstractApiRequest as AbstractApiRequest21 } from "@deliverart/sdk-js-core";
12174
- import { paymentInfoSchema } from "@deliverart/sdk-js-payment";
12175
- var payOrderInputSchema = external_exports.undefined();
12174
+ import { paymentInfoSchema, paymentMethodSchema as paymentMethodSchema2 } from "@deliverart/sdk-js-payment";
12175
+ var payOrderInputSchema = external_exports.object({
12176
+ method: paymentMethodSchema2
12177
+ });
12176
12178
  var payOrderResponseSchema = paymentInfoSchema;
12177
12179
  var PayOrder = class extends AbstractApiRequest21 {
12178
- constructor(orderId) {
12179
- super(void 0);
12180
+ constructor(orderId, method) {
12181
+ super({ method });
12180
12182
  this.method = "POST";
12181
12183
  this.contentType = "application/json";
12182
12184
  this.accept = "application/json";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deliverart/sdk-js-order",
3
3
  "description": "Deliverart JavaScript SDK for Order Management",
4
- "version": "2.4.7",
4
+ "version": "2.4.9",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -18,14 +18,14 @@
18
18
  "dist"
19
19
  ],
20
20
  "dependencies": {
21
- "@deliverart/sdk-js-core": "2.4.7",
22
- "@deliverart/sdk-js-global-types": "2.4.7",
23
- "@deliverart/sdk-js-payment": "2.4.7",
24
- "@deliverart/sdk-js-point-of-sale": "2.4.7",
25
- "@deliverart/sdk-js-menu": "2.4.7",
26
- "@deliverart/sdk-js-customer": "2.4.7",
27
- "@deliverart/sdk-js-sales-mode": "2.4.7",
28
- "@deliverart/sdk-js-user": "2.4.7"
21
+ "@deliverart/sdk-js-core": "2.4.9",
22
+ "@deliverart/sdk-js-customer": "2.4.9",
23
+ "@deliverart/sdk-js-global-types": "2.4.9",
24
+ "@deliverart/sdk-js-payment": "2.4.9",
25
+ "@deliverart/sdk-js-menu": "2.4.9",
26
+ "@deliverart/sdk-js-point-of-sale": "2.4.9",
27
+ "@deliverart/sdk-js-sales-mode": "2.4.9",
28
+ "@deliverart/sdk-js-user": "2.4.9"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"