@teemill/gtins 0.2.1 → 0.3.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/README.md +2 -2
- package/dist/apis/GTINsApi.d.ts +15 -1
- package/dist/apis/GTINsApi.js +46 -1
- package/dist/esm/apis/GTINsApi.d.ts +15 -1
- package/dist/esm/apis/GTINsApi.js +46 -1
- package/dist/esm/models/ApiError.d.ts +1 -1
- package/dist/esm/models/ApiError.js +1 -1
- package/dist/esm/models/AssignGtinRequest.d.ts +1 -1
- package/dist/esm/models/AssignGtinRequest.js +1 -1
- package/dist/esm/models/GTIN.d.ts +1 -1
- package/dist/esm/models/GTIN.js +1 -1
- package/dist/esm/models/GTINsResponse.d.ts +1 -1
- package/dist/esm/models/GTINsResponse.js +1 -1
- package/dist/esm/models/ImportGtins202Response.d.ts +1 -1
- package/dist/esm/models/ImportGtins202Response.js +1 -1
- package/dist/esm/runtime.d.ts +1 -1
- package/dist/esm/runtime.js +1 -1
- package/dist/models/ApiError.d.ts +1 -1
- package/dist/models/ApiError.js +1 -1
- package/dist/models/AssignGtinRequest.d.ts +1 -1
- package/dist/models/AssignGtinRequest.js +1 -1
- package/dist/models/GTIN.d.ts +1 -1
- package/dist/models/GTIN.js +1 -1
- package/dist/models/GTINsResponse.d.ts +1 -1
- package/dist/models/GTINsResponse.js +1 -1
- package/dist/models/ImportGtins202Response.d.ts +1 -1
- package/dist/models/ImportGtins202Response.js +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/package.json +1 -1
- package/src/apis/GTINsApi.ts +64 -1
- package/src/models/ApiError.ts +1 -1
- package/src/models/AssignGtinRequest.ts +1 -1
- package/src/models/GTIN.ts +1 -1
- package/src/models/GTINsResponse.ts +1 -1
- package/src/models/ImportGtins202Response.ts +1 -1
- package/src/runtime.ts +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @teemill/gtins@0.
|
|
1
|
+
## @teemill/gtins@0.3.0
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @teemill/gtins@0.
|
|
39
|
+
npm install @teemill/gtins@0.3.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/dist/apis/GTINsApi.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* GTINs API
|
|
3
3
|
* Manage GTINs
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 0.
|
|
5
|
+
* The version of the OpenAPI document: 0.3.0
|
|
6
6
|
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -16,6 +16,10 @@ export interface AssignGtinOperationRequest {
|
|
|
16
16
|
gtin: string;
|
|
17
17
|
assignGtinRequest?: AssignGtinRequest;
|
|
18
18
|
}
|
|
19
|
+
export interface GetGtinRequest {
|
|
20
|
+
project: string;
|
|
21
|
+
gtin: string;
|
|
22
|
+
}
|
|
19
23
|
export interface ImportGtinsRequest {
|
|
20
24
|
project: string;
|
|
21
25
|
body?: string;
|
|
@@ -44,6 +48,16 @@ export declare class GTINsApi extends runtime.BaseAPI {
|
|
|
44
48
|
* Assign GTIN
|
|
45
49
|
*/
|
|
46
50
|
assignGtin(project: string, gtin: string, optionalParameters?: runtime.OptionalOnly<AssignGtinOperationRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GTIN>;
|
|
51
|
+
/**
|
|
52
|
+
* Get a GTIN
|
|
53
|
+
* Get GTIN
|
|
54
|
+
*/
|
|
55
|
+
getGtinRaw(requestParameters: GetGtinRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GTIN>>;
|
|
56
|
+
/**
|
|
57
|
+
* Get a GTIN
|
|
58
|
+
* Get GTIN
|
|
59
|
+
*/
|
|
60
|
+
getGtin(project: string, gtin: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GTIN>;
|
|
47
61
|
/**
|
|
48
62
|
* Initiates a GTINs import from a CSV file. The result will be available as a notification in the dashboard.
|
|
49
63
|
* Import GTINs
|
package/dist/apis/GTINsApi.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* GTINs API
|
|
6
6
|
* Manage GTINs
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 0.
|
|
8
|
+
* The version of the OpenAPI document: 0.3.0
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -74,6 +74,51 @@ class GTINsApi extends runtime.BaseAPI {
|
|
|
74
74
|
return yield response.value();
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Get a GTIN
|
|
79
|
+
* Get GTIN
|
|
80
|
+
*/
|
|
81
|
+
getGtinRaw(requestParameters, initOverrides) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
84
|
+
throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling getGtin.');
|
|
85
|
+
}
|
|
86
|
+
if (requestParameters.gtin === null || requestParameters.gtin === undefined) {
|
|
87
|
+
throw new runtime.RequiredError('gtin', 'Required parameter requestParameters.gtin was null or undefined when calling getGtin.');
|
|
88
|
+
}
|
|
89
|
+
const queryParameters = {};
|
|
90
|
+
if (requestParameters.project !== undefined) {
|
|
91
|
+
queryParameters['project'] = requestParameters.project;
|
|
92
|
+
}
|
|
93
|
+
const headerParameters = {};
|
|
94
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
95
|
+
// oauth required
|
|
96
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
|
|
97
|
+
}
|
|
98
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
99
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
100
|
+
}
|
|
101
|
+
const response = yield this.request({
|
|
102
|
+
path: `/v1/gtins/{gtin}`.replace(`{${"gtin"}}`, encodeURIComponent(String(requestParameters.gtin))),
|
|
103
|
+
method: 'GET',
|
|
104
|
+
headers: headerParameters,
|
|
105
|
+
query: queryParameters,
|
|
106
|
+
}, initOverrides);
|
|
107
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GTINFromJSON)(jsonValue));
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Get a GTIN
|
|
112
|
+
* Get GTIN
|
|
113
|
+
*/
|
|
114
|
+
getGtin(project, gtin, initOverrides) {
|
|
115
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
116
|
+
const response = yield this.getGtinRaw({
|
|
117
|
+
project: project, gtin: gtin,
|
|
118
|
+
}, initOverrides);
|
|
119
|
+
return yield response.value();
|
|
120
|
+
});
|
|
121
|
+
}
|
|
77
122
|
/**
|
|
78
123
|
* Initiates a GTINs import from a CSV file. The result will be available as a notification in the dashboard.
|
|
79
124
|
* Import GTINs
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* GTINs API
|
|
3
3
|
* Manage GTINs
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 0.
|
|
5
|
+
* The version of the OpenAPI document: 0.3.0
|
|
6
6
|
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -16,6 +16,10 @@ export interface AssignGtinOperationRequest {
|
|
|
16
16
|
gtin: string;
|
|
17
17
|
assignGtinRequest?: AssignGtinRequest;
|
|
18
18
|
}
|
|
19
|
+
export interface GetGtinRequest {
|
|
20
|
+
project: string;
|
|
21
|
+
gtin: string;
|
|
22
|
+
}
|
|
19
23
|
export interface ImportGtinsRequest {
|
|
20
24
|
project: string;
|
|
21
25
|
body?: string;
|
|
@@ -44,6 +48,16 @@ export declare class GTINsApi extends runtime.BaseAPI {
|
|
|
44
48
|
* Assign GTIN
|
|
45
49
|
*/
|
|
46
50
|
assignGtin(project: string, gtin: string, optionalParameters?: runtime.OptionalOnly<AssignGtinOperationRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GTIN>;
|
|
51
|
+
/**
|
|
52
|
+
* Get a GTIN
|
|
53
|
+
* Get GTIN
|
|
54
|
+
*/
|
|
55
|
+
getGtinRaw(requestParameters: GetGtinRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GTIN>>;
|
|
56
|
+
/**
|
|
57
|
+
* Get a GTIN
|
|
58
|
+
* Get GTIN
|
|
59
|
+
*/
|
|
60
|
+
getGtin(project: string, gtin: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GTIN>;
|
|
47
61
|
/**
|
|
48
62
|
* Initiates a GTINs import from a CSV file. The result will be available as a notification in the dashboard.
|
|
49
63
|
* Import GTINs
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* GTINs API
|
|
5
5
|
* Manage GTINs
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 0.
|
|
7
|
+
* The version of the OpenAPI document: 0.3.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -71,6 +71,51 @@ export class GTINsApi extends runtime.BaseAPI {
|
|
|
71
71
|
return yield response.value();
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Get a GTIN
|
|
76
|
+
* Get GTIN
|
|
77
|
+
*/
|
|
78
|
+
getGtinRaw(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 getGtin.');
|
|
82
|
+
}
|
|
83
|
+
if (requestParameters.gtin === null || requestParameters.gtin === undefined) {
|
|
84
|
+
throw new runtime.RequiredError('gtin', 'Required parameter requestParameters.gtin was null or undefined when calling getGtin.');
|
|
85
|
+
}
|
|
86
|
+
const queryParameters = {};
|
|
87
|
+
if (requestParameters.project !== undefined) {
|
|
88
|
+
queryParameters['project'] = requestParameters.project;
|
|
89
|
+
}
|
|
90
|
+
const headerParameters = {};
|
|
91
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
92
|
+
// oauth required
|
|
93
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
|
|
94
|
+
}
|
|
95
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
96
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
97
|
+
}
|
|
98
|
+
const response = yield this.request({
|
|
99
|
+
path: `/v1/gtins/{gtin}`.replace(`{${"gtin"}}`, encodeURIComponent(String(requestParameters.gtin))),
|
|
100
|
+
method: 'GET',
|
|
101
|
+
headers: headerParameters,
|
|
102
|
+
query: queryParameters,
|
|
103
|
+
}, initOverrides);
|
|
104
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GTINFromJSON(jsonValue));
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get a GTIN
|
|
109
|
+
* Get GTIN
|
|
110
|
+
*/
|
|
111
|
+
getGtin(project, gtin, initOverrides) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
const response = yield this.getGtinRaw({
|
|
114
|
+
project: project, gtin: gtin,
|
|
115
|
+
}, initOverrides);
|
|
116
|
+
return yield response.value();
|
|
117
|
+
});
|
|
118
|
+
}
|
|
74
119
|
/**
|
|
75
120
|
* Initiates a GTINs import from a CSV file. The result will be available as a notification in the dashboard.
|
|
76
121
|
* Import GTINs
|
package/dist/esm/models/GTIN.js
CHANGED
package/dist/esm/runtime.d.ts
CHANGED
package/dist/esm/runtime.js
CHANGED
package/dist/models/ApiError.js
CHANGED
package/dist/models/GTIN.d.ts
CHANGED
package/dist/models/GTIN.js
CHANGED
package/dist/runtime.d.ts
CHANGED
package/dist/runtime.js
CHANGED
package/package.json
CHANGED
package/src/apis/GTINsApi.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* GTINs API
|
|
5
5
|
* Manage GTINs
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 0.
|
|
7
|
+
* The version of the OpenAPI document: 0.3.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -40,6 +40,11 @@ export interface AssignGtinOperationRequest {
|
|
|
40
40
|
assignGtinRequest?: AssignGtinRequest;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
export interface GetGtinRequest {
|
|
44
|
+
project: string;
|
|
45
|
+
gtin: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
43
48
|
export interface ImportGtinsRequest {
|
|
44
49
|
project: string;
|
|
45
50
|
body?: string;
|
|
@@ -125,6 +130,64 @@ export class GTINsApi extends runtime.BaseAPI {
|
|
|
125
130
|
return await response.value();
|
|
126
131
|
}
|
|
127
132
|
|
|
133
|
+
/**
|
|
134
|
+
* Get a GTIN
|
|
135
|
+
* Get GTIN
|
|
136
|
+
*/
|
|
137
|
+
async getGtinRaw(requestParameters: GetGtinRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GTIN>> {
|
|
138
|
+
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
139
|
+
throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling getGtin.');
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (requestParameters.gtin === null || requestParameters.gtin === undefined) {
|
|
143
|
+
throw new runtime.RequiredError('gtin','Required parameter requestParameters.gtin was null or undefined when calling getGtin.');
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const queryParameters: any = {};
|
|
147
|
+
|
|
148
|
+
if (requestParameters.project !== undefined) {
|
|
149
|
+
queryParameters['project'] = requestParameters.project;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
153
|
+
|
|
154
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
155
|
+
// oauth required
|
|
156
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
160
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const response = await this.request({
|
|
164
|
+
path: `/v1/gtins/{gtin}`.replace(`{${"gtin"}}`, encodeURIComponent(String(requestParameters.gtin))),
|
|
165
|
+
method: 'GET',
|
|
166
|
+
headers: headerParameters,
|
|
167
|
+
query: queryParameters,
|
|
168
|
+
}, initOverrides);
|
|
169
|
+
|
|
170
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GTINFromJSON(jsonValue));
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Get a GTIN
|
|
175
|
+
* Get GTIN
|
|
176
|
+
*/
|
|
177
|
+
async getGtin(
|
|
178
|
+
project: string, gtin: string,
|
|
179
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
180
|
+
): Promise<GTIN> {
|
|
181
|
+
const response = await this.getGtinRaw(
|
|
182
|
+
{
|
|
183
|
+
project: project,gtin: gtin,
|
|
184
|
+
},
|
|
185
|
+
initOverrides
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
return await response.value();
|
|
189
|
+
}
|
|
190
|
+
|
|
128
191
|
/**
|
|
129
192
|
* Initiates a GTINs import from a CSV file. The result will be available as a notification in the dashboard.
|
|
130
193
|
* Import GTINs
|
package/src/models/ApiError.ts
CHANGED
package/src/models/GTIN.ts
CHANGED
package/src/runtime.ts
CHANGED