@whiplashmerch/whiplash-api-client 0.4.76 → 0.4.78

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 (92) hide show
  1. package/dist/client.esm.js +18494 -2141
  2. package/dist/client.esm.js.map +1 -1
  3. package/dist/constants/index.d.ts +1 -0
  4. package/dist/constants/search.d.ts +9 -0
  5. package/dist/generated/AccountTransactions.d.ts +56 -0
  6. package/dist/generated/Accounts.d.ts +171 -0
  7. package/dist/generated/Allocations.d.ts +38 -0
  8. package/dist/generated/Broadcasts.d.ts +164 -0
  9. package/dist/generated/Cache.d.ts +56 -0
  10. package/dist/generated/CarrierAccounts.d.ts +191 -0
  11. package/dist/generated/Carriers.d.ts +20 -0
  12. package/dist/generated/Chromalists.d.ts +56 -0
  13. package/dist/generated/ConsumerReturns.d.ts +89 -1
  14. package/dist/generated/Currencies.d.ts +56 -0
  15. package/dist/generated/Customers.d.ts +172 -1
  16. package/dist/generated/CustomsInfos.d.ts +56 -0
  17. package/dist/generated/Dashboards.d.ts +38 -0
  18. package/dist/generated/Documents.d.ts +37 -1
  19. package/dist/generated/ExtApp.d.ts +30 -0
  20. package/dist/generated/FilterSets.d.ts +288 -0
  21. package/dist/generated/ImporterOfRecords.d.ts +92 -0
  22. package/dist/generated/Incidents.d.ts +128 -0
  23. package/dist/generated/InvoiceItems.d.ts +56 -0
  24. package/dist/generated/Invoices.d.ts +110 -0
  25. package/dist/generated/Items.d.ts +260 -1
  26. package/dist/generated/Locales.d.ts +19 -0
  27. package/dist/generated/LocationAdjustments.d.ts +65 -0
  28. package/dist/generated/LocationAudits.d.ts +162 -0
  29. package/dist/generated/LocationTransfers.d.ts +162 -0
  30. package/dist/generated/Locations.d.ts +207 -0
  31. package/dist/generated/Lots.d.ts +119 -0
  32. package/dist/generated/Manifests.d.ts +128 -0
  33. package/dist/generated/Me.d.ts +20 -0
  34. package/dist/generated/Nav.d.ts +20 -0
  35. package/dist/generated/NavItems.d.ts +20 -0
  36. package/dist/generated/OrderBatchItems.d.ts +54 -0
  37. package/dist/generated/OrderBatchRequests.d.ts +38 -0
  38. package/dist/generated/OrderBatches.d.ts +315 -0
  39. package/dist/generated/OrderDocuments.d.ts +37 -0
  40. package/dist/generated/OrderItems.d.ts +98 -1
  41. package/dist/generated/OrderTotes.d.ts +20 -0
  42. package/dist/generated/Orders.d.ts +468 -1
  43. package/dist/generated/Originators.d.ts +28 -1
  44. package/dist/generated/Packages.d.ts +205 -0
  45. package/dist/generated/Partners.d.ts +110 -0
  46. package/dist/generated/Prepacks.d.ts +11 -0
  47. package/dist/generated/ProjectTasks.d.ts +56 -0
  48. package/dist/generated/Projects.d.ts +163 -1
  49. package/dist/generated/Rates.d.ts +119 -0
  50. package/dist/generated/ReasonCodes.d.ts +20 -0
  51. package/dist/generated/ReturnAddresses.d.ts +92 -0
  52. package/dist/generated/RuleDismissals.d.ts +19 -0
  53. package/dist/generated/Rules.d.ts +155 -0
  54. package/dist/generated/Scancodes.d.ts +20 -0
  55. package/dist/generated/SerialNumbers.d.ts +56 -0
  56. package/dist/generated/ShipnoticeItems.d.ts +197 -1
  57. package/dist/generated/Shipnotices.d.ts +242 -1
  58. package/dist/generated/ShippingAliases.d.ts +119 -0
  59. package/dist/generated/ShippingBlacklistedMethods.d.ts +110 -0
  60. package/dist/generated/ShippingMethodMarkups.d.ts +11 -0
  61. package/dist/generated/ShippingMethods.d.ts +110 -0
  62. package/dist/generated/Shops.d.ts +47 -0
  63. package/dist/generated/Stats.d.ts +54 -0
  64. package/dist/generated/SurchargeMarkups.d.ts +56 -0
  65. package/dist/generated/TemplateTypes.d.ts +20 -0
  66. package/dist/generated/Templates.d.ts +82 -1
  67. package/dist/generated/Transactions.d.ts +11 -0
  68. package/dist/generated/TransportationMarkups.d.ts +56 -0
  69. package/dist/generated/Users.d.ts +245 -0
  70. package/dist/generated/Utilities.d.ts +38 -0
  71. package/dist/generated/WarehouseFeatures.d.ts +110 -0
  72. package/dist/generated/Warehouses.d.ts +245 -0
  73. package/dist/generated/Wholesales.d.ts +56 -0
  74. package/dist/generated/data-contracts.d.ts +20237 -4725
  75. package/dist/generated/index.d.ts +57 -0
  76. package/dist/index.d.ts +3 -0
  77. package/dist/mocks/customer.d.ts +2 -0
  78. package/dist/mocks/index.d.ts +4 -0
  79. package/dist/mocks/nav.d.ts +2 -0
  80. package/dist/mocks/user.d.ts +2 -0
  81. package/dist/mocks/warehouse.d.ts +2 -0
  82. package/dist/utils/errorHandler.d.ts +2 -0
  83. package/dist/utils/index.d.ts +9 -0
  84. package/dist/utils/nav.d.ts +9 -0
  85. package/dist/utils/orderBatch.d.ts +19 -0
  86. package/dist/utils/orders.d.ts +54 -0
  87. package/dist/utils/pusher.d.ts +25 -0
  88. package/dist/utils/rules.d.ts +8 -0
  89. package/dist/utils/user.d.ts +19 -0
  90. package/dist/utils/utilities.d.ts +8 -0
  91. package/dist/utils/warehouse.d.ts +26 -0
  92. package/package.json +1 -1
@@ -1,18 +1,75 @@
1
+ export * from './AccountTransactions';
2
+ export * from './Accounts';
3
+ export * from './Allocations';
4
+ export * from './Broadcasts';
1
5
  export * from './BundleItems';
6
+ export * from './Cache';
7
+ export * from './CarrierAccounts';
8
+ export * from './Carriers';
9
+ export * from './Chromalists';
2
10
  export * from './ConsumerReturns';
11
+ export * from './Currencies';
3
12
  export * from './Customers';
13
+ export * from './CustomsInfos';
14
+ export * from './Dashboards';
4
15
  export * from './Documents';
16
+ export * from './ExtApp';
17
+ export * from './FilterSets';
18
+ export * from './ImporterOfRecords';
19
+ export * from './Incidents';
20
+ export * from './InvoiceItems';
21
+ export * from './Invoices';
5
22
  export * from './Items';
23
+ export * from './Locales';
24
+ export * from './LocationAdjustments';
25
+ export * from './LocationAudits';
26
+ export * from './LocationTransfers';
27
+ export * from './Locations';
28
+ export * from './Lots';
29
+ export * from './Manifests';
30
+ export * from './Me';
31
+ export * from './Nav';
32
+ export * from './NavItems';
6
33
  export * from './NotificationEvents';
7
34
  export * from './NotificationSubscriptions';
35
+ export * from './OrderBatchItems';
36
+ export * from './OrderBatchRequests';
37
+ export * from './OrderBatches';
8
38
  export * from './OrderDocuments';
9
39
  export * from './OrderItems';
40
+ export * from './OrderTotes';
10
41
  export * from './Orders';
11
42
  export * from './Originators';
43
+ export * from './Packages';
44
+ export * from './Partners';
45
+ export * from './Prepacks';
46
+ export * from './ProjectTasks';
12
47
  export * from './Projects';
48
+ export * from './Rates';
49
+ export * from './ReasonCodes';
50
+ export * from './ReturnAddresses';
51
+ export * from './RuleDismissals';
52
+ export * from './Rules';
53
+ export * from './Scancodes';
54
+ export * from './SerialNumbers';
13
55
  export * from './ShipnoticeItems';
14
56
  export * from './Shipnotices';
57
+ export * from './ShippingAliases';
58
+ export * from './ShippingBlacklistedMethods';
59
+ export * from './ShippingMethodMarkups';
60
+ export * from './ShippingMethods';
61
+ export * from './Shops';
15
62
  export * from './Simulate';
63
+ export * from './Stats';
64
+ export * from './SurchargeMarkups';
65
+ export * from './TemplateTypes';
16
66
  export * from './Templates';
67
+ export * from './Transactions';
68
+ export * from './TransportationMarkups';
69
+ export * from './Users';
70
+ export * from './Utilities';
71
+ export * from './WarehouseFeatures';
72
+ export * from './Warehouses';
73
+ export * from './Wholesales';
17
74
  export * from './data-contracts';
18
75
  export * from './http-client';
package/dist/index.d.ts CHANGED
@@ -1 +1,4 @@
1
1
  export * from './generated';
2
+ export * from './mocks';
3
+ export * from './constants';
4
+ export * from './utils';
@@ -0,0 +1,2 @@
1
+ import { APIV2EntitiesCustomer } from './../generated';
2
+ export declare const customerMock: APIV2EntitiesCustomer;
@@ -0,0 +1,4 @@
1
+ export * from './customer';
2
+ export * from './nav';
3
+ export * from './user';
4
+ export * from './warehouse';
@@ -0,0 +1,2 @@
1
+ import { APIV2EntitiesNav } from './../generated';
2
+ export declare const navMock: APIV2EntitiesNav;
@@ -0,0 +1,2 @@
1
+ import { APIV2EntitiesUser } from './../generated';
2
+ export declare const userMock: APIV2EntitiesUser;
@@ -0,0 +1,2 @@
1
+ import { APIV2EntitiesWarehouse } from './../generated';
2
+ export declare const warehouseMock: APIV2EntitiesWarehouse;
@@ -0,0 +1,2 @@
1
+ import { AxiosError } from 'axios';
2
+ export declare function errorHandler(error: AxiosError): string[];
@@ -0,0 +1,9 @@
1
+ export * from './errorHandler';
2
+ export * from './nav';
3
+ export * from './orderBatch';
4
+ export * from './orders';
5
+ export * from './pusher';
6
+ export * from './rules';
7
+ export * from './user';
8
+ export * from './utilities';
9
+ export * from './warehouse';
@@ -0,0 +1,9 @@
1
+ import { searchTypes } from './../constants';
2
+ import { APIV2EntitiesNav, APIV2EntitiesNavItem } from './../generated';
3
+ export declare function getNavDataUrlBySlug(navItems: APIV2EntitiesNavItem[], slug: string): string | null;
4
+ export declare function getSearchUrl(navData: APIV2EntitiesNav, searchType: searchTypes): string | null;
5
+ export declare function getLogoutUrl(navData: APIV2EntitiesNav): string | null;
6
+ export declare function getLocaleUrl(navData: APIV2EntitiesNav): string | null;
7
+ export declare function getAllWarehousesUrl(navData: APIV2EntitiesNav): string | null;
8
+ export declare function getPartnerBillingUrl(navData: APIV2EntitiesNav): string | null;
9
+ export declare function getAllCustomersUrl(navData: APIV2EntitiesNav): string | null;
@@ -0,0 +1,19 @@
1
+ import { HttpClient } from '../generated';
2
+ export interface ApiV21OrderBatchesIdPackedPercentResult {
3
+ result?: number;
4
+ }
5
+ export interface ApiV21OrderBatchIdPublicPDFURLResult {
6
+ result: string | null;
7
+ }
8
+ export interface OrderBatchSummary {
9
+ prepacked: boolean;
10
+ labels_scheduled: boolean;
11
+ any_processing_orders: boolean;
12
+ }
13
+ export declare const getApiV21OrderBatchesIdPackedPercent: (client: HttpClient, orderBatchId: number) => Promise<ApiV21OrderBatchesIdPackedPercentResult>;
14
+ export declare const getApiV21OrderBatchesIdSummary: (client: HttpClient, orderBatchId: number) => Promise<OrderBatchSummary>;
15
+ export declare const getApiV21OrderBatchesIdPublicPackingslipUrl: (client: HttpClient, orderBatchId: number) => Promise<ApiV21OrderBatchIdPublicPDFURLResult>;
16
+ export declare const getApiV21OrderBatchesIdPublicPicklistUrl: (client: HttpClient, orderBatchId: number) => Promise<ApiV21OrderBatchIdPublicPDFURLResult>;
17
+ export declare const putApiV21OrderBatchesIdReleaseUnshipped: (client: HttpClient, orderBatchId: number) => Promise<void>;
18
+ export declare const putApiV21OrderBatchesIdForcePick: (client: HttpClient, orderBatchId: number) => Promise<void>;
19
+ export declare const putApiV21OrderBatchesIdbuyLabels: (client: HttpClient, orderBatchId: number) => Promise<void>;
@@ -0,0 +1,54 @@
1
+ import { APIV21EntitiesItem, APIV21EntitiesOrderItem, HttpClient } from './../generated';
2
+ import { ApiV21EntitiesPackingRuleWithSuggestedItem } from './rules';
3
+ export interface ApiV21OrdersIdPackItemArgs {
4
+ args: {
5
+ scancode?: string;
6
+ quantity?: number;
7
+ packaging?: boolean;
8
+ passthrough_response: boolean;
9
+ set_contents_label_printed?: boolean;
10
+ flow: string;
11
+ };
12
+ }
13
+ export interface ApiV21OrdersIdPackItemResult {
14
+ result: {
15
+ order_item?: APIV21EntitiesOrderItem;
16
+ item?: APIV21EntitiesItem;
17
+ };
18
+ }
19
+ export interface ApiV21OrderIdSuggestedRulesResult {
20
+ result: ApiV21EntitiesPackingRuleWithSuggestedItem[] | null;
21
+ }
22
+ export interface ApiV21OrderIdCommercialInvoiceResult {
23
+ result: {
24
+ print_commercial_invoice: boolean;
25
+ url: string | null;
26
+ };
27
+ }
28
+ export interface ApiV21OrderIdPublicPackingslipResult {
29
+ result: string | null;
30
+ }
31
+ export interface ApiV21OrderIdPublicOrderInsertResult {
32
+ result: string | null;
33
+ }
34
+ export interface ApiV21OrderIdHasOuterPackagingResult {
35
+ result: boolean;
36
+ }
37
+ export interface ApiV21OrderIdToteCodeResult {
38
+ result: string | null;
39
+ }
40
+ export interface ApiV21OrderIdHasGlobalEResult {
41
+ result: boolean;
42
+ }
43
+ export interface APIV21OrderIdSkipsPackingslipResult {
44
+ result: boolean;
45
+ }
46
+ export declare const putApiV21OrdersIdPackItem: (client: HttpClient, orderId: number, args: ApiV21OrdersIdPackItemArgs) => Promise<ApiV21OrdersIdPackItemResult>;
47
+ export declare const getApiV21OrdersIdPackingRulesWithSuggestedItems: (client: HttpClient, orderId: number) => Promise<ApiV21OrderIdSuggestedRulesResult>;
48
+ export declare const getApiV21OrdersIdCommercialInvoice: (client: HttpClient, orderId: number) => Promise<ApiV21OrderIdCommercialInvoiceResult>;
49
+ export declare const getApiV21OrdersIdHasGlobalEInvoice: (client: HttpClient, orderId: number) => Promise<ApiV21OrderIdHasGlobalEResult>;
50
+ export declare const getApiV21OrdersIdSkipPackingslip: (client: HttpClient, orderId: number) => Promise<APIV21OrderIdSkipsPackingslipResult>;
51
+ export declare const getApiV21OrdersIdPublicPackingslipUrl: (client: HttpClient, orderId: number) => Promise<ApiV21OrderIdPublicPackingslipResult>;
52
+ export declare const getApiV21OrdersIdPublicInsertUrl: (client: HttpClient, orderId: number) => Promise<ApiV21OrderIdPublicOrderInsertResult>;
53
+ export declare const getApiV21OrdersIdHasOuterPackaging: (client: HttpClient, orderId: number) => Promise<ApiV21OrderIdHasOuterPackagingResult>;
54
+ export declare const getApiV21OrdersIdToteCode: (client: HttpClient, orderId: number) => Promise<ApiV21OrderIdToteCodeResult>;
@@ -0,0 +1,25 @@
1
+ import type Pusher from 'pusher-js';
2
+ import type { Channel } from 'pusher-js';
3
+ export interface PusherResponse {
4
+ message: string;
5
+ }
6
+ export interface PusherBroadcast {
7
+ id: string;
8
+ title: string;
9
+ body: string;
10
+ variant?: string;
11
+ }
12
+ export declare enum PusherBatchResponses {
13
+ death = "death",
14
+ allJobsComplete = "allJobsComplete",
15
+ allJobsSucceeded = "allJobsSucceeded",
16
+ singleJobFailed = "singleJobFailed",
17
+ singleJobSucceeded = "singleJobSucceeded"
18
+ }
19
+ export declare function getUserChannelName(userId: number, pusherPrefix?: string): string;
20
+ export declare function subscribe<R = unknown>(pusherInstance: Pusher, channelName: string, callback?: (response: R) => void): Channel;
21
+ export declare function unsubscribe(pusherInstance: Pusher, channelName: string): void;
22
+ export declare function waitForBatch(pusherInstance: Pusher, batchChannelName: string): Promise<void>;
23
+ export declare function subscribeToUserChannel(pusherInstance: Pusher, userId: number, callback: (response: PusherResponse) => void, pusherPrefix?: string): Channel;
24
+ export declare function unsubscribeFromUserChannel(pusherInstance: Pusher, userId: number, pusherPrefix?: string): void;
25
+ export declare function getBroadcastFromPusherResponse({ message }: PusherResponse): PusherBroadcast;
@@ -0,0 +1,8 @@
1
+ import { APIV21EntitiesItem, APIV21EntitiesRule } from './../generated';
2
+ export interface ApiV21EntitiesPackingRuleWithSuggestedItem extends APIV21EntitiesRule {
3
+ rule_dismissal_id?: number;
4
+ item_id?: number;
5
+ state: string;
6
+ quantity: number;
7
+ suggested_item: APIV21EntitiesItem;
8
+ }
@@ -0,0 +1,19 @@
1
+ import { APIV21EntitiesCustomer, APIV21EntitiesUser, APIV21EntitiesWarehouse, HttpClient, RequestParams } from './../generated';
2
+ export interface UserSummary {
3
+ entity: APIV21EntitiesUser;
4
+ current_customer: APIV21EntitiesCustomer | null;
5
+ current_warehouse: APIV21EntitiesWarehouse | null;
6
+ }
7
+ export declare const getUserSummary: (client: HttpClient, userId: number, params?: RequestParams) => Promise<UserSummary>;
8
+ export interface SetUserCustomerParams {
9
+ userId: number;
10
+ customerId: number;
11
+ }
12
+ export declare const setUserCustomer: (client: HttpClient, { userId, customerId }: SetUserCustomerParams, params?: RequestParams) => Promise<void>;
13
+ export declare const unsetUserCustomer: (client: HttpClient, userId: number, params?: RequestParams) => Promise<void>;
14
+ export interface SetUserWarehouseParams {
15
+ userId: number;
16
+ warehouseId: number;
17
+ }
18
+ export declare const setUserWarehouse: (client: HttpClient, { userId, warehouseId }: SetUserWarehouseParams, params?: RequestParams) => Promise<void>;
19
+ export declare const unsetUserWarehouse: (client: HttpClient, userId: number, params?: RequestParams) => Promise<void>;
@@ -0,0 +1,8 @@
1
+ import { HttpClient } from '../generated';
2
+ export interface ApiV21PublicUrlParams {
3
+ url: string;
4
+ }
5
+ export interface ApiV21PublicUrlResult {
6
+ result?: string;
7
+ }
8
+ export declare const postApiV21UtilsPublicUrl: (client: HttpClient, params: ApiV21PublicUrlParams) => Promise<ApiV21PublicUrlResult>;
@@ -0,0 +1,26 @@
1
+ import { HttpClient, ApiV21EntitiesLocationRole, APIV2EntitiesSidekiqBatch } from './../generated';
2
+ export interface CallAsyncProcessShelfToShelfTransferParams {
3
+ args: {
4
+ source_shelf: string;
5
+ destination_shelf: string;
6
+ user_id: number;
7
+ warehouse_id: number;
8
+ convert_to_role?: ApiV21EntitiesLocationRole;
9
+ quantity?: number;
10
+ item_id?: number;
11
+ loc_name_change?: boolean;
12
+ raise_errors: boolean;
13
+ initiator?: string;
14
+ };
15
+ retry?: number | false;
16
+ }
17
+ export declare const putProcessShelfToShelfTransfer: (client: HttpClient, params: CallAsyncProcessShelfToShelfTransferParams) => Promise<APIV2EntitiesSidekiqBatch>;
18
+ export interface CallTraitOpenBatchesAgainstShelfParams {
19
+ args: {
20
+ shelf_name: string;
21
+ };
22
+ }
23
+ export interface ApiV21WarehousesIdOpenBatchesAgainstShelfResult {
24
+ result?: string[];
25
+ }
26
+ export declare const getWarehouseIdOpenBatchesAgainstShelf: (client: HttpClient, warehouseId: number, params: CallTraitOpenBatchesAgainstShelfParams) => Promise<ApiV21WarehousesIdOpenBatchesAgainstShelfResult>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whiplashmerch/whiplash-api-client",
3
- "version": "0.4.76",
3
+ "version": "0.4.78",
4
4
  "description": "",
5
5
  "devDependencies": {},
6
6
  "scripts": {