rerobe-js-orm 3.5.0 → 3.5.2

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.
Files changed (37) hide show
  1. package/lib/constants/ledger-constants.d.ts +3 -0
  2. package/lib/constants/ledger-constants.js +32 -1
  3. package/lib/constants/order-constants.d.ts +2 -0
  4. package/lib/constants/order-constants.js +2 -0
  5. package/lib/factories/ProductCollection/ProductCollectionFromFormState.js +1 -1
  6. package/lib/form-states/Product/options.js +1 -1
  7. package/lib/form-states/ProductCollection/ProductCollectionFormState.js +1 -1
  8. package/lib/helpers/ReRobeProductHelpers.js +2 -2
  9. package/lib/helpers/SellerProductLedgerHelpers.js +1 -1
  10. package/lib/helpers/Utilities.js +6 -6
  11. package/lib/models/Order.d.ts +2 -0
  12. package/lib/models/SellerProductLedgerActivityLog.d.ts +15 -0
  13. package/lib/models/SellerProductLedgerActivityLog.js +34 -0
  14. package/lib/types/analytics-types.d.ts +3 -3
  15. package/lib/types/customer-notification-types.d.ts +11 -11
  16. package/lib/types/ledger-transaction-types.d.ts +12 -10
  17. package/lib/types/ledger-transaction-types.js +5 -5
  18. package/lib/types/merchant-types.d.ts +14 -14
  19. package/lib/types/merchant-webshop-types.d.ts +3 -3
  20. package/lib/types/payout-account-types.d.ts +4 -4
  21. package/lib/types/product-collection-types.d.ts +8 -8
  22. package/lib/types/rerobe-chatroom-types.d.ts +6 -6
  23. package/lib/types/rerobe-document-types.d.ts +1 -1
  24. package/lib/types/rerobe-form-types.d.ts +4 -4
  25. package/lib/types/rerobe-klarna-types.d.ts +2 -2
  26. package/lib/types/rerobe-order-types.d.ts +86 -86
  27. package/lib/types/rerobe-pickup-types.d.ts +2 -2
  28. package/lib/types/rerobe-product-state-types.d.ts +3 -3
  29. package/lib/types/rerobe-product-types.d.ts +22 -22
  30. package/lib/types/rerobe-sellRequest-types.d.ts +3 -3
  31. package/lib/types/rerobe-user-types.d.ts +12 -12
  32. package/lib/types/response-types.d.ts +9 -9
  33. package/lib/types/webshop-page/common/web-page-element-property-types.d.ts +11 -11
  34. package/lib/types/webshop-page/elements/button-element-interface.d.ts +1 -1
  35. package/lib/types/webshop-page/elements/layout-element-interface.d.ts +1 -1
  36. package/lib/types/webshop-page/elements/typography-element-interface.d.ts +1 -1
  37. package/package.json +1 -1
@@ -14,6 +14,9 @@ export declare const CUSTOMER_CREDIT_REASONS: {
14
14
  customerCompensation: string;
15
15
  refund: string;
16
16
  };
17
+ export declare const ActivityLogActorTypes: Record<ActivityLogActorTypes, string>;
18
+ export declare const SellerProductLedgerStatus: Record<SellerProductLedgerStatus, string>;
19
+ export declare const SellerProductLedgerActivityLogAction: Record<SellerProductLedgerActivityLogAction, string>;
17
20
  export declare const SellerProductLedgerStatusDescriptions: Record<SellerProductLedgerStatus, {
18
21
  label: string;
19
22
  description: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SellerProductLedgerActivityLogActionDescriptions = exports.SellerProductLedgerStatusDescriptions = exports.CUSTOMER_CREDIT_REASONS = exports.TRANSACTION_TYPES = void 0;
3
+ exports.SellerProductLedgerActivityLogActionDescriptions = exports.SellerProductLedgerStatusDescriptions = exports.SellerProductLedgerActivityLogAction = exports.SellerProductLedgerStatus = exports.ActivityLogActorTypes = exports.CUSTOMER_CREDIT_REASONS = exports.TRANSACTION_TYPES = void 0;
4
4
  exports.TRANSACTION_TYPES = {
5
5
  merchantCredit: 'MERCHANT_CREDIT',
6
6
  merchantDebit: 'MERCHANT_DEBIT',
@@ -17,6 +17,37 @@ exports.CUSTOMER_CREDIT_REASONS = {
17
17
  customerCompensation: 'CUSTOMER_COMPENSATION',
18
18
  refund: 'REFUND',
19
19
  };
20
+ exports.ActivityLogActorTypes = {
21
+ SYSTEM: 'SYSTEM',
22
+ MERCHANT: 'MERCHANT',
23
+ };
24
+ exports.SellerProductLedgerStatus = {
25
+ PENDING_RETURN_PERIOD_COMPLETION: 'PENDING_RETURN_PERIOD_COMPLETION',
26
+ RETURNED_AND_RELISTED: 'RETURNED_AND_RELISTED',
27
+ SELLER_LIQUIDATED: 'SELLER_LIQUIDATED',
28
+ MERCHANT_DONATED: 'MERCHANT_DONATED',
29
+ SELLER_TO_BE_PAID: 'SELLER_TO_BE_PAID',
30
+ PAYMENT_IN_PROGRESS: 'PAYMENT_IN_PROGRESS',
31
+ SELLER_PAID: 'SELLER_PAID',
32
+ DISPUTED: 'DISPUTED',
33
+ RESOLVED: 'RESOLVED',
34
+ DIRECT_SALE_PENDING: 'DIRECT_SALE_PENDING',
35
+ DIRECT_SALE_COMPLETED: 'DIRECT_SALE_COMPLETED',
36
+ };
37
+ exports.SellerProductLedgerActivityLogAction = {
38
+ STATUS_CHANGED_TO_PENDING_RETURN_PERIOD_COMPLETION: 'STATUS_CHANGED_TO_PENDING_RETURN_PERIOD_COMPLETION',
39
+ STATUS_CHANGED_TO_RETURNED_AND_RELISTED: 'STATUS_CHANGED_TO_RETURNED_AND_RELISTED',
40
+ STATUS_CHANGED_TO_SELLER_LIQUIDATED: 'STATUS_CHANGED_TO_SELLER_LIQUIDATED',
41
+ STATUS_CHANGED_TO_MERCHANT_DONATED: 'STATUS_CHANGED_TO_MERCHANT_DONATED',
42
+ STATUS_CHANGED_TO_SELLER_TO_BE_PAID: 'STATUS_CHANGED_TO_SELLER_TO_BE_PAID',
43
+ STATUS_CHANGED_TO_PAYMENT_IN_PROGRESS: 'STATUS_CHANGED_TO_PAYMENT_IN_PROGRESS',
44
+ STATUS_CHANGED_TO_SELLER_PAID: 'STATUS_CHANGED_TO_SELLER_PAID',
45
+ STATUS_CHANGED_TO_DISPUTED: 'STATUS_CHANGED_TO_DISPUTED',
46
+ STATUS_CHANGED_TO_RESOLVED: 'STATUS_CHANGED_TO_RESOLVED',
47
+ STATUS_CHANGED_TO_DIRECT_SALE_PENDING: 'STATUS_CHANGED_TO_DIRECT_SALE_PENDING',
48
+ STATUS_CHANGED_TO_DIRECT_SALE_COMPLETED: 'STATUS_CHANGED_TO_DIRECT_SALE_COMPLETED',
49
+ MERCHANT_ADJUSTMENT_MADE: 'MERCHANT_ADJUSTMENT_MADE',
50
+ };
20
51
  exports.SellerProductLedgerStatusDescriptions = {
21
52
  PENDING_RETURN_PERIOD_COMPLETION: {
22
53
  label: 'The sold product is in a return period; payment to the seller is pending its completion',
@@ -20,6 +20,8 @@ export namespace SALES_CHANNELS {
20
20
  const onlineStore: string;
21
21
  const thirdParty: string;
22
22
  const ahlens: string;
23
+ const ribbnMobilePOS: string;
24
+ const ribbnWebPOS: string;
23
25
  }
24
26
  export namespace FULFILLMENT_TYPES {
25
27
  const fulfilled: string;
@@ -23,6 +23,8 @@ exports.SALES_CHANNELS = {
23
23
  onlineStore: 'ONLINE_STORE',
24
24
  thirdParty: 'THIRD_PARTY',
25
25
  ahlens: 'AHLENS',
26
+ ribbnMobilePOS: 'RIBBN_MOBILE_POS',
27
+ ribbnWebPOS: 'RIBBN_WEB_POS',
26
28
  };
27
29
  exports.FULFILLMENT_TYPES = {
28
30
  fulfilled: 'FULFILLED',
@@ -9,7 +9,7 @@ class ProductCollectionFromFormState extends ProductCollectionFactory_1.default
9
9
  var _a;
10
10
  let collectionId = fs.fields.collectionId.inputValue;
11
11
  if (!collectionId) {
12
- collectionId = lodash_1.camelCase(fs.fields.title.inputValue) + new Date().toISOString().split('T')[0];
12
+ collectionId = (0, lodash_1.camelCase)(fs.fields.title.inputValue) + new Date().toISOString().split('T')[0];
13
13
  }
14
14
  const productCollectionAttributes = {
15
15
  documentId: ((_a = fs.props) === null || _a === void 0 ? void 0 : _a.documentId) || '',
@@ -30,7 +30,7 @@ const publishTypeOptions = [
30
30
  ];
31
31
  exports.publishTypeOptions = publishTypeOptions;
32
32
  const statusOptions = Object.values(product_constants_1.PRODUCT_STATES).map((val) => ({
33
- label: lodash_1.startCase(lodash_1.toLower(val)),
33
+ label: (0, lodash_1.startCase)((0, lodash_1.toLower)(val)),
34
34
  value: val,
35
35
  }));
36
36
  exports.statusOptions = statusOptions;
@@ -43,7 +43,7 @@ class ProductCollectionFormState extends FormState_1.default {
43
43
  const valid = !!this.props[fieldKey];
44
44
  let onChangeHandler = (val) => this.textInputChangeHandler(fieldKey, String(val));
45
45
  if (fieldKey === 'collectionId') {
46
- onChangeHandler = (val) => this.textInputChangeHandler(fieldKey, lodash_1.camelCase(String(val)));
46
+ onChangeHandler = (val) => this.textInputChangeHandler(fieldKey, (0, lodash_1.camelCase)(String(val)));
47
47
  }
48
48
  return {
49
49
  inputValue,
@@ -104,7 +104,7 @@ class ReRobeProductHelpers {
104
104
  if (materialComposition) {
105
105
  return Object.keys(materialComposition)
106
106
  .reduce((acc, cur, idx) => {
107
- acc.push(`${Object.values(materialComposition)[idx]}% ${lodash_1.startCase(cur)}`);
107
+ acc.push(`${Object.values(materialComposition)[idx]}% ${(0, lodash_1.startCase)(cur)}`);
108
108
  return acc;
109
109
  }, [])
110
110
  .join(', ');
@@ -121,7 +121,7 @@ class ReRobeProductHelpers {
121
121
  return Object.keys(measurementsObj)
122
122
  .filter((key) => key !== 'unit' && !!measurementsObj[key])
123
123
  .map((key) => {
124
- const label = product_constants_1.MEASUREMENT_FIELDS_DICT[key] || lodash_1.startCase(key);
124
+ const label = product_constants_1.MEASUREMENT_FIELDS_DICT[key] || (0, lodash_1.startCase)(key);
125
125
  return `${measurementsObj[key]} ${measurementsObj.unit} ${label}`;
126
126
  })
127
127
  .join(' x ');
@@ -12,7 +12,7 @@ class SellerProductLedgerHelpers {
12
12
  action: (payload === null || payload === void 0 ? void 0 : payload.action) || SellerProductLedgerActivityLogAction.STATUS_CHANGED_TO_PENDING_RETURN_PERIOD_COMPLETION,
13
13
  details: (payload === null || payload === void 0 ? void 0 : payload.details) || '',
14
14
  actorId: (payload === null || payload === void 0 ? void 0 : payload.actorId) || 'system',
15
- actorType: (payload === null || payload === void 0 ? void 0 : payload.actorType) || AcivityLogActorTypes.SYSTEM,
15
+ actorType: (payload === null || payload === void 0 ? void 0 : payload.actorType) || ActivityLogActorTypes.SYSTEM,
16
16
  data: (payload === null || payload === void 0 ? void 0 : payload.data) || {},
17
17
  };
18
18
  }
@@ -6,7 +6,7 @@ class Utilities {
6
6
  addOrRemoveValToArray(arr, val) {
7
7
  let res;
8
8
  if (Array.isArray(arr)) {
9
- const idx = arr.findIndex((v) => lodash_1.isEqual(v, val));
9
+ const idx = arr.findIndex((v) => (0, lodash_1.isEqual)(v, val));
10
10
  if (idx !== -1) {
11
11
  arr.splice(idx, 1);
12
12
  }
@@ -29,10 +29,10 @@ class Utilities {
29
29
  return re.test(phone);
30
30
  }
31
31
  uniqArray(arr) {
32
- return lodash_1.uniq(arr);
32
+ return (0, lodash_1.uniq)(arr);
33
33
  }
34
34
  uniqObjArray(arr, objKey) {
35
- return lodash_1.uniqBy(arr, objKey);
35
+ return (0, lodash_1.uniqBy)(arr, objKey);
36
36
  }
37
37
  getWeekNumberFromDate(dateString) {
38
38
  const date = new Date(dateString);
@@ -45,13 +45,13 @@ class Utilities {
45
45
  return s.charAt(0).toUpperCase() + s.slice(1);
46
46
  }
47
47
  startCase(s) {
48
- return lodash_1.startCase(s);
48
+ return (0, lodash_1.startCase)(s);
49
49
  }
50
50
  camelCase(s) {
51
- return lodash_1.camelCase(s);
51
+ return (0, lodash_1.camelCase)(s);
52
52
  }
53
53
  constantCase(str) {
54
- return lodash_1.snakeCase(str).toUpperCase();
54
+ return (0, lodash_1.snakeCase)(str).toUpperCase();
55
55
  }
56
56
  makeRandId(length) {
57
57
  let result = '';
@@ -22,6 +22,8 @@ export default class Order extends Base {
22
22
  onlineStore: string;
23
23
  thirdParty: string;
24
24
  ahlens: string;
25
+ ribbnMobilePOS: string;
26
+ ribbnWebPOS: string;
25
27
  };
26
28
  static FULFILLMENT_TYPES: {
27
29
  fulfilled: string;
@@ -0,0 +1,15 @@
1
+ import Base from '../Base';
2
+ export default class SellerProductLedgerActivityLog extends Base {
3
+ documentId: string;
4
+ sellerProductLedgerId: string;
5
+ timestamp: number;
6
+ action: SellerProductLedgerActivityLogAction;
7
+ details: string;
8
+ actorId: string;
9
+ actorType: ActivityLogActorTypes;
10
+ data?: {
11
+ [key: string]: any;
12
+ };
13
+ constructor(props?: any);
14
+ toObj(): ActivityLog;
15
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const Base_1 = require("../Base");
4
+ const ledger_constants_1 = require("../constants/ledger-constants");
5
+ class SellerProductLedgerActivityLog extends Base_1.default {
6
+ constructor(props) {
7
+ var _a;
8
+ super();
9
+ this.documentId = this.utilities.sanitizeString(props === null || props === void 0 ? void 0 : props.documentId) || this.utilities.makeRandId(28);
10
+ this.sellerProductLedgerId = this.utilities.sanitizeString(props === null || props === void 0 ? void 0 : props.sellerProductLedgerId);
11
+ this.timestamp = this.utilities.sanitizeMillisTimeStamp(props === null || props === void 0 ? void 0 : props.timestamp);
12
+ this.action = this.utilities.sanitizeString((props === null || props === void 0 ? void 0 : props.action) || SellerProductLedgerActivityLogAction.STATUS_CHANGED_TO_PENDING_RETURN_PERIOD_COMPLETION);
13
+ this.details = this.utilities.sanitizeString((props === null || props === void 0 ? void 0 : props.details) ||
14
+ ((_a = ledger_constants_1.SellerProductLedgerActivityLogActionDescriptions[(props === null || props === void 0 ? void 0 : props.action) ||
15
+ SellerProductLedgerActivityLogAction.STATUS_CHANGED_TO_PENDING_RETURN_PERIOD_COMPLETION]) === null || _a === void 0 ? void 0 : _a.description));
16
+ this.actorId = this.utilities.sanitizeString((props === null || props === void 0 ? void 0 : props.actorId) || '');
17
+ this.actorType = this.utilities.sanitizeString((props === null || props === void 0 ? void 0 : props.actorType) || ActivityLogActorTypes.SYSTEM);
18
+ this.data = (props === null || props === void 0 ? void 0 : props.data) || {};
19
+ }
20
+ toObj() {
21
+ const activityLogObj = {
22
+ documentId: this.documentId,
23
+ sellerProductLedgerId: this.sellerProductLedgerId,
24
+ timestamp: this.timestamp,
25
+ action: this.action,
26
+ details: this.details,
27
+ actorId: this.actorId,
28
+ actorType: this.actorType,
29
+ data: this.data,
30
+ };
31
+ return activityLogObj;
32
+ }
33
+ }
34
+ exports.default = SellerProductLedgerActivityLog;
@@ -2,14 +2,14 @@ interface BaseTraits {
2
2
  createdAt: string;
3
3
  updatedAt: string;
4
4
  }
5
- declare type SegmentAddressType = {
5
+ type SegmentAddressType = {
6
6
  street: string;
7
7
  city: string;
8
8
  state: string;
9
9
  postalCode: string;
10
10
  country: string;
11
11
  };
12
- declare type SegmentReservedTraits = {
12
+ type SegmentReservedTraits = {
13
13
  firstName?: string;
14
14
  lastName?: string;
15
15
  email?: string;
@@ -22,7 +22,7 @@ declare type SegmentReservedTraits = {
22
22
  interface Traits extends BaseTraits {
23
23
  [key: string]: any;
24
24
  }
25
- declare type IdentifyPayload = {
25
+ type IdentifyPayload = {
26
26
  userId: string;
27
27
  traits: Traits;
28
28
  };
@@ -1,14 +1,14 @@
1
- declare type DeliveryResponse = {
1
+ type DeliveryResponse = {
2
2
  isDelivered: boolean;
3
3
  errorMsg: string;
4
4
  };
5
- declare type RecipientList = {
5
+ type RecipientList = {
6
6
  channel: string;
7
7
  to: string;
8
8
  isMerchant?: boolean;
9
9
  deliveryResponse?: DeliveryResponse;
10
10
  };
11
- declare type CustomerNotificationAttributes = {
11
+ type CustomerNotificationAttributes = {
12
12
  documentId: string;
13
13
  createdAt: string;
14
14
  merchantId: string;
@@ -24,11 +24,11 @@ declare type CustomerNotificationAttributes = {
24
24
  skipSend?: boolean;
25
25
  messageToAdmin?: string;
26
26
  };
27
- declare type ORDER_CONFIRMATION_TYPE = 'ORDER_CONFIRMATION';
28
- declare type ORDER_CANCELLATION_TYPE = 'ORDER_CANCELLATION';
29
- declare type ORDER_REFUND = 'ORDER_REFUND';
30
- declare type ORDER_READY_FOR_PICK_UP = 'ORDER_READY_FOR_PICK_UP';
31
- declare type SHIPPING_CONFIRMATION = 'SHIPPING_CONFIRMATION';
32
- declare type GENERAL_MESSAGE = 'GENERAL_MESSAGE';
33
- declare type ABANDONED_CART = 'ABANDONED_CART';
34
- declare type CustomerNotificationType = ORDER_CONFIRMATION_TYPE | ORDER_CANCELLATION_TYPE | SHIPPING_CONFIRMATION | ORDER_REFUND | GENERAL_MESSAGE | ABANDONED_CART;
27
+ type ORDER_CONFIRMATION_TYPE = 'ORDER_CONFIRMATION';
28
+ type ORDER_CANCELLATION_TYPE = 'ORDER_CANCELLATION';
29
+ type ORDER_REFUND = 'ORDER_REFUND';
30
+ type ORDER_READY_FOR_PICK_UP = 'ORDER_READY_FOR_PICK_UP';
31
+ type SHIPPING_CONFIRMATION = 'SHIPPING_CONFIRMATION';
32
+ type GENERAL_MESSAGE = 'GENERAL_MESSAGE';
33
+ type ABANDONED_CART = 'ABANDONED_CART';
34
+ type CustomerNotificationType = ORDER_CONFIRMATION_TYPE | ORDER_CANCELLATION_TYPE | SHIPPING_CONFIRMATION | ORDER_REFUND | GENERAL_MESSAGE | ABANDONED_CART;
@@ -1,5 +1,5 @@
1
- declare type LedgerTransactionTypeOptions = 'MERCHANT_CREDIT' | 'MERCHANT_DEBIT' | 'SELLER_CREDIT' | 'SELLER_DEBIT' | 'CUSTOMER_CREDIT' | 'CUSTOMER_DEBIT';
2
- declare type SellerLedgerTransactionType = {
1
+ type LedgerTransactionTypeOptions = 'MERCHANT_CREDIT' | 'MERCHANT_DEBIT' | 'SELLER_CREDIT' | 'SELLER_DEBIT' | 'CUSTOMER_CREDIT' | 'CUSTOMER_DEBIT';
2
+ type SellerLedgerTransactionType = {
3
3
  documentId: string;
4
4
  createdAtTimestamp: number;
5
5
  createdAt?: string;
@@ -24,7 +24,7 @@ declare type SellerLedgerTransactionType = {
24
24
  productionFee?: string | number;
25
25
  fulfillmentFee?: string | number;
26
26
  };
27
- declare type CustomerLedgerTransactionType = {
27
+ type CustomerLedgerTransactionType = {
28
28
  documentId: string;
29
29
  createdAtTimestamp: number;
30
30
  createdAt?: string;
@@ -43,7 +43,7 @@ declare type CustomerLedgerTransactionType = {
43
43
  description: string;
44
44
  reason: string;
45
45
  };
46
- declare type TypesenseSellerLedgerTransactionObj = {
46
+ type TypesenseSellerLedgerTransactionObj = {
47
47
  id: string;
48
48
  documentId: string;
49
49
  createdAtTimestamp: number;
@@ -67,7 +67,7 @@ declare type TypesenseSellerLedgerTransactionObj = {
67
67
  productionFee: number;
68
68
  fulfillmentFee: number;
69
69
  };
70
- declare type TypesenseCustomerLedgerTransactionObj = {
70
+ type TypesenseCustomerLedgerTransactionObj = {
71
71
  id: string;
72
72
  documentId: string;
73
73
  createdAtTimestamp: number;
@@ -85,7 +85,7 @@ declare type TypesenseCustomerLedgerTransactionObj = {
85
85
  description: string;
86
86
  reason: string;
87
87
  };
88
- declare type SellerProductLedgerType = {
88
+ type SellerProductLedgerType = {
89
89
  documentId: string;
90
90
  createdAtTimestamp: number;
91
91
  updatedAtTimestamp: number;
@@ -107,7 +107,7 @@ declare type SellerProductLedgerType = {
107
107
  feesForSeller: Fee[];
108
108
  tags?: string[];
109
109
  };
110
- declare type TypesenseSellerProductLedgerObj = {
110
+ type TypesenseSellerProductLedgerObj = {
111
111
  documentId: string;
112
112
  createdAtTimestamp: number;
113
113
  updatedAtTimestamp: number;
@@ -165,7 +165,7 @@ declare enum SellerProductLedgerActivityLogAction {
165
165
  STATUS_CHANGED_TO_DIRECT_SALE_COMPLETED = "STATUS_CHANGED_TO_DIRECT_SALE_COMPLETED",
166
166
  MERCHANT_ADJUSTMENT_MADE = "MERCHANT_ADJUSTMENT_MADE"
167
167
  }
168
- declare enum AcivityLogActorTypes {
168
+ declare enum ActivityLogActorTypes {
169
169
  SYSTEM = "SYSTEM",
170
170
  MERCHANT = "MERCHANT"
171
171
  }
@@ -176,6 +176,8 @@ interface ActivityLog {
176
176
  action: SellerProductLedgerActivityLogAction;
177
177
  details: string;
178
178
  actorId: string;
179
- actorType: AcivityLogActorTypes;
180
- data?: any;
179
+ actorType: ActivityLogActorTypes;
180
+ data?: {
181
+ [key: string]: any;
182
+ };
181
183
  }
@@ -33,8 +33,8 @@ var SellerProductLedgerActivityLogAction;
33
33
  SellerProductLedgerActivityLogAction["STATUS_CHANGED_TO_DIRECT_SALE_COMPLETED"] = "STATUS_CHANGED_TO_DIRECT_SALE_COMPLETED";
34
34
  SellerProductLedgerActivityLogAction["MERCHANT_ADJUSTMENT_MADE"] = "MERCHANT_ADJUSTMENT_MADE";
35
35
  })(SellerProductLedgerActivityLogAction || (SellerProductLedgerActivityLogAction = {}));
36
- var AcivityLogActorTypes;
37
- (function (AcivityLogActorTypes) {
38
- AcivityLogActorTypes["SYSTEM"] = "SYSTEM";
39
- AcivityLogActorTypes["MERCHANT"] = "MERCHANT";
40
- })(AcivityLogActorTypes || (AcivityLogActorTypes = {}));
36
+ var ActivityLogActorTypes;
37
+ (function (ActivityLogActorTypes) {
38
+ ActivityLogActorTypes["SYSTEM"] = "SYSTEM";
39
+ ActivityLogActorTypes["MERCHANT"] = "MERCHANT";
40
+ })(ActivityLogActorTypes || (ActivityLogActorTypes = {}));
@@ -1,4 +1,4 @@
1
- declare type SocialLinksType = {
1
+ type SocialLinksType = {
2
2
  facebook: string;
3
3
  instagram: string;
4
4
  linkedIn: string;
@@ -6,7 +6,7 @@ declare type SocialLinksType = {
6
6
  pinterest: string;
7
7
  tiktok: string;
8
8
  };
9
- declare type MerchantMutableData = {
9
+ type MerchantMutableData = {
10
10
  name: string;
11
11
  type: MerchantTypes | string;
12
12
  contactEmail: string;
@@ -23,7 +23,7 @@ declare type MerchantMutableData = {
23
23
  webhooks: MerchantWebHook[];
24
24
  socialLinks: SocialLinksType | null;
25
25
  };
26
- declare type MerchantSystemOnlyMutableData = {
26
+ type MerchantSystemOnlyMutableData = {
27
27
  paymentTier: RibbnPaymentTiers | string;
28
28
  documentId: string;
29
29
  numCustomers: number;
@@ -36,14 +36,14 @@ declare type MerchantSystemOnlyMutableData = {
36
36
  webshopHomePageId: string;
37
37
  defaultLocation: string;
38
38
  };
39
- declare type MerchantObj = MerchantMutableData & MerchantSystemOnlyMutableData;
40
- declare type MerchantTypes = 'INDIVIDUAL' | 'BUSINESS';
41
- declare type RibbnPaymentTiers = 'FREE' | 'TIER_ONE';
42
- declare type MerchantIndustryTypes = 'BEAUTY' | 'CLOTHING' | 'ELECTRONICS' | 'FURNITURE' | 'HANDCRAFTS' | 'JEWELRY' | 'SPORTS' | 'TOYS' | 'OTHER';
43
- declare type UnitSystemTypes = 'METRIC' | 'IMPERIAL';
44
- declare type MetricWeightTypes = 'KILOGRAM' | 'GRAM';
45
- declare type ImperialWeightTypes = 'POUND' | 'OUNCE';
46
- declare type MerchantTheme = {
39
+ type MerchantObj = MerchantMutableData & MerchantSystemOnlyMutableData;
40
+ type MerchantTypes = 'INDIVIDUAL' | 'BUSINESS';
41
+ type RibbnPaymentTiers = 'FREE' | 'TIER_ONE';
42
+ type MerchantIndustryTypes = 'BEAUTY' | 'CLOTHING' | 'ELECTRONICS' | 'FURNITURE' | 'HANDCRAFTS' | 'JEWELRY' | 'SPORTS' | 'TOYS' | 'OTHER';
43
+ type UnitSystemTypes = 'METRIC' | 'IMPERIAL';
44
+ type MetricWeightTypes = 'KILOGRAM' | 'GRAM';
45
+ type ImperialWeightTypes = 'POUND' | 'OUNCE';
46
+ type MerchantTheme = {
47
47
  bgColor: string;
48
48
  bgFooterColor: string;
49
49
  errorColor: string;
@@ -56,11 +56,11 @@ declare type MerchantTheme = {
56
56
  textColor: string;
57
57
  warningColor: string;
58
58
  };
59
- declare type MerchantWebHook = {
59
+ type MerchantWebHook = {
60
60
  event: string;
61
61
  callBackUrl: string;
62
62
  };
63
- declare type MerchantFormFields = {
63
+ type MerchantFormFields = {
64
64
  name: TextInputFormField<string>;
65
65
  type: SingleSelectFormField<string>;
66
66
  contactEmail: TextInputFormField<string>;
@@ -77,7 +77,7 @@ declare type MerchantFormFields = {
77
77
  primaryDomain: TextInputFormField<string>;
78
78
  socialLinks: SingleSelectFormField<SocialLinksType>;
79
79
  };
80
- declare type WebhookFormFields = {
80
+ type WebhookFormFields = {
81
81
  event: SingleSelectFormField<string>;
82
82
  callBackUrl: TextInputFormField<string>;
83
83
  };
@@ -1,15 +1,15 @@
1
1
  import { LayoutElement } from './webshop-page/elements/layout-element-interface';
2
2
  import { TypographyElement } from './webshop-page/elements/typography-element-interface';
3
3
  import { ButtonElement } from './webshop-page/elements/button-element-interface';
4
- export declare type WebPageElement = LayoutElement | TypographyElement | ButtonElement;
5
- export declare type SeoMetadataType = {
4
+ export type WebPageElement = LayoutElement | TypographyElement | ButtonElement;
5
+ export type SeoMetadataType = {
6
6
  title: string;
7
7
  description: string;
8
8
  favIconImgUrl: string;
9
9
  ogImgUrl: string;
10
10
  keywords: string;
11
11
  };
12
- export declare type MerchantWebPageObj = {
12
+ export type MerchantWebPageObj = {
13
13
  pageTitle: string;
14
14
  documentId: string;
15
15
  layers: WebPageElement[];
@@ -1,5 +1,5 @@
1
- declare type PayoutType = 'bank-transfer' | 'paypal';
2
- declare type MailingAddress = {
1
+ type PayoutType = 'bank-transfer' | 'paypal';
2
+ type MailingAddress = {
3
3
  name: string;
4
4
  street1: string;
5
5
  street2?: string;
@@ -8,7 +8,7 @@ declare type MailingAddress = {
8
8
  country: string;
9
9
  region: string;
10
10
  };
11
- declare type PayoutAccountObj = {
11
+ type PayoutAccountObj = {
12
12
  recipientAccountId: string;
13
13
  type: PayoutType;
14
14
  currency: string;
@@ -28,7 +28,7 @@ declare type PayoutAccountObj = {
28
28
  mailing: MailingAddress;
29
29
  ibanOrSortCodeForGB: 'iban' | 'sort' | '';
30
30
  };
31
- declare type PayoutAccountFormFields = {
31
+ type PayoutAccountFormFields = {
32
32
  type: SingleSelectFormField<string>;
33
33
  currency: SingleSelectFormField<string>;
34
34
  emailAddress: TextInputFormField<string>;
@@ -1,6 +1,6 @@
1
- declare type ProductAttrRefinementsOptions = 'brand' | 'clothingSize' | 'color' | 'condition' | 'gender' | 'jeanSize' | 'materialComposition' | 'priceRange' | 'productCategory' | 'productType' | 'productStyle' | 'shoeSize' | 'status' | 'salesChannel';
2
- declare type FiltersOptions = 'brandRefinement' | 'clothingSizeRefinement' | 'colorRefinement' | 'conditionRefinement' | 'genderRefinement' | 'jeanSizeRefinement' | 'materialCompositionRefinement' | 'priceRangeRefinement' | 'productCategoryRefinement' | 'productTypeRefinement' | 'productStyleRefinement' | 'shoeSizeRefinement' | 'statusRefinement' | 'salesChannelRefinement';
3
- declare type FiltersObj = {
1
+ type ProductAttrRefinementsOptions = 'brand' | 'clothingSize' | 'color' | 'condition' | 'gender' | 'jeanSize' | 'materialComposition' | 'priceRange' | 'productCategory' | 'productType' | 'productStyle' | 'shoeSize' | 'status' | 'salesChannel';
2
+ type FiltersOptions = 'brandRefinement' | 'clothingSizeRefinement' | 'colorRefinement' | 'conditionRefinement' | 'genderRefinement' | 'jeanSizeRefinement' | 'materialCompositionRefinement' | 'priceRangeRefinement' | 'productCategoryRefinement' | 'productTypeRefinement' | 'productStyleRefinement' | 'shoeSizeRefinement' | 'statusRefinement' | 'salesChannelRefinement';
3
+ type FiltersObj = {
4
4
  brand?: string[];
5
5
  clothingSize?: string[];
6
6
  color?: string[];
@@ -32,8 +32,8 @@ interface ProductRefinements {
32
32
  statusRefinement?: string[];
33
33
  salesChannelRefinement?: string[];
34
34
  }
35
- declare type CollectionType = 'AUTOMATED' | 'MANUAL';
36
- declare type ProductCollectionType = {
35
+ type CollectionType = 'AUTOMATED' | 'MANUAL';
36
+ type ProductCollectionType = {
37
37
  createdAt?: string;
38
38
  createdAtTimestamp?: number;
39
39
  updatedAt?: string;
@@ -50,10 +50,10 @@ declare type ProductCollectionType = {
50
50
  collectionId: string;
51
51
  imageUrls: string[];
52
52
  };
53
- declare type CompleteProductCollection = ProductCollectionType & {
53
+ type CompleteProductCollection = ProductCollectionType & {
54
54
  [key: string]: any;
55
55
  };
56
- declare type ProductCollectionFormFields = {
56
+ type ProductCollectionFormFields = {
57
57
  preTitle: TextInputFormField<string>;
58
58
  title: TextInputFormField<string>;
59
59
  subTitle: TextInputFormField<string>;
@@ -65,7 +65,7 @@ declare type ProductCollectionFormFields = {
65
65
  imageUrls: MultiSelectFormField<string>;
66
66
  collectionId: TextInputFormField<string>;
67
67
  };
68
- declare type TypesenseProductCollectionObj = {
68
+ type TypesenseProductCollectionObj = {
69
69
  id: string;
70
70
  documentId: string;
71
71
  merchantId: string;
@@ -1,4 +1,4 @@
1
- declare type ChatRoomAttributes = {
1
+ type ChatRoomAttributes = {
2
2
  documentId: string;
3
3
  createdAt: string;
4
4
  createdAtTimestamp: number;
@@ -9,17 +9,17 @@ declare type ChatRoomAttributes = {
9
9
  userInfo: ChatRoomUserInfoObj;
10
10
  merchantId: string;
11
11
  };
12
- declare type ChatRoomType = 'CUSTOMER_SUPPORT' | 'SELLER_CONCIERGE';
13
- declare type LastMessageObj = {
12
+ type ChatRoomType = 'CUSTOMER_SUPPORT' | 'SELLER_CONCIERGE';
13
+ type LastMessageObj = {
14
14
  authorId: string;
15
15
  authorName: string;
16
16
  content: string;
17
17
  createdAt: string;
18
18
  };
19
- declare type ChatRoomUserInfoObj = {
19
+ type ChatRoomUserInfoObj = {
20
20
  [key: string]: ChatRoomUserInfo;
21
21
  };
22
- declare type ChatRoomUserInfo = {
22
+ type ChatRoomUserInfo = {
23
23
  userId: string;
24
24
  displayName: string;
25
25
  avatarUrl: string;
@@ -30,7 +30,7 @@ declare type ChatRoomUserInfo = {
30
30
  isSeller?: boolean;
31
31
  firstName?: string;
32
32
  };
33
- declare type TypesenseChatRoomObj = {
33
+ type TypesenseChatRoomObj = {
34
34
  id: string;
35
35
  documentId: string;
36
36
  createdAtTimestamp: number;
@@ -3,7 +3,7 @@ interface ReRobeDocument {
3
3
  createdAt: string | FireStoreTimeStamp;
4
4
  updatedAt: string | FireStoreTimeStamp;
5
5
  }
6
- declare type FireStoreTimeStamp = {
6
+ type FireStoreTimeStamp = {
7
7
  toDate: () => Date;
8
8
  seconds: number;
9
9
  nanoseconds: number;
@@ -1,4 +1,4 @@
1
- declare type ChangeHandler = (...args: any[]) => any;
1
+ type ChangeHandler = (...args: any[]) => any;
2
2
  interface StandardFormField {
3
3
  valid: boolean;
4
4
  hidden?: boolean;
@@ -37,13 +37,13 @@ interface FileObj {
37
37
  interface FileObjWithUploadIndex extends FileObj {
38
38
  uploadIndex: number;
39
39
  }
40
- declare type FormFieldType<T> = StandardFormField | SingleSelectFormField<T> | MultiSelectFormField<T> | TextInputFormField<T> | MultiMediaSelectFormField;
41
- declare type FormFieldTypesDict<T> = {
40
+ type FormFieldType<T> = StandardFormField | SingleSelectFormField<T> | MultiSelectFormField<T> | TextInputFormField<T> | MultiMediaSelectFormField;
41
+ type FormFieldTypesDict<T> = {
42
42
  singleSelect: SingleSelectFormField<T>;
43
43
  multiSelect: MultiSelectFormField<T>;
44
44
  textInput: TextInputFormField<T>;
45
45
  multiMediaSelect: MultiMediaSelectFormField;
46
46
  };
47
- declare type FormStateObject = {
47
+ type FormStateObject = {
48
48
  [key: string]: FormFieldType<any>;
49
49
  };
@@ -1,4 +1,4 @@
1
- declare type KlarnaSessionObj = {
1
+ type KlarnaSessionObj = {
2
2
  purchase_country: string;
3
3
  purchase_currency: string;
4
4
  locale: string;
@@ -6,7 +6,7 @@ declare type KlarnaSessionObj = {
6
6
  order_tax_amount: number;
7
7
  order_lines: OrderLine[];
8
8
  };
9
- declare type OrderLine = {
9
+ type OrderLine = {
10
10
  type: string;
11
11
  name: string;
12
12
  quantity: number;