Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.453.10
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Dec 11, 2024
1 parent 475b939 commit 08ef8ed
Show file tree
Hide file tree
Showing 16 changed files with 103 additions and 24 deletions.
10 changes: 6 additions & 4 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 7a2c976b-8158-4d12-8b59-c491e9e10cfd
management:
docChecksum: 9fbd6321083c0c2d44365ff84b8e2cb8
docChecksum: 7b0a21df5c4526c3e13357d16d9397df
docVersion: 1.0.0
speakeasyVersion: 1.453.8
speakeasyVersion: 1.453.10
generationVersion: 2.474.15
releaseVersion: 0.14.34
configChecksum: 653799ef0753f5cf472e8709d9b76716
releaseVersion: 0.14.35
configChecksum: cbc6aa60beca585043a7651b972b9db3
repoURL: https://github.com/ding-live/ding-typescript.git
repoSubDirectory: .
installationURL: https://github.com/ding-live/ding-typescript
Expand Down Expand Up @@ -73,6 +73,7 @@ generatedFiles:
- docs/models/errors/errorresponse.md
- docs/models/operations/getauthenticationstatusrequest.md
- docs/models/operations/lookuprequest.md
- docs/models/operations/type.md
- docs/sdks/ding/README.md
- docs/sdks/lookup/README.md
- docs/sdks/otp/README.md
Expand Down Expand Up @@ -185,6 +186,7 @@ examples:
parameters:
path:
phone_number: "<value>"
query: {}
header:
customer-uuid: "6e93aa15-9177-4d09-8395-b69ce50db1c8"
responses:
Expand Down
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
speakeasyVersion: 1.453.8
speakeasyVersion: 1.453.10
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:43cbb041df8ded714db89cfafd4cb5f70950ed3047d5bb8fa973edc5f93e9630
sourceBlobDigest: sha256:4d3dd890b21d2c069d944869e00ea2505c58a172c1b06fa3cb7b59c56c21a500
sourceRevisionDigest: sha256:19049754db9673ddbc40b82ab5ee9890d164f9dfcb8fac0c4f97a1bfd31f6771
sourceBlobDigest: sha256:1bc8346f862d17395d3ec227c51c74504f59eabaf83eb40c2932c517c8a40bf8
tags:
- latest
- speakeasy-sdk-regen-1733789053
- speakeasy-sdk-regen-1733875425
- 1.0.0
targets:
'@ding-live/ding':
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:43cbb041df8ded714db89cfafd4cb5f70950ed3047d5bb8fa973edc5f93e9630
sourceBlobDigest: sha256:4d3dd890b21d2c069d944869e00ea2505c58a172c1b06fa3cb7b59c56c21a500
sourceRevisionDigest: sha256:19049754db9673ddbc40b82ab5ee9890d164f9dfcb8fac0c4f97a1bfd31f6771
sourceBlobDigest: sha256:1bc8346f862d17395d3ec227c51c74504f59eabaf83eb40c2932c517c8a40bf8
codeSamplesNamespace: my-source-typescript-code-samples
codeSamplesRevisionDigest: sha256:a29e9ab5cac38def3fc5d9ed98d4bf9cbf3d2c80d5e76115eaaa432f1e4cfa82
codeSamplesRevisionDigest: sha256:1f8ea72effcc48423702fbee4e1d6d0d0766f111ca22c324dea5c442533aa3d4
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -946,4 +946,14 @@ Based on:
### Generated
- [typescript v0.14.34] .
### Releases
- [NPM v0.14.34] https://www.npmjs.com/package/@ding-live/ding/v/0.14.34 - .
- [NPM v0.14.34] https://www.npmjs.com/package/@ding-live/ding/v/0.14.34 - .

## 2024-12-11 00:03:42
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.453.10 (2.474.15) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.14.35] .
### Releases
- [NPM v0.14.35] https://www.npmjs.com/package/@ding-live/ding/v/0.14.35 - .
1 change: 1 addition & 0 deletions docs/models/components/lookupresponse.md

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions docs/models/operations/lookuprequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ let value: LookupRequest = {

## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `customerUuid` | *string* | :heavy_check_mark: | N/A |
| `phoneNumber` | *string* | :heavy_check_mark: | N/A |
| Field | Type | Required | Description |
| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
| `customerUuid` | *string* | :heavy_check_mark: | N/A |
| `phoneNumber` | *string* | :heavy_check_mark: | N/A |
| `type` | [operations.Type](../../models/operations/type.md)[] | :heavy_minus_sign: | N/A |
15 changes: 15 additions & 0 deletions docs/models/operations/type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Type

## Example Usage

```typescript
import { Type } from "@ding-live/ding/models/operations";

let value: Type = "cnam";
```

## Values

```typescript
"cnam"
```
1 change: 1 addition & 0 deletions docs/sdks/lookup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ run();
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `customerUuid` | *string* | :heavy_check_mark: | N/A |
| `phoneNumber` | *string* | :heavy_check_mark: | N/A |
| `type` | [operations.Type](../../models/operations/type.md)[] | :heavy_minus_sign: | N/A |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Expand Down
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ generation:
oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false
typescript:
version: 0.14.34
version: 0.14.35
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.14.34",
"version": "0.14.35",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.14.34",
"version": "0.14.35",
"author": "Ding",
"main": "./index.js",
"sideEffects": false,
Expand Down
9 changes: 8 additions & 1 deletion src/funcs/lookupLookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

import { DingCore } from "../core.js";
import { encodeSimple } from "../lib/encodings.js";
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
import * as M from "../lib/matchers.js";
import { safeParse } from "../lib/schemas.js";
import { RequestOptions } from "../lib/sdks.js";
Expand All @@ -30,6 +30,7 @@ export async function lookupLookup(
client: DingCore,
customerUuid: string,
phoneNumber: string,
type?: Array<operations.Type> | undefined,
options?: RequestOptions,
): Promise<
Result<
Expand All @@ -47,6 +48,7 @@ export async function lookupLookup(
const input: operations.LookupRequest = {
customerUuid: customerUuid,
phoneNumber: phoneNumber,
type: type,
};

const parsed = safeParse(
Expand All @@ -69,6 +71,10 @@ export async function lookupLookup(

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

const query = encodeFormQuery({
"type": payload.type,
});

const headers = new Headers({
Accept: "application/json",
"customer-uuid": encodeSimple("customer-uuid", payload["customer-uuid"], {
Expand Down Expand Up @@ -99,6 +105,7 @@ export async function lookupLookup(
method: "GET",
path: path,
headers: headers,
query: query,
body: body,
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
}, options);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.0.0",
sdkVersion: "0.14.34",
sdkVersion: "0.14.35",
genVersion: "2.474.15",
userAgent: "speakeasy-sdk/typescript 0.14.34 2.474.15 1.0.0 @ding-live/ding",
userAgent: "speakeasy-sdk/typescript 0.14.35 2.474.15 1.0.0 @ding-live/ding",
} as const;
9 changes: 9 additions & 0 deletions src/models/components/lookupresponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ export const LineType = {
export type LineType = ClosedEnum<typeof LineType>;

export type LookupResponse = {
/**
* The CNAM (Caller ID Name) associated with the phone number. Contact us if you need to use this functionality. Once enabled, put `cnam` option to `type` query parameter.
*/
callerName?: string | undefined;
/**
* The carrier of the phone number.
*/
Expand Down Expand Up @@ -161,6 +165,7 @@ export const LookupResponse$inboundSchema: z.ZodType<
z.ZodTypeDef,
unknown
> = z.object({
caller_name: z.string().optional(),
carrier: z.string().optional(),
country_code: z.string().optional(),
line_type: LineType$inboundSchema.optional(),
Expand All @@ -171,6 +176,7 @@ export const LookupResponse$inboundSchema: z.ZodType<
temporary_phone_number: z.boolean().optional(),
}).transform((v) => {
return remap$(v, {
"caller_name": "callerName",
"country_code": "countryCode",
"line_type": "lineType",
"number_ported": "numberPorted",
Expand All @@ -181,6 +187,7 @@ export const LookupResponse$inboundSchema: z.ZodType<

/** @internal */
export type LookupResponse$Outbound = {
caller_name?: string | undefined;
carrier?: string | undefined;
country_code?: string | undefined;
line_type?: string | undefined;
Expand All @@ -197,6 +204,7 @@ export const LookupResponse$outboundSchema: z.ZodType<
z.ZodTypeDef,
LookupResponse
> = z.object({
callerName: z.string().optional(),
carrier: z.string().optional(),
countryCode: z.string().optional(),
lineType: LineType$outboundSchema.optional(),
Expand All @@ -207,6 +215,7 @@ export const LookupResponse$outboundSchema: z.ZodType<
temporaryPhoneNumber: z.boolean().optional(),
}).transform((v) => {
return remap$(v, {
callerName: "caller_name",
countryCode: "country_code",
lineType: "line_type",
numberPorted: "number_ported",
Expand Down
30 changes: 30 additions & 0 deletions src/models/operations/lookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,41 @@
import * as z from "zod";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { ClosedEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";

export const Type = {
Cnam: "cnam",
} as const;
export type Type = ClosedEnum<typeof Type>;

export type LookupRequest = {
customerUuid: string;
phoneNumber: string;
type?: Array<Type> | undefined;
};

/** @internal */
export const Type$inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(
Type,
);

/** @internal */
export const Type$outboundSchema: z.ZodNativeEnum<typeof Type> =
Type$inboundSchema;

/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace Type$ {
/** @deprecated use `Type$inboundSchema` instead. */
export const inboundSchema = Type$inboundSchema;
/** @deprecated use `Type$outboundSchema` instead. */
export const outboundSchema = Type$outboundSchema;
}

/** @internal */
export const LookupRequest$inboundSchema: z.ZodType<
LookupRequest,
Expand All @@ -21,6 +48,7 @@ export const LookupRequest$inboundSchema: z.ZodType<
> = z.object({
"customer-uuid": z.string(),
phone_number: z.string(),
type: z.array(Type$inboundSchema).optional(),
}).transform((v) => {
return remap$(v, {
"customer-uuid": "customerUuid",
Expand All @@ -32,6 +60,7 @@ export const LookupRequest$inboundSchema: z.ZodType<
export type LookupRequest$Outbound = {
"customer-uuid": string;
phone_number: string;
type?: Array<string> | undefined;
};

/** @internal */
Expand All @@ -42,6 +71,7 @@ export const LookupRequest$outboundSchema: z.ZodType<
> = z.object({
customerUuid: z.string(),
phoneNumber: z.string(),
type: z.array(Type$outboundSchema).optional(),
}).transform((v) => {
return remap$(v, {
customerUuid: "customer-uuid",
Expand Down
3 changes: 3 additions & 0 deletions src/sdk/lookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import { lookupLookup } from "../funcs/lookupLookup.js";
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
import * as components from "../models/components/index.js";
import * as operations from "../models/operations/index.js";
import { unwrapAsync } from "../types/fp.js";

export class Lookup extends ClientSDK {
Expand All @@ -14,12 +15,14 @@ export class Lookup extends ClientSDK {
async lookup(
customerUuid: string,
phoneNumber: string,
type?: Array<operations.Type> | undefined,
options?: RequestOptions,
): Promise<components.LookupResponse> {
return unwrapAsync(lookupLookup(
this,
customerUuid,
phoneNumber,
type,
options,
));
}
Expand Down

0 comments on commit 08ef8ed

Please sign in to comment.