attio-js
Version:
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
661 lines • 37.3 kB
JavaScript
"use strict";
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetV2WebhooksFilterUnion$outboundSchema = exports.GetV2WebhooksFilterUnion$inboundSchema = exports.GetV2WebhooksFilter1$ = exports.GetV2WebhooksFilter1$outboundSchema = exports.GetV2WebhooksFilter1$inboundSchema = exports.GetV2WebhooksDollarOrUnion$ = exports.GetV2WebhooksDollarOrUnion$outboundSchema = exports.GetV2WebhooksDollarOrUnion$inboundSchema = exports.GetV2WebhooksDollarOrEquals$ = exports.GetV2WebhooksDollarOrEquals$outboundSchema = exports.GetV2WebhooksDollarOrEquals$inboundSchema = exports.GetV2WebhooksDollarOrOperatorEquals$ = exports.GetV2WebhooksDollarOrOperatorEquals$outboundSchema = exports.GetV2WebhooksDollarOrOperatorEquals$inboundSchema = exports.GetV2WebhooksDollarOrNotEquals$ = exports.GetV2WebhooksDollarOrNotEquals$outboundSchema = exports.GetV2WebhooksDollarOrNotEquals$inboundSchema = exports.GetV2WebhooksDollarOrOperatorNotEquals$ = exports.GetV2WebhooksDollarOrOperatorNotEquals$outboundSchema = exports.GetV2WebhooksDollarOrOperatorNotEquals$inboundSchema = exports.GetV2WebhooksFilter2$ = exports.GetV2WebhooksFilter2$outboundSchema = exports.GetV2WebhooksFilter2$inboundSchema = exports.GetV2WebhooksDollarAndUnion$ = exports.GetV2WebhooksDollarAndUnion$outboundSchema = exports.GetV2WebhooksDollarAndUnion$inboundSchema = exports.GetV2WebhooksDollarAndEquals$ = exports.GetV2WebhooksDollarAndEquals$outboundSchema = exports.GetV2WebhooksDollarAndEquals$inboundSchema = exports.GetV2WebhooksDollarAndOperatorEquals$ = exports.GetV2WebhooksDollarAndOperatorEquals$outboundSchema = exports.GetV2WebhooksDollarAndOperatorEquals$inboundSchema = exports.GetV2WebhooksDollarAndNotEquals$ = exports.GetV2WebhooksDollarAndNotEquals$outboundSchema = exports.GetV2WebhooksDollarAndNotEquals$inboundSchema = exports.GetV2WebhooksDollarAndOperatorNotEquals$ = exports.GetV2WebhooksDollarAndOperatorNotEquals$outboundSchema = exports.GetV2WebhooksDollarAndOperatorNotEquals$inboundSchema = exports.GetV2WebhooksEventType$ = exports.GetV2WebhooksEventType$outboundSchema = exports.GetV2WebhooksEventType$inboundSchema = exports.GetV2WebhooksRequest$ = exports.GetV2WebhooksRequest$outboundSchema = exports.GetV2WebhooksRequest$inboundSchema = exports.GetV2WebhooksStatus = exports.GetV2WebhooksDollarOrOperatorEquals = exports.GetV2WebhooksDollarOrOperatorNotEquals = exports.GetV2WebhooksDollarAndOperatorEquals = exports.GetV2WebhooksDollarAndOperatorNotEquals = exports.GetV2WebhooksEventType = void 0;
exports.GetV2WebhooksResponse$ = exports.GetV2WebhooksResponse$outboundSchema = exports.GetV2WebhooksResponse$inboundSchema = exports.GetV2WebhooksData$ = exports.GetV2WebhooksData$outboundSchema = exports.GetV2WebhooksData$inboundSchema = exports.GetV2WebhooksStatus$ = exports.GetV2WebhooksStatus$outboundSchema = exports.GetV2WebhooksStatus$inboundSchema = exports.GetV2WebhooksId$ = exports.GetV2WebhooksId$outboundSchema = exports.GetV2WebhooksId$inboundSchema = exports.GetV2WebhooksSubscription$ = exports.GetV2WebhooksSubscription$outboundSchema = exports.GetV2WebhooksSubscription$inboundSchema = exports.GetV2WebhooksFilterUnion$ = void 0;
exports.getV2WebhooksRequestToJSON = getV2WebhooksRequestToJSON;
exports.getV2WebhooksRequestFromJSON = getV2WebhooksRequestFromJSON;
exports.getV2WebhooksDollarAndNotEqualsToJSON = getV2WebhooksDollarAndNotEqualsToJSON;
exports.getV2WebhooksDollarAndNotEqualsFromJSON = getV2WebhooksDollarAndNotEqualsFromJSON;
exports.getV2WebhooksDollarAndEqualsToJSON = getV2WebhooksDollarAndEqualsToJSON;
exports.getV2WebhooksDollarAndEqualsFromJSON = getV2WebhooksDollarAndEqualsFromJSON;
exports.getV2WebhooksDollarAndUnionToJSON = getV2WebhooksDollarAndUnionToJSON;
exports.getV2WebhooksDollarAndUnionFromJSON = getV2WebhooksDollarAndUnionFromJSON;
exports.getV2WebhooksFilter2ToJSON = getV2WebhooksFilter2ToJSON;
exports.getV2WebhooksFilter2FromJSON = getV2WebhooksFilter2FromJSON;
exports.getV2WebhooksDollarOrNotEqualsToJSON = getV2WebhooksDollarOrNotEqualsToJSON;
exports.getV2WebhooksDollarOrNotEqualsFromJSON = getV2WebhooksDollarOrNotEqualsFromJSON;
exports.getV2WebhooksDollarOrEqualsToJSON = getV2WebhooksDollarOrEqualsToJSON;
exports.getV2WebhooksDollarOrEqualsFromJSON = getV2WebhooksDollarOrEqualsFromJSON;
exports.getV2WebhooksDollarOrUnionToJSON = getV2WebhooksDollarOrUnionToJSON;
exports.getV2WebhooksDollarOrUnionFromJSON = getV2WebhooksDollarOrUnionFromJSON;
exports.getV2WebhooksFilter1ToJSON = getV2WebhooksFilter1ToJSON;
exports.getV2WebhooksFilter1FromJSON = getV2WebhooksFilter1FromJSON;
exports.getV2WebhooksFilterUnionToJSON = getV2WebhooksFilterUnionToJSON;
exports.getV2WebhooksFilterUnionFromJSON = getV2WebhooksFilterUnionFromJSON;
exports.getV2WebhooksSubscriptionToJSON = getV2WebhooksSubscriptionToJSON;
exports.getV2WebhooksSubscriptionFromJSON = getV2WebhooksSubscriptionFromJSON;
exports.getV2WebhooksIdToJSON = getV2WebhooksIdToJSON;
exports.getV2WebhooksIdFromJSON = getV2WebhooksIdFromJSON;
exports.getV2WebhooksDataToJSON = getV2WebhooksDataToJSON;
exports.getV2WebhooksDataFromJSON = getV2WebhooksDataFromJSON;
exports.getV2WebhooksResponseToJSON = getV2WebhooksResponseToJSON;
exports.getV2WebhooksResponseFromJSON = getV2WebhooksResponseFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/**
* Type of event the webhook is subscribed to.
*/
exports.GetV2WebhooksEventType = {
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",
};
exports.GetV2WebhooksDollarAndOperatorNotEquals = {
NotEquals: "not_equals",
};
exports.GetV2WebhooksDollarAndOperatorEquals = {
Equals: "equals",
};
exports.GetV2WebhooksDollarOrOperatorNotEquals = {
NotEquals: "not_equals",
};
exports.GetV2WebhooksDollarOrOperatorEquals = {
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.
*/
exports.GetV2WebhooksStatus = {
Active: "active",
Degraded: "degraded",
Inactive: "inactive",
};
/** @internal */
exports.GetV2WebhooksRequest$inboundSchema = z.object({
limit: z.number().int().optional(),
offset: z.number().int().optional(),
});
/** @internal */
exports.GetV2WebhooksRequest$outboundSchema = z.object({
limit: z.number().int().optional(),
offset: z.number().int().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var GetV2WebhooksRequest$;
(function (GetV2WebhooksRequest$) {
/** @deprecated use `GetV2WebhooksRequest$inboundSchema` instead. */
GetV2WebhooksRequest$.inboundSchema = exports.GetV2WebhooksRequest$inboundSchema;
/** @deprecated use `GetV2WebhooksRequest$outboundSchema` instead. */
GetV2WebhooksRequest$.outboundSchema = exports.GetV2WebhooksRequest$outboundSchema;
})(GetV2WebhooksRequest$ || (exports.GetV2WebhooksRequest$ = GetV2WebhooksRequest$ = {}));
function getV2WebhooksRequestToJSON(getV2WebhooksRequest) {
return JSON.stringify(exports.GetV2WebhooksRequest$outboundSchema.parse(getV2WebhooksRequest));
}
function getV2WebhooksRequestFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetV2WebhooksRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksRequest' from JSON`);
}
/** @internal */
exports.GetV2WebhooksEventType$inboundSchema = z.nativeEnum(exports.GetV2WebhooksEventType);
/** @internal */
exports.GetV2WebhooksEventType$outboundSchema = exports.GetV2WebhooksEventType$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var GetV2WebhooksEventType$;
(function (GetV2WebhooksEventType$) {
/** @deprecated use `GetV2WebhooksEventType$inboundSchema` instead. */
GetV2WebhooksEventType$.inboundSchema = exports.GetV2WebhooksEventType$inboundSchema;
/** @deprecated use `GetV2WebhooksEventType$outboundSchema` instead. */
GetV2WebhooksEventType$.outboundSchema = exports.GetV2WebhooksEventType$outboundSchema;
})(GetV2WebhooksEventType$ || (exports.GetV2WebhooksEventType$ = GetV2WebhooksEventType$ = {}));
/** @internal */
exports.GetV2WebhooksDollarAndOperatorNotEquals$inboundSchema = z
.nativeEnum(exports.GetV2WebhooksDollarAndOperatorNotEquals);
/** @internal */
exports.GetV2WebhooksDollarAndOperatorNotEquals$outboundSchema = exports.GetV2WebhooksDollarAndOperatorNotEquals$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var GetV2WebhooksDollarAndOperatorNotEquals$;
(function (GetV2WebhooksDollarAndOperatorNotEquals$) {
/** @deprecated use `GetV2WebhooksDollarAndOperatorNotEquals$inboundSchema` instead. */
GetV2WebhooksDollarAndOperatorNotEquals$.inboundSchema = exports.GetV2WebhooksDollarAndOperatorNotEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksDollarAndOperatorNotEquals$outboundSchema` instead. */
GetV2WebhooksDollarAndOperatorNotEquals$.outboundSchema = exports.GetV2WebhooksDollarAndOperatorNotEquals$outboundSchema;
})(GetV2WebhooksDollarAndOperatorNotEquals$ || (exports.GetV2WebhooksDollarAndOperatorNotEquals$ = GetV2WebhooksDollarAndOperatorNotEquals$ = {}));
/** @internal */
exports.GetV2WebhooksDollarAndNotEquals$inboundSchema = z.object({
field: z.string(),
operator: exports.GetV2WebhooksDollarAndOperatorNotEquals$inboundSchema,
value: z.string(),
});
/** @internal */
exports.GetV2WebhooksDollarAndNotEquals$outboundSchema = z.object({
field: z.string(),
operator: exports.GetV2WebhooksDollarAndOperatorNotEquals$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.
*/
var GetV2WebhooksDollarAndNotEquals$;
(function (GetV2WebhooksDollarAndNotEquals$) {
/** @deprecated use `GetV2WebhooksDollarAndNotEquals$inboundSchema` instead. */
GetV2WebhooksDollarAndNotEquals$.inboundSchema = exports.GetV2WebhooksDollarAndNotEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksDollarAndNotEquals$outboundSchema` instead. */
GetV2WebhooksDollarAndNotEquals$.outboundSchema = exports.GetV2WebhooksDollarAndNotEquals$outboundSchema;
})(GetV2WebhooksDollarAndNotEquals$ || (exports.GetV2WebhooksDollarAndNotEquals$ = GetV2WebhooksDollarAndNotEquals$ = {}));
function getV2WebhooksDollarAndNotEqualsToJSON(getV2WebhooksDollarAndNotEquals) {
return JSON.stringify(exports.GetV2WebhooksDollarAndNotEquals$outboundSchema.parse(getV2WebhooksDollarAndNotEquals));
}
function getV2WebhooksDollarAndNotEqualsFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetV2WebhooksDollarAndNotEquals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksDollarAndNotEquals' from JSON`);
}
/** @internal */
exports.GetV2WebhooksDollarAndOperatorEquals$inboundSchema = z.nativeEnum(exports.GetV2WebhooksDollarAndOperatorEquals);
/** @internal */
exports.GetV2WebhooksDollarAndOperatorEquals$outboundSchema = exports.GetV2WebhooksDollarAndOperatorEquals$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var GetV2WebhooksDollarAndOperatorEquals$;
(function (GetV2WebhooksDollarAndOperatorEquals$) {
/** @deprecated use `GetV2WebhooksDollarAndOperatorEquals$inboundSchema` instead. */
GetV2WebhooksDollarAndOperatorEquals$.inboundSchema = exports.GetV2WebhooksDollarAndOperatorEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksDollarAndOperatorEquals$outboundSchema` instead. */
GetV2WebhooksDollarAndOperatorEquals$.outboundSchema = exports.GetV2WebhooksDollarAndOperatorEquals$outboundSchema;
})(GetV2WebhooksDollarAndOperatorEquals$ || (exports.GetV2WebhooksDollarAndOperatorEquals$ = GetV2WebhooksDollarAndOperatorEquals$ = {}));
/** @internal */
exports.GetV2WebhooksDollarAndEquals$inboundSchema = z.object({
field: z.string(),
operator: exports.GetV2WebhooksDollarAndOperatorEquals$inboundSchema,
value: z.string(),
});
/** @internal */
exports.GetV2WebhooksDollarAndEquals$outboundSchema = z.object({
field: z.string(),
operator: exports.GetV2WebhooksDollarAndOperatorEquals$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.
*/
var GetV2WebhooksDollarAndEquals$;
(function (GetV2WebhooksDollarAndEquals$) {
/** @deprecated use `GetV2WebhooksDollarAndEquals$inboundSchema` instead. */
GetV2WebhooksDollarAndEquals$.inboundSchema = exports.GetV2WebhooksDollarAndEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksDollarAndEquals$outboundSchema` instead. */
GetV2WebhooksDollarAndEquals$.outboundSchema = exports.GetV2WebhooksDollarAndEquals$outboundSchema;
})(GetV2WebhooksDollarAndEquals$ || (exports.GetV2WebhooksDollarAndEquals$ = GetV2WebhooksDollarAndEquals$ = {}));
function getV2WebhooksDollarAndEqualsToJSON(getV2WebhooksDollarAndEquals) {
return JSON.stringify(exports.GetV2WebhooksDollarAndEquals$outboundSchema.parse(getV2WebhooksDollarAndEquals));
}
function getV2WebhooksDollarAndEqualsFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetV2WebhooksDollarAndEquals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksDollarAndEquals' from JSON`);
}
/** @internal */
exports.GetV2WebhooksDollarAndUnion$inboundSchema = z.union([
z.lazy(() => exports.GetV2WebhooksDollarAndEquals$inboundSchema),
z.lazy(() => exports.GetV2WebhooksDollarAndNotEquals$inboundSchema),
]);
/** @internal */
exports.GetV2WebhooksDollarAndUnion$outboundSchema = z.union([
z.lazy(() => exports.GetV2WebhooksDollarAndEquals$outboundSchema),
z.lazy(() => exports.GetV2WebhooksDollarAndNotEquals$outboundSchema),
]);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var GetV2WebhooksDollarAndUnion$;
(function (GetV2WebhooksDollarAndUnion$) {
/** @deprecated use `GetV2WebhooksDollarAndUnion$inboundSchema` instead. */
GetV2WebhooksDollarAndUnion$.inboundSchema = exports.GetV2WebhooksDollarAndUnion$inboundSchema;
/** @deprecated use `GetV2WebhooksDollarAndUnion$outboundSchema` instead. */
GetV2WebhooksDollarAndUnion$.outboundSchema = exports.GetV2WebhooksDollarAndUnion$outboundSchema;
})(GetV2WebhooksDollarAndUnion$ || (exports.GetV2WebhooksDollarAndUnion$ = GetV2WebhooksDollarAndUnion$ = {}));
function getV2WebhooksDollarAndUnionToJSON(getV2WebhooksDollarAndUnion) {
return JSON.stringify(exports.GetV2WebhooksDollarAndUnion$outboundSchema.parse(getV2WebhooksDollarAndUnion));
}
function getV2WebhooksDollarAndUnionFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetV2WebhooksDollarAndUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksDollarAndUnion' from JSON`);
}
/** @internal */
exports.GetV2WebhooksFilter2$inboundSchema = z.object({
$and: z.array(z.union([
z.lazy(() => exports.GetV2WebhooksDollarAndEquals$inboundSchema),
z.lazy(() => exports.GetV2WebhooksDollarAndNotEquals$inboundSchema),
])),
}).transform((v) => {
return (0, primitives_js_1.remap)(v, {
"$and": "dollarAnd",
});
});
/** @internal */
exports.GetV2WebhooksFilter2$outboundSchema = z.object({
dollarAnd: z.array(z.union([
z.lazy(() => exports.GetV2WebhooksDollarAndEquals$outboundSchema),
z.lazy(() => exports.GetV2WebhooksDollarAndNotEquals$outboundSchema),
])),
}).transform((v) => {
return (0, primitives_js_1.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.
*/
var GetV2WebhooksFilter2$;
(function (GetV2WebhooksFilter2$) {
/** @deprecated use `GetV2WebhooksFilter2$inboundSchema` instead. */
GetV2WebhooksFilter2$.inboundSchema = exports.GetV2WebhooksFilter2$inboundSchema;
/** @deprecated use `GetV2WebhooksFilter2$outboundSchema` instead. */
GetV2WebhooksFilter2$.outboundSchema = exports.GetV2WebhooksFilter2$outboundSchema;
})(GetV2WebhooksFilter2$ || (exports.GetV2WebhooksFilter2$ = GetV2WebhooksFilter2$ = {}));
function getV2WebhooksFilter2ToJSON(getV2WebhooksFilter2) {
return JSON.stringify(exports.GetV2WebhooksFilter2$outboundSchema.parse(getV2WebhooksFilter2));
}
function getV2WebhooksFilter2FromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetV2WebhooksFilter2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksFilter2' from JSON`);
}
/** @internal */
exports.GetV2WebhooksDollarOrOperatorNotEquals$inboundSchema = z.nativeEnum(exports.GetV2WebhooksDollarOrOperatorNotEquals);
/** @internal */
exports.GetV2WebhooksDollarOrOperatorNotEquals$outboundSchema = exports.GetV2WebhooksDollarOrOperatorNotEquals$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var GetV2WebhooksDollarOrOperatorNotEquals$;
(function (GetV2WebhooksDollarOrOperatorNotEquals$) {
/** @deprecated use `GetV2WebhooksDollarOrOperatorNotEquals$inboundSchema` instead. */
GetV2WebhooksDollarOrOperatorNotEquals$.inboundSchema = exports.GetV2WebhooksDollarOrOperatorNotEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksDollarOrOperatorNotEquals$outboundSchema` instead. */
GetV2WebhooksDollarOrOperatorNotEquals$.outboundSchema = exports.GetV2WebhooksDollarOrOperatorNotEquals$outboundSchema;
})(GetV2WebhooksDollarOrOperatorNotEquals$ || (exports.GetV2WebhooksDollarOrOperatorNotEquals$ = GetV2WebhooksDollarOrOperatorNotEquals$ = {}));
/** @internal */
exports.GetV2WebhooksDollarOrNotEquals$inboundSchema = z.object({
field: z.string(),
operator: exports.GetV2WebhooksDollarOrOperatorNotEquals$inboundSchema,
value: z.string(),
});
/** @internal */
exports.GetV2WebhooksDollarOrNotEquals$outboundSchema = z.object({
field: z.string(),
operator: exports.GetV2WebhooksDollarOrOperatorNotEquals$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.
*/
var GetV2WebhooksDollarOrNotEquals$;
(function (GetV2WebhooksDollarOrNotEquals$) {
/** @deprecated use `GetV2WebhooksDollarOrNotEquals$inboundSchema` instead. */
GetV2WebhooksDollarOrNotEquals$.inboundSchema = exports.GetV2WebhooksDollarOrNotEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksDollarOrNotEquals$outboundSchema` instead. */
GetV2WebhooksDollarOrNotEquals$.outboundSchema = exports.GetV2WebhooksDollarOrNotEquals$outboundSchema;
})(GetV2WebhooksDollarOrNotEquals$ || (exports.GetV2WebhooksDollarOrNotEquals$ = GetV2WebhooksDollarOrNotEquals$ = {}));
function getV2WebhooksDollarOrNotEqualsToJSON(getV2WebhooksDollarOrNotEquals) {
return JSON.stringify(exports.GetV2WebhooksDollarOrNotEquals$outboundSchema.parse(getV2WebhooksDollarOrNotEquals));
}
function getV2WebhooksDollarOrNotEqualsFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetV2WebhooksDollarOrNotEquals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksDollarOrNotEquals' from JSON`);
}
/** @internal */
exports.GetV2WebhooksDollarOrOperatorEquals$inboundSchema = z.nativeEnum(exports.GetV2WebhooksDollarOrOperatorEquals);
/** @internal */
exports.GetV2WebhooksDollarOrOperatorEquals$outboundSchema = exports.GetV2WebhooksDollarOrOperatorEquals$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var GetV2WebhooksDollarOrOperatorEquals$;
(function (GetV2WebhooksDollarOrOperatorEquals$) {
/** @deprecated use `GetV2WebhooksDollarOrOperatorEquals$inboundSchema` instead. */
GetV2WebhooksDollarOrOperatorEquals$.inboundSchema = exports.GetV2WebhooksDollarOrOperatorEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksDollarOrOperatorEquals$outboundSchema` instead. */
GetV2WebhooksDollarOrOperatorEquals$.outboundSchema = exports.GetV2WebhooksDollarOrOperatorEquals$outboundSchema;
})(GetV2WebhooksDollarOrOperatorEquals$ || (exports.GetV2WebhooksDollarOrOperatorEquals$ = GetV2WebhooksDollarOrOperatorEquals$ = {}));
/** @internal */
exports.GetV2WebhooksDollarOrEquals$inboundSchema = z.object({
field: z.string(),
operator: exports.GetV2WebhooksDollarOrOperatorEquals$inboundSchema,
value: z.string(),
});
/** @internal */
exports.GetV2WebhooksDollarOrEquals$outboundSchema = z.object({
field: z.string(),
operator: exports.GetV2WebhooksDollarOrOperatorEquals$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.
*/
var GetV2WebhooksDollarOrEquals$;
(function (GetV2WebhooksDollarOrEquals$) {
/** @deprecated use `GetV2WebhooksDollarOrEquals$inboundSchema` instead. */
GetV2WebhooksDollarOrEquals$.inboundSchema = exports.GetV2WebhooksDollarOrEquals$inboundSchema;
/** @deprecated use `GetV2WebhooksDollarOrEquals$outboundSchema` instead. */
GetV2WebhooksDollarOrEquals$.outboundSchema = exports.GetV2WebhooksDollarOrEquals$outboundSchema;
})(GetV2WebhooksDollarOrEquals$ || (exports.GetV2WebhooksDollarOrEquals$ = GetV2WebhooksDollarOrEquals$ = {}));
function getV2WebhooksDollarOrEqualsToJSON(getV2WebhooksDollarOrEquals) {
return JSON.stringify(exports.GetV2WebhooksDollarOrEquals$outboundSchema.parse(getV2WebhooksDollarOrEquals));
}
function getV2WebhooksDollarOrEqualsFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetV2WebhooksDollarOrEquals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksDollarOrEquals' from JSON`);
}
/** @internal */
exports.GetV2WebhooksDollarOrUnion$inboundSchema = z.union([
z.lazy(() => exports.GetV2WebhooksDollarOrEquals$inboundSchema),
z.lazy(() => exports.GetV2WebhooksDollarOrNotEquals$inboundSchema),
]);
/** @internal */
exports.GetV2WebhooksDollarOrUnion$outboundSchema = z.union([
z.lazy(() => exports.GetV2WebhooksDollarOrEquals$outboundSchema),
z.lazy(() => exports.GetV2WebhooksDollarOrNotEquals$outboundSchema),
]);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var GetV2WebhooksDollarOrUnion$;
(function (GetV2WebhooksDollarOrUnion$) {
/** @deprecated use `GetV2WebhooksDollarOrUnion$inboundSchema` instead. */
GetV2WebhooksDollarOrUnion$.inboundSchema = exports.GetV2WebhooksDollarOrUnion$inboundSchema;
/** @deprecated use `GetV2WebhooksDollarOrUnion$outboundSchema` instead. */
GetV2WebhooksDollarOrUnion$.outboundSchema = exports.GetV2WebhooksDollarOrUnion$outboundSchema;
})(GetV2WebhooksDollarOrUnion$ || (exports.GetV2WebhooksDollarOrUnion$ = GetV2WebhooksDollarOrUnion$ = {}));
function getV2WebhooksDollarOrUnionToJSON(getV2WebhooksDollarOrUnion) {
return JSON.stringify(exports.GetV2WebhooksDollarOrUnion$outboundSchema.parse(getV2WebhooksDollarOrUnion));
}
function getV2WebhooksDollarOrUnionFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetV2WebhooksDollarOrUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksDollarOrUnion' from JSON`);
}
/** @internal */
exports.GetV2WebhooksFilter1$inboundSchema = z.object({
$or: z.array(z.union([
z.lazy(() => exports.GetV2WebhooksDollarOrEquals$inboundSchema),
z.lazy(() => exports.GetV2WebhooksDollarOrNotEquals$inboundSchema),
])),
}).transform((v) => {
return (0, primitives_js_1.remap)(v, {
"$or": "dollarOr",
});
});
/** @internal */
exports.GetV2WebhooksFilter1$outboundSchema = z.object({
dollarOr: z.array(z.union([
z.lazy(() => exports.GetV2WebhooksDollarOrEquals$outboundSchema),
z.lazy(() => exports.GetV2WebhooksDollarOrNotEquals$outboundSchema),
])),
}).transform((v) => {
return (0, primitives_js_1.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.
*/
var GetV2WebhooksFilter1$;
(function (GetV2WebhooksFilter1$) {
/** @deprecated use `GetV2WebhooksFilter1$inboundSchema` instead. */
GetV2WebhooksFilter1$.inboundSchema = exports.GetV2WebhooksFilter1$inboundSchema;
/** @deprecated use `GetV2WebhooksFilter1$outboundSchema` instead. */
GetV2WebhooksFilter1$.outboundSchema = exports.GetV2WebhooksFilter1$outboundSchema;
})(GetV2WebhooksFilter1$ || (exports.GetV2WebhooksFilter1$ = GetV2WebhooksFilter1$ = {}));
function getV2WebhooksFilter1ToJSON(getV2WebhooksFilter1) {
return JSON.stringify(exports.GetV2WebhooksFilter1$outboundSchema.parse(getV2WebhooksFilter1));
}
function getV2WebhooksFilter1FromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetV2WebhooksFilter1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksFilter1' from JSON`);
}
/** @internal */
exports.GetV2WebhooksFilterUnion$inboundSchema = z.union([
z.lazy(() => exports.GetV2WebhooksFilter1$inboundSchema),
z.lazy(() => exports.GetV2WebhooksFilter2$inboundSchema),
]);
/** @internal */
exports.GetV2WebhooksFilterUnion$outboundSchema = z.union([
z.lazy(() => exports.GetV2WebhooksFilter1$outboundSchema),
z.lazy(() => exports.GetV2WebhooksFilter2$outboundSchema),
]);
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var GetV2WebhooksFilterUnion$;
(function (GetV2WebhooksFilterUnion$) {
/** @deprecated use `GetV2WebhooksFilterUnion$inboundSchema` instead. */
GetV2WebhooksFilterUnion$.inboundSchema = exports.GetV2WebhooksFilterUnion$inboundSchema;
/** @deprecated use `GetV2WebhooksFilterUnion$outboundSchema` instead. */
GetV2WebhooksFilterUnion$.outboundSchema = exports.GetV2WebhooksFilterUnion$outboundSchema;
})(GetV2WebhooksFilterUnion$ || (exports.GetV2WebhooksFilterUnion$ = GetV2WebhooksFilterUnion$ = {}));
function getV2WebhooksFilterUnionToJSON(getV2WebhooksFilterUnion) {
return JSON.stringify(exports.GetV2WebhooksFilterUnion$outboundSchema.parse(getV2WebhooksFilterUnion));
}
function getV2WebhooksFilterUnionFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetV2WebhooksFilterUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksFilterUnion' from JSON`);
}
/** @internal */
exports.GetV2WebhooksSubscription$inboundSchema = z.object({
event_type: exports.GetV2WebhooksEventType$inboundSchema,
filter: z.nullable(z.union([
z.lazy(() => exports.GetV2WebhooksFilter1$inboundSchema),
z.lazy(() => exports.GetV2WebhooksFilter2$inboundSchema),
])),
}).transform((v) => {
return (0, primitives_js_1.remap)(v, {
"event_type": "eventType",
});
});
/** @internal */
exports.GetV2WebhooksSubscription$outboundSchema = z.object({
eventType: exports.GetV2WebhooksEventType$outboundSchema,
filter: z.nullable(z.union([
z.lazy(() => exports.GetV2WebhooksFilter1$outboundSchema),
z.lazy(() => exports.GetV2WebhooksFilter2$outboundSchema),
])),
}).transform((v) => {
return (0, primitives_js_1.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.
*/
var GetV2WebhooksSubscription$;
(function (GetV2WebhooksSubscription$) {
/** @deprecated use `GetV2WebhooksSubscription$inboundSchema` instead. */
GetV2WebhooksSubscription$.inboundSchema = exports.GetV2WebhooksSubscription$inboundSchema;
/** @deprecated use `GetV2WebhooksSubscription$outboundSchema` instead. */
GetV2WebhooksSubscription$.outboundSchema = exports.GetV2WebhooksSubscription$outboundSchema;
})(GetV2WebhooksSubscription$ || (exports.GetV2WebhooksSubscription$ = GetV2WebhooksSubscription$ = {}));
function getV2WebhooksSubscriptionToJSON(getV2WebhooksSubscription) {
return JSON.stringify(exports.GetV2WebhooksSubscription$outboundSchema.parse(getV2WebhooksSubscription));
}
function getV2WebhooksSubscriptionFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetV2WebhooksSubscription$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksSubscription' from JSON`);
}
/** @internal */
exports.GetV2WebhooksId$inboundSchema = z.object({
workspace_id: z.string(),
webhook_id: z.string(),
}).transform((v) => {
return (0, primitives_js_1.remap)(v, {
"workspace_id": "workspaceId",
"webhook_id": "webhookId",
});
});
/** @internal */
exports.GetV2WebhooksId$outboundSchema = z.object({
workspaceId: z.string(),
webhookId: z.string(),
}).transform((v) => {
return (0, primitives_js_1.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.
*/
var GetV2WebhooksId$;
(function (GetV2WebhooksId$) {
/** @deprecated use `GetV2WebhooksId$inboundSchema` instead. */
GetV2WebhooksId$.inboundSchema = exports.GetV2WebhooksId$inboundSchema;
/** @deprecated use `GetV2WebhooksId$outboundSchema` instead. */
GetV2WebhooksId$.outboundSchema = exports.GetV2WebhooksId$outboundSchema;
})(GetV2WebhooksId$ || (exports.GetV2WebhooksId$ = GetV2WebhooksId$ = {}));
function getV2WebhooksIdToJSON(getV2WebhooksId) {
return JSON.stringify(exports.GetV2WebhooksId$outboundSchema.parse(getV2WebhooksId));
}
function getV2WebhooksIdFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetV2WebhooksId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksId' from JSON`);
}
/** @internal */
exports.GetV2WebhooksStatus$inboundSchema = z.nativeEnum(exports.GetV2WebhooksStatus);
/** @internal */
exports.GetV2WebhooksStatus$outboundSchema = exports.GetV2WebhooksStatus$inboundSchema;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var GetV2WebhooksStatus$;
(function (GetV2WebhooksStatus$) {
/** @deprecated use `GetV2WebhooksStatus$inboundSchema` instead. */
GetV2WebhooksStatus$.inboundSchema = exports.GetV2WebhooksStatus$inboundSchema;
/** @deprecated use `GetV2WebhooksStatus$outboundSchema` instead. */
GetV2WebhooksStatus$.outboundSchema = exports.GetV2WebhooksStatus$outboundSchema;
})(GetV2WebhooksStatus$ || (exports.GetV2WebhooksStatus$ = GetV2WebhooksStatus$ = {}));
/** @internal */
exports.GetV2WebhooksData$inboundSchema = z.object({
target_url: z.string(),
subscriptions: z.array(z.lazy(() => exports.GetV2WebhooksSubscription$inboundSchema)),
id: z.lazy(() => exports.GetV2WebhooksId$inboundSchema),
status: exports.GetV2WebhooksStatus$inboundSchema,
created_at: z.string(),
}).transform((v) => {
return (0, primitives_js_1.remap)(v, {
"target_url": "targetUrl",
"created_at": "createdAt",
});
});
/** @internal */
exports.GetV2WebhooksData$outboundSchema = z.object({
targetUrl: z.string(),
subscriptions: z.array(z.lazy(() => exports.GetV2WebhooksSubscription$outboundSchema)),
id: z.lazy(() => exports.GetV2WebhooksId$outboundSchema),
status: exports.GetV2WebhooksStatus$outboundSchema,
createdAt: z.string(),
}).transform((v) => {
return (0, primitives_js_1.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.
*/
var GetV2WebhooksData$;
(function (GetV2WebhooksData$) {
/** @deprecated use `GetV2WebhooksData$inboundSchema` instead. */
GetV2WebhooksData$.inboundSchema = exports.GetV2WebhooksData$inboundSchema;
/** @deprecated use `GetV2WebhooksData$outboundSchema` instead. */
GetV2WebhooksData$.outboundSchema = exports.GetV2WebhooksData$outboundSchema;
})(GetV2WebhooksData$ || (exports.GetV2WebhooksData$ = GetV2WebhooksData$ = {}));
function getV2WebhooksDataToJSON(getV2WebhooksData) {
return JSON.stringify(exports.GetV2WebhooksData$outboundSchema.parse(getV2WebhooksData));
}
function getV2WebhooksDataFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetV2WebhooksData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksData' from JSON`);
}
/** @internal */
exports.GetV2WebhooksResponse$inboundSchema = z.object({
data: z.array(z.lazy(() => exports.GetV2WebhooksData$inboundSchema)),
});
/** @internal */
exports.GetV2WebhooksResponse$outboundSchema = z.object({
data: z.array(z.lazy(() => exports.GetV2WebhooksData$outboundSchema)),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
var GetV2WebhooksResponse$;
(function (GetV2WebhooksResponse$) {
/** @deprecated use `GetV2WebhooksResponse$inboundSchema` instead. */
GetV2WebhooksResponse$.inboundSchema = exports.GetV2WebhooksResponse$inboundSchema;
/** @deprecated use `GetV2WebhooksResponse$outboundSchema` instead. */
GetV2WebhooksResponse$.outboundSchema = exports.GetV2WebhooksResponse$outboundSchema;
})(GetV2WebhooksResponse$ || (exports.GetV2WebhooksResponse$ = GetV2WebhooksResponse$ = {}));
function getV2WebhooksResponseToJSON(getV2WebhooksResponse) {
return JSON.stringify(exports.GetV2WebhooksResponse$outboundSchema.parse(getV2WebhooksResponse));
}
function getV2WebhooksResponseFromJSON(jsonString) {
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetV2WebhooksResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetV2WebhooksResponse' from JSON`);
}
//# sourceMappingURL=getv2webhooks.js.map