@teemill/gtins 0.2.1 → 0.4.1

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 (77) hide show
  1. package/.openapi-generator/FILES +6 -10
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +3 -3
  4. package/api.ts +781 -0
  5. package/base.ts +86 -0
  6. package/common.ts +150 -0
  7. package/configuration.ts +110 -0
  8. package/dist/api.d.ts +447 -0
  9. package/dist/api.js +536 -0
  10. package/dist/base.d.ts +66 -0
  11. package/dist/base.js +65 -0
  12. package/dist/common.d.ts +65 -0
  13. package/dist/common.js +161 -0
  14. package/dist/configuration.d.ts +91 -0
  15. package/dist/configuration.js +43 -0
  16. package/dist/esm/api.d.ts +447 -0
  17. package/dist/esm/api.js +529 -0
  18. package/dist/esm/base.d.ts +66 -0
  19. package/dist/esm/base.js +60 -0
  20. package/dist/esm/common.d.ts +65 -0
  21. package/dist/esm/common.js +149 -0
  22. package/dist/esm/configuration.d.ts +91 -0
  23. package/dist/esm/configuration.js +39 -0
  24. package/dist/esm/index.d.ts +13 -3
  25. package/dist/esm/index.js +13 -3
  26. package/dist/index.d.ts +13 -3
  27. package/dist/index.js +15 -5
  28. package/git_push.sh +57 -0
  29. package/index.ts +18 -0
  30. package/package.json +15 -3
  31. package/tsconfig.json +4 -6
  32. package/dist/apis/GTINsApi.d.ts +0 -77
  33. package/dist/apis/GTINsApi.js +0 -213
  34. package/dist/apis/index.d.ts +0 -1
  35. package/dist/apis/index.js +0 -19
  36. package/dist/esm/apis/GTINsApi.d.ts +0 -77
  37. package/dist/esm/apis/GTINsApi.js +0 -209
  38. package/dist/esm/apis/index.d.ts +0 -1
  39. package/dist/esm/apis/index.js +0 -3
  40. package/dist/esm/models/ApiError.d.ts +0 -37
  41. package/dist/esm/models/ApiError.js +0 -42
  42. package/dist/esm/models/AssignGtinRequest.d.ts +0 -31
  43. package/dist/esm/models/AssignGtinRequest.js +0 -40
  44. package/dist/esm/models/GTIN.d.ts +0 -37
  45. package/dist/esm/models/GTIN.js +0 -44
  46. package/dist/esm/models/GTINsResponse.d.ts +0 -38
  47. package/dist/esm/models/GTINsResponse.js +0 -41
  48. package/dist/esm/models/ImportGtins202Response.d.ts +0 -31
  49. package/dist/esm/models/ImportGtins202Response.js +0 -38
  50. package/dist/esm/models/index.d.ts +0 -5
  51. package/dist/esm/models/index.js +0 -7
  52. package/dist/esm/runtime.d.ts +0 -187
  53. package/dist/esm/runtime.js +0 -333
  54. package/dist/models/ApiError.d.ts +0 -37
  55. package/dist/models/ApiError.js +0 -49
  56. package/dist/models/AssignGtinRequest.d.ts +0 -31
  57. package/dist/models/AssignGtinRequest.js +0 -47
  58. package/dist/models/GTIN.d.ts +0 -37
  59. package/dist/models/GTIN.js +0 -51
  60. package/dist/models/GTINsResponse.d.ts +0 -38
  61. package/dist/models/GTINsResponse.js +0 -48
  62. package/dist/models/ImportGtins202Response.d.ts +0 -31
  63. package/dist/models/ImportGtins202Response.js +0 -45
  64. package/dist/models/index.d.ts +0 -5
  65. package/dist/models/index.js +0 -23
  66. package/dist/runtime.d.ts +0 -187
  67. package/dist/runtime.js +0 -349
  68. package/src/apis/GTINsApi.ts +0 -311
  69. package/src/apis/index.ts +0 -3
  70. package/src/index.ts +0 -5
  71. package/src/models/ApiError.ts +0 -69
  72. package/src/models/AssignGtinRequest.ts +0 -61
  73. package/src/models/GTIN.ts +0 -70
  74. package/src/models/GTINsResponse.ts +0 -75
  75. package/src/models/ImportGtins202Response.ts +0 -60
  76. package/src/models/index.ts +0 -7
  77. package/src/runtime.ts +0 -441
package/dist/api.d.ts ADDED
@@ -0,0 +1,447 @@
1
+ /**
2
+ * GTINs API
3
+ * Manage GTINs
4
+ *
5
+ * The version of the OpenAPI document: 0.4.1
6
+ * Contact: hello@teemill.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Configuration } from './configuration';
13
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ import type { RequestArgs } from './base';
15
+ import { BaseAPI } from './base';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ApiError
20
+ */
21
+ export interface ApiError {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ApiError
26
+ */
27
+ 'code'?: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ApiError
32
+ */
33
+ 'message': string;
34
+ }
35
+ /**
36
+ *
37
+ * @export
38
+ * @interface AssignGtinRequest
39
+ */
40
+ export interface AssignGtinRequest {
41
+ /**
42
+ * A reference to the resource location
43
+ * @type {string}
44
+ * @memberof AssignGtinRequest
45
+ */
46
+ 'variantRef': string;
47
+ }
48
+ /**
49
+ *
50
+ * @export
51
+ * @interface GTIN
52
+ */
53
+ export interface GTIN {
54
+ /**
55
+ * The GTIN
56
+ * @type {string}
57
+ * @memberof GTIN
58
+ */
59
+ 'number': string;
60
+ /**
61
+ * A reference to the resource location
62
+ * @type {string}
63
+ * @memberof GTIN
64
+ */
65
+ 'variantRef': string;
66
+ }
67
+ /**
68
+ *
69
+ * @export
70
+ * @interface GTINsResponse
71
+ */
72
+ export interface GTINsResponse {
73
+ /**
74
+ *
75
+ * @type {Array<GTIN>}
76
+ * @memberof GTINsResponse
77
+ */
78
+ 'gtins'?: Array<GTIN>;
79
+ /**
80
+ *
81
+ * @type {number}
82
+ * @memberof GTINsResponse
83
+ */
84
+ 'nextPageToken'?: number | null;
85
+ }
86
+ /**
87
+ *
88
+ * @export
89
+ * @interface ImportGtins202Response
90
+ */
91
+ export interface ImportGtins202Response {
92
+ /**
93
+ * Id of the GTINs import
94
+ * @type {string}
95
+ * @memberof ImportGtins202Response
96
+ */
97
+ 'importId'?: string;
98
+ }
99
+ /**
100
+ * GTINsApi - axios parameter creator
101
+ * @export
102
+ */
103
+ export declare const GTINsApiAxiosParamCreator: (configuration?: Configuration) => {
104
+ /**
105
+ * Assign a GTIN to a variant
106
+ * @summary Assign GTIN
107
+ * @param {string} project What project it is
108
+ * @param {string} gtin GTIN
109
+ * @param {AssignGtinRequest} [assignGtinRequest] Assign a GTIN to a variant
110
+ * @param {*} [options] Override http request option.
111
+ * @throws {RequiredError}
112
+ */
113
+ assignGtin: (project: string, gtin: string, assignGtinRequest?: AssignGtinRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
114
+ /**
115
+ * Export a CSV of a project\'s GTINs
116
+ * @summary Export GTINs
117
+ * @param {*} [options] Override http request option.
118
+ * @throws {RequiredError}
119
+ */
120
+ exportGtins: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
121
+ /**
122
+ * Get a GTIN
123
+ * @summary Get GTIN
124
+ * @param {string} project What project it is
125
+ * @param {string} gtin GTIN
126
+ * @param {*} [options] Override http request option.
127
+ * @throws {RequiredError}
128
+ */
129
+ getGtin: (project: string, gtin: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
130
+ /**
131
+ * Initiates a GTINs import from a CSV file. The result will be available as a notification in the dashboard.
132
+ * @summary Import GTINs
133
+ * @param {string} project What project it is
134
+ * @param {string} [body] A data URL of a CSV file containing GTINs
135
+ * @param {*} [options] Override http request option.
136
+ * @throws {RequiredError}
137
+ */
138
+ importGtins: (project: string, body?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
139
+ /**
140
+ * List GTINs
141
+ * @summary List gtins
142
+ * @param {string} project What project it is
143
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
144
+ * @param {number} [pageToken] Page reference token
145
+ * @param {string} [search] Search term to filter based on GTIN based on the GTIN
146
+ * @param {*} [options] Override http request option.
147
+ * @throws {RequiredError}
148
+ */
149
+ listGtins: (project: string, pageSize?: number, pageToken?: number, search?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
150
+ /**
151
+ * Unassign a GTIN from a variant
152
+ * @summary Unassign GTIN
153
+ * @param {string} project What project it is
154
+ * @param {string} gtin GTIN
155
+ * @param {*} [options] Override http request option.
156
+ * @throws {RequiredError}
157
+ */
158
+ unassignGtin: (project: string, gtin: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
159
+ };
160
+ /**
161
+ * GTINsApi - functional programming interface
162
+ * @export
163
+ */
164
+ export declare const GTINsApiFp: (configuration?: Configuration) => {
165
+ /**
166
+ * Assign a GTIN to a variant
167
+ * @summary Assign GTIN
168
+ * @param {string} project What project it is
169
+ * @param {string} gtin GTIN
170
+ * @param {AssignGtinRequest} [assignGtinRequest] Assign a GTIN to a variant
171
+ * @param {*} [options] Override http request option.
172
+ * @throws {RequiredError}
173
+ */
174
+ assignGtin(project: string, gtin: string, assignGtinRequest?: AssignGtinRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GTIN>>;
175
+ /**
176
+ * Export a CSV of a project\'s GTINs
177
+ * @summary Export GTINs
178
+ * @param {*} [options] Override http request option.
179
+ * @throws {RequiredError}
180
+ */
181
+ exportGtins(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>>;
182
+ /**
183
+ * Get a GTIN
184
+ * @summary Get GTIN
185
+ * @param {string} project What project it is
186
+ * @param {string} gtin GTIN
187
+ * @param {*} [options] Override http request option.
188
+ * @throws {RequiredError}
189
+ */
190
+ getGtin(project: string, gtin: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GTIN>>;
191
+ /**
192
+ * Initiates a GTINs import from a CSV file. The result will be available as a notification in the dashboard.
193
+ * @summary Import GTINs
194
+ * @param {string} project What project it is
195
+ * @param {string} [body] A data URL of a CSV file containing GTINs
196
+ * @param {*} [options] Override http request option.
197
+ * @throws {RequiredError}
198
+ */
199
+ importGtins(project: string, body?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImportGtins202Response>>;
200
+ /**
201
+ * List GTINs
202
+ * @summary List gtins
203
+ * @param {string} project What project it is
204
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
205
+ * @param {number} [pageToken] Page reference token
206
+ * @param {string} [search] Search term to filter based on GTIN based on the GTIN
207
+ * @param {*} [options] Override http request option.
208
+ * @throws {RequiredError}
209
+ */
210
+ listGtins(project: string, pageSize?: number, pageToken?: number, search?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GTINsResponse>>;
211
+ /**
212
+ * Unassign a GTIN from a variant
213
+ * @summary Unassign GTIN
214
+ * @param {string} project What project it is
215
+ * @param {string} gtin GTIN
216
+ * @param {*} [options] Override http request option.
217
+ * @throws {RequiredError}
218
+ */
219
+ unassignGtin(project: string, gtin: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
220
+ };
221
+ /**
222
+ * GTINsApi - factory interface
223
+ * @export
224
+ */
225
+ export declare const GTINsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
226
+ /**
227
+ * Assign a GTIN to a variant
228
+ * @summary Assign GTIN
229
+ * @param {GTINsApiAssignGtinRequest} requestParameters Request parameters.
230
+ * @param {*} [options] Override http request option.
231
+ * @throws {RequiredError}
232
+ */
233
+ assignGtin(requestParameters: GTINsApiAssignGtinRequest, options?: RawAxiosRequestConfig): AxiosPromise<GTIN>;
234
+ /**
235
+ * Export a CSV of a project\'s GTINs
236
+ * @summary Export GTINs
237
+ * @param {*} [options] Override http request option.
238
+ * @throws {RequiredError}
239
+ */
240
+ exportGtins(options?: RawAxiosRequestConfig): AxiosPromise<File>;
241
+ /**
242
+ * Get a GTIN
243
+ * @summary Get GTIN
244
+ * @param {GTINsApiGetGtinRequest} requestParameters Request parameters.
245
+ * @param {*} [options] Override http request option.
246
+ * @throws {RequiredError}
247
+ */
248
+ getGtin(requestParameters: GTINsApiGetGtinRequest, options?: RawAxiosRequestConfig): AxiosPromise<GTIN>;
249
+ /**
250
+ * Initiates a GTINs import from a CSV file. The result will be available as a notification in the dashboard.
251
+ * @summary Import GTINs
252
+ * @param {GTINsApiImportGtinsRequest} requestParameters Request parameters.
253
+ * @param {*} [options] Override http request option.
254
+ * @throws {RequiredError}
255
+ */
256
+ importGtins(requestParameters: GTINsApiImportGtinsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ImportGtins202Response>;
257
+ /**
258
+ * List GTINs
259
+ * @summary List gtins
260
+ * @param {GTINsApiListGtinsRequest} requestParameters Request parameters.
261
+ * @param {*} [options] Override http request option.
262
+ * @throws {RequiredError}
263
+ */
264
+ listGtins(requestParameters: GTINsApiListGtinsRequest, options?: RawAxiosRequestConfig): AxiosPromise<GTINsResponse>;
265
+ /**
266
+ * Unassign a GTIN from a variant
267
+ * @summary Unassign GTIN
268
+ * @param {GTINsApiUnassignGtinRequest} requestParameters Request parameters.
269
+ * @param {*} [options] Override http request option.
270
+ * @throws {RequiredError}
271
+ */
272
+ unassignGtin(requestParameters: GTINsApiUnassignGtinRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
273
+ };
274
+ /**
275
+ * Request parameters for assignGtin operation in GTINsApi.
276
+ * @export
277
+ * @interface GTINsApiAssignGtinRequest
278
+ */
279
+ export interface GTINsApiAssignGtinRequest {
280
+ /**
281
+ * What project it is
282
+ * @type {string}
283
+ * @memberof GTINsApiAssignGtin
284
+ */
285
+ readonly project: string;
286
+ /**
287
+ * GTIN
288
+ * @type {string}
289
+ * @memberof GTINsApiAssignGtin
290
+ */
291
+ readonly gtin: string;
292
+ /**
293
+ * Assign a GTIN to a variant
294
+ * @type {AssignGtinRequest}
295
+ * @memberof GTINsApiAssignGtin
296
+ */
297
+ readonly assignGtinRequest?: AssignGtinRequest;
298
+ }
299
+ /**
300
+ * Request parameters for getGtin operation in GTINsApi.
301
+ * @export
302
+ * @interface GTINsApiGetGtinRequest
303
+ */
304
+ export interface GTINsApiGetGtinRequest {
305
+ /**
306
+ * What project it is
307
+ * @type {string}
308
+ * @memberof GTINsApiGetGtin
309
+ */
310
+ readonly project: string;
311
+ /**
312
+ * GTIN
313
+ * @type {string}
314
+ * @memberof GTINsApiGetGtin
315
+ */
316
+ readonly gtin: string;
317
+ }
318
+ /**
319
+ * Request parameters for importGtins operation in GTINsApi.
320
+ * @export
321
+ * @interface GTINsApiImportGtinsRequest
322
+ */
323
+ export interface GTINsApiImportGtinsRequest {
324
+ /**
325
+ * What project it is
326
+ * @type {string}
327
+ * @memberof GTINsApiImportGtins
328
+ */
329
+ readonly project: string;
330
+ /**
331
+ * A data URL of a CSV file containing GTINs
332
+ * @type {string}
333
+ * @memberof GTINsApiImportGtins
334
+ */
335
+ readonly body?: string;
336
+ }
337
+ /**
338
+ * Request parameters for listGtins operation in GTINsApi.
339
+ * @export
340
+ * @interface GTINsApiListGtinsRequest
341
+ */
342
+ export interface GTINsApiListGtinsRequest {
343
+ /**
344
+ * What project it is
345
+ * @type {string}
346
+ * @memberof GTINsApiListGtins
347
+ */
348
+ readonly project: string;
349
+ /**
350
+ * Max page size. This is the maximum page size that will be returned, but it might be smaller.
351
+ * @type {number}
352
+ * @memberof GTINsApiListGtins
353
+ */
354
+ readonly pageSize?: number;
355
+ /**
356
+ * Page reference token
357
+ * @type {number}
358
+ * @memberof GTINsApiListGtins
359
+ */
360
+ readonly pageToken?: number;
361
+ /**
362
+ * Search term to filter based on GTIN based on the GTIN
363
+ * @type {string}
364
+ * @memberof GTINsApiListGtins
365
+ */
366
+ readonly search?: string;
367
+ }
368
+ /**
369
+ * Request parameters for unassignGtin operation in GTINsApi.
370
+ * @export
371
+ * @interface GTINsApiUnassignGtinRequest
372
+ */
373
+ export interface GTINsApiUnassignGtinRequest {
374
+ /**
375
+ * What project it is
376
+ * @type {string}
377
+ * @memberof GTINsApiUnassignGtin
378
+ */
379
+ readonly project: string;
380
+ /**
381
+ * GTIN
382
+ * @type {string}
383
+ * @memberof GTINsApiUnassignGtin
384
+ */
385
+ readonly gtin: string;
386
+ }
387
+ /**
388
+ * GTINsApi - object-oriented interface
389
+ * @export
390
+ * @class GTINsApi
391
+ * @extends {BaseAPI}
392
+ */
393
+ export declare class GTINsApi extends BaseAPI {
394
+ /**
395
+ * Assign a GTIN to a variant
396
+ * @summary Assign GTIN
397
+ * @param {GTINsApiAssignGtinRequest} requestParameters Request parameters.
398
+ * @param {*} [options] Override http request option.
399
+ * @throws {RequiredError}
400
+ * @memberof GTINsApi
401
+ */
402
+ assignGtin(requestParameters: GTINsApiAssignGtinRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GTIN, any>>;
403
+ /**
404
+ * Export a CSV of a project\'s GTINs
405
+ * @summary Export GTINs
406
+ * @param {*} [options] Override http request option.
407
+ * @throws {RequiredError}
408
+ * @memberof GTINsApi
409
+ */
410
+ exportGtins(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<File, any>>;
411
+ /**
412
+ * Get a GTIN
413
+ * @summary Get GTIN
414
+ * @param {GTINsApiGetGtinRequest} requestParameters Request parameters.
415
+ * @param {*} [options] Override http request option.
416
+ * @throws {RequiredError}
417
+ * @memberof GTINsApi
418
+ */
419
+ getGtin(requestParameters: GTINsApiGetGtinRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GTIN, any>>;
420
+ /**
421
+ * Initiates a GTINs import from a CSV file. The result will be available as a notification in the dashboard.
422
+ * @summary Import GTINs
423
+ * @param {GTINsApiImportGtinsRequest} requestParameters Request parameters.
424
+ * @param {*} [options] Override http request option.
425
+ * @throws {RequiredError}
426
+ * @memberof GTINsApi
427
+ */
428
+ importGtins(requestParameters: GTINsApiImportGtinsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ImportGtins202Response, any>>;
429
+ /**
430
+ * List GTINs
431
+ * @summary List gtins
432
+ * @param {GTINsApiListGtinsRequest} requestParameters Request parameters.
433
+ * @param {*} [options] Override http request option.
434
+ * @throws {RequiredError}
435
+ * @memberof GTINsApi
436
+ */
437
+ listGtins(requestParameters: GTINsApiListGtinsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GTINsResponse, any>>;
438
+ /**
439
+ * Unassign a GTIN from a variant
440
+ * @summary Unassign GTIN
441
+ * @param {GTINsApiUnassignGtinRequest} requestParameters Request parameters.
442
+ * @param {*} [options] Override http request option.
443
+ * @throws {RequiredError}
444
+ * @memberof GTINsApi
445
+ */
446
+ unassignGtin(requestParameters: GTINsApiUnassignGtinRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
447
+ }