@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,69 @@
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
+ import { mapValues } from '../runtime';
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
+ * Check if a given object implements the ApiError interface.
38
+ */
39
+ export function instanceOfApiError(value: object): boolean {
40
+ if (!('message' in value)) return false;
41
+ return true;
42
+ }
43
+
44
+ export function ApiErrorFromJSON(json: any): ApiError {
45
+ return ApiErrorFromJSONTyped(json, false);
46
+ }
47
+
48
+ export function ApiErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiError {
49
+ if (json == null) {
50
+ return json;
51
+ }
52
+ return {
53
+
54
+ 'code': json['code'] == null ? undefined : json['code'],
55
+ 'message': json['message'],
56
+ };
57
+ }
58
+
59
+ export function ApiErrorToJSON(value?: ApiError | null): any {
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ return {
64
+
65
+ 'code': value['code'],
66
+ 'message': value['message'],
67
+ };
68
+ }
69
+
@@ -0,0 +1,61 @@
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
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface AssignGtinRequest
20
+ */
21
+ export interface AssignGtinRequest {
22
+ /**
23
+ * A reference to the resource location
24
+ * @type {string}
25
+ * @memberof AssignGtinRequest
26
+ */
27
+ variantRef: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the AssignGtinRequest interface.
32
+ */
33
+ export function instanceOfAssignGtinRequest(value: object): boolean {
34
+ if (!('variantRef' in value)) return false;
35
+ return true;
36
+ }
37
+
38
+ export function AssignGtinRequestFromJSON(json: any): AssignGtinRequest {
39
+ return AssignGtinRequestFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function AssignGtinRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssignGtinRequest {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'variantRef': json['variantRef'],
49
+ };
50
+ }
51
+
52
+ export function AssignGtinRequestToJSON(value?: AssignGtinRequest | null): any {
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+
58
+ 'variantRef': value['variantRef'],
59
+ };
60
+ }
61
+
@@ -0,0 +1,70 @@
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
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface GTIN
20
+ */
21
+ export interface GTIN {
22
+ /**
23
+ * The GTIN
24
+ * @type {string}
25
+ * @memberof GTIN
26
+ */
27
+ number: string;
28
+ /**
29
+ * A reference to the resource location
30
+ * @type {string}
31
+ * @memberof GTIN
32
+ */
33
+ variantRef: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the GTIN interface.
38
+ */
39
+ export function instanceOfGTIN(value: object): boolean {
40
+ if (!('number' in value)) return false;
41
+ if (!('variantRef' in value)) return false;
42
+ return true;
43
+ }
44
+
45
+ export function GTINFromJSON(json: any): GTIN {
46
+ return GTINFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function GTINFromJSONTyped(json: any, ignoreDiscriminator: boolean): GTIN {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'number': json['number'],
56
+ 'variantRef': json['variantRef'],
57
+ };
58
+ }
59
+
60
+ export function GTINToJSON(value?: GTIN | null): any {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+
66
+ 'number': value['number'],
67
+ 'variantRef': value['variantRef'],
68
+ };
69
+ }
70
+
@@ -0,0 +1,75 @@
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
+ import { mapValues } from '../runtime';
16
+ import type { GTIN } from './GTIN';
17
+ import {
18
+ GTINFromJSON,
19
+ GTINFromJSONTyped,
20
+ GTINToJSON,
21
+ } from './GTIN';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface GTINsResponse
27
+ */
28
+ export interface GTINsResponse {
29
+ /**
30
+ *
31
+ * @type {Array<GTIN>}
32
+ * @memberof GTINsResponse
33
+ */
34
+ gtins?: Array<GTIN>;
35
+ /**
36
+ *
37
+ * @type {number}
38
+ * @memberof GTINsResponse
39
+ */
40
+ nextPageToken?: number;
41
+ }
42
+
43
+ /**
44
+ * Check if a given object implements the GTINsResponse interface.
45
+ */
46
+ export function instanceOfGTINsResponse(value: object): boolean {
47
+ return true;
48
+ }
49
+
50
+ export function GTINsResponseFromJSON(json: any): GTINsResponse {
51
+ return GTINsResponseFromJSONTyped(json, false);
52
+ }
53
+
54
+ export function GTINsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GTINsResponse {
55
+ if (json == null) {
56
+ return json;
57
+ }
58
+ return {
59
+
60
+ 'gtins': json['gtins'] == null ? undefined : ((json['gtins'] as Array<any>).map(GTINFromJSON)),
61
+ 'nextPageToken': json['nextPageToken'] == null ? undefined : json['nextPageToken'],
62
+ };
63
+ }
64
+
65
+ export function GTINsResponseToJSON(value?: GTINsResponse | null): any {
66
+ if (value == null) {
67
+ return value;
68
+ }
69
+ return {
70
+
71
+ 'gtins': value['gtins'] == null ? undefined : ((value['gtins'] as Array<any>).map(GTINToJSON)),
72
+ 'nextPageToken': value['nextPageToken'],
73
+ };
74
+ }
75
+
@@ -0,0 +1,60 @@
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
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ImportGtins202Response
20
+ */
21
+ export interface ImportGtins202Response {
22
+ /**
23
+ * Id of the GTINs import
24
+ * @type {string}
25
+ * @memberof ImportGtins202Response
26
+ */
27
+ importId?: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the ImportGtins202Response interface.
32
+ */
33
+ export function instanceOfImportGtins202Response(value: object): boolean {
34
+ return true;
35
+ }
36
+
37
+ export function ImportGtins202ResponseFromJSON(json: any): ImportGtins202Response {
38
+ return ImportGtins202ResponseFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function ImportGtins202ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImportGtins202Response {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+
47
+ 'importId': json['importId'] == null ? undefined : json['importId'],
48
+ };
49
+ }
50
+
51
+ export function ImportGtins202ResponseToJSON(value?: ImportGtins202Response | null): any {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+
57
+ 'importId': value['importId'],
58
+ };
59
+ }
60
+
@@ -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';