@teemill/gtins 0.2.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 (57) hide show
  1. package/.openapi-generator/FILES +16 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +46 -0
  5. package/dist/apis/GTINsApi.d.ts +77 -0
  6. package/dist/apis/GTINsApi.js +213 -0
  7. package/dist/apis/index.d.ts +1 -0
  8. package/dist/apis/index.js +19 -0
  9. package/dist/esm/apis/GTINsApi.d.ts +77 -0
  10. package/dist/esm/apis/GTINsApi.js +209 -0
  11. package/dist/esm/apis/index.d.ts +1 -0
  12. package/dist/esm/apis/index.js +3 -0
  13. package/dist/esm/index.d.ts +3 -0
  14. package/dist/esm/index.js +5 -0
  15. package/dist/esm/models/ApiError.d.ts +37 -0
  16. package/dist/esm/models/ApiError.js +42 -0
  17. package/dist/esm/models/AssignGtinRequest.d.ts +31 -0
  18. package/dist/esm/models/AssignGtinRequest.js +40 -0
  19. package/dist/esm/models/GTIN.d.ts +37 -0
  20. package/dist/esm/models/GTIN.js +44 -0
  21. package/dist/esm/models/GTINsResponse.d.ts +38 -0
  22. package/dist/esm/models/GTINsResponse.js +41 -0
  23. package/dist/esm/models/ImportGtins202Response.d.ts +31 -0
  24. package/dist/esm/models/ImportGtins202Response.js +38 -0
  25. package/dist/esm/models/index.d.ts +5 -0
  26. package/dist/esm/models/index.js +7 -0
  27. package/dist/esm/runtime.d.ts +187 -0
  28. package/dist/esm/runtime.js +333 -0
  29. package/dist/index.d.ts +3 -0
  30. package/dist/index.js +21 -0
  31. package/dist/models/ApiError.d.ts +37 -0
  32. package/dist/models/ApiError.js +49 -0
  33. package/dist/models/AssignGtinRequest.d.ts +31 -0
  34. package/dist/models/AssignGtinRequest.js +47 -0
  35. package/dist/models/GTIN.d.ts +37 -0
  36. package/dist/models/GTIN.js +51 -0
  37. package/dist/models/GTINsResponse.d.ts +38 -0
  38. package/dist/models/GTINsResponse.js +48 -0
  39. package/dist/models/ImportGtins202Response.d.ts +31 -0
  40. package/dist/models/ImportGtins202Response.js +45 -0
  41. package/dist/models/index.d.ts +5 -0
  42. package/dist/models/index.js +23 -0
  43. package/dist/runtime.d.ts +187 -0
  44. package/dist/runtime.js +349 -0
  45. package/package.json +21 -0
  46. package/src/apis/GTINsApi.ts +311 -0
  47. package/src/apis/index.ts +3 -0
  48. package/src/index.ts +5 -0
  49. package/src/models/ApiError.ts +69 -0
  50. package/src/models/AssignGtinRequest.ts +61 -0
  51. package/src/models/GTIN.ts +70 -0
  52. package/src/models/GTINsResponse.ts +75 -0
  53. package/src/models/ImportGtins202Response.ts +60 -0
  54. package/src/models/index.ts +7 -0
  55. package/src/runtime.ts +441 -0
  56. package/tsconfig.esm.json +7 -0
  57. package/tsconfig.json +20 -0
@@ -0,0 +1,209 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GTINs API
5
+ * Manage GTINs
6
+ *
7
+ * The version of the OpenAPI document: 0.2.1
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { AssignGtinRequestToJSON, GTINFromJSON, GTINsResponseFromJSON, ImportGtins202ResponseFromJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class GTINsApi extends runtime.BaseAPI {
29
+ /**
30
+ * Assign a GTIN to a variant
31
+ * Assign GTIN
32
+ */
33
+ assignGtinRaw(requestParameters, initOverrides) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ if (requestParameters.project === null || requestParameters.project === undefined) {
36
+ throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling assignGtin.');
37
+ }
38
+ if (requestParameters.gtin === null || requestParameters.gtin === undefined) {
39
+ throw new runtime.RequiredError('gtin', 'Required parameter requestParameters.gtin was null or undefined when calling assignGtin.');
40
+ }
41
+ const queryParameters = {};
42
+ if (requestParameters.project !== undefined) {
43
+ queryParameters['project'] = requestParameters.project;
44
+ }
45
+ const headerParameters = {};
46
+ headerParameters['Content-Type'] = 'application/json';
47
+ if (this.configuration && this.configuration.accessToken) {
48
+ // oauth required
49
+ headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
50
+ }
51
+ if (this.configuration && this.configuration.apiKey) {
52
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
53
+ }
54
+ const response = yield this.request({
55
+ path: `/v1/gtins/{gtin}/assign`.replace(`{${"gtin"}}`, encodeURIComponent(String(requestParameters.gtin))),
56
+ method: 'POST',
57
+ headers: headerParameters,
58
+ query: queryParameters,
59
+ body: AssignGtinRequestToJSON(requestParameters.assignGtinRequest),
60
+ }, initOverrides);
61
+ return new runtime.JSONApiResponse(response, (jsonValue) => GTINFromJSON(jsonValue));
62
+ });
63
+ }
64
+ /**
65
+ * Assign a GTIN to a variant
66
+ * Assign GTIN
67
+ */
68
+ assignGtin(project, gtin, optionalParameters = {}, initOverrides) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ const response = yield this.assignGtinRaw(Object.assign({ project: project, gtin: gtin }, optionalParameters), initOverrides);
71
+ return yield response.value();
72
+ });
73
+ }
74
+ /**
75
+ * Initiates a GTINs import from a CSV file. The result will be available as a notification in the dashboard.
76
+ * Import GTINs
77
+ */
78
+ importGtinsRaw(requestParameters, initOverrides) {
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ if (requestParameters.project === null || requestParameters.project === undefined) {
81
+ throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling importGtins.');
82
+ }
83
+ const queryParameters = {};
84
+ if (requestParameters.project !== undefined) {
85
+ queryParameters['project'] = requestParameters.project;
86
+ }
87
+ const headerParameters = {};
88
+ headerParameters['Content-Type'] = 'text/csv';
89
+ if (this.configuration && this.configuration.accessToken) {
90
+ // oauth required
91
+ headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
92
+ }
93
+ if (this.configuration && this.configuration.apiKey) {
94
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
95
+ }
96
+ const response = yield this.request({
97
+ path: `/v1/gtins/import`,
98
+ method: 'POST',
99
+ headers: headerParameters,
100
+ query: queryParameters,
101
+ body: requestParameters.body,
102
+ }, initOverrides);
103
+ return new runtime.JSONApiResponse(response, (jsonValue) => ImportGtins202ResponseFromJSON(jsonValue));
104
+ });
105
+ }
106
+ /**
107
+ * Initiates a GTINs import from a CSV file. The result will be available as a notification in the dashboard.
108
+ * Import GTINs
109
+ */
110
+ importGtins(project, optionalParameters = {}, initOverrides) {
111
+ return __awaiter(this, void 0, void 0, function* () {
112
+ const response = yield this.importGtinsRaw(Object.assign({ project: project }, optionalParameters), initOverrides);
113
+ return yield response.value();
114
+ });
115
+ }
116
+ /**
117
+ * List GTINs
118
+ * List gtins
119
+ */
120
+ listGtinsRaw(requestParameters, initOverrides) {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ if (requestParameters.project === null || requestParameters.project === undefined) {
123
+ throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling listGtins.');
124
+ }
125
+ const queryParameters = {};
126
+ if (requestParameters.project !== undefined) {
127
+ queryParameters['project'] = requestParameters.project;
128
+ }
129
+ if (requestParameters.pageSize !== undefined) {
130
+ queryParameters['pageSize'] = requestParameters.pageSize;
131
+ }
132
+ if (requestParameters.pageToken !== undefined) {
133
+ queryParameters['pageToken'] = requestParameters.pageToken;
134
+ }
135
+ if (requestParameters.search !== undefined) {
136
+ queryParameters['search'] = requestParameters.search;
137
+ }
138
+ const headerParameters = {};
139
+ if (this.configuration && this.configuration.accessToken) {
140
+ // oauth required
141
+ headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
142
+ }
143
+ if (this.configuration && this.configuration.apiKey) {
144
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
145
+ }
146
+ const response = yield this.request({
147
+ path: `/v1/gtins`,
148
+ method: 'GET',
149
+ headers: headerParameters,
150
+ query: queryParameters,
151
+ }, initOverrides);
152
+ return new runtime.JSONApiResponse(response, (jsonValue) => GTINsResponseFromJSON(jsonValue));
153
+ });
154
+ }
155
+ /**
156
+ * List GTINs
157
+ * List gtins
158
+ */
159
+ listGtins(project, optionalParameters = {}, initOverrides) {
160
+ return __awaiter(this, void 0, void 0, function* () {
161
+ const response = yield this.listGtinsRaw(Object.assign({ project: project }, optionalParameters), initOverrides);
162
+ return yield response.value();
163
+ });
164
+ }
165
+ /**
166
+ * Unassign a GTIN from a variant
167
+ * Unassign GTIN
168
+ */
169
+ unassignGtinRaw(requestParameters, initOverrides) {
170
+ return __awaiter(this, void 0, void 0, function* () {
171
+ if (requestParameters.project === null || requestParameters.project === undefined) {
172
+ throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling unassignGtin.');
173
+ }
174
+ if (requestParameters.gtin === null || requestParameters.gtin === undefined) {
175
+ throw new runtime.RequiredError('gtin', 'Required parameter requestParameters.gtin was null or undefined when calling unassignGtin.');
176
+ }
177
+ const queryParameters = {};
178
+ if (requestParameters.project !== undefined) {
179
+ queryParameters['project'] = requestParameters.project;
180
+ }
181
+ const headerParameters = {};
182
+ if (this.configuration && this.configuration.accessToken) {
183
+ // oauth required
184
+ headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
185
+ }
186
+ if (this.configuration && this.configuration.apiKey) {
187
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
188
+ }
189
+ const response = yield this.request({
190
+ path: `/v1/gtins/{gtin}/unassign`.replace(`{${"gtin"}}`, encodeURIComponent(String(requestParameters.gtin))),
191
+ method: 'POST',
192
+ headers: headerParameters,
193
+ query: queryParameters,
194
+ }, initOverrides);
195
+ return new runtime.VoidApiResponse(response);
196
+ });
197
+ }
198
+ /**
199
+ * Unassign a GTIN from a variant
200
+ * Unassign GTIN
201
+ */
202
+ unassignGtin(project, gtin, initOverrides) {
203
+ return __awaiter(this, void 0, void 0, function* () {
204
+ yield this.unassignGtinRaw({
205
+ project: project, gtin: gtin,
206
+ }, initOverrides);
207
+ });
208
+ }
209
+ }
@@ -0,0 +1 @@
1
+ export * from './GTINsApi';
@@ -0,0 +1,3 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './GTINsApi';
@@ -0,0 +1,3 @@
1
+ export * from './runtime';
2
+ export * from './apis/index';
3
+ export * from './models/index';
@@ -0,0 +1,5 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './runtime';
4
+ export * from './apis/index';
5
+ export * from './models/index';
@@ -0,0 +1,37 @@
1
+ /**
2
+ * GTINs API
3
+ * Manage GTINs
4
+ *
5
+ * The version of the OpenAPI document: 0.2.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
+ /**
13
+ *
14
+ * @export
15
+ * @interface ApiError
16
+ */
17
+ export interface ApiError {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ApiError
22
+ */
23
+ code?: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof ApiError
28
+ */
29
+ message: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the ApiError interface.
33
+ */
34
+ export declare function instanceOfApiError(value: object): boolean;
35
+ export declare function ApiErrorFromJSON(json: any): ApiError;
36
+ export declare function ApiErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiError;
37
+ export declare function ApiErrorToJSON(value?: ApiError | null): any;
@@ -0,0 +1,42 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GTINs API
5
+ * Manage GTINs
6
+ *
7
+ * The version of the OpenAPI document: 0.2.1
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the ApiError interface.
16
+ */
17
+ export function instanceOfApiError(value) {
18
+ if (!('message' in value))
19
+ return false;
20
+ return true;
21
+ }
22
+ export function ApiErrorFromJSON(json) {
23
+ return ApiErrorFromJSONTyped(json, false);
24
+ }
25
+ export function ApiErrorFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'code': json['code'] == null ? undefined : json['code'],
31
+ 'message': json['message'],
32
+ };
33
+ }
34
+ export function ApiErrorToJSON(value) {
35
+ if (value == null) {
36
+ return value;
37
+ }
38
+ return {
39
+ 'code': value['code'],
40
+ 'message': value['message'],
41
+ };
42
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * GTINs API
3
+ * Manage GTINs
4
+ *
5
+ * The version of the OpenAPI document: 0.2.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
+ /**
13
+ *
14
+ * @export
15
+ * @interface AssignGtinRequest
16
+ */
17
+ export interface AssignGtinRequest {
18
+ /**
19
+ * A reference to the resource location
20
+ * @type {string}
21
+ * @memberof AssignGtinRequest
22
+ */
23
+ variantRef: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the AssignGtinRequest interface.
27
+ */
28
+ export declare function instanceOfAssignGtinRequest(value: object): boolean;
29
+ export declare function AssignGtinRequestFromJSON(json: any): AssignGtinRequest;
30
+ export declare function AssignGtinRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssignGtinRequest;
31
+ export declare function AssignGtinRequestToJSON(value?: AssignGtinRequest | null): any;
@@ -0,0 +1,40 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GTINs API
5
+ * Manage GTINs
6
+ *
7
+ * The version of the OpenAPI document: 0.2.1
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the AssignGtinRequest interface.
16
+ */
17
+ export function instanceOfAssignGtinRequest(value) {
18
+ if (!('variantRef' in value))
19
+ return false;
20
+ return true;
21
+ }
22
+ export function AssignGtinRequestFromJSON(json) {
23
+ return AssignGtinRequestFromJSONTyped(json, false);
24
+ }
25
+ export function AssignGtinRequestFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'variantRef': json['variantRef'],
31
+ };
32
+ }
33
+ export function AssignGtinRequestToJSON(value) {
34
+ if (value == null) {
35
+ return value;
36
+ }
37
+ return {
38
+ 'variantRef': value['variantRef'],
39
+ };
40
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * GTINs API
3
+ * Manage GTINs
4
+ *
5
+ * The version of the OpenAPI document: 0.2.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
+ /**
13
+ *
14
+ * @export
15
+ * @interface GTIN
16
+ */
17
+ export interface GTIN {
18
+ /**
19
+ * The GTIN
20
+ * @type {string}
21
+ * @memberof GTIN
22
+ */
23
+ number: string;
24
+ /**
25
+ * A reference to the resource location
26
+ * @type {string}
27
+ * @memberof GTIN
28
+ */
29
+ variantRef: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the GTIN interface.
33
+ */
34
+ export declare function instanceOfGTIN(value: object): boolean;
35
+ export declare function GTINFromJSON(json: any): GTIN;
36
+ export declare function GTINFromJSONTyped(json: any, ignoreDiscriminator: boolean): GTIN;
37
+ export declare function GTINToJSON(value?: GTIN | null): any;
@@ -0,0 +1,44 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GTINs API
5
+ * Manage GTINs
6
+ *
7
+ * The version of the OpenAPI document: 0.2.1
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the GTIN interface.
16
+ */
17
+ export function instanceOfGTIN(value) {
18
+ if (!('number' in value))
19
+ return false;
20
+ if (!('variantRef' in value))
21
+ return false;
22
+ return true;
23
+ }
24
+ export function GTINFromJSON(json) {
25
+ return GTINFromJSONTyped(json, false);
26
+ }
27
+ export function GTINFromJSONTyped(json, ignoreDiscriminator) {
28
+ if (json == null) {
29
+ return json;
30
+ }
31
+ return {
32
+ 'number': json['number'],
33
+ 'variantRef': json['variantRef'],
34
+ };
35
+ }
36
+ export function GTINToJSON(value) {
37
+ if (value == null) {
38
+ return value;
39
+ }
40
+ return {
41
+ 'number': value['number'],
42
+ 'variantRef': value['variantRef'],
43
+ };
44
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * GTINs API
3
+ * Manage GTINs
4
+ *
5
+ * The version of the OpenAPI document: 0.2.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 { GTIN } from './GTIN';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface GTINsResponse
17
+ */
18
+ export interface GTINsResponse {
19
+ /**
20
+ *
21
+ * @type {Array<GTIN>}
22
+ * @memberof GTINsResponse
23
+ */
24
+ gtins?: Array<GTIN>;
25
+ /**
26
+ *
27
+ * @type {number}
28
+ * @memberof GTINsResponse
29
+ */
30
+ nextPageToken?: number;
31
+ }
32
+ /**
33
+ * Check if a given object implements the GTINsResponse interface.
34
+ */
35
+ export declare function instanceOfGTINsResponse(value: object): boolean;
36
+ export declare function GTINsResponseFromJSON(json: any): GTINsResponse;
37
+ export declare function GTINsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GTINsResponse;
38
+ export declare function GTINsResponseToJSON(value?: GTINsResponse | null): any;
@@ -0,0 +1,41 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GTINs API
5
+ * Manage GTINs
6
+ *
7
+ * The version of the OpenAPI document: 0.2.1
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { GTINFromJSON, GTINToJSON, } from './GTIN';
15
+ /**
16
+ * Check if a given object implements the GTINsResponse interface.
17
+ */
18
+ export function instanceOfGTINsResponse(value) {
19
+ return true;
20
+ }
21
+ export function GTINsResponseFromJSON(json) {
22
+ return GTINsResponseFromJSONTyped(json, false);
23
+ }
24
+ export function GTINsResponseFromJSONTyped(json, ignoreDiscriminator) {
25
+ if (json == null) {
26
+ return json;
27
+ }
28
+ return {
29
+ 'gtins': json['gtins'] == null ? undefined : (json['gtins'].map(GTINFromJSON)),
30
+ 'nextPageToken': json['nextPageToken'] == null ? undefined : json['nextPageToken'],
31
+ };
32
+ }
33
+ export function GTINsResponseToJSON(value) {
34
+ if (value == null) {
35
+ return value;
36
+ }
37
+ return {
38
+ 'gtins': value['gtins'] == null ? undefined : (value['gtins'].map(GTINToJSON)),
39
+ 'nextPageToken': value['nextPageToken'],
40
+ };
41
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * GTINs API
3
+ * Manage GTINs
4
+ *
5
+ * The version of the OpenAPI document: 0.2.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
+ /**
13
+ *
14
+ * @export
15
+ * @interface ImportGtins202Response
16
+ */
17
+ export interface ImportGtins202Response {
18
+ /**
19
+ * Id of the GTINs import
20
+ * @type {string}
21
+ * @memberof ImportGtins202Response
22
+ */
23
+ importId?: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the ImportGtins202Response interface.
27
+ */
28
+ export declare function instanceOfImportGtins202Response(value: object): boolean;
29
+ export declare function ImportGtins202ResponseFromJSON(json: any): ImportGtins202Response;
30
+ export declare function ImportGtins202ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImportGtins202Response;
31
+ export declare function ImportGtins202ResponseToJSON(value?: ImportGtins202Response | null): any;
@@ -0,0 +1,38 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GTINs API
5
+ * Manage GTINs
6
+ *
7
+ * The version of the OpenAPI document: 0.2.1
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the ImportGtins202Response interface.
16
+ */
17
+ export function instanceOfImportGtins202Response(value) {
18
+ return true;
19
+ }
20
+ export function ImportGtins202ResponseFromJSON(json) {
21
+ return ImportGtins202ResponseFromJSONTyped(json, false);
22
+ }
23
+ export function ImportGtins202ResponseFromJSONTyped(json, ignoreDiscriminator) {
24
+ if (json == null) {
25
+ return json;
26
+ }
27
+ return {
28
+ 'importId': json['importId'] == null ? undefined : json['importId'],
29
+ };
30
+ }
31
+ export function ImportGtins202ResponseToJSON(value) {
32
+ if (value == null) {
33
+ return value;
34
+ }
35
+ return {
36
+ 'importId': value['importId'],
37
+ };
38
+ }
@@ -0,0 +1,5 @@
1
+ export * from './ApiError';
2
+ export * from './AssignGtinRequest';
3
+ export * from './GTIN';
4
+ export * from './GTINsResponse';
5
+ export * from './ImportGtins202Response';
@@ -0,0 +1,7 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './ApiError';
4
+ export * from './AssignGtinRequest';
5
+ export * from './GTIN';
6
+ export * from './GTINsResponse';
7
+ export * from './ImportGtins202Response';