attio-js
Version:
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
605 lines • 32.8 kB
JavaScript
/*
* 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";
/**
* 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",
};
export const GetV2WebhooksWebhookIdDollarAndOperatorNotEquals = {
NotEquals: "not_equals",
};
export const GetV2WebhooksWebhookIdDollarAndOperatorEquals = {
Equals: "equals",
};
export const GetV2WebhooksWebhookIdDollarOrOperatorNotEquals = {
NotEquals: "not_equals",
};
export const GetV2WebhooksWebhookIdDollarOrOperatorEquals = {
Equals: "equals",
};
/**
* 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",
};
/** @internal */
export const GetV2WebhooksWebhookIdRequest$inboundSchema = z.object({
webhook_id: z.string(),
}).transform((v) => {
return remap$(v, {
"webhook_id": "webhookId",
});
});
/** @internal */
export const GetV2WebhooksWebhookIdRequest$outboundSchema = 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 var GetV2WebhooksWebhookIdRequest$;
(function (GetV2WebhooksWebhookIdRequest$) {
/** @deprecated use `GetV2WebhooksWebhookIdRequest$inboundSchema` instead. */
GetV2WebhooksWebhookIdRequest$.inboundSchema = GetV2WebhooksWebhookIdRequest$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdRequest$outboundSchema` instead. */
GetV2WebhooksWebhookIdRequest$.outboundSchema = GetV2WebhooksWebhookIdRequest$outboundSchema;
})(GetV2WebhooksWebhookIdRequest$ || (GetV2WebhooksWebhookIdRequest$ = {}));
export function getV2WebhooksWebhookIdRequestToJSON(getV2WebhooksWebhookIdRequest) {
return JSON.stringify(GetV2WebhooksWebhookIdRequest$outboundSchema.parse(getV2WebhooksWebhookIdRequest));
}
export function getV2WebhooksWebhookIdRequestFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2WebhooksWebhookIdRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksWebhookIdRequest' from JSON`);
}
/** @internal */
export const GetV2WebhooksWebhookIdEventType$inboundSchema = z.nativeEnum(GetV2WebhooksWebhookIdEventType);
/** @internal */
export const GetV2WebhooksWebhookIdEventType$outboundSchema = GetV2WebhooksWebhookIdEventType$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var GetV2WebhooksWebhookIdEventType$;
(function (GetV2WebhooksWebhookIdEventType$) {
/** @deprecated use `GetV2WebhooksWebhookIdEventType$inboundSchema` instead. */
GetV2WebhooksWebhookIdEventType$.inboundSchema = GetV2WebhooksWebhookIdEventType$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdEventType$outboundSchema` instead. */
GetV2WebhooksWebhookIdEventType$.outboundSchema = GetV2WebhooksWebhookIdEventType$outboundSchema;
})(GetV2WebhooksWebhookIdEventType$ || (GetV2WebhooksWebhookIdEventType$ = {}));
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$inboundSchema = z
.nativeEnum(GetV2WebhooksWebhookIdDollarAndOperatorNotEquals);
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$outboundSchema = GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$;
(function (GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$) {
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$inboundSchema` instead. */
GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$.inboundSchema = GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$outboundSchema` instead. */
GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$.outboundSchema = GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$outboundSchema;
})(GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$ || (GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$ = {}));
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndNotEquals$inboundSchema = z.object({
field: z.string(),
operator: GetV2WebhooksWebhookIdDollarAndOperatorNotEquals$inboundSchema,
value: z.string(),
});
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndNotEquals$outboundSchema = 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 var GetV2WebhooksWebhookIdDollarAndNotEquals$;
(function (GetV2WebhooksWebhookIdDollarAndNotEquals$) {
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndNotEquals$inboundSchema` instead. */
GetV2WebhooksWebhookIdDollarAndNotEquals$.inboundSchema = GetV2WebhooksWebhookIdDollarAndNotEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndNotEquals$outboundSchema` instead. */
GetV2WebhooksWebhookIdDollarAndNotEquals$.outboundSchema = GetV2WebhooksWebhookIdDollarAndNotEquals$outboundSchema;
})(GetV2WebhooksWebhookIdDollarAndNotEquals$ || (GetV2WebhooksWebhookIdDollarAndNotEquals$ = {}));
export function getV2WebhooksWebhookIdDollarAndNotEqualsToJSON(getV2WebhooksWebhookIdDollarAndNotEquals) {
return JSON.stringify(GetV2WebhooksWebhookIdDollarAndNotEquals$outboundSchema.parse(getV2WebhooksWebhookIdDollarAndNotEquals));
}
export function getV2WebhooksWebhookIdDollarAndNotEqualsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2WebhooksWebhookIdDollarAndNotEquals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksWebhookIdDollarAndNotEquals' from JSON`);
}
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndOperatorEquals$inboundSchema = z
.nativeEnum(GetV2WebhooksWebhookIdDollarAndOperatorEquals);
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndOperatorEquals$outboundSchema = GetV2WebhooksWebhookIdDollarAndOperatorEquals$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var GetV2WebhooksWebhookIdDollarAndOperatorEquals$;
(function (GetV2WebhooksWebhookIdDollarAndOperatorEquals$) {
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndOperatorEquals$inboundSchema` instead. */
GetV2WebhooksWebhookIdDollarAndOperatorEquals$.inboundSchema = GetV2WebhooksWebhookIdDollarAndOperatorEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndOperatorEquals$outboundSchema` instead. */
GetV2WebhooksWebhookIdDollarAndOperatorEquals$.outboundSchema = GetV2WebhooksWebhookIdDollarAndOperatorEquals$outboundSchema;
})(GetV2WebhooksWebhookIdDollarAndOperatorEquals$ || (GetV2WebhooksWebhookIdDollarAndOperatorEquals$ = {}));
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndEquals$inboundSchema = z.object({
field: z.string(),
operator: GetV2WebhooksWebhookIdDollarAndOperatorEquals$inboundSchema,
value: z.string(),
});
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndEquals$outboundSchema = 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 var GetV2WebhooksWebhookIdDollarAndEquals$;
(function (GetV2WebhooksWebhookIdDollarAndEquals$) {
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndEquals$inboundSchema` instead. */
GetV2WebhooksWebhookIdDollarAndEquals$.inboundSchema = GetV2WebhooksWebhookIdDollarAndEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndEquals$outboundSchema` instead. */
GetV2WebhooksWebhookIdDollarAndEquals$.outboundSchema = GetV2WebhooksWebhookIdDollarAndEquals$outboundSchema;
})(GetV2WebhooksWebhookIdDollarAndEquals$ || (GetV2WebhooksWebhookIdDollarAndEquals$ = {}));
export function getV2WebhooksWebhookIdDollarAndEqualsToJSON(getV2WebhooksWebhookIdDollarAndEquals) {
return JSON.stringify(GetV2WebhooksWebhookIdDollarAndEquals$outboundSchema.parse(getV2WebhooksWebhookIdDollarAndEquals));
}
export function getV2WebhooksWebhookIdDollarAndEqualsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2WebhooksWebhookIdDollarAndEquals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksWebhookIdDollarAndEquals' from JSON`);
}
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndUnion$inboundSchema = z.union([
z.lazy(() => GetV2WebhooksWebhookIdDollarAndEquals$inboundSchema),
z.lazy(() => GetV2WebhooksWebhookIdDollarAndNotEquals$inboundSchema),
]);
/** @internal */
export const GetV2WebhooksWebhookIdDollarAndUnion$outboundSchema = 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 var GetV2WebhooksWebhookIdDollarAndUnion$;
(function (GetV2WebhooksWebhookIdDollarAndUnion$) {
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndUnion$inboundSchema` instead. */
GetV2WebhooksWebhookIdDollarAndUnion$.inboundSchema = GetV2WebhooksWebhookIdDollarAndUnion$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarAndUnion$outboundSchema` instead. */
GetV2WebhooksWebhookIdDollarAndUnion$.outboundSchema = GetV2WebhooksWebhookIdDollarAndUnion$outboundSchema;
})(GetV2WebhooksWebhookIdDollarAndUnion$ || (GetV2WebhooksWebhookIdDollarAndUnion$ = {}));
export function getV2WebhooksWebhookIdDollarAndUnionToJSON(getV2WebhooksWebhookIdDollarAndUnion) {
return JSON.stringify(GetV2WebhooksWebhookIdDollarAndUnion$outboundSchema.parse(getV2WebhooksWebhookIdDollarAndUnion));
}
export function getV2WebhooksWebhookIdDollarAndUnionFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2WebhooksWebhookIdDollarAndUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksWebhookIdDollarAndUnion' from JSON`);
}
/** @internal */
export const GetV2WebhooksWebhookIdFilter2$inboundSchema = z.object({
$and: z.array(z.union([
z.lazy(() => GetV2WebhooksWebhookIdDollarAndEquals$inboundSchema),
z.lazy(() => GetV2WebhooksWebhookIdDollarAndNotEquals$inboundSchema),
])),
}).transform((v) => {
return remap$(v, {
"$and": "dollarAnd",
});
});
/** @internal */
export const GetV2WebhooksWebhookIdFilter2$outboundSchema = 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 var GetV2WebhooksWebhookIdFilter2$;
(function (GetV2WebhooksWebhookIdFilter2$) {
/** @deprecated use `GetV2WebhooksWebhookIdFilter2$inboundSchema` instead. */
GetV2WebhooksWebhookIdFilter2$.inboundSchema = GetV2WebhooksWebhookIdFilter2$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdFilter2$outboundSchema` instead. */
GetV2WebhooksWebhookIdFilter2$.outboundSchema = GetV2WebhooksWebhookIdFilter2$outboundSchema;
})(GetV2WebhooksWebhookIdFilter2$ || (GetV2WebhooksWebhookIdFilter2$ = {}));
export function getV2WebhooksWebhookIdFilter2ToJSON(getV2WebhooksWebhookIdFilter2) {
return JSON.stringify(GetV2WebhooksWebhookIdFilter2$outboundSchema.parse(getV2WebhooksWebhookIdFilter2));
}
export function getV2WebhooksWebhookIdFilter2FromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2WebhooksWebhookIdFilter2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksWebhookIdFilter2' from JSON`);
}
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$inboundSchema = z
.nativeEnum(GetV2WebhooksWebhookIdDollarOrOperatorNotEquals);
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$outboundSchema = GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$;
(function (GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$) {
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$inboundSchema` instead. */
GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$.inboundSchema = GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$outboundSchema` instead. */
GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$.outboundSchema = GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$outboundSchema;
})(GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$ || (GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$ = {}));
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrNotEquals$inboundSchema = z.object({
field: z.string(),
operator: GetV2WebhooksWebhookIdDollarOrOperatorNotEquals$inboundSchema,
value: z.string(),
});
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrNotEquals$outboundSchema = 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 var GetV2WebhooksWebhookIdDollarOrNotEquals$;
(function (GetV2WebhooksWebhookIdDollarOrNotEquals$) {
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrNotEquals$inboundSchema` instead. */
GetV2WebhooksWebhookIdDollarOrNotEquals$.inboundSchema = GetV2WebhooksWebhookIdDollarOrNotEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrNotEquals$outboundSchema` instead. */
GetV2WebhooksWebhookIdDollarOrNotEquals$.outboundSchema = GetV2WebhooksWebhookIdDollarOrNotEquals$outboundSchema;
})(GetV2WebhooksWebhookIdDollarOrNotEquals$ || (GetV2WebhooksWebhookIdDollarOrNotEquals$ = {}));
export function getV2WebhooksWebhookIdDollarOrNotEqualsToJSON(getV2WebhooksWebhookIdDollarOrNotEquals) {
return JSON.stringify(GetV2WebhooksWebhookIdDollarOrNotEquals$outboundSchema.parse(getV2WebhooksWebhookIdDollarOrNotEquals));
}
export function getV2WebhooksWebhookIdDollarOrNotEqualsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2WebhooksWebhookIdDollarOrNotEquals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksWebhookIdDollarOrNotEquals' from JSON`);
}
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrOperatorEquals$inboundSchema = z
.nativeEnum(GetV2WebhooksWebhookIdDollarOrOperatorEquals);
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrOperatorEquals$outboundSchema = GetV2WebhooksWebhookIdDollarOrOperatorEquals$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var GetV2WebhooksWebhookIdDollarOrOperatorEquals$;
(function (GetV2WebhooksWebhookIdDollarOrOperatorEquals$) {
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrOperatorEquals$inboundSchema` instead. */
GetV2WebhooksWebhookIdDollarOrOperatorEquals$.inboundSchema = GetV2WebhooksWebhookIdDollarOrOperatorEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrOperatorEquals$outboundSchema` instead. */
GetV2WebhooksWebhookIdDollarOrOperatorEquals$.outboundSchema = GetV2WebhooksWebhookIdDollarOrOperatorEquals$outboundSchema;
})(GetV2WebhooksWebhookIdDollarOrOperatorEquals$ || (GetV2WebhooksWebhookIdDollarOrOperatorEquals$ = {}));
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrEquals$inboundSchema = z.object({
field: z.string(),
operator: GetV2WebhooksWebhookIdDollarOrOperatorEquals$inboundSchema,
value: z.string(),
});
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrEquals$outboundSchema = 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 var GetV2WebhooksWebhookIdDollarOrEquals$;
(function (GetV2WebhooksWebhookIdDollarOrEquals$) {
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrEquals$inboundSchema` instead. */
GetV2WebhooksWebhookIdDollarOrEquals$.inboundSchema = GetV2WebhooksWebhookIdDollarOrEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrEquals$outboundSchema` instead. */
GetV2WebhooksWebhookIdDollarOrEquals$.outboundSchema = GetV2WebhooksWebhookIdDollarOrEquals$outboundSchema;
})(GetV2WebhooksWebhookIdDollarOrEquals$ || (GetV2WebhooksWebhookIdDollarOrEquals$ = {}));
export function getV2WebhooksWebhookIdDollarOrEqualsToJSON(getV2WebhooksWebhookIdDollarOrEquals) {
return JSON.stringify(GetV2WebhooksWebhookIdDollarOrEquals$outboundSchema.parse(getV2WebhooksWebhookIdDollarOrEquals));
}
export function getV2WebhooksWebhookIdDollarOrEqualsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2WebhooksWebhookIdDollarOrEquals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksWebhookIdDollarOrEquals' from JSON`);
}
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrUnion$inboundSchema = z.union([
z.lazy(() => GetV2WebhooksWebhookIdDollarOrEquals$inboundSchema),
z.lazy(() => GetV2WebhooksWebhookIdDollarOrNotEquals$inboundSchema),
]);
/** @internal */
export const GetV2WebhooksWebhookIdDollarOrUnion$outboundSchema = 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 var GetV2WebhooksWebhookIdDollarOrUnion$;
(function (GetV2WebhooksWebhookIdDollarOrUnion$) {
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrUnion$inboundSchema` instead. */
GetV2WebhooksWebhookIdDollarOrUnion$.inboundSchema = GetV2WebhooksWebhookIdDollarOrUnion$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdDollarOrUnion$outboundSchema` instead. */
GetV2WebhooksWebhookIdDollarOrUnion$.outboundSchema = GetV2WebhooksWebhookIdDollarOrUnion$outboundSchema;
})(GetV2WebhooksWebhookIdDollarOrUnion$ || (GetV2WebhooksWebhookIdDollarOrUnion$ = {}));
export function getV2WebhooksWebhookIdDollarOrUnionToJSON(getV2WebhooksWebhookIdDollarOrUnion) {
return JSON.stringify(GetV2WebhooksWebhookIdDollarOrUnion$outboundSchema.parse(getV2WebhooksWebhookIdDollarOrUnion));
}
export function getV2WebhooksWebhookIdDollarOrUnionFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2WebhooksWebhookIdDollarOrUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksWebhookIdDollarOrUnion' from JSON`);
}
/** @internal */
export const GetV2WebhooksWebhookIdFilter1$inboundSchema = z.object({
$or: z.array(z.union([
z.lazy(() => GetV2WebhooksWebhookIdDollarOrEquals$inboundSchema),
z.lazy(() => GetV2WebhooksWebhookIdDollarOrNotEquals$inboundSchema),
])),
}).transform((v) => {
return remap$(v, {
"$or": "dollarOr",
});
});
/** @internal */
export const GetV2WebhooksWebhookIdFilter1$outboundSchema = 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 var GetV2WebhooksWebhookIdFilter1$;
(function (GetV2WebhooksWebhookIdFilter1$) {
/** @deprecated use `GetV2WebhooksWebhookIdFilter1$inboundSchema` instead. */
GetV2WebhooksWebhookIdFilter1$.inboundSchema = GetV2WebhooksWebhookIdFilter1$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdFilter1$outboundSchema` instead. */
GetV2WebhooksWebhookIdFilter1$.outboundSchema = GetV2WebhooksWebhookIdFilter1$outboundSchema;
})(GetV2WebhooksWebhookIdFilter1$ || (GetV2WebhooksWebhookIdFilter1$ = {}));
export function getV2WebhooksWebhookIdFilter1ToJSON(getV2WebhooksWebhookIdFilter1) {
return JSON.stringify(GetV2WebhooksWebhookIdFilter1$outboundSchema.parse(getV2WebhooksWebhookIdFilter1));
}
export function getV2WebhooksWebhookIdFilter1FromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2WebhooksWebhookIdFilter1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksWebhookIdFilter1' from JSON`);
}
/** @internal */
export const GetV2WebhooksWebhookIdFilterUnion$inboundSchema = z.union([
z.lazy(() => GetV2WebhooksWebhookIdFilter1$inboundSchema),
z.lazy(() => GetV2WebhooksWebhookIdFilter2$inboundSchema),
]);
/** @internal */
export const GetV2WebhooksWebhookIdFilterUnion$outboundSchema = 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 var GetV2WebhooksWebhookIdFilterUnion$;
(function (GetV2WebhooksWebhookIdFilterUnion$) {
/** @deprecated use `GetV2WebhooksWebhookIdFilterUnion$inboundSchema` instead. */
GetV2WebhooksWebhookIdFilterUnion$.inboundSchema = GetV2WebhooksWebhookIdFilterUnion$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdFilterUnion$outboundSchema` instead. */
GetV2WebhooksWebhookIdFilterUnion$.outboundSchema = GetV2WebhooksWebhookIdFilterUnion$outboundSchema;
})(GetV2WebhooksWebhookIdFilterUnion$ || (GetV2WebhooksWebhookIdFilterUnion$ = {}));
export function getV2WebhooksWebhookIdFilterUnionToJSON(getV2WebhooksWebhookIdFilterUnion) {
return JSON.stringify(GetV2WebhooksWebhookIdFilterUnion$outboundSchema.parse(getV2WebhooksWebhookIdFilterUnion));
}
export function getV2WebhooksWebhookIdFilterUnionFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2WebhooksWebhookIdFilterUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksWebhookIdFilterUnion' from JSON`);
}
/** @internal */
export const GetV2WebhooksWebhookIdSubscription$inboundSchema = 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 const GetV2WebhooksWebhookIdSubscription$outboundSchema = 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 var GetV2WebhooksWebhookIdSubscription$;
(function (GetV2WebhooksWebhookIdSubscription$) {
/** @deprecated use `GetV2WebhooksWebhookIdSubscription$inboundSchema` instead. */
GetV2WebhooksWebhookIdSubscription$.inboundSchema = GetV2WebhooksWebhookIdSubscription$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdSubscription$outboundSchema` instead. */
GetV2WebhooksWebhookIdSubscription$.outboundSchema = GetV2WebhooksWebhookIdSubscription$outboundSchema;
})(GetV2WebhooksWebhookIdSubscription$ || (GetV2WebhooksWebhookIdSubscription$ = {}));
export function getV2WebhooksWebhookIdSubscriptionToJSON(getV2WebhooksWebhookIdSubscription) {
return JSON.stringify(GetV2WebhooksWebhookIdSubscription$outboundSchema.parse(getV2WebhooksWebhookIdSubscription));
}
export function getV2WebhooksWebhookIdSubscriptionFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2WebhooksWebhookIdSubscription$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksWebhookIdSubscription' from JSON`);
}
/** @internal */
export const GetV2WebhooksWebhookIdId$inboundSchema = z.object({
workspace_id: z.string(),
webhook_id: z.string(),
}).transform((v) => {
return remap$(v, {
"workspace_id": "workspaceId",
"webhook_id": "webhookId",
});
});
/** @internal */
export const GetV2WebhooksWebhookIdId$outboundSchema = 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 var GetV2WebhooksWebhookIdId$;
(function (GetV2WebhooksWebhookIdId$) {
/** @deprecated use `GetV2WebhooksWebhookIdId$inboundSchema` instead. */
GetV2WebhooksWebhookIdId$.inboundSchema = GetV2WebhooksWebhookIdId$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdId$outboundSchema` instead. */
GetV2WebhooksWebhookIdId$.outboundSchema = GetV2WebhooksWebhookIdId$outboundSchema;
})(GetV2WebhooksWebhookIdId$ || (GetV2WebhooksWebhookIdId$ = {}));
export function getV2WebhooksWebhookIdIdToJSON(getV2WebhooksWebhookIdId) {
return JSON.stringify(GetV2WebhooksWebhookIdId$outboundSchema.parse(getV2WebhooksWebhookIdId));
}
export function getV2WebhooksWebhookIdIdFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2WebhooksWebhookIdId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksWebhookIdId' from JSON`);
}
/** @internal */
export const GetV2WebhooksWebhookIdStatus$inboundSchema = z.nativeEnum(GetV2WebhooksWebhookIdStatus);
/** @internal */
export const GetV2WebhooksWebhookIdStatus$outboundSchema = GetV2WebhooksWebhookIdStatus$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var GetV2WebhooksWebhookIdStatus$;
(function (GetV2WebhooksWebhookIdStatus$) {
/** @deprecated use `GetV2WebhooksWebhookIdStatus$inboundSchema` instead. */
GetV2WebhooksWebhookIdStatus$.inboundSchema = GetV2WebhooksWebhookIdStatus$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdStatus$outboundSchema` instead. */
GetV2WebhooksWebhookIdStatus$.outboundSchema = GetV2WebhooksWebhookIdStatus$outboundSchema;
})(GetV2WebhooksWebhookIdStatus$ || (GetV2WebhooksWebhookIdStatus$ = {}));
/** @internal */
export const GetV2WebhooksWebhookIdData$inboundSchema = 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 const GetV2WebhooksWebhookIdData$outboundSchema = 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 var GetV2WebhooksWebhookIdData$;
(function (GetV2WebhooksWebhookIdData$) {
/** @deprecated use `GetV2WebhooksWebhookIdData$inboundSchema` instead. */
GetV2WebhooksWebhookIdData$.inboundSchema = GetV2WebhooksWebhookIdData$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdData$outboundSchema` instead. */
GetV2WebhooksWebhookIdData$.outboundSchema = GetV2WebhooksWebhookIdData$outboundSchema;
})(GetV2WebhooksWebhookIdData$ || (GetV2WebhooksWebhookIdData$ = {}));
export function getV2WebhooksWebhookIdDataToJSON(getV2WebhooksWebhookIdData) {
return JSON.stringify(GetV2WebhooksWebhookIdData$outboundSchema.parse(getV2WebhooksWebhookIdData));
}
export function getV2WebhooksWebhookIdDataFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2WebhooksWebhookIdData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksWebhookIdData' from JSON`);
}
/** @internal */
export const GetV2WebhooksWebhookIdResponse$inboundSchema = z.object({
data: z.lazy(() => GetV2WebhooksWebhookIdData$inboundSchema),
});
/** @internal */
export const GetV2WebhooksWebhookIdResponse$outboundSchema = 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 var GetV2WebhooksWebhookIdResponse$;
(function (GetV2WebhooksWebhookIdResponse$) {
/** @deprecated use `GetV2WebhooksWebhookIdResponse$inboundSchema` instead. */
GetV2WebhooksWebhookIdResponse$.inboundSchema = GetV2WebhooksWebhookIdResponse$inboundSchema;
/** @deprecated use `GetV2WebhooksWebhookIdResponse$outboundSchema` instead. */
GetV2WebhooksWebhookIdResponse$.outboundSchema = GetV2WebhooksWebhookIdResponse$outboundSchema;
})(GetV2WebhooksWebhookIdResponse$ || (GetV2WebhooksWebhookIdResponse$ = {}));
export function getV2WebhooksWebhookIdResponseToJSON(getV2WebhooksWebhookIdResponse) {
return JSON.stringify(GetV2WebhooksWebhookIdResponse$outboundSchema.parse(getV2WebhooksWebhookIdResponse));
}
export function getV2WebhooksWebhookIdResponseFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetV2WebhooksWebhookIdResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksWebhookIdResponse' from JSON`);
}
//# sourceMappingURL=getv2webhookswebhookid.js.map