rerobe-js-orm 3.0.5 → 3.0.6

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.
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CUSTOMER_NOTIFICATION_TYPES = void 0;
4
4
  exports.CUSTOMER_NOTIFICATION_TYPES = {
5
- orderCancellation: 'orderCancellation',
6
- orderConfirmation: 'orderConfirmation',
7
- orderRefund: 'orderRefund',
5
+ orderCancellation: 'ORDER_CANCELLATION',
6
+ orderConfirmation: 'ORDER_CONFIRMATION',
7
+ orderRefund: 'ORDER_REFUND',
8
8
  };
@@ -1,11 +1,6 @@
1
- import BaseCustomerNotification from '../CustomerNotification';
2
- export default class OrderConfirmationNotification extends BaseCustomerNotification {
3
- documentId: string;
4
- createdAt: string;
5
- merchantId: string;
6
- customerId: string;
7
- type: CustomerNotificationType;
1
+ import CustomerNotification from '../CustomerNotification';
2
+ export default class OrderConfirmationNotification extends CustomerNotification {
3
+ type: ORDER_CONFIRMATION_TYPE;
8
4
  data: any;
9
5
  constructor(props?: any);
10
- toObj(): CustomerNotificationAttributes;
11
6
  }
@@ -1,25 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const notification_constants_1 = require("../../../constants/notification-constants");
3
4
  const CustomerNotification_1 = require("../CustomerNotification");
4
5
  class OrderConfirmationNotification extends CustomerNotification_1.default {
5
6
  constructor(props) {
6
- super();
7
- this.documentId = (props === null || props === void 0 ? void 0 : props.documentId) || this.utilities.makeRandId(28);
8
- this.createdAt = (props === null || props === void 0 ? void 0 : props.createdAt) || '';
9
- this.merchantId = (props === null || props === void 0 ? void 0 : props.merchantId) || '';
10
- this.customerId = (props === null || props === void 0 ? void 0 : props.merchantId) || '';
11
- this.type = props === null || props === void 0 ? void 0 : props.type;
7
+ super(props);
8
+ this.type = notification_constants_1.CUSTOMER_NOTIFICATION_TYPES.orderConfirmation;
12
9
  this.data = props === null || props === void 0 ? void 0 : props.data;
13
10
  }
14
- toObj() {
15
- return {
16
- documentId: this.documentId,
17
- createdAt: this.createdAt,
18
- merchantId: this.merchantId,
19
- customerId: this.customerId,
20
- type: this.type,
21
- data: this.data,
22
- };
23
- }
24
11
  }
25
12
  exports.default = OrderConfirmationNotification;
@@ -6,4 +6,6 @@ declare type CustomerNotificationAttributes = {
6
6
  type: CustomerNotificationType;
7
7
  data: any;
8
8
  };
9
- declare type CustomerNotificationType = 'CUSTOMER_SUPPORT' | 'SELLER_CONCIERGE';
9
+ declare type ORDER_CONFIRMATION_TYPE = 'ORDER_CONFIRMATION';
10
+ declare type ORDER_CANCELLATION_TYPE = 'ORDER_CANCELLATION';
11
+ declare type CustomerNotificationType = ORDER_CONFIRMATION_TYPE | ORDER_CANCELLATION_TYPE;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "3.0.5",
3
+ "version": "3.0.6",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",