@compassdigital/sdk.typescript 4.139.0 → 4.140.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.
- package/lib/index.d.ts +130 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +149 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/catalog.d.ts +202 -0
- package/lib/interface/catalog.d.ts.map +1 -0
- package/lib/interface/catalog.js +5 -0
- package/lib/interface/catalog.js.map +1 -0
- package/manifest.json +4 -0
- package/package.json +1 -1
- package/src/index.ts +365 -0
- package/src/interface/catalog.ts +325 -0
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
3
|
+
|
|
4
|
+
import { RequestQuery, BaseRequest } from './util';
|
|
5
|
+
|
|
6
|
+
export interface CatalogResponseDTO {
|
|
7
|
+
id: number;
|
|
8
|
+
parent_id: number | null;
|
|
9
|
+
name: string;
|
|
10
|
+
display: Record<string, any>;
|
|
11
|
+
meta: Record<string, any> | null;
|
|
12
|
+
items: Record<string, any> | null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type CatalogItemResponseDTO = Record<string, any>;
|
|
16
|
+
|
|
17
|
+
export interface PaginationQueryDTO {
|
|
18
|
+
// Page number
|
|
19
|
+
page?: number;
|
|
20
|
+
// Number of items per page
|
|
21
|
+
limit?: number;
|
|
22
|
+
// Field to sort by
|
|
23
|
+
sort_by?: string;
|
|
24
|
+
// Sort order
|
|
25
|
+
order?: 'ASC' | 'DESC';
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type FilterQueryDTO = Record<string, any>;
|
|
29
|
+
|
|
30
|
+
export interface ListParamsDTO {
|
|
31
|
+
pagination?: PaginationQueryDTO;
|
|
32
|
+
filter?: FilterQueryDTO;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type CatalogItemsListResponseDTO = Record<string, any>;
|
|
36
|
+
|
|
37
|
+
export interface SearchConditionDTO {
|
|
38
|
+
// Contains search term
|
|
39
|
+
contains?: string;
|
|
40
|
+
// Exact match
|
|
41
|
+
equals?: Record<string, any>;
|
|
42
|
+
// Value greater than this
|
|
43
|
+
moreThan?: Record<string, any>;
|
|
44
|
+
// Value less than this
|
|
45
|
+
lessThan?: Record<string, any>;
|
|
46
|
+
// Negate condition (e.g., not equal). Accepts: `true` (boolean), `{ equals: 5 }` (object), `"sample string"` (string), or `123` (number).
|
|
47
|
+
not?: Record<string, any>;
|
|
48
|
+
// In the list of values
|
|
49
|
+
in?: string[];
|
|
50
|
+
// Array contains these values
|
|
51
|
+
arrayContains?: string[];
|
|
52
|
+
// Value greater than or equal to this
|
|
53
|
+
moreThanOrEqual?: Record<string, any>;
|
|
54
|
+
// Value less than or equal to this
|
|
55
|
+
lessThanOrEqual?: Record<string, any>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type BaseItemDTO = Record<string, any>;
|
|
59
|
+
|
|
60
|
+
// GET /catalog/status - Get the status of the Catalog service
|
|
61
|
+
|
|
62
|
+
export interface GetCatalogStatusQuery {
|
|
63
|
+
// Graphql query string
|
|
64
|
+
_query?: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type GetCatalogStatusResponse = {};
|
|
68
|
+
|
|
69
|
+
export interface GetCatalogStatusRequest extends BaseRequest, RequestQuery<GetCatalogStatusQuery> {}
|
|
70
|
+
|
|
71
|
+
// GET /catalog/status/connections - Get the status of Catalog database connections
|
|
72
|
+
|
|
73
|
+
export interface GetCatalogConnectionsStatusQuery {
|
|
74
|
+
// Graphql query string
|
|
75
|
+
_query?: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type GetCatalogConnectionsStatusResponse = {};
|
|
79
|
+
|
|
80
|
+
export interface GetCatalogConnectionsStatusRequest
|
|
81
|
+
extends BaseRequest,
|
|
82
|
+
RequestQuery<GetCatalogConnectionsStatusQuery> {}
|
|
83
|
+
|
|
84
|
+
// POST /catalog/v1/catalog - Create a new catalog
|
|
85
|
+
|
|
86
|
+
export interface PostCatalogBody {
|
|
87
|
+
name?: string;
|
|
88
|
+
display?: Record<string, any>;
|
|
89
|
+
parent_id?: number | null;
|
|
90
|
+
meta?: Record<string, any>;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export type PostCatalogResponse = CatalogResponseDTO;
|
|
94
|
+
|
|
95
|
+
export interface PostCatalogRequest extends BaseRequest {
|
|
96
|
+
body: PostCatalogBody;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// PATCH /catalog/v1/catalog/{id} - Update a catalog
|
|
100
|
+
|
|
101
|
+
export interface PatchCatalogPath {
|
|
102
|
+
id: number;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface PatchCatalogBody {
|
|
106
|
+
name?: string | null;
|
|
107
|
+
display?: Record<string, any> | null;
|
|
108
|
+
parent_id?: number | null;
|
|
109
|
+
meta?: Record<string, any> | null;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export type PatchCatalogResponse = CatalogResponseDTO;
|
|
113
|
+
|
|
114
|
+
export interface PatchCatalogRequest extends BaseRequest, PatchCatalogPath {
|
|
115
|
+
body: PatchCatalogBody;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// GET /catalog/v1/catalog/{id} - Get a catalog
|
|
119
|
+
|
|
120
|
+
export interface GetCatalogPath {
|
|
121
|
+
id: number;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface GetCatalogQuery {
|
|
125
|
+
// Graphql query string
|
|
126
|
+
_query?: string;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export type GetCatalogResponse = CatalogResponseDTO;
|
|
130
|
+
|
|
131
|
+
export interface GetCatalogRequest
|
|
132
|
+
extends BaseRequest,
|
|
133
|
+
RequestQuery<GetCatalogQuery>,
|
|
134
|
+
GetCatalogPath {}
|
|
135
|
+
|
|
136
|
+
// DELETE /catalog/v1/catalog/{id} - Delete a catalog
|
|
137
|
+
|
|
138
|
+
export interface DeleteCatalogPath {
|
|
139
|
+
id: number;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export type DeleteCatalogResponse = CatalogResponseDTO;
|
|
143
|
+
|
|
144
|
+
export interface DeleteCatalogRequest extends BaseRequest, DeleteCatalogPath {}
|
|
145
|
+
|
|
146
|
+
// POST /catalog/v1/catalog/{id}/item - Create a new catalog item
|
|
147
|
+
|
|
148
|
+
export interface PostCatalogItemPath {
|
|
149
|
+
id: number;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface PostCatalogItemBody {
|
|
153
|
+
base_item_id?: string;
|
|
154
|
+
name?: string;
|
|
155
|
+
catalog_item_id?: number | null;
|
|
156
|
+
label?: string | null;
|
|
157
|
+
description?: string | null;
|
|
158
|
+
price?: number | null;
|
|
159
|
+
overrides?: Record<string, any> | null;
|
|
160
|
+
options?: Record<string, any> | null;
|
|
161
|
+
meta?: Record<string, any> | null;
|
|
162
|
+
is_visible?: boolean | null;
|
|
163
|
+
is_out_of_stock?: boolean | null;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export type PostCatalogItemResponse = CatalogItemResponseDTO;
|
|
167
|
+
|
|
168
|
+
export interface PostCatalogItemRequest extends BaseRequest, PostCatalogItemPath {
|
|
169
|
+
body: PostCatalogItemBody;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// POST /catalog/v1/catalog/{id}/items/bulk - Bulk create catalog items
|
|
173
|
+
|
|
174
|
+
export interface PostCatalogItemsBulkPath {
|
|
175
|
+
id: number;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export type PostCatalogItemsBulkBody = string[];
|
|
179
|
+
|
|
180
|
+
export type PostCatalogItemsBulkResponse = CatalogItemResponseDTO[];
|
|
181
|
+
|
|
182
|
+
export interface PostCatalogItemsBulkRequest extends BaseRequest, PostCatalogItemsBulkPath {
|
|
183
|
+
body: PostCatalogItemsBulkBody;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// PATCH /catalog/v1/catalog/{catalog_id}/item/{id} - Update a catalog item
|
|
187
|
+
|
|
188
|
+
export interface PatchCatalogItemPath {
|
|
189
|
+
catalog_id: number;
|
|
190
|
+
id: number;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface PatchCatalogItemBody {
|
|
194
|
+
base_item_id?: string;
|
|
195
|
+
name?: string | null;
|
|
196
|
+
label?: string | null;
|
|
197
|
+
description?: string | null;
|
|
198
|
+
price?: number | null;
|
|
199
|
+
overrides?: Record<string, any> | null;
|
|
200
|
+
options?: Record<string, any> | null;
|
|
201
|
+
meta?: Record<string, any> | null;
|
|
202
|
+
is_visible?: boolean | null;
|
|
203
|
+
is_out_of_stock?: boolean | null;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export type PatchCatalogItemResponse = CatalogItemResponseDTO;
|
|
207
|
+
|
|
208
|
+
export interface PatchCatalogItemRequest extends BaseRequest, PatchCatalogItemPath {
|
|
209
|
+
body: PatchCatalogItemBody;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// DELETE /catalog/v1/catalog/{catalog_id}/item/{id} - Delete a catalog item
|
|
213
|
+
|
|
214
|
+
export interface DeleteCatalogItemPath {
|
|
215
|
+
catalog_id: number;
|
|
216
|
+
id: number;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export type DeleteCatalogItemResponse = CatalogItemResponseDTO;
|
|
220
|
+
|
|
221
|
+
export interface DeleteCatalogItemRequest extends BaseRequest, DeleteCatalogItemPath {}
|
|
222
|
+
|
|
223
|
+
// POST /catalog/v1/catalog/{id}/items - List catalog items
|
|
224
|
+
|
|
225
|
+
export interface PostListCatalogItemsPath {
|
|
226
|
+
id: number;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export type PostListCatalogItemsBody = ListParamsDTO;
|
|
230
|
+
|
|
231
|
+
export type PostListCatalogItemsResponse = CatalogItemsListResponseDTO;
|
|
232
|
+
|
|
233
|
+
export interface PostListCatalogItemsRequest extends BaseRequest, PostListCatalogItemsPath {
|
|
234
|
+
body: PostListCatalogItemsBody;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// GET /catalog/v1/catalog/{id}/items - List catalog items
|
|
238
|
+
|
|
239
|
+
export interface GetListCatalogItemsPath {
|
|
240
|
+
id: number;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export interface GetListCatalogItemsQuery {
|
|
244
|
+
page: number;
|
|
245
|
+
limit: number;
|
|
246
|
+
sort_by: string;
|
|
247
|
+
order: string;
|
|
248
|
+
filter: FilterQueryDTO;
|
|
249
|
+
// Graphql query string
|
|
250
|
+
_query?: string;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export type GetListCatalogItemsResponse = CatalogItemsListResponseDTO;
|
|
254
|
+
|
|
255
|
+
export interface GetListCatalogItemsRequest
|
|
256
|
+
extends BaseRequest,
|
|
257
|
+
RequestQuery<GetListCatalogItemsQuery>,
|
|
258
|
+
GetListCatalogItemsPath {}
|
|
259
|
+
|
|
260
|
+
// POST /catalog/v1/catalog/{id}/clone - Clone a catalog
|
|
261
|
+
|
|
262
|
+
export interface PostCloneCatalogPath {
|
|
263
|
+
id: number;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export type PostCloneCatalogResponse = CatalogResponseDTO;
|
|
267
|
+
|
|
268
|
+
export interface PostCloneCatalogRequest extends BaseRequest, PostCloneCatalogPath {}
|
|
269
|
+
|
|
270
|
+
// POST /catalog/v1/base-item - Create a new base item
|
|
271
|
+
|
|
272
|
+
export interface PostCatalogBaseItemBody {
|
|
273
|
+
name?: string;
|
|
274
|
+
description?: string | null;
|
|
275
|
+
price?: number | null;
|
|
276
|
+
barcode?: string | null;
|
|
277
|
+
reporting?: Record<string, any> | null;
|
|
278
|
+
tax?: Record<string, any> | null;
|
|
279
|
+
meta?: Record<string, any> | null;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export type PostCatalogBaseItemResponse = BaseItemDTO;
|
|
283
|
+
|
|
284
|
+
export interface PostCatalogBaseItemRequest extends BaseRequest {
|
|
285
|
+
body: PostCatalogBaseItemBody;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// GET /catalog/v1/base-item - List base items
|
|
289
|
+
|
|
290
|
+
export interface GetCatalogBaseItemsQuery {
|
|
291
|
+
// Graphql query string
|
|
292
|
+
_query?: string;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export interface GetCatalogBaseItemsBody {
|
|
296
|
+
search?: string | null;
|
|
297
|
+
limit?: number;
|
|
298
|
+
offset?: number;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export type GetCatalogBaseItemsResponse = BaseItemDTO[];
|
|
302
|
+
|
|
303
|
+
export interface GetCatalogBaseItemsRequest
|
|
304
|
+
extends BaseRequest,
|
|
305
|
+
RequestQuery<GetCatalogBaseItemsQuery> {
|
|
306
|
+
body: GetCatalogBaseItemsBody;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// GET /catalog/v1/base-item/{id} - Get a base item by id
|
|
310
|
+
|
|
311
|
+
export interface GetCatalogBaseItemPath {
|
|
312
|
+
id: string;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export interface GetCatalogBaseItemQuery {
|
|
316
|
+
// Graphql query string
|
|
317
|
+
_query?: string;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export type GetCatalogBaseItemResponse = BaseItemDTO;
|
|
321
|
+
|
|
322
|
+
export interface GetCatalogBaseItemRequest
|
|
323
|
+
extends BaseRequest,
|
|
324
|
+
RequestQuery<GetCatalogBaseItemQuery>,
|
|
325
|
+
GetCatalogBaseItemPath {}
|