@rocketlink/crm-model 1.0.329 → 1.0.330

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.
@@ -1,22 +1,30 @@
1
1
  import type { Lead } from "../model/lead.model";
2
- import { PAYMENT_METHOD } from "../model/constants/transaction.constants";
2
+ import { TRANSACTION_STATUS, TRANSACTION_TYPE } from "../model/constants/transaction.constants";
3
+ import { PaymentData } from "@/model/paymentData.model";
4
+ import { Order, OrderItem } from "@/model/order.model";
3
5
  export interface CheckoutRequest {
4
- lead: Pick<Lead, 'firstName' | 'lastName' | 'email' | 'phoneNumber' | 'address1' | 'address2' | 'street' | 'city' | 'state' | 'country' | 'zipCode'>;
5
- paymentData: CheckoutPaymentData;
6
+ lead?: Lead;
7
+ paymentData?: PaymentData;
6
8
  }
7
- export interface CheckoutPaymentData {
8
- type: PAYMENT_METHOD;
9
- iban?: string;
10
- bic?: string;
11
- cardNumber?: string;
12
- cardHolder?: string;
13
- expireMonth?: string;
14
- expireYear?: string;
9
+ export interface CheckoutDatabaseResult {
10
+ lead?: Lead;
11
+ paymentData?: PaymentData;
12
+ order?: Order;
15
13
  }
16
- export interface CheckoutResponse {
14
+ export interface CheckoutGatewayResult {
15
+ transactionId: number;
16
+ transactionStatus: TRANSACTION_STATUS;
17
+ transactionType: TRANSACTION_TYPE;
18
+ orderItems: OrderItem[];
17
19
  success: boolean;
20
+ skipped: boolean;
21
+ error?: string;
22
+ }
23
+ export interface CheckoutResponse {
24
+ checkoutGatewayResults?: CheckoutGatewayResult[];
18
25
  orderId?: number;
19
- status?: string;
26
+ order?: Order;
27
+ orderStatus?: string;
20
28
  message?: string;
21
29
  }
22
30
  //# sourceMappingURL=checkout.request.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkout.request.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/checkout.request.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAA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AAE,IAAI,CAAC;IACZ,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,kBAAkB,CAAC;IACtC,eAAe,EAAE,gBAAgB,CAAC;IAClC,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,sBAAsB,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -1,4 +1,5 @@
1
1
  export declare const REGISTRATION_MODE: {
2
+ HOSTED_PAGE: string;
2
3
  LIVE_TRAFFIC: string;
3
4
  CSV: string;
4
5
  };
@@ -1 +1 @@
1
- {"version":3,"file":"lead.constants.d.ts","sourceRoot":"","sources":["../../../src/model/constants/lead.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;CAG7B,CAAC;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":"lead.constants.d.ts","sourceRoot":"","sources":["../../../src/model/constants/lead.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;;CAI7B,CAAC;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.REGISTRATION_MODE = void 0;
4
4
  exports.REGISTRATION_MODE = {
5
+ HOSTED_PAGE: "HOSTED_PAGE",
5
6
  LIVE_TRAFFIC: "LIVE_TRAFFIC",
6
7
  CSV: "CSV"
7
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rocketlink/crm-model",
3
- "version": "1.0.329",
3
+ "version": "1.0.330",
4
4
  "description": "Shared DTOs and Models for CRM Rocketlink",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,24 +1,33 @@
1
1
  import type { Lead } from "../model/lead.model";
2
- import { PAYMENT_METHOD } from "../model/constants/transaction.constants";
2
+ import { TRANSACTION_STATUS, TRANSACTION_TYPE } from "../model/constants/transaction.constants";
3
+ import { PaymentData } from "@/model/paymentData.model";
4
+ import { Order, OrderItem } from "@/model/order.model";
3
5
 
4
6
  export interface CheckoutRequest {
5
- lead: Pick<Lead, 'firstName' | 'lastName' | 'email' | 'phoneNumber' | 'address1' | 'address2' | 'street' | 'city' | 'state' | 'country' | 'zipCode'>;
6
- paymentData: CheckoutPaymentData;
7
+ lead?: Lead;
8
+ paymentData?: PaymentData;
7
9
  }
8
10
 
9
- export interface CheckoutPaymentData {
10
- type: PAYMENT_METHOD;
11
- iban?: string;
12
- bic?: string;
13
- cardNumber?: string;
14
- cardHolder?: string;
15
- expireMonth?: string;
16
- expireYear?: string;
11
+ export interface CheckoutDatabaseResult {
12
+ lead?: Lead;
13
+ paymentData?: PaymentData;
14
+ order?: Order;
17
15
  }
18
16
 
19
- export interface CheckoutResponse {
17
+ export interface CheckoutGatewayResult {
18
+ transactionId: number;
19
+ transactionStatus: TRANSACTION_STATUS;
20
+ transactionType: TRANSACTION_TYPE;
21
+ orderItems: OrderItem[];
20
22
  success: boolean;
23
+ skipped: boolean;
24
+ error?: string;
25
+ }
26
+
27
+ export interface CheckoutResponse {
28
+ checkoutGatewayResults?: CheckoutGatewayResult[];
21
29
  orderId?: number;
22
- status?: string;
30
+ order?: Order;
31
+ orderStatus?: string;
23
32
  message?: string;
24
- }
33
+ }
@@ -1,4 +1,5 @@
1
1
  export const REGISTRATION_MODE = {
2
+ HOSTED_PAGE: "HOSTED_PAGE",
2
3
  LIVE_TRAFFIC: "LIVE_TRAFFIC",
3
4
  CSV: "CSV"
4
5
  };