gopadjs 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.github/RELEASE CHANGED
@@ -1 +1 @@
1
- Mon May 27 08:10:17 UTC 2024
1
+ Tue May 28 15:03:36 UTC 2024
@@ -4,7 +4,7 @@ name: openapi
4
4
  "on":
5
5
  workflow_dispatch:
6
6
  schedule:
7
- - cron: "0 8 * * 1"
7
+ - cron: "0 8 * * *"
8
8
 
9
9
  permissions:
10
10
  contents: write
@@ -25,20 +25,13 @@ jobs:
25
25
  with:
26
26
  node-version: 20.x
27
27
 
28
- - name: Install generator
29
- run: npm install @openapitools/openapi-generator-cli -g
30
-
31
28
  - name: Install releaser
32
29
  run: |
33
30
  npm install -g \
34
31
  conventional-changelog-conventionalcommits@6.1.0 \
35
- semantic-release \
36
- @semantic-release/commit-analyzer \
37
- @semantic-release/release-notes-generator \
32
+ semantic-release@23.1.1 \
38
33
  @semantic-release/changelog \
39
34
  @semantic-release/git \
40
- @semantic-release/github \
41
- @semantic-release/npm \
42
35
  semantic-release-replace-plugin
43
36
 
44
37
  - name: Run releaser
@@ -2,14 +2,19 @@
2
2
  README.md
3
3
  api.ts
4
4
  api/auth-api.ts
5
+ api/profile-api.ts
5
6
  api/team-api.ts
6
7
  api/user-api.ts
7
8
  base.ts
8
9
  common.ts
9
10
  configuration.ts
10
11
  index.ts
12
+ model/auth-login.ts
13
+ model/auth-token.ts
14
+ model/auth-verify.ts
11
15
  model/index.ts
12
16
  model/notification.ts
17
+ model/profile.ts
13
18
  model/team-user-params.ts
14
19
  model/team-users.ts
15
20
  model/team.ts
package/.releaserc CHANGED
@@ -134,7 +134,7 @@
134
134
  "README.md"
135
135
  ],
136
136
  "from": "Package version: .*",
137
- "to": "Package version:${nextRelease.version}",
137
+ "to": "Package version: ${nextRelease.version}",
138
138
  "results": [
139
139
  {
140
140
  "file": "README.md",
@@ -179,7 +179,8 @@
179
179
  "CHANGELOG.md",
180
180
  "package.json",
181
181
  "openapi.yml",
182
- "README.md"
182
+ "README.md",
183
+ "package-lock.json"
183
184
  ]
184
185
  }
185
186
  ],
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.3.0](https://github.com/gopad/gopad-js/compare/v1.2.0...v1.3.0) (2024-06-02)
4
+
5
+
6
+ ### Features
7
+
8
+ * automated openapi client update ([cd44205](https://github.com/gopad/gopad-js/commit/cd4420596825f5f176a28fc8eb95631843f691a0))
9
+ * **deps:** update dependency @types/node to 12.11.5 - 20.13 ([0634695](https://github.com/gopad/gopad-js/commit/0634695ee5b795ec716422400e0625f0afef3ff4))
10
+ * **deps:** update dependency prettier to v3.3.0 ([80f185e](https://github.com/gopad/gopad-js/commit/80f185e6ba47ee4f504de1a927c8245a592f2716))
11
+
12
+ ## [1.2.0](https://github.com/gopad/gopad-js/compare/v1.1.0...v1.2.0) (2024-05-28)
13
+
14
+
15
+ ### Features
16
+
17
+ * automated openapi client update ([1e2091c](https://github.com/gopad/gopad-js/commit/1e2091c6080ecc6fd8fc55a742709836447730a4))
18
+
3
19
  ## [1.1.0](https://github.com/gopad/gopad-js/compare/v1.0.1...v1.1.0) (2024-05-28)
4
20
 
5
21
 
package/README.md CHANGED
@@ -6,7 +6,7 @@ This repository provides a client SDK for Typescript/Javascript. This SDK is
6
6
  automatically generated by the [OpenAPI Generator][generator] project:
7
7
 
8
8
  - API version: 1.0.0-alpha1
9
- - Package version:1.1.0
9
+ - Package version: 1.3.0
10
10
  - Build package: org.openapitools.codegen.languages.TypeScriptAxiosClientCodegen
11
11
 
12
12
  For more information, please visit [https://gopad.eu](https://gopad.eu)
@@ -39,7 +39,7 @@ the following command within your project directory, after that you can import
39
39
  it as other libraries:
40
40
 
41
41
  ```console
42
- npm install --save gopadjs@1.1.0
42
+ npm install --save gopadjs@1.3.0
43
43
  ```
44
44
 
45
45
  ### Installation with Git
package/api/auth-api.ts CHANGED
@@ -42,6 +42,12 @@ import {
42
42
  operationServerMap,
43
43
  } from "../base";
44
44
  // @ts-ignore
45
+ import type { AuthLogin } from "../model";
46
+ // @ts-ignore
47
+ import type { AuthToken } from "../model";
48
+ // @ts-ignore
49
+ import type { AuthVerify } from "../model";
50
+ // @ts-ignore
45
51
  import type { Notification } from "../model";
46
52
  /**
47
53
  * AuthApi - axios parameter creator
@@ -156,6 +162,170 @@ export const AuthApiAxiosParamCreator = function (
156
162
  ...options.headers,
157
163
  };
158
164
 
165
+ return {
166
+ url: toPathString(localVarUrlObj),
167
+ options: localVarRequestOptions,
168
+ };
169
+ },
170
+ /**
171
+ *
172
+ * @summary Authenticate an user by credentials
173
+ * @param {AuthLogin} authLogin The credentials to authenticate
174
+ * @param {*} [options] Override http request option.
175
+ * @throws {RequiredError}
176
+ */
177
+ loginAuth: async (
178
+ authLogin: AuthLogin,
179
+ options: RawAxiosRequestConfig = {},
180
+ ): Promise<RequestArgs> => {
181
+ // verify required parameter 'authLogin' is not null or undefined
182
+ assertParamExists("loginAuth", "authLogin", authLogin);
183
+ const localVarPath = `/auth/login`;
184
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
185
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
186
+ let baseOptions;
187
+ if (configuration) {
188
+ baseOptions = configuration.baseOptions;
189
+ }
190
+
191
+ const localVarRequestOptions = {
192
+ method: "POST",
193
+ ...baseOptions,
194
+ ...options,
195
+ };
196
+ const localVarHeaderParameter = {} as any;
197
+ const localVarQueryParameter = {} as any;
198
+
199
+ localVarHeaderParameter["Content-Type"] = "application/json";
200
+
201
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
202
+ let headersFromBaseOptions =
203
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
204
+ localVarRequestOptions.headers = {
205
+ ...localVarHeaderParameter,
206
+ ...headersFromBaseOptions,
207
+ ...options.headers,
208
+ };
209
+ localVarRequestOptions.data = serializeDataIfNeeded(
210
+ authLogin,
211
+ localVarRequestOptions,
212
+ configuration,
213
+ );
214
+
215
+ return {
216
+ url: toPathString(localVarUrlObj),
217
+ options: localVarRequestOptions,
218
+ };
219
+ },
220
+ /**
221
+ *
222
+ * @summary Refresh an auth token before it expires
223
+ * @param {*} [options] Override http request option.
224
+ * @throws {RequiredError}
225
+ */
226
+ refreshAuth: async (
227
+ options: RawAxiosRequestConfig = {},
228
+ ): Promise<RequestArgs> => {
229
+ const localVarPath = `/auth/refresh`;
230
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
231
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
232
+ let baseOptions;
233
+ if (configuration) {
234
+ baseOptions = configuration.baseOptions;
235
+ }
236
+
237
+ const localVarRequestOptions = {
238
+ method: "GET",
239
+ ...baseOptions,
240
+ ...options,
241
+ };
242
+ const localVarHeaderParameter = {} as any;
243
+ const localVarQueryParameter = {} as any;
244
+
245
+ // authentication Cookie required
246
+ await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration);
247
+
248
+ // authentication Basic required
249
+ // http basic authentication required
250
+ setBasicAuthToObject(localVarRequestOptions, configuration);
251
+
252
+ // authentication Header required
253
+ await setApiKeyToObject(
254
+ localVarHeaderParameter,
255
+ "X-API-Key",
256
+ configuration,
257
+ );
258
+
259
+ // authentication Bearer required
260
+ // http bearer authentication required
261
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
262
+
263
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
264
+ let headersFromBaseOptions =
265
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
266
+ localVarRequestOptions.headers = {
267
+ ...localVarHeaderParameter,
268
+ ...headersFromBaseOptions,
269
+ ...options.headers,
270
+ };
271
+
272
+ return {
273
+ url: toPathString(localVarUrlObj),
274
+ options: localVarRequestOptions,
275
+ };
276
+ },
277
+ /**
278
+ *
279
+ * @summary Verify validity for an authentication token
280
+ * @param {*} [options] Override http request option.
281
+ * @throws {RequiredError}
282
+ */
283
+ verifyAuth: async (
284
+ options: RawAxiosRequestConfig = {},
285
+ ): Promise<RequestArgs> => {
286
+ const localVarPath = `/auth/verify`;
287
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
288
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
289
+ let baseOptions;
290
+ if (configuration) {
291
+ baseOptions = configuration.baseOptions;
292
+ }
293
+
294
+ const localVarRequestOptions = {
295
+ method: "GET",
296
+ ...baseOptions,
297
+ ...options,
298
+ };
299
+ const localVarHeaderParameter = {} as any;
300
+ const localVarQueryParameter = {} as any;
301
+
302
+ // authentication Cookie required
303
+ await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration);
304
+
305
+ // authentication Basic required
306
+ // http basic authentication required
307
+ setBasicAuthToObject(localVarRequestOptions, configuration);
308
+
309
+ // authentication Header required
310
+ await setApiKeyToObject(
311
+ localVarHeaderParameter,
312
+ "X-API-Key",
313
+ configuration,
314
+ );
315
+
316
+ // authentication Bearer required
317
+ // http bearer authentication required
318
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
319
+
320
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
321
+ let headersFromBaseOptions =
322
+ baseOptions && baseOptions.headers ? baseOptions.headers : {};
323
+ localVarRequestOptions.headers = {
324
+ ...localVarHeaderParameter,
325
+ ...headersFromBaseOptions,
326
+ ...options.headers,
327
+ };
328
+
159
329
  return {
160
330
  url: toPathString(localVarUrlObj),
161
331
  options: localVarRequestOptions,
@@ -242,6 +412,86 @@ export const AuthApiFp = function (configuration?: Configuration) {
242
412
  configuration,
243
413
  )(axios, localVarOperationServerBasePath || basePath);
244
414
  },
415
+ /**
416
+ *
417
+ * @summary Authenticate an user by credentials
418
+ * @param {AuthLogin} authLogin The credentials to authenticate
419
+ * @param {*} [options] Override http request option.
420
+ * @throws {RequiredError}
421
+ */
422
+ async loginAuth(
423
+ authLogin: AuthLogin,
424
+ options?: RawAxiosRequestConfig,
425
+ ): Promise<
426
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthToken>
427
+ > {
428
+ const localVarAxiosArgs = await localVarAxiosParamCreator.loginAuth(
429
+ authLogin,
430
+ options,
431
+ );
432
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
433
+ const localVarOperationServerBasePath =
434
+ operationServerMap["AuthApi.loginAuth"]?.[localVarOperationServerIndex]
435
+ ?.url;
436
+ return (axios, basePath) =>
437
+ createRequestFunction(
438
+ localVarAxiosArgs,
439
+ globalAxios,
440
+ BASE_PATH,
441
+ configuration,
442
+ )(axios, localVarOperationServerBasePath || basePath);
443
+ },
444
+ /**
445
+ *
446
+ * @summary Refresh an auth token before it expires
447
+ * @param {*} [options] Override http request option.
448
+ * @throws {RequiredError}
449
+ */
450
+ async refreshAuth(
451
+ options?: RawAxiosRequestConfig,
452
+ ): Promise<
453
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthToken>
454
+ > {
455
+ const localVarAxiosArgs =
456
+ await localVarAxiosParamCreator.refreshAuth(options);
457
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
458
+ const localVarOperationServerBasePath =
459
+ operationServerMap["AuthApi.refreshAuth"]?.[
460
+ localVarOperationServerIndex
461
+ ]?.url;
462
+ return (axios, basePath) =>
463
+ createRequestFunction(
464
+ localVarAxiosArgs,
465
+ globalAxios,
466
+ BASE_PATH,
467
+ configuration,
468
+ )(axios, localVarOperationServerBasePath || basePath);
469
+ },
470
+ /**
471
+ *
472
+ * @summary Verify validity for an authentication token
473
+ * @param {*} [options] Override http request option.
474
+ * @throws {RequiredError}
475
+ */
476
+ async verifyAuth(
477
+ options?: RawAxiosRequestConfig,
478
+ ): Promise<
479
+ (axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthVerify>
480
+ > {
481
+ const localVarAxiosArgs =
482
+ await localVarAxiosParamCreator.verifyAuth(options);
483
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
484
+ const localVarOperationServerBasePath =
485
+ operationServerMap["AuthApi.verifyAuth"]?.[localVarOperationServerIndex]
486
+ ?.url;
487
+ return (axios, basePath) =>
488
+ createRequestFunction(
489
+ localVarAxiosArgs,
490
+ globalAxios,
491
+ BASE_PATH,
492
+ configuration,
493
+ )(axios, localVarOperationServerBasePath || basePath);
494
+ },
245
495
  };
246
496
  };
247
497
 
@@ -295,6 +545,43 @@ export const AuthApiFactory = function (
295
545
  )
296
546
  .then((request) => request(axios, basePath));
297
547
  },
548
+ /**
549
+ *
550
+ * @summary Authenticate an user by credentials
551
+ * @param {AuthApiLoginAuthRequest} requestParameters Request parameters.
552
+ * @param {*} [options] Override http request option.
553
+ * @throws {RequiredError}
554
+ */
555
+ loginAuth(
556
+ requestParameters: AuthApiLoginAuthRequest,
557
+ options?: RawAxiosRequestConfig,
558
+ ): AxiosPromise<AuthToken> {
559
+ return localVarFp
560
+ .loginAuth(requestParameters.authLogin, options)
561
+ .then((request) => request(axios, basePath));
562
+ },
563
+ /**
564
+ *
565
+ * @summary Refresh an auth token before it expires
566
+ * @param {*} [options] Override http request option.
567
+ * @throws {RequiredError}
568
+ */
569
+ refreshAuth(options?: RawAxiosRequestConfig): AxiosPromise<AuthToken> {
570
+ return localVarFp
571
+ .refreshAuth(options)
572
+ .then((request) => request(axios, basePath));
573
+ },
574
+ /**
575
+ *
576
+ * @summary Verify validity for an authentication token
577
+ * @param {*} [options] Override http request option.
578
+ * @throws {RequiredError}
579
+ */
580
+ verifyAuth(options?: RawAxiosRequestConfig): AxiosPromise<AuthVerify> {
581
+ return localVarFp
582
+ .verifyAuth(options)
583
+ .then((request) => request(axios, basePath));
584
+ },
298
585
  };
299
586
  };
300
587
 
@@ -347,6 +634,20 @@ export interface AuthApiExternalInitializeRequest {
347
634
  readonly state?: string;
348
635
  }
349
636
 
637
+ /**
638
+ * Request parameters for loginAuth operation in AuthApi.
639
+ * @export
640
+ * @interface AuthApiLoginAuthRequest
641
+ */
642
+ export interface AuthApiLoginAuthRequest {
643
+ /**
644
+ * The credentials to authenticate
645
+ * @type {AuthLogin}
646
+ * @memberof AuthApiLoginAuth
647
+ */
648
+ readonly authLogin: AuthLogin;
649
+ }
650
+
350
651
  /**
351
652
  * AuthApi - object-oriented interface
352
653
  * @export
@@ -396,4 +697,47 @@ export class AuthApi extends BaseAPI {
396
697
  )
397
698
  .then((request) => request(this.axios, this.basePath));
398
699
  }
700
+
701
+ /**
702
+ *
703
+ * @summary Authenticate an user by credentials
704
+ * @param {AuthApiLoginAuthRequest} requestParameters Request parameters.
705
+ * @param {*} [options] Override http request option.
706
+ * @throws {RequiredError}
707
+ * @memberof AuthApi
708
+ */
709
+ public loginAuth(
710
+ requestParameters: AuthApiLoginAuthRequest,
711
+ options?: RawAxiosRequestConfig,
712
+ ) {
713
+ return AuthApiFp(this.configuration)
714
+ .loginAuth(requestParameters.authLogin, options)
715
+ .then((request) => request(this.axios, this.basePath));
716
+ }
717
+
718
+ /**
719
+ *
720
+ * @summary Refresh an auth token before it expires
721
+ * @param {*} [options] Override http request option.
722
+ * @throws {RequiredError}
723
+ * @memberof AuthApi
724
+ */
725
+ public refreshAuth(options?: RawAxiosRequestConfig) {
726
+ return AuthApiFp(this.configuration)
727
+ .refreshAuth(options)
728
+ .then((request) => request(this.axios, this.basePath));
729
+ }
730
+
731
+ /**
732
+ *
733
+ * @summary Verify validity for an authentication token
734
+ * @param {*} [options] Override http request option.
735
+ * @throws {RequiredError}
736
+ * @memberof AuthApi
737
+ */
738
+ public verifyAuth(options?: RawAxiosRequestConfig) {
739
+ return AuthApiFp(this.configuration)
740
+ .verifyAuth(options)
741
+ .then((request) => request(this.axios, this.basePath));
742
+ }
399
743
  }