@teemill/platform 0.20.0 → 0.21.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/dist/esm/api.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Platform API
5
5
  * Manage Your podOS platform
6
6
  *
7
- * The version of the OpenAPI document: 0.20.0
7
+ * The version of the OpenAPI document: 0.21.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2251,3 +2251,199 @@ export class ReviewsApi extends BaseAPI {
2251
2251
  return ReviewsApiFp(this.configuration).moderateReview(requestParameters.project, requestParameters.platformId, requestParameters.reviewId, requestParameters.moderateReviewRequest, options).then((request) => request(this.axios, this.basePath));
2252
2252
  }
2253
2253
  }
2254
+ /**
2255
+ * TermsApi - axios parameter creator
2256
+ * @export
2257
+ */
2258
+ export const TermsApiAxiosParamCreator = function (configuration) {
2259
+ return {
2260
+ /**
2261
+ *
2262
+ * @summary Get the platform\'s terms
2263
+ * @param {string} project Project unique identifier
2264
+ * @param {string} platformId The platform identifier
2265
+ * @param {*} [options] Override http request option.
2266
+ * @throws {RequiredError}
2267
+ */
2268
+ getTerms: (project_1, platformId_1, ...args_1) => __awaiter(this, [project_1, platformId_1, ...args_1], void 0, function* (project, platformId, options = {}) {
2269
+ // verify required parameter 'project' is not null or undefined
2270
+ assertParamExists('getTerms', 'project', project);
2271
+ // verify required parameter 'platformId' is not null or undefined
2272
+ assertParamExists('getTerms', 'platformId', platformId);
2273
+ const localVarPath = `/v1/platform/{platformId}/terms`
2274
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
2275
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2276
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2277
+ let baseOptions;
2278
+ if (configuration) {
2279
+ baseOptions = configuration.baseOptions;
2280
+ }
2281
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2282
+ const localVarHeaderParameter = {};
2283
+ const localVarQueryParameter = {};
2284
+ // authentication session-oauth required
2285
+ // oauth required
2286
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
2287
+ // authentication api-key required
2288
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
2289
+ if (project !== undefined) {
2290
+ localVarQueryParameter['project'] = project;
2291
+ }
2292
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2293
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2294
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2295
+ return {
2296
+ url: toPathString(localVarUrlObj),
2297
+ options: localVarRequestOptions,
2298
+ };
2299
+ }),
2300
+ /**
2301
+ *
2302
+ * @summary Save the platform\'s terms
2303
+ * @param {string} project Project unique identifier
2304
+ * @param {string} platformId The platform identifier
2305
+ * @param {SaveTermsRequest} saveTermsRequest Save terms
2306
+ * @param {*} [options] Override http request option.
2307
+ * @throws {RequiredError}
2308
+ */
2309
+ saveTerms: (project_1, platformId_1, saveTermsRequest_1, ...args_1) => __awaiter(this, [project_1, platformId_1, saveTermsRequest_1, ...args_1], void 0, function* (project, platformId, saveTermsRequest, options = {}) {
2310
+ // verify required parameter 'project' is not null or undefined
2311
+ assertParamExists('saveTerms', 'project', project);
2312
+ // verify required parameter 'platformId' is not null or undefined
2313
+ assertParamExists('saveTerms', 'platformId', platformId);
2314
+ // verify required parameter 'saveTermsRequest' is not null or undefined
2315
+ assertParamExists('saveTerms', 'saveTermsRequest', saveTermsRequest);
2316
+ const localVarPath = `/v1/platform/{platformId}/terms`
2317
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
2318
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2319
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2320
+ let baseOptions;
2321
+ if (configuration) {
2322
+ baseOptions = configuration.baseOptions;
2323
+ }
2324
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2325
+ const localVarHeaderParameter = {};
2326
+ const localVarQueryParameter = {};
2327
+ // authentication session-oauth required
2328
+ // oauth required
2329
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
2330
+ // authentication api-key required
2331
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
2332
+ if (project !== undefined) {
2333
+ localVarQueryParameter['project'] = project;
2334
+ }
2335
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2336
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2337
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2338
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2339
+ localVarRequestOptions.data = serializeDataIfNeeded(saveTermsRequest, localVarRequestOptions, configuration);
2340
+ return {
2341
+ url: toPathString(localVarUrlObj),
2342
+ options: localVarRequestOptions,
2343
+ };
2344
+ }),
2345
+ };
2346
+ };
2347
+ /**
2348
+ * TermsApi - functional programming interface
2349
+ * @export
2350
+ */
2351
+ export const TermsApiFp = function (configuration) {
2352
+ const localVarAxiosParamCreator = TermsApiAxiosParamCreator(configuration);
2353
+ return {
2354
+ /**
2355
+ *
2356
+ * @summary Get the platform\'s terms
2357
+ * @param {string} project Project unique identifier
2358
+ * @param {string} platformId The platform identifier
2359
+ * @param {*} [options] Override http request option.
2360
+ * @throws {RequiredError}
2361
+ */
2362
+ getTerms(project, platformId, options) {
2363
+ return __awaiter(this, void 0, void 0, function* () {
2364
+ var _a, _b, _c;
2365
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getTerms(project, platformId, options);
2366
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2367
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['TermsApi.getTerms']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2368
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2369
+ });
2370
+ },
2371
+ /**
2372
+ *
2373
+ * @summary Save the platform\'s terms
2374
+ * @param {string} project Project unique identifier
2375
+ * @param {string} platformId The platform identifier
2376
+ * @param {SaveTermsRequest} saveTermsRequest Save terms
2377
+ * @param {*} [options] Override http request option.
2378
+ * @throws {RequiredError}
2379
+ */
2380
+ saveTerms(project, platformId, saveTermsRequest, options) {
2381
+ return __awaiter(this, void 0, void 0, function* () {
2382
+ var _a, _b, _c;
2383
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.saveTerms(project, platformId, saveTermsRequest, options);
2384
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2385
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['TermsApi.saveTerms']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2386
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2387
+ });
2388
+ },
2389
+ };
2390
+ };
2391
+ /**
2392
+ * TermsApi - factory interface
2393
+ * @export
2394
+ */
2395
+ export const TermsApiFactory = function (configuration, basePath, axios) {
2396
+ const localVarFp = TermsApiFp(configuration);
2397
+ return {
2398
+ /**
2399
+ *
2400
+ * @summary Get the platform\'s terms
2401
+ * @param {TermsApiGetTermsRequest} requestParameters Request parameters.
2402
+ * @param {*} [options] Override http request option.
2403
+ * @throws {RequiredError}
2404
+ */
2405
+ getTerms(requestParameters, options) {
2406
+ return localVarFp.getTerms(requestParameters.project, requestParameters.platformId, options).then((request) => request(axios, basePath));
2407
+ },
2408
+ /**
2409
+ *
2410
+ * @summary Save the platform\'s terms
2411
+ * @param {TermsApiSaveTermsRequest} requestParameters Request parameters.
2412
+ * @param {*} [options] Override http request option.
2413
+ * @throws {RequiredError}
2414
+ */
2415
+ saveTerms(requestParameters, options) {
2416
+ return localVarFp.saveTerms(requestParameters.project, requestParameters.platformId, requestParameters.saveTermsRequest, options).then((request) => request(axios, basePath));
2417
+ },
2418
+ };
2419
+ };
2420
+ /**
2421
+ * TermsApi - object-oriented interface
2422
+ * @export
2423
+ * @class TermsApi
2424
+ * @extends {BaseAPI}
2425
+ */
2426
+ export class TermsApi extends BaseAPI {
2427
+ /**
2428
+ *
2429
+ * @summary Get the platform\'s terms
2430
+ * @param {TermsApiGetTermsRequest} requestParameters Request parameters.
2431
+ * @param {*} [options] Override http request option.
2432
+ * @throws {RequiredError}
2433
+ * @memberof TermsApi
2434
+ */
2435
+ getTerms(requestParameters, options) {
2436
+ return TermsApiFp(this.configuration).getTerms(requestParameters.project, requestParameters.platformId, options).then((request) => request(this.axios, this.basePath));
2437
+ }
2438
+ /**
2439
+ *
2440
+ * @summary Save the platform\'s terms
2441
+ * @param {TermsApiSaveTermsRequest} requestParameters Request parameters.
2442
+ * @param {*} [options] Override http request option.
2443
+ * @throws {RequiredError}
2444
+ * @memberof TermsApi
2445
+ */
2446
+ saveTerms(requestParameters, options) {
2447
+ return TermsApiFp(this.configuration).saveTerms(requestParameters.project, requestParameters.platformId, requestParameters.saveTermsRequest, options).then((request) => request(this.axios, this.basePath));
2448
+ }
2449
+ }
@@ -2,7 +2,7 @@
2
2
  * Platform API
3
3
  * Manage Your podOS platform
4
4
  *
5
- * The version of the OpenAPI document: 0.20.0
5
+ * The version of the OpenAPI document: 0.21.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/esm/base.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Platform API
5
5
  * Manage Your podOS platform
6
6
  *
7
- * The version of the OpenAPI document: 0.20.0
7
+ * The version of the OpenAPI document: 0.21.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Platform API
3
3
  * Manage Your podOS platform
4
4
  *
5
- * The version of the OpenAPI document: 0.20.0
5
+ * The version of the OpenAPI document: 0.21.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Platform API
5
5
  * Manage Your podOS platform
6
6
  *
7
- * The version of the OpenAPI document: 0.20.0
7
+ * The version of the OpenAPI document: 0.21.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Platform API
3
3
  * Manage Your podOS platform
4
4
  *
5
- * The version of the OpenAPI document: 0.20.0
5
+ * The version of the OpenAPI document: 0.21.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Platform API
5
5
  * Manage Your podOS platform
6
6
  *
7
- * The version of the OpenAPI document: 0.20.0
7
+ * The version of the OpenAPI document: 0.21.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Platform API
3
3
  * Manage Your podOS platform
4
4
  *
5
- * The version of the OpenAPI document: 0.20.0
5
+ * The version of the OpenAPI document: 0.21.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/esm/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * Platform API
5
5
  * Manage Your podOS platform
6
6
  *
7
- * The version of the OpenAPI document: 0.20.0
7
+ * The version of the OpenAPI document: 0.21.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Platform API
3
3
  * Manage Your podOS platform
4
4
  *
5
- * The version of the OpenAPI document: 0.20.0
5
+ * The version of the OpenAPI document: 0.21.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Platform API
6
6
  * Manage Your podOS platform
7
7
  *
8
- * The version of the OpenAPI document: 0.20.0
8
+ * The version of the OpenAPI document: 0.21.0
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -0,0 +1,24 @@
1
+ # SaveTermsRequest
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **title** | **string** | | [default to undefined]
9
+ **content** | **string** | | [default to undefined]
10
+ **enabled** | **boolean** | | [default to undefined]
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import { SaveTermsRequest } from '@teemill/platform';
16
+
17
+ const instance: SaveTermsRequest = {
18
+ title,
19
+ content,
20
+ enabled,
21
+ };
22
+ ```
23
+
24
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
package/docs/Terms.md ADDED
@@ -0,0 +1,32 @@
1
+ # Terms
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **string** | | [default to undefined]
9
+ **title** | **string** | | [default to undefined]
10
+ **content** | **string** | | [default to undefined]
11
+ **version** | **number** | | [default to undefined]
12
+ **enabled** | **boolean** | | [default to undefined]
13
+ **createdAt** | **string** | | [default to undefined]
14
+ **updatedAt** | **string** | | [default to undefined]
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import { Terms } from '@teemill/platform';
20
+
21
+ const instance: Terms = {
22
+ id,
23
+ title,
24
+ content,
25
+ version,
26
+ enabled,
27
+ createdAt,
28
+ updatedAt,
29
+ };
30
+ ```
31
+
32
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,127 @@
1
+ # TermsApi
2
+
3
+ All URIs are relative to *https://localhost:8080*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**getTerms**](#getterms) | **GET** /v1/platform/{platformId}/terms | Get the platform\'s terms|
8
+ |[**saveTerms**](#saveterms) | **POST** /v1/platform/{platformId}/terms | Save the platform\'s terms|
9
+
10
+ # **getTerms**
11
+ > Terms getTerms()
12
+
13
+
14
+ ### Example
15
+
16
+ ```typescript
17
+ import {
18
+ TermsApi,
19
+ Configuration
20
+ } from '@teemill/platform';
21
+
22
+ const configuration = new Configuration();
23
+ const apiInstance = new TermsApi(configuration);
24
+
25
+ let project: string; //Project unique identifier (default to undefined)
26
+ let platformId: string; //The platform identifier (default to undefined)
27
+
28
+ const { status, data } = await apiInstance.getTerms(
29
+ project,
30
+ platformId
31
+ );
32
+ ```
33
+
34
+ ### Parameters
35
+
36
+ |Name | Type | Description | Notes|
37
+ |------------- | ------------- | ------------- | -------------|
38
+ | **project** | [**string**] | Project unique identifier | defaults to undefined|
39
+ | **platformId** | [**string**] | The platform identifier | defaults to undefined|
40
+
41
+
42
+ ### Return type
43
+
44
+ **Terms**
45
+
46
+ ### Authorization
47
+
48
+ [session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
49
+
50
+ ### HTTP request headers
51
+
52
+ - **Content-Type**: Not defined
53
+ - **Accept**: application/json
54
+
55
+
56
+ ### HTTP response details
57
+ | Status code | Description | Response headers |
58
+ |-------------|-------------|------------------|
59
+ |**200** | Successfully retrieved the terms. | - |
60
+ |**401** | Not authorised to access this resource | - |
61
+ |**403** | Refuse to authorize | - |
62
+ |**404** | Resource not found | - |
63
+ |**500** | Unknown server error | - |
64
+
65
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
66
+
67
+ # **saveTerms**
68
+ > Terms saveTerms(saveTermsRequest)
69
+
70
+
71
+ ### Example
72
+
73
+ ```typescript
74
+ import {
75
+ TermsApi,
76
+ Configuration,
77
+ SaveTermsRequest
78
+ } from '@teemill/platform';
79
+
80
+ const configuration = new Configuration();
81
+ const apiInstance = new TermsApi(configuration);
82
+
83
+ let project: string; //Project unique identifier (default to undefined)
84
+ let platformId: string; //The platform identifier (default to undefined)
85
+ let saveTermsRequest: SaveTermsRequest; //Save terms
86
+
87
+ const { status, data } = await apiInstance.saveTerms(
88
+ project,
89
+ platformId,
90
+ saveTermsRequest
91
+ );
92
+ ```
93
+
94
+ ### Parameters
95
+
96
+ |Name | Type | Description | Notes|
97
+ |------------- | ------------- | ------------- | -------------|
98
+ | **saveTermsRequest** | **SaveTermsRequest**| Save terms | |
99
+ | **project** | [**string**] | Project unique identifier | defaults to undefined|
100
+ | **platformId** | [**string**] | The platform identifier | defaults to undefined|
101
+
102
+
103
+ ### Return type
104
+
105
+ **Terms**
106
+
107
+ ### Authorization
108
+
109
+ [session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
110
+
111
+ ### HTTP request headers
112
+
113
+ - **Content-Type**: application/json
114
+ - **Accept**: application/json
115
+
116
+
117
+ ### HTTP response details
118
+ | Status code | Description | Response headers |
119
+ |-------------|-------------|------------------|
120
+ |**200** | Successfully retrieved the terms. | - |
121
+ |**401** | Not authorised to access this resource | - |
122
+ |**403** | Refuse to authorize | - |
123
+ |**404** | Resource not found | - |
124
+ |**500** | Unknown server error | - |
125
+
126
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
127
+
package/index.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Platform API
5
5
  * Manage Your podOS platform
6
6
  *
7
- * The version of the OpenAPI document: 0.20.0
7
+ * The version of the OpenAPI document: 0.21.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teemill/platform",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "description": "OpenAPI client for @teemill/platform",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {