rerobe-js-orm 4.8.7 → 4.9.0

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 (72) hide show
  1. package/lib/constants/marketplace-constants.d.ts +52 -0
  2. package/lib/constants/marketplace-constants.js +82 -0
  3. package/lib/constants/merchant-constants.d.ts +35 -0
  4. package/lib/constants/merchant-constants.js +35 -1
  5. package/lib/constants/product-constants.d.ts +6 -0
  6. package/lib/constants/product-constants.js +43 -1
  7. package/lib/constants/tax-constants.d.ts +19 -0
  8. package/lib/constants/tax-constants.js +70 -0
  9. package/lib/factories/Product/RetailProductFactory.d.ts +102 -0
  10. package/lib/factories/Product/RetailProductFactory.js +260 -0
  11. package/lib/form-states/Product/ProductFormState.d.ts +9 -0
  12. package/lib/form-states/Product/ProductFormState.js +46 -0
  13. package/lib/helpers/MarketplaceProductHelpers.d.ts +181 -0
  14. package/lib/helpers/MarketplaceProductHelpers.js +555 -0
  15. package/lib/helpers/OrderHelpers.d.ts +5 -2
  16. package/lib/helpers/OrderHelpers.js +18 -4
  17. package/lib/helpers/PricingHelpers.d.ts +29 -0
  18. package/lib/helpers/PricingHelpers.js +215 -0
  19. package/lib/helpers/ProductInventoryHelpers.d.ts +31 -0
  20. package/lib/helpers/ProductInventoryHelpers.js +66 -0
  21. package/lib/helpers/ProductSkuHelpers.d.ts +13 -0
  22. package/lib/helpers/ProductSkuHelpers.js +70 -0
  23. package/lib/helpers/TaxHelpers.d.ts +15 -0
  24. package/lib/helpers/TaxHelpers.js +76 -0
  25. package/lib/helpers/marketplace/CommissionPolicy.d.ts +20 -0
  26. package/lib/helpers/marketplace/CommissionPolicy.js +9 -0
  27. package/lib/helpers/marketplace/CommissionPolicyRegistry.d.ts +4 -0
  28. package/lib/helpers/marketplace/CommissionPolicyRegistry.js +21 -0
  29. package/lib/helpers/marketplace/EvenPerSellerStripeFeePolicy.d.ts +5 -0
  30. package/lib/helpers/marketplace/EvenPerSellerStripeFeePolicy.js +46 -0
  31. package/lib/helpers/marketplace/FeeAllocationPolicy.d.ts +10 -0
  32. package/lib/helpers/marketplace/FeeAllocationPolicy.js +36 -0
  33. package/lib/helpers/marketplace/FeeAllocationPolicyRegistry.d.ts +6 -0
  34. package/lib/helpers/marketplace/FeeAllocationPolicyRegistry.js +26 -0
  35. package/lib/helpers/marketplace/InventoryPolicy.d.ts +18 -0
  36. package/lib/helpers/marketplace/InventoryPolicy.js +7 -0
  37. package/lib/helpers/marketplace/InventoryPolicyRegistry.d.ts +4 -0
  38. package/lib/helpers/marketplace/InventoryPolicyRegistry.js +29 -0
  39. package/lib/helpers/marketplace/LineNetCommissionPolicy.d.ts +5 -0
  40. package/lib/helpers/marketplace/LineNetCommissionPolicy.js +25 -0
  41. package/lib/helpers/marketplace/MarketplaceErrors.d.ts +6 -0
  42. package/lib/helpers/marketplace/MarketplaceErrors.js +21 -0
  43. package/lib/helpers/marketplace/MarketplaceLedgerHelpers.d.ts +40 -0
  44. package/lib/helpers/marketplace/MarketplaceLedgerHelpers.js +120 -0
  45. package/lib/helpers/marketplace/MarketplaceLegacyAdapters.d.ts +53 -0
  46. package/lib/helpers/marketplace/MarketplaceLegacyAdapters.js +99 -0
  47. package/lib/helpers/marketplace/MarketplaceLineDisplayHelpers.d.ts +40 -0
  48. package/lib/helpers/marketplace/MarketplaceLineDisplayHelpers.js +125 -0
  49. package/lib/helpers/marketplace/MarketplaceOrderHelpers.d.ts +15 -0
  50. package/lib/helpers/marketplace/MarketplaceOrderHelpers.js +77 -0
  51. package/lib/helpers/marketplace/MultivariantLocationInventoryPolicy.d.ts +9 -0
  52. package/lib/helpers/marketplace/MultivariantLocationInventoryPolicy.js +60 -0
  53. package/lib/helpers/marketplace/OneOfAKindInventoryPolicy.d.ts +9 -0
  54. package/lib/helpers/marketplace/OneOfAKindInventoryPolicy.js +55 -0
  55. package/lib/helpers/marketplace/OriginalCommissionShareCommissionPolicy.d.ts +5 -0
  56. package/lib/helpers/marketplace/OriginalCommissionShareCommissionPolicy.js +26 -0
  57. package/lib/helpers/marketplace/ProportionalToLineNetPolicy.d.ts +5 -0
  58. package/lib/helpers/marketplace/ProportionalToLineNetPolicy.js +35 -0
  59. package/lib/helpers/marketplace/UntrackedStockInventoryPolicy.d.ts +7 -0
  60. package/lib/helpers/marketplace/UntrackedStockInventoryPolicy.js +23 -0
  61. package/lib/index.d.ts +18 -1
  62. package/lib/index.js +56 -1
  63. package/lib/models/Merchant.d.ts +86 -0
  64. package/lib/models/Merchant.js +86 -0
  65. package/lib/models/Product.d.ts +16 -0
  66. package/lib/models/Product.js +151 -0
  67. package/lib/types/merchant-types.d.ts +28 -0
  68. package/lib/types/pricing-types.d.ts +85 -0
  69. package/lib/types/pricing-types.js +5 -0
  70. package/lib/types/rerobe-order-types.d.ts +86 -0
  71. package/lib/types/rerobe-product-types.d.ts +19 -0
  72. package/package.json +1 -1
@@ -34,6 +34,7 @@ type ProductAttributes = {
34
34
  taxCategory?: string;
35
35
  productClass?: 'UNIQUE' | 'MULTIVARIANT' | 'TEMPLATE' | 'SUPPLY' | 'DIGITAL' | string;
36
36
  variantInventory?: VariantInventory[];
37
+ marketplace?: ProductMarketplace;
37
38
  };
38
39
  type ProductFilterAttributes = {
39
40
  documentId: string;
@@ -173,6 +174,20 @@ type VariantInventory = {
173
174
  costPerItem?: string | null;
174
175
  continueSellingWhenOutOfStock?: boolean | null;
175
176
  };
177
+ type MarketplaceListingStatus = 'ACTIVE' | 'PAUSED' | 'REMOVED' | string;
178
+ type ProductMarketplaceListing = {
179
+ relationshipId: string;
180
+ relationshipType: string;
181
+ status: MarketplaceListingStatus;
182
+ listedAt?: number | null;
183
+ updatedAt?: number | null;
184
+ };
185
+ type ProductMarketplace = {
186
+ visibleToMerchantIds: string[];
187
+ listings: {
188
+ [parentMarketplaceId: string]: ProductMarketplaceListing;
189
+ };
190
+ };
176
191
  type ProductSellStatusKeys = 'SELL_REQUEST_REVIEW' | 'REJECTED' | 'HOLD' | 'ACCEPTED' | 'DROP_OFF_AT_REROBE' | 'SHIP_TO_REROBE' | 'AT_HOME_PICK_UP' | 'QUALITY_CONTROL' | 'LISTED' | 'SOLD' | 'RETURNED' | 'SOLD_SELLER_TO_BE_PAID' | 'SOLD_SELLER_PAID' | 'HIDDEN' | 'BOOKED' | 'OPEN';
177
192
  type ProductPublishKeys = 'USER_PUBLISHED' | 'MERCHANT_PUBLISHED';
178
193
  type ShopifyProduct = ProductAttributes & ProductFilterAttributes;
@@ -329,6 +344,10 @@ type TypesenseProductObj = {
329
344
  sku: string;
330
345
  salesChannel: string[];
331
346
  thirdPartySalesChannels: string[];
347
+ marketplaceVisibleToMerchantIds: string[];
348
+ marketplaceParentMerchantIds: string[];
349
+ marketplaceRelationshipIds: string[];
350
+ isMarketplaceVisible: boolean;
332
351
  status: string;
333
352
  tags: string[];
334
353
  systemTags: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "4.8.7",
3
+ "version": "4.9.0",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",