ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.300.1 (#121)

Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
This commit is contained in:
github-actions[bot]
2024-06-07 10:58:38 +05:30
committed by GitHub
parent 26891cee31
commit b92f9bfeb0
81 changed files with 2483 additions and 4098 deletions

View File

@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: f28179cc-ef59-426d-9e85-60cec22fc642
management:
docChecksum: 51863c384b062f0d4c1dd02e14254615
docChecksum: dda943a614373c0afd2760452f6aa501
docVersion: 0.0.1
speakeasyVersion: 1.299.6
generationVersion: 2.338.12
releaseVersion: 0.29.15
configChecksum: a9469c582da12bafd25e218107dd5da1
speakeasyVersion: 1.300.1
generationVersion: 2.339.1
releaseVersion: 0.29.16
configChecksum: 45fb6c3f46a50bc746ce71d469954be8
repoURL: https://github.com/dubinc/dub-node.git
installationURL: https://github.com/dubinc/dub-node
published: true
@@ -14,7 +14,7 @@ features:
typescript:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.5
core: 3.9.11
core: 3.9.12
deprecations: 2.81.1
examples: 2.81.4
flattening: 2.81.1
@@ -49,6 +49,7 @@ generatedFiles:
- src/lib/encodings.ts
- src/lib/http.ts
- src/lib/is-plain-object.ts
- src/lib/primitives.ts
- src/lib/retries.ts
- src/lib/schemas.ts
- src/lib/sdks.ts

View File

@@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
typescript:
version: 0.29.15
version: 0.29.16
additionalDependencies:
dependencies: {}
devDependencies:

View File

@@ -1,9 +1,9 @@
speakeasyVersion: 1.299.6
speakeasyVersion: 1.300.1
sources:
my-first-source:
sourceNamespace: my-first-source
sourceRevisionDigest: sha256:154ffed10420914429fbcf1e7b8c772199556ac4b5a921457e27772b84235d50
sourceBlobDigest: sha256:c90b906f71360668fbcc74e7820c7fbd8659a74450501a64cb179e5391d233a9
sourceRevisionDigest: sha256:276c60405616193747d1bfb15fb1cc5e50432b2d29d934e090a6786d8c8f3431
sourceBlobDigest: sha256:2f8c623af4e1e440e1fb46ce7051cf738452ecdd4e4b2cf2ede0b4251d2e2460
tags:
- latest
- main
@@ -11,8 +11,8 @@ targets:
my-first-target:
source: my-first-source
sourceNamespace: my-first-source
sourceRevisionDigest: sha256:154ffed10420914429fbcf1e7b8c772199556ac4b5a921457e27772b84235d50
sourceBlobDigest: sha256:c90b906f71360668fbcc74e7820c7fbd8659a74450501a64cb179e5391d233a9
sourceRevisionDigest: sha256:276c60405616193747d1bfb15fb1cc5e50432b2d29d934e090a6786d8c8f3431
sourceBlobDigest: sha256:2f8c623af4e1e440e1fb46ce7051cf738452ecdd4e4b2cf2ede0b4251d2e2460
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0

View File

@@ -416,4 +416,14 @@ Based on:
### Generated
- [typescript v0.29.15] .
### Releases
- [NPM v0.29.15] https://www.npmjs.com/package/dub/v/0.29.15 - .
- [NPM v0.29.15] https://www.npmjs.com/package/dub/v/0.29.15 - .
## 2024-06-07 01:19:48
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.300.1 (2.339.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.29.16] .
### Releases
- [NPM v0.29.16] https://www.npmjs.com/package/dub/v/0.29.16 - .

View File

@@ -3,11 +3,11 @@ info:
title: CodeSamples overlay for typescript target
version: 0.0.0
actions:
- target: $["paths"]["/track/customer"]["post"]
- target: $["paths"]["/links/count"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "trackCustomer"
"label": "getLinksCount"
"source": |-
import { Dub } from "dub";
@@ -17,20 +17,18 @@ actions:
});
async function run() {
const result = await dub.track.customer({
customerId: "<value>",
});
const result = await dub.links.count({});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/links/{linkId}"]["delete"]
- target: $["paths"]["/links/{linkId}"]["patch"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "deleteLink"
"label": "updateLink"
"source": |-
import { Dub } from "dub";
@@ -40,7 +38,9 @@ actions:
});
async function run() {
const result = await dub.links.delete("<value>");
const result = await dub.links.update("<value>", {
url: "https://google/com",
});
// Handle the result
console.log(result)
@@ -67,188 +67,6 @@ actions:
console.log(result)
}
run();
- target: $["paths"]["/tags"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "getTags"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.tags.list({});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/domains"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "listDomains"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.domains.list({});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/domains"]["post"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "addDomain"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.domains.add({
slug: "acme.com",
});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/domains/{slug}"]["patch"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "updateDomain"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.domains.update("acme.com", {});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/domains/{slug}/transfer"]["post"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "transferDomain"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.domains.transfer("acme.com", {
newWorkspaceId: "<value>",
});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/track/sale"]["post"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "trackSale"
"source": |-
import { Dub } from "dub";
import { PaymentProcessor } from "dub/models/operations";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.track.sale({
customerId: "<value>",
amount: 996500,
paymentProcessor: PaymentProcessor.Shopify,
});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/links/upsert"]["put"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "upsertLink"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.links.upsert({
url: "https://google/com",
});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/workspaces"]["post"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "createWorkspace"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.workspaces.create({
name: "<value>",
slug: "<value>",
});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/workspaces/{idOrSlug}"]["get"]
update:
@@ -296,11 +114,11 @@ actions:
}
run();
- target: $["paths"]["/domains/{slug}"]["delete"]
- target: $["paths"]["/domains"]["post"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "deleteDomain"
"label": "addDomain"
"source": |-
import { Dub } from "dub";
@@ -310,98 +128,8 @@ actions:
});
async function run() {
const result = await dub.domains.delete("acme.com");
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/links/{linkId}"]["patch"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "updateLink"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.links.update("<value>", {
url: "https://google/com",
});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/qr"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "getQRCode"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.qrCodes.get({
url: "https://brief-micronutrient.org",
});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/analytics"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "retrieveAnalytics"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.analytics.retrieve({});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/track/lead"]["post"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "trackLead"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.track.lead({
clickId: "<value>",
eventName: "Signup",
customerId: "<value>",
const result = await dub.domains.add({
slug: "acme.com",
});
// Handle the result
@@ -429,6 +157,29 @@ actions:
console.log(result)
}
run();
- target: $["paths"]["/links/upsert"]["put"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "upsertLink"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.links.upsert({
url: "https://google/com",
});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/metatags"]["get"]
update:
@@ -453,11 +204,11 @@ actions:
}
run();
- target: $["paths"]["/links"]["post"]
- target: $["paths"]["/domains"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "createLink"
"label": "listDomains"
"source": |-
import { Dub } from "dub";
@@ -467,77 +218,59 @@ actions:
});
async function run() {
const result = await dub.links.create({
url: "https://google/com",
const result = await dub.domains.list({});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/domains/{slug}"]["patch"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "updateDomain"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.domains.update("acme.com", {});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/track/sale"]["post"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "trackSale"
"source": |-
import { Dub } from "dub";
import { PaymentProcessor } from "dub/models/operations";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.track.sale({
customerId: "<value>",
amount: 996500,
paymentProcessor: PaymentProcessor.Shopify,
});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/links"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "getLinks"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.links.list({});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/links/count"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "getLinksCount"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.links.count({});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/links/info"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "getLinkInfo"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.links.get({});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/links/bulk"]["post"]
update:
@@ -563,4 +296,271 @@ actions:
console.log(result)
}
run();
- target: $["paths"]["/links"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "getLinks"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.links.list({});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/links/info"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "getLinkInfo"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.links.get({});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/qr"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "getQRCode"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.qrCodes.get({
url: "https://brief-micronutrient.org",
});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/tags"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "getTags"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.tags.list({});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/domains/{slug}"]["delete"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "deleteDomain"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.domains.delete("acme.com");
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/links"]["post"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "createLink"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.links.create({
url: "https://google/com",
});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/analytics"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "retrieveAnalytics"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.analytics.retrieve({});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/workspaces"]["post"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "createWorkspace"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.workspaces.create({
name: "<value>",
slug: "<value>",
});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/domains/{slug}/transfer"]["post"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "transferDomain"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.domains.transfer("acme.com", {
newWorkspaceId: "<value>",
});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/track/lead"]["post"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "trackLead"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.track.lead({
clickId: "<value>",
eventName: "Signup",
customerId: "<value>",
});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/track/customer"]["post"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "trackCustomer"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.track.customer({
customerId: "<value>",
});
// Handle the result
console.log(result)
}
run();
- target: $["paths"]["/links/{linkId}"]["delete"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "deleteLink"
"source": |-
import { Dub } from "dub";
const dub = new Dub({
token: "DUB_API_KEY",
workspaceId: "<value>",
});
async function run() {
const result = await dub.links.delete("<value>");
// Handle the result
console.log(result)
}
run();

View File

@@ -16,11 +16,11 @@
| `end` | *string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | |
| `timezone` | *string* | :heavy_minus_sign: | The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC. | America/New_York |
| `country` | [components.CountryCode](../../models/components/countrycode.md) | :heavy_minus_sign: | The country to retrieve analytics for. | |
| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | |
| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | |
| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | |
| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | |
| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | |
| `city` | *string* | :heavy_minus_sign: | The city to retrieve analytics for. | New York |
| `device` | *string* | :heavy_minus_sign: | The device to retrieve analytics for. | Desktop |
| `browser` | *string* | :heavy_minus_sign: | The browser to retrieve analytics for. | Chrome |
| `os` | *string* | :heavy_minus_sign: | The OS to retrieve analytics for. | Windows |
| `referer` | *string* | :heavy_minus_sign: | The referer to retrieve analytics for. | google.com |
| `url` | *string* | :heavy_minus_sign: | The URL to retrieve analytics for. | |
| `tagId` | *string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | |
| `qr` | *boolean* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | |

View File

@@ -2,7 +2,7 @@
{
"name": "dub",
"version": "0.29.15",
"version": "0.29.16",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "dub",
"version": "0.29.15",
"version": "0.29.16",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "dub",
"version": "0.29.15",
"version": "0.29.16",
"devDependencies": {
"@types/jsonpath": "^0.2.4",
"@types/node": "^20.12.7",

View File

@@ -1,6 +1,6 @@
{
"name": "dub",
"version": "0.29.15",
"version": "0.29.16",
"author": "Dub",
"main": "./index.js",
"sideEffects": false,

View File

@@ -64,7 +64,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "0.0.1",
sdkVersion: "0.29.15",
genVersion: "2.338.12",
userAgent: "speakeasy-sdk/typescript 0.29.15 2.338.12 0.0.1 dub",
sdkVersion: "0.29.16",
genVersion: "2.339.1",
userAgent: "speakeasy-sdk/typescript 0.29.16 2.339.1 0.0.1 dub",
} as const;

40
src/lib/primitives.ts Normal file
View File

@@ -0,0 +1,40 @@
/*
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
export type Remap<Inp, Mapping extends { [k in keyof Inp]?: string | null }> = {
[k in keyof Inp as Mapping[k] extends string /* if we have a string mapping for this key then use it */
? Mapping[k]
: Mapping[k] extends null /* if the mapping is to `null` then drop the key */
? never
: k /* otherwise keep the key as-is */]: Inp[k];
};
/**
* Converts or omits an object's keys according to a mapping.
*
* @param inp An object whose keys will be remapped
* @param mappings A mapping of original keys to new keys. If a key is not present in the mapping, it will be left as is. If a key is mapped to `null`, it will be removed in the resulting object.
* @returns A new object with keys remapped or omitted according to the mappings
*/
export function remap<
Inp extends Record<string, unknown>,
const Mapping extends { [k in keyof Inp]?: string | null },
>(inp: Inp, mappings: Mapping): Remap<Inp, Mapping> {
let out: any = {};
if (!Object.keys(mappings).length) {
out = inp;
return out;
}
for (const [k, v] of Object.entries(inp)) {
const j = mappings[k];
if (j === null) {
continue;
}
out[j ?? k] = v;
}
return out;
}

View File

@@ -2,8 +2,8 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { ZodError } from "zod";
import * as errors from "../models/errors";
import { output, ZodEffects, ZodError, ZodObject, ZodRawShape, ZodTypeAny } from "zod";
import { SDKValidationError } from "../models/errors/sdkvalidationerror";
/**
* Utility function that executes some code which may throw a ZodError. It
@@ -15,8 +15,42 @@ export function parse<Inp, Out>(rawValue: Inp, fn: (value: Inp) => Out, errorMes
return fn(rawValue);
} catch (err) {
if (err instanceof ZodError) {
throw new errors.SDKValidationError(errorMessage, err, rawValue);
throw new SDKValidationError(errorMessage, err, rawValue);
}
throw err;
}
}
export function collectExtraKeys<
Shape extends ZodRawShape,
Catchall extends ZodTypeAny,
K extends string
>(
obj: ZodObject<Shape, "strip", Catchall>,
extrasKey: K
): ZodEffects<
typeof obj,
output<ZodObject<Shape, "strict">> & {
[k in K]: Record<string, output<Catchall>>;
}
> {
return obj.transform((val) => {
const extras: Record<string, output<Catchall>> = {};
const { shape } = obj;
for (const [key] of Object.entries(val)) {
if (key in shape) {
continue;
}
const v = val[key];
if (typeof v === "undefined") {
continue;
}
extras[key] = v;
delete val[key];
}
return { ...val, [extrasKey]: extras };
});
}

View File

@@ -17,32 +17,18 @@ export type ClicksBrowsers = {
/** @internal */
export namespace ClicksBrowsers$ {
export const inboundSchema: z.ZodType<ClicksBrowsers, z.ZodTypeDef, unknown> = z
.object({
browser: z.string(),
clicks: z.number(),
})
.transform((v) => {
return {
browser: v.browser,
clicks: v.clicks,
};
});
export const inboundSchema: z.ZodType<ClicksBrowsers, z.ZodTypeDef, unknown> = z.object({
browser: z.string(),
clicks: z.number(),
});
export type Outbound = {
browser: string;
clicks: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksBrowsers> = z
.object({
browser: z.string(),
clicks: z.number(),
})
.transform((v) => {
return {
browser: v.browser,
clicks: v.clicks,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksBrowsers> = z.object({
browser: z.string(),
clicks: z.number(),
});
}

View File

@@ -288,19 +288,11 @@ export namespace ClicksCitiesCountry$ {
/** @internal */
export namespace ClicksCities$ {
export const inboundSchema: z.ZodType<ClicksCities, z.ZodTypeDef, unknown> = z
.object({
city: z.string(),
country: ClicksCitiesCountry$.inboundSchema,
clicks: z.number(),
})
.transform((v) => {
return {
city: v.city,
country: v.country,
clicks: v.clicks,
};
});
export const inboundSchema: z.ZodType<ClicksCities, z.ZodTypeDef, unknown> = z.object({
city: z.string(),
country: ClicksCitiesCountry$.inboundSchema,
clicks: z.number(),
});
export type Outbound = {
city: string;
@@ -308,17 +300,9 @@ export namespace ClicksCities$ {
clicks: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksCities> = z
.object({
city: z.string(),
country: ClicksCitiesCountry$.outboundSchema,
clicks: z.number(),
})
.transform((v) => {
return {
city: v.city,
country: v.country,
clicks: v.clicks,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksCities> = z.object({
city: z.string(),
country: ClicksCitiesCountry$.outboundSchema,
clicks: z.number(),
});
}

View File

@@ -13,27 +13,15 @@ export type ClicksCount = {
/** @internal */
export namespace ClicksCount$ {
export const inboundSchema: z.ZodType<ClicksCount, z.ZodTypeDef, unknown> = z
.object({
clicks: z.number(),
})
.transform((v) => {
return {
clicks: v.clicks,
};
});
export const inboundSchema: z.ZodType<ClicksCount, z.ZodTypeDef, unknown> = z.object({
clicks: z.number(),
});
export type Outbound = {
clicks: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksCount> = z
.object({
clicks: z.number(),
})
.transform((v) => {
return {
clicks: v.clicks,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksCount> = z.object({
clicks: z.number(),
});
}

View File

@@ -284,32 +284,18 @@ export namespace Country$ {
/** @internal */
export namespace ClicksCountries$ {
export const inboundSchema: z.ZodType<ClicksCountries, z.ZodTypeDef, unknown> = z
.object({
country: Country$.inboundSchema,
clicks: z.number(),
})
.transform((v) => {
return {
country: v.country,
clicks: v.clicks,
};
});
export const inboundSchema: z.ZodType<ClicksCountries, z.ZodTypeDef, unknown> = z.object({
country: Country$.inboundSchema,
clicks: z.number(),
});
export type Outbound = {
country: string;
clicks: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksCountries> = z
.object({
country: Country$.outboundSchema,
clicks: z.number(),
})
.transform((v) => {
return {
country: v.country,
clicks: v.clicks,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksCountries> = z.object({
country: Country$.outboundSchema,
clicks: z.number(),
});
}

View File

@@ -17,32 +17,18 @@ export type ClicksDevices = {
/** @internal */
export namespace ClicksDevices$ {
export const inboundSchema: z.ZodType<ClicksDevices, z.ZodTypeDef, unknown> = z
.object({
device: z.string(),
clicks: z.number(),
})
.transform((v) => {
return {
device: v.device,
clicks: v.clicks,
};
});
export const inboundSchema: z.ZodType<ClicksDevices, z.ZodTypeDef, unknown> = z.object({
device: z.string(),
clicks: z.number(),
});
export type Outbound = {
device: string;
clicks: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksDevices> = z
.object({
device: z.string(),
clicks: z.number(),
})
.transform((v) => {
return {
device: v.device,
clicks: v.clicks,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksDevices> = z.object({
device: z.string(),
clicks: z.number(),
});
}

View File

@@ -17,32 +17,18 @@ export type ClicksOS = {
/** @internal */
export namespace ClicksOS$ {
export const inboundSchema: z.ZodType<ClicksOS, z.ZodTypeDef, unknown> = z
.object({
os: z.string(),
clicks: z.number(),
})
.transform((v) => {
return {
os: v.os,
clicks: v.clicks,
};
});
export const inboundSchema: z.ZodType<ClicksOS, z.ZodTypeDef, unknown> = z.object({
os: z.string(),
clicks: z.number(),
});
export type Outbound = {
os: string;
clicks: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksOS> = z
.object({
os: z.string(),
clicks: z.number(),
})
.transform((v) => {
return {
os: v.os,
clicks: v.clicks,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksOS> = z.object({
os: z.string(),
clicks: z.number(),
});
}

View File

@@ -17,32 +17,18 @@ export type ClicksReferers = {
/** @internal */
export namespace ClicksReferers$ {
export const inboundSchema: z.ZodType<ClicksReferers, z.ZodTypeDef, unknown> = z
.object({
referer: z.string(),
clicks: z.number(),
})
.transform((v) => {
return {
referer: v.referer,
clicks: v.clicks,
};
});
export const inboundSchema: z.ZodType<ClicksReferers, z.ZodTypeDef, unknown> = z.object({
referer: z.string(),
clicks: z.number(),
});
export type Outbound = {
referer: string;
clicks: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksReferers> = z
.object({
referer: z.string(),
clicks: z.number(),
})
.transform((v) => {
return {
referer: v.referer,
clicks: v.clicks,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksReferers> = z.object({
referer: z.string(),
clicks: z.number(),
});
}

View File

@@ -17,32 +17,18 @@ export type ClicksTimeseries = {
/** @internal */
export namespace ClicksTimeseries$ {
export const inboundSchema: z.ZodType<ClicksTimeseries, z.ZodTypeDef, unknown> = z
.object({
start: z.string(),
clicks: z.number(),
})
.transform((v) => {
return {
start: v.start,
clicks: v.clicks,
};
});
export const inboundSchema: z.ZodType<ClicksTimeseries, z.ZodTypeDef, unknown> = z.object({
start: z.string(),
clicks: z.number(),
});
export type Outbound = {
start: string;
clicks: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksTimeseries> = z
.object({
start: z.string(),
clicks: z.number(),
})
.transform((v) => {
return {
start: v.start,
clicks: v.clicks,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksTimeseries> = z.object({
start: z.string(),
clicks: z.number(),
});
}

View File

@@ -43,29 +43,16 @@ export type ClicksTopLinks = {
/** @internal */
export namespace ClicksTopLinks$ {
export const inboundSchema: z.ZodType<ClicksTopLinks, z.ZodTypeDef, unknown> = z
.object({
link: z.string(),
id: z.string(),
domain: z.string(),
key: z.string(),
shortLink: z.string(),
url: z.string(),
createdAt: z.string(),
clicks: z.number(),
})
.transform((v) => {
return {
link: v.link,
id: v.id,
domain: v.domain,
key: v.key,
shortLink: v.shortLink,
url: v.url,
createdAt: v.createdAt,
clicks: v.clicks,
};
});
export const inboundSchema: z.ZodType<ClicksTopLinks, z.ZodTypeDef, unknown> = z.object({
link: z.string(),
id: z.string(),
domain: z.string(),
key: z.string(),
shortLink: z.string(),
url: z.string(),
createdAt: z.string(),
clicks: z.number(),
});
export type Outbound = {
link: string;
@@ -78,27 +65,14 @@ export namespace ClicksTopLinks$ {
clicks: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksTopLinks> = z
.object({
link: z.string(),
id: z.string(),
domain: z.string(),
key: z.string(),
shortLink: z.string(),
url: z.string(),
createdAt: z.string(),
clicks: z.number(),
})
.transform((v) => {
return {
link: v.link,
id: v.id,
domain: v.domain,
key: v.key,
shortLink: v.shortLink,
url: v.url,
createdAt: v.createdAt,
clicks: v.clicks,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksTopLinks> = z.object({
link: z.string(),
id: z.string(),
domain: z.string(),
key: z.string(),
shortLink: z.string(),
url: z.string(),
createdAt: z.string(),
clicks: z.number(),
});
}

View File

@@ -17,32 +17,18 @@ export type ClicksTopUrls = {
/** @internal */
export namespace ClicksTopUrls$ {
export const inboundSchema: z.ZodType<ClicksTopUrls, z.ZodTypeDef, unknown> = z
.object({
url: z.string(),
clicks: z.number(),
})
.transform((v) => {
return {
url: v.url,
clicks: v.clicks,
};
});
export const inboundSchema: z.ZodType<ClicksTopUrls, z.ZodTypeDef, unknown> = z.object({
url: z.string(),
clicks: z.number(),
});
export type Outbound = {
url: string;
clicks: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksTopUrls> = z
.object({
url: z.string(),
clicks: z.number(),
})
.transform((v) => {
return {
url: v.url,
clicks: v.clicks,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ClicksTopUrls> = z.object({
url: z.string(),
clicks: z.number(),
});
}

View File

@@ -72,35 +72,19 @@ export namespace Type$ {
/** @internal */
export namespace DomainSchema$ {
export const inboundSchema: z.ZodType<DomainSchema, z.ZodTypeDef, unknown> = z
.object({
id: z.string(),
slug: z.string(),
verified: z.boolean().default(false),
primary: z.boolean().default(false),
archived: z.boolean().default(false),
noindex: z.boolean().default(false),
placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
expiredUrl: z.nullable(z.string()),
target: z.nullable(z.string()),
type: Type$.inboundSchema,
clicks: z.number().default(0),
})
.transform((v) => {
return {
id: v.id,
slug: v.slug,
verified: v.verified,
primary: v.primary,
archived: v.archived,
noindex: v.noindex,
placeholder: v.placeholder,
expiredUrl: v.expiredUrl,
target: v.target,
type: v.type,
clicks: v.clicks,
};
});
export const inboundSchema: z.ZodType<DomainSchema, z.ZodTypeDef, unknown> = z.object({
id: z.string(),
slug: z.string(),
verified: z.boolean().default(false),
primary: z.boolean().default(false),
archived: z.boolean().default(false),
noindex: z.boolean().default(false),
placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
expiredUrl: z.nullable(z.string()),
target: z.nullable(z.string()),
type: Type$.inboundSchema,
clicks: z.number().default(0),
});
export type Outbound = {
id: string;
@@ -116,33 +100,17 @@ export namespace DomainSchema$ {
clicks: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DomainSchema> = z
.object({
id: z.string(),
slug: z.string(),
verified: z.boolean().default(false),
primary: z.boolean().default(false),
archived: z.boolean().default(false),
noindex: z.boolean().default(false),
placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
expiredUrl: z.nullable(z.string()),
target: z.nullable(z.string()),
type: Type$.outboundSchema,
clicks: z.number().default(0),
})
.transform((v) => {
return {
id: v.id,
slug: v.slug,
verified: v.verified,
primary: v.primary,
archived: v.archived,
noindex: v.noindex,
placeholder: v.placeholder,
expiredUrl: v.expiredUrl,
target: v.target,
type: v.type,
clicks: v.clicks,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DomainSchema> = z.object({
id: z.string(),
slug: z.string(),
verified: z.boolean().default(false),
primary: z.boolean().default(false),
archived: z.boolean().default(false),
noindex: z.boolean().default(false),
placeholder: z.string().default("https://dub.co/help/article/what-is-dub"),
expiredUrl: z.nullable(z.string()),
target: z.nullable(z.string()),
type: Type$.outboundSchema,
clicks: z.number().default(0),
});
}

View File

@@ -17,32 +17,18 @@ export type LeadsBrowsers = {
/** @internal */
export namespace LeadsBrowsers$ {
export const inboundSchema: z.ZodType<LeadsBrowsers, z.ZodTypeDef, unknown> = z
.object({
browser: z.string(),
leads: z.number(),
})
.transform((v) => {
return {
browser: v.browser,
leads: v.leads,
};
});
export const inboundSchema: z.ZodType<LeadsBrowsers, z.ZodTypeDef, unknown> = z.object({
browser: z.string(),
leads: z.number(),
});
export type Outbound = {
browser: string;
leads: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsBrowsers> = z
.object({
browser: z.string(),
leads: z.number(),
})
.transform((v) => {
return {
browser: v.browser,
leads: v.leads,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsBrowsers> = z.object({
browser: z.string(),
leads: z.number(),
});
}

View File

@@ -288,19 +288,11 @@ export namespace LeadsCitiesCountry$ {
/** @internal */
export namespace LeadsCities$ {
export const inboundSchema: z.ZodType<LeadsCities, z.ZodTypeDef, unknown> = z
.object({
city: z.string(),
country: LeadsCitiesCountry$.inboundSchema,
leads: z.number(),
})
.transform((v) => {
return {
city: v.city,
country: v.country,
leads: v.leads,
};
});
export const inboundSchema: z.ZodType<LeadsCities, z.ZodTypeDef, unknown> = z.object({
city: z.string(),
country: LeadsCitiesCountry$.inboundSchema,
leads: z.number(),
});
export type Outbound = {
city: string;
@@ -308,17 +300,9 @@ export namespace LeadsCities$ {
leads: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsCities> = z
.object({
city: z.string(),
country: LeadsCitiesCountry$.outboundSchema,
leads: z.number(),
})
.transform((v) => {
return {
city: v.city,
country: v.country,
leads: v.leads,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsCities> = z.object({
city: z.string(),
country: LeadsCitiesCountry$.outboundSchema,
leads: z.number(),
});
}

View File

@@ -13,27 +13,15 @@ export type LeadsCount = {
/** @internal */
export namespace LeadsCount$ {
export const inboundSchema: z.ZodType<LeadsCount, z.ZodTypeDef, unknown> = z
.object({
leads: z.number(),
})
.transform((v) => {
return {
leads: v.leads,
};
});
export const inboundSchema: z.ZodType<LeadsCount, z.ZodTypeDef, unknown> = z.object({
leads: z.number(),
});
export type Outbound = {
leads: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsCount> = z
.object({
leads: z.number(),
})
.transform((v) => {
return {
leads: v.leads,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsCount> = z.object({
leads: z.number(),
});
}

View File

@@ -284,32 +284,18 @@ export namespace LeadsCountriesCountry$ {
/** @internal */
export namespace LeadsCountries$ {
export const inboundSchema: z.ZodType<LeadsCountries, z.ZodTypeDef, unknown> = z
.object({
country: LeadsCountriesCountry$.inboundSchema,
leads: z.number(),
})
.transform((v) => {
return {
country: v.country,
leads: v.leads,
};
});
export const inboundSchema: z.ZodType<LeadsCountries, z.ZodTypeDef, unknown> = z.object({
country: LeadsCountriesCountry$.inboundSchema,
leads: z.number(),
});
export type Outbound = {
country: string;
leads: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsCountries> = z
.object({
country: LeadsCountriesCountry$.outboundSchema,
leads: z.number(),
})
.transform((v) => {
return {
country: v.country,
leads: v.leads,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsCountries> = z.object({
country: LeadsCountriesCountry$.outboundSchema,
leads: z.number(),
});
}

View File

@@ -17,32 +17,18 @@ export type LeadsDevices = {
/** @internal */
export namespace LeadsDevices$ {
export const inboundSchema: z.ZodType<LeadsDevices, z.ZodTypeDef, unknown> = z
.object({
device: z.string(),
leads: z.number(),
})
.transform((v) => {
return {
device: v.device,
leads: v.leads,
};
});
export const inboundSchema: z.ZodType<LeadsDevices, z.ZodTypeDef, unknown> = z.object({
device: z.string(),
leads: z.number(),
});
export type Outbound = {
device: string;
leads: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsDevices> = z
.object({
device: z.string(),
leads: z.number(),
})
.transform((v) => {
return {
device: v.device,
leads: v.leads,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsDevices> = z.object({
device: z.string(),
leads: z.number(),
});
}

View File

@@ -17,32 +17,18 @@ export type LeadsOS = {
/** @internal */
export namespace LeadsOS$ {
export const inboundSchema: z.ZodType<LeadsOS, z.ZodTypeDef, unknown> = z
.object({
os: z.string(),
leads: z.number(),
})
.transform((v) => {
return {
os: v.os,
leads: v.leads,
};
});
export const inboundSchema: z.ZodType<LeadsOS, z.ZodTypeDef, unknown> = z.object({
os: z.string(),
leads: z.number(),
});
export type Outbound = {
os: string;
leads: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsOS> = z
.object({
os: z.string(),
leads: z.number(),
})
.transform((v) => {
return {
os: v.os,
leads: v.leads,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsOS> = z.object({
os: z.string(),
leads: z.number(),
});
}

View File

@@ -17,32 +17,18 @@ export type LeadsReferers = {
/** @internal */
export namespace LeadsReferers$ {
export const inboundSchema: z.ZodType<LeadsReferers, z.ZodTypeDef, unknown> = z
.object({
referer: z.string(),
leads: z.number(),
})
.transform((v) => {
return {
referer: v.referer,
leads: v.leads,
};
});
export const inboundSchema: z.ZodType<LeadsReferers, z.ZodTypeDef, unknown> = z.object({
referer: z.string(),
leads: z.number(),
});
export type Outbound = {
referer: string;
leads: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsReferers> = z
.object({
referer: z.string(),
leads: z.number(),
})
.transform((v) => {
return {
referer: v.referer,
leads: v.leads,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsReferers> = z.object({
referer: z.string(),
leads: z.number(),
});
}

View File

@@ -17,32 +17,18 @@ export type LeadsTimeseries = {
/** @internal */
export namespace LeadsTimeseries$ {
export const inboundSchema: z.ZodType<LeadsTimeseries, z.ZodTypeDef, unknown> = z
.object({
start: z.string(),
leads: z.number(),
})
.transform((v) => {
return {
start: v.start,
leads: v.leads,
};
});
export const inboundSchema: z.ZodType<LeadsTimeseries, z.ZodTypeDef, unknown> = z.object({
start: z.string(),
leads: z.number(),
});
export type Outbound = {
start: string;
leads: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsTimeseries> = z
.object({
start: z.string(),
leads: z.number(),
})
.transform((v) => {
return {
start: v.start,
leads: v.leads,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsTimeseries> = z.object({
start: z.string(),
leads: z.number(),
});
}

View File

@@ -43,29 +43,16 @@ export type LeadsTopLinks = {
/** @internal */
export namespace LeadsTopLinks$ {
export const inboundSchema: z.ZodType<LeadsTopLinks, z.ZodTypeDef, unknown> = z
.object({
link: z.string(),
id: z.string(),
domain: z.string(),
key: z.string(),
shortLink: z.string(),
url: z.string(),
createdAt: z.string(),
leads: z.number(),
})
.transform((v) => {
return {
link: v.link,
id: v.id,
domain: v.domain,
key: v.key,
shortLink: v.shortLink,
url: v.url,
createdAt: v.createdAt,
leads: v.leads,
};
});
export const inboundSchema: z.ZodType<LeadsTopLinks, z.ZodTypeDef, unknown> = z.object({
link: z.string(),
id: z.string(),
domain: z.string(),
key: z.string(),
shortLink: z.string(),
url: z.string(),
createdAt: z.string(),
leads: z.number(),
});
export type Outbound = {
link: string;
@@ -78,27 +65,14 @@ export namespace LeadsTopLinks$ {
leads: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsTopLinks> = z
.object({
link: z.string(),
id: z.string(),
domain: z.string(),
key: z.string(),
shortLink: z.string(),
url: z.string(),
createdAt: z.string(),
leads: z.number(),
})
.transform((v) => {
return {
link: v.link,
id: v.id,
domain: v.domain,
key: v.key,
shortLink: v.shortLink,
url: v.url,
createdAt: v.createdAt,
leads: v.leads,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsTopLinks> = z.object({
link: z.string(),
id: z.string(),
domain: z.string(),
key: z.string(),
shortLink: z.string(),
url: z.string(),
createdAt: z.string(),
leads: z.number(),
});
}

View File

@@ -17,32 +17,18 @@ export type LeadsTopUrls = {
/** @internal */
export namespace LeadsTopUrls$ {
export const inboundSchema: z.ZodType<LeadsTopUrls, z.ZodTypeDef, unknown> = z
.object({
url: z.string(),
leads: z.number(),
})
.transform((v) => {
return {
url: v.url,
leads: v.leads,
};
});
export const inboundSchema: z.ZodType<LeadsTopUrls, z.ZodTypeDef, unknown> = z.object({
url: z.string(),
leads: z.number(),
});
export type Outbound = {
url: string;
leads: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsTopUrls> = z
.object({
url: z.string(),
leads: z.number(),
})
.transform((v) => {
return {
url: v.url,
leads: v.leads,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, LeadsTopUrls> = z.object({
url: z.string(),
leads: z.number(),
});
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -21,19 +21,11 @@ export type SalesBrowsers = {
/** @internal */
export namespace SalesBrowsers$ {
export const inboundSchema: z.ZodType<SalesBrowsers, z.ZodTypeDef, unknown> = z
.object({
browser: z.string(),
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
browser: v.browser,
sales: v.sales,
amount: v.amount,
};
});
export const inboundSchema: z.ZodType<SalesBrowsers, z.ZodTypeDef, unknown> = z.object({
browser: z.string(),
sales: z.number(),
amount: z.number(),
});
export type Outbound = {
browser: string;
@@ -41,17 +33,9 @@ export namespace SalesBrowsers$ {
amount: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesBrowsers> = z
.object({
browser: z.string(),
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
browser: v.browser,
sales: v.sales,
amount: v.amount,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesBrowsers> = z.object({
browser: z.string(),
sales: z.number(),
amount: z.number(),
});
}

View File

@@ -292,21 +292,12 @@ export namespace SalesCitiesCountry$ {
/** @internal */
export namespace SalesCities$ {
export const inboundSchema: z.ZodType<SalesCities, z.ZodTypeDef, unknown> = z
.object({
city: z.string(),
country: SalesCitiesCountry$.inboundSchema,
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
city: v.city,
country: v.country,
sales: v.sales,
amount: v.amount,
};
});
export const inboundSchema: z.ZodType<SalesCities, z.ZodTypeDef, unknown> = z.object({
city: z.string(),
country: SalesCitiesCountry$.inboundSchema,
sales: z.number(),
amount: z.number(),
});
export type Outbound = {
city: string;
@@ -315,19 +306,10 @@ export namespace SalesCities$ {
amount: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesCities> = z
.object({
city: z.string(),
country: SalesCitiesCountry$.outboundSchema,
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
city: v.city,
country: v.country,
sales: v.sales,
amount: v.amount,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesCities> = z.object({
city: z.string(),
country: SalesCitiesCountry$.outboundSchema,
sales: z.number(),
amount: z.number(),
});
}

View File

@@ -17,32 +17,18 @@ export type SalesCount = {
/** @internal */
export namespace SalesCount$ {
export const inboundSchema: z.ZodType<SalesCount, z.ZodTypeDef, unknown> = z
.object({
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
sales: v.sales,
amount: v.amount,
};
});
export const inboundSchema: z.ZodType<SalesCount, z.ZodTypeDef, unknown> = z.object({
sales: z.number(),
amount: z.number(),
});
export type Outbound = {
sales: number;
amount: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesCount> = z
.object({
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
sales: v.sales,
amount: v.amount,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesCount> = z.object({
sales: z.number(),
amount: z.number(),
});
}

View File

@@ -288,19 +288,11 @@ export namespace SalesCountriesCountry$ {
/** @internal */
export namespace SalesCountries$ {
export const inboundSchema: z.ZodType<SalesCountries, z.ZodTypeDef, unknown> = z
.object({
country: SalesCountriesCountry$.inboundSchema,
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
country: v.country,
sales: v.sales,
amount: v.amount,
};
});
export const inboundSchema: z.ZodType<SalesCountries, z.ZodTypeDef, unknown> = z.object({
country: SalesCountriesCountry$.inboundSchema,
sales: z.number(),
amount: z.number(),
});
export type Outbound = {
country: string;
@@ -308,17 +300,9 @@ export namespace SalesCountries$ {
amount: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesCountries> = z
.object({
country: SalesCountriesCountry$.outboundSchema,
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
country: v.country,
sales: v.sales,
amount: v.amount,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesCountries> = z.object({
country: SalesCountriesCountry$.outboundSchema,
sales: z.number(),
amount: z.number(),
});
}

View File

@@ -21,19 +21,11 @@ export type SalesDevices = {
/** @internal */
export namespace SalesDevices$ {
export const inboundSchema: z.ZodType<SalesDevices, z.ZodTypeDef, unknown> = z
.object({
device: z.string(),
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
device: v.device,
sales: v.sales,
amount: v.amount,
};
});
export const inboundSchema: z.ZodType<SalesDevices, z.ZodTypeDef, unknown> = z.object({
device: z.string(),
sales: z.number(),
amount: z.number(),
});
export type Outbound = {
device: string;
@@ -41,17 +33,9 @@ export namespace SalesDevices$ {
amount: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesDevices> = z
.object({
device: z.string(),
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
device: v.device,
sales: v.sales,
amount: v.amount,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesDevices> = z.object({
device: z.string(),
sales: z.number(),
amount: z.number(),
});
}

View File

@@ -21,19 +21,11 @@ export type SalesOS = {
/** @internal */
export namespace SalesOS$ {
export const inboundSchema: z.ZodType<SalesOS, z.ZodTypeDef, unknown> = z
.object({
os: z.string(),
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
os: v.os,
sales: v.sales,
amount: v.amount,
};
});
export const inboundSchema: z.ZodType<SalesOS, z.ZodTypeDef, unknown> = z.object({
os: z.string(),
sales: z.number(),
amount: z.number(),
});
export type Outbound = {
os: string;
@@ -41,17 +33,9 @@ export namespace SalesOS$ {
amount: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesOS> = z
.object({
os: z.string(),
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
os: v.os,
sales: v.sales,
amount: v.amount,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesOS> = z.object({
os: z.string(),
sales: z.number(),
amount: z.number(),
});
}

View File

@@ -21,19 +21,11 @@ export type SalesReferers = {
/** @internal */
export namespace SalesReferers$ {
export const inboundSchema: z.ZodType<SalesReferers, z.ZodTypeDef, unknown> = z
.object({
referer: z.string(),
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
referer: v.referer,
sales: v.sales,
amount: v.amount,
};
});
export const inboundSchema: z.ZodType<SalesReferers, z.ZodTypeDef, unknown> = z.object({
referer: z.string(),
sales: z.number(),
amount: z.number(),
});
export type Outbound = {
referer: string;
@@ -41,17 +33,9 @@ export namespace SalesReferers$ {
amount: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesReferers> = z
.object({
referer: z.string(),
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
referer: v.referer,
sales: v.sales,
amount: v.amount,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesReferers> = z.object({
referer: z.string(),
sales: z.number(),
amount: z.number(),
});
}

View File

@@ -21,19 +21,11 @@ export type SalesTimeseries = {
/** @internal */
export namespace SalesTimeseries$ {
export const inboundSchema: z.ZodType<SalesTimeseries, z.ZodTypeDef, unknown> = z
.object({
start: z.string(),
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
start: v.start,
sales: v.sales,
amount: v.amount,
};
});
export const inboundSchema: z.ZodType<SalesTimeseries, z.ZodTypeDef, unknown> = z.object({
start: z.string(),
sales: z.number(),
amount: z.number(),
});
export type Outbound = {
start: string;
@@ -41,17 +33,9 @@ export namespace SalesTimeseries$ {
amount: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesTimeseries> = z
.object({
start: z.string(),
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
start: v.start,
sales: v.sales,
amount: v.amount,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesTimeseries> = z.object({
start: z.string(),
sales: z.number(),
amount: z.number(),
});
}

View File

@@ -47,31 +47,17 @@ export type SalesTopLinks = {
/** @internal */
export namespace SalesTopLinks$ {
export const inboundSchema: z.ZodType<SalesTopLinks, z.ZodTypeDef, unknown> = z
.object({
link: z.string(),
id: z.string(),
domain: z.string(),
key: z.string(),
shortLink: z.string(),
url: z.string(),
createdAt: z.string(),
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
link: v.link,
id: v.id,
domain: v.domain,
key: v.key,
shortLink: v.shortLink,
url: v.url,
createdAt: v.createdAt,
sales: v.sales,
amount: v.amount,
};
});
export const inboundSchema: z.ZodType<SalesTopLinks, z.ZodTypeDef, unknown> = z.object({
link: z.string(),
id: z.string(),
domain: z.string(),
key: z.string(),
shortLink: z.string(),
url: z.string(),
createdAt: z.string(),
sales: z.number(),
amount: z.number(),
});
export type Outbound = {
link: string;
@@ -85,29 +71,15 @@ export namespace SalesTopLinks$ {
amount: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesTopLinks> = z
.object({
link: z.string(),
id: z.string(),
domain: z.string(),
key: z.string(),
shortLink: z.string(),
url: z.string(),
createdAt: z.string(),
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
link: v.link,
id: v.id,
domain: v.domain,
key: v.key,
shortLink: v.shortLink,
url: v.url,
createdAt: v.createdAt,
sales: v.sales,
amount: v.amount,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesTopLinks> = z.object({
link: z.string(),
id: z.string(),
domain: z.string(),
key: z.string(),
shortLink: z.string(),
url: z.string(),
createdAt: z.string(),
sales: z.number(),
amount: z.number(),
});
}

View File

@@ -21,19 +21,11 @@ export type SalesTopUrls = {
/** @internal */
export namespace SalesTopUrls$ {
export const inboundSchema: z.ZodType<SalesTopUrls, z.ZodTypeDef, unknown> = z
.object({
url: z.string(),
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
url: v.url,
sales: v.sales,
amount: v.amount,
};
});
export const inboundSchema: z.ZodType<SalesTopUrls, z.ZodTypeDef, unknown> = z.object({
url: z.string(),
sales: z.number(),
amount: z.number(),
});
export type Outbound = {
url: string;
@@ -41,17 +33,9 @@ export namespace SalesTopUrls$ {
amount: number;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesTopUrls> = z
.object({
url: z.string(),
sales: z.number(),
amount: z.number(),
})
.transform((v) => {
return {
url: v.url,
sales: v.sales,
amount: v.amount,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SalesTopUrls> = z.object({
url: z.string(),
sales: z.number(),
amount: z.number(),
});
}

View File

@@ -10,27 +10,15 @@ export type Security = {
/** @internal */
export namespace Security$ {
export const inboundSchema: z.ZodType<Security, z.ZodTypeDef, unknown> = z
.object({
token: z.string().optional(),
})
.transform((v) => {
return {
...(v.token === undefined ? null : { token: v.token }),
};
});
export const inboundSchema: z.ZodType<Security, z.ZodTypeDef, unknown> = z.object({
token: z.string().optional(),
});
export type Outbound = {
token?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Security> = z
.object({
token: z.string().optional(),
})
.transform((v) => {
return {
...(v.token === undefined ? null : { token: v.token }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Security> = z.object({
token: z.string().optional(),
});
}

View File

@@ -45,19 +45,11 @@ export namespace Color$ {
/** @internal */
export namespace TagSchema$ {
export const inboundSchema: z.ZodType<TagSchema, z.ZodTypeDef, unknown> = z
.object({
id: z.string(),
name: z.string(),
color: Color$.inboundSchema,
})
.transform((v) => {
return {
id: v.id,
name: v.name,
color: v.color,
};
});
export const inboundSchema: z.ZodType<TagSchema, z.ZodTypeDef, unknown> = z.object({
id: z.string(),
name: z.string(),
color: Color$.inboundSchema,
});
export type Outbound = {
id: string;
@@ -65,17 +57,9 @@ export namespace TagSchema$ {
color: string;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TagSchema> = z
.object({
id: z.string(),
name: z.string(),
color: Color$.outboundSchema,
})
.transform((v) => {
return {
id: v.id,
name: v.name,
color: v.color,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TagSchema> = z.object({
id: z.string(),
name: z.string(),
color: Color$.outboundSchema,
});
}

View File

@@ -149,112 +149,61 @@ export namespace Role$ {
/** @internal */
export namespace Users$ {
export const inboundSchema: z.ZodType<Users, z.ZodTypeDef, unknown> = z
.object({
role: Role$.inboundSchema,
})
.transform((v) => {
return {
role: v.role,
};
});
export const inboundSchema: z.ZodType<Users, z.ZodTypeDef, unknown> = z.object({
role: Role$.inboundSchema,
});
export type Outbound = {
role: string;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Users> = z
.object({
role: Role$.outboundSchema,
})
.transform((v) => {
return {
role: v.role,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Users> = z.object({
role: Role$.outboundSchema,
});
}
/** @internal */
export namespace Domains$ {
export const inboundSchema: z.ZodType<Domains, z.ZodTypeDef, unknown> = z
.object({
slug: z.string(),
primary: z.boolean().default(false),
})
.transform((v) => {
return {
slug: v.slug,
primary: v.primary,
};
});
export const inboundSchema: z.ZodType<Domains, z.ZodTypeDef, unknown> = z.object({
slug: z.string(),
primary: z.boolean().default(false),
});
export type Outbound = {
slug: string;
primary: boolean;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Domains> = z
.object({
slug: z.string(),
primary: z.boolean().default(false),
})
.transform((v) => {
return {
slug: v.slug,
primary: v.primary,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Domains> = z.object({
slug: z.string(),
primary: z.boolean().default(false),
});
}
/** @internal */
export namespace WorkspaceSchema$ {
export const inboundSchema: z.ZodType<WorkspaceSchema, z.ZodTypeDef, unknown> = z
.object({
id: z.string(),
name: z.string(),
slug: z.string(),
logo: z.nullable(z.string()).default(null),
usage: z.number(),
usageLimit: z.number(),
linksUsage: z.number(),
linksLimit: z.number(),
domainsLimit: z.number(),
tagsLimit: z.number(),
usersLimit: z.number(),
plan: Plan$.inboundSchema,
stripeId: z.nullable(z.string()),
billingCycleStart: z.number(),
stripeConnectId: z.nullable(z.string()),
createdAt: z.string(),
users: z.array(z.lazy(() => Users$.inboundSchema)),
domains: z.array(z.lazy(() => Domains$.inboundSchema)),
inviteCode: z.nullable(z.string()),
betaTester: z.boolean().optional(),
})
.transform((v) => {
return {
id: v.id,
name: v.name,
slug: v.slug,
logo: v.logo,
usage: v.usage,
usageLimit: v.usageLimit,
linksUsage: v.linksUsage,
linksLimit: v.linksLimit,
domainsLimit: v.domainsLimit,
tagsLimit: v.tagsLimit,
usersLimit: v.usersLimit,
plan: v.plan,
stripeId: v.stripeId,
billingCycleStart: v.billingCycleStart,
stripeConnectId: v.stripeConnectId,
createdAt: v.createdAt,
users: v.users,
domains: v.domains,
inviteCode: v.inviteCode,
...(v.betaTester === undefined ? null : { betaTester: v.betaTester }),
};
});
export const inboundSchema: z.ZodType<WorkspaceSchema, z.ZodTypeDef, unknown> = z.object({
id: z.string(),
name: z.string(),
slug: z.string(),
logo: z.nullable(z.string()).default(null),
usage: z.number(),
usageLimit: z.number(),
linksUsage: z.number(),
linksLimit: z.number(),
domainsLimit: z.number(),
tagsLimit: z.number(),
usersLimit: z.number(),
plan: Plan$.inboundSchema,
stripeId: z.nullable(z.string()),
billingCycleStart: z.number(),
stripeConnectId: z.nullable(z.string()),
createdAt: z.string(),
users: z.array(z.lazy(() => Users$.inboundSchema)),
domains: z.array(z.lazy(() => Domains$.inboundSchema)),
inviteCode: z.nullable(z.string()),
betaTester: z.boolean().optional(),
});
export type Outbound = {
id: string;
@@ -279,51 +228,26 @@ export namespace WorkspaceSchema$ {
betaTester?: boolean | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, WorkspaceSchema> = z
.object({
id: z.string(),
name: z.string(),
slug: z.string(),
logo: z.nullable(z.string()).default(null),
usage: z.number(),
usageLimit: z.number(),
linksUsage: z.number(),
linksLimit: z.number(),
domainsLimit: z.number(),
tagsLimit: z.number(),
usersLimit: z.number(),
plan: Plan$.outboundSchema,
stripeId: z.nullable(z.string()),
billingCycleStart: z.number(),
stripeConnectId: z.nullable(z.string()),
createdAt: z.string(),
users: z.array(z.lazy(() => Users$.outboundSchema)),
domains: z.array(z.lazy(() => Domains$.outboundSchema)),
inviteCode: z.nullable(z.string()),
betaTester: z.boolean().optional(),
})
.transform((v) => {
return {
id: v.id,
name: v.name,
slug: v.slug,
logo: v.logo,
usage: v.usage,
usageLimit: v.usageLimit,
linksUsage: v.linksUsage,
linksLimit: v.linksLimit,
domainsLimit: v.domainsLimit,
tagsLimit: v.tagsLimit,
usersLimit: v.usersLimit,
plan: v.plan,
stripeId: v.stripeId,
billingCycleStart: v.billingCycleStart,
stripeConnectId: v.stripeConnectId,
createdAt: v.createdAt,
users: v.users,
domains: v.domains,
inviteCode: v.inviteCode,
...(v.betaTester === undefined ? null : { betaTester: v.betaTester }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, WorkspaceSchema> = z.object({
id: z.string(),
name: z.string(),
slug: z.string(),
logo: z.nullable(z.string()).default(null),
usage: z.number(),
usageLimit: z.number(),
linksUsage: z.number(),
linksLimit: z.number(),
domainsLimit: z.number(),
tagsLimit: z.number(),
usersLimit: z.number(),
plan: Plan$.outboundSchema,
stripeId: z.nullable(z.string()),
billingCycleStart: z.number(),
stripeConnectId: z.nullable(z.string()),
createdAt: z.string(),
users: z.array(z.lazy(() => Users$.outboundSchema)),
domains: z.array(z.lazy(() => Domains$.outboundSchema)),
inviteCode: z.nullable(z.string()),
betaTester: z.boolean().optional(),
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import { ClosedEnum } from "../../types";
import * as z from "zod";
@@ -77,11 +78,9 @@ export namespace ErrorT$ {
doc_url: z.string().optional(),
})
.transform((v) => {
return {
code: v.code,
message: v.message,
...(v.doc_url === undefined ? null : { docUrl: v.doc_url }),
};
return remap$(v, {
doc_url: "docUrl",
});
});
export type Outbound = {
@@ -97,11 +96,9 @@ export namespace ErrorT$ {
docUrl: z.string().optional(),
})
.transform((v) => {
return {
code: v.code,
message: v.message,
...(v.docUrl === undefined ? null : { doc_url: v.docUrl }),
};
return remap$(v, {
docUrl: "doc_url",
});
});
}
@@ -112,9 +109,7 @@ export namespace BadRequest$ {
error: z.lazy(() => ErrorT$.inboundSchema),
})
.transform((v) => {
return new BadRequest({
error: v.error,
});
return new BadRequest(v);
});
export type Outbound = {
@@ -125,14 +120,8 @@ export namespace BadRequest$ {
.instanceof(BadRequest)
.transform((v) => v.data$)
.pipe(
z
.object({
error: z.lazy(() => ErrorT$.outboundSchema),
})
.transform((v) => {
return {
error: v.error,
};
})
z.object({
error: z.lazy(() => ErrorT$.outboundSchema),
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import { ClosedEnum } from "../../types";
import * as z from "zod";
@@ -77,11 +78,9 @@ export namespace ConflictError$ {
doc_url: z.string().optional(),
})
.transform((v) => {
return {
code: v.code,
message: v.message,
...(v.doc_url === undefined ? null : { docUrl: v.doc_url }),
};
return remap$(v, {
doc_url: "docUrl",
});
});
export type Outbound = {
@@ -97,11 +96,9 @@ export namespace ConflictError$ {
docUrl: z.string().optional(),
})
.transform((v) => {
return {
code: v.code,
message: v.message,
...(v.docUrl === undefined ? null : { doc_url: v.docUrl }),
};
return remap$(v, {
docUrl: "doc_url",
});
});
}
@@ -112,9 +109,7 @@ export namespace Conflict$ {
error: z.lazy(() => ConflictError$.inboundSchema),
})
.transform((v) => {
return new Conflict({
error: v.error,
});
return new Conflict(v);
});
export type Outbound = {
@@ -125,14 +120,8 @@ export namespace Conflict$ {
.instanceof(Conflict)
.transform((v) => v.data$)
.pipe(
z
.object({
error: z.lazy(() => ConflictError$.outboundSchema),
})
.transform((v) => {
return {
error: v.error,
};
})
z.object({
error: z.lazy(() => ConflictError$.outboundSchema),
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import { ClosedEnum } from "../../types";
import * as z from "zod";
@@ -77,11 +78,9 @@ export namespace ForbiddenError$ {
doc_url: z.string().optional(),
})
.transform((v) => {
return {
code: v.code,
message: v.message,
...(v.doc_url === undefined ? null : { docUrl: v.doc_url }),
};
return remap$(v, {
doc_url: "docUrl",
});
});
export type Outbound = {
@@ -97,11 +96,9 @@ export namespace ForbiddenError$ {
docUrl: z.string().optional(),
})
.transform((v) => {
return {
code: v.code,
message: v.message,
...(v.docUrl === undefined ? null : { doc_url: v.docUrl }),
};
return remap$(v, {
docUrl: "doc_url",
});
});
}
@@ -112,9 +109,7 @@ export namespace Forbidden$ {
error: z.lazy(() => ForbiddenError$.inboundSchema),
})
.transform((v) => {
return new Forbidden({
error: v.error,
});
return new Forbidden(v);
});
export type Outbound = {
@@ -125,14 +120,8 @@ export namespace Forbidden$ {
.instanceof(Forbidden)
.transform((v) => v.data$)
.pipe(
z
.object({
error: z.lazy(() => ForbiddenError$.outboundSchema),
})
.transform((v) => {
return {
error: v.error,
};
})
z.object({
error: z.lazy(() => ForbiddenError$.outboundSchema),
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import { ClosedEnum } from "../../types";
import * as z from "zod";
@@ -77,11 +78,9 @@ export namespace InternalServerErrorError$ {
doc_url: z.string().optional(),
})
.transform((v) => {
return {
code: v.code,
message: v.message,
...(v.doc_url === undefined ? null : { docUrl: v.doc_url }),
};
return remap$(v, {
doc_url: "docUrl",
});
});
export type Outbound = {
@@ -97,11 +96,9 @@ export namespace InternalServerErrorError$ {
docUrl: z.string().optional(),
})
.transform((v) => {
return {
code: v.code,
message: v.message,
...(v.docUrl === undefined ? null : { doc_url: v.docUrl }),
};
return remap$(v, {
docUrl: "doc_url",
});
});
}
@@ -112,9 +109,7 @@ export namespace InternalServerError$ {
error: z.lazy(() => InternalServerErrorError$.inboundSchema),
})
.transform((v) => {
return new InternalServerError({
error: v.error,
});
return new InternalServerError(v);
});
export type Outbound = {
@@ -125,14 +120,8 @@ export namespace InternalServerError$ {
.instanceof(InternalServerError)
.transform((v) => v.data$)
.pipe(
z
.object({
error: z.lazy(() => InternalServerErrorError$.outboundSchema),
})
.transform((v) => {
return {
error: v.error,
};
})
z.object({
error: z.lazy(() => InternalServerErrorError$.outboundSchema),
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import { ClosedEnum } from "../../types";
import * as z from "zod";
@@ -77,11 +78,9 @@ export namespace InviteExpiredError$ {
doc_url: z.string().optional(),
})
.transform((v) => {
return {
code: v.code,
message: v.message,
...(v.doc_url === undefined ? null : { docUrl: v.doc_url }),
};
return remap$(v, {
doc_url: "docUrl",
});
});
export type Outbound = {
@@ -97,11 +96,9 @@ export namespace InviteExpiredError$ {
docUrl: z.string().optional(),
})
.transform((v) => {
return {
code: v.code,
message: v.message,
...(v.docUrl === undefined ? null : { doc_url: v.docUrl }),
};
return remap$(v, {
docUrl: "doc_url",
});
});
}
@@ -112,9 +109,7 @@ export namespace InviteExpired$ {
error: z.lazy(() => InviteExpiredError$.inboundSchema),
})
.transform((v) => {
return new InviteExpired({
error: v.error,
});
return new InviteExpired(v);
});
export type Outbound = {
@@ -125,14 +120,8 @@ export namespace InviteExpired$ {
.instanceof(InviteExpired)
.transform((v) => v.data$)
.pipe(
z
.object({
error: z.lazy(() => InviteExpiredError$.outboundSchema),
})
.transform((v) => {
return {
error: v.error,
};
})
z.object({
error: z.lazy(() => InviteExpiredError$.outboundSchema),
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import { ClosedEnum } from "../../types";
import * as z from "zod";
@@ -77,11 +78,9 @@ export namespace NotFoundError$ {
doc_url: z.string().optional(),
})
.transform((v) => {
return {
code: v.code,
message: v.message,
...(v.doc_url === undefined ? null : { docUrl: v.doc_url }),
};
return remap$(v, {
doc_url: "docUrl",
});
});
export type Outbound = {
@@ -97,11 +96,9 @@ export namespace NotFoundError$ {
docUrl: z.string().optional(),
})
.transform((v) => {
return {
code: v.code,
message: v.message,
...(v.docUrl === undefined ? null : { doc_url: v.docUrl }),
};
return remap$(v, {
docUrl: "doc_url",
});
});
}
@@ -112,9 +109,7 @@ export namespace NotFound$ {
error: z.lazy(() => NotFoundError$.inboundSchema),
})
.transform((v) => {
return new NotFound({
error: v.error,
});
return new NotFound(v);
});
export type Outbound = {
@@ -125,14 +120,8 @@ export namespace NotFound$ {
.instanceof(NotFound)
.transform((v) => v.data$)
.pipe(
z
.object({
error: z.lazy(() => NotFoundError$.outboundSchema),
})
.transform((v) => {
return {
error: v.error,
};
})
z.object({
error: z.lazy(() => NotFoundError$.outboundSchema),
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import { ClosedEnum } from "../../types";
import * as z from "zod";
@@ -77,11 +78,9 @@ export namespace RateLimitExceededError$ {
doc_url: z.string().optional(),
})
.transform((v) => {
return {
code: v.code,
message: v.message,
...(v.doc_url === undefined ? null : { docUrl: v.doc_url }),
};
return remap$(v, {
doc_url: "docUrl",
});
});
export type Outbound = {
@@ -97,11 +96,9 @@ export namespace RateLimitExceededError$ {
docUrl: z.string().optional(),
})
.transform((v) => {
return {
code: v.code,
message: v.message,
...(v.docUrl === undefined ? null : { doc_url: v.docUrl }),
};
return remap$(v, {
docUrl: "doc_url",
});
});
}
@@ -112,9 +109,7 @@ export namespace RateLimitExceeded$ {
error: z.lazy(() => RateLimitExceededError$.inboundSchema),
})
.transform((v) => {
return new RateLimitExceeded({
error: v.error,
});
return new RateLimitExceeded(v);
});
export type Outbound = {
@@ -125,14 +120,8 @@ export namespace RateLimitExceeded$ {
.instanceof(RateLimitExceeded)
.transform((v) => v.data$)
.pipe(
z
.object({
error: z.lazy(() => RateLimitExceededError$.outboundSchema),
})
.transform((v) => {
return {
error: v.error,
};
})
z.object({
error: z.lazy(() => RateLimitExceededError$.outboundSchema),
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import { ClosedEnum } from "../../types";
import * as z from "zod";
@@ -77,11 +78,9 @@ export namespace UnauthorizedError$ {
doc_url: z.string().optional(),
})
.transform((v) => {
return {
code: v.code,
message: v.message,
...(v.doc_url === undefined ? null : { docUrl: v.doc_url }),
};
return remap$(v, {
doc_url: "docUrl",
});
});
export type Outbound = {
@@ -97,11 +96,9 @@ export namespace UnauthorizedError$ {
docUrl: z.string().optional(),
})
.transform((v) => {
return {
code: v.code,
message: v.message,
...(v.docUrl === undefined ? null : { doc_url: v.docUrl }),
};
return remap$(v, {
docUrl: "doc_url",
});
});
}
@@ -112,9 +109,7 @@ export namespace Unauthorized$ {
error: z.lazy(() => UnauthorizedError$.inboundSchema),
})
.transform((v) => {
return new Unauthorized({
error: v.error,
});
return new Unauthorized(v);
});
export type Outbound = {
@@ -125,14 +120,8 @@ export namespace Unauthorized$ {
.instanceof(Unauthorized)
.transform((v) => v.data$)
.pipe(
z
.object({
error: z.lazy(() => UnauthorizedError$.outboundSchema),
})
.transform((v) => {
return {
error: v.error,
};
})
z.object({
error: z.lazy(() => UnauthorizedError$.outboundSchema),
})
);
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import { ClosedEnum } from "../../types";
import * as z from "zod";
@@ -77,11 +78,9 @@ export namespace UnprocessableEntityError$ {
doc_url: z.string().optional(),
})
.transform((v) => {
return {
code: v.code,
message: v.message,
...(v.doc_url === undefined ? null : { docUrl: v.doc_url }),
};
return remap$(v, {
doc_url: "docUrl",
});
});
export type Outbound = {
@@ -97,11 +96,9 @@ export namespace UnprocessableEntityError$ {
docUrl: z.string().optional(),
})
.transform((v) => {
return {
code: v.code,
message: v.message,
...(v.docUrl === undefined ? null : { doc_url: v.docUrl }),
};
return remap$(v, {
docUrl: "doc_url",
});
});
}
@@ -112,9 +109,7 @@ export namespace UnprocessableEntity$ {
error: z.lazy(() => UnprocessableEntityError$.inboundSchema),
})
.transform((v) => {
return new UnprocessableEntity({
error: v.error,
});
return new UnprocessableEntity(v);
});
export type Outbound = {
@@ -125,14 +120,8 @@ export namespace UnprocessableEntity$ {
.instanceof(UnprocessableEntity)
.transform((v) => v.data$)
.pipe(
z
.object({
error: z.lazy(() => UnprocessableEntityError$.outboundSchema),
})
.transform((v) => {
return {
error: v.error,
};
})
z.object({
error: z.lazy(() => UnprocessableEntityError$.outboundSchema),
})
);
}

View File

@@ -58,34 +58,20 @@ export type AddDomainRequestBody = {
/** @internal */
export namespace AddDomainGlobals$ {
export const inboundSchema: z.ZodType<AddDomainGlobals, z.ZodTypeDef, unknown> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const inboundSchema: z.ZodType<AddDomainGlobals, z.ZodTypeDef, unknown> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
export type Outbound = {
workspaceId: string;
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, AddDomainGlobals> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, AddDomainGlobals> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
}
/** @internal */
@@ -96,27 +82,15 @@ export namespace Type$ {
/** @internal */
export namespace AddDomainRequestBody$ {
export const inboundSchema: z.ZodType<AddDomainRequestBody, z.ZodTypeDef, unknown> = z
.object({
slug: z.string(),
type: Type$.inboundSchema.default("redirect"),
target: z.nullable(z.string()).optional(),
expiredUrl: z.nullable(z.string()).optional(),
archived: z.boolean().default(false),
noindex: z.boolean().optional(),
placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")),
})
.transform((v) => {
return {
slug: v.slug,
type: v.type,
...(v.target === undefined ? null : { target: v.target }),
...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }),
archived: v.archived,
...(v.noindex === undefined ? null : { noindex: v.noindex }),
placeholder: v.placeholder,
};
});
export const inboundSchema: z.ZodType<AddDomainRequestBody, z.ZodTypeDef, unknown> = z.object({
slug: z.string(),
type: Type$.inboundSchema.default("redirect"),
target: z.nullable(z.string()).optional(),
expiredUrl: z.nullable(z.string()).optional(),
archived: z.boolean().default(false),
noindex: z.boolean().optional(),
placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")),
});
export type Outbound = {
slug: string;
@@ -128,8 +102,8 @@ export namespace AddDomainRequestBody$ {
placeholder: string | null;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, AddDomainRequestBody> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, AddDomainRequestBody> = z.object(
{
slug: z.string(),
type: Type$.outboundSchema.default("redirect"),
target: z.nullable(z.string()).optional(),
@@ -137,16 +111,6 @@ export namespace AddDomainRequestBody$ {
archived: z.boolean().default(false),
noindex: z.boolean().optional(),
placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")),
})
.transform((v) => {
return {
slug: v.slug,
type: v.type,
...(v.target === undefined ? null : { target: v.target }),
...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }),
archived: v.archived,
...(v.noindex === undefined ? null : { noindex: v.noindex }),
placeholder: v.placeholder,
};
});
}
);
}

View File

@@ -122,33 +122,22 @@ export type RequestBody = {
/** @internal */
export namespace BulkCreateLinksGlobals$ {
export const inboundSchema: z.ZodType<BulkCreateLinksGlobals, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<BulkCreateLinksGlobals, z.ZodTypeDef, unknown> = z.object(
{
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
}
);
export type Outbound = {
workspaceId: string;
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, BulkCreateLinksGlobals> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, BulkCreateLinksGlobals> =
z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
}
@@ -178,59 +167,31 @@ export namespace BulkCreateLinksTagNames$ {
/** @internal */
export namespace RequestBody$ {
export const inboundSchema: z.ZodType<RequestBody, z.ZodTypeDef, unknown> = z
.object({
url: z.string(),
domain: z.string().optional(),
key: z.string().optional(),
externalId: z.nullable(z.string()).optional(),
prefix: z.string().optional(),
trackConversion: z.boolean().default(false),
archived: z.boolean().default(false),
publicStats: z.boolean().default(false),
tagId: z.nullable(z.string()).optional(),
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
comments: z.nullable(z.string()).optional(),
expiresAt: z.nullable(z.string()).optional(),
expiredUrl: z.nullable(z.string()).optional(),
password: z.nullable(z.string()).optional(),
proxy: z.boolean().default(false),
title: z.nullable(z.string()).optional(),
description: z.nullable(z.string()).optional(),
image: z.nullable(z.string()).optional(),
rewrite: z.boolean().default(false),
ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(),
})
.transform((v) => {
return {
url: v.url,
...(v.domain === undefined ? null : { domain: v.domain }),
...(v.key === undefined ? null : { key: v.key }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.prefix === undefined ? null : { prefix: v.prefix }),
trackConversion: v.trackConversion,
archived: v.archived,
publicStats: v.publicStats,
...(v.tagId === undefined ? null : { tagId: v.tagId }),
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
...(v.comments === undefined ? null : { comments: v.comments }),
...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }),
...(v.password === undefined ? null : { password: v.password }),
proxy: v.proxy,
...(v.title === undefined ? null : { title: v.title }),
...(v.description === undefined ? null : { description: v.description }),
...(v.image === undefined ? null : { image: v.image }),
rewrite: v.rewrite,
...(v.ios === undefined ? null : { ios: v.ios }),
...(v.android === undefined ? null : { android: v.android }),
...(v.geo === undefined ? null : { geo: v.geo }),
};
});
export const inboundSchema: z.ZodType<RequestBody, z.ZodTypeDef, unknown> = z.object({
url: z.string(),
domain: z.string().optional(),
key: z.string().optional(),
externalId: z.nullable(z.string()).optional(),
prefix: z.string().optional(),
trackConversion: z.boolean().default(false),
archived: z.boolean().default(false),
publicStats: z.boolean().default(false),
tagId: z.nullable(z.string()).optional(),
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
comments: z.nullable(z.string()).optional(),
expiresAt: z.nullable(z.string()).optional(),
expiredUrl: z.nullable(z.string()).optional(),
password: z.nullable(z.string()).optional(),
proxy: z.boolean().default(false),
title: z.nullable(z.string()).optional(),
description: z.nullable(z.string()).optional(),
image: z.nullable(z.string()).optional(),
rewrite: z.boolean().default(false),
ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(),
});
export type Outbound = {
url: string;
@@ -258,57 +219,29 @@ export namespace RequestBody$ {
geo?: components.LinkGeoTargeting$.Outbound | null | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, RequestBody> = z
.object({
url: z.string(),
domain: z.string().optional(),
key: z.string().optional(),
externalId: z.nullable(z.string()).optional(),
prefix: z.string().optional(),
trackConversion: z.boolean().default(false),
archived: z.boolean().default(false),
publicStats: z.boolean().default(false),
tagId: z.nullable(z.string()).optional(),
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
comments: z.nullable(z.string()).optional(),
expiresAt: z.nullable(z.string()).optional(),
expiredUrl: z.nullable(z.string()).optional(),
password: z.nullable(z.string()).optional(),
proxy: z.boolean().default(false),
title: z.nullable(z.string()).optional(),
description: z.nullable(z.string()).optional(),
image: z.nullable(z.string()).optional(),
rewrite: z.boolean().default(false),
ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(),
})
.transform((v) => {
return {
url: v.url,
...(v.domain === undefined ? null : { domain: v.domain }),
...(v.key === undefined ? null : { key: v.key }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.prefix === undefined ? null : { prefix: v.prefix }),
trackConversion: v.trackConversion,
archived: v.archived,
publicStats: v.publicStats,
...(v.tagId === undefined ? null : { tagId: v.tagId }),
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
...(v.comments === undefined ? null : { comments: v.comments }),
...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }),
...(v.password === undefined ? null : { password: v.password }),
proxy: v.proxy,
...(v.title === undefined ? null : { title: v.title }),
...(v.description === undefined ? null : { description: v.description }),
...(v.image === undefined ? null : { image: v.image }),
rewrite: v.rewrite,
...(v.ios === undefined ? null : { ios: v.ios }),
...(v.android === undefined ? null : { android: v.android }),
...(v.geo === undefined ? null : { geo: v.geo }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, RequestBody> = z.object({
url: z.string(),
domain: z.string().optional(),
key: z.string().optional(),
externalId: z.nullable(z.string()).optional(),
prefix: z.string().optional(),
trackConversion: z.boolean().default(false),
archived: z.boolean().default(false),
publicStats: z.boolean().default(false),
tagId: z.nullable(z.string()).optional(),
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
comments: z.nullable(z.string()).optional(),
expiresAt: z.nullable(z.string()).optional(),
expiredUrl: z.nullable(z.string()).optional(),
password: z.nullable(z.string()).optional(),
proxy: z.boolean().default(false),
title: z.nullable(z.string()).optional(),
description: z.nullable(z.string()).optional(),
image: z.nullable(z.string()).optional(),
rewrite: z.boolean().default(false),
ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(),
});
}

View File

@@ -122,34 +122,20 @@ export type CreateLinkRequestBody = {
/** @internal */
export namespace CreateLinkGlobals$ {
export const inboundSchema: z.ZodType<CreateLinkGlobals, z.ZodTypeDef, unknown> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const inboundSchema: z.ZodType<CreateLinkGlobals, z.ZodTypeDef, unknown> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
export type Outbound = {
workspaceId: string;
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateLinkGlobals> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateLinkGlobals> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
}
/** @internal */
@@ -182,59 +168,31 @@ export namespace TagNames$ {
/** @internal */
export namespace CreateLinkRequestBody$ {
export const inboundSchema: z.ZodType<CreateLinkRequestBody, z.ZodTypeDef, unknown> = z
.object({
url: z.string(),
domain: z.string().optional(),
key: z.string().optional(),
externalId: z.nullable(z.string()).optional(),
prefix: z.string().optional(),
trackConversion: z.boolean().default(false),
archived: z.boolean().default(false),
publicStats: z.boolean().default(false),
tagId: z.nullable(z.string()).optional(),
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
comments: z.nullable(z.string()).optional(),
expiresAt: z.nullable(z.string()).optional(),
expiredUrl: z.nullable(z.string()).optional(),
password: z.nullable(z.string()).optional(),
proxy: z.boolean().default(false),
title: z.nullable(z.string()).optional(),
description: z.nullable(z.string()).optional(),
image: z.nullable(z.string()).optional(),
rewrite: z.boolean().default(false),
ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(),
})
.transform((v) => {
return {
url: v.url,
...(v.domain === undefined ? null : { domain: v.domain }),
...(v.key === undefined ? null : { key: v.key }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.prefix === undefined ? null : { prefix: v.prefix }),
trackConversion: v.trackConversion,
archived: v.archived,
publicStats: v.publicStats,
...(v.tagId === undefined ? null : { tagId: v.tagId }),
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
...(v.comments === undefined ? null : { comments: v.comments }),
...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }),
...(v.password === undefined ? null : { password: v.password }),
proxy: v.proxy,
...(v.title === undefined ? null : { title: v.title }),
...(v.description === undefined ? null : { description: v.description }),
...(v.image === undefined ? null : { image: v.image }),
rewrite: v.rewrite,
...(v.ios === undefined ? null : { ios: v.ios }),
...(v.android === undefined ? null : { android: v.android }),
...(v.geo === undefined ? null : { geo: v.geo }),
};
});
export const inboundSchema: z.ZodType<CreateLinkRequestBody, z.ZodTypeDef, unknown> = z.object({
url: z.string(),
domain: z.string().optional(),
key: z.string().optional(),
externalId: z.nullable(z.string()).optional(),
prefix: z.string().optional(),
trackConversion: z.boolean().default(false),
archived: z.boolean().default(false),
publicStats: z.boolean().default(false),
tagId: z.nullable(z.string()).optional(),
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
comments: z.nullable(z.string()).optional(),
expiresAt: z.nullable(z.string()).optional(),
expiredUrl: z.nullable(z.string()).optional(),
password: z.nullable(z.string()).optional(),
proxy: z.boolean().default(false),
title: z.nullable(z.string()).optional(),
description: z.nullable(z.string()).optional(),
image: z.nullable(z.string()).optional(),
rewrite: z.boolean().default(false),
ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(),
});
export type Outbound = {
url: string;
@@ -262,8 +220,8 @@ export namespace CreateLinkRequestBody$ {
geo?: components.LinkGeoTargeting$.Outbound | null | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateLinkRequestBody> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateLinkRequestBody> =
z.object({
url: z.string(),
domain: z.string().optional(),
key: z.string().optional(),
@@ -287,32 +245,5 @@ export namespace CreateLinkRequestBody$ {
ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(),
})
.transform((v) => {
return {
url: v.url,
...(v.domain === undefined ? null : { domain: v.domain }),
...(v.key === undefined ? null : { key: v.key }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.prefix === undefined ? null : { prefix: v.prefix }),
trackConversion: v.trackConversion,
archived: v.archived,
publicStats: v.publicStats,
...(v.tagId === undefined ? null : { tagId: v.tagId }),
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
...(v.comments === undefined ? null : { comments: v.comments }),
...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }),
...(v.password === undefined ? null : { password: v.password }),
proxy: v.proxy,
...(v.title === undefined ? null : { title: v.title }),
...(v.description === undefined ? null : { description: v.description }),
...(v.image === undefined ? null : { image: v.image }),
rewrite: v.rewrite,
...(v.ios === undefined ? null : { ios: v.ios }),
...(v.android === undefined ? null : { android: v.android }),
...(v.geo === undefined ? null : { geo: v.geo }),
};
});
}

View File

@@ -43,34 +43,20 @@ export type CreateTagRequestBody = {
/** @internal */
export namespace CreateTagGlobals$ {
export const inboundSchema: z.ZodType<CreateTagGlobals, z.ZodTypeDef, unknown> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const inboundSchema: z.ZodType<CreateTagGlobals, z.ZodTypeDef, unknown> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
export type Outbound = {
workspaceId: string;
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateTagGlobals> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateTagGlobals> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
}
/** @internal */
@@ -81,32 +67,20 @@ export namespace Color$ {
/** @internal */
export namespace CreateTagRequestBody$ {
export const inboundSchema: z.ZodType<CreateTagRequestBody, z.ZodTypeDef, unknown> = z
.object({
tag: z.string(),
color: Color$.inboundSchema.optional(),
})
.transform((v) => {
return {
tag: v.tag,
...(v.color === undefined ? null : { color: v.color }),
};
});
export const inboundSchema: z.ZodType<CreateTagRequestBody, z.ZodTypeDef, unknown> = z.object({
tag: z.string(),
color: Color$.inboundSchema.optional(),
});
export type Outbound = {
tag: string;
color?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateTagRequestBody> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateTagRequestBody> = z.object(
{
tag: z.string(),
color: Color$.outboundSchema.optional(),
})
.transform((v) => {
return {
tag: v.tag,
...(v.color === undefined ? null : { color: v.color }),
};
});
}
);
}

View File

@@ -12,18 +12,11 @@ export type CreateWorkspaceRequestBody = {
/** @internal */
export namespace CreateWorkspaceRequestBody$ {
export const inboundSchema: z.ZodType<CreateWorkspaceRequestBody, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<CreateWorkspaceRequestBody, z.ZodTypeDef, unknown> =
z.object({
name: z.string(),
slug: z.string(),
domain: z.string().optional(),
})
.transform((v) => {
return {
name: v.name,
slug: v.slug,
...(v.domain === undefined ? null : { domain: v.domain }),
};
});
export type Outbound = {
@@ -32,17 +25,10 @@ export namespace CreateWorkspaceRequestBody$ {
domain?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateWorkspaceRequestBody> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, CreateWorkspaceRequestBody> =
z.object({
name: z.string(),
slug: z.string(),
domain: z.string().optional(),
})
.transform((v) => {
return {
name: v.name,
slug: v.slug,
...(v.domain === undefined ? null : { domain: v.domain }),
};
});
}

View File

@@ -31,86 +31,50 @@ export type DeleteDomainResponseBody = {
/** @internal */
export namespace DeleteDomainGlobals$ {
export const inboundSchema: z.ZodType<DeleteDomainGlobals, z.ZodTypeDef, unknown> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const inboundSchema: z.ZodType<DeleteDomainGlobals, z.ZodTypeDef, unknown> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
export type Outbound = {
workspaceId: string;
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteDomainGlobals> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteDomainGlobals> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
}
/** @internal */
export namespace DeleteDomainRequest$ {
export const inboundSchema: z.ZodType<DeleteDomainRequest, z.ZodTypeDef, unknown> = z
.object({
slug: z.string(),
})
.transform((v) => {
return {
slug: v.slug,
};
});
export const inboundSchema: z.ZodType<DeleteDomainRequest, z.ZodTypeDef, unknown> = z.object({
slug: z.string(),
});
export type Outbound = {
slug: string;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteDomainRequest> = z
.object({
slug: z.string(),
})
.transform((v) => {
return {
slug: v.slug,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteDomainRequest> = z.object({
slug: z.string(),
});
}
/** @internal */
export namespace DeleteDomainResponseBody$ {
export const inboundSchema: z.ZodType<DeleteDomainResponseBody, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<DeleteDomainResponseBody, z.ZodTypeDef, unknown> =
z.object({
slug: z.string(),
})
.transform((v) => {
return {
slug: v.slug,
};
});
export type Outbound = {
slug: string;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteDomainResponseBody> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteDomainResponseBody> =
z.object({
slug: z.string(),
})
.transform((v) => {
return {
slug: v.slug,
};
});
}

View File

@@ -31,86 +31,51 @@ export type DeleteLinkResponseBody = {
/** @internal */
export namespace DeleteLinkGlobals$ {
export const inboundSchema: z.ZodType<DeleteLinkGlobals, z.ZodTypeDef, unknown> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const inboundSchema: z.ZodType<DeleteLinkGlobals, z.ZodTypeDef, unknown> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
export type Outbound = {
workspaceId: string;
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteLinkGlobals> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteLinkGlobals> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
}
/** @internal */
export namespace DeleteLinkRequest$ {
export const inboundSchema: z.ZodType<DeleteLinkRequest, z.ZodTypeDef, unknown> = z
.object({
linkId: z.string(),
})
.transform((v) => {
return {
linkId: v.linkId,
};
});
export const inboundSchema: z.ZodType<DeleteLinkRequest, z.ZodTypeDef, unknown> = z.object({
linkId: z.string(),
});
export type Outbound = {
linkId: string;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteLinkRequest> = z
.object({
linkId: z.string(),
})
.transform((v) => {
return {
linkId: v.linkId,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteLinkRequest> = z.object({
linkId: z.string(),
});
}
/** @internal */
export namespace DeleteLinkResponseBody$ {
export const inboundSchema: z.ZodType<DeleteLinkResponseBody, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<DeleteLinkResponseBody, z.ZodTypeDef, unknown> = z.object(
{
id: z.string(),
})
.transform((v) => {
return {
id: v.id,
};
});
}
);
export type Outbound = {
id: string;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteLinkResponseBody> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, DeleteLinkResponseBody> =
z.object({
id: z.string(),
})
.transform((v) => {
return {
id: v.id,
};
});
}

View File

@@ -30,53 +30,30 @@ export type GetLinkInfoRequest = {
/** @internal */
export namespace GetLinkInfoGlobals$ {
export const inboundSchema: z.ZodType<GetLinkInfoGlobals, z.ZodTypeDef, unknown> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const inboundSchema: z.ZodType<GetLinkInfoGlobals, z.ZodTypeDef, unknown> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
export type Outbound = {
workspaceId: string;
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinkInfoGlobals> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinkInfoGlobals> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
}
/** @internal */
export namespace GetLinkInfoRequest$ {
export const inboundSchema: z.ZodType<GetLinkInfoRequest, z.ZodTypeDef, unknown> = z
.object({
domain: z.string().optional(),
key: z.string().optional(),
linkId: z.string().optional(),
externalId: z.string().optional(),
})
.transform((v) => {
return {
...(v.domain === undefined ? null : { domain: v.domain }),
...(v.key === undefined ? null : { key: v.key }),
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
};
});
export const inboundSchema: z.ZodType<GetLinkInfoRequest, z.ZodTypeDef, unknown> = z.object({
domain: z.string().optional(),
key: z.string().optional(),
linkId: z.string().optional(),
externalId: z.string().optional(),
});
export type Outbound = {
domain?: string | undefined;
@@ -85,19 +62,10 @@ export namespace GetLinkInfoRequest$ {
externalId?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinkInfoRequest> = z
.object({
domain: z.string().optional(),
key: z.string().optional(),
linkId: z.string().optional(),
externalId: z.string().optional(),
})
.transform((v) => {
return {
...(v.domain === undefined ? null : { domain: v.domain }),
...(v.key === undefined ? null : { key: v.key }),
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinkInfoRequest> = z.object({
domain: z.string().optional(),
key: z.string().optional(),
linkId: z.string().optional(),
externalId: z.string().optional(),
});
}

View File

@@ -81,34 +81,20 @@ export type GetLinksRequest = {
/** @internal */
export namespace GetLinksGlobals$ {
export const inboundSchema: z.ZodType<GetLinksGlobals, z.ZodTypeDef, unknown> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const inboundSchema: z.ZodType<GetLinksGlobals, z.ZodTypeDef, unknown> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
export type Outbound = {
workspaceId: string;
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinksGlobals> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinksGlobals> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
}
/** @internal */
@@ -147,33 +133,18 @@ export namespace Sort$ {
/** @internal */
export namespace GetLinksRequest$ {
export const inboundSchema: z.ZodType<GetLinksRequest, z.ZodTypeDef, unknown> = z
.object({
domain: z.string().optional(),
tagId: z.string().optional(),
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
search: z.string().optional(),
userId: z.string().optional(),
showArchived: z.boolean().default(false),
withTags: z.boolean().default(false),
sort: Sort$.inboundSchema.default("createdAt"),
page: z.number().optional(),
})
.transform((v) => {
return {
...(v.domain === undefined ? null : { domain: v.domain }),
...(v.tagId === undefined ? null : { tagId: v.tagId }),
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
...(v.search === undefined ? null : { search: v.search }),
...(v.userId === undefined ? null : { userId: v.userId }),
showArchived: v.showArchived,
withTags: v.withTags,
sort: v.sort,
...(v.page === undefined ? null : { page: v.page }),
};
});
export const inboundSchema: z.ZodType<GetLinksRequest, z.ZodTypeDef, unknown> = z.object({
domain: z.string().optional(),
tagId: z.string().optional(),
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
search: z.string().optional(),
userId: z.string().optional(),
showArchived: z.boolean().default(false),
withTags: z.boolean().default(false),
sort: Sort$.inboundSchema.default("createdAt"),
page: z.number().optional(),
});
export type Outbound = {
domain?: string | undefined;
@@ -188,31 +159,16 @@ export namespace GetLinksRequest$ {
page?: number | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinksRequest> = z
.object({
domain: z.string().optional(),
tagId: z.string().optional(),
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
search: z.string().optional(),
userId: z.string().optional(),
showArchived: z.boolean().default(false),
withTags: z.boolean().default(false),
sort: Sort$.outboundSchema.default("createdAt"),
page: z.number().optional(),
})
.transform((v) => {
return {
...(v.domain === undefined ? null : { domain: v.domain }),
...(v.tagId === undefined ? null : { tagId: v.tagId }),
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
...(v.search === undefined ? null : { search: v.search }),
...(v.userId === undefined ? null : { userId: v.userId }),
showArchived: v.showArchived,
withTags: v.withTags,
sort: v.sort,
...(v.page === undefined ? null : { page: v.page }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinksRequest> = z.object({
domain: z.string().optional(),
tagId: z.string().optional(),
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
search: z.string().optional(),
userId: z.string().optional(),
showArchived: z.boolean().default(false),
withTags: z.boolean().default(false),
sort: Sort$.outboundSchema.default("createdAt"),
page: z.number().optional(),
});
}

View File

@@ -79,34 +79,22 @@ export type GetLinksCountRequest = {
/** @internal */
export namespace GetLinksCountGlobals$ {
export const inboundSchema: z.ZodType<GetLinksCountGlobals, z.ZodTypeDef, unknown> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const inboundSchema: z.ZodType<GetLinksCountGlobals, z.ZodTypeDef, unknown> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
export type Outbound = {
workspaceId: string;
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinksCountGlobals> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinksCountGlobals> = z.object(
{
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
}
);
}
/** @internal */
@@ -160,31 +148,17 @@ export namespace GroupBy$ {
/** @internal */
export namespace GetLinksCountRequest$ {
export const inboundSchema: z.ZodType<GetLinksCountRequest, z.ZodTypeDef, unknown> = z
.object({
domain: z.string().optional(),
tagId: z.string().optional(),
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
search: z.string().optional(),
userId: z.string().optional(),
showArchived: z.boolean().default(false),
withTags: z.boolean().default(false),
groupBy: z.union([One$.inboundSchema, Two$.inboundSchema]).optional(),
})
.transform((v) => {
return {
...(v.domain === undefined ? null : { domain: v.domain }),
...(v.tagId === undefined ? null : { tagId: v.tagId }),
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
...(v.search === undefined ? null : { search: v.search }),
...(v.userId === undefined ? null : { userId: v.userId }),
showArchived: v.showArchived,
withTags: v.withTags,
...(v.groupBy === undefined ? null : { groupBy: v.groupBy }),
};
});
export const inboundSchema: z.ZodType<GetLinksCountRequest, z.ZodTypeDef, unknown> = z.object({
domain: z.string().optional(),
tagId: z.string().optional(),
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
search: z.string().optional(),
userId: z.string().optional(),
showArchived: z.boolean().default(false),
withTags: z.boolean().default(false),
groupBy: z.union([One$.inboundSchema, Two$.inboundSchema]).optional(),
});
export type Outbound = {
domain?: string | undefined;
@@ -198,8 +172,8 @@ export namespace GetLinksCountRequest$ {
groupBy?: string | string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinksCountRequest> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetLinksCountRequest> = z.object(
{
domain: z.string().optional(),
tagId: z.string().optional(),
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
@@ -209,18 +183,6 @@ export namespace GetLinksCountRequest$ {
showArchived: z.boolean().default(false),
withTags: z.boolean().default(false),
groupBy: z.union([One$.outboundSchema, Two$.outboundSchema]).optional(),
})
.transform((v) => {
return {
...(v.domain === undefined ? null : { domain: v.domain }),
...(v.tagId === undefined ? null : { tagId: v.tagId }),
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
...(v.search === undefined ? null : { search: v.search }),
...(v.userId === undefined ? null : { userId: v.userId }),
showArchived: v.showArchived,
withTags: v.withTags,
...(v.groupBy === undefined ? null : { groupBy: v.groupBy }),
};
});
}
);
}

View File

@@ -31,45 +31,26 @@ export type GetMetatagsResponseBody = {
/** @internal */
export namespace GetMetatagsRequest$ {
export const inboundSchema: z.ZodType<GetMetatagsRequest, z.ZodTypeDef, unknown> = z
.object({
url: z.string(),
})
.transform((v) => {
return {
url: v.url,
};
});
export const inboundSchema: z.ZodType<GetMetatagsRequest, z.ZodTypeDef, unknown> = z.object({
url: z.string(),
});
export type Outbound = {
url: string;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetatagsRequest> = z
.object({
url: z.string(),
})
.transform((v) => {
return {
url: v.url,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetatagsRequest> = z.object({
url: z.string(),
});
}
/** @internal */
export namespace GetMetatagsResponseBody$ {
export const inboundSchema: z.ZodType<GetMetatagsResponseBody, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<GetMetatagsResponseBody, z.ZodTypeDef, unknown> =
z.object({
title: z.nullable(z.string()),
description: z.nullable(z.string()),
image: z.nullable(z.string()),
})
.transform((v) => {
return {
title: v.title,
description: v.description,
image: v.image,
};
});
export type Outbound = {
@@ -78,17 +59,10 @@ export namespace GetMetatagsResponseBody$ {
image: string | null;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetatagsResponseBody> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetMetatagsResponseBody> =
z.object({
title: z.nullable(z.string()),
description: z.nullable(z.string()),
image: z.nullable(z.string()),
})
.transform((v) => {
return {
title: v.title,
description: v.description,
image: v.image,
};
});
}

View File

@@ -54,25 +54,14 @@ export namespace Level$ {
/** @internal */
export namespace GetQRCodeRequest$ {
export const inboundSchema: z.ZodType<GetQRCodeRequest, z.ZodTypeDef, unknown> = z
.object({
url: z.string(),
size: z.number().default(600),
level: Level$.inboundSchema.default("L"),
fgColor: z.string().default("#000000"),
bgColor: z.string().default("#FFFFFF"),
includeMargin: z.boolean().default(false),
})
.transform((v) => {
return {
url: v.url,
size: v.size,
level: v.level,
fgColor: v.fgColor,
bgColor: v.bgColor,
includeMargin: v.includeMargin,
};
});
export const inboundSchema: z.ZodType<GetQRCodeRequest, z.ZodTypeDef, unknown> = z.object({
url: z.string(),
size: z.number().default(600),
level: Level$.inboundSchema.default("L"),
fgColor: z.string().default("#000000"),
bgColor: z.string().default("#FFFFFF"),
includeMargin: z.boolean().default(false),
});
export type Outbound = {
url: string;
@@ -83,23 +72,12 @@ export namespace GetQRCodeRequest$ {
includeMargin: boolean;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetQRCodeRequest> = z
.object({
url: z.string(),
size: z.number().default(600),
level: Level$.outboundSchema.default("L"),
fgColor: z.string().default("#000000"),
bgColor: z.string().default("#FFFFFF"),
includeMargin: z.boolean().default(false),
})
.transform((v) => {
return {
url: v.url,
size: v.size,
level: v.level,
fgColor: v.fgColor,
bgColor: v.bgColor,
includeMargin: v.includeMargin,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetQRCodeRequest> = z.object({
url: z.string(),
size: z.number().default(600),
level: Level$.outboundSchema.default("L"),
fgColor: z.string().default("#000000"),
bgColor: z.string().default("#FFFFFF"),
includeMargin: z.boolean().default(false),
});
}

View File

@@ -16,34 +16,20 @@ export type GetTagsRequest = {};
/** @internal */
export namespace GetTagsGlobals$ {
export const inboundSchema: z.ZodType<GetTagsGlobals, z.ZodTypeDef, unknown> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const inboundSchema: z.ZodType<GetTagsGlobals, z.ZodTypeDef, unknown> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
export type Outbound = {
workspaceId: string;
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTagsGlobals> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetTagsGlobals> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
}
/** @internal */

View File

@@ -13,27 +13,15 @@ export type GetWorkspaceRequest = {
/** @internal */
export namespace GetWorkspaceRequest$ {
export const inboundSchema: z.ZodType<GetWorkspaceRequest, z.ZodTypeDef, unknown> = z
.object({
idOrSlug: z.string(),
})
.transform((v) => {
return {
idOrSlug: v.idOrSlug,
};
});
export const inboundSchema: z.ZodType<GetWorkspaceRequest, z.ZodTypeDef, unknown> = z.object({
idOrSlug: z.string(),
});
export type Outbound = {
idOrSlug: string;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetWorkspaceRequest> = z
.object({
idOrSlug: z.string(),
})
.transform((v) => {
return {
idOrSlug: v.idOrSlug,
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, GetWorkspaceRequest> = z.object({
idOrSlug: z.string(),
});
}

View File

@@ -16,34 +16,20 @@ export type ListDomainsRequest = {};
/** @internal */
export namespace ListDomainsGlobals$ {
export const inboundSchema: z.ZodType<ListDomainsGlobals, z.ZodTypeDef, unknown> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const inboundSchema: z.ZodType<ListDomainsGlobals, z.ZodTypeDef, unknown> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
export type Outbound = {
workspaceId: string;
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ListDomainsGlobals> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ListDomainsGlobals> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
}
/** @internal */

View File

@@ -187,16 +187,10 @@ export type RetrieveAnalyticsResponseBody =
/** @internal */
export namespace RetrieveAnalyticsGlobals$ {
export const inboundSchema: z.ZodType<RetrieveAnalyticsGlobals, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<RetrieveAnalyticsGlobals, z.ZodTypeDef, unknown> =
z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export type Outbound = {
@@ -204,16 +198,10 @@ export namespace RetrieveAnalyticsGlobals$ {
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, RetrieveAnalyticsGlobals> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, RetrieveAnalyticsGlobals> =
z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
}
@@ -237,8 +225,8 @@ export namespace Interval$ {
/** @internal */
export namespace RetrieveAnalyticsRequest$ {
export const inboundSchema: z.ZodType<RetrieveAnalyticsRequest, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<RetrieveAnalyticsRequest, z.ZodTypeDef, unknown> =
z.object({
event: Event$.inboundSchema.default("clicks"),
groupBy: QueryParamGroupBy$.inboundSchema.default("count"),
domain: z.string().optional(),
@@ -259,30 +247,6 @@ export namespace RetrieveAnalyticsRequest$ {
tagId: z.string().optional(),
qr: z.boolean().optional(),
root: z.boolean().optional(),
})
.transform((v) => {
return {
event: v.event,
groupBy: v.groupBy,
...(v.domain === undefined ? null : { domain: v.domain }),
...(v.key === undefined ? null : { key: v.key }),
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
timezone: v.timezone,
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),
...(v.browser === undefined ? null : { browser: v.browser }),
...(v.os === undefined ? null : { os: v.os }),
...(v.referer === undefined ? null : { referer: v.referer }),
...(v.url === undefined ? null : { url: v.url }),
...(v.tagId === undefined ? null : { tagId: v.tagId }),
...(v.qr === undefined ? null : { qr: v.qr }),
...(v.root === undefined ? null : { root: v.root }),
};
});
export type Outbound = {
@@ -308,8 +272,8 @@ export namespace RetrieveAnalyticsRequest$ {
root?: boolean | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, RetrieveAnalyticsRequest> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, RetrieveAnalyticsRequest> =
z.object({
event: Event$.outboundSchema.default("clicks"),
groupBy: QueryParamGroupBy$.outboundSchema.default("count"),
domain: z.string().optional(),
@@ -330,30 +294,6 @@ export namespace RetrieveAnalyticsRequest$ {
tagId: z.string().optional(),
qr: z.boolean().optional(),
root: z.boolean().optional(),
})
.transform((v) => {
return {
event: v.event,
groupBy: v.groupBy,
...(v.domain === undefined ? null : { domain: v.domain }),
...(v.key === undefined ? null : { key: v.key }),
...(v.linkId === undefined ? null : { linkId: v.linkId }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.interval === undefined ? null : { interval: v.interval }),
...(v.start === undefined ? null : { start: v.start }),
...(v.end === undefined ? null : { end: v.end }),
timezone: v.timezone,
...(v.country === undefined ? null : { country: v.country }),
...(v.city === undefined ? null : { city: v.city }),
...(v.device === undefined ? null : { device: v.device }),
...(v.browser === undefined ? null : { browser: v.browser }),
...(v.os === undefined ? null : { os: v.os }),
...(v.referer === undefined ? null : { referer: v.referer }),
...(v.url === undefined ? null : { url: v.url }),
...(v.tagId === undefined ? null : { tagId: v.tagId }),
...(v.qr === undefined ? null : { qr: v.qr }),
...(v.root === undefined ? null : { root: v.root }),
};
});
}

View File

@@ -21,16 +21,10 @@ export type SetPrimaryDomainRequest = {
/** @internal */
export namespace SetPrimaryDomainGlobals$ {
export const inboundSchema: z.ZodType<SetPrimaryDomainGlobals, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<SetPrimaryDomainGlobals, z.ZodTypeDef, unknown> =
z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export type Outbound = {
@@ -38,42 +32,26 @@ export namespace SetPrimaryDomainGlobals$ {
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SetPrimaryDomainGlobals> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SetPrimaryDomainGlobals> =
z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
}
/** @internal */
export namespace SetPrimaryDomainRequest$ {
export const inboundSchema: z.ZodType<SetPrimaryDomainRequest, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<SetPrimaryDomainRequest, z.ZodTypeDef, unknown> =
z.object({
slug: z.string(),
})
.transform((v) => {
return {
slug: v.slug,
};
});
export type Outbound = {
slug: string;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SetPrimaryDomainRequest> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, SetPrimaryDomainRequest> =
z.object({
slug: z.string(),
})
.transform((v) => {
return {
slug: v.slug,
};
});
}

View File

@@ -43,52 +43,32 @@ export type TrackCustomerResponseBody = {
/** @internal */
export namespace TrackCustomerGlobals$ {
export const inboundSchema: z.ZodType<TrackCustomerGlobals, z.ZodTypeDef, unknown> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const inboundSchema: z.ZodType<TrackCustomerGlobals, z.ZodTypeDef, unknown> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
export type Outbound = {
workspaceId: string;
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackCustomerGlobals> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackCustomerGlobals> = z.object(
{
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
}
);
}
/** @internal */
export namespace TrackCustomerRequestBody$ {
export const inboundSchema: z.ZodType<TrackCustomerRequestBody, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<TrackCustomerRequestBody, z.ZodTypeDef, unknown> =
z.object({
customerId: z.string(),
customerName: z.string().optional(),
customerEmail: z.string().optional(),
customerAvatar: z.string().optional(),
})
.transform((v) => {
return {
customerId: v.customerId,
...(v.customerName === undefined ? null : { customerName: v.customerName }),
...(v.customerEmail === undefined ? null : { customerEmail: v.customerEmail }),
...(v.customerAvatar === undefined ? null : { customerAvatar: v.customerAvatar }),
};
});
export type Outbound = {
@@ -98,39 +78,23 @@ export namespace TrackCustomerRequestBody$ {
customerAvatar?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackCustomerRequestBody> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackCustomerRequestBody> =
z.object({
customerId: z.string(),
customerName: z.string().optional(),
customerEmail: z.string().optional(),
customerAvatar: z.string().optional(),
})
.transform((v) => {
return {
customerId: v.customerId,
...(v.customerName === undefined ? null : { customerName: v.customerName }),
...(v.customerEmail === undefined ? null : { customerEmail: v.customerEmail }),
...(v.customerAvatar === undefined ? null : { customerAvatar: v.customerAvatar }),
};
});
}
/** @internal */
export namespace TrackCustomerResponseBody$ {
export const inboundSchema: z.ZodType<TrackCustomerResponseBody, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<TrackCustomerResponseBody, z.ZodTypeDef, unknown> =
z.object({
customerId: z.string(),
customerName: z.nullable(z.string()),
customerEmail: z.nullable(z.string()),
customerAvatar: z.nullable(z.string()),
})
.transform((v) => {
return {
customerId: v.customerId,
customerName: v.customerName,
customerEmail: v.customerEmail,
customerAvatar: v.customerAvatar,
};
});
export type Outbound = {
@@ -140,19 +104,11 @@ export namespace TrackCustomerResponseBody$ {
customerAvatar: string | null;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackCustomerResponseBody> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackCustomerResponseBody> =
z.object({
customerId: z.string(),
customerName: z.nullable(z.string()),
customerEmail: z.nullable(z.string()),
customerAvatar: z.nullable(z.string()),
})
.transform((v) => {
return {
customerId: v.customerId,
customerName: v.customerName,
customerEmail: v.customerEmail,
customerAvatar: v.customerAvatar,
};
});
}

View File

@@ -58,59 +58,33 @@ export type TrackLeadResponseBody = {
/** @internal */
export namespace TrackLeadGlobals$ {
export const inboundSchema: z.ZodType<TrackLeadGlobals, z.ZodTypeDef, unknown> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const inboundSchema: z.ZodType<TrackLeadGlobals, z.ZodTypeDef, unknown> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
export type Outbound = {
workspaceId: string;
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackLeadGlobals> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackLeadGlobals> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
}
/** @internal */
export namespace TrackLeadRequestBody$ {
export const inboundSchema: z.ZodType<TrackLeadRequestBody, z.ZodTypeDef, unknown> = z
.object({
clickId: z.string(),
eventName: z.string(),
customerId: z.string(),
customerName: z.nullable(z.string()).optional(),
customerEmail: z.nullable(z.string()).optional(),
customerAvatar: z.nullable(z.string()).optional(),
metadata: z.nullable(z.record(z.any())).optional(),
})
.transform((v) => {
return {
clickId: v.clickId,
eventName: v.eventName,
customerId: v.customerId,
...(v.customerName === undefined ? null : { customerName: v.customerName }),
...(v.customerEmail === undefined ? null : { customerEmail: v.customerEmail }),
...(v.customerAvatar === undefined ? null : { customerAvatar: v.customerAvatar }),
...(v.metadata === undefined ? null : { metadata: v.metadata }),
};
});
export const inboundSchema: z.ZodType<TrackLeadRequestBody, z.ZodTypeDef, unknown> = z.object({
clickId: z.string(),
eventName: z.string(),
customerId: z.string(),
customerName: z.nullable(z.string()).optional(),
customerEmail: z.nullable(z.string()).optional(),
customerAvatar: z.nullable(z.string()).optional(),
metadata: z.nullable(z.record(z.any())).optional(),
});
export type Outbound = {
clickId: string;
@@ -122,8 +96,8 @@ export namespace TrackLeadRequestBody$ {
metadata?: { [k: string]: any } | null | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackLeadRequestBody> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackLeadRequestBody> = z.object(
{
clickId: z.string(),
eventName: z.string(),
customerId: z.string(),
@@ -131,43 +105,21 @@ export namespace TrackLeadRequestBody$ {
customerEmail: z.nullable(z.string()).optional(),
customerAvatar: z.nullable(z.string()).optional(),
metadata: z.nullable(z.record(z.any())).optional(),
})
.transform((v) => {
return {
clickId: v.clickId,
eventName: v.eventName,
customerId: v.customerId,
...(v.customerName === undefined ? null : { customerName: v.customerName }),
...(v.customerEmail === undefined ? null : { customerEmail: v.customerEmail }),
...(v.customerAvatar === undefined ? null : { customerAvatar: v.customerAvatar }),
...(v.metadata === undefined ? null : { metadata: v.metadata }),
};
});
}
);
}
/** @internal */
export namespace TrackLeadResponseBody$ {
export const inboundSchema: z.ZodType<TrackLeadResponseBody, z.ZodTypeDef, unknown> = z
.object({
clickId: z.string(),
eventName: z.string(),
customerId: z.string(),
customerName: z.nullable(z.string()),
customerEmail: z.nullable(z.string()),
customerAvatar: z.nullable(z.string()),
metadata: z.record(z.any()).optional(),
})
.transform((v) => {
return {
clickId: v.clickId,
eventName: v.eventName,
customerId: v.customerId,
customerName: v.customerName,
customerEmail: v.customerEmail,
customerAvatar: v.customerAvatar,
...(v.metadata === undefined ? null : { metadata: v.metadata }),
};
});
export const inboundSchema: z.ZodType<TrackLeadResponseBody, z.ZodTypeDef, unknown> = z.object({
clickId: z.string(),
eventName: z.string(),
customerId: z.string(),
customerName: z.nullable(z.string()),
customerEmail: z.nullable(z.string()),
customerAvatar: z.nullable(z.string()),
metadata: z.record(z.any()).optional(),
});
export type Outbound = {
clickId: string;
@@ -179,8 +131,8 @@ export namespace TrackLeadResponseBody$ {
metadata?: { [k: string]: any } | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackLeadResponseBody> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackLeadResponseBody> =
z.object({
clickId: z.string(),
eventName: z.string(),
customerId: z.string(),
@@ -188,16 +140,5 @@ export namespace TrackLeadResponseBody$ {
customerEmail: z.nullable(z.string()),
customerAvatar: z.nullable(z.string()),
metadata: z.record(z.any()).optional(),
})
.transform((v) => {
return {
clickId: v.clickId,
eventName: v.eventName,
customerId: v.customerId,
customerName: v.customerName,
customerEmail: v.customerEmail,
customerAvatar: v.customerAvatar,
...(v.metadata === undefined ? null : { metadata: v.metadata }),
};
});
}

View File

@@ -67,34 +67,20 @@ export type TrackSaleResponseBody = {
/** @internal */
export namespace TrackSaleGlobals$ {
export const inboundSchema: z.ZodType<TrackSaleGlobals, z.ZodTypeDef, unknown> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const inboundSchema: z.ZodType<TrackSaleGlobals, z.ZodTypeDef, unknown> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
export type Outbound = {
workspaceId: string;
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackSaleGlobals> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackSaleGlobals> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
}
/** @internal */
@@ -105,25 +91,14 @@ export namespace PaymentProcessor$ {
/** @internal */
export namespace TrackSaleRequestBody$ {
export const inboundSchema: z.ZodType<TrackSaleRequestBody, z.ZodTypeDef, unknown> = z
.object({
customerId: z.string(),
amount: z.number().int(),
paymentProcessor: PaymentProcessor$.inboundSchema,
invoiceId: z.nullable(z.string()).default(null),
currency: z.string().default("usd"),
metadata: z.nullable(z.record(z.any())).optional(),
})
.transform((v) => {
return {
customerId: v.customerId,
amount: v.amount,
paymentProcessor: v.paymentProcessor,
invoiceId: v.invoiceId,
currency: v.currency,
...(v.metadata === undefined ? null : { metadata: v.metadata }),
};
});
export const inboundSchema: z.ZodType<TrackSaleRequestBody, z.ZodTypeDef, unknown> = z.object({
customerId: z.string(),
amount: z.number().int(),
paymentProcessor: PaymentProcessor$.inboundSchema,
invoiceId: z.nullable(z.string()).default(null),
currency: z.string().default("usd"),
metadata: z.nullable(z.record(z.any())).optional(),
});
export type Outbound = {
customerId: string;
@@ -134,48 +109,28 @@ export namespace TrackSaleRequestBody$ {
metadata?: { [k: string]: any } | null | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackSaleRequestBody> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackSaleRequestBody> = z.object(
{
customerId: z.string(),
amount: z.number().int(),
paymentProcessor: PaymentProcessor$.outboundSchema,
invoiceId: z.nullable(z.string()).default(null),
currency: z.string().default("usd"),
metadata: z.nullable(z.record(z.any())).optional(),
})
.transform((v) => {
return {
customerId: v.customerId,
amount: v.amount,
paymentProcessor: v.paymentProcessor,
invoiceId: v.invoiceId,
currency: v.currency,
...(v.metadata === undefined ? null : { metadata: v.metadata }),
};
});
}
);
}
/** @internal */
export namespace TrackSaleResponseBody$ {
export const inboundSchema: z.ZodType<TrackSaleResponseBody, z.ZodTypeDef, unknown> = z
.object({
customerId: z.string(),
amount: z.number(),
paymentProcessor: z.string(),
invoiceId: z.nullable(z.string()),
currency: z.string(),
metadata: z.nullable(z.record(z.any())),
})
.transform((v) => {
return {
customerId: v.customerId,
amount: v.amount,
paymentProcessor: v.paymentProcessor,
invoiceId: v.invoiceId,
currency: v.currency,
metadata: v.metadata,
};
});
export const inboundSchema: z.ZodType<TrackSaleResponseBody, z.ZodTypeDef, unknown> = z.object({
customerId: z.string(),
amount: z.number(),
paymentProcessor: z.string(),
invoiceId: z.nullable(z.string()),
currency: z.string(),
metadata: z.nullable(z.record(z.any())),
});
export type Outbound = {
customerId: string;
@@ -186,23 +141,13 @@ export namespace TrackSaleResponseBody$ {
metadata: { [k: string]: any } | null;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackSaleResponseBody> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TrackSaleResponseBody> =
z.object({
customerId: z.string(),
amount: z.number(),
paymentProcessor: z.string(),
invoiceId: z.nullable(z.string()),
currency: z.string(),
metadata: z.nullable(z.record(z.any())),
})
.transform((v) => {
return {
customerId: v.customerId,
amount: v.amount,
paymentProcessor: v.paymentProcessor,
invoiceId: v.invoiceId,
currency: v.currency,
metadata: v.metadata,
};
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as z from "zod";
export type TransferDomainGlobals = {
@@ -29,60 +30,37 @@ export type TransferDomainRequest = {
/** @internal */
export namespace TransferDomainGlobals$ {
export const inboundSchema: z.ZodType<TransferDomainGlobals, z.ZodTypeDef, unknown> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const inboundSchema: z.ZodType<TransferDomainGlobals, z.ZodTypeDef, unknown> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
export type Outbound = {
workspaceId: string;
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TransferDomainGlobals> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TransferDomainGlobals> =
z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
}
/** @internal */
export namespace TransferDomainRequestBody$ {
export const inboundSchema: z.ZodType<TransferDomainRequestBody, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<TransferDomainRequestBody, z.ZodTypeDef, unknown> =
z.object({
newWorkspaceId: z.string(),
})
.transform((v) => {
return {
newWorkspaceId: v.newWorkspaceId,
};
});
export type Outbound = {
newWorkspaceId: string;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TransferDomainRequestBody> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, TransferDomainRequestBody> =
z.object({
newWorkspaceId: z.string(),
})
.transform((v) => {
return {
newWorkspaceId: v.newWorkspaceId,
};
});
}
@@ -94,10 +72,9 @@ export namespace TransferDomainRequest$ {
RequestBody: z.lazy(() => TransferDomainRequestBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
slug: v.slug,
...(v.RequestBody === undefined ? null : { requestBody: v.RequestBody }),
};
return remap$(v, {
RequestBody: "requestBody",
});
});
export type Outbound = {
@@ -111,9 +88,8 @@ export namespace TransferDomainRequest$ {
requestBody: z.lazy(() => TransferDomainRequestBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
slug: v.slug,
...(v.requestBody === undefined ? null : { RequestBody: v.requestBody }),
};
return remap$(v, {
requestBody: "RequestBody",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import { ClosedEnum } from "../../types";
import * as z from "zod";
@@ -66,34 +67,20 @@ export type UpdateDomainRequest = {
/** @internal */
export namespace UpdateDomainGlobals$ {
export const inboundSchema: z.ZodType<UpdateDomainGlobals, z.ZodTypeDef, unknown> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const inboundSchema: z.ZodType<UpdateDomainGlobals, z.ZodTypeDef, unknown> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
export type Outbound = {
workspaceId: string;
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateDomainGlobals> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateDomainGlobals> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
}
/** @internal */
@@ -104,8 +91,8 @@ export namespace UpdateDomainType$ {
/** @internal */
export namespace UpdateDomainRequestBody$ {
export const inboundSchema: z.ZodType<UpdateDomainRequestBody, z.ZodTypeDef, unknown> = z
.object({
export const inboundSchema: z.ZodType<UpdateDomainRequestBody, z.ZodTypeDef, unknown> =
z.object({
slug: z.string().optional(),
type: UpdateDomainType$.inboundSchema.default("redirect"),
target: z.nullable(z.string()).optional(),
@@ -113,17 +100,6 @@ export namespace UpdateDomainRequestBody$ {
archived: z.boolean().default(false),
noindex: z.boolean().optional(),
placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")),
})
.transform((v) => {
return {
...(v.slug === undefined ? null : { slug: v.slug }),
type: v.type,
...(v.target === undefined ? null : { target: v.target }),
...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }),
archived: v.archived,
...(v.noindex === undefined ? null : { noindex: v.noindex }),
placeholder: v.placeholder,
};
});
export type Outbound = {
@@ -136,8 +112,8 @@ export namespace UpdateDomainRequestBody$ {
placeholder: string | null;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateDomainRequestBody> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateDomainRequestBody> =
z.object({
slug: z.string().optional(),
type: UpdateDomainType$.outboundSchema.default("redirect"),
target: z.nullable(z.string()).optional(),
@@ -145,17 +121,6 @@ export namespace UpdateDomainRequestBody$ {
archived: z.boolean().default(false),
noindex: z.boolean().optional(),
placeholder: z.nullable(z.string().default("https://dub.co/help/article/what-is-dub")),
})
.transform((v) => {
return {
...(v.slug === undefined ? null : { slug: v.slug }),
type: v.type,
...(v.target === undefined ? null : { target: v.target }),
...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }),
archived: v.archived,
...(v.noindex === undefined ? null : { noindex: v.noindex }),
placeholder: v.placeholder,
};
});
}
@@ -167,10 +132,9 @@ export namespace UpdateDomainRequest$ {
RequestBody: z.lazy(() => UpdateDomainRequestBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
slug: v.slug,
...(v.RequestBody === undefined ? null : { requestBody: v.RequestBody }),
};
return remap$(v, {
RequestBody: "requestBody",
});
});
export type Outbound = {
@@ -184,9 +148,8 @@ export namespace UpdateDomainRequest$ {
requestBody: z.lazy(() => UpdateDomainRequestBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
slug: v.slug,
...(v.requestBody === undefined ? null : { RequestBody: v.requestBody }),
};
return remap$(v, {
requestBody: "RequestBody",
});
});
}

View File

@@ -2,6 +2,7 @@
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../lib/primitives";
import * as components from "../components";
import * as z from "zod";
@@ -130,34 +131,20 @@ export type UpdateLinkRequest = {
/** @internal */
export namespace UpdateLinkGlobals$ {
export const inboundSchema: z.ZodType<UpdateLinkGlobals, z.ZodTypeDef, unknown> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const inboundSchema: z.ZodType<UpdateLinkGlobals, z.ZodTypeDef, unknown> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
export type Outbound = {
workspaceId: string;
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateLinkGlobals> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateLinkGlobals> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
}
/** @internal */
@@ -190,59 +177,31 @@ export namespace UpdateLinkTagNames$ {
/** @internal */
export namespace UpdateLinkRequestBody$ {
export const inboundSchema: z.ZodType<UpdateLinkRequestBody, z.ZodTypeDef, unknown> = z
.object({
url: z.string(),
domain: z.string().optional(),
key: z.string().optional(),
externalId: z.nullable(z.string()).optional(),
prefix: z.string().optional(),
trackConversion: z.boolean().default(false),
archived: z.boolean().default(false),
publicStats: z.boolean().default(false),
tagId: z.nullable(z.string()).optional(),
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
comments: z.nullable(z.string()).optional(),
expiresAt: z.nullable(z.string()).optional(),
expiredUrl: z.nullable(z.string()).optional(),
password: z.nullable(z.string()).optional(),
proxy: z.boolean().default(false),
title: z.nullable(z.string()).optional(),
description: z.nullable(z.string()).optional(),
image: z.nullable(z.string()).optional(),
rewrite: z.boolean().default(false),
ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(),
})
.transform((v) => {
return {
url: v.url,
...(v.domain === undefined ? null : { domain: v.domain }),
...(v.key === undefined ? null : { key: v.key }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.prefix === undefined ? null : { prefix: v.prefix }),
trackConversion: v.trackConversion,
archived: v.archived,
publicStats: v.publicStats,
...(v.tagId === undefined ? null : { tagId: v.tagId }),
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
...(v.comments === undefined ? null : { comments: v.comments }),
...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }),
...(v.password === undefined ? null : { password: v.password }),
proxy: v.proxy,
...(v.title === undefined ? null : { title: v.title }),
...(v.description === undefined ? null : { description: v.description }),
...(v.image === undefined ? null : { image: v.image }),
rewrite: v.rewrite,
...(v.ios === undefined ? null : { ios: v.ios }),
...(v.android === undefined ? null : { android: v.android }),
...(v.geo === undefined ? null : { geo: v.geo }),
};
});
export const inboundSchema: z.ZodType<UpdateLinkRequestBody, z.ZodTypeDef, unknown> = z.object({
url: z.string(),
domain: z.string().optional(),
key: z.string().optional(),
externalId: z.nullable(z.string()).optional(),
prefix: z.string().optional(),
trackConversion: z.boolean().default(false),
archived: z.boolean().default(false),
publicStats: z.boolean().default(false),
tagId: z.nullable(z.string()).optional(),
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
comments: z.nullable(z.string()).optional(),
expiresAt: z.nullable(z.string()).optional(),
expiredUrl: z.nullable(z.string()).optional(),
password: z.nullable(z.string()).optional(),
proxy: z.boolean().default(false),
title: z.nullable(z.string()).optional(),
description: z.nullable(z.string()).optional(),
image: z.nullable(z.string()).optional(),
rewrite: z.boolean().default(false),
ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(),
});
export type Outbound = {
url: string;
@@ -270,8 +229,8 @@ export namespace UpdateLinkRequestBody$ {
geo?: components.LinkGeoTargeting$.Outbound | null | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateLinkRequestBody> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpdateLinkRequestBody> =
z.object({
url: z.string(),
domain: z.string().optional(),
key: z.string().optional(),
@@ -295,33 +254,6 @@ export namespace UpdateLinkRequestBody$ {
ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(),
})
.transform((v) => {
return {
url: v.url,
...(v.domain === undefined ? null : { domain: v.domain }),
...(v.key === undefined ? null : { key: v.key }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.prefix === undefined ? null : { prefix: v.prefix }),
trackConversion: v.trackConversion,
archived: v.archived,
publicStats: v.publicStats,
...(v.tagId === undefined ? null : { tagId: v.tagId }),
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
...(v.comments === undefined ? null : { comments: v.comments }),
...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }),
...(v.password === undefined ? null : { password: v.password }),
proxy: v.proxy,
...(v.title === undefined ? null : { title: v.title }),
...(v.description === undefined ? null : { description: v.description }),
...(v.image === undefined ? null : { image: v.image }),
rewrite: v.rewrite,
...(v.ios === undefined ? null : { ios: v.ios }),
...(v.android === undefined ? null : { android: v.android }),
...(v.geo === undefined ? null : { geo: v.geo }),
};
});
}
@@ -333,10 +265,9 @@ export namespace UpdateLinkRequest$ {
RequestBody: z.lazy(() => UpdateLinkRequestBody$.inboundSchema).optional(),
})
.transform((v) => {
return {
linkId: v.linkId,
...(v.RequestBody === undefined ? null : { requestBody: v.RequestBody }),
};
return remap$(v, {
RequestBody: "requestBody",
});
});
export type Outbound = {
@@ -350,9 +281,8 @@ export namespace UpdateLinkRequest$ {
requestBody: z.lazy(() => UpdateLinkRequestBody$.outboundSchema).optional(),
})
.transform((v) => {
return {
linkId: v.linkId,
...(v.requestBody === undefined ? null : { RequestBody: v.requestBody }),
};
return remap$(v, {
requestBody: "RequestBody",
});
});
}

View File

@@ -122,34 +122,20 @@ export type UpsertLinkRequestBody = {
/** @internal */
export namespace UpsertLinkGlobals$ {
export const inboundSchema: z.ZodType<UpsertLinkGlobals, z.ZodTypeDef, unknown> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const inboundSchema: z.ZodType<UpsertLinkGlobals, z.ZodTypeDef, unknown> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
export type Outbound = {
workspaceId: string;
projectSlug?: string | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpsertLinkGlobals> = z
.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
})
.transform((v) => {
return {
workspaceId: v.workspaceId,
...(v.projectSlug === undefined ? null : { projectSlug: v.projectSlug }),
};
});
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpsertLinkGlobals> = z.object({
workspaceId: z.string(),
projectSlug: z.string().optional(),
});
}
/** @internal */
@@ -182,59 +168,31 @@ export namespace UpsertLinkTagNames$ {
/** @internal */
export namespace UpsertLinkRequestBody$ {
export const inboundSchema: z.ZodType<UpsertLinkRequestBody, z.ZodTypeDef, unknown> = z
.object({
url: z.string(),
domain: z.string().optional(),
key: z.string().optional(),
externalId: z.nullable(z.string()).optional(),
prefix: z.string().optional(),
trackConversion: z.boolean().default(false),
archived: z.boolean().default(false),
publicStats: z.boolean().default(false),
tagId: z.nullable(z.string()).optional(),
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
comments: z.nullable(z.string()).optional(),
expiresAt: z.nullable(z.string()).optional(),
expiredUrl: z.nullable(z.string()).optional(),
password: z.nullable(z.string()).optional(),
proxy: z.boolean().default(false),
title: z.nullable(z.string()).optional(),
description: z.nullable(z.string()).optional(),
image: z.nullable(z.string()).optional(),
rewrite: z.boolean().default(false),
ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(),
})
.transform((v) => {
return {
url: v.url,
...(v.domain === undefined ? null : { domain: v.domain }),
...(v.key === undefined ? null : { key: v.key }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.prefix === undefined ? null : { prefix: v.prefix }),
trackConversion: v.trackConversion,
archived: v.archived,
publicStats: v.publicStats,
...(v.tagId === undefined ? null : { tagId: v.tagId }),
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
...(v.comments === undefined ? null : { comments: v.comments }),
...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }),
...(v.password === undefined ? null : { password: v.password }),
proxy: v.proxy,
...(v.title === undefined ? null : { title: v.title }),
...(v.description === undefined ? null : { description: v.description }),
...(v.image === undefined ? null : { image: v.image }),
rewrite: v.rewrite,
...(v.ios === undefined ? null : { ios: v.ios }),
...(v.android === undefined ? null : { android: v.android }),
...(v.geo === undefined ? null : { geo: v.geo }),
};
});
export const inboundSchema: z.ZodType<UpsertLinkRequestBody, z.ZodTypeDef, unknown> = z.object({
url: z.string(),
domain: z.string().optional(),
key: z.string().optional(),
externalId: z.nullable(z.string()).optional(),
prefix: z.string().optional(),
trackConversion: z.boolean().default(false),
archived: z.boolean().default(false),
publicStats: z.boolean().default(false),
tagId: z.nullable(z.string()).optional(),
tagIds: z.union([z.string(), z.array(z.string())]).optional(),
tagNames: z.union([z.string(), z.array(z.string())]).optional(),
comments: z.nullable(z.string()).optional(),
expiresAt: z.nullable(z.string()).optional(),
expiredUrl: z.nullable(z.string()).optional(),
password: z.nullable(z.string()).optional(),
proxy: z.boolean().default(false),
title: z.nullable(z.string()).optional(),
description: z.nullable(z.string()).optional(),
image: z.nullable(z.string()).optional(),
rewrite: z.boolean().default(false),
ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.inboundSchema).optional(),
});
export type Outbound = {
url: string;
@@ -262,8 +220,8 @@ export namespace UpsertLinkRequestBody$ {
geo?: components.LinkGeoTargeting$.Outbound | null | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpsertLinkRequestBody> = z
.object({
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, UpsertLinkRequestBody> =
z.object({
url: z.string(),
domain: z.string().optional(),
key: z.string().optional(),
@@ -287,32 +245,5 @@ export namespace UpsertLinkRequestBody$ {
ios: z.nullable(z.string()).optional(),
android: z.nullable(z.string()).optional(),
geo: z.nullable(components.LinkGeoTargeting$.outboundSchema).optional(),
})
.transform((v) => {
return {
url: v.url,
...(v.domain === undefined ? null : { domain: v.domain }),
...(v.key === undefined ? null : { key: v.key }),
...(v.externalId === undefined ? null : { externalId: v.externalId }),
...(v.prefix === undefined ? null : { prefix: v.prefix }),
trackConversion: v.trackConversion,
archived: v.archived,
publicStats: v.publicStats,
...(v.tagId === undefined ? null : { tagId: v.tagId }),
...(v.tagIds === undefined ? null : { tagIds: v.tagIds }),
...(v.tagNames === undefined ? null : { tagNames: v.tagNames }),
...(v.comments === undefined ? null : { comments: v.comments }),
...(v.expiresAt === undefined ? null : { expiresAt: v.expiresAt }),
...(v.expiredUrl === undefined ? null : { expiredUrl: v.expiredUrl }),
...(v.password === undefined ? null : { password: v.password }),
proxy: v.proxy,
...(v.title === undefined ? null : { title: v.title }),
...(v.description === undefined ? null : { description: v.description }),
...(v.image === undefined ? null : { image: v.image }),
rewrite: v.rewrite,
...(v.ios === undefined ? null : { ios: v.ios }),
...(v.android === undefined ? null : { android: v.android }),
...(v.geo === undefined ? null : { geo: v.geo }),
};
});
}