@automate.ax/integration-contracts 0.103.2 → 0.105.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,7 +45,15 @@ export declare const CLOSE_WEBHOOK_PAYLOAD_SCHEMA: z.ZodObject<{
45
45
  subscriptionId: z.ZodString;
46
46
  }, z.core.$strip>;
47
47
  export declare const CLOSE_TRIGGER_CONFIG_SCHEMA: z.ZodObject<{}, z.core.$strip>;
48
- export declare const CLOSE_SEMANTIC_EVENT_TYPES: readonly ["close.call.answered", "close.call.completed", "close.comment.created", "close.comment.deleted", "close.comment.updated", "close.contact.created", "close.contact.deleted", "close.contact.updated", "close.email.received", "close.email.sent", "close.lead.created", "close.lead.deleted", "close.lead.merged", "close.lead.updated", "close.meeting.canceled", "close.meeting.completed", "close.meeting.scheduled", "close.meeting.started", "close.opportunity.created", "close.opportunity.deleted", "close.opportunity.lost", "close.opportunity.updated", "close.opportunity.won", "close.sequenceSubscription.created", "close.sequenceSubscription.deleted", "close.sequenceSubscription.errored", "close.sequenceSubscription.finished", "close.sequenceSubscription.goalReached", "close.sequenceSubscription.paused", "close.sequenceSubscription.resumed", "close.sequenceSubscription.updated", "close.sms.received", "close.sms.sent", "close.task.completed", "close.task.created", "close.task.deleted", "close.task.updated"];
48
+ export declare const CLOSE_SMART_VIEW_MEMBERSHIP_TRIGGER_CONFIG_SCHEMA: z.ZodObject<{
49
+ smartViewId: z.ZodString;
50
+ }, z.core.$strip>;
51
+ export declare const CLOSE_SMART_VIEW_MEMBERSHIP_EVENT_SCHEMA: z.ZodObject<{
52
+ leadId: z.ZodString;
53
+ smartViewId: z.ZodString;
54
+ }, z.core.$strip>;
55
+ export declare const CLOSE_SEMANTIC_EVENT_TYPES: readonly ["close.call.answered", "close.call.completed", "close.comment.created", "close.comment.deleted", "close.comment.updated", "close.contact.created", "close.contact.deleted", "close.contact.updated", "close.email.received", "close.email.sent", "close.lead.created", "close.lead.deleted", "close.lead.merged", "close.lead.updated", "close.meeting.canceled", "close.meeting.completed", "close.meeting.scheduled", "close.meeting.started", "close.opportunity.created", "close.opportunity.deleted", "close.opportunity.lost", "close.opportunity.updated", "close.opportunity.won", "close.sequenceSubscription.created", "close.sequenceSubscription.deleted", "close.sequenceSubscription.errored", "close.sequenceSubscription.finished", "close.sequenceSubscription.goalReached", "close.sequenceSubscription.paused", "close.sequenceSubscription.resumed", "close.sequenceSubscription.updated", "close.smartView.created", "close.smartView.updated", "close.sms.received", "close.sms.sent", "close.task.completed", "close.task.created", "close.task.deleted", "close.task.updated"];
56
+ export declare const CLOSE_SMART_VIEW_MEMBERSHIP_EVENT_TYPES: readonly ["close.smartView.leadEntered", "close.smartView.leadExited"];
49
57
  export declare const closeTriggerContracts: {
50
58
  readonly "close.event": {
51
59
  readonly configSchema: z.ZodObject<{}, z.core.$strip>;
@@ -1974,6 +1982,138 @@ export declare const closeTriggerContracts: {
1974
1982
  objectType: z.ZodLiteral<"sequence_subscription">;
1975
1983
  }, z.core.$strip>;
1976
1984
  };
1985
+ readonly "close.smartView.created": {
1986
+ configSchema: z.ZodObject<{}, z.core.$strip>;
1987
+ eventSchema: z.ZodObject<{
1988
+ apiKeyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1989
+ changedFields: z.ZodPrefault<z.ZodArray<z.ZodString>>;
1990
+ createdAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>;
1991
+ id: z.ZodString;
1992
+ leadId: z.ZodNullable<z.ZodString>;
1993
+ meta: z.ZodPrefault<z.ZodCustom<Record<string, import("@automate.ax/codec").Encodable>, Record<string, import("@automate.ax/codec").Encodable>>>;
1994
+ objectId: z.ZodString;
1995
+ organizationId: z.ZodString;
1996
+ previousData: z.ZodNullable<z.ZodCustom<Record<string, import("@automate.ax/codec").Encodable>, Record<string, import("@automate.ax/codec").Encodable>>>;
1997
+ requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1998
+ updatedAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>;
1999
+ userId: z.ZodNullable<z.ZodString>;
2000
+ action: z.ZodLiteral<"created">;
2001
+ data: z.ZodObject<{
2002
+ createdAt: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>>;
2003
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2004
+ id: z.ZodOptional<z.ZodString>;
2005
+ isShared: z.ZodOptional<z.ZodBoolean>;
2006
+ isUserDependent: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
2007
+ name: z.ZodOptional<z.ZodString>;
2008
+ organizationId: z.ZodOptional<z.ZodString>;
2009
+ query: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2010
+ selectedFields: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodCustom<Record<string, import("@automate.ax/codec").Encodable>, Record<string, import("@automate.ax/codec").Encodable>>>>>>;
2011
+ sharedWith: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>>;
2012
+ sharingSettings: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
2013
+ createdAt: z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>>;
2014
+ createdById: z.ZodNullable<z.ZodString>;
2015
+ groupIds: z.ZodArray<z.ZodString>;
2016
+ updatedAt: z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>>;
2017
+ updatedById: z.ZodNullable<z.ZodString>;
2018
+ userIds: z.ZodArray<z.ZodString>;
2019
+ wholeOrg: z.ZodBoolean;
2020
+ }, z.core.$strip>>>>;
2021
+ sQuery: z.ZodOptional<z.ZodNullable<z.ZodCustom<Record<string, import("@automate.ax/codec").Encodable>, Record<string, import("@automate.ax/codec").Encodable>>>>;
2022
+ type: z.ZodOptional<z.ZodEnum<{
2023
+ email: "email";
2024
+ lead: "lead";
2025
+ contact: "contact";
2026
+ opportunity: "opportunity";
2027
+ call: "call";
2028
+ sms: "sms";
2029
+ meeting: "meeting";
2030
+ note: "note";
2031
+ whatsapp_message: "whatsapp_message";
2032
+ custom_activity: "custom_activity";
2033
+ form_submission: "form_submission";
2034
+ }>>;
2035
+ updatedAt: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>>;
2036
+ userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2037
+ usedRecently: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
2038
+ }, z.core.$strip>;
2039
+ objectType: z.ZodLiteral<"saved_search">;
2040
+ }, z.core.$strip>;
2041
+ };
2042
+ readonly "close.smartView.updated": {
2043
+ configSchema: z.ZodObject<{}, z.core.$strip>;
2044
+ eventSchema: z.ZodObject<{
2045
+ apiKeyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2046
+ changedFields: z.ZodPrefault<z.ZodArray<z.ZodString>>;
2047
+ createdAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>;
2048
+ id: z.ZodString;
2049
+ leadId: z.ZodNullable<z.ZodString>;
2050
+ meta: z.ZodPrefault<z.ZodCustom<Record<string, import("@automate.ax/codec").Encodable>, Record<string, import("@automate.ax/codec").Encodable>>>;
2051
+ objectId: z.ZodString;
2052
+ organizationId: z.ZodString;
2053
+ previousData: z.ZodNullable<z.ZodCustom<Record<string, import("@automate.ax/codec").Encodable>, Record<string, import("@automate.ax/codec").Encodable>>>;
2054
+ requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2055
+ updatedAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>;
2056
+ userId: z.ZodNullable<z.ZodString>;
2057
+ action: z.ZodLiteral<"updated">;
2058
+ data: z.ZodObject<{
2059
+ createdAt: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>>;
2060
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2061
+ id: z.ZodOptional<z.ZodString>;
2062
+ isShared: z.ZodOptional<z.ZodBoolean>;
2063
+ isUserDependent: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
2064
+ name: z.ZodOptional<z.ZodString>;
2065
+ organizationId: z.ZodOptional<z.ZodString>;
2066
+ query: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2067
+ selectedFields: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodCustom<Record<string, import("@automate.ax/codec").Encodable>, Record<string, import("@automate.ax/codec").Encodable>>>>>>;
2068
+ sharedWith: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>>;
2069
+ sharingSettings: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
2070
+ createdAt: z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>>;
2071
+ createdById: z.ZodNullable<z.ZodString>;
2072
+ groupIds: z.ZodArray<z.ZodString>;
2073
+ updatedAt: z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>>;
2074
+ updatedById: z.ZodNullable<z.ZodString>;
2075
+ userIds: z.ZodArray<z.ZodString>;
2076
+ wholeOrg: z.ZodBoolean;
2077
+ }, z.core.$strip>>>>;
2078
+ sQuery: z.ZodOptional<z.ZodNullable<z.ZodCustom<Record<string, import("@automate.ax/codec").Encodable>, Record<string, import("@automate.ax/codec").Encodable>>>>;
2079
+ type: z.ZodOptional<z.ZodEnum<{
2080
+ email: "email";
2081
+ lead: "lead";
2082
+ contact: "contact";
2083
+ opportunity: "opportunity";
2084
+ call: "call";
2085
+ sms: "sms";
2086
+ meeting: "meeting";
2087
+ note: "note";
2088
+ whatsapp_message: "whatsapp_message";
2089
+ custom_activity: "custom_activity";
2090
+ form_submission: "form_submission";
2091
+ }>>;
2092
+ updatedAt: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>>;
2093
+ userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2094
+ usedRecently: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
2095
+ }, z.core.$strip>;
2096
+ objectType: z.ZodLiteral<"saved_search">;
2097
+ }, z.core.$strip>;
2098
+ };
2099
+ readonly "close.smartView.leadEntered": {
2100
+ readonly configSchema: z.ZodObject<{
2101
+ smartViewId: z.ZodString;
2102
+ }, z.core.$strip>;
2103
+ readonly eventSchema: z.ZodObject<{
2104
+ leadId: z.ZodString;
2105
+ smartViewId: z.ZodString;
2106
+ }, z.core.$strip>;
2107
+ };
2108
+ readonly "close.smartView.leadExited": {
2109
+ readonly configSchema: z.ZodObject<{
2110
+ smartViewId: z.ZodString;
2111
+ }, z.core.$strip>;
2112
+ readonly eventSchema: z.ZodObject<{
2113
+ leadId: z.ZodString;
2114
+ smartViewId: z.ZodString;
2115
+ }, z.core.$strip>;
2116
+ };
1977
2117
  readonly "close.sms.received": {
1978
2118
  configSchema: z.ZodObject<{}, z.core.$strip>;
1979
2119
  eventSchema: z.ZodObject<{
@@ -3213,7 +3353,7 @@ export declare const closeTriggerContracts: {
3213
3353
  *
3214
3354
  * @param event - Normalized Close webhook event.
3215
3355
  */
3216
- export declare function getCloseSemanticEventTypes(event: z.output<typeof CLOSE_EVENT_SCHEMA>): ("close.call.answered" | "close.call.completed" | "close.comment.created" | "close.comment.deleted" | "close.comment.updated" | "close.contact.created" | "close.contact.deleted" | "close.contact.updated" | "close.email.received" | "close.email.sent" | "close.lead.created" | "close.lead.deleted" | "close.lead.merged" | "close.lead.updated" | "close.meeting.canceled" | "close.meeting.completed" | "close.meeting.scheduled" | "close.meeting.started" | "close.opportunity.created" | "close.opportunity.deleted" | "close.opportunity.lost" | "close.opportunity.updated" | "close.opportunity.won" | "close.sequenceSubscription.created" | "close.sequenceSubscription.deleted" | "close.sequenceSubscription.errored" | "close.sequenceSubscription.finished" | "close.sequenceSubscription.goalReached" | "close.sequenceSubscription.paused" | "close.sequenceSubscription.resumed" | "close.sequenceSubscription.updated" | "close.sms.received" | "close.sms.sent" | "close.task.completed" | "close.task.created" | "close.task.deleted" | "close.task.updated")[];
3356
+ export declare function getCloseSemanticEventTypes(event: z.output<typeof CLOSE_EVENT_SCHEMA>): ("close.call.answered" | "close.call.completed" | "close.comment.created" | "close.comment.deleted" | "close.comment.updated" | "close.contact.created" | "close.contact.deleted" | "close.contact.updated" | "close.email.received" | "close.email.sent" | "close.lead.created" | "close.lead.deleted" | "close.lead.merged" | "close.lead.updated" | "close.meeting.canceled" | "close.meeting.completed" | "close.meeting.scheduled" | "close.meeting.started" | "close.opportunity.created" | "close.opportunity.deleted" | "close.opportunity.lost" | "close.opportunity.updated" | "close.opportunity.won" | "close.sequenceSubscription.created" | "close.sequenceSubscription.deleted" | "close.sequenceSubscription.errored" | "close.sequenceSubscription.finished" | "close.sequenceSubscription.goalReached" | "close.sequenceSubscription.paused" | "close.sequenceSubscription.resumed" | "close.sequenceSubscription.updated" | "close.smartView.created" | "close.smartView.updated" | "close.sms.received" | "close.sms.sent" | "close.task.completed" | "close.task.created" | "close.task.deleted" | "close.task.updated")[];
3217
3357
  /**
3218
3358
  * Resolves the provider event selections needed by a Close trigger type.
3219
3359
  *
@@ -1,6 +1,6 @@
1
1
  import * as z from "zod";
2
2
  import { CLOSE_OBJECT_SCHEMA } from "./api.js";
3
- import { CLOSE_CALL_SCHEMA, CLOSE_COMMENT_SCHEMA, CLOSE_DATE_SCHEMA, CLOSE_CONTACT_SCHEMA, CLOSE_EMAIL_SCHEMA, CLOSE_LEAD_SCHEMA, CLOSE_MEETING_SCHEMA, CLOSE_OPPORTUNITY_SCHEMA, CLOSE_SEQUENCE_SUBSCRIPTION_SCHEMA, CLOSE_SMS_SCHEMA, CLOSE_TASK_SCHEMA, } from "./schemas.js";
3
+ import { CLOSE_CALL_SCHEMA, CLOSE_COMMENT_SCHEMA, CLOSE_DATE_SCHEMA, CLOSE_CONTACT_SCHEMA, CLOSE_EMAIL_SCHEMA, CLOSE_LEAD_SCHEMA, CLOSE_MEETING_SCHEMA, CLOSE_OPPORTUNITY_SCHEMA, CLOSE_SEQUENCE_SUBSCRIPTION_SCHEMA, CLOSE_SMART_VIEW_SCHEMA, CLOSE_SMS_SCHEMA, CLOSE_TASK_SCHEMA, } from "./schemas.js";
4
4
  /**
5
5
  * Object-action pairs accepted by Close's webhook subscription API.
6
6
  *
@@ -209,6 +209,13 @@ export const CLOSE_WEBHOOK_PAYLOAD_SCHEMA = z.object({
209
209
  subscriptionId: z.string(),
210
210
  });
211
211
  export const CLOSE_TRIGGER_CONFIG_SCHEMA = z.object({});
212
+ export const CLOSE_SMART_VIEW_MEMBERSHIP_TRIGGER_CONFIG_SCHEMA = z.object({
213
+ smartViewId: z.string().startsWith("save_"),
214
+ });
215
+ export const CLOSE_SMART_VIEW_MEMBERSHIP_EVENT_SCHEMA = z.object({
216
+ leadId: z.string().startsWith("lead_"),
217
+ smartViewId: z.string().startsWith("save_"),
218
+ });
212
219
  // Event snapshots can omit fields that are required by the current REST
213
220
  // resource. Close's documented opportunity-won webhook is one such payload.
214
221
  const CLOSE_CALL_EVENT_DATA_SCHEMA = CLOSE_CALL_SCHEMA.partial();
@@ -222,6 +229,7 @@ const CLOSE_LEAD_EVENT_DATA_SCHEMA = CLOSE_LEAD_SCHEMA.partial();
222
229
  const CLOSE_MEETING_EVENT_DATA_SCHEMA = CLOSE_MEETING_SCHEMA.partial();
223
230
  const CLOSE_OPPORTUNITY_EVENT_DATA_SCHEMA = CLOSE_OPPORTUNITY_SCHEMA.partial();
224
231
  const CLOSE_SEQUENCE_SUBSCRIPTION_EVENT_DATA_SCHEMA = CLOSE_SEQUENCE_SUBSCRIPTION_SCHEMA.partial();
232
+ const CLOSE_SMART_VIEW_EVENT_DATA_SCHEMA = CLOSE_SMART_VIEW_SCHEMA.partial();
225
233
  const CLOSE_SMS_EVENT_DATA_SCHEMA = CLOSE_SMS_SCHEMA.partial();
226
234
  const CLOSE_DELETED_EVENT_DATA_SCHEMA = z.union([
227
235
  z.null(),
@@ -365,6 +373,16 @@ const SEMANTIC_EVENTS = {
365
373
  "updated",
366
374
  CLOSE_SEQUENCE_SUBSCRIPTION_EVENT_DATA_SCHEMA,
367
375
  ],
376
+ "close.smartView.created": [
377
+ "saved_search",
378
+ "created",
379
+ CLOSE_SMART_VIEW_EVENT_DATA_SCHEMA,
380
+ ],
381
+ "close.smartView.updated": [
382
+ "saved_search",
383
+ "updated",
384
+ CLOSE_SMART_VIEW_EVENT_DATA_SCHEMA,
385
+ ],
368
386
  "close.sms.received": [
369
387
  "activity.sms",
370
388
  "created",
@@ -408,6 +426,8 @@ export const CLOSE_SEMANTIC_EVENT_TYPES = [
408
426
  "close.sequenceSubscription.paused",
409
427
  "close.sequenceSubscription.resumed",
410
428
  "close.sequenceSubscription.updated",
429
+ "close.smartView.created",
430
+ "close.smartView.updated",
411
431
  "close.sms.received",
412
432
  "close.sms.sent",
413
433
  "close.task.completed",
@@ -415,6 +435,10 @@ export const CLOSE_SEMANTIC_EVENT_TYPES = [
415
435
  "close.task.deleted",
416
436
  "close.task.updated",
417
437
  ];
438
+ export const CLOSE_SMART_VIEW_MEMBERSHIP_EVENT_TYPES = [
439
+ "close.smartView.leadEntered",
440
+ "close.smartView.leadExited",
441
+ ];
418
442
  export const closeTriggerContracts = {
419
443
  "close.event": {
420
444
  configSchema: CLOSE_TRIGGER_CONFIG_SCHEMA,
@@ -451,6 +475,16 @@ export const closeTriggerContracts = {
451
475
  "close.sequenceSubscription.paused": semanticContract("sequence_subscription", "updated", CLOSE_SEQUENCE_SUBSCRIPTION_EVENT_DATA_SCHEMA),
452
476
  "close.sequenceSubscription.resumed": semanticContract("sequence_subscription", "updated", CLOSE_SEQUENCE_SUBSCRIPTION_EVENT_DATA_SCHEMA),
453
477
  "close.sequenceSubscription.updated": semanticContract("sequence_subscription", "updated", CLOSE_SEQUENCE_SUBSCRIPTION_EVENT_DATA_SCHEMA),
478
+ "close.smartView.created": semanticContract("saved_search", "created", CLOSE_SMART_VIEW_EVENT_DATA_SCHEMA),
479
+ "close.smartView.updated": semanticContract("saved_search", "updated", CLOSE_SMART_VIEW_EVENT_DATA_SCHEMA),
480
+ "close.smartView.leadEntered": {
481
+ configSchema: CLOSE_SMART_VIEW_MEMBERSHIP_TRIGGER_CONFIG_SCHEMA,
482
+ eventSchema: CLOSE_SMART_VIEW_MEMBERSHIP_EVENT_SCHEMA,
483
+ },
484
+ "close.smartView.leadExited": {
485
+ configSchema: CLOSE_SMART_VIEW_MEMBERSHIP_TRIGGER_CONFIG_SCHEMA,
486
+ eventSchema: CLOSE_SMART_VIEW_MEMBERSHIP_EVENT_SCHEMA,
487
+ },
454
488
  "close.sms.received": semanticContract("activity.sms", "created", CLOSE_SMS_EVENT_DATA_SCHEMA),
455
489
  "close.sms.sent": semanticContract("activity.sms", "sent", CLOSE_SMS_EVENT_DATA_SCHEMA),
456
490
  "close.task.completed": taskContract("completed", CLOSE_TASK_EVENT_DATA_SCHEMA),
@@ -85,6 +85,66 @@ export declare const CLOSE_CONTACT_SCHEMA: z.ZodObject<{
85
85
  url: z.ZodString;
86
86
  }, z.core.$strip>>>;
87
87
  }, z.core.$strip>;
88
+ export declare const CLOSE_SMART_VIEW_TYPE_SCHEMA: z.ZodEnum<{
89
+ email: "email";
90
+ lead: "lead";
91
+ contact: "contact";
92
+ opportunity: "opportunity";
93
+ call: "call";
94
+ sms: "sms";
95
+ meeting: "meeting";
96
+ note: "note";
97
+ whatsapp_message: "whatsapp_message";
98
+ custom_activity: "custom_activity";
99
+ form_submission: "form_submission";
100
+ }>;
101
+ export declare const CLOSE_SMART_VIEW_SHARING_SETTINGS_SCHEMA: z.ZodObject<{
102
+ createdAt: z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>>;
103
+ createdById: z.ZodNullable<z.ZodString>;
104
+ groupIds: z.ZodArray<z.ZodString>;
105
+ updatedAt: z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>>;
106
+ updatedById: z.ZodNullable<z.ZodString>;
107
+ userIds: z.ZodArray<z.ZodString>;
108
+ wholeOrg: z.ZodBoolean;
109
+ }, z.core.$strip>;
110
+ export declare const CLOSE_SMART_VIEW_SCHEMA: z.ZodObject<{
111
+ createdAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>;
112
+ description: z.ZodNullable<z.ZodString>;
113
+ id: z.ZodString;
114
+ isShared: z.ZodBoolean;
115
+ isUserDependent: z.ZodNullable<z.ZodBoolean>;
116
+ name: z.ZodString;
117
+ organizationId: z.ZodString;
118
+ query: z.ZodNullable<z.ZodString>;
119
+ selectedFields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodCustom<Record<string, import("@automate.ax/codec").Encodable>, Record<string, import("@automate.ax/codec").Encodable>>>>>;
120
+ sharedWith: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
121
+ sharingSettings: z.ZodOptional<z.ZodNullable<z.ZodObject<{
122
+ createdAt: z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>>;
123
+ createdById: z.ZodNullable<z.ZodString>;
124
+ groupIds: z.ZodArray<z.ZodString>;
125
+ updatedAt: z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>>;
126
+ updatedById: z.ZodNullable<z.ZodString>;
127
+ userIds: z.ZodArray<z.ZodString>;
128
+ wholeOrg: z.ZodBoolean;
129
+ }, z.core.$strip>>>;
130
+ sQuery: z.ZodNullable<z.ZodCustom<Record<string, import("@automate.ax/codec").Encodable>, Record<string, import("@automate.ax/codec").Encodable>>>;
131
+ type: z.ZodEnum<{
132
+ email: "email";
133
+ lead: "lead";
134
+ contact: "contact";
135
+ opportunity: "opportunity";
136
+ call: "call";
137
+ sms: "sms";
138
+ meeting: "meeting";
139
+ note: "note";
140
+ whatsapp_message: "whatsapp_message";
141
+ custom_activity: "custom_activity";
142
+ form_submission: "form_submission";
143
+ }>;
144
+ updatedAt: z.ZodPipe<z.ZodUnion<readonly [z.ZodDate, z.ZodString]>, z.ZodTransform<Date, string | Date>>;
145
+ userId: z.ZodNullable<z.ZodString>;
146
+ usedRecently: z.ZodOptional<z.ZodBoolean>;
147
+ }, z.core.$strip>;
88
148
  export declare const CLOSE_OPPORTUNITY_STATUS_TYPE_SCHEMA: z.ZodEnum<{
89
149
  active: "active";
90
150
  lost: "lost";
@@ -72,6 +72,46 @@ export const CLOSE_CONTACT_SCHEMA = z.object({
72
72
  updatedBy: z.string().nullable(),
73
73
  urls: CLOSE_CONTACT_URL_SCHEMA.array().prefault([]),
74
74
  });
75
+ export const CLOSE_SMART_VIEW_TYPE_SCHEMA = z.enum([
76
+ "lead",
77
+ "contact",
78
+ "opportunity",
79
+ "call",
80
+ "email",
81
+ "sms",
82
+ "meeting",
83
+ "note",
84
+ "whatsapp_message",
85
+ "custom_activity",
86
+ "form_submission",
87
+ ]);
88
+ export const CLOSE_SMART_VIEW_SHARING_SETTINGS_SCHEMA = z.object({
89
+ createdAt: DATE_SCHEMA.nullable(),
90
+ createdById: z.string().nullable(),
91
+ groupIds: z.string().array(),
92
+ updatedAt: DATE_SCHEMA.nullable(),
93
+ updatedById: z.string().nullable(),
94
+ userIds: z.string().array(),
95
+ wholeOrg: z.boolean(),
96
+ });
97
+ export const CLOSE_SMART_VIEW_SCHEMA = z.object({
98
+ createdAt: DATE_SCHEMA,
99
+ description: z.string().nullable(),
100
+ id: z.string(),
101
+ isShared: z.boolean(),
102
+ isUserDependent: z.boolean().nullable(),
103
+ name: z.string(),
104
+ organizationId: z.string(),
105
+ query: z.string().nullable(),
106
+ selectedFields: CLOSE_OBJECT_SCHEMA.array().nullable().optional(),
107
+ sharedWith: z.string().array().nullable().optional(),
108
+ sharingSettings: CLOSE_SMART_VIEW_SHARING_SETTINGS_SCHEMA.nullable().optional(),
109
+ sQuery: CLOSE_OBJECT_SCHEMA.nullable(),
110
+ type: CLOSE_SMART_VIEW_TYPE_SCHEMA,
111
+ updatedAt: DATE_SCHEMA,
112
+ userId: z.string().nullable(),
113
+ usedRecently: z.boolean().optional(),
114
+ });
75
115
  export const CLOSE_OPPORTUNITY_STATUS_TYPE_SCHEMA = z.enum([
76
116
  "active",
77
117
  "lost",
@@ -1,5 +1,5 @@
1
1
  import * as z from "zod";
2
- import { NOTION_EVENT_SCHEMA, notionSemanticEventSchema, } from "./schemas.js";
2
+ import { NOTION_PUBLIC_EVENT_SCHEMA, notionSemanticEventSchema, } from "./schemas.js";
3
3
  export * from "./schemas.js";
4
4
  export const NOTION_TRIGGER_CONFIG_SCHEMA = z.object({});
5
5
  export const NOTION_WEBHOOK_EVENT_TYPES = [
@@ -80,7 +80,7 @@ export const notionTriggerContracts = {
80
80
  "notion.dataSource.undeleted": semanticContract("data_source.undeleted"),
81
81
  "notion.event": {
82
82
  configSchema: NOTION_TRIGGER_CONFIG_SCHEMA,
83
- eventSchema: NOTION_EVENT_SCHEMA,
83
+ eventSchema: NOTION_PUBLIC_EVENT_SCHEMA,
84
84
  },
85
85
  "notion.fileUpload.completed": semanticContract("file_upload.completed"),
86
86
  "notion.fileUpload.created": semanticContract("file_upload.created"),