rerobe-js-orm 3.0.37 → 3.0.39
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/lib/constants/file-constants.d.ts +6 -0
- package/lib/constants/file-constants.js +9 -0
- package/lib/constants/notification-constants.d.ts +2 -1
- package/lib/constants/notification-constants.js +2 -1
- package/lib/index.d.ts +2 -3
- package/lib/index.js +2 -4
- package/lib/models/{CustomerNotification/CustomerNotification.d.ts → CustomerNotification.d.ts} +1 -1
- package/lib/models/{CustomerNotification/CustomerNotification.js → CustomerNotification.js} +1 -1
- package/lib/models/Product.js +4 -0
- package/lib/models/RibbnFile.d.ts +16 -0
- package/lib/models/RibbnFile.js +35 -0
- package/lib/types/customer-notification-types.d.ts +3 -1
- package/lib/types/ribbn-file-types.d.ts +10 -0
- package/lib/types/ribbn-file-types.js +1 -0
- package/package.json +1 -1
- package/lib/models/CustomerNotification/orders/OrderConfirmationNotification.d.ts +0 -6
- package/lib/models/CustomerNotification/orders/OrderConfirmationNotification.js +0 -12
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RIBBN_FILE_CATEGORY = void 0;
|
|
4
|
+
exports.RIBBN_FILE_CATEGORY = {
|
|
5
|
+
product: 'PRODUCT',
|
|
6
|
+
generalAsset: 'GENERAL_ASSET',
|
|
7
|
+
collection: 'COLLECTION',
|
|
8
|
+
mobileAppOnboarding: 'MOBILE_APP_ONBOARDING',
|
|
9
|
+
};
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CUSTOMER_NOTIFICATION_TYPES = void 0;
|
|
4
4
|
exports.CUSTOMER_NOTIFICATION_TYPES = {
|
|
5
|
-
orderCancellation: 'ORDER_CANCELLATION',
|
|
6
5
|
orderConfirmation: 'ORDER_CONFIRMATION',
|
|
6
|
+
orderCancellation: 'ORDER_CANCELLATION',
|
|
7
7
|
orderRefund: 'ORDER_REFUND',
|
|
8
|
+
shippingConfirmation: 'SHIPPING_CONFIRMATION',
|
|
8
9
|
};
|
package/lib/index.d.ts
CHANGED
|
@@ -27,8 +27,7 @@ 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
|
|
31
|
-
import OrderConfirmationNotification from './models/CustomerNotification/orders/OrderConfirmationNotification';
|
|
30
|
+
import CustomerNotification from './models/CustomerNotification';
|
|
32
31
|
import ProductStateManager from './models/ProductStateManager';
|
|
33
32
|
import PayoutAccount from './models/PayoutAccount';
|
|
34
33
|
import PayoutAccountFormState from './form-states/PayoutAccount/PayoutAccountFormState';
|
|
@@ -37,4 +36,4 @@ import WebhookFormState from './form-states/Merchant/WebhookFormState';
|
|
|
37
36
|
import ReRobeProductHelpers from './helpers/ReRobeProductHelpers';
|
|
38
37
|
import AnalyticsHelpers from './helpers/AnalyticsHelpers';
|
|
39
38
|
import OrderHelpers from './helpers/OrderHelpers';
|
|
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,
|
|
39
|
+
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, };
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
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,10 +59,8 @@ 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
|
|
62
|
+
const CustomerNotification_1 = require("./models/CustomerNotification");
|
|
63
63
|
exports.CustomerNotification = CustomerNotification_1.default;
|
|
64
|
-
const OrderConfirmationNotification_1 = require("./models/CustomerNotification/orders/OrderConfirmationNotification");
|
|
65
|
-
exports.OrderConfirmationNotification = OrderConfirmationNotification_1.default;
|
|
66
64
|
const ProductStateManager_1 = require("./models/ProductStateManager");
|
|
67
65
|
exports.ProductStateManager = ProductStateManager_1.default;
|
|
68
66
|
const PayoutAccount_1 = require("./models/PayoutAccount");
|
package/lib/models/Product.js
CHANGED
|
@@ -230,6 +230,10 @@ class Product extends Base_1.default {
|
|
|
230
230
|
locationId: `${locationId}`,
|
|
231
231
|
},
|
|
232
232
|
],
|
|
233
|
+
inventoryItem: {
|
|
234
|
+
cost: this.attributes.costPerItem,
|
|
235
|
+
},
|
|
236
|
+
sku: this.attributes.sku,
|
|
233
237
|
price: this.attributes.price || '0',
|
|
234
238
|
taxable: false,
|
|
235
239
|
weight: parseFloat(this.attributes.weight) || parseFloat('999'),
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Base from '../Base';
|
|
2
|
+
export default class RibbnFile extends Base {
|
|
3
|
+
documentId: string;
|
|
4
|
+
productId: string;
|
|
5
|
+
category: string;
|
|
6
|
+
refName: string;
|
|
7
|
+
name: string;
|
|
8
|
+
size: number;
|
|
9
|
+
type: string;
|
|
10
|
+
url: string;
|
|
11
|
+
tags: string[];
|
|
12
|
+
createdAt: string | FireStoreTimeStamp;
|
|
13
|
+
updatedAt: string | FireStoreTimeStamp;
|
|
14
|
+
constructor(props?: any);
|
|
15
|
+
toObj(): RibbnFileAttributes;
|
|
16
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const Base_1 = require("../Base");
|
|
4
|
+
class RibbnFile extends Base_1.default {
|
|
5
|
+
constructor(props) {
|
|
6
|
+
super();
|
|
7
|
+
this.documentId = (props === null || props === void 0 ? void 0 : props.documentId) || '';
|
|
8
|
+
this.productId = (props === null || props === void 0 ? void 0 : props.productId) || null;
|
|
9
|
+
this.category = (props === null || props === void 0 ? void 0 : props.category) || '';
|
|
10
|
+
this.refName = (props === null || props === void 0 ? void 0 : props.refName) || '';
|
|
11
|
+
this.name = (props === null || props === void 0 ? void 0 : props.name) || '';
|
|
12
|
+
this.size = (props === null || props === void 0 ? void 0 : props.size) || 0;
|
|
13
|
+
this.type = (props === null || props === void 0 ? void 0 : props.type) || '';
|
|
14
|
+
this.url = (props === null || props === void 0 ? void 0 : props.url) || '';
|
|
15
|
+
this.tags = (props === null || props === void 0 ? void 0 : props.tags) || [];
|
|
16
|
+
this.createdAt = (props === null || props === void 0 ? void 0 : props.createdAt) || '';
|
|
17
|
+
this.updatedAt = (props === null || props === void 0 ? void 0 : props.updatedAt) || '';
|
|
18
|
+
}
|
|
19
|
+
toObj() {
|
|
20
|
+
return {
|
|
21
|
+
documentId: this.documentId,
|
|
22
|
+
productId: this.productId,
|
|
23
|
+
category: this.category,
|
|
24
|
+
refName: this.refName,
|
|
25
|
+
name: this.name,
|
|
26
|
+
size: this.size,
|
|
27
|
+
type: this.type,
|
|
28
|
+
url: this.url,
|
|
29
|
+
tags: this.tags,
|
|
30
|
+
createdAt: this.createdAt,
|
|
31
|
+
updatedAt: this.updatedAt,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.default = RibbnFile;
|
|
@@ -17,4 +17,6 @@ declare type CustomerNotificationAttributes = {
|
|
|
17
17
|
};
|
|
18
18
|
declare type ORDER_CONFIRMATION_TYPE = 'ORDER_CONFIRMATION';
|
|
19
19
|
declare type ORDER_CANCELLATION_TYPE = 'ORDER_CANCELLATION';
|
|
20
|
-
declare type
|
|
20
|
+
declare type ORDER_REFUND = 'ORDER_REFUND';
|
|
21
|
+
declare type SHIPPING_CONFIRMATION = 'SHIPPING_CONFIRMATION';
|
|
22
|
+
declare type CustomerNotificationType = ORDER_CONFIRMATION_TYPE | ORDER_CANCELLATION_TYPE | SHIPPING_CONFIRMATION | ORDER_REFUND;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
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;
|