Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 1.0.0, Speakeasy CLI 1.401.2
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Sep 21, 2024
1 parent 135337d commit a9ad102
Show file tree
Hide file tree
Showing 20 changed files with 250 additions and 240 deletions.
10 changes: 5 additions & 5 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ id: 7a2c976b-8158-4d12-8b59-c491e9e10cfd
management:
docChecksum: c2a5d8222f4117f238343d6187ef2751
docVersion: 1.0.0
speakeasyVersion: 1.396.9
generationVersion: 2.415.7
releaseVersion: 0.10.1
configChecksum: a68288d69c12eb463780e5b2bad8aecb
speakeasyVersion: 1.401.2
generationVersion: 2.421.3
releaseVersion: 0.10.2
configChecksum: 75f496efee76d9a28559f2ff3845bd63
repoURL: https://github.com/ding-live/ding-typescript.git
repoSubDirectory: .
installationURL: https://github.com/ding-live/ding-typescript
published: true
features:
typescript:
additionalDependencies: 0.1.0
core: 3.17.3
core: 3.17.6
defaultEnabledRetries: 0.1.0
enumUnions: 0.1.0
envVarSecurityUsage: 0.1.1
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,4 +456,14 @@ Based on:
### Generated
- [typescript v0.10.1] .
### Releases
- [NPM v0.10.1] https://www.npmjs.com/package/@ding-live/ding/v/0.10.1 - .
- [NPM v0.10.1] https://www.npmjs.com/package/@ding-live/ding/v/0.10.1 - .

## 2024-09-21 00:03:16
### Changes
Based on:
- OpenAPI Doc 1.0.0
- Speakeasy CLI 1.401.2 (2.421.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.10.2] .
### Releases
- [NPM v0.10.2] https://www.npmjs.com/package/@ding-live/ding/v/0.10.2 - .
2 changes: 1 addition & 1 deletion docs/models/components/createauthenticationrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { CreateAuthenticationRequest } from "@ding-live/ding/models/components";

let value: CreateAuthenticationRequest = {
customerUuid: "73920592-9396-4fea-b596-eb10faaa2352",
customerUuid: "35d1d1f7-f9b0-4414-9156-1b94819e5a2b",
phoneNumber: "+1234567890",
};
```
Expand Down
4 changes: 2 additions & 2 deletions docs/models/components/createcheckrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import { CreateCheckRequest } from "@ding-live/ding/models/components";

let value: CreateCheckRequest = {
authenticationUuid: "89bd9d8d-69a6-474e-8f46-7cc8796ed151",
authenticationUuid: "8b986a7e-f6c8-49e1-910d-cdfc7c1a2f86",
checkCode: "123456",
customerUuid: "a05dfc2d-df7c-4c78-8a1b-a928fc816742",
customerUuid: "c790999f-a56b-40aa-8325-597f132a4732",
};
```

Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/devicetype.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The type of device the user is using.
```typescript
import { DeviceType } from "@ding-live/ding/models/components";

let value: DeviceType = "WEB";
let value: DeviceType = "IOS";
```

## Values
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/feedbackrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { FeedbackRequest } from "@ding-live/ding/models/components";

let value: FeedbackRequest = {
customerUuid: "c5955907-aff1-4a3a-afa9-467739251aa5",
customerUuid: "290d0a4b-f399-493f-a7db-4d6e9ebb8fa6",
phoneNumber: "+1234567890",
status: "onboarded",
};
Expand Down
4 changes: 2 additions & 2 deletions docs/models/components/retryauthenticationrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import { RetryAuthenticationRequest } from "@ding-live/ding/models/components";

let value: RetryAuthenticationRequest = {
authenticationUuid: "2c3f5ad0-19da-41ff-a78f-097b0074f154",
customerUuid: "71b5e6e1-3b99-4d48-8e1e-91e450ad2abd",
authenticationUuid: "04a49624-999a-4a6e-b56e-cb1ebf2d291d",
customerUuid: "961b7bdf-d05b-4280-a30c-35eb02993e98",
};
```

Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The status of the authentication. Possible values are:
```typescript
import { Status } from "@ding-live/ding/models/components";

let value: Status = "spam_detected";
let value: Status = "rate_limited";
```

## Values
Expand Down
2 changes: 1 addition & 1 deletion docs/models/operations/lookuprequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { LookupRequest } from "@ding-live/ding/models/operations";

let value: LookupRequest = {
customerUuid: "44269802-d502-4a94-bb4f-63c969e9a3ef",
customerUuid: "b4632fb7-3406-44b6-a201-a78ef3a40c56",
phoneNumber: "<value>",
};
```
Expand Down
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
typescript:
version: 0.10.1
version: 0.10.2
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand Down
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
"name": "@ding-live/ding",
"version": "0.10.1",
"version": "0.10.2",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ding-live/ding",
"version": "0.10.1",
"version": "0.10.2",
"author": "Ding",
"main": "./index.js",
"sideEffects": false,
Expand Down
80 changes: 40 additions & 40 deletions src/funcs/lookupLookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/

import { DingCore } from "../core.js";
import { encodeSimple as encodeSimple$ } from "../lib/encodings.js";
import * as m$ from "../lib/matchers.js";
import * as schemas$ from "../lib/schemas.js";
import { encodeSimple } from "../lib/encodings.js";
import * as M from "../lib/matchers.js";
import { safeParse } from "../lib/schemas.js";
import { RequestOptions } from "../lib/sdks.js";
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
import { pathToFunc } from "../lib/url.js";
Expand All @@ -27,7 +27,7 @@ import { Result } from "../types/fp.js";
* Perform a phone number lookup
*/
export async function lookupLookup(
client$: DingCore,
client: DingCore,
customerUuid: string,
phoneNumber: string,
options?: RequestOptions,
Expand All @@ -44,78 +44,78 @@ export async function lookupLookup(
| ConnectionError
>
> {
const input$: operations.LookupRequest = {
const input: operations.LookupRequest = {
customerUuid: customerUuid,
phoneNumber: phoneNumber,
};

const parsed$ = schemas$.safeParse(
input$,
(value$) => operations.LookupRequest$outboundSchema.parse(value$),
const parsed = safeParse(
input,
(value) => operations.LookupRequest$outboundSchema.parse(value),
"Input validation failed",
);
if (!parsed$.ok) {
return parsed$;
if (!parsed.ok) {
return parsed;
}
const payload$ = parsed$.value;
const body$ = null;
const payload = parsed.value;
const body = null;

const pathParams$ = {
phone_number: encodeSimple$("phone_number", payload$.phone_number, {
const pathParams = {
phone_number: encodeSimple("phone_number", payload.phone_number, {
explode: false,
charEncoding: "percent",
}),
};

const path$ = pathToFunc("/lookup/{phone_number}")(pathParams$);
const path = pathToFunc("/lookup/{phone_number}")(pathParams);

const headers$ = new Headers({
const headers = new Headers({
Accept: "application/json",
"customer-uuid": encodeSimple$("customer-uuid", payload$["customer-uuid"], {
"customer-uuid": encodeSimple("customer-uuid", payload["customer-uuid"], {
explode: false,
charEncoding: "none",
}),
});

const apiKey$ = await extractSecurity(client$.options$.apiKey);
const security$ = apiKey$ == null ? {} : { apiKey: apiKey$ };
const secConfig = await extractSecurity(client._options.apiKey);
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
const context = {
operationID: "lookup",
oAuth2Scopes: [],
securitySource: client$.options$.apiKey,
securitySource: client._options.apiKey,
};
const securitySettings$ = resolveGlobalSecurity(security$);
const requestSecurity = resolveGlobalSecurity(securityInput);

const requestRes = client$.createRequest$(context, {
security: securitySettings$,
const requestRes = client._createRequest(context, {
security: requestSecurity,
method: "GET",
path: path$,
headers: headers$,
body: body$,
timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1,
path: path,
headers: headers,
body: body,
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
}, options);
if (!requestRes.ok) {
return requestRes;
}
const request$ = requestRes.value;
const req = requestRes.value;

const doResult = await client$.do$(request$, {
const doResult = await client._do(req, {
context,
errorCodes: ["400", "4XX", "5XX"],
retryConfig: options?.retries
|| client$.options$.retryConfig,
|| client._options.retryConfig,
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
});
if (!doResult.ok) {
return doResult;
}
const response = doResult.value;

const responseFields$ = {
HttpMeta: { Response: response, Request: request$ },
const responseFields = {
HttpMeta: { Response: response, Request: req },
};

const [result$] = await m$.match<
const [result] = await M.match<
components.LookupResponse,
| errors.ErrorResponse
| SDKError
Expand All @@ -126,13 +126,13 @@ export async function lookupLookup(
| RequestTimeoutError
| ConnectionError
>(
m$.json(200, components.LookupResponse$inboundSchema),
m$.jsonErr(400, errors.ErrorResponse$inboundSchema),
m$.fail(["4XX", "5XX"]),
)(response, { extraFields: responseFields$ });
if (!result$.ok) {
return result$;
M.json(200, components.LookupResponse$inboundSchema),
M.jsonErr(400, errors.ErrorResponse$inboundSchema),
M.fail(["4XX", "5XX"]),
)(response, { extraFields: responseFields });
if (!result.ok) {
return result;
}

return result$;
return result;
}
Loading

0 comments on commit a9ad102

Please sign in to comment.