@teemill/warehouse-packaging 0.1.0 → 0.1.2

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 (59) hide show
  1. package/README.md +41 -3
  2. package/api.ts +364 -0
  3. package/base.ts +86 -0
  4. package/common.ts +150 -0
  5. package/configuration.ts +115 -0
  6. package/dist/api.d.ts +232 -0
  7. package/dist/api.js +230 -0
  8. package/dist/base.d.ts +66 -0
  9. package/dist/base.js +65 -0
  10. package/dist/common.d.ts +65 -0
  11. package/dist/common.js +161 -0
  12. package/dist/configuration.d.ts +91 -0
  13. package/dist/configuration.js +44 -0
  14. package/dist/esm/api.d.ts +232 -0
  15. package/dist/esm/api.js +223 -0
  16. package/dist/esm/base.d.ts +66 -0
  17. package/dist/esm/base.js +60 -0
  18. package/dist/esm/common.d.ts +65 -0
  19. package/dist/esm/common.js +149 -0
  20. package/dist/esm/configuration.d.ts +91 -0
  21. package/dist/esm/configuration.js +40 -0
  22. package/dist/esm/index.d.ts +13 -0
  23. package/dist/esm/index.js +15 -0
  24. package/dist/index.d.ts +13 -3
  25. package/dist/index.js +15 -5
  26. package/docs/ApiError.md +22 -0
  27. package/docs/Packaging.md +28 -0
  28. package/docs/PackagingApi.md +128 -0
  29. package/docs/PackagingListResponse.md +22 -0
  30. package/git_push.sh +57 -0
  31. package/index.ts +18 -0
  32. package/package.json +18 -4
  33. package/tsconfig.esm.json +7 -0
  34. package/tsconfig.json +4 -6
  35. package/.openapi-generator/FILES +0 -13
  36. package/.openapi-generator/VERSION +0 -1
  37. package/.openapi-generator-ignore +0 -23
  38. package/dist/apis/PackagingApi.d.ts +0 -47
  39. package/dist/apis/PackagingApi.js +0 -227
  40. package/dist/apis/index.d.ts +0 -1
  41. package/dist/apis/index.js +0 -19
  42. package/dist/models/ApiError.d.ts +0 -37
  43. package/dist/models/ApiError.js +0 -53
  44. package/dist/models/Packaging.d.ts +0 -55
  45. package/dist/models/Packaging.js +0 -62
  46. package/dist/models/PackagingListResponse.d.ts +0 -38
  47. package/dist/models/PackagingListResponse.js +0 -54
  48. package/dist/models/index.d.ts +0 -3
  49. package/dist/models/index.js +0 -21
  50. package/dist/runtime.d.ts +0 -187
  51. package/dist/runtime.js +0 -565
  52. package/src/apis/PackagingApi.ts +0 -169
  53. package/src/apis/index.ts +0 -3
  54. package/src/index.ts +0 -5
  55. package/src/models/ApiError.ts +0 -74
  56. package/src/models/Packaging.ts +0 -102
  57. package/src/models/PackagingListResponse.ts +0 -82
  58. package/src/models/index.ts +0 -5
  59. package/src/runtime.ts +0 -441
@@ -0,0 +1,115 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Packaging API
5
+ * Manage Packaging
6
+ *
7
+ * The version of the OpenAPI document: 0.1.2
8
+ *
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
+
16
+ export interface ConfigurationParameters {
17
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
18
+ username?: string;
19
+ password?: string;
20
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
21
+ basePath?: string;
22
+ serverIndex?: number;
23
+ baseOptions?: any;
24
+ formDataCtor?: new () => any;
25
+ }
26
+
27
+ export class Configuration {
28
+ /**
29
+ * parameter for apiKey security
30
+ * @param name security name
31
+ * @memberof Configuration
32
+ */
33
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
34
+ /**
35
+ * parameter for basic security
36
+ *
37
+ * @type {string}
38
+ * @memberof Configuration
39
+ */
40
+ username?: string;
41
+ /**
42
+ * parameter for basic security
43
+ *
44
+ * @type {string}
45
+ * @memberof Configuration
46
+ */
47
+ password?: string;
48
+ /**
49
+ * parameter for oauth2 security
50
+ * @param name security name
51
+ * @param scopes oauth2 scope
52
+ * @memberof Configuration
53
+ */
54
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
55
+ /**
56
+ * override base path
57
+ *
58
+ * @type {string}
59
+ * @memberof Configuration
60
+ */
61
+ basePath?: string;
62
+ /**
63
+ * override server index
64
+ *
65
+ * @type {number}
66
+ * @memberof Configuration
67
+ */
68
+ serverIndex?: number;
69
+ /**
70
+ * base options for axios calls
71
+ *
72
+ * @type {any}
73
+ * @memberof Configuration
74
+ */
75
+ baseOptions?: any;
76
+ /**
77
+ * The FormData constructor that will be used to create multipart form data
78
+ * requests. You can inject this here so that execution environments that
79
+ * do not support the FormData class can still run the generated client.
80
+ *
81
+ * @type {new () => FormData}
82
+ */
83
+ formDataCtor?: new () => any;
84
+
85
+ constructor(param: ConfigurationParameters = {}) {
86
+ this.apiKey = param.apiKey;
87
+ this.username = param.username;
88
+ this.password = param.password;
89
+ this.accessToken = param.accessToken;
90
+ this.basePath = param.basePath;
91
+ this.serverIndex = param.serverIndex;
92
+ this.baseOptions = {
93
+ ...param.baseOptions,
94
+ headers: {
95
+ ...param.baseOptions?.headers,
96
+ },
97
+ };
98
+ this.formDataCtor = param.formDataCtor;
99
+ }
100
+
101
+ /**
102
+ * Check if the given MIME is a JSON MIME.
103
+ * JSON MIME examples:
104
+ * application/json
105
+ * application/json; charset=UTF8
106
+ * APPLICATION/JSON
107
+ * application/vnd.company+json
108
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
109
+ * @return True if the given MIME is JSON, false otherwise.
110
+ */
111
+ public isJsonMime(mime: string): boolean {
112
+ const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
113
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
114
+ }
115
+ }
package/dist/api.d.ts ADDED
@@ -0,0 +1,232 @@
1
+ /**
2
+ * Packaging API
3
+ * Manage Packaging
4
+ *
5
+ * The version of the OpenAPI document: 0.1.2
6
+ *
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 Packaging
39
+ */
40
+ export interface Packaging {
41
+ /**
42
+ * Unique object identifier
43
+ * @type {string}
44
+ * @memberof Packaging
45
+ */
46
+ 'id': string;
47
+ /**
48
+ * A reference to the resource location
49
+ * @type {string}
50
+ * @memberof Packaging
51
+ */
52
+ 'ref': string;
53
+ /**
54
+ *
55
+ * @type {string}
56
+ * @memberof Packaging
57
+ */
58
+ 'name': string;
59
+ /**
60
+ *
61
+ * @type {string}
62
+ * @memberof Packaging
63
+ */
64
+ 'image': string;
65
+ /**
66
+ * Weight in grams
67
+ * @type {number}
68
+ * @memberof Packaging
69
+ */
70
+ 'weight': number;
71
+ }
72
+ /**
73
+ *
74
+ * @export
75
+ * @interface PackagingListResponse
76
+ */
77
+ export interface PackagingListResponse {
78
+ /**
79
+ *
80
+ * @type {Array<Packaging>}
81
+ * @memberof PackagingListResponse
82
+ */
83
+ 'packaging': Array<Packaging>;
84
+ /**
85
+ *
86
+ * @type {number}
87
+ * @memberof PackagingListResponse
88
+ */
89
+ 'nextPageToken': number;
90
+ }
91
+ /**
92
+ * PackagingApi - axios parameter creator
93
+ * @export
94
+ */
95
+ export declare const PackagingApiAxiosParamCreator: (configuration?: Configuration) => {
96
+ /**
97
+ * Get packaging
98
+ * @summary Get a packaging resource
99
+ * @param {string} project What project it is
100
+ * @param {string} packagingId Unique identifier of packaging
101
+ * @param {*} [options] Override http request option.
102
+ * @throws {RequiredError}
103
+ */
104
+ getPackaging: (project: string, packagingId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
105
+ /**
106
+ * Lists packaging items paginated into chunks
107
+ * @summary List packaging
108
+ * @param {string} project What project it is
109
+ * @param {number} [pageToken] Page reference token
110
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
111
+ * @param {*} [options] Override http request option.
112
+ * @throws {RequiredError}
113
+ */
114
+ listPackaging: (project: string, pageToken?: number, pageSize?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
115
+ };
116
+ /**
117
+ * PackagingApi - functional programming interface
118
+ * @export
119
+ */
120
+ export declare const PackagingApiFp: (configuration?: Configuration) => {
121
+ /**
122
+ * Get packaging
123
+ * @summary Get a packaging resource
124
+ * @param {string} project What project it is
125
+ * @param {string} packagingId Unique identifier of packaging
126
+ * @param {*} [options] Override http request option.
127
+ * @throws {RequiredError}
128
+ */
129
+ getPackaging(project: string, packagingId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Packaging>>;
130
+ /**
131
+ * Lists packaging items paginated into chunks
132
+ * @summary List packaging
133
+ * @param {string} project What project it is
134
+ * @param {number} [pageToken] Page reference token
135
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
136
+ * @param {*} [options] Override http request option.
137
+ * @throws {RequiredError}
138
+ */
139
+ listPackaging(project: string, pageToken?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PackagingListResponse>>;
140
+ };
141
+ /**
142
+ * PackagingApi - factory interface
143
+ * @export
144
+ */
145
+ export declare const PackagingApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
146
+ /**
147
+ * Get packaging
148
+ * @summary Get a packaging resource
149
+ * @param {PackagingApiGetPackagingRequest} requestParameters Request parameters.
150
+ * @param {*} [options] Override http request option.
151
+ * @throws {RequiredError}
152
+ */
153
+ getPackaging(requestParameters: PackagingApiGetPackagingRequest, options?: RawAxiosRequestConfig): AxiosPromise<Packaging>;
154
+ /**
155
+ * Lists packaging items paginated into chunks
156
+ * @summary List packaging
157
+ * @param {PackagingApiListPackagingRequest} requestParameters Request parameters.
158
+ * @param {*} [options] Override http request option.
159
+ * @throws {RequiredError}
160
+ */
161
+ listPackaging(requestParameters: PackagingApiListPackagingRequest, options?: RawAxiosRequestConfig): AxiosPromise<PackagingListResponse>;
162
+ };
163
+ /**
164
+ * Request parameters for getPackaging operation in PackagingApi.
165
+ * @export
166
+ * @interface PackagingApiGetPackagingRequest
167
+ */
168
+ export interface PackagingApiGetPackagingRequest {
169
+ /**
170
+ * What project it is
171
+ * @type {string}
172
+ * @memberof PackagingApiGetPackaging
173
+ */
174
+ readonly project: string;
175
+ /**
176
+ * Unique identifier of packaging
177
+ * @type {string}
178
+ * @memberof PackagingApiGetPackaging
179
+ */
180
+ readonly packagingId: string;
181
+ }
182
+ /**
183
+ * Request parameters for listPackaging operation in PackagingApi.
184
+ * @export
185
+ * @interface PackagingApiListPackagingRequest
186
+ */
187
+ export interface PackagingApiListPackagingRequest {
188
+ /**
189
+ * What project it is
190
+ * @type {string}
191
+ * @memberof PackagingApiListPackaging
192
+ */
193
+ readonly project: string;
194
+ /**
195
+ * Page reference token
196
+ * @type {number}
197
+ * @memberof PackagingApiListPackaging
198
+ */
199
+ readonly pageToken?: number;
200
+ /**
201
+ * Max page size. This is the maximum page size that will be returned, but it might be smaller.
202
+ * @type {number}
203
+ * @memberof PackagingApiListPackaging
204
+ */
205
+ readonly pageSize?: number;
206
+ }
207
+ /**
208
+ * PackagingApi - object-oriented interface
209
+ * @export
210
+ * @class PackagingApi
211
+ * @extends {BaseAPI}
212
+ */
213
+ export declare class PackagingApi extends BaseAPI {
214
+ /**
215
+ * Get packaging
216
+ * @summary Get a packaging resource
217
+ * @param {PackagingApiGetPackagingRequest} requestParameters Request parameters.
218
+ * @param {*} [options] Override http request option.
219
+ * @throws {RequiredError}
220
+ * @memberof PackagingApi
221
+ */
222
+ getPackaging(requestParameters: PackagingApiGetPackagingRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Packaging, any>>;
223
+ /**
224
+ * Lists packaging items paginated into chunks
225
+ * @summary List packaging
226
+ * @param {PackagingApiListPackagingRequest} requestParameters Request parameters.
227
+ * @param {*} [options] Override http request option.
228
+ * @throws {RequiredError}
229
+ * @memberof PackagingApi
230
+ */
231
+ listPackaging(requestParameters: PackagingApiListPackagingRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<PackagingListResponse, any>>;
232
+ }
package/dist/api.js ADDED
@@ -0,0 +1,230 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Packaging API
6
+ * Manage Packaging
7
+ *
8
+ * The version of the OpenAPI document: 0.1.2
9
+ *
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.PackagingApi = exports.PackagingApiFactory = exports.PackagingApiFp = exports.PackagingApiAxiosParamCreator = void 0;
26
+ const axios_1 = require("axios");
27
+ // Some imports not used depending on template conditions
28
+ // @ts-ignore
29
+ const common_1 = require("./common");
30
+ // @ts-ignore
31
+ const base_1 = require("./base");
32
+ /**
33
+ * PackagingApi - axios parameter creator
34
+ * @export
35
+ */
36
+ const PackagingApiAxiosParamCreator = function (configuration) {
37
+ return {
38
+ /**
39
+ * Get packaging
40
+ * @summary Get a packaging resource
41
+ * @param {string} project What project it is
42
+ * @param {string} packagingId Unique identifier of packaging
43
+ * @param {*} [options] Override http request option.
44
+ * @throws {RequiredError}
45
+ */
46
+ getPackaging: (project_1, packagingId_1, ...args_1) => __awaiter(this, [project_1, packagingId_1, ...args_1], void 0, function* (project, packagingId, options = {}) {
47
+ // verify required parameter 'project' is not null or undefined
48
+ (0, common_1.assertParamExists)('getPackaging', 'project', project);
49
+ // verify required parameter 'packagingId' is not null or undefined
50
+ (0, common_1.assertParamExists)('getPackaging', 'packagingId', packagingId);
51
+ const localVarPath = `/v1/warehouse/packaging/{packagingId}`
52
+ .replace(`{${"packagingId"}}`, encodeURIComponent(String(packagingId)));
53
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
54
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
55
+ let baseOptions;
56
+ if (configuration) {
57
+ baseOptions = configuration.baseOptions;
58
+ }
59
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
60
+ const localVarHeaderParameter = {};
61
+ const localVarQueryParameter = {};
62
+ // authentication session-oauth required
63
+ // oauth required
64
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
65
+ // authentication api-key required
66
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
67
+ if (project !== undefined) {
68
+ localVarQueryParameter['project'] = project;
69
+ }
70
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
71
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
72
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
73
+ return {
74
+ url: (0, common_1.toPathString)(localVarUrlObj),
75
+ options: localVarRequestOptions,
76
+ };
77
+ }),
78
+ /**
79
+ * Lists packaging items paginated into chunks
80
+ * @summary List packaging
81
+ * @param {string} project What project it is
82
+ * @param {number} [pageToken] Page reference token
83
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
84
+ * @param {*} [options] Override http request option.
85
+ * @throws {RequiredError}
86
+ */
87
+ listPackaging: (project_1, pageToken_1, pageSize_1, ...args_1) => __awaiter(this, [project_1, pageToken_1, pageSize_1, ...args_1], void 0, function* (project, pageToken, pageSize, options = {}) {
88
+ // verify required parameter 'project' is not null or undefined
89
+ (0, common_1.assertParamExists)('listPackaging', 'project', project);
90
+ const localVarPath = `/v1/warehouse/packaging`;
91
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
92
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
93
+ let baseOptions;
94
+ if (configuration) {
95
+ baseOptions = configuration.baseOptions;
96
+ }
97
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
98
+ const localVarHeaderParameter = {};
99
+ const localVarQueryParameter = {};
100
+ // authentication session-oauth required
101
+ // oauth required
102
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
103
+ // authentication api-key required
104
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
105
+ if (project !== undefined) {
106
+ localVarQueryParameter['project'] = project;
107
+ }
108
+ if (pageToken !== undefined) {
109
+ localVarQueryParameter['pageToken'] = pageToken;
110
+ }
111
+ if (pageSize !== undefined) {
112
+ localVarQueryParameter['pageSize'] = pageSize;
113
+ }
114
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
115
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
116
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
117
+ return {
118
+ url: (0, common_1.toPathString)(localVarUrlObj),
119
+ options: localVarRequestOptions,
120
+ };
121
+ }),
122
+ };
123
+ };
124
+ exports.PackagingApiAxiosParamCreator = PackagingApiAxiosParamCreator;
125
+ /**
126
+ * PackagingApi - functional programming interface
127
+ * @export
128
+ */
129
+ const PackagingApiFp = function (configuration) {
130
+ const localVarAxiosParamCreator = (0, exports.PackagingApiAxiosParamCreator)(configuration);
131
+ return {
132
+ /**
133
+ * Get packaging
134
+ * @summary Get a packaging resource
135
+ * @param {string} project What project it is
136
+ * @param {string} packagingId Unique identifier of packaging
137
+ * @param {*} [options] Override http request option.
138
+ * @throws {RequiredError}
139
+ */
140
+ getPackaging(project, packagingId, options) {
141
+ return __awaiter(this, void 0, void 0, function* () {
142
+ var _a, _b, _c;
143
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getPackaging(project, packagingId, options);
144
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
145
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PackagingApi.getPackaging']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
146
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
147
+ });
148
+ },
149
+ /**
150
+ * Lists packaging items paginated into chunks
151
+ * @summary List packaging
152
+ * @param {string} project What project it is
153
+ * @param {number} [pageToken] Page reference token
154
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
155
+ * @param {*} [options] Override http request option.
156
+ * @throws {RequiredError}
157
+ */
158
+ listPackaging(project, pageToken, pageSize, options) {
159
+ return __awaiter(this, void 0, void 0, function* () {
160
+ var _a, _b, _c;
161
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listPackaging(project, pageToken, pageSize, options);
162
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
163
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PackagingApi.listPackaging']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
164
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
165
+ });
166
+ },
167
+ };
168
+ };
169
+ exports.PackagingApiFp = PackagingApiFp;
170
+ /**
171
+ * PackagingApi - factory interface
172
+ * @export
173
+ */
174
+ const PackagingApiFactory = function (configuration, basePath, axios) {
175
+ const localVarFp = (0, exports.PackagingApiFp)(configuration);
176
+ return {
177
+ /**
178
+ * Get packaging
179
+ * @summary Get a packaging resource
180
+ * @param {PackagingApiGetPackagingRequest} requestParameters Request parameters.
181
+ * @param {*} [options] Override http request option.
182
+ * @throws {RequiredError}
183
+ */
184
+ getPackaging(requestParameters, options) {
185
+ return localVarFp.getPackaging(requestParameters.project, requestParameters.packagingId, options).then((request) => request(axios, basePath));
186
+ },
187
+ /**
188
+ * Lists packaging items paginated into chunks
189
+ * @summary List packaging
190
+ * @param {PackagingApiListPackagingRequest} requestParameters Request parameters.
191
+ * @param {*} [options] Override http request option.
192
+ * @throws {RequiredError}
193
+ */
194
+ listPackaging(requestParameters, options) {
195
+ return localVarFp.listPackaging(requestParameters.project, requestParameters.pageToken, requestParameters.pageSize, options).then((request) => request(axios, basePath));
196
+ },
197
+ };
198
+ };
199
+ exports.PackagingApiFactory = PackagingApiFactory;
200
+ /**
201
+ * PackagingApi - object-oriented interface
202
+ * @export
203
+ * @class PackagingApi
204
+ * @extends {BaseAPI}
205
+ */
206
+ class PackagingApi extends base_1.BaseAPI {
207
+ /**
208
+ * Get packaging
209
+ * @summary Get a packaging resource
210
+ * @param {PackagingApiGetPackagingRequest} requestParameters Request parameters.
211
+ * @param {*} [options] Override http request option.
212
+ * @throws {RequiredError}
213
+ * @memberof PackagingApi
214
+ */
215
+ getPackaging(requestParameters, options) {
216
+ return (0, exports.PackagingApiFp)(this.configuration).getPackaging(requestParameters.project, requestParameters.packagingId, options).then((request) => request(this.axios, this.basePath));
217
+ }
218
+ /**
219
+ * Lists packaging items paginated into chunks
220
+ * @summary List packaging
221
+ * @param {PackagingApiListPackagingRequest} requestParameters Request parameters.
222
+ * @param {*} [options] Override http request option.
223
+ * @throws {RequiredError}
224
+ * @memberof PackagingApi
225
+ */
226
+ listPackaging(requestParameters, options) {
227
+ return (0, exports.PackagingApiFp)(this.configuration).listPackaging(requestParameters.project, requestParameters.pageToken, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
228
+ }
229
+ }
230
+ exports.PackagingApi = PackagingApi;
package/dist/base.d.ts ADDED
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Packaging API
3
+ * Manage Packaging
4
+ *
5
+ * The version of the OpenAPI document: 0.1.2
6
+ *
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 { AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ export declare const BASE_PATH: string;
15
+ /**
16
+ *
17
+ * @export
18
+ */
19
+ export declare const COLLECTION_FORMATS: {
20
+ csv: string;
21
+ ssv: string;
22
+ tsv: string;
23
+ pipes: string;
24
+ };
25
+ /**
26
+ *
27
+ * @export
28
+ * @interface RequestArgs
29
+ */
30
+ export interface RequestArgs {
31
+ url: string;
32
+ options: RawAxiosRequestConfig;
33
+ }
34
+ /**
35
+ *
36
+ * @export
37
+ * @class BaseAPI
38
+ */
39
+ export declare class BaseAPI {
40
+ protected basePath: string;
41
+ protected axios: AxiosInstance;
42
+ protected configuration: Configuration | undefined;
43
+ constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
44
+ }
45
+ /**
46
+ *
47
+ * @export
48
+ * @class RequiredError
49
+ * @extends {Error}
50
+ */
51
+ export declare class RequiredError extends Error {
52
+ field: string;
53
+ constructor(field: string, msg?: string);
54
+ }
55
+ interface ServerMap {
56
+ [key: string]: {
57
+ url: string;
58
+ description: string;
59
+ }[];
60
+ }
61
+ /**
62
+ *
63
+ * @export
64
+ */
65
+ export declare const operationServerMap: ServerMap;
66
+ export {};