attio-js
Version:
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
1,287 lines (1,163 loc) • 43.1 kB
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { ClosedEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
export type GetV2WebhooksWebhookIdRequest = {
webhookId: string;
};
/**
* Type of event the webhook is subscribed to.
*/
export const GetV2WebhooksWebhookIdEventType = {
CommentCreated: "comment.created",
CommentResolved: "comment.resolved",
CommentUnresolved: "comment.unresolved",
CommentDeleted: "comment.deleted",
ListCreated: "list.created",
ListUpdated: "list.updated",
ListDeleted: "list.deleted",
ListAttributeCreated: "list-attribute.created",
ListAttributeUpdated: "list-attribute.updated",
ListEntryCreated: "list-entry.created",
ListEntryUpdated: "list-entry.updated",
ListEntryDeleted: "list-entry.deleted",
ObjectAttributeCreated: "object-attribute.created",
ObjectAttributeUpdated: "object-attribute.updated",
NoteCreated: "note.created",
NoteUpdated: "note.updated",
NoteDeleted: "note.deleted",
RecordCreated: "record.created",
RecordMerged: "record.merged",
RecordUpdated: "record.updated",
RecordDeleted: "record.deleted",
TaskCreated: "task.created",
TaskUpdated: "task.updated",
TaskDeleted: "task.deleted",
WorkspaceMemberCreated: "workspace-member.created",
} as const;
/**
* Type of event the webhook is subscribed to.
*/
export type GetV2WebhooksWebhookIdEventType = ClosedEnum<
typeof GetV2WebhooksWebhookIdEventType
>;
export const GetV2WebhooksWebhookIdDollarAndOperatorNotEquals = {
NotEquals: "not_equals",
} as const;
export type GetV2WebhooksWebhookIdDollarAndOperatorNotEquals = ClosedEnum<
typeof GetV2WebhooksWebhookIdDollarAndOperatorNotEquals
>;
export type GetV2WebhooksWebhookIdDollarAndNotEquals = {
field: string;
operator: GetV2WebhooksWebhookIdDollarAndOperatorNotEquals;
value: string;
};
export const GetV2WebhooksWebhookIdDollarAndOperatorEquals = {
Equals: "equals",
} as const;
export type GetV2WebhooksWebhookIdDollarAndOperatorEquals = ClosedEnum<
typeof GetV2WebhooksWebhookIdDollarAndOperatorEquals
>;
export type GetV2WebhooksWebhookIdDollarAndEquals = {
field: string;
operator: GetV2WebhooksWebhookIdDollarAndOperatorEquals;
value: string;
};
export type GetV2WebhooksWebhookIdDollarAndUnion =
| GetV2WebhooksWebhookIdDollarAndEquals
| GetV2WebhooksWebhookIdDollarAndNotEquals;
export type GetV2WebhooksWebhookIdFilter2 = {
dollarAnd: Array<
| GetV2WebhooksWebhookIdDollarAndEquals
| GetV2WebhooksWebhookIdDollarAndNotEquals
>;
};
export const GetV2WebhooksWebhookIdDollarOrOperatorNotEquals = {
NotEquals: "not_equals",
} as const;
export type GetV2WebhooksWebhookIdDollarOrOperatorNotEquals = ClosedEnum<
typeof GetV2WebhooksWebhookIdDollarOrOperatorNotEquals
>;
export type GetV2WebhooksWebhookIdDollarOrNotEquals = {
field: string;
operator: GetV2WebhooksWebhookIdDollarOrOperatorNotEquals;
value: string;
};
export const GetV2WebhooksWebhookIdDollarOrOperatorEquals = {
Equals: "equals",
} as const;
export type GetV2WebhooksWebhookIdDollarOrOperatorEquals = ClosedEnum<
typeof GetV2WebhooksWebhookIdDollarOrOperatorEquals
>;
export type GetV2WebhooksWebhookIdDollarOrEquals = {
field: string;
operator: GetV2WebhooksWebhookIdDollarOrOperatorEquals;
value: string;
};
export type GetV2WebhooksWebhookIdDollarOrUnion =
| GetV2WebhooksWebhookIdDollarOrEquals
| GetV2WebhooksWebhookIdDollarOrNotEquals;
export type GetV2WebhooksWebhookIdFilter1 = {
dollarOr: Array<
| GetV2WebhooksWebhookIdDollarOrEquals
| GetV2WebhooksWebhookIdDollarOrNotEquals
>;
};
/**
* Filters to determine whether the webhook event should be sent. If null, the filter always passes.
*/
export type GetV2WebhooksWebhookIdFilterUnion =
| GetV2WebhooksWebhookIdFilter1
| GetV2WebhooksWebhookIdFilter2;
export type GetV2WebhooksWebhookIdSubscription = {
/**
* Type of event the webhook is subscribed to.
*/
eventType: GetV2WebhooksWebhookIdEventType;
/**
* Filters to determine whether the webhook event should be sent. If null, the filter always passes.
*/
filter: GetV2WebhooksWebhookIdFilter1 | GetV2WebhooksWebhookIdFilter2 | null;
};
export type GetV2WebhooksWebhookIdId = {
/**
* The ID of the workspace the webhook belongs to.
*/
workspaceId: string;
/**
* The ID of the webhook.
*/
webhookId: string;
};
/**
* The state of the webhook. Webhooks marked as active and degraded will receive events, inactive ones will not. If a webhook remains in the degraded state for 7 days, it will be marked inactive.
*/
export const GetV2WebhooksWebhookIdStatus = {
Active: "active",
Degraded: "degraded",
Inactive: "inactive",
} as const;
/**
* The state of the webhook. Webhooks marked as active and degraded will receive events, inactive ones will not. If a webhook remains in the degraded state for 7 days, it will be marked inactive.
*/
export type GetV2WebhooksWebhookIdStatus = ClosedEnum<
typeof GetV2WebhooksWebhookIdStatus
>;
export type GetV2WebhooksWebhookIdData = {
/**
* URL where the webhook events will be delivered to.
*/
targetUrl: string;
/**
* One or more events the webhook is subscribed to.
*/
subscriptions: Array<GetV2WebhooksWebhookIdSubscription>;
id: GetV2WebhooksWebhookIdId;
/**
* The state of the webhook. Webhooks marked as active and degraded will receive events, inactive ones will not. If a webhook remains in the degraded state for 7 days, it will be marked inactive.
*/
status: GetV2WebhooksWebhookIdStatus;
/**
* When the webhook was created.
*/
createdAt: string;
};
/**
* Success
*/
export type GetV2WebhooksWebhookIdResponse = {
data: GetV2WebhooksWebhookIdData;
};
/** @internal */
export const GetV2WebhooksWebhookIdRequest$inboundSchema: z.ZodType<
GetV2WebhooksWebhookIdRequest,
z.ZodTypeDef,
unknown
> = z.object({
webhook_id: z.string(),
}).transform((v) => {
return remap$(v, {
"webhook_id": "webhookId",
});
});
/** @internal */
export type GetV2WebhooksWebhookIdRequest$Outbound = {
webhook_id: string;
};
/** @internal */
export const GetV2WebhooksWebhookIdRequest$outboundSchema: z.ZodType<
GetV2WebhooksWebhookIdRequest$Outbound,
z.ZodTypeDef,
GetV2WebhooksWebhookIdRequest
> = z.object({
webhookId: z.string(),
}).transform((v) => {
return remap$(v, {
webhookId: "webhook_id",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdRequest$ {
/** @deprecated use `GetV2WebhooksWebhookIdRequest$inboundSchema` instead. */
export const inboundSchema = GetV2WebhooksWebhookIdRequest$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdRequest$outboundSchema` instead. */
export const outboundSchema = GetV2WebhooksWebhookIdRequest$outboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdRequest$Outbound` instead. */
export type Outbound = GetV2WebhooksWebhookIdRequest$Outbound;
}
export function getV2WebhooksWebhookIdRequestToJSON(
getV2WebhooksWebhookIdRequest: GetV2WebhooksWebhookIdRequest,
): string {
return JSON.stringify(
GetV2WebhooksWebhookIdRequest$outboundSchema.parse(
getV2WebhooksWebhookIdRequest,
),
);
}
export function getV2WebhooksWebhookIdRequestFromJSON(
jsonString: string,
): SafeParseResult<GetV2WebhooksWebhookIdRequest, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetV2WebhooksWebhookIdRequest$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetV2WebhooksWebhookIdRequest' from JSON`,
);
}
/** @internal */
export const GetV2WebhooksWebhookIdEventType$inboundSchema: z.ZodNativeEnum<
typeof GetV2WebhooksWebhookIdEventType
> = z.nativeEnum(GetV2WebhooksWebhookIdEventType);
/** @internal */
export const GetV2WebhooksWebhookIdEventType$outboundSchema: z.ZodNativeEnum<
typeof GetV2WebhooksWebhookIdEventType
> = GetV2WebhooksWebhookIdEventType$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdEventType$ {
/** @deprecated use `GetV2WebhooksWebhookIdEventType$inboundSchema` instead. */
export const inboundSchema = GetV2WebhooksWebhookIdEventType$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdEventType$outboundSchema` instead. */
export const outboundSchema = GetV2WebhooksWebhookIdEventType$outboundSchema;
}
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$inboundSchema:
z.ZodNativeEnum<typeof GetV2WebhooksWebhookIdDollarAndOperatorNotEquals> = z
.nativeEnum(GetV2WebhooksWebhookIdDollarAndOperatorNotEquals);
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$outboundSchema:
z.ZodNativeEnum<typeof GetV2WebhooksWebhookIdDollarAndOperatorNotEquals> =
GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$ {
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$inboundSchema` instead. */
export const inboundSchema =
GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$outboundSchema` instead. */
export const outboundSchema =
GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$outboundSchema;
}
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndNotEquals$inboundSchema: z.ZodType<
GetV2WebhooksWebhookIdDollarAndNotEquals,
z.ZodTypeDef,
unknown
> = z.object({
field: z.string(),
operator: GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$inboundSchema,
value: z.string(),
});
/** @internal */
export type GetV2WebhooksWebhookIdDollarAndNotEquals$Outbound = {
field: string;
operator: string;
value: string;
};
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndNotEquals$outboundSchema: z.ZodType<
GetV2WebhooksWebhookIdDollarAndNotEquals$Outbound,
z.ZodTypeDef,
GetV2WebhooksWebhookIdDollarAndNotEquals
> = z.object({
field: z.string(),
operator: GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$outboundSchema,
value: z.string(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdDollarAndNotEquals$ {
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndNotEquals$inboundSchema` instead. */
export const inboundSchema =
GetV2WebhooksWebhookIdDollarAndNotEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndNotEquals$outboundSchema` instead. */
export const outboundSchema =
GetV2WebhooksWebhookIdDollarAndNotEquals$outboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndNotEquals$Outbound` instead. */
export type Outbound = GetV2WebhooksWebhookIdDollarAndNotEquals$Outbound;
}
export function getV2WebhooksWebhookIdDollarAndNotEqualsToJSON(
getV2WebhooksWebhookIdDollarAndNotEquals:
GetV2WebhooksWebhookIdDollarAndNotEquals,
): string {
return JSON.stringify(
GetV2WebhooksWebhookIdDollarAndNotEquals$outboundSchema.parse(
getV2WebhooksWebhookIdDollarAndNotEquals,
),
);
}
export function getV2WebhooksWebhookIdDollarAndNotEqualsFromJSON(
jsonString: string,
): SafeParseResult<
GetV2WebhooksWebhookIdDollarAndNotEquals,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetV2WebhooksWebhookIdDollarAndNotEquals$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetV2WebhooksWebhookIdDollarAndNotEquals' from JSON`,
);
}
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndOperatorEquals$inboundSchema:
z.ZodNativeEnum<typeof GetV2WebhooksWebhookIdDollarAndOperatorEquals> = z
.nativeEnum(GetV2WebhooksWebhookIdDollarAndOperatorEquals);
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndOperatorEquals$outboundSchema:
z.ZodNativeEnum<typeof GetV2WebhooksWebhookIdDollarAndOperatorEquals> =
GetV2WebhooksWebhookIdDollarAndOperatorEquals$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdDollarAndOperatorEquals$ {
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndOperatorEquals$inboundSchema` instead. */
export const inboundSchema =
GetV2WebhooksWebhookIdDollarAndOperatorEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndOperatorEquals$outboundSchema` instead. */
export const outboundSchema =
GetV2WebhooksWebhookIdDollarAndOperatorEquals$outboundSchema;
}
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndEquals$inboundSchema: z.ZodType<
GetV2WebhooksWebhookIdDollarAndEquals,
z.ZodTypeDef,
unknown
> = z.object({
field: z.string(),
operator: GetV2WebhooksWebhookIdDollarAndOperatorEquals$inboundSchema,
value: z.string(),
});
/** @internal */
export type GetV2WebhooksWebhookIdDollarAndEquals$Outbound = {
field: string;
operator: string;
value: string;
};
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndEquals$outboundSchema: z.ZodType<
GetV2WebhooksWebhookIdDollarAndEquals$Outbound,
z.ZodTypeDef,
GetV2WebhooksWebhookIdDollarAndEquals
> = z.object({
field: z.string(),
operator: GetV2WebhooksWebhookIdDollarAndOperatorEquals$outboundSchema,
value: z.string(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdDollarAndEquals$ {
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndEquals$inboundSchema` instead. */
export const inboundSchema =
GetV2WebhooksWebhookIdDollarAndEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndEquals$outboundSchema` instead. */
export const outboundSchema =
GetV2WebhooksWebhookIdDollarAndEquals$outboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndEquals$Outbound` instead. */
export type Outbound = GetV2WebhooksWebhookIdDollarAndEquals$Outbound;
}
export function getV2WebhooksWebhookIdDollarAndEqualsToJSON(
getV2WebhooksWebhookIdDollarAndEquals: GetV2WebhooksWebhookIdDollarAndEquals,
): string {
return JSON.stringify(
GetV2WebhooksWebhookIdDollarAndEquals$outboundSchema.parse(
getV2WebhooksWebhookIdDollarAndEquals,
),
);
}
export function getV2WebhooksWebhookIdDollarAndEqualsFromJSON(
jsonString: string,
): SafeParseResult<GetV2WebhooksWebhookIdDollarAndEquals, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetV2WebhooksWebhookIdDollarAndEquals$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetV2WebhooksWebhookIdDollarAndEquals' from JSON`,
);
}
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndUnion$inboundSchema: z.ZodType<
GetV2WebhooksWebhookIdDollarAndUnion,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetV2WebhooksWebhookIdDollarAndEquals$inboundSchema),
z.lazy(() => GetV2WebhooksWebhookIdDollarAndNotEquals$inboundSchema),
]);
/** @internal */
export type GetV2WebhooksWebhookIdDollarAndUnion$Outbound =
| GetV2WebhooksWebhookIdDollarAndEquals$Outbound
| GetV2WebhooksWebhookIdDollarAndNotEquals$Outbound;
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndUnion$outboundSchema: z.ZodType<
GetV2WebhooksWebhookIdDollarAndUnion$Outbound,
z.ZodTypeDef,
GetV2WebhooksWebhookIdDollarAndUnion
> = z.union([
z.lazy(() => GetV2WebhooksWebhookIdDollarAndEquals$outboundSchema),
z.lazy(() => GetV2WebhooksWebhookIdDollarAndNotEquals$outboundSchema),
]);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdDollarAndUnion$ {
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndUnion$inboundSchema` instead. */
export const inboundSchema =
GetV2WebhooksWebhookIdDollarAndUnion$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndUnion$outboundSchema` instead. */
export const outboundSchema =
GetV2WebhooksWebhookIdDollarAndUnion$outboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndUnion$Outbound` instead. */
export type Outbound = GetV2WebhooksWebhookIdDollarAndUnion$Outbound;
}
export function getV2WebhooksWebhookIdDollarAndUnionToJSON(
getV2WebhooksWebhookIdDollarAndUnion: GetV2WebhooksWebhookIdDollarAndUnion,
): string {
return JSON.stringify(
GetV2WebhooksWebhookIdDollarAndUnion$outboundSchema.parse(
getV2WebhooksWebhookIdDollarAndUnion,
),
);
}
export function getV2WebhooksWebhookIdDollarAndUnionFromJSON(
jsonString: string,
): SafeParseResult<GetV2WebhooksWebhookIdDollarAndUnion, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetV2WebhooksWebhookIdDollarAndUnion$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetV2WebhooksWebhookIdDollarAndUnion' from JSON`,
);
}
/** @internal */
export const GetV2WebhooksWebhookIdFilter2$inboundSchema: z.ZodType<
GetV2WebhooksWebhookIdFilter2,
z.ZodTypeDef,
unknown
> = z.object({
$and: z.array(
z.union([
z.lazy(() => GetV2WebhooksWebhookIdDollarAndEquals$inboundSchema),
z.lazy(() => GetV2WebhooksWebhookIdDollarAndNotEquals$inboundSchema),
]),
),
}).transform((v) => {
return remap$(v, {
"$and": "dollarAnd",
});
});
/** @internal */
export type GetV2WebhooksWebhookIdFilter2$Outbound = {
$and: Array<
| GetV2WebhooksWebhookIdDollarAndEquals$Outbound
| GetV2WebhooksWebhookIdDollarAndNotEquals$Outbound
>;
};
/** @internal */
export const GetV2WebhooksWebhookIdFilter2$outboundSchema: z.ZodType<
GetV2WebhooksWebhookIdFilter2$Outbound,
z.ZodTypeDef,
GetV2WebhooksWebhookIdFilter2
> = z.object({
dollarAnd: z.array(
z.union([
z.lazy(() => GetV2WebhooksWebhookIdDollarAndEquals$outboundSchema),
z.lazy(() => GetV2WebhooksWebhookIdDollarAndNotEquals$outboundSchema),
]),
),
}).transform((v) => {
return remap$(v, {
dollarAnd: "$and",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdFilter2$ {
/** @deprecated use `GetV2WebhooksWebhookIdFilter2$inboundSchema` instead. */
export const inboundSchema = GetV2WebhooksWebhookIdFilter2$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdFilter2$outboundSchema` instead. */
export const outboundSchema = GetV2WebhooksWebhookIdFilter2$outboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdFilter2$Outbound` instead. */
export type Outbound = GetV2WebhooksWebhookIdFilter2$Outbound;
}
export function getV2WebhooksWebhookIdFilter2ToJSON(
getV2WebhooksWebhookIdFilter2: GetV2WebhooksWebhookIdFilter2,
): string {
return JSON.stringify(
GetV2WebhooksWebhookIdFilter2$outboundSchema.parse(
getV2WebhooksWebhookIdFilter2,
),
);
}
export function getV2WebhooksWebhookIdFilter2FromJSON(
jsonString: string,
): SafeParseResult<GetV2WebhooksWebhookIdFilter2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetV2WebhooksWebhookIdFilter2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetV2WebhooksWebhookIdFilter2' from JSON`,
);
}
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$inboundSchema:
z.ZodNativeEnum<typeof GetV2WebhooksWebhookIdDollarOrOperatorNotEquals> = z
.nativeEnum(GetV2WebhooksWebhookIdDollarOrOperatorNotEquals);
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$outboundSchema:
z.ZodNativeEnum<typeof GetV2WebhooksWebhookIdDollarOrOperatorNotEquals> =
GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$ {
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$inboundSchema` instead. */
export const inboundSchema =
GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$outboundSchema` instead. */
export const outboundSchema =
GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$outboundSchema;
}
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrNotEquals$inboundSchema: z.ZodType<
GetV2WebhooksWebhookIdDollarOrNotEquals,
z.ZodTypeDef,
unknown
> = z.object({
field: z.string(),
operator: GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$inboundSchema,
value: z.string(),
});
/** @internal */
export type GetV2WebhooksWebhookIdDollarOrNotEquals$Outbound = {
field: string;
operator: string;
value: string;
};
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrNotEquals$outboundSchema: z.ZodType<
GetV2WebhooksWebhookIdDollarOrNotEquals$Outbound,
z.ZodTypeDef,
GetV2WebhooksWebhookIdDollarOrNotEquals
> = z.object({
field: z.string(),
operator: GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$outboundSchema,
value: z.string(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdDollarOrNotEquals$ {
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrNotEquals$inboundSchema` instead. */
export const inboundSchema =
GetV2WebhooksWebhookIdDollarOrNotEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrNotEquals$outboundSchema` instead. */
export const outboundSchema =
GetV2WebhooksWebhookIdDollarOrNotEquals$outboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrNotEquals$Outbound` instead. */
export type Outbound = GetV2WebhooksWebhookIdDollarOrNotEquals$Outbound;
}
export function getV2WebhooksWebhookIdDollarOrNotEqualsToJSON(
getV2WebhooksWebhookIdDollarOrNotEquals:
GetV2WebhooksWebhookIdDollarOrNotEquals,
): string {
return JSON.stringify(
GetV2WebhooksWebhookIdDollarOrNotEquals$outboundSchema.parse(
getV2WebhooksWebhookIdDollarOrNotEquals,
),
);
}
export function getV2WebhooksWebhookIdDollarOrNotEqualsFromJSON(
jsonString: string,
): SafeParseResult<
GetV2WebhooksWebhookIdDollarOrNotEquals,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetV2WebhooksWebhookIdDollarOrNotEquals$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetV2WebhooksWebhookIdDollarOrNotEquals' from JSON`,
);
}
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrOperatorEquals$inboundSchema:
z.ZodNativeEnum<typeof GetV2WebhooksWebhookIdDollarOrOperatorEquals> = z
.nativeEnum(GetV2WebhooksWebhookIdDollarOrOperatorEquals);
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrOperatorEquals$outboundSchema:
z.ZodNativeEnum<typeof GetV2WebhooksWebhookIdDollarOrOperatorEquals> =
GetV2WebhooksWebhookIdDollarOrOperatorEquals$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdDollarOrOperatorEquals$ {
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrOperatorEquals$inboundSchema` instead. */
export const inboundSchema =
GetV2WebhooksWebhookIdDollarOrOperatorEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrOperatorEquals$outboundSchema` instead. */
export const outboundSchema =
GetV2WebhooksWebhookIdDollarOrOperatorEquals$outboundSchema;
}
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrEquals$inboundSchema: z.ZodType<
GetV2WebhooksWebhookIdDollarOrEquals,
z.ZodTypeDef,
unknown
> = z.object({
field: z.string(),
operator: GetV2WebhooksWebhookIdDollarOrOperatorEquals$inboundSchema,
value: z.string(),
});
/** @internal */
export type GetV2WebhooksWebhookIdDollarOrEquals$Outbound = {
field: string;
operator: string;
value: string;
};
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrEquals$outboundSchema: z.ZodType<
GetV2WebhooksWebhookIdDollarOrEquals$Outbound,
z.ZodTypeDef,
GetV2WebhooksWebhookIdDollarOrEquals
> = z.object({
field: z.string(),
operator: GetV2WebhooksWebhookIdDollarOrOperatorEquals$outboundSchema,
value: z.string(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdDollarOrEquals$ {
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrEquals$inboundSchema` instead. */
export const inboundSchema =
GetV2WebhooksWebhookIdDollarOrEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrEquals$outboundSchema` instead. */
export const outboundSchema =
GetV2WebhooksWebhookIdDollarOrEquals$outboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrEquals$Outbound` instead. */
export type Outbound = GetV2WebhooksWebhookIdDollarOrEquals$Outbound;
}
export function getV2WebhooksWebhookIdDollarOrEqualsToJSON(
getV2WebhooksWebhookIdDollarOrEquals: GetV2WebhooksWebhookIdDollarOrEquals,
): string {
return JSON.stringify(
GetV2WebhooksWebhookIdDollarOrEquals$outboundSchema.parse(
getV2WebhooksWebhookIdDollarOrEquals,
),
);
}
export function getV2WebhooksWebhookIdDollarOrEqualsFromJSON(
jsonString: string,
): SafeParseResult<GetV2WebhooksWebhookIdDollarOrEquals, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetV2WebhooksWebhookIdDollarOrEquals$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetV2WebhooksWebhookIdDollarOrEquals' from JSON`,
);
}
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrUnion$inboundSchema: z.ZodType<
GetV2WebhooksWebhookIdDollarOrUnion,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetV2WebhooksWebhookIdDollarOrEquals$inboundSchema),
z.lazy(() => GetV2WebhooksWebhookIdDollarOrNotEquals$inboundSchema),
]);
/** @internal */
export type GetV2WebhooksWebhookIdDollarOrUnion$Outbound =
| GetV2WebhooksWebhookIdDollarOrEquals$Outbound
| GetV2WebhooksWebhookIdDollarOrNotEquals$Outbound;
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrUnion$outboundSchema: z.ZodType<
GetV2WebhooksWebhookIdDollarOrUnion$Outbound,
z.ZodTypeDef,
GetV2WebhooksWebhookIdDollarOrUnion
> = z.union([
z.lazy(() => GetV2WebhooksWebhookIdDollarOrEquals$outboundSchema),
z.lazy(() => GetV2WebhooksWebhookIdDollarOrNotEquals$outboundSchema),
]);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdDollarOrUnion$ {
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrUnion$inboundSchema` instead. */
export const inboundSchema =
GetV2WebhooksWebhookIdDollarOrUnion$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrUnion$outboundSchema` instead. */
export const outboundSchema =
GetV2WebhooksWebhookIdDollarOrUnion$outboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrUnion$Outbound` instead. */
export type Outbound = GetV2WebhooksWebhookIdDollarOrUnion$Outbound;
}
export function getV2WebhooksWebhookIdDollarOrUnionToJSON(
getV2WebhooksWebhookIdDollarOrUnion: GetV2WebhooksWebhookIdDollarOrUnion,
): string {
return JSON.stringify(
GetV2WebhooksWebhookIdDollarOrUnion$outboundSchema.parse(
getV2WebhooksWebhookIdDollarOrUnion,
),
);
}
export function getV2WebhooksWebhookIdDollarOrUnionFromJSON(
jsonString: string,
): SafeParseResult<GetV2WebhooksWebhookIdDollarOrUnion, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetV2WebhooksWebhookIdDollarOrUnion$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetV2WebhooksWebhookIdDollarOrUnion' from JSON`,
);
}
/** @internal */
export const GetV2WebhooksWebhookIdFilter1$inboundSchema: z.ZodType<
GetV2WebhooksWebhookIdFilter1,
z.ZodTypeDef,
unknown
> = z.object({
$or: z.array(
z.union([
z.lazy(() => GetV2WebhooksWebhookIdDollarOrEquals$inboundSchema),
z.lazy(() => GetV2WebhooksWebhookIdDollarOrNotEquals$inboundSchema),
]),
),
}).transform((v) => {
return remap$(v, {
"$or": "dollarOr",
});
});
/** @internal */
export type GetV2WebhooksWebhookIdFilter1$Outbound = {
$or: Array<
| GetV2WebhooksWebhookIdDollarOrEquals$Outbound
| GetV2WebhooksWebhookIdDollarOrNotEquals$Outbound
>;
};
/** @internal */
export const GetV2WebhooksWebhookIdFilter1$outboundSchema: z.ZodType<
GetV2WebhooksWebhookIdFilter1$Outbound,
z.ZodTypeDef,
GetV2WebhooksWebhookIdFilter1
> = z.object({
dollarOr: z.array(
z.union([
z.lazy(() => GetV2WebhooksWebhookIdDollarOrEquals$outboundSchema),
z.lazy(() => GetV2WebhooksWebhookIdDollarOrNotEquals$outboundSchema),
]),
),
}).transform((v) => {
return remap$(v, {
dollarOr: "$or",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdFilter1$ {
/** @deprecated use `GetV2WebhooksWebhookIdFilter1$inboundSchema` instead. */
export const inboundSchema = GetV2WebhooksWebhookIdFilter1$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdFilter1$outboundSchema` instead. */
export const outboundSchema = GetV2WebhooksWebhookIdFilter1$outboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdFilter1$Outbound` instead. */
export type Outbound = GetV2WebhooksWebhookIdFilter1$Outbound;
}
export function getV2WebhooksWebhookIdFilter1ToJSON(
getV2WebhooksWebhookIdFilter1: GetV2WebhooksWebhookIdFilter1,
): string {
return JSON.stringify(
GetV2WebhooksWebhookIdFilter1$outboundSchema.parse(
getV2WebhooksWebhookIdFilter1,
),
);
}
export function getV2WebhooksWebhookIdFilter1FromJSON(
jsonString: string,
): SafeParseResult<GetV2WebhooksWebhookIdFilter1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetV2WebhooksWebhookIdFilter1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetV2WebhooksWebhookIdFilter1' from JSON`,
);
}
/** @internal */
export const GetV2WebhooksWebhookIdFilterUnion$inboundSchema: z.ZodType<
GetV2WebhooksWebhookIdFilterUnion,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetV2WebhooksWebhookIdFilter1$inboundSchema),
z.lazy(() => GetV2WebhooksWebhookIdFilter2$inboundSchema),
]);
/** @internal */
export type GetV2WebhooksWebhookIdFilterUnion$Outbound =
| GetV2WebhooksWebhookIdFilter1$Outbound
| GetV2WebhooksWebhookIdFilter2$Outbound;
/** @internal */
export const GetV2WebhooksWebhookIdFilterUnion$outboundSchema: z.ZodType<
GetV2WebhooksWebhookIdFilterUnion$Outbound,
z.ZodTypeDef,
GetV2WebhooksWebhookIdFilterUnion
> = z.union([
z.lazy(() => GetV2WebhooksWebhookIdFilter1$outboundSchema),
z.lazy(() => GetV2WebhooksWebhookIdFilter2$outboundSchema),
]);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdFilterUnion$ {
/** @deprecated use `GetV2WebhooksWebhookIdFilterUnion$inboundSchema` instead. */
export const inboundSchema = GetV2WebhooksWebhookIdFilterUnion$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdFilterUnion$outboundSchema` instead. */
export const outboundSchema =
GetV2WebhooksWebhookIdFilterUnion$outboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdFilterUnion$Outbound` instead. */
export type Outbound = GetV2WebhooksWebhookIdFilterUnion$Outbound;
}
export function getV2WebhooksWebhookIdFilterUnionToJSON(
getV2WebhooksWebhookIdFilterUnion: GetV2WebhooksWebhookIdFilterUnion,
): string {
return JSON.stringify(
GetV2WebhooksWebhookIdFilterUnion$outboundSchema.parse(
getV2WebhooksWebhookIdFilterUnion,
),
);
}
export function getV2WebhooksWebhookIdFilterUnionFromJSON(
jsonString: string,
): SafeParseResult<GetV2WebhooksWebhookIdFilterUnion, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetV2WebhooksWebhookIdFilterUnion$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetV2WebhooksWebhookIdFilterUnion' from JSON`,
);
}
/** @internal */
export const GetV2WebhooksWebhookIdSubscription$inboundSchema: z.ZodType<
GetV2WebhooksWebhookIdSubscription,
z.ZodTypeDef,
unknown
> = z.object({
event_type: GetV2WebhooksWebhookIdEventType$inboundSchema,
filter: z.nullable(
z.union([
z.lazy(() => GetV2WebhooksWebhookIdFilter1$inboundSchema),
z.lazy(() => GetV2WebhooksWebhookIdFilter2$inboundSchema),
]),
),
}).transform((v) => {
return remap$(v, {
"event_type": "eventType",
});
});
/** @internal */
export type GetV2WebhooksWebhookIdSubscription$Outbound = {
event_type: string;
filter:
| GetV2WebhooksWebhookIdFilter1$Outbound
| GetV2WebhooksWebhookIdFilter2$Outbound
| null;
};
/** @internal */
export const GetV2WebhooksWebhookIdSubscription$outboundSchema: z.ZodType<
GetV2WebhooksWebhookIdSubscription$Outbound,
z.ZodTypeDef,
GetV2WebhooksWebhookIdSubscription
> = z.object({
eventType: GetV2WebhooksWebhookIdEventType$outboundSchema,
filter: z.nullable(
z.union([
z.lazy(() => GetV2WebhooksWebhookIdFilter1$outboundSchema),
z.lazy(() => GetV2WebhooksWebhookIdFilter2$outboundSchema),
]),
),
}).transform((v) => {
return remap$(v, {
eventType: "event_type",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdSubscription$ {
/** @deprecated use `GetV2WebhooksWebhookIdSubscription$inboundSchema` instead. */
export const inboundSchema = GetV2WebhooksWebhookIdSubscription$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdSubscription$outboundSchema` instead. */
export const outboundSchema =
GetV2WebhooksWebhookIdSubscription$outboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdSubscription$Outbound` instead. */
export type Outbound = GetV2WebhooksWebhookIdSubscription$Outbound;
}
export function getV2WebhooksWebhookIdSubscriptionToJSON(
getV2WebhooksWebhookIdSubscription: GetV2WebhooksWebhookIdSubscription,
): string {
return JSON.stringify(
GetV2WebhooksWebhookIdSubscription$outboundSchema.parse(
getV2WebhooksWebhookIdSubscription,
),
);
}
export function getV2WebhooksWebhookIdSubscriptionFromJSON(
jsonString: string,
): SafeParseResult<GetV2WebhooksWebhookIdSubscription, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetV2WebhooksWebhookIdSubscription$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetV2WebhooksWebhookIdSubscription' from JSON`,
);
}
/** @internal */
export const GetV2WebhooksWebhookIdId$inboundSchema: z.ZodType<
GetV2WebhooksWebhookIdId,
z.ZodTypeDef,
unknown
> = z.object({
workspace_id: z.string(),
webhook_id: z.string(),
}).transform((v) => {
return remap$(v, {
"workspace_id": "workspaceId",
"webhook_id": "webhookId",
});
});
/** @internal */
export type GetV2WebhooksWebhookIdId$Outbound = {
workspace_id: string;
webhook_id: string;
};
/** @internal */
export const GetV2WebhooksWebhookIdId$outboundSchema: z.ZodType<
GetV2WebhooksWebhookIdId$Outbound,
z.ZodTypeDef,
GetV2WebhooksWebhookIdId
> = z.object({
workspaceId: z.string(),
webhookId: z.string(),
}).transform((v) => {
return remap$(v, {
workspaceId: "workspace_id",
webhookId: "webhook_id",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdId$ {
/** @deprecated use `GetV2WebhooksWebhookIdId$inboundSchema` instead. */
export const inboundSchema = GetV2WebhooksWebhookIdId$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdId$outboundSchema` instead. */
export const outboundSchema = GetV2WebhooksWebhookIdId$outboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdId$Outbound` instead. */
export type Outbound = GetV2WebhooksWebhookIdId$Outbound;
}
export function getV2WebhooksWebhookIdIdToJSON(
getV2WebhooksWebhookIdId: GetV2WebhooksWebhookIdId,
): string {
return JSON.stringify(
GetV2WebhooksWebhookIdId$outboundSchema.parse(getV2WebhooksWebhookIdId),
);
}
export function getV2WebhooksWebhookIdIdFromJSON(
jsonString: string,
): SafeParseResult<GetV2WebhooksWebhookIdId, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetV2WebhooksWebhookIdId$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetV2WebhooksWebhookIdId' from JSON`,
);
}
/** @internal */
export const GetV2WebhooksWebhookIdStatus$inboundSchema: z.ZodNativeEnum<
typeof GetV2WebhooksWebhookIdStatus
> = z.nativeEnum(GetV2WebhooksWebhookIdStatus);
/** @internal */
export const GetV2WebhooksWebhookIdStatus$outboundSchema: z.ZodNativeEnum<
typeof GetV2WebhooksWebhookIdStatus
> = GetV2WebhooksWebhookIdStatus$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdStatus$ {
/** @deprecated use `GetV2WebhooksWebhookIdStatus$inboundSchema` instead. */
export const inboundSchema = GetV2WebhooksWebhookIdStatus$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdStatus$outboundSchema` instead. */
export const outboundSchema = GetV2WebhooksWebhookIdStatus$outboundSchema;
}
/** @internal */
export const GetV2WebhooksWebhookIdData$inboundSchema: z.ZodType<
GetV2WebhooksWebhookIdData,
z.ZodTypeDef,
unknown
> = z.object({
target_url: z.string(),
subscriptions: z.array(
z.lazy(() => GetV2WebhooksWebhookIdSubscription$inboundSchema),
),
id: z.lazy(() => GetV2WebhooksWebhookIdId$inboundSchema),
status: GetV2WebhooksWebhookIdStatus$inboundSchema,
created_at: z.string(),
}).transform((v) => {
return remap$(v, {
"target_url": "targetUrl",
"created_at": "createdAt",
});
});
/** @internal */
export type GetV2WebhooksWebhookIdData$Outbound = {
target_url: string;
subscriptions: Array<GetV2WebhooksWebhookIdSubscription$Outbound>;
id: GetV2WebhooksWebhookIdId$Outbound;
status: string;
created_at: string;
};
/** @internal */
export const GetV2WebhooksWebhookIdData$outboundSchema: z.ZodType<
GetV2WebhooksWebhookIdData$Outbound,
z.ZodTypeDef,
GetV2WebhooksWebhookIdData
> = z.object({
targetUrl: z.string(),
subscriptions: z.array(
z.lazy(() => GetV2WebhooksWebhookIdSubscription$outboundSchema),
),
id: z.lazy(() => GetV2WebhooksWebhookIdId$outboundSchema),
status: GetV2WebhooksWebhookIdStatus$outboundSchema,
createdAt: z.string(),
}).transform((v) => {
return remap$(v, {
targetUrl: "target_url",
createdAt: "created_at",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdData$ {
/** @deprecated use `GetV2WebhooksWebhookIdData$inboundSchema` instead. */
export const inboundSchema = GetV2WebhooksWebhookIdData$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdData$outboundSchema` instead. */
export const outboundSchema = GetV2WebhooksWebhookIdData$outboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdData$Outbound` instead. */
export type Outbound = GetV2WebhooksWebhookIdData$Outbound;
}
export function getV2WebhooksWebhookIdDataToJSON(
getV2WebhooksWebhookIdData: GetV2WebhooksWebhookIdData,
): string {
return JSON.stringify(
GetV2WebhooksWebhookIdData$outboundSchema.parse(getV2WebhooksWebhookIdData),
);
}
export function getV2WebhooksWebhookIdDataFromJSON(
jsonString: string,
): SafeParseResult<GetV2WebhooksWebhookIdData, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetV2WebhooksWebhookIdData$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetV2WebhooksWebhookIdData' from JSON`,
);
}
/** @internal */
export const GetV2WebhooksWebhookIdResponse$inboundSchema: z.ZodType<
GetV2WebhooksWebhookIdResponse,
z.ZodTypeDef,
unknown
> = z.object({
data: z.lazy(() => GetV2WebhooksWebhookIdData$inboundSchema),
});
/** @internal */
export type GetV2WebhooksWebhookIdResponse$Outbound = {
data: GetV2WebhooksWebhookIdData$Outbound;
};
/** @internal */
export const GetV2WebhooksWebhookIdResponse$outboundSchema: z.ZodType<
GetV2WebhooksWebhookIdResponse$Outbound,
z.ZodTypeDef,
GetV2WebhooksWebhookIdResponse
> = z.object({
data: z.lazy(() => GetV2WebhooksWebhookIdData$outboundSchema),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetV2WebhooksWebhookIdResponse$ {
/** @deprecated use `GetV2WebhooksWebhookIdResponse$inboundSchema` instead. */
export const inboundSchema = GetV2WebhooksWebhookIdResponse$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdResponse$outboundSchema` instead. */
export const outboundSchema = GetV2WebhooksWebhookIdResponse$outboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdResponse$Outbound` instead. */
export type Outbound = GetV2WebhooksWebhookIdResponse$Outbound;
}
export function getV2WebhooksWebhookIdResponseToJSON(
getV2WebhooksWebhookIdResponse: GetV2WebhooksWebhookIdResponse,
): string {
return JSON.stringify(
GetV2WebhooksWebhookIdResponse$outboundSchema.parse(
getV2WebhooksWebhookIdResponse,
),
);
}
export function getV2WebhooksWebhookIdResponseFromJSON(
jsonString: string,
): SafeParseResult<GetV2WebhooksWebhookIdResponse, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetV2WebhooksWebhookIdResponse$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetV2WebhooksWebhookIdResponse' from JSON`,
);
}