From 6067e0ee2c08eff799561ee9d200192a17da90af Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 9 Nov 2023 12:57:20 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc 1.0.0, Speakeasy CLI 1.117.0 --- .eslintrc.yml | 0 .gitattributes | 0 README.md | 47 +++++++--------- RELEASES.md | 12 ++++- USAGE.md | 13 +++-- .../components/createauthenticationrequest.md | 0 .../createauthenticationresponse.md | 0 docs/models/components/createcheckrequest.md | 0 docs/models/components/createcheckresponse.md | 0 .../components/createcheckresponsestatus.md | 0 docs/models/components/devicetype.md | 0 docs/models/components/linetype.md | 0 docs/models/components/lookuprequest.md | 0 docs/models/components/lookupresponse.md | 0 .../components/retryauthenticationrequest.md | 0 .../components/retryauthenticationresponse.md | 0 .../retryauthenticationresponsestatus.md | 0 docs/models/components/security.md | 0 docs/models/components/status.md | 0 docs/models/errors/code.md | 0 docs/models/errors/errorresponse.md | 0 docs/models/operations/checkresponse.md | 0 .../operations/createautenticationresponse.md | 0 docs/models/operations/lookuprequest.md | 0 docs/models/operations/lookupresponse.md | 0 docs/models/operations/retryresponse.md | 0 docs/sdks/ding/README.md | 0 docs/sdks/lookup/README.md | 0 docs/sdks/otp/README.md | 44 +++++++-------- files.gen | 14 ++--- gen.yaml | 11 ++-- jest.config.js | 0 package-lock.json | 4 +- package.json | 2 +- src/index.ts | 0 src/internal/utils/contenttype.ts | 0 src/internal/utils/headers.ts | 0 src/internal/utils/index.ts | 0 src/internal/utils/pathparams.ts | 0 src/internal/utils/queryparams.ts | 0 src/internal/utils/requestbody.ts | 0 src/internal/utils/retries.ts | 0 src/internal/utils/security.ts | 0 src/internal/utils/utils.ts | 0 .../components/createauthenticationrequest.ts | 0 .../createauthenticationresponse.ts | 0 src/models/components/createcheckrequest.ts | 0 src/models/components/createcheckresponse.ts | 0 src/models/components/index.ts | 0 src/models/components/lookuprequest.ts | 0 src/models/components/lookupresponse.ts | 0 .../components/retryauthenticationrequest.ts | 0 .../components/retryauthenticationresponse.ts | 0 src/models/components/security.ts | 0 src/models/errors/errorresponse.ts | 0 src/models/errors/index.ts | 0 src/models/errors/sdkerror.ts | 0 src/models/operations/check.ts | 0 src/models/operations/createautentication.ts | 0 src/models/operations/index.ts | 0 src/models/operations/lookup.ts | 0 src/models/operations/retry.ts | 0 src/sdk/index.ts | 0 src/sdk/lookup.ts | 0 src/sdk/otp.ts | 54 +++++++++---------- src/sdk/sdk.ts | 6 +-- src/types/index.ts | 0 src/types/rfcdate.ts | 0 tsconfig.json | 0 69 files changed, 107 insertions(+), 100 deletions(-) mode change 100755 => 100644 .eslintrc.yml mode change 100755 => 100644 .gitattributes mode change 100755 => 100644 USAGE.md mode change 100755 => 100644 docs/models/components/createauthenticationrequest.md mode change 100755 => 100644 docs/models/components/createauthenticationresponse.md mode change 100755 => 100644 docs/models/components/createcheckrequest.md mode change 100755 => 100644 docs/models/components/createcheckresponse.md mode change 100755 => 100644 docs/models/components/createcheckresponsestatus.md mode change 100755 => 100644 docs/models/components/devicetype.md mode change 100755 => 100644 docs/models/components/linetype.md mode change 100755 => 100644 docs/models/components/lookuprequest.md mode change 100755 => 100644 docs/models/components/lookupresponse.md mode change 100755 => 100644 docs/models/components/retryauthenticationrequest.md mode change 100755 => 100644 docs/models/components/retryauthenticationresponse.md mode change 100755 => 100644 docs/models/components/retryauthenticationresponsestatus.md mode change 100755 => 100644 docs/models/components/security.md mode change 100755 => 100644 docs/models/components/status.md mode change 100755 => 100644 docs/models/errors/code.md mode change 100755 => 100644 docs/models/errors/errorresponse.md mode change 100755 => 100644 docs/models/operations/checkresponse.md mode change 100755 => 100644 docs/models/operations/createautenticationresponse.md mode change 100755 => 100644 docs/models/operations/lookuprequest.md mode change 100755 => 100644 docs/models/operations/lookupresponse.md mode change 100755 => 100644 docs/models/operations/retryresponse.md mode change 100755 => 100644 docs/sdks/ding/README.md mode change 100755 => 100644 docs/sdks/lookup/README.md mode change 100755 => 100644 docs/sdks/otp/README.md mode change 100755 => 100644 jest.config.js mode change 100755 => 100644 package-lock.json mode change 100755 => 100644 package.json mode change 100755 => 100644 src/index.ts mode change 100755 => 100644 src/internal/utils/contenttype.ts mode change 100755 => 100644 src/internal/utils/headers.ts mode change 100755 => 100644 src/internal/utils/index.ts mode change 100755 => 100644 src/internal/utils/pathparams.ts mode change 100755 => 100644 src/internal/utils/queryparams.ts mode change 100755 => 100644 src/internal/utils/requestbody.ts mode change 100755 => 100644 src/internal/utils/retries.ts mode change 100755 => 100644 src/internal/utils/security.ts mode change 100755 => 100644 src/internal/utils/utils.ts mode change 100755 => 100644 src/models/components/createauthenticationrequest.ts mode change 100755 => 100644 src/models/components/createauthenticationresponse.ts mode change 100755 => 100644 src/models/components/createcheckrequest.ts mode change 100755 => 100644 src/models/components/createcheckresponse.ts mode change 100755 => 100644 src/models/components/index.ts mode change 100755 => 100644 src/models/components/lookuprequest.ts mode change 100755 => 100644 src/models/components/lookupresponse.ts mode change 100755 => 100644 src/models/components/retryauthenticationrequest.ts mode change 100755 => 100644 src/models/components/retryauthenticationresponse.ts mode change 100755 => 100644 src/models/components/security.ts mode change 100755 => 100644 src/models/errors/errorresponse.ts mode change 100755 => 100644 src/models/errors/index.ts mode change 100755 => 100644 src/models/errors/sdkerror.ts mode change 100755 => 100644 src/models/operations/check.ts mode change 100755 => 100644 src/models/operations/createautentication.ts mode change 100755 => 100644 src/models/operations/index.ts mode change 100755 => 100644 src/models/operations/lookup.ts mode change 100755 => 100644 src/models/operations/retry.ts mode change 100755 => 100644 src/sdk/index.ts mode change 100755 => 100644 src/sdk/lookup.ts mode change 100755 => 100644 src/sdk/otp.ts mode change 100755 => 100644 src/sdk/sdk.ts mode change 100755 => 100644 src/types/index.ts mode change 100755 => 100644 src/types/rfcdate.ts mode change 100755 => 100644 tsconfig.json diff --git a/.eslintrc.yml b/.eslintrc.yml old mode 100755 new mode 100644 diff --git a/.gitattributes b/.gitattributes old mode 100755 new mode 100644 diff --git a/README.md b/README.md index 95a8e1b..b578e21 100755 --- a/README.md +++ b/README.md @@ -21,9 +21,11 @@ yarn add @ding-live/ding ## SDK Example Usage -## Send a code +### Send a code + Send an OTP code to a user's phone number. + ```typescript import { Ding } from "@ding-live/ding"; import { DeviceType } from "@ding-live/ding/dist/models/components"; @@ -33,8 +35,8 @@ import { DeviceType } from "@ding-live/ding/dist/models/components"; apiKey: "YOUR_API_KEY", }); - const res = await sdk.otp.createAutentication({ - customerUuid: "eae192ab-9e1e-4b21-b5b1-bfcb79a32fcc", + const res = await sdk.otp.send({ + customerUuid: "82779012-9667-4917-8532-b94017ce3f0f", phoneNumber: "+1234567890", }); @@ -45,10 +47,11 @@ import { DeviceType } from "@ding-live/ding/dist/models/components"; ``` +### Check a code -## Check a code Check that a code entered by a user is valid. + ```typescript import { Ding } from "@ding-live/ding"; @@ -70,10 +73,11 @@ import { Ding } from "@ding-live/ding"; ``` +### Retry an authentication -## Retry an authentication Retry an authentication if a user has not received the code. + ```typescript import { Ding } from "@ding-live/ding"; @@ -102,8 +106,8 @@ import { Ding } from "@ding-live/ding"; ### [otp](docs/sdks/otp/README.md) * [check](docs/sdks/otp/README.md#check) - Check an authentication code -* [createAutentication](docs/sdks/otp/README.md#createautentication) - Create an authentication * [retry](docs/sdks/otp/README.md#retry) - Retry an authentication +* [send](docs/sdks/otp/README.md#send) - Create an authentication ### [lookup](docs/sdks/lookup/README.md) @@ -115,7 +119,7 @@ import { Ding } from "@ding-live/ding"; -# Error Handling +## Error Handling Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type. @@ -124,9 +128,7 @@ Handling errors in this SDK should largely match your expectations. All operati | errors.ErrorResponse | 400 | application/json | | errors.SDKError | 400-600 | */* | - -## Check a code -Check that a code entered by a user is valid. +Example ```typescript import { Ding } from "@ding-live/ding"; @@ -158,11 +160,10 @@ import { Ding } from "@ding-live/ding"; -# Custom HTTP Client +## Custom HTTP Client The Typescript SDK makes API calls using the (axios)[https://axios-http.com/docs/intro] HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `AxiosInstance` object. - For example, you could specify a header for every request that your sdk makes as follows: ```typescript @@ -173,15 +174,14 @@ const httpClient = axios.create({ headers: {'x-custom-header': 'someValue'} }) - const sdk = new Ding({defaultClient: httpClient}); ``` -# Authentication +## Authentication -## Per-Client Security Schemes +### Per-Client Security Schemes This SDK supports the following security scheme globally: @@ -190,9 +190,6 @@ This SDK supports the following security scheme globally: | `apiKey` | apiKey | API key | To authenticate with the API the `apiKey` parameter must be set when initializing the SDK client instance. For example: -## Check a code -Check that a code entered by a user is valid. - ```typescript import { Ding } from "@ding-live/ding"; @@ -218,19 +215,16 @@ import { Ding } from "@ding-live/ding"; -# Server Selection +## Server Selection -## Select Server by Name +### Select Server by Name You can override the default server globally by passing a server name to the `server: string` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers: | Name | Server | Variables | | ----- | ------ | --------- | | `production` | `https://api.ding.live/v1` | None | - -For example: -## Check a code -Check that a code entered by a user is valid. +#### Example ```typescript import { Ding } from "@ding-live/ding"; @@ -255,12 +249,9 @@ import { Ding } from "@ding-live/ding"; ``` -## Override Server URL Per-Client +### Override Server URL Per-Client The default server can also be overridden globally by passing a URL to the `serverURL: str` optional parameter when initializing the SDK client instance. For example: -## Check a code -Check that a code entered by a user is valid. - ```typescript import { Ding } from "@ding-live/ding"; diff --git a/RELEASES.md b/RELEASES.md index eb802b2..8abd5cc 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -16,4 +16,14 @@ Based on: ### Generated - [typescript v0.2.0] . ### Releases -- [NPM v0.2.0] https://www.npmjs.com/package/@ding-live/ding/v/0.2.0 - . \ No newline at end of file +- [NPM v0.2.0] https://www.npmjs.com/package/@ding-live/ding/v/0.2.0 - . + +## 2023-11-09 12:57:00 +### Changes +Based on: +- OpenAPI Doc 1.0.0 +- Speakeasy CLI 1.117.0 (2.186.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.2.1] . +### Releases +- [NPM v0.2.1] https://www.npmjs.com/package/@ding-live/ding/v/0.2.1 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md old mode 100755 new mode 100644 index 18c38a1..450923a --- a/USAGE.md +++ b/USAGE.md @@ -1,8 +1,9 @@ +### Send a code -## Send a code Send an OTP code to a user's phone number. + ```typescript import { Ding } from "@ding-live/ding"; import { DeviceType } from "@ding-live/ding/dist/models/components"; @@ -12,8 +13,8 @@ import { DeviceType } from "@ding-live/ding/dist/models/components"; apiKey: "YOUR_API_KEY", }); - const res = await sdk.otp.createAutentication({ - customerUuid: "eae192ab-9e1e-4b21-b5b1-bfcb79a32fcc", + const res = await sdk.otp.send({ + customerUuid: "82779012-9667-4917-8532-b94017ce3f0f", phoneNumber: "+1234567890", }); @@ -24,10 +25,11 @@ import { DeviceType } from "@ding-live/ding/dist/models/components"; ``` +### Check a code -## Check a code Check that a code entered by a user is valid. + ```typescript import { Ding } from "@ding-live/ding"; @@ -49,10 +51,11 @@ import { Ding } from "@ding-live/ding"; ``` +### Retry an authentication -## Retry an authentication Retry an authentication if a user has not received the code. + ```typescript import { Ding } from "@ding-live/ding"; diff --git a/docs/models/components/createauthenticationrequest.md b/docs/models/components/createauthenticationrequest.md old mode 100755 new mode 100644 diff --git a/docs/models/components/createauthenticationresponse.md b/docs/models/components/createauthenticationresponse.md old mode 100755 new mode 100644 diff --git a/docs/models/components/createcheckrequest.md b/docs/models/components/createcheckrequest.md old mode 100755 new mode 100644 diff --git a/docs/models/components/createcheckresponse.md b/docs/models/components/createcheckresponse.md old mode 100755 new mode 100644 diff --git a/docs/models/components/createcheckresponsestatus.md b/docs/models/components/createcheckresponsestatus.md old mode 100755 new mode 100644 diff --git a/docs/models/components/devicetype.md b/docs/models/components/devicetype.md old mode 100755 new mode 100644 diff --git a/docs/models/components/linetype.md b/docs/models/components/linetype.md old mode 100755 new mode 100644 diff --git a/docs/models/components/lookuprequest.md b/docs/models/components/lookuprequest.md old mode 100755 new mode 100644 diff --git a/docs/models/components/lookupresponse.md b/docs/models/components/lookupresponse.md old mode 100755 new mode 100644 diff --git a/docs/models/components/retryauthenticationrequest.md b/docs/models/components/retryauthenticationrequest.md old mode 100755 new mode 100644 diff --git a/docs/models/components/retryauthenticationresponse.md b/docs/models/components/retryauthenticationresponse.md old mode 100755 new mode 100644 diff --git a/docs/models/components/retryauthenticationresponsestatus.md b/docs/models/components/retryauthenticationresponsestatus.md old mode 100755 new mode 100644 diff --git a/docs/models/components/security.md b/docs/models/components/security.md old mode 100755 new mode 100644 diff --git a/docs/models/components/status.md b/docs/models/components/status.md old mode 100755 new mode 100644 diff --git a/docs/models/errors/code.md b/docs/models/errors/code.md old mode 100755 new mode 100644 diff --git a/docs/models/errors/errorresponse.md b/docs/models/errors/errorresponse.md old mode 100755 new mode 100644 diff --git a/docs/models/operations/checkresponse.md b/docs/models/operations/checkresponse.md old mode 100755 new mode 100644 diff --git a/docs/models/operations/createautenticationresponse.md b/docs/models/operations/createautenticationresponse.md old mode 100755 new mode 100644 diff --git a/docs/models/operations/lookuprequest.md b/docs/models/operations/lookuprequest.md old mode 100755 new mode 100644 diff --git a/docs/models/operations/lookupresponse.md b/docs/models/operations/lookupresponse.md old mode 100755 new mode 100644 diff --git a/docs/models/operations/retryresponse.md b/docs/models/operations/retryresponse.md old mode 100755 new mode 100644 diff --git a/docs/sdks/ding/README.md b/docs/sdks/ding/README.md old mode 100755 new mode 100644 diff --git a/docs/sdks/lookup/README.md b/docs/sdks/lookup/README.md old mode 100755 new mode 100644 diff --git a/docs/sdks/otp/README.md b/docs/sdks/otp/README.md old mode 100755 new mode 100644 index decefeb..3b061bd --- a/docs/sdks/otp/README.md +++ b/docs/sdks/otp/README.md @@ -8,8 +8,8 @@ Send OTP codes to your users using their phone numbers. ### Available Operations * [check](#check) - Check an authentication code -* [createAutentication](#createautentication) - Create an authentication * [retry](#retry) - Retry an authentication +* [send](#send) - Create an authentication ## check @@ -55,24 +55,23 @@ import { Ding } from "@ding-live/ding"; | errors.ErrorResponse | 400 | application/json | | errors.SDKError | 400-600 | */* | -## createAutentication +## retry -Create an authentication +Retry an authentication ### Example Usage ```typescript import { Ding } from "@ding-live/ding"; -import { DeviceType } from "@ding-live/ding/dist/models/components"; (async() => { const sdk = new Ding({ apiKey: "YOUR_API_KEY", }); - const res = await sdk.otp.createAutentication({ - customerUuid: "eae192ab-9e1e-4b21-b5b1-bfcb79a32fcc", - phoneNumber: "+1234567890", + const res = await sdk.otp.retry({ + authenticationUuid: "a74ee547-564d-487a-91df-37fb25413a91", + customerUuid: "3c8b3a46-881e-4cdd-93a6-f7f238bf020a", }); if (res.statusCode == 200) { @@ -83,15 +82,15 @@ import { DeviceType } from "@ding-live/ding/dist/models/components"; ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `request` | [components.CreateAuthenticationRequest](../../models/components/createauthenticationrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `request` | [components.RetryAuthenticationRequest](../../models/components/retryauthenticationrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.CreateAutenticationResponse](../../models/operations/createautenticationresponse.md)>** +**Promise<[operations.RetryResponse](../../models/operations/retryresponse.md)>** ### Errors | Error Object | Status Code | Content Type | @@ -99,23 +98,24 @@ import { DeviceType } from "@ding-live/ding/dist/models/components"; | errors.ErrorResponse | 400 | application/json | | errors.SDKError | 400-600 | */* | -## retry +## send -Retry an authentication +Create an authentication ### Example Usage ```typescript import { Ding } from "@ding-live/ding"; +import { DeviceType } from "@ding-live/ding/dist/models/components"; (async() => { const sdk = new Ding({ apiKey: "YOUR_API_KEY", }); - const res = await sdk.otp.retry({ - authenticationUuid: "a74ee547-564d-487a-91df-37fb25413a91", - customerUuid: "3c8b3a46-881e-4cdd-93a6-f7f238bf020a", + const res = await sdk.otp.send({ + customerUuid: "82779012-9667-4917-8532-b94017ce3f0f", + phoneNumber: "+1234567890", }); if (res.statusCode == 200) { @@ -126,15 +126,15 @@ import { Ding } from "@ding-live/ding"; ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `request` | [components.RetryAuthenticationRequest](../../models/components/retryauthenticationrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `request` | [components.CreateAuthenticationRequest](../../models/components/createauthenticationrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | ### Response -**Promise<[operations.RetryResponse](../../models/operations/retryresponse.md)>** +**Promise<[operations.CreateAutenticationResponse](../../models/operations/createautenticationresponse.md)>** ### Errors | Error Object | Status Code | Content Type | diff --git a/files.gen b/files.gen index 0c92179..d896564 100755 --- a/files.gen +++ b/files.gen @@ -21,15 +21,15 @@ src/types/index.ts src/types/rfcdate.ts tsconfig.json src/models/operations/check.ts -src/models/operations/createautentication.ts src/models/operations/retry.ts +src/models/operations/createautentication.ts src/models/operations/lookup.ts src/models/components/createcheckresponse.ts src/models/components/createcheckrequest.ts -src/models/components/createauthenticationresponse.ts -src/models/components/createauthenticationrequest.ts src/models/components/retryauthenticationresponse.ts src/models/components/retryauthenticationrequest.ts +src/models/components/createauthenticationresponse.ts +src/models/components/createauthenticationrequest.ts src/models/components/lookupresponse.ts src/models/components/lookuprequest.ts src/models/components/security.ts @@ -39,20 +39,20 @@ src/models/operations/index.ts src/models/components/index.ts USAGE.md docs/models/operations/checkresponse.md -docs/models/operations/createautenticationresponse.md docs/models/operations/retryresponse.md +docs/models/operations/createautenticationresponse.md docs/models/operations/lookuprequest.md docs/models/operations/lookupresponse.md docs/models/components/createcheckresponsestatus.md docs/models/components/createcheckresponse.md docs/models/components/createcheckrequest.md +docs/models/components/retryauthenticationresponsestatus.md +docs/models/components/retryauthenticationresponse.md +docs/models/components/retryauthenticationrequest.md docs/models/components/status.md docs/models/components/createauthenticationresponse.md docs/models/components/devicetype.md docs/models/components/createauthenticationrequest.md -docs/models/components/retryauthenticationresponsestatus.md -docs/models/components/retryauthenticationresponse.md -docs/models/components/retryauthenticationrequest.md docs/models/components/linetype.md docs/models/components/lookupresponse.md docs/models/components/lookuprequest.md diff --git a/gen.yaml b/gen.yaml index 7d20c83..5da0a76 100644 --- a/gen.yaml +++ b/gen.yaml @@ -1,13 +1,15 @@ configVersion: 1.0.0 management: - docChecksum: b8a9cbd146aa1183c110d3a9672c46b4 + docChecksum: a80ffb060b1b607a61badc02c80a52bd docVersion: 1.0.0 - speakeasyVersion: 1.116.0 - generationVersion: 2.185.0 + speakeasyVersion: 1.117.0 + generationVersion: 2.186.4 generation: comments: {} sdkClassName: Ding repoURL: https://github.com/ding-live/ding-typescript.git + usageSnippets: + optionalPropertyRendering: withExample features: typescript: core: 3.1.2 @@ -15,9 +17,10 @@ features: flattening: 2.81.1 globalSecurity: 2.82.0 globalServerURLs: 2.82.0 + nameOverrides: 2.81.1 serverIDs: 2.81.2 typescript: - version: 0.2.0 + version: 0.2.1 author: Ding clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true diff --git a/jest.config.js b/jest.config.js old mode 100755 new mode 100644 diff --git a/package-lock.json b/package-lock.json old mode 100755 new mode 100644 index 6d9880f..0dacfba --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ding-live/ding", - "version": "0.2.0", + "version": "0.2.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ding-live/ding", - "version": "0.2.0", + "version": "0.2.1", "dependencies": { "axios": "^1.1.3", "class-transformer": "^0.5.1", diff --git a/package.json b/package.json old mode 100755 new mode 100644 index 455ced1..bdbb4ea --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ding-live/ding", - "version": "0.2.0", + "version": "0.2.1", "author": "Ding", "scripts": { "prepare": "tsc --build", diff --git a/src/index.ts b/src/index.ts old mode 100755 new mode 100644 diff --git a/src/internal/utils/contenttype.ts b/src/internal/utils/contenttype.ts old mode 100755 new mode 100644 diff --git a/src/internal/utils/headers.ts b/src/internal/utils/headers.ts old mode 100755 new mode 100644 diff --git a/src/internal/utils/index.ts b/src/internal/utils/index.ts old mode 100755 new mode 100644 diff --git a/src/internal/utils/pathparams.ts b/src/internal/utils/pathparams.ts old mode 100755 new mode 100644 diff --git a/src/internal/utils/queryparams.ts b/src/internal/utils/queryparams.ts old mode 100755 new mode 100644 diff --git a/src/internal/utils/requestbody.ts b/src/internal/utils/requestbody.ts old mode 100755 new mode 100644 diff --git a/src/internal/utils/retries.ts b/src/internal/utils/retries.ts old mode 100755 new mode 100644 diff --git a/src/internal/utils/security.ts b/src/internal/utils/security.ts old mode 100755 new mode 100644 diff --git a/src/internal/utils/utils.ts b/src/internal/utils/utils.ts old mode 100755 new mode 100644 diff --git a/src/models/components/createauthenticationrequest.ts b/src/models/components/createauthenticationrequest.ts old mode 100755 new mode 100644 diff --git a/src/models/components/createauthenticationresponse.ts b/src/models/components/createauthenticationresponse.ts old mode 100755 new mode 100644 diff --git a/src/models/components/createcheckrequest.ts b/src/models/components/createcheckrequest.ts old mode 100755 new mode 100644 diff --git a/src/models/components/createcheckresponse.ts b/src/models/components/createcheckresponse.ts old mode 100755 new mode 100644 diff --git a/src/models/components/index.ts b/src/models/components/index.ts old mode 100755 new mode 100644 diff --git a/src/models/components/lookuprequest.ts b/src/models/components/lookuprequest.ts old mode 100755 new mode 100644 diff --git a/src/models/components/lookupresponse.ts b/src/models/components/lookupresponse.ts old mode 100755 new mode 100644 diff --git a/src/models/components/retryauthenticationrequest.ts b/src/models/components/retryauthenticationrequest.ts old mode 100755 new mode 100644 diff --git a/src/models/components/retryauthenticationresponse.ts b/src/models/components/retryauthenticationresponse.ts old mode 100755 new mode 100644 diff --git a/src/models/components/security.ts b/src/models/components/security.ts old mode 100755 new mode 100644 diff --git a/src/models/errors/errorresponse.ts b/src/models/errors/errorresponse.ts old mode 100755 new mode 100644 diff --git a/src/models/errors/index.ts b/src/models/errors/index.ts old mode 100755 new mode 100644 diff --git a/src/models/errors/sdkerror.ts b/src/models/errors/sdkerror.ts old mode 100755 new mode 100644 diff --git a/src/models/operations/check.ts b/src/models/operations/check.ts old mode 100755 new mode 100644 diff --git a/src/models/operations/createautentication.ts b/src/models/operations/createautentication.ts old mode 100755 new mode 100644 diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts old mode 100755 new mode 100644 diff --git a/src/models/operations/lookup.ts b/src/models/operations/lookup.ts old mode 100755 new mode 100644 diff --git a/src/models/operations/retry.ts b/src/models/operations/retry.ts old mode 100755 new mode 100644 diff --git a/src/sdk/index.ts b/src/sdk/index.ts old mode 100755 new mode 100644 diff --git a/src/sdk/lookup.ts b/src/sdk/lookup.ts old mode 100755 new mode 100644 diff --git a/src/sdk/otp.ts b/src/sdk/otp.ts old mode 100755 new mode 100644 index c44564c..9cca392 --- a/src/sdk/otp.ts +++ b/src/sdk/otp.ts @@ -130,21 +130,21 @@ export class Otp { } /** - * Create an authentication + * Retry an authentication */ - async createAutentication( - req: components.CreateAuthenticationRequest, + async retry( + req: components.RetryAuthenticationRequest, config?: AxiosRequestConfig - ): Promise { + ): Promise { if (!(req instanceof utils.SpeakeasyBase)) { - req = new components.CreateAuthenticationRequest(req); + req = new components.RetryAuthenticationRequest(req); } const baseURL: string = utils.templateUrl( this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const operationUrl: string = baseURL.replace(/\/$/, "") + "/authentication"; + const operationUrl: string = baseURL.replace(/\/$/, "") + "/retry"; let [reqBodyHeaders, reqBody]: [object, any] = [{}, null]; @@ -189,19 +189,18 @@ export class Otp { throw new Error(`status code not found in response: ${httpRes}`); } - const res: operations.CreateAutenticationResponse = - new operations.CreateAutenticationResponse({ - statusCode: httpRes.status, - contentType: contentType, - rawResponse: httpRes, - }); + const res: operations.RetryResponse = new operations.RetryResponse({ + statusCode: httpRes.status, + contentType: contentType, + rawResponse: httpRes, + }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: if (utils.matchContentType(contentType, `application/json`)) { - res.createAuthenticationResponse = utils.objectToClass( + res.retryAuthenticationResponse = utils.objectToClass( JSON.parse(decodedRes), - components.CreateAuthenticationResponse + components.RetryAuthenticationResponse ); } else { throw new errors.SDKError( @@ -240,21 +239,21 @@ export class Otp { } /** - * Retry an authentication + * Create an authentication */ - async retry( - req: components.RetryAuthenticationRequest, + async send( + req: components.CreateAuthenticationRequest, config?: AxiosRequestConfig - ): Promise { + ): Promise { if (!(req instanceof utils.SpeakeasyBase)) { - req = new components.RetryAuthenticationRequest(req); + req = new components.CreateAuthenticationRequest(req); } const baseURL: string = utils.templateUrl( this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults ); - const operationUrl: string = baseURL.replace(/\/$/, "") + "/retry"; + const operationUrl: string = baseURL.replace(/\/$/, "") + "/authentication"; let [reqBodyHeaders, reqBody]: [object, any] = [{}, null]; @@ -299,18 +298,19 @@ export class Otp { throw new Error(`status code not found in response: ${httpRes}`); } - const res: operations.RetryResponse = new operations.RetryResponse({ - statusCode: httpRes.status, - contentType: contentType, - rawResponse: httpRes, - }); + const res: operations.CreateAutenticationResponse = + new operations.CreateAutenticationResponse({ + statusCode: httpRes.status, + contentType: contentType, + rawResponse: httpRes, + }); const decodedRes = new TextDecoder().decode(httpRes?.data); switch (true) { case httpRes?.status == 200: if (utils.matchContentType(contentType, `application/json`)) { - res.retryAuthenticationResponse = utils.objectToClass( + res.createAuthenticationResponse = utils.objectToClass( JSON.parse(decodedRes), - components.RetryAuthenticationResponse + components.CreateAuthenticationResponse ); } else { throw new errors.SDKError( diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts old mode 100755 new mode 100644 index 3f809cf..0598901 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -53,9 +53,9 @@ export class SDKConfiguration { serverDefaults: any; language = "typescript"; openapiDocVersion = "1.0.0"; - sdkVersion = "0.2.0"; - genVersion = "2.185.0"; - userAgent = "speakeasy-sdk/typescript 0.2.0 2.185.0 1.0.0 @ding-live/ding"; + sdkVersion = "0.2.1"; + genVersion = "2.186.4"; + userAgent = "speakeasy-sdk/typescript 0.2.1 2.186.4 1.0.0 @ding-live/ding"; retryConfig?: utils.RetryConfig; public constructor(init?: Partial) { Object.assign(this, init); diff --git a/src/types/index.ts b/src/types/index.ts old mode 100755 new mode 100644 diff --git a/src/types/rfcdate.ts b/src/types/rfcdate.ts old mode 100755 new mode 100644 diff --git a/tsconfig.json b/tsconfig.json old mode 100755 new mode 100644