rerobe-js-orm 3.0.4 → 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.
@@ -0,0 +1,5 @@
1
+ export namespace CUSTOMER_NOTIFICATION_TYPES {
2
+ const orderCancellation: string;
3
+ const orderConfirmation: string;
4
+ const orderRefund: string;
5
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CUSTOMER_NOTIFICATION_TYPES = void 0;
4
+ exports.CUSTOMER_NOTIFICATION_TYPES = {
5
+ orderCancellation: 'ORDER_CANCELLATION',
6
+ orderConfirmation: 'ORDER_CONFIRMATION',
7
+ orderRefund: 'ORDER_REFUND',
8
+ };
package/lib/index.d.ts CHANGED
@@ -27,6 +27,8 @@ import Merchant from './models/Merchant';
27
27
  import User from './models/User';
28
28
  import MerchantWebPage from './models/MerchantWebPage';
29
29
  import ShopifyMerchantAccount from './models/ShopifyMerchantAccount';
30
+ import CustomerNotification from './models/CustomerNotification/CustomerNotification';
31
+ import OrderConfirmationNotification from './models/CustomerNotification/orders/OrderConfirmationNotification';
30
32
  import ProductStateManager from './models/ProductStateManager';
31
33
  import PayoutAccount from './models/PayoutAccount';
32
34
  import PayoutAccountFormState from './form-states/PayoutAccount/PayoutAccountFormState';
@@ -35,4 +37,4 @@ import WebhookFormState from './form-states/Merchant/WebhookFormState';
35
37
  import ReRobeProductHelpers from './helpers/ReRobeProductHelpers';
36
38
  import AnalyticsHelpers from './helpers/AnalyticsHelpers';
37
39
  import OrderHelpers from './helpers/OrderHelpers';
38
- export { ProductFromAlgoliaJSONDoc, ProductFromShopifyWebhookJSONDoc, ProductFromShopifyJSClientJSONDoc, ProductFormStateFactory, ProductCollectionFormStateFactory, ProductCollectionHelpers, SellRequestFormStateFactory, PickUpFormStateFactory, AddressFormStateFactory, UserFormStateFactory, UserFromShopifyWebhookJSONDoc, UserFromAuthTemplateMethod, DraftOrderFromMirakl, DraftOrderFromApp, ChatRoomFromNewUserSignUp, KlarnaSessionFactory, Product, ProductStateManager, Order, OrderFromShopifyWebhook, OrderFromShopifyAdminApi, OrderFromShopifyStorefrontApi, OrderFromApp, OrderFormStateFactory, RefundFormStateFactory, PayoutAccount, PayoutAccountFormState, Merchant, MerchantFormState, MerchantFormStateFactory, ReRobeProductHelpers, User, AnalyticsHelpers, OrderHelpers, WebhookFormState, MerchantWebPage, ShopifyMerchantAccount, };
40
+ export { ProductFromAlgoliaJSONDoc, ProductFromShopifyWebhookJSONDoc, ProductFromShopifyJSClientJSONDoc, ProductFormStateFactory, ProductCollectionFormStateFactory, ProductCollectionHelpers, SellRequestFormStateFactory, PickUpFormStateFactory, AddressFormStateFactory, UserFormStateFactory, UserFromShopifyWebhookJSONDoc, UserFromAuthTemplateMethod, DraftOrderFromMirakl, DraftOrderFromApp, ChatRoomFromNewUserSignUp, KlarnaSessionFactory, Product, ProductStateManager, Order, OrderFromShopifyWebhook, OrderFromShopifyAdminApi, OrderFromShopifyStorefrontApi, OrderFromApp, OrderFormStateFactory, RefundFormStateFactory, PayoutAccount, PayoutAccountFormState, Merchant, MerchantFormState, MerchantFormStateFactory, ReRobeProductHelpers, User, AnalyticsHelpers, OrderHelpers, WebhookFormState, MerchantWebPage, ShopifyMerchantAccount, CustomerNotification, OrderConfirmationNotification, };
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ShopifyMerchantAccount = exports.MerchantWebPage = exports.WebhookFormState = exports.OrderHelpers = exports.AnalyticsHelpers = exports.User = exports.ReRobeProductHelpers = exports.MerchantFormStateFactory = exports.MerchantFormState = exports.Merchant = exports.PayoutAccountFormState = exports.PayoutAccount = exports.RefundFormStateFactory = exports.OrderFormStateFactory = exports.OrderFromApp = exports.OrderFromShopifyStorefrontApi = exports.OrderFromShopifyAdminApi = exports.OrderFromShopifyWebhook = exports.Order = exports.ProductStateManager = exports.Product = exports.KlarnaSessionFactory = exports.ChatRoomFromNewUserSignUp = exports.DraftOrderFromApp = exports.DraftOrderFromMirakl = exports.UserFromAuthTemplateMethod = exports.UserFromShopifyWebhookJSONDoc = exports.UserFormStateFactory = exports.AddressFormStateFactory = exports.PickUpFormStateFactory = exports.SellRequestFormStateFactory = exports.ProductCollectionHelpers = exports.ProductCollectionFormStateFactory = exports.ProductFormStateFactory = exports.ProductFromShopifyJSClientJSONDoc = exports.ProductFromShopifyWebhookJSONDoc = exports.ProductFromAlgoliaJSONDoc = void 0;
3
+ exports.OrderConfirmationNotification = exports.CustomerNotification = exports.ShopifyMerchantAccount = exports.MerchantWebPage = exports.WebhookFormState = exports.OrderHelpers = exports.AnalyticsHelpers = exports.User = exports.ReRobeProductHelpers = exports.MerchantFormStateFactory = exports.MerchantFormState = exports.Merchant = exports.PayoutAccountFormState = exports.PayoutAccount = exports.RefundFormStateFactory = exports.OrderFormStateFactory = exports.OrderFromApp = exports.OrderFromShopifyStorefrontApi = exports.OrderFromShopifyAdminApi = exports.OrderFromShopifyWebhook = exports.Order = exports.ProductStateManager = exports.Product = exports.KlarnaSessionFactory = exports.ChatRoomFromNewUserSignUp = exports.DraftOrderFromApp = exports.DraftOrderFromMirakl = exports.UserFromAuthTemplateMethod = exports.UserFromShopifyWebhookJSONDoc = exports.UserFormStateFactory = exports.AddressFormStateFactory = exports.PickUpFormStateFactory = exports.SellRequestFormStateFactory = exports.ProductCollectionHelpers = exports.ProductCollectionFormStateFactory = exports.ProductFormStateFactory = exports.ProductFromShopifyJSClientJSONDoc = exports.ProductFromShopifyWebhookJSONDoc = exports.ProductFromAlgoliaJSONDoc = void 0;
4
4
  const ProductFromShopifyJSClientJSONDoc_1 = require("./factories/Product/ProductFromShopifyJSClientJSONDoc");
5
5
  exports.ProductFromShopifyJSClientJSONDoc = ProductFromShopifyJSClientJSONDoc_1.default;
6
6
  const ProductFromAlgoliaJSONDoc_1 = require("./factories/Product/ProductFromAlgoliaJSONDoc");
@@ -59,6 +59,10 @@ const MerchantWebPage_1 = require("./models/MerchantWebPage");
59
59
  exports.MerchantWebPage = MerchantWebPage_1.default;
60
60
  const ShopifyMerchantAccount_1 = require("./models/ShopifyMerchantAccount");
61
61
  exports.ShopifyMerchantAccount = ShopifyMerchantAccount_1.default;
62
+ const CustomerNotification_1 = require("./models/CustomerNotification/CustomerNotification");
63
+ exports.CustomerNotification = CustomerNotification_1.default;
64
+ const OrderConfirmationNotification_1 = require("./models/CustomerNotification/orders/OrderConfirmationNotification");
65
+ exports.OrderConfirmationNotification = OrderConfirmationNotification_1.default;
62
66
  const ProductStateManager_1 = require("./models/ProductStateManager");
63
67
  exports.ProductStateManager = ProductStateManager_1.default;
64
68
  const PayoutAccount_1 = require("./models/PayoutAccount");
@@ -0,0 +1,11 @@
1
+ import Base from '../../Base';
2
+ export default class CustomerNotification extends Base {
3
+ documentId: string;
4
+ createdAt: string;
5
+ merchantId: string;
6
+ customerId: string;
7
+ type: CustomerNotificationType;
8
+ data: any;
9
+ constructor(props?: any);
10
+ toObj(): CustomerNotificationAttributes;
11
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const Base_1 = require("../../Base");
4
+ class CustomerNotification extends Base_1.default {
5
+ 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;
12
+ this.data = props === null || props === void 0 ? void 0 : props.data;
13
+ }
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
+ }
25
+ exports.default = CustomerNotification;
@@ -0,0 +1,6 @@
1
+ import CustomerNotification from '../CustomerNotification';
2
+ export default class OrderConfirmationNotification extends CustomerNotification {
3
+ type: ORDER_CONFIRMATION_TYPE;
4
+ data: any;
5
+ constructor(props?: any);
6
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const notification_constants_1 = require("../../../constants/notification-constants");
4
+ const CustomerNotification_1 = require("../CustomerNotification");
5
+ class OrderConfirmationNotification extends CustomerNotification_1.default {
6
+ constructor(props) {
7
+ super(props);
8
+ this.type = notification_constants_1.CUSTOMER_NOTIFICATION_TYPES.orderConfirmation;
9
+ this.data = props === null || props === void 0 ? void 0 : props.data;
10
+ }
11
+ }
12
+ exports.default = OrderConfirmationNotification;
@@ -0,0 +1,11 @@
1
+ declare type CustomerNotificationAttributes = {
2
+ documentId: string;
3
+ createdAt: string;
4
+ merchantId: string;
5
+ customerId: string;
6
+ type: CustomerNotificationType;
7
+ data: any;
8
+ };
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;
@@ -0,0 +1 @@
1
+ "use strict";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "3.0.4",
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",