@platzio/sdk 0.6.0-beta.1-1 → 0.6.0-beta.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.
package/src/api.ts CHANGED
@@ -23,6 +23,62 @@ import type { RequestArgs } from './base';
23
23
  // @ts-ignore
24
24
  import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
25
25
 
26
+ /**
27
+ *
28
+ * @export
29
+ * @interface AllBots200Response
30
+ */
31
+ export interface AllBots200Response {
32
+ /**
33
+ *
34
+ * @type {number}
35
+ * @memberof AllBots200Response
36
+ */
37
+ 'page': number;
38
+ /**
39
+ *
40
+ * @type {number}
41
+ * @memberof AllBots200Response
42
+ */
43
+ 'per_page': number;
44
+ /**
45
+ *
46
+ * @type {Array<AllBots200ResponseItemsInner>}
47
+ * @memberof AllBots200Response
48
+ */
49
+ 'items': Array<AllBots200ResponseItemsInner>;
50
+ /**
51
+ *
52
+ * @type {number}
53
+ * @memberof AllBots200Response
54
+ */
55
+ 'num_total': number;
56
+ }
57
+ /**
58
+ *
59
+ * @export
60
+ * @interface AllBots200ResponseItemsInner
61
+ */
62
+ export interface AllBots200ResponseItemsInner {
63
+ /**
64
+ *
65
+ * @type {string}
66
+ * @memberof AllBots200ResponseItemsInner
67
+ */
68
+ 'id': string;
69
+ /**
70
+ *
71
+ * @type {string}
72
+ * @memberof AllBots200ResponseItemsInner
73
+ */
74
+ 'created_at': string;
75
+ /**
76
+ *
77
+ * @type {string}
78
+ * @memberof AllBots200ResponseItemsInner
79
+ */
80
+ 'display_name': string;
81
+ }
26
82
  /**
27
83
  *
28
84
  * @export
@@ -1415,6 +1471,31 @@ export interface AllUsers200ResponseItemsInner {
1415
1471
  */
1416
1472
  'is_active': boolean;
1417
1473
  }
1474
+ /**
1475
+ *
1476
+ * @export
1477
+ * @interface Bot
1478
+ */
1479
+ export interface Bot {
1480
+ /**
1481
+ *
1482
+ * @type {string}
1483
+ * @memberof Bot
1484
+ */
1485
+ 'id': string;
1486
+ /**
1487
+ *
1488
+ * @type {string}
1489
+ * @memberof Bot
1490
+ */
1491
+ 'created_at': string;
1492
+ /**
1493
+ *
1494
+ * @type {string}
1495
+ * @memberof Bot
1496
+ */
1497
+ 'display_name': string;
1498
+ }
1418
1499
  /**
1419
1500
  *
1420
1501
  * @export
@@ -2321,6 +2402,7 @@ export type DbEventOperation = typeof DbEventOperation[keyof typeof DbEventOpera
2321
2402
  */
2322
2403
 
2323
2404
  export const DbTable = {
2405
+ Bots: 'bots',
2324
2406
  DeploymentKinds: 'deployment_kinds',
2325
2407
  DeploymentResources: 'deployment_resources',
2326
2408
  DeploymentResourceTypes: 'deployment_resource_types',
@@ -3654,7 +3736,7 @@ export interface K8sResource {
3654
3736
  * @type MeResponse
3655
3737
  * @export
3656
3738
  */
3657
- export type MeResponse = MeResponseOneOf | MeResponseOneOf1;
3739
+ export type MeResponse = MeResponseOneOf | MeResponseOneOf1 | MeResponseOneOf2;
3658
3740
 
3659
3741
  /**
3660
3742
  *
@@ -3677,30 +3759,56 @@ export interface MeResponseOneOf {
3677
3759
  export interface MeResponseOneOf1 {
3678
3760
  /**
3679
3761
  *
3680
- * @type {MeResponseOneOf1Deployment}
3762
+ * @type {Bot}
3681
3763
  * @memberof MeResponseOneOf1
3682
3764
  */
3683
- 'Deployment': MeResponseOneOf1Deployment;
3765
+ 'Bot': Bot;
3684
3766
  }
3685
3767
  /**
3686
3768
  *
3687
3769
  * @export
3688
- * @interface MeResponseOneOf1Deployment
3770
+ * @interface MeResponseOneOf2
3689
3771
  */
3690
- export interface MeResponseOneOf1Deployment {
3772
+ export interface MeResponseOneOf2 {
3773
+ /**
3774
+ *
3775
+ * @type {MeResponseOneOf2Deployment}
3776
+ * @memberof MeResponseOneOf2
3777
+ */
3778
+ 'Deployment': MeResponseOneOf2Deployment;
3779
+ }
3780
+ /**
3781
+ *
3782
+ * @export
3783
+ * @interface MeResponseOneOf2Deployment
3784
+ */
3785
+ export interface MeResponseOneOf2Deployment {
3691
3786
  /**
3692
3787
  *
3693
3788
  * @type {string}
3694
- * @memberof MeResponseOneOf1Deployment
3789
+ * @memberof MeResponseOneOf2Deployment
3695
3790
  */
3696
3791
  'id': string;
3697
3792
  /**
3698
3793
  *
3699
3794
  * @type {string}
3700
- * @memberof MeResponseOneOf1Deployment
3795
+ * @memberof MeResponseOneOf2Deployment
3701
3796
  */
3702
3797
  'name': string;
3703
3798
  }
3799
+ /**
3800
+ *
3801
+ * @export
3802
+ * @interface NewBot
3803
+ */
3804
+ export interface NewBot {
3805
+ /**
3806
+ *
3807
+ * @type {string}
3808
+ * @memberof NewBot
3809
+ */
3810
+ 'display_name': string;
3811
+ }
3704
3812
  /**
3705
3813
  *
3706
3814
  * @export
@@ -4402,6 +4510,19 @@ export interface UiSchemaV1Beta1 {
4402
4510
  }
4403
4511
 
4404
4512
 
4513
+ /**
4514
+ *
4515
+ * @export
4516
+ * @interface UpdateBot
4517
+ */
4518
+ export interface UpdateBot {
4519
+ /**
4520
+ *
4521
+ * @type {string}
4522
+ * @memberof UpdateBot
4523
+ */
4524
+ 'display_name'?: string | null;
4525
+ }
4405
4526
  /**
4406
4527
  *
4407
4528
  * @export
@@ -4940,6 +5061,344 @@ export class AuthenticationApi extends BaseAPI {
4940
5061
 
4941
5062
 
4942
5063
 
5064
+ /**
5065
+ * BotsApi - axios parameter creator
5066
+ * @export
5067
+ */
5068
+ export const BotsApiAxiosParamCreator = function (configuration?: Configuration) {
5069
+ return {
5070
+ /**
5071
+ *
5072
+ * @param {string | null} [displayName]
5073
+ * @param {number | null} [page]
5074
+ * @param {number | null} [perPage]
5075
+ * @param {*} [options] Override http request option.
5076
+ * @throws {RequiredError}
5077
+ */
5078
+ allBots: async (displayName?: string | null, page?: number | null, perPage?: number | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5079
+ const localVarPath = `/api/v2/bots`;
5080
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5081
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5082
+ let baseOptions;
5083
+ if (configuration) {
5084
+ baseOptions = configuration.baseOptions;
5085
+ }
5086
+
5087
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
5088
+ const localVarHeaderParameter = {} as any;
5089
+ const localVarQueryParameter = {} as any;
5090
+
5091
+ // authentication access_token required
5092
+ // http bearer authentication required
5093
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
5094
+
5095
+ // authentication user_token required
5096
+ await setApiKeyToObject(localVarHeaderParameter, "x-platz-token", configuration)
5097
+
5098
+ if (displayName !== undefined) {
5099
+ localVarQueryParameter['display_name'] = displayName;
5100
+ }
5101
+
5102
+ if (page !== undefined) {
5103
+ localVarQueryParameter['page'] = page;
5104
+ }
5105
+
5106
+ if (perPage !== undefined) {
5107
+ localVarQueryParameter['per_page'] = perPage;
5108
+ }
5109
+
5110
+
5111
+
5112
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5113
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5114
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5115
+
5116
+ return {
5117
+ url: toPathString(localVarUrlObj),
5118
+ options: localVarRequestOptions,
5119
+ };
5120
+ },
5121
+ /**
5122
+ *
5123
+ * @param {string} id
5124
+ * @param {*} [options] Override http request option.
5125
+ * @throws {RequiredError}
5126
+ */
5127
+ getBot: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5128
+ // verify required parameter 'id' is not null or undefined
5129
+ assertParamExists('getBot', 'id', id)
5130
+ const localVarPath = `/api/v2/bots/{id}`
5131
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
5132
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5133
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5134
+ let baseOptions;
5135
+ if (configuration) {
5136
+ baseOptions = configuration.baseOptions;
5137
+ }
5138
+
5139
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
5140
+ const localVarHeaderParameter = {} as any;
5141
+ const localVarQueryParameter = {} as any;
5142
+
5143
+ // authentication access_token required
5144
+ // http bearer authentication required
5145
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
5146
+
5147
+ // authentication user_token required
5148
+ await setApiKeyToObject(localVarHeaderParameter, "x-platz-token", configuration)
5149
+
5150
+
5151
+
5152
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5153
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5154
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5155
+
5156
+ return {
5157
+ url: toPathString(localVarUrlObj),
5158
+ options: localVarRequestOptions,
5159
+ };
5160
+ },
5161
+ /**
5162
+ *
5163
+ * @param {string} id
5164
+ * @param {UpdateBot} updateBot
5165
+ * @param {*} [options] Override http request option.
5166
+ * @throws {RequiredError}
5167
+ */
5168
+ updateBot: async (id: string, updateBot: UpdateBot, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5169
+ // verify required parameter 'id' is not null or undefined
5170
+ assertParamExists('updateBot', 'id', id)
5171
+ // verify required parameter 'updateBot' is not null or undefined
5172
+ assertParamExists('updateBot', 'updateBot', updateBot)
5173
+ const localVarPath = `/api/v2/bots/{id}`
5174
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
5175
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5176
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5177
+ let baseOptions;
5178
+ if (configuration) {
5179
+ baseOptions = configuration.baseOptions;
5180
+ }
5181
+
5182
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
5183
+ const localVarHeaderParameter = {} as any;
5184
+ const localVarQueryParameter = {} as any;
5185
+
5186
+ // authentication access_token required
5187
+ // http bearer authentication required
5188
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
5189
+
5190
+ // authentication user_token required
5191
+ await setApiKeyToObject(localVarHeaderParameter, "x-platz-token", configuration)
5192
+
5193
+
5194
+
5195
+ localVarHeaderParameter['Content-Type'] = 'application/json';
5196
+
5197
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5198
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5199
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5200
+ localVarRequestOptions.data = serializeDataIfNeeded(updateBot, localVarRequestOptions, configuration)
5201
+
5202
+ return {
5203
+ url: toPathString(localVarUrlObj),
5204
+ options: localVarRequestOptions,
5205
+ };
5206
+ },
5207
+ }
5208
+ };
5209
+
5210
+ /**
5211
+ * BotsApi - functional programming interface
5212
+ * @export
5213
+ */
5214
+ export const BotsApiFp = function(configuration?: Configuration) {
5215
+ const localVarAxiosParamCreator = BotsApiAxiosParamCreator(configuration)
5216
+ return {
5217
+ /**
5218
+ *
5219
+ * @param {string | null} [displayName]
5220
+ * @param {number | null} [page]
5221
+ * @param {number | null} [perPage]
5222
+ * @param {*} [options] Override http request option.
5223
+ * @throws {RequiredError}
5224
+ */
5225
+ async allBots(displayName?: string | null, page?: number | null, perPage?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AllBots200Response>> {
5226
+ const localVarAxiosArgs = await localVarAxiosParamCreator.allBots(displayName, page, perPage, options);
5227
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5228
+ const localVarOperationServerBasePath = operationServerMap['BotsApi.allBots']?.[localVarOperationServerIndex]?.url;
5229
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5230
+ },
5231
+ /**
5232
+ *
5233
+ * @param {string} id
5234
+ * @param {*} [options] Override http request option.
5235
+ * @throws {RequiredError}
5236
+ */
5237
+ async getBot(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Bot>> {
5238
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getBot(id, options);
5239
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5240
+ const localVarOperationServerBasePath = operationServerMap['BotsApi.getBot']?.[localVarOperationServerIndex]?.url;
5241
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5242
+ },
5243
+ /**
5244
+ *
5245
+ * @param {string} id
5246
+ * @param {UpdateBot} updateBot
5247
+ * @param {*} [options] Override http request option.
5248
+ * @throws {RequiredError}
5249
+ */
5250
+ async updateBot(id: string, updateBot: UpdateBot, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Bot>> {
5251
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateBot(id, updateBot, options);
5252
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5253
+ const localVarOperationServerBasePath = operationServerMap['BotsApi.updateBot']?.[localVarOperationServerIndex]?.url;
5254
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5255
+ },
5256
+ }
5257
+ };
5258
+
5259
+ /**
5260
+ * BotsApi - factory interface
5261
+ * @export
5262
+ */
5263
+ export const BotsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
5264
+ const localVarFp = BotsApiFp(configuration)
5265
+ return {
5266
+ /**
5267
+ *
5268
+ * @param {BotsApiAllBotsRequest} requestParameters Request parameters.
5269
+ * @param {*} [options] Override http request option.
5270
+ * @throws {RequiredError}
5271
+ */
5272
+ allBots(requestParameters: BotsApiAllBotsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<AllBots200Response> {
5273
+ return localVarFp.allBots(requestParameters.displayName, requestParameters.page, requestParameters.perPage, options).then((request) => request(axios, basePath));
5274
+ },
5275
+ /**
5276
+ *
5277
+ * @param {BotsApiGetBotRequest} requestParameters Request parameters.
5278
+ * @param {*} [options] Override http request option.
5279
+ * @throws {RequiredError}
5280
+ */
5281
+ getBot(requestParameters: BotsApiGetBotRequest, options?: RawAxiosRequestConfig): AxiosPromise<Bot> {
5282
+ return localVarFp.getBot(requestParameters.id, options).then((request) => request(axios, basePath));
5283
+ },
5284
+ /**
5285
+ *
5286
+ * @param {BotsApiUpdateBotRequest} requestParameters Request parameters.
5287
+ * @param {*} [options] Override http request option.
5288
+ * @throws {RequiredError}
5289
+ */
5290
+ updateBot(requestParameters: BotsApiUpdateBotRequest, options?: RawAxiosRequestConfig): AxiosPromise<Bot> {
5291
+ return localVarFp.updateBot(requestParameters.id, requestParameters.updateBot, options).then((request) => request(axios, basePath));
5292
+ },
5293
+ };
5294
+ };
5295
+
5296
+ /**
5297
+ * Request parameters for allBots operation in BotsApi.
5298
+ * @export
5299
+ * @interface BotsApiAllBotsRequest
5300
+ */
5301
+ export interface BotsApiAllBotsRequest {
5302
+ /**
5303
+ *
5304
+ * @type {string}
5305
+ * @memberof BotsApiAllBots
5306
+ */
5307
+ readonly displayName?: string | null
5308
+
5309
+ /**
5310
+ *
5311
+ * @type {number}
5312
+ * @memberof BotsApiAllBots
5313
+ */
5314
+ readonly page?: number | null
5315
+
5316
+ /**
5317
+ *
5318
+ * @type {number}
5319
+ * @memberof BotsApiAllBots
5320
+ */
5321
+ readonly perPage?: number | null
5322
+ }
5323
+
5324
+ /**
5325
+ * Request parameters for getBot operation in BotsApi.
5326
+ * @export
5327
+ * @interface BotsApiGetBotRequest
5328
+ */
5329
+ export interface BotsApiGetBotRequest {
5330
+ /**
5331
+ *
5332
+ * @type {string}
5333
+ * @memberof BotsApiGetBot
5334
+ */
5335
+ readonly id: string
5336
+ }
5337
+
5338
+ /**
5339
+ * Request parameters for updateBot operation in BotsApi.
5340
+ * @export
5341
+ * @interface BotsApiUpdateBotRequest
5342
+ */
5343
+ export interface BotsApiUpdateBotRequest {
5344
+ /**
5345
+ *
5346
+ * @type {string}
5347
+ * @memberof BotsApiUpdateBot
5348
+ */
5349
+ readonly id: string
5350
+
5351
+ /**
5352
+ *
5353
+ * @type {UpdateBot}
5354
+ * @memberof BotsApiUpdateBot
5355
+ */
5356
+ readonly updateBot: UpdateBot
5357
+ }
5358
+
5359
+ /**
5360
+ * BotsApi - object-oriented interface
5361
+ * @export
5362
+ * @class BotsApi
5363
+ * @extends {BaseAPI}
5364
+ */
5365
+ export class BotsApi extends BaseAPI {
5366
+ /**
5367
+ *
5368
+ * @param {BotsApiAllBotsRequest} requestParameters Request parameters.
5369
+ * @param {*} [options] Override http request option.
5370
+ * @throws {RequiredError}
5371
+ * @memberof BotsApi
5372
+ */
5373
+ public allBots(requestParameters: BotsApiAllBotsRequest = {}, options?: RawAxiosRequestConfig) {
5374
+ return BotsApiFp(this.configuration).allBots(requestParameters.displayName, requestParameters.page, requestParameters.perPage, options).then((request) => request(this.axios, this.basePath));
5375
+ }
5376
+
5377
+ /**
5378
+ *
5379
+ * @param {BotsApiGetBotRequest} requestParameters Request parameters.
5380
+ * @param {*} [options] Override http request option.
5381
+ * @throws {RequiredError}
5382
+ * @memberof BotsApi
5383
+ */
5384
+ public getBot(requestParameters: BotsApiGetBotRequest, options?: RawAxiosRequestConfig) {
5385
+ return BotsApiFp(this.configuration).getBot(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
5386
+ }
5387
+
5388
+ /**
5389
+ *
5390
+ * @param {BotsApiUpdateBotRequest} requestParameters Request parameters.
5391
+ * @param {*} [options] Override http request option.
5392
+ * @throws {RequiredError}
5393
+ * @memberof BotsApi
5394
+ */
5395
+ public updateBot(requestParameters: BotsApiUpdateBotRequest, options?: RawAxiosRequestConfig) {
5396
+ return BotsApiFp(this.configuration).updateBot(requestParameters.id, requestParameters.updateBot, options).then((request) => request(this.axios, this.basePath));
5397
+ }
5398
+ }
5399
+
5400
+
5401
+
4943
5402
  /**
4944
5403
  * DeploymentKindsApi - axios parameter creator
4945
5404
  * @export
@@ -1 +0,0 @@
1
- 0.6.0-beta.1