@teemill/warehouse-packaging 0.1.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.
@@ -0,0 +1,13 @@
1
+ .gitignore
2
+ .npmignore
3
+ README.md
4
+ package.json
5
+ src/apis/PackagingApi.ts
6
+ src/apis/index.ts
7
+ src/index.ts
8
+ src/models/ApiError.ts
9
+ src/models/Packaging.ts
10
+ src/models/PackagingListResponse.ts
11
+ src/models/index.ts
12
+ src/runtime.ts
13
+ tsconfig.json
@@ -0,0 +1 @@
1
+ 7.3.0
@@ -0,0 +1,23 @@
1
+ # OpenAPI Generator Ignore
2
+ # Generated by openapi-generator https://github.com/openapitools/openapi-generator
3
+
4
+ # Use this file to prevent files from being overwritten by the generator.
5
+ # The patterns follow closely to .gitignore or .dockerignore.
6
+
7
+ # As an example, the C# client generator defines ApiClient.cs.
8
+ # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9
+ #ApiClient.cs
10
+
11
+ # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12
+ #foo/*/qux
13
+ # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14
+
15
+ # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16
+ #foo/**/qux
17
+ # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18
+
19
+ # You can also negate patterns with an exclamation (!).
20
+ # For example, you can ignore all files in a docs folder with the file extension .md:
21
+ #docs/*.md
22
+ # Then explicitly reverse the ignore rule for a single file:
23
+ #!docs/README.md
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ ## @teemill/warehouse-packaging@0.1.0
2
+
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
+
5
+ Environment
6
+ * Node.js
7
+ * Webpack
8
+ * Browserify
9
+
10
+ Language level
11
+ * ES5 - you must have a Promises/A+ library installed
12
+ * ES6
13
+
14
+ Module system
15
+ * CommonJS
16
+ * ES6 module system
17
+
18
+ It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html))
19
+
20
+ ### Building
21
+
22
+ To build and compile the typescript sources to javascript use:
23
+ ```
24
+ npm install
25
+ npm run build
26
+ ```
27
+
28
+ ### Publishing
29
+
30
+ First build the package then run `npm publish`
31
+
32
+ ### Consuming
33
+
34
+ navigate to the folder of your consuming project and run one of the following commands.
35
+
36
+ _published:_
37
+
38
+ ```
39
+ npm install @teemill/warehouse-packaging@0.1.0 --save
40
+ ```
41
+
42
+ _unPublished (not recommended):_
43
+
44
+ ```
45
+ npm install PATH_TO_GENERATED_PACKAGE --save
46
+ ```
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Packaging API
3
+ * Manage Packaging Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
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 * as runtime from '../runtime';
13
+ import type { Packaging, PackagingListResponse } from '../models/index';
14
+ export interface GetPackagingRequest {
15
+ project: string;
16
+ packagingId: string;
17
+ }
18
+ export interface ListPackagingRequest {
19
+ project: string;
20
+ pageToken?: number;
21
+ pageSize?: number;
22
+ }
23
+ /**
24
+ *
25
+ */
26
+ export declare class PackagingApi extends runtime.BaseAPI {
27
+ /**
28
+ * Get packaging
29
+ * Get a packaging resource
30
+ */
31
+ getPackagingRaw(requestParameters: GetPackagingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Packaging>>;
32
+ /**
33
+ * Get packaging
34
+ * Get a packaging resource
35
+ */
36
+ getPackaging(project: string, packagingId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Packaging>;
37
+ /**
38
+ * Lists packaging items paginated into chunks
39
+ * List packaging
40
+ */
41
+ listPackagingRaw(requestParameters: ListPackagingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PackagingListResponse>>;
42
+ /**
43
+ * Lists packaging items paginated into chunks
44
+ * List packaging
45
+ */
46
+ listPackaging(project: string, optionalParameters?: runtime.OptionalOnly<ListPackagingRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PackagingListResponse>;
47
+ }
@@ -0,0 +1,227 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Packaging API
6
+ * Manage Packaging Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ * Contact: hello@teemill.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ Object.defineProperty(exports, "__esModule", { value: true });
78
+ exports.PackagingApi = void 0;
79
+ var runtime = require("../runtime");
80
+ var index_1 = require("../models/index");
81
+ /**
82
+ *
83
+ */
84
+ var PackagingApi = /** @class */ (function (_super) {
85
+ __extends(PackagingApi, _super);
86
+ function PackagingApi() {
87
+ return _super !== null && _super.apply(this, arguments) || this;
88
+ }
89
+ /**
90
+ * Get packaging
91
+ * Get a packaging resource
92
+ */
93
+ PackagingApi.prototype.getPackagingRaw = function (requestParameters, initOverrides) {
94
+ return __awaiter(this, void 0, void 0, function () {
95
+ var queryParameters, headerParameters, _a, _b, response;
96
+ return __generator(this, function (_c) {
97
+ switch (_c.label) {
98
+ case 0:
99
+ if (requestParameters.project === null || requestParameters.project === undefined) {
100
+ throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling getPackaging.');
101
+ }
102
+ if (requestParameters.packagingId === null || requestParameters.packagingId === undefined) {
103
+ throw new runtime.RequiredError('packagingId', 'Required parameter requestParameters.packagingId was null or undefined when calling getPackaging.');
104
+ }
105
+ queryParameters = {};
106
+ if (requestParameters.project !== undefined) {
107
+ queryParameters['project'] = requestParameters.project;
108
+ }
109
+ headerParameters = {};
110
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
111
+ // oauth required
112
+ _a = headerParameters;
113
+ _b = "Authorization";
114
+ return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
115
+ case 1:
116
+ // oauth required
117
+ _a[_b] = _c.sent();
118
+ _c.label = 2;
119
+ case 2:
120
+ if (this.configuration && this.configuration.apiKey) {
121
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
122
+ }
123
+ return [4 /*yield*/, this.request({
124
+ path: "/v1/warehouse/packaging/{packagingId}".replace("{".concat("packagingId", "}"), encodeURIComponent(String(requestParameters.packagingId))),
125
+ method: 'GET',
126
+ headers: headerParameters,
127
+ query: queryParameters,
128
+ }, initOverrides)];
129
+ case 3:
130
+ response = _c.sent();
131
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PackagingFromJSON)(jsonValue); })];
132
+ }
133
+ });
134
+ });
135
+ };
136
+ /**
137
+ * Get packaging
138
+ * Get a packaging resource
139
+ */
140
+ PackagingApi.prototype.getPackaging = function (project, packagingId, initOverrides) {
141
+ return __awaiter(this, void 0, void 0, function () {
142
+ var response;
143
+ return __generator(this, function (_a) {
144
+ switch (_a.label) {
145
+ case 0: return [4 /*yield*/, this.getPackagingRaw({
146
+ project: project, packagingId: packagingId,
147
+ }, initOverrides)];
148
+ case 1:
149
+ response = _a.sent();
150
+ return [4 /*yield*/, response.value()];
151
+ case 2: return [2 /*return*/, _a.sent()];
152
+ }
153
+ });
154
+ });
155
+ };
156
+ /**
157
+ * Lists packaging items paginated into chunks
158
+ * List packaging
159
+ */
160
+ PackagingApi.prototype.listPackagingRaw = function (requestParameters, initOverrides) {
161
+ return __awaiter(this, void 0, void 0, function () {
162
+ var queryParameters, headerParameters, _a, _b, response;
163
+ return __generator(this, function (_c) {
164
+ switch (_c.label) {
165
+ case 0:
166
+ if (requestParameters.project === null || requestParameters.project === undefined) {
167
+ throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling listPackaging.');
168
+ }
169
+ queryParameters = {};
170
+ if (requestParameters.project !== undefined) {
171
+ queryParameters['project'] = requestParameters.project;
172
+ }
173
+ if (requestParameters.pageToken !== undefined) {
174
+ queryParameters['pageToken'] = requestParameters.pageToken;
175
+ }
176
+ if (requestParameters.pageSize !== undefined) {
177
+ queryParameters['pageSize'] = requestParameters.pageSize;
178
+ }
179
+ headerParameters = {};
180
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
181
+ // oauth required
182
+ _a = headerParameters;
183
+ _b = "Authorization";
184
+ return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
185
+ case 1:
186
+ // oauth required
187
+ _a[_b] = _c.sent();
188
+ _c.label = 2;
189
+ case 2:
190
+ if (this.configuration && this.configuration.apiKey) {
191
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
192
+ }
193
+ return [4 /*yield*/, this.request({
194
+ path: "/v1/warehouse/packaging",
195
+ method: 'GET',
196
+ headers: headerParameters,
197
+ query: queryParameters,
198
+ }, initOverrides)];
199
+ case 3:
200
+ response = _c.sent();
201
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PackagingListResponseFromJSON)(jsonValue); })];
202
+ }
203
+ });
204
+ });
205
+ };
206
+ /**
207
+ * Lists packaging items paginated into chunks
208
+ * List packaging
209
+ */
210
+ PackagingApi.prototype.listPackaging = function (project, optionalParameters, initOverrides) {
211
+ if (optionalParameters === void 0) { optionalParameters = {}; }
212
+ return __awaiter(this, void 0, void 0, function () {
213
+ var response;
214
+ return __generator(this, function (_a) {
215
+ switch (_a.label) {
216
+ case 0: return [4 /*yield*/, this.listPackagingRaw(__assign({ project: project }, optionalParameters), initOverrides)];
217
+ case 1:
218
+ response = _a.sent();
219
+ return [4 /*yield*/, response.value()];
220
+ case 2: return [2 /*return*/, _a.sent()];
221
+ }
222
+ });
223
+ });
224
+ };
225
+ return PackagingApi;
226
+ }(runtime.BaseAPI));
227
+ exports.PackagingApi = PackagingApi;
@@ -0,0 +1 @@
1
+ export * from './PackagingApi';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /* tslint:disable */
18
+ /* eslint-disable */
19
+ __exportStar(require("./PackagingApi"), exports);
@@ -0,0 +1,3 @@
1
+ export * from './runtime';
2
+ export * from './apis/index';
3
+ export * from './models/index';
package/dist/index.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /* tslint:disable */
18
+ /* eslint-disable */
19
+ __exportStar(require("./runtime"), exports);
20
+ __exportStar(require("./apis/index"), exports);
21
+ __exportStar(require("./models/index"), exports);
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Packaging API
3
+ * Manage Packaging Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
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,53 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Packaging API
6
+ * Manage Packaging Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ * Contact: hello@teemill.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ApiErrorToJSON = exports.ApiErrorFromJSONTyped = exports.ApiErrorFromJSON = exports.instanceOfApiError = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * Check if a given object implements the ApiError interface.
20
+ */
21
+ function instanceOfApiError(value) {
22
+ var isInstance = true;
23
+ isInstance = isInstance && "message" in value;
24
+ return isInstance;
25
+ }
26
+ exports.instanceOfApiError = instanceOfApiError;
27
+ function ApiErrorFromJSON(json) {
28
+ return ApiErrorFromJSONTyped(json, false);
29
+ }
30
+ exports.ApiErrorFromJSON = ApiErrorFromJSON;
31
+ function ApiErrorFromJSONTyped(json, ignoreDiscriminator) {
32
+ if ((json === undefined) || (json === null)) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'code': !(0, runtime_1.exists)(json, 'code') ? undefined : json['code'],
37
+ 'message': json['message'],
38
+ };
39
+ }
40
+ exports.ApiErrorFromJSONTyped = ApiErrorFromJSONTyped;
41
+ function ApiErrorToJSON(value) {
42
+ if (value === undefined) {
43
+ return undefined;
44
+ }
45
+ if (value === null) {
46
+ return null;
47
+ }
48
+ return {
49
+ 'code': value.code,
50
+ 'message': value.message,
51
+ };
52
+ }
53
+ exports.ApiErrorToJSON = ApiErrorToJSON;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Packaging API
3
+ * Manage Packaging Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
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 Packaging
16
+ */
17
+ export interface Packaging {
18
+ /**
19
+ * Unique object identifier
20
+ * @type {string}
21
+ * @memberof Packaging
22
+ */
23
+ id: string;
24
+ /**
25
+ * A reference to the resource location
26
+ * @type {string}
27
+ * @memberof Packaging
28
+ */
29
+ ref: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof Packaging
34
+ */
35
+ name: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof Packaging
40
+ */
41
+ image: string;
42
+ /**
43
+ * Weight in grams
44
+ * @type {number}
45
+ * @memberof Packaging
46
+ */
47
+ weight: number;
48
+ }
49
+ /**
50
+ * Check if a given object implements the Packaging interface.
51
+ */
52
+ export declare function instanceOfPackaging(value: object): boolean;
53
+ export declare function PackagingFromJSON(json: any): Packaging;
54
+ export declare function PackagingFromJSONTyped(json: any, ignoreDiscriminator: boolean): Packaging;
55
+ export declare function PackagingToJSON(value?: Packaging | null): any;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Packaging API
6
+ * Manage Packaging Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ * Contact: hello@teemill.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PackagingToJSON = exports.PackagingFromJSONTyped = exports.PackagingFromJSON = exports.instanceOfPackaging = void 0;
17
+ /**
18
+ * Check if a given object implements the Packaging interface.
19
+ */
20
+ function instanceOfPackaging(value) {
21
+ var isInstance = true;
22
+ isInstance = isInstance && "id" in value;
23
+ isInstance = isInstance && "ref" in value;
24
+ isInstance = isInstance && "name" in value;
25
+ isInstance = isInstance && "image" in value;
26
+ isInstance = isInstance && "weight" in value;
27
+ return isInstance;
28
+ }
29
+ exports.instanceOfPackaging = instanceOfPackaging;
30
+ function PackagingFromJSON(json) {
31
+ return PackagingFromJSONTyped(json, false);
32
+ }
33
+ exports.PackagingFromJSON = PackagingFromJSON;
34
+ function PackagingFromJSONTyped(json, ignoreDiscriminator) {
35
+ if ((json === undefined) || (json === null)) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'id': json['id'],
40
+ 'ref': json['ref'],
41
+ 'name': json['name'],
42
+ 'image': json['image'],
43
+ 'weight': json['weight'],
44
+ };
45
+ }
46
+ exports.PackagingFromJSONTyped = PackagingFromJSONTyped;
47
+ function PackagingToJSON(value) {
48
+ if (value === undefined) {
49
+ return undefined;
50
+ }
51
+ if (value === null) {
52
+ return null;
53
+ }
54
+ return {
55
+ 'id': value.id,
56
+ 'ref': value.ref,
57
+ 'name': value.name,
58
+ 'image': value.image,
59
+ 'weight': value.weight,
60
+ };
61
+ }
62
+ exports.PackagingToJSON = PackagingToJSON;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Packaging API
3
+ * Manage Packaging Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
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 { Packaging } from './Packaging';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface PackagingListResponse
17
+ */
18
+ export interface PackagingListResponse {
19
+ /**
20
+ *
21
+ * @type {Array<Packaging>}
22
+ * @memberof PackagingListResponse
23
+ */
24
+ packaging: Array<Packaging>;
25
+ /**
26
+ *
27
+ * @type {number}
28
+ * @memberof PackagingListResponse
29
+ */
30
+ nextPageToken: number;
31
+ }
32
+ /**
33
+ * Check if a given object implements the PackagingListResponse interface.
34
+ */
35
+ export declare function instanceOfPackagingListResponse(value: object): boolean;
36
+ export declare function PackagingListResponseFromJSON(json: any): PackagingListResponse;
37
+ export declare function PackagingListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PackagingListResponse;
38
+ export declare function PackagingListResponseToJSON(value?: PackagingListResponse | null): any;