@dropins/storefront-purchase-order 0.0.1-alpha1 → 0.0.1-alpha3

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 (125) hide show
  1. package/api/addPurchaseOrderComment/addPurchaseOrderComment.d.ts +4 -0
  2. package/api/addPurchaseOrderComment/graphql/addPurchaseOrderComment.graphql.d.ts +18 -0
  3. package/api/addPurchaseOrderComment/index.d.ts +18 -0
  4. package/api/addPurchaseOrderItemsToCart/addPurchaseOrderItemsToCart.d.ts +4 -0
  5. package/api/addPurchaseOrderItemsToCart/graphql/addPurchaseOrderItemsToCart.graphql.d.ts +18 -0
  6. package/api/addPurchaseOrderItemsToCart/index.d.ts +18 -0
  7. package/api/approvePurchaseOrders/approvePurchaseOrders.d.ts +10 -0
  8. package/api/approvePurchaseOrders/graphql/approvePurchaseOrders.graphql.d.ts +18 -0
  9. package/api/approvePurchaseOrders/index.d.ts +18 -0
  10. package/api/cancelPurchaseOrders/cancelPurchaseOrders.d.ts +10 -0
  11. package/api/cancelPurchaseOrders/graphql/cancelPurchaseOrders.graphql.d.ts +18 -0
  12. package/api/cancelPurchaseOrders/index.d.ts +18 -0
  13. package/api/createPurchaseOrderApprovalRule/createPurchaseOrderApprovalRule.d.ts +4 -0
  14. package/api/createPurchaseOrderApprovalRule/graphql/createPurchaseOrderApprovalRule.graphql.d.ts +18 -0
  15. package/api/createPurchaseOrderApprovalRule/index.d.ts +18 -0
  16. package/api/deletePurchaseOrderApprovalRule/deletePurchaseOrderApprovalRule.d.ts +9 -0
  17. package/api/deletePurchaseOrderApprovalRule/graphql/deletePurchaseOrderApprovalRule.graphql.d.ts +18 -0
  18. package/api/deletePurchaseOrderApprovalRule/index.d.ts +18 -0
  19. package/api/fragments.d.ts +18 -0
  20. package/api/getPurchaseOrder/getPurchaseOrder.d.ts +6 -0
  21. package/api/getPurchaseOrder/graphql/getPurchaseOrder.graphql.d.ts +18 -0
  22. package/api/getPurchaseOrder/index.d.ts +18 -0
  23. package/api/getPurchaseOrderApprovalRuleMetadata/getPurchaseOrderApprovalRuleMetadata.d.ts +4 -0
  24. package/api/getPurchaseOrderApprovalRuleMetadata/graphql/getPurchaseOrderApprovalRuleMetadata.graphql.d.ts +18 -0
  25. package/api/getPurchaseOrderApprovalRuleMetadata/index.d.ts +18 -0
  26. package/api/getPurchaseOrders/getPurchaseOrders.d.ts +12 -0
  27. package/api/getPurchaseOrders/graphql/getPurchaseOrders.graphql.d.ts +18 -0
  28. package/api/getPurchaseOrders/index.d.ts +18 -0
  29. package/api/graphql/PurchaseOrdersFragment.graphql.d.ts +18 -0
  30. package/api/index.d.ts +30 -0
  31. package/api/placeOrderForPurchaseOrder/graphql/placeOrderForPurchaseOrder.graphql.d.ts +18 -0
  32. package/api/placeOrderForPurchaseOrder/index.d.ts +18 -0
  33. package/api/placeOrderForPurchaseOrder/placeOrderForPurchaseOrder.d.ts +4 -0
  34. package/api/placePurchaseOrder/graphql/placePurchaseOrder.graphql.d.ts +18 -0
  35. package/api/placePurchaseOrder/index.d.ts +18 -0
  36. package/api/placePurchaseOrder/placePurchaseOrder.d.ts +6 -0
  37. package/api/rejectPurchaseOrders/graphql/rejectPurchaseOrders.graphql.d.ts +18 -0
  38. package/api/rejectPurchaseOrders/index.d.ts +18 -0
  39. package/api/rejectPurchaseOrders/rejectPurchaseOrders.d.ts +10 -0
  40. package/api/updatePurchaseOrderApprovalRule/graphql/updatePurchaseOrderApprovalRule.graphql.d.ts +18 -0
  41. package/api/updatePurchaseOrderApprovalRule/index.d.ts +18 -0
  42. package/api/updatePurchaseOrderApprovalRule/updatePurchaseOrderApprovalRule.d.ts +4 -0
  43. package/api/validatePurchaseOrders/graphql/validatePurchaseOrders.graphql.d.ts +18 -0
  44. package/api/validatePurchaseOrders/index.d.ts +18 -0
  45. package/api/validatePurchaseOrders/validatePurchaseOrders.d.ts +10 -0
  46. package/api.js +285 -1
  47. package/api.js.map +1 -1
  48. package/chunks/PurchaseOrdersTableActions.js +4 -0
  49. package/chunks/PurchaseOrdersTableActions.js.map +1 -0
  50. package/chunks/getPurchaseOrders.js +113 -0
  51. package/chunks/getPurchaseOrders.js.map +1 -0
  52. package/chunks/useCustomerRolePermissions.js +4 -0
  53. package/chunks/useCustomerRolePermissions.js.map +1 -0
  54. package/components/PurchaseOrdersHeader/PurchaseOrdersHeader.d.ts +7 -0
  55. package/components/PurchaseOrdersHeader/index.d.ts +19 -0
  56. package/components/PurchaseOrdersTable/PurchaseOrdersTable.d.ts +5 -0
  57. package/components/PurchaseOrdersTable/index.d.ts +19 -0
  58. package/components/PurchaseOrdersTableActions/PurchaseOrdersTableActions.d.ts +5 -0
  59. package/components/PurchaseOrdersTableActions/index.d.ts +19 -0
  60. package/components/index.d.ts +19 -1
  61. package/configs/companyPurchaseOrders.config.d.ts +4 -0
  62. package/configs/customerPurchaseOrders.config.d.ts +4 -0
  63. package/configs/index.d.ts +21 -0
  64. package/configs/pageSize.config.d.ts +22 -0
  65. package/configs/purchaseOrderApprovalRules.config.d.ts +4 -0
  66. package/containers/CompanyPurchaseOrders/CompanyPurchaseOrders.d.ts +5 -0
  67. package/containers/CompanyPurchaseOrders/index.d.ts +19 -0
  68. package/containers/CompanyPurchaseOrders.d.ts +3 -0
  69. package/containers/CompanyPurchaseOrders.js +4 -0
  70. package/containers/CompanyPurchaseOrders.js.map +1 -0
  71. package/containers/CustomerPurchaseOrders/CustomerPurchaseOrders.d.ts +5 -0
  72. package/containers/CustomerPurchaseOrders/index.d.ts +19 -0
  73. package/containers/CustomerPurchaseOrders.d.ts +3 -0
  74. package/containers/CustomerPurchaseOrders.js +4 -0
  75. package/containers/CustomerPurchaseOrders.js.map +1 -0
  76. package/containers/RequireApprovalPurchaseOrders/RequireApprovalPurchaseOrders.d.ts +5 -0
  77. package/containers/RequireApprovalPurchaseOrders/index.d.ts +19 -0
  78. package/containers/RequireApprovalPurchaseOrders.d.ts +3 -0
  79. package/containers/RequireApprovalPurchaseOrders.js +4 -0
  80. package/containers/RequireApprovalPurchaseOrders.js.map +1 -0
  81. package/containers/index.d.ts +3 -1
  82. package/data/models/cart-model.d.ts +40 -0
  83. package/data/models/customer-order-model.d.ts +128 -0
  84. package/data/models/customer-role-permissions-model.d.ts +35 -0
  85. package/data/models/index.d.ts +23 -1
  86. package/data/models/purchase-order-approval-rule-metadata-model.d.ts +33 -0
  87. package/data/models/purchase-order-approval-rule-model.d.ts +50 -0
  88. package/data/models/purchase-order-comment-model.d.ts +39 -0
  89. package/data/models/purchase-order-model.d.ts +75 -0
  90. package/data/transforms/index.d.ts +22 -1
  91. package/data/transforms/transform-cart.d.ts +4 -0
  92. package/data/transforms/transform-customer-order.d.ts +4 -0
  93. package/data/transforms/transform-customer-role-permissions.d.ts +20 -0
  94. package/data/transforms/transform-purchase-order-approval-rule-metadata.d.ts +4 -0
  95. package/data/transforms/transform-purchase-order-approval-rule.d.ts +4 -0
  96. package/data/transforms/transform-purchase-order-comment.d.ts +4 -0
  97. package/data/transforms/transform-purchase-order.d.ts +4 -0
  98. package/hooks/index.d.ts +19 -0
  99. package/hooks/useCustomerRolePermissions.d.ts +18 -0
  100. package/hooks/usePurchaseOrders.d.ts +4 -0
  101. package/i18n/en_US.json.d.ts +87 -2
  102. package/lib/case-converter.d.ts +25 -0
  103. package/lib/fetch-error.d.ts +21 -0
  104. package/lib/formatDate.d.ts +24 -0
  105. package/lib/getRange.d.ts +6 -0
  106. package/lib/index.d.ts +7 -0
  107. package/lib/isValidUrl.d.ts +2 -0
  108. package/lib/network-error.d.ts +22 -0
  109. package/mocks/index.d.ts +2832 -0
  110. package/mocks/storybook/index.d.ts +29 -0
  111. package/package.json +1 -1
  112. package/render.js +2 -1
  113. package/render.js.map +1 -1
  114. package/types/api/api.enums.types.d.ts +21 -0
  115. package/types/api/index.d.ts +2 -0
  116. package/types/components/index.d.ts +4 -0
  117. package/types/components/pagination.types.d.ts +27 -0
  118. package/types/components/purchaseOrdersTable.types.d.ts +38 -0
  119. package/types/components/purchaseOrdersTableActions.d.ts +8 -0
  120. package/types/containers/companyPurchaseOrders.types.d.ts +13 -0
  121. package/types/containers/customerPurchaseOrders.types.d.ts +13 -0
  122. package/types/containers/index.d.ts +4 -0
  123. package/types/containers/requireApprovalPurchaseOrders.types.d.ts +13 -0
  124. package/types/hooks/index.d.ts +2 -0
  125. package/types/hooks/usePurchaseOrders.types.d.ts +41 -0
@@ -1,5 +1,90 @@
1
1
  declare const _default: {
2
- "": {}
3
- };
2
+ "PurchaseOrders": {
3
+ "customerPurchaseOrders": {
4
+ "containerTitle": "My purchase orders",
5
+ "noPurchaseOrders": "No purchase orders found."
6
+ },
7
+ "companyPurchaseOrders": {
8
+ "containerTitle": "Company purchase orders",
9
+ "noPurchaseOrders": "No company purchase orders found."
10
+ },
11
+ "requireApprovalPurchaseOrders": {
12
+ "containerTitle": "Requires my approval",
13
+ "noPurchaseOrders": "No purchase orders requiring my approval found."
14
+ },
15
+ "approvalRulesList": {
16
+ "containerTitle": "Approval Rules",
17
+ "buttons": {
18
+ "newRule": "Add New Rule"
19
+ }
20
+ },
21
+ "alertMessages": {
22
+ "header": {
23
+ "approve": "Approve Purchase Orders",
24
+ "reject": "Reject Purchase Orders",
25
+ "error": "Error"
26
+ },
27
+ "description": {
28
+ "approve": "The selected purchase orders were approved successfully.",
29
+ "reject": "The selected purchase orders were rejected successfully.",
30
+ "error": "An error occurred while processing your request."
31
+ }
32
+ },
33
+ "purchaseOrdersTable": {
34
+ "noPurchaseOrders": {
35
+ "default": "No purchase orders found."
36
+ },
37
+ "pagination": {
38
+ "status": "Items {{from}} to {{to}} of {{total}} total",
39
+ "pageSizeLabel": {
40
+ "start": "Show",
41
+ "end": "per page"
42
+ }
43
+ },
44
+ "loading": "Loading purchase orders...",
45
+ "actionView": "View",
46
+ "actionEdit": "Edit",
47
+ "actionDelete": "Delete",
48
+ "rulesStatus": {
49
+ "enabled": "Enabled",
50
+ "disabled": "Disabled"
51
+ },
52
+ "ruleTypes": {
53
+ "grand_total": "Grand Total",
54
+ "number_of_skus": "Number of SKUs",
55
+ "any_item": "Any Item",
56
+ "all_items": "All Items"
57
+ },
58
+ "appliesToAll": "All",
59
+ "statusOrder": {
60
+ "order_placed": "Order placed",
61
+ "order_failed": "Order failed",
62
+ "pending": "Pending",
63
+ "approved": "Approved",
64
+ "rejected": "Rejected",
65
+ "canceled": "Canceled",
66
+ "order_in_progress": "Order in progress",
67
+ "approval_required": "Approval required",
68
+ "approved_pending_payment": "Approved pending Payment"
69
+ },
70
+ "tableColumns": {
71
+ "poNumber": "PO #",
72
+ "orderNumber": "Order #",
73
+ "createdDate": "Created",
74
+ "updatedDate": "Updated",
75
+ "createdBy": "Created By",
76
+ "status": "Status",
77
+ "total": "Total",
78
+ "action": "Action",
79
+ "ruleName": "Rule Name",
80
+ "ruleType": "Rule Type",
81
+ "appliesTo": "Applies To",
82
+ "approver": "Approver",
83
+ "selectAllAriaLabel": "Select all not approved purchase orders"
84
+ }
85
+ }
86
+ }
87
+ }
88
+ ;
4
89
 
5
90
  export default _default;
@@ -0,0 +1,25 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ /**
18
+ * Converts camelCase object keys to snake_case recursively
19
+ */
20
+ export declare const toSnakeCase: (obj: any) => any;
21
+ /**
22
+ * Converts snake_case object keys to camelCase recursively
23
+ */
24
+ export declare const toCamelCase: (obj: any) => any;
25
+ //# sourceMappingURL=case-converter.d.ts.map
@@ -0,0 +1,21 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ /** Actions */
18
+ export declare const handleFetchError: (errors: Array<{
19
+ message: string;
20
+ }>) => never;
21
+ //# sourceMappingURL=fetch-error.d.ts.map
@@ -0,0 +1,24 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ /**
18
+ * Format a date string to a localized format like "Sep 8, 2025 6:32:13 AM"
19
+ * @param dateString - ISO date string or date string
20
+ * @param locale - Locale for formatting (defaults to 'en-US')
21
+ * @returns Formatted date string
22
+ */
23
+ export declare const formatDate: (dateString: string, locale?: string) => string;
24
+ //# sourceMappingURL=formatDate.d.ts.map
@@ -0,0 +1,6 @@
1
+ export declare const getRange: (currentPage: number, pageSize: number, total: number) => {
2
+ from: number;
3
+ to: number;
4
+ total: number;
5
+ };
6
+ //# sourceMappingURL=getRange.d.ts.map
package/lib/index.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export * from './fetch-error';
2
+ export * from './network-error';
3
+ export * from './isValidUrl';
4
+ export * from './formatDate';
5
+ export * from './case-converter';
6
+ export * from './getRange';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const isValidUrl: (url: string) => boolean;
2
+ //# sourceMappingURL=isValidUrl.d.ts.map
@@ -0,0 +1,22 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ /**
18
+ * A function which can be attached to fetchGraphQL to handle thrown errors in
19
+ * a generic way.
20
+ */
21
+ export declare const handleNetworkError: (error: Error) => never;
22
+ //# sourceMappingURL=network-error.d.ts.map