@spscommerce/asst-api 4.2.1 → 4.2.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 (90) hide show
  1. package/dist/{chunk-2ETQHIXC.js → chunk-4RARACQK.js} +1 -1
  2. package/dist/{chunk-LCK4AEWB.js → chunk-BVCWT7AV.js} +1 -1
  3. package/dist/{chunk-HHJDDPFR.js → chunk-MH76527N.js} +7 -1
  4. package/dist/index.cjs +8 -1
  5. package/dist/index.d.cts +2 -2
  6. package/dist/index.d.ts +2 -2
  7. package/dist/index.js +7 -3
  8. package/dist/msw.cjs +2 -1
  9. package/dist/msw.d.cts +4 -4
  10. package/dist/msw.d.ts +4 -4
  11. package/dist/msw.js +2 -2
  12. package/dist/{zod-rs54beS2.d.cts → zod-BRmUARvM.d.cts} +68 -65
  13. package/dist/{zod-DyBGOUbG.d.ts → zod-CFNzalN6.d.ts} +68 -65
  14. package/dist/zod.cjs +4 -1
  15. package/dist/zod.d.cts +1 -1
  16. package/dist/zod.d.ts +1 -1
  17. package/dist/zod.js +4 -2
  18. package/package.json +1 -1
  19. package/dist/CompanyBriefByOrg-57oGCtjK.d.ts +0 -3427
  20. package/dist/CompanyBriefByOrg-LTdsUKm4.d.ts +0 -3427
  21. package/dist/CompanyBriefByOrg-itus4RMD.d.cts +0 -131
  22. package/dist/CompanyBriefByOrg-itus4RMD.d.ts +0 -131
  23. package/dist/chunk-27XV7TS2.js +0 -522
  24. package/dist/chunk-2VJS5KPH.js +0 -5182
  25. package/dist/chunk-2W3LZ4AO.js +0 -513
  26. package/dist/chunk-3XNXQYIB.js +0 -521
  27. package/dist/chunk-4C475UZX.js +0 -5164
  28. package/dist/chunk-5AROSGQB.js +0 -5034
  29. package/dist/chunk-7F5CQRS2.js +0 -567
  30. package/dist/chunk-7OEXJIWW.js +0 -565
  31. package/dist/chunk-A22SEYVL.js +0 -530
  32. package/dist/chunk-AH5MG2WF.js +0 -5040
  33. package/dist/chunk-BDSSH6MN.js +0 -574
  34. package/dist/chunk-BFIQVABZ.js +0 -528
  35. package/dist/chunk-BJTO4CRW.js +0 -558
  36. package/dist/chunk-BLMS4KUD.js +0 -5164
  37. package/dist/chunk-BTNVA4NZ.js +0 -568
  38. package/dist/chunk-CNQTNX3M.js +0 -567
  39. package/dist/chunk-CUVSWUIQ.js +0 -5040
  40. package/dist/chunk-DP2ZMQG5.js +0 -4881
  41. package/dist/chunk-EMBJNPTB.js +0 -5040
  42. package/dist/chunk-EO2UMCWY.js +0 -574
  43. package/dist/chunk-FTB465WY.js +0 -575
  44. package/dist/chunk-G6A4EVAL.js +0 -528
  45. package/dist/chunk-GDARBI5R.js +0 -5185
  46. package/dist/chunk-HY2SRD5L.js +0 -5003
  47. package/dist/chunk-ISQ3LQRI.js +0 -565
  48. package/dist/chunk-KKX3CXHP.js +0 -558
  49. package/dist/chunk-LJVJ4SYE.js +0 -568
  50. package/dist/chunk-LYMA4XGG.js +0 -5181
  51. package/dist/chunk-MLAU3LFL.js +0 -527
  52. package/dist/chunk-MQREZR54.js +0 -5164
  53. package/dist/chunk-N4A4BVKV.js +0 -5163
  54. package/dist/chunk-QVEV57JA.js +0 -5185
  55. package/dist/chunk-SI7CWAHC.js +0 -574
  56. package/dist/chunk-SK6U2JDX.js +0 -566
  57. package/dist/chunk-SQBB5K5J.js +0 -574
  58. package/dist/chunk-TQ2IQDSM.js +0 -568
  59. package/dist/chunk-TTT6PM27.js +0 -558
  60. package/dist/chunk-VFMKDLXO.js +0 -570
  61. package/dist/chunk-VKPQOGVS.js +0 -565
  62. package/dist/chunk-VLLI4AYA.js +0 -520
  63. package/dist/chunk-VNFLJ5FV.js +0 -530
  64. package/dist/chunk-WNCDQJEM.js +0 -5034
  65. package/dist/chunk-XYZVRJF3.js +0 -5162
  66. package/dist/chunk-YJCJB4OT.js +0 -79
  67. package/dist/chunk-YJMQ4PGM.js +0 -559
  68. package/dist/chunk-Z6PXGHNC.js +0 -570
  69. package/dist/chunk-ZQ32XEVW.js +0 -79
  70. package/dist/chunk-ZXXDLGW7.js +0 -513
  71. package/dist/index-B8ovDTs5.d.cts +0 -14
  72. package/dist/index-BFKgtuVI.d.ts +0 -14
  73. package/dist/index-Zz-6wNSh.d.ts +0 -106
  74. package/dist/index-fgr_c5Wj.d.ts +0 -106
  75. package/dist/zod-6gU8y6oS.d.cts +0 -6712
  76. package/dist/zod-B4sIVoVX.d.ts +0 -6712
  77. package/dist/zod-BI81QHVK.d.ts +0 -6715
  78. package/dist/zod-BUCQsGOm.d.ts +0 -6712
  79. package/dist/zod-BdDmL7rg.d.ts +0 -6718
  80. package/dist/zod-Bl_5j5Nx.d.ts +0 -6712
  81. package/dist/zod-Bxu34bbp.d.ts +0 -6718
  82. package/dist/zod-C4kEHhO8.d.cts +0 -6718
  83. package/dist/zod-C5pRCHei.d.ts +0 -6712
  84. package/dist/zod-CIacR1Kf.d.cts +0 -6712
  85. package/dist/zod-DBbdP-KT.d.cts +0 -6718
  86. package/dist/zod-DzhoVlw_.d.cts +0 -6712
  87. package/dist/zod-FdtLO2-F.d.cts +0 -6715
  88. package/dist/zod-NE2xXWlK.d.ts +0 -3416
  89. package/dist/zod-lSiFMzqK.d.cts +0 -6712
  90. package/dist/zod-zxqlYYMG.d.ts +0 -3416
@@ -1,131 +0,0 @@
1
- import * as ky from 'ky';
2
- import { Options } from 'ky';
3
- import { z } from 'zod';
4
-
5
- declare const baseUrlsSchema: z.ZodObject<{
6
- local: z.ZodLiteral<"https://localhost:8443/">;
7
- test: z.ZodLiteral<"https://integration.api.spscommerce.com/assortment/gateway/">;
8
- prod: z.ZodLiteral<"https://api.spscommerce.com/assortment/gateway/">;
9
- }, "strip", z.ZodTypeAny, {
10
- local: "https://localhost:8443/";
11
- test: "https://integration.api.spscommerce.com/assortment/gateway/";
12
- prod: "https://api.spscommerce.com/assortment/gateway/";
13
- }, {
14
- local: "https://localhost:8443/";
15
- test: "https://integration.api.spscommerce.com/assortment/gateway/";
16
- prod: "https://api.spscommerce.com/assortment/gateway/";
17
- }>;
18
- type BaseUrls = z.infer<typeof baseUrlsSchema>;
19
- declare const BASE_URLS: BaseUrls;
20
- declare const envSchema: z.ZodEnum<["local", "test", "prod"]>;
21
- type Env = z.infer<typeof envSchema>;
22
- type AsstUrl = BaseUrls[Env];
23
- interface AsstClientOptions extends Options {
24
- prefixUrl?: AsstUrl;
25
- }
26
- type Input = string | URL | Request;
27
- type Listener = (config: AsstClientOptions) => void;
28
- declare class AsstClient {
29
- #private;
30
- constructor(options?: AsstClientOptions);
31
- updateConfig(options: AsstClientOptions): void;
32
- getBaseUrl(): AsstUrl;
33
- /**
34
- * Subscribe to config changes. The callback will be immediately invoked with the current config.
35
- * @param subscriptionCallback Function that will be called with the new config every time it is changed
36
- * @returns Function to unsubscribe to config changes
37
- */
38
- subscribeToConfigChange(listener: Listener): () => boolean;
39
- get(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
40
- post(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
41
- put(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
42
- patch(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
43
- head(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
44
- delete(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
45
- }
46
-
47
- declare const attributeValidValuesSchema: z.ZodObject<{
48
- value: z.ZodString;
49
- isDefault: z.ZodBoolean;
50
- locale: z.ZodString;
51
- createdBy: z.ZodString;
52
- createdDate: z.ZodNumber;
53
- modifiedDate: z.ZodNumber;
54
- modifiedBy: z.ZodString;
55
- attributeId: z.ZodNumber;
56
- attrValueId: z.ZodNumber;
57
- attrKeyPair: z.ZodString;
58
- }, "strip", z.ZodTypeAny, {
59
- value: string;
60
- createdDate: number;
61
- createdBy: string;
62
- modifiedDate: number;
63
- modifiedBy: string;
64
- attributeId: number;
65
- isDefault: boolean;
66
- locale: string;
67
- attrKeyPair: string;
68
- attrValueId: number;
69
- }, {
70
- value: string;
71
- createdDate: number;
72
- createdBy: string;
73
- modifiedDate: number;
74
- modifiedBy: string;
75
- attributeId: number;
76
- isDefault: boolean;
77
- locale: string;
78
- attrKeyPair: string;
79
- attrValueId: number;
80
- }>;
81
- type AttributeValidValues = z.infer<typeof attributeValidValuesSchema>;
82
-
83
- declare const spsItemIdResponseSchema: z.ZodObject<{
84
- id: z.ZodString;
85
- ref: z.ZodString;
86
- }, "strip", z.ZodTypeAny, {
87
- id: string;
88
- ref: string;
89
- }, {
90
- id: string;
91
- ref: string;
92
- }>;
93
- type SpsItemIdResponse = z.infer<typeof spsItemIdResponseSchema>;
94
-
95
- declare const companyBriefByOrgSchema: z.ZodObject<{
96
- companyId: z.ZodNumber;
97
- name: z.ZodString;
98
- orgId: z.ZodString;
99
- companyType: z.ZodObject<{
100
- type: z.ZodEnum<["SUPPLIER", "RETAILER"]>;
101
- display: z.ZodEnum<["SUPPLIER", "RETAILER"]>;
102
- }, "strip", z.ZodTypeAny, {
103
- type: "SUPPLIER" | "RETAILER";
104
- display: "SUPPLIER" | "RETAILER";
105
- }, {
106
- type: "SUPPLIER" | "RETAILER";
107
- display: "SUPPLIER" | "RETAILER";
108
- }>;
109
- dc4Id: z.ZodNumber;
110
- }, "strip", z.ZodTypeAny, {
111
- name: string;
112
- orgId: string;
113
- companyId: number;
114
- companyType: {
115
- type: "SUPPLIER" | "RETAILER";
116
- display: "SUPPLIER" | "RETAILER";
117
- };
118
- dc4Id: number;
119
- }, {
120
- name: string;
121
- orgId: string;
122
- companyId: number;
123
- companyType: {
124
- type: "SUPPLIER" | "RETAILER";
125
- display: "SUPPLIER" | "RETAILER";
126
- };
127
- dc4Id: number;
128
- }>;
129
- type CompanyBriefByOrg = z.infer<typeof companyBriefByOrgSchema>;
130
-
131
- export { AsstClient as A, BASE_URLS as B, type CompanyBriefByOrg as C, type Env as E, type SpsItemIdResponse as S, type AttributeValidValues as a, type AsstClientOptions as b, type AsstUrl as c, attributeValidValuesSchema as d, envSchema as e, companyBriefByOrgSchema as f, spsItemIdResponseSchema as s };
@@ -1,131 +0,0 @@
1
- import * as ky from 'ky';
2
- import { Options } from 'ky';
3
- import { z } from 'zod';
4
-
5
- declare const baseUrlsSchema: z.ZodObject<{
6
- local: z.ZodLiteral<"https://localhost:8443/">;
7
- test: z.ZodLiteral<"https://integration.api.spscommerce.com/assortment/gateway/">;
8
- prod: z.ZodLiteral<"https://api.spscommerce.com/assortment/gateway/">;
9
- }, "strip", z.ZodTypeAny, {
10
- local: "https://localhost:8443/";
11
- test: "https://integration.api.spscommerce.com/assortment/gateway/";
12
- prod: "https://api.spscommerce.com/assortment/gateway/";
13
- }, {
14
- local: "https://localhost:8443/";
15
- test: "https://integration.api.spscommerce.com/assortment/gateway/";
16
- prod: "https://api.spscommerce.com/assortment/gateway/";
17
- }>;
18
- type BaseUrls = z.infer<typeof baseUrlsSchema>;
19
- declare const BASE_URLS: BaseUrls;
20
- declare const envSchema: z.ZodEnum<["local", "test", "prod"]>;
21
- type Env = z.infer<typeof envSchema>;
22
- type AsstUrl = BaseUrls[Env];
23
- interface AsstClientOptions extends Options {
24
- prefixUrl?: AsstUrl;
25
- }
26
- type Input = string | URL | Request;
27
- type Listener = (config: AsstClientOptions) => void;
28
- declare class AsstClient {
29
- #private;
30
- constructor(options?: AsstClientOptions);
31
- updateConfig(options: AsstClientOptions): void;
32
- getBaseUrl(): AsstUrl;
33
- /**
34
- * Subscribe to config changes. The callback will be immediately invoked with the current config.
35
- * @param subscriptionCallback Function that will be called with the new config every time it is changed
36
- * @returns Function to unsubscribe to config changes
37
- */
38
- subscribeToConfigChange(listener: Listener): () => boolean;
39
- get(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
40
- post(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
41
- put(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
42
- patch(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
43
- head(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
44
- delete(url: Input, options?: AsstClientOptions): ky.ResponsePromise;
45
- }
46
-
47
- declare const attributeValidValuesSchema: z.ZodObject<{
48
- value: z.ZodString;
49
- isDefault: z.ZodBoolean;
50
- locale: z.ZodString;
51
- createdBy: z.ZodString;
52
- createdDate: z.ZodNumber;
53
- modifiedDate: z.ZodNumber;
54
- modifiedBy: z.ZodString;
55
- attributeId: z.ZodNumber;
56
- attrValueId: z.ZodNumber;
57
- attrKeyPair: z.ZodString;
58
- }, "strip", z.ZodTypeAny, {
59
- value: string;
60
- createdDate: number;
61
- createdBy: string;
62
- modifiedDate: number;
63
- modifiedBy: string;
64
- attributeId: number;
65
- isDefault: boolean;
66
- locale: string;
67
- attrKeyPair: string;
68
- attrValueId: number;
69
- }, {
70
- value: string;
71
- createdDate: number;
72
- createdBy: string;
73
- modifiedDate: number;
74
- modifiedBy: string;
75
- attributeId: number;
76
- isDefault: boolean;
77
- locale: string;
78
- attrKeyPair: string;
79
- attrValueId: number;
80
- }>;
81
- type AttributeValidValues = z.infer<typeof attributeValidValuesSchema>;
82
-
83
- declare const spsItemIdResponseSchema: z.ZodObject<{
84
- id: z.ZodString;
85
- ref: z.ZodString;
86
- }, "strip", z.ZodTypeAny, {
87
- id: string;
88
- ref: string;
89
- }, {
90
- id: string;
91
- ref: string;
92
- }>;
93
- type SpsItemIdResponse = z.infer<typeof spsItemIdResponseSchema>;
94
-
95
- declare const companyBriefByOrgSchema: z.ZodObject<{
96
- companyId: z.ZodNumber;
97
- name: z.ZodString;
98
- orgId: z.ZodString;
99
- companyType: z.ZodObject<{
100
- type: z.ZodEnum<["SUPPLIER", "RETAILER"]>;
101
- display: z.ZodEnum<["SUPPLIER", "RETAILER"]>;
102
- }, "strip", z.ZodTypeAny, {
103
- type: "SUPPLIER" | "RETAILER";
104
- display: "SUPPLIER" | "RETAILER";
105
- }, {
106
- type: "SUPPLIER" | "RETAILER";
107
- display: "SUPPLIER" | "RETAILER";
108
- }>;
109
- dc4Id: z.ZodNumber;
110
- }, "strip", z.ZodTypeAny, {
111
- name: string;
112
- orgId: string;
113
- companyId: number;
114
- companyType: {
115
- type: "SUPPLIER" | "RETAILER";
116
- display: "SUPPLIER" | "RETAILER";
117
- };
118
- dc4Id: number;
119
- }, {
120
- name: string;
121
- orgId: string;
122
- companyId: number;
123
- companyType: {
124
- type: "SUPPLIER" | "RETAILER";
125
- display: "SUPPLIER" | "RETAILER";
126
- };
127
- dc4Id: number;
128
- }>;
129
- type CompanyBriefByOrg = z.infer<typeof companyBriefByOrgSchema>;
130
-
131
- export { AsstClient as A, BASE_URLS as B, type CompanyBriefByOrg as C, type Env as E, type SpsItemIdResponse as S, type AttributeValidValues as a, type AsstClientOptions as b, type AsstUrl as c, attributeValidValuesSchema as d, envSchema as e, companyBriefByOrgSchema as f, spsItemIdResponseSchema as s };