@automate.ax/catalog 0.143.9 → 0.144.1

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.
package/dist/catalog.d.ts CHANGED
@@ -114,6 +114,16 @@ export declare const asanaService: {
114
114
  readonly id: "asana";
115
115
  readonly name: "Asana";
116
116
  };
117
+ export declare const calendlyService: {
118
+ readonly connectionMethods: readonly [{
119
+ readonly id: "oauth";
120
+ readonly name: "OAuth";
121
+ readonly type: "redirect";
122
+ }];
123
+ readonly description: "Connect Calendly for scheduling actions and signed lifecycle triggers.";
124
+ readonly id: "calendly";
125
+ readonly name: "Calendly";
126
+ };
117
127
  export declare const automateService: {
118
128
  readonly connectionMethods: readonly [{
119
129
  readonly credentialUrl: "https://docs.automate.ax/reference/integrations/automate/overview";
@@ -1207,6 +1217,15 @@ export declare const integrationCatalog: readonly [{
1207
1217
  readonly description: "Connect an Asana account.";
1208
1218
  readonly id: "asana";
1209
1219
  readonly name: "Asana";
1220
+ }, {
1221
+ readonly connectionMethods: readonly [{
1222
+ readonly id: "oauth";
1223
+ readonly name: "OAuth";
1224
+ readonly type: "redirect";
1225
+ }];
1226
+ readonly description: "Connect Calendly for scheduling actions and signed lifecycle triggers.";
1227
+ readonly id: "calendly";
1228
+ readonly name: "Calendly";
1210
1229
  }, {
1211
1230
  readonly connectionMethods: readonly [{
1212
1231
  readonly credentialUrl: "https://docs.automate.ax/reference/integrations/automate/overview";
package/dist/catalog.js CHANGED
@@ -109,6 +109,12 @@ export const asanaService = defineIntegrationService({
109
109
  id: "asana",
110
110
  name: "Asana",
111
111
  });
112
+ export const calendlyService = defineIntegrationService({
113
+ connectionMethods: [{ id: "oauth", name: "OAuth", type: "redirect" }],
114
+ description: "Connect Calendly for scheduling actions and signed lifecycle triggers.",
115
+ id: "calendly",
116
+ name: "Calendly",
117
+ });
112
118
  export const automateService = defineIntegrationService({
113
119
  connectionMethods: [
114
120
  {
@@ -787,6 +793,7 @@ export const integrationCatalog = defineIntegrationCatalog([
787
793
  apolloService,
788
794
  apifyService,
789
795
  asanaService,
796
+ calendlyService,
790
797
  automateService,
791
798
  axiomService,
792
799
  brevoService,
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { airtableService, anthropicService, apolloService, apifyService, asanaService, automateService, axiomService, brevoService, browserbaseService, cerebrasService, chatgptService, cloudflareService, metaAdsService, closeService, closeBotService, clickUpService, codexService, cohereService, convexService, discordService, deepinfraService, deepseekService, firecrawlService, fireworksService, getIntegrationService, githubService, googleGenaiService, googleService, groqService, huggingfaceService, hubspotService, integrationCatalog, jobNimbusService, linearService, microsoftService, millionverifierService, mistralService, notionService, openaiService, onePasswordService, openrouterService, perplexityService, postgresService, redditService, resendService, scrapflyService, slackService, stripeService, tidycalService, togetheraiService, trelloService, vercelAiGatewayService, vercelService, webflowService, whatsappService, xaiService, type IntegrationServiceId, } from "./catalog.js";
1
+ export { airtableService, anthropicService, apolloService, apifyService, asanaService, calendlyService, automateService, axiomService, brevoService, browserbaseService, cerebrasService, chatgptService, cloudflareService, metaAdsService, closeService, closeBotService, clickUpService, codexService, cohereService, convexService, discordService, deepinfraService, deepseekService, firecrawlService, fireworksService, getIntegrationService, githubService, googleGenaiService, googleService, groqService, huggingfaceService, hubspotService, integrationCatalog, jobNimbusService, linearService, microsoftService, millionverifierService, mistralService, notionService, openaiService, onePasswordService, openrouterService, perplexityService, postgresService, redditService, resendService, scrapflyService, slackService, stripeService, tidycalService, togetheraiService, trelloService, vercelAiGatewayService, vercelService, webflowService, whatsappService, xaiService, type IntegrationServiceId, } from "./catalog.js";
2
2
  export { defineIntegrationCatalog, defineIntegrationService, integrationScope, type IntegrationAccountConnectionOption, type IntegrationAccountRequirement, type IntegrationConnectionDefinition, type IntegrationConnectionNotice, type IntegrationFormField, type IntegrationScopeRequirement, type IntegrationServiceDefinition, type ScopeRequirementGroup, type TriggerAccountRequirement, type TriggerDefinition, type TriggerPresentation, type TriggerPresentationContext, type TriggerPresentationDetail, type TriggerScopePresentation, type TriggerPresentationValue, } from "./types.js";
3
- export { getDashboardRunEndpoint, getDashboardRunEndpointKey, getHttpTriggerEndpoint, getHttpTriggerEndpointKey, getMailhookAddress, getMailhookAddressKey, DASHBOARD_RUN_CONFIG_SCHEMA, getTriggerDefinition, getTriggerName, getTriggerPresentation, isTriggerVisible, PLATFORM_EMAIL_DOMAIN, triggerCatalog, triggerDefinitions, type DashboardRunConfig, type DashboardRunEndpointOptions, type DashboardRunField, type HttpTriggerEndpointOptions, type HttpTriggerScope, type MailhookAddressOptions, type MailhookScope, type TriggerType, } from "./triggers/index.js";
3
+ export { getDashboardRunEndpoint, getDashboardRunEndpointKey, getHttpTriggerEndpoint, getHttpTriggerEndpointKey, getMailhookAddress, getMailhookAddressKey, DASHBOARD_RUN_CONFIG_SCHEMA, DASHBOARD_RUN_FIELDS_SCHEMA, getDashboardRunFieldDefaultValue, isDashboardRunFieldValueValid, getTriggerDefinition, getTriggerName, getTriggerPresentation, isTriggerVisible, PLATFORM_EMAIL_DOMAIN, triggerCatalog, triggerDefinitions, type DashboardRunConfig, type DashboardRunEndpointOptions, type DashboardRunField, type DashboardRunFieldValue, type HttpTriggerEndpointOptions, type HttpTriggerScope, type MailhookAddressOptions, type MailhookScope, type TriggerType, } from "./triggers/index.js";
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { airtableService, anthropicService, apolloService, apifyService, asanaService, automateService, axiomService, brevoService, browserbaseService, cerebrasService, chatgptService, cloudflareService, metaAdsService, closeService, closeBotService, clickUpService, codexService, cohereService, convexService, discordService, deepinfraService, deepseekService, firecrawlService, fireworksService, getIntegrationService, githubService, googleGenaiService, googleService, groqService, huggingfaceService, hubspotService, integrationCatalog, jobNimbusService, linearService, microsoftService, millionverifierService, mistralService, notionService, openaiService, onePasswordService, openrouterService, perplexityService, postgresService, redditService, resendService, scrapflyService, slackService, stripeService, tidycalService, togetheraiService, trelloService, vercelAiGatewayService, vercelService, webflowService, whatsappService, xaiService, } from "./catalog.js";
1
+ export { airtableService, anthropicService, apolloService, apifyService, asanaService, calendlyService, automateService, axiomService, brevoService, browserbaseService, cerebrasService, chatgptService, cloudflareService, metaAdsService, closeService, closeBotService, clickUpService, codexService, cohereService, convexService, discordService, deepinfraService, deepseekService, firecrawlService, fireworksService, getIntegrationService, githubService, googleGenaiService, googleService, groqService, huggingfaceService, hubspotService, integrationCatalog, jobNimbusService, linearService, microsoftService, millionverifierService, mistralService, notionService, openaiService, onePasswordService, openrouterService, perplexityService, postgresService, redditService, resendService, scrapflyService, slackService, stripeService, tidycalService, togetheraiService, trelloService, vercelAiGatewayService, vercelService, webflowService, whatsappService, xaiService, } from "./catalog.js";
2
2
  export { defineIntegrationCatalog, defineIntegrationService, integrationScope, } from "./types.js";
3
- export { getDashboardRunEndpoint, getDashboardRunEndpointKey, getHttpTriggerEndpoint, getHttpTriggerEndpointKey, getMailhookAddress, getMailhookAddressKey, DASHBOARD_RUN_CONFIG_SCHEMA, getTriggerDefinition, getTriggerName, getTriggerPresentation, isTriggerVisible, PLATFORM_EMAIL_DOMAIN, triggerCatalog, triggerDefinitions, } from "./triggers/index.js";
3
+ export { getDashboardRunEndpoint, getDashboardRunEndpointKey, getHttpTriggerEndpoint, getHttpTriggerEndpointKey, getMailhookAddress, getMailhookAddressKey, DASHBOARD_RUN_CONFIG_SCHEMA, DASHBOARD_RUN_FIELDS_SCHEMA, getDashboardRunFieldDefaultValue, isDashboardRunFieldValueValid, getTriggerDefinition, getTriggerName, getTriggerPresentation, isTriggerVisible, PLATFORM_EMAIL_DOMAIN, triggerCatalog, triggerDefinitions, } from "./triggers/index.js";
@@ -0,0 +1,113 @@
1
+ import type { TriggerPresentationContext } from "../types.js";
2
+ export declare const calendlyTriggerDefinitions: {
3
+ readonly calendlyEventTypeCreated: {
4
+ readonly account: {
5
+ readonly connectionOptions: readonly [{
6
+ readonly connectionMethodId: "oauth";
7
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
8
+ }];
9
+ readonly serviceId: "calendly";
10
+ };
11
+ readonly getPrimary: typeof calendlyScopePrimary;
12
+ readonly type: "calendly.event-type.created";
13
+ };
14
+ readonly calendlyEventTypeDeleted: {
15
+ readonly account: {
16
+ readonly connectionOptions: readonly [{
17
+ readonly connectionMethodId: "oauth";
18
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
19
+ }];
20
+ readonly serviceId: "calendly";
21
+ };
22
+ readonly getPrimary: typeof calendlyScopePrimary;
23
+ readonly type: "calendly.event-type.deleted";
24
+ };
25
+ readonly calendlyEventTypeUpdated: {
26
+ readonly account: {
27
+ readonly connectionOptions: readonly [{
28
+ readonly connectionMethodId: "oauth";
29
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
30
+ }];
31
+ readonly serviceId: "calendly";
32
+ };
33
+ readonly getPrimary: typeof calendlyScopePrimary;
34
+ readonly type: "calendly.event-type.updated";
35
+ };
36
+ readonly calendlyInviteeCanceled: {
37
+ readonly account: {
38
+ readonly connectionOptions: readonly [{
39
+ readonly connectionMethodId: "oauth";
40
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
41
+ }];
42
+ readonly serviceId: "calendly";
43
+ };
44
+ readonly getPrimary: typeof calendlyScopePrimary;
45
+ readonly type: "calendly.invitee.canceled";
46
+ };
47
+ readonly calendlyInviteeCreated: {
48
+ readonly account: {
49
+ readonly connectionOptions: readonly [{
50
+ readonly connectionMethodId: "oauth";
51
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
52
+ }];
53
+ readonly serviceId: "calendly";
54
+ };
55
+ readonly getPrimary: typeof calendlyScopePrimary;
56
+ readonly type: "calendly.invitee.created";
57
+ };
58
+ readonly calendlyInviteeNoShowCreated: {
59
+ readonly account: {
60
+ readonly connectionOptions: readonly [{
61
+ readonly connectionMethodId: "oauth";
62
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
63
+ }];
64
+ readonly serviceId: "calendly";
65
+ };
66
+ readonly getPrimary: typeof calendlyScopePrimary;
67
+ readonly type: "calendly.invitee-no-show.created";
68
+ };
69
+ readonly calendlyInviteeNoShowDeleted: {
70
+ readonly account: {
71
+ readonly connectionOptions: readonly [{
72
+ readonly connectionMethodId: "oauth";
73
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
74
+ }];
75
+ readonly serviceId: "calendly";
76
+ };
77
+ readonly getPrimary: typeof calendlyScopePrimary;
78
+ readonly type: "calendly.invitee-no-show.deleted";
79
+ };
80
+ readonly calendlyRoutingFormSubmissionCreated: {
81
+ readonly account: {
82
+ readonly connectionOptions: readonly [{
83
+ readonly connectionMethodId: "oauth";
84
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
85
+ }];
86
+ readonly serviceId: "calendly";
87
+ };
88
+ readonly getPrimary: typeof calendlyScopePrimary;
89
+ readonly type: "calendly.routing-form-submission.created";
90
+ };
91
+ readonly calendlySchedulingEvent: {
92
+ readonly account: {
93
+ readonly connectionOptions: readonly [{
94
+ readonly connectionMethodId: "oauth";
95
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
96
+ }];
97
+ readonly serviceId: "calendly";
98
+ };
99
+ readonly getPrimary: typeof calendlyScopePrimary;
100
+ readonly type: "calendly.scheduling.event";
101
+ };
102
+ };
103
+ /**
104
+ * Presents the provider webhook scope as a trigger identity.
105
+ *
106
+ * @param context - Trigger presentation context.
107
+ * @throws When the stored trigger configuration lacks a scope.
108
+ */
109
+ declare function calendlyScopePrimary(context: TriggerPresentationContext): {
110
+ copyable: boolean;
111
+ value: string;
112
+ };
113
+ export {};
@@ -0,0 +1,50 @@
1
+ import { integrationScope } from "../types.js";
2
+ const WEBHOOK_SCOPE = "webhooks:write";
3
+ const SCHEDULED_SCOPE = integrationScope.and(WEBHOOK_SCOPE, "scheduled_events:read");
4
+ const EVENT_TYPE_SCOPE = integrationScope.and(WEBHOOK_SCOPE, "event_types:read");
5
+ const ROUTING_SCOPE = integrationScope.and(WEBHOOK_SCOPE, "routing_forms:read");
6
+ const ALL_SCOPE = integrationScope.and(WEBHOOK_SCOPE, "event_types:read", "routing_forms:read", "scheduled_events:read");
7
+ export const calendlyTriggerDefinitions = {
8
+ calendlyEventTypeCreated: definition("calendly.event-type.created", EVENT_TYPE_SCOPE),
9
+ calendlyEventTypeDeleted: definition("calendly.event-type.deleted", EVENT_TYPE_SCOPE),
10
+ calendlyEventTypeUpdated: definition("calendly.event-type.updated", EVENT_TYPE_SCOPE),
11
+ calendlyInviteeCanceled: definition("calendly.invitee.canceled", SCHEDULED_SCOPE),
12
+ calendlyInviteeCreated: definition("calendly.invitee.created", SCHEDULED_SCOPE),
13
+ calendlyInviteeNoShowCreated: definition("calendly.invitee-no-show.created", SCHEDULED_SCOPE),
14
+ calendlyInviteeNoShowDeleted: definition("calendly.invitee-no-show.deleted", SCHEDULED_SCOPE),
15
+ calendlyRoutingFormSubmissionCreated: definition("calendly.routing-form-submission.created", ROUTING_SCOPE),
16
+ calendlySchedulingEvent: definition("calendly.scheduling.event", ALL_SCOPE),
17
+ };
18
+ /**
19
+ * Builds a Calendly trigger catalog definition.
20
+ *
21
+ * @param type - Public event type.
22
+ * @param requiredScope - Combined OAuth scope requirement.
23
+ */
24
+ function definition(type, requiredScope) {
25
+ return {
26
+ account: {
27
+ connectionOptions: [
28
+ { connectionMethodId: "oauth", requiredScopes: [requiredScope] },
29
+ ],
30
+ serviceId: "calendly",
31
+ },
32
+ getPrimary: calendlyScopePrimary,
33
+ type,
34
+ };
35
+ }
36
+ /**
37
+ * Presents the provider webhook scope as a trigger identity.
38
+ *
39
+ * @param context - Trigger presentation context.
40
+ * @throws When the stored trigger configuration lacks a scope.
41
+ */
42
+ function calendlyScopePrimary(context) {
43
+ if (typeof context.config !== "object" ||
44
+ context.config === null ||
45
+ !("scope" in context.config) ||
46
+ typeof context.config.scope !== "string") {
47
+ throw new TypeError("Calendly trigger configuration requires a scope.");
48
+ }
49
+ return { copyable: false, value: context.config.scope };
50
+ }
@@ -1,4 +1,277 @@
1
1
  import * as z from "zod/mini";
2
+ export declare const DASHBOARD_RUN_FIELDS_SCHEMA: z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
3
+ defaultValue: z.ZodMiniOptional<z.ZodMiniString<string>>;
4
+ maxLength: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
5
+ minLength: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
6
+ placeholder: z.ZodMiniOptional<z.ZodMiniString<string>>;
7
+ required: z.ZodMiniPrefault<z.ZodMiniBoolean<boolean>>;
8
+ type: z.ZodMiniEnum<{
9
+ email: "email";
10
+ text: "text";
11
+ url: "url";
12
+ phone: "phone";
13
+ textarea: "textarea";
14
+ }>;
15
+ description: z.ZodMiniOptional<z.ZodMiniString<string>>;
16
+ label: z.ZodMiniOptional<z.ZodMiniString<string>>;
17
+ name: z.ZodMiniString<string>;
18
+ }, z.core.$strip>, z.ZodMiniObject<{
19
+ defaultValue: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
20
+ max: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
21
+ min: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
22
+ placeholder: z.ZodMiniOptional<z.ZodMiniString<string>>;
23
+ required: z.ZodMiniPrefault<z.ZodMiniBoolean<boolean>>;
24
+ step: z.ZodMiniPrefault<z.ZodMiniNumber<number>>;
25
+ type: z.ZodMiniLiteral<"number">;
26
+ description: z.ZodMiniOptional<z.ZodMiniString<string>>;
27
+ label: z.ZodMiniOptional<z.ZodMiniString<string>>;
28
+ name: z.ZodMiniString<string>;
29
+ }, z.core.$strip>, z.ZodMiniObject<{
30
+ defaultValue: z.ZodMiniOptional<z.iso.ZodMiniISODate>;
31
+ max: z.ZodMiniOptional<z.iso.ZodMiniISODate>;
32
+ min: z.ZodMiniOptional<z.iso.ZodMiniISODate>;
33
+ required: z.ZodMiniPrefault<z.ZodMiniBoolean<boolean>>;
34
+ step: z.ZodMiniPrefault<z.ZodMiniNumberFormat>;
35
+ type: z.ZodMiniLiteral<"date">;
36
+ description: z.ZodMiniOptional<z.ZodMiniString<string>>;
37
+ label: z.ZodMiniOptional<z.ZodMiniString<string>>;
38
+ name: z.ZodMiniString<string>;
39
+ }, z.core.$strip>, z.ZodMiniObject<{
40
+ defaultValue: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
41
+ max: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
42
+ min: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
43
+ required: z.ZodMiniPrefault<z.ZodMiniBoolean<boolean>>;
44
+ step: z.ZodMiniPrefault<z.ZodMiniNumber<number>>;
45
+ type: z.ZodMiniLiteral<"datetime">;
46
+ description: z.ZodMiniOptional<z.ZodMiniString<string>>;
47
+ label: z.ZodMiniOptional<z.ZodMiniString<string>>;
48
+ name: z.ZodMiniString<string>;
49
+ }, z.core.$strip>, z.ZodMiniObject<{
50
+ type: z.ZodMiniLiteral<"select">;
51
+ defaultValue: z.ZodMiniOptional<z.ZodMiniString<string>>;
52
+ options: z.ZodMiniArray<z.ZodMiniObject<{
53
+ label: z.ZodMiniString<string>;
54
+ value: z.ZodMiniString<string>;
55
+ }, z.core.$strip>>;
56
+ placeholder: z.ZodMiniOptional<z.ZodMiniString<string>>;
57
+ required: z.ZodMiniPrefault<z.ZodMiniBoolean<boolean>>;
58
+ description: z.ZodMiniOptional<z.ZodMiniString<string>>;
59
+ label: z.ZodMiniOptional<z.ZodMiniString<string>>;
60
+ name: z.ZodMiniString<string>;
61
+ }, z.core.$strip>, z.ZodMiniObject<{
62
+ type: z.ZodMiniLiteral<"radio">;
63
+ defaultValue: z.ZodMiniOptional<z.ZodMiniString<string>>;
64
+ options: z.ZodMiniArray<z.ZodMiniObject<{
65
+ label: z.ZodMiniString<string>;
66
+ value: z.ZodMiniString<string>;
67
+ }, z.core.$strip>>;
68
+ placeholder: z.ZodMiniOptional<z.ZodMiniString<string>>;
69
+ required: z.ZodMiniPrefault<z.ZodMiniBoolean<boolean>>;
70
+ description: z.ZodMiniOptional<z.ZodMiniString<string>>;
71
+ label: z.ZodMiniOptional<z.ZodMiniString<string>>;
72
+ name: z.ZodMiniString<string>;
73
+ }, z.core.$strip>, z.ZodMiniObject<{
74
+ defaultValue: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
75
+ options: z.ZodMiniArray<z.ZodMiniObject<{
76
+ label: z.ZodMiniString<string>;
77
+ value: z.ZodMiniString<string>;
78
+ }, z.core.$strip>>;
79
+ placeholder: z.ZodMiniOptional<z.ZodMiniString<string>>;
80
+ required: z.ZodMiniPrefault<z.ZodMiniBoolean<boolean>>;
81
+ type: z.ZodMiniLiteral<"multi-select">;
82
+ description: z.ZodMiniOptional<z.ZodMiniString<string>>;
83
+ label: z.ZodMiniOptional<z.ZodMiniString<string>>;
84
+ name: z.ZodMiniString<string>;
85
+ }, z.core.$strip>, z.ZodMiniObject<{
86
+ defaultValue: z.ZodMiniPrefault<z.ZodMiniBoolean<boolean>>;
87
+ required: z.ZodMiniPrefault<z.ZodMiniBoolean<boolean>>;
88
+ type: z.ZodMiniLiteral<"checkbox">;
89
+ description: z.ZodMiniOptional<z.ZodMiniString<string>>;
90
+ label: z.ZodMiniOptional<z.ZodMiniString<string>>;
91
+ name: z.ZodMiniString<string>;
92
+ }, z.core.$strip>], "type">, z.ZodMiniTransform<{
93
+ label: string;
94
+ required: boolean;
95
+ type: "email" | "text" | "url" | "phone" | "textarea";
96
+ name: string;
97
+ defaultValue?: string | undefined;
98
+ maxLength?: number | undefined;
99
+ minLength?: number | undefined;
100
+ placeholder?: string | undefined;
101
+ description?: string | undefined;
102
+ } | {
103
+ label: string;
104
+ required: boolean;
105
+ step: number;
106
+ type: "number";
107
+ name: string;
108
+ defaultValue?: number | undefined;
109
+ max?: number | undefined;
110
+ min?: number | undefined;
111
+ placeholder?: string | undefined;
112
+ description?: string | undefined;
113
+ } | {
114
+ label: string;
115
+ required: boolean;
116
+ step: number;
117
+ type: "date";
118
+ name: string;
119
+ defaultValue?: string | undefined;
120
+ max?: string | undefined;
121
+ min?: string | undefined;
122
+ description?: string | undefined;
123
+ } | {
124
+ label: string;
125
+ required: boolean;
126
+ step: number;
127
+ type: "datetime";
128
+ name: string;
129
+ defaultValue?: string | undefined;
130
+ max?: string | undefined;
131
+ min?: string | undefined;
132
+ description?: string | undefined;
133
+ } | {
134
+ label: string;
135
+ type: "select";
136
+ options: {
137
+ label: string;
138
+ value: string;
139
+ }[];
140
+ required: boolean;
141
+ name: string;
142
+ defaultValue?: string | undefined;
143
+ placeholder?: string | undefined;
144
+ description?: string | undefined;
145
+ } | {
146
+ label: string;
147
+ type: "radio";
148
+ options: {
149
+ label: string;
150
+ value: string;
151
+ }[];
152
+ required: boolean;
153
+ name: string;
154
+ defaultValue?: string | undefined;
155
+ placeholder?: string | undefined;
156
+ description?: string | undefined;
157
+ } | {
158
+ label: string;
159
+ options: {
160
+ label: string;
161
+ value: string;
162
+ }[];
163
+ required: boolean;
164
+ type: "multi-select";
165
+ name: string;
166
+ defaultValue?: string[] | undefined;
167
+ placeholder?: string | undefined;
168
+ description?: string | undefined;
169
+ } | {
170
+ label: string;
171
+ defaultValue: boolean;
172
+ required: boolean;
173
+ type: "checkbox";
174
+ name: string;
175
+ description?: string | undefined;
176
+ }, {
177
+ required: boolean;
178
+ type: "email" | "text" | "url" | "phone" | "textarea";
179
+ name: string;
180
+ defaultValue?: string | undefined;
181
+ maxLength?: number | undefined;
182
+ minLength?: number | undefined;
183
+ placeholder?: string | undefined;
184
+ description?: string | undefined;
185
+ label?: string | undefined;
186
+ } | {
187
+ required: boolean;
188
+ step: number;
189
+ type: "number";
190
+ name: string;
191
+ defaultValue?: number | undefined;
192
+ max?: number | undefined;
193
+ min?: number | undefined;
194
+ placeholder?: string | undefined;
195
+ description?: string | undefined;
196
+ label?: string | undefined;
197
+ } | {
198
+ required: boolean;
199
+ step: number;
200
+ type: "date";
201
+ name: string;
202
+ defaultValue?: string | undefined;
203
+ max?: string | undefined;
204
+ min?: string | undefined;
205
+ description?: string | undefined;
206
+ label?: string | undefined;
207
+ } | {
208
+ required: boolean;
209
+ step: number;
210
+ type: "datetime";
211
+ name: string;
212
+ defaultValue?: string | undefined;
213
+ max?: string | undefined;
214
+ min?: string | undefined;
215
+ description?: string | undefined;
216
+ label?: string | undefined;
217
+ } | {
218
+ type: "select";
219
+ options: {
220
+ label: string;
221
+ value: string;
222
+ }[];
223
+ required: boolean;
224
+ name: string;
225
+ defaultValue?: string | undefined;
226
+ placeholder?: string | undefined;
227
+ description?: string | undefined;
228
+ label?: string | undefined;
229
+ } | {
230
+ type: "radio";
231
+ options: {
232
+ label: string;
233
+ value: string;
234
+ }[];
235
+ required: boolean;
236
+ name: string;
237
+ defaultValue?: string | undefined;
238
+ placeholder?: string | undefined;
239
+ description?: string | undefined;
240
+ label?: string | undefined;
241
+ } | {
242
+ options: {
243
+ label: string;
244
+ value: string;
245
+ }[];
246
+ required: boolean;
247
+ type: "multi-select";
248
+ name: string;
249
+ defaultValue?: string[] | undefined;
250
+ placeholder?: string | undefined;
251
+ description?: string | undefined;
252
+ label?: string | undefined;
253
+ } | {
254
+ defaultValue: boolean;
255
+ required: boolean;
256
+ type: "checkbox";
257
+ name: string;
258
+ description?: string | undefined;
259
+ label?: string | undefined;
260
+ }>>>;
261
+ export type DashboardRunFieldValue = boolean | number | string | readonly string[] | null;
262
+ /**
263
+ * Returns the configured fallback for a field without an assigned value.
264
+ *
265
+ * @param field - Field whose fallback should be resolved.
266
+ */
267
+ export declare function getDashboardRunFieldDefaultValue(field: DashboardRunField): string | number | boolean | readonly string[] | null | undefined;
268
+ /**
269
+ * Checks one decoded value against a dashboard field declaration.
270
+ *
271
+ * @param field - Field declaration whose constraints apply.
272
+ * @param value - Decoded value to validate.
273
+ */
274
+ export declare function isDashboardRunFieldValueValid(field: DashboardRunField, value: unknown): boolean;
2
275
  export declare const DASHBOARD_RUN_CONFIG_SCHEMA: z.ZodMiniObject<{
3
276
  description: z.ZodMiniOptional<z.ZodMiniString<string>>;
4
277
  fields: z.ZodMiniPrefault<z.ZodMiniArray<z.ZodMiniPipe<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
@@ -2,6 +2,8 @@ import { sentenceCase } from "./name.js";
2
2
  import * as z from "zod/mini";
3
3
  const EMAIL_SCHEMA = z.email();
4
4
  const URL_SCHEMA = z.url();
5
+ const DATE_SCHEMA = z.iso.date();
6
+ const DATETIME_SCHEMA = z.iso.datetime({ local: true });
5
7
  const FIELD_NAME_SCHEMA = z
6
8
  .string()
7
9
  .check(z.trim(), z.minLength(1), z.maxLength(100));
@@ -105,7 +107,79 @@ const DASHBOARD_RUN_FIELD_SCHEMA = z.pipe(z.discriminatedUnion("type", [
105
107
  label: field.label ??
106
108
  `${sentenceCase(field.name)}${field.type === "checkbox" ? "?" : ""}`,
107
109
  })));
108
- const DASHBOARD_RUN_FIELDS_SCHEMA = z.array(DASHBOARD_RUN_FIELD_SCHEMA).check(z.refine((fields) => new Set(fields.map((field) => field.name)).size === fields.length, "Dashboard run field names must be unique."), z.refine((fields) => fields.every(isDashboardRunFieldDefaultValid), "Dashboard run field defaults must satisfy their field constraints."));
110
+ export const DASHBOARD_RUN_FIELDS_SCHEMA = z
111
+ .array(DASHBOARD_RUN_FIELD_SCHEMA)
112
+ .check(z.refine((fields) => new Set(fields.map((field) => field.name)).size === fields.length, "Dashboard run field names must be unique."), z.refine((fields) => fields.every(isDashboardRunFieldDefaultValid), "Dashboard run field defaults must satisfy their field constraints."));
113
+ /**
114
+ * Returns the configured fallback for a field without an assigned value.
115
+ *
116
+ * @param field - Field whose fallback should be resolved.
117
+ */
118
+ export function getDashboardRunFieldDefaultValue(field) {
119
+ if (field.defaultValue !== undefined)
120
+ return field.defaultValue;
121
+ if (field.type === "checkbox")
122
+ return false;
123
+ if (field.type === "multi-select")
124
+ return [];
125
+ if (field.type === "number")
126
+ return field.required === false ? null : undefined;
127
+ return field.required === false ? "" : undefined;
128
+ }
129
+ /**
130
+ * Checks one decoded value against a dashboard field declaration.
131
+ *
132
+ * @param field - Field declaration whose constraints apply.
133
+ * @param value - Decoded value to validate.
134
+ */
135
+ export function isDashboardRunFieldValueValid(field, value) {
136
+ if (field.type === "checkbox") {
137
+ return typeof value === "boolean" && (field.required === false || value);
138
+ }
139
+ if (field.type === "multi-select") {
140
+ return (Array.isArray(value) &&
141
+ (field.required === false || value.length > 0) &&
142
+ value.every((entry) => typeof entry === "string" &&
143
+ field.options.some((option) => option.value === entry)));
144
+ }
145
+ if (field.type === "number") {
146
+ if (value === null)
147
+ return field.required === false;
148
+ return (typeof value === "number" &&
149
+ Number.isFinite(value) &&
150
+ (field.min === undefined || value >= field.min) &&
151
+ (field.max === undefined || value <= field.max) &&
152
+ !isDashboardRunStepMismatch(value, field.min ?? field.defaultValue ?? 0, field.step ?? 1));
153
+ }
154
+ if (typeof value !== "string")
155
+ return false;
156
+ if (field.type === "radio" || field.type === "select") {
157
+ return ((field.required === false && value === "") ||
158
+ field.options.some((option) => option.value === value));
159
+ }
160
+ if (field.type === "date" || field.type === "datetime") {
161
+ if (field.required === false && value === "")
162
+ return true;
163
+ const parsed = parseDashboardRunDateValue(field.type, value);
164
+ return ((field.type === "date" ? DATE_SCHEMA : DATETIME_SCHEMA).safeParse(value)
165
+ .success &&
166
+ Number.isFinite(parsed) &&
167
+ (field.min === undefined ||
168
+ parsed >= parseDashboardRunDateValue(field.type, field.min)) &&
169
+ (field.max === undefined ||
170
+ parsed <= parseDashboardRunDateValue(field.type, field.max)) &&
171
+ !isDashboardRunStepMismatch(parsed, parseDashboardRunDateValue(field.type, field.min ??
172
+ field.defaultValue ??
173
+ (field.type === "date" ? "1970-01-01" : "1970-01-01T00:00")), (field.step ?? (field.type === "date" ? 1 : 60)) *
174
+ (field.type === "date" ? 86_400_000 : 1_000)));
175
+ }
176
+ const normalized = value.trim();
177
+ return ((normalized.length > 0 || field.required === false) &&
178
+ (field.minLength === undefined || normalized.length >= field.minLength) &&
179
+ (field.maxLength === undefined || normalized.length <= field.maxLength) &&
180
+ (field.type !== "email" || EMAIL_SCHEMA.safeParse(normalized).success) &&
181
+ (field.type !== "url" || URL_SCHEMA.safeParse(normalized).success));
182
+ }
109
183
  export const DASHBOARD_RUN_CONFIG_SCHEMA = z.object({
110
184
  description: z.optional(FIELD_DESCRIPTION_SCHEMA),
111
185
  fields: z.prefault(DASHBOARD_RUN_FIELDS_SCHEMA, []),
@@ -1,4 +1,4 @@
1
- export { DASHBOARD_RUN_CONFIG_SCHEMA, dashboardRunTriggerDefinition, getDashboardRunEndpoint, getDashboardRunEndpointKey, type DashboardRunConfig, type DashboardRunEndpointOptions, type DashboardRunField, } from "./core-dashboard.js";
1
+ export { DASHBOARD_RUN_CONFIG_SCHEMA, DASHBOARD_RUN_FIELDS_SCHEMA, dashboardRunTriggerDefinition, getDashboardRunEndpoint, getDashboardRunEndpointKey, getDashboardRunFieldDefaultValue, isDashboardRunFieldValueValid, type DashboardRunConfig, type DashboardRunEndpointOptions, type DashboardRunField, type DashboardRunFieldValue, } from "./core-dashboard.js";
2
2
  export { getHttpTriggerEndpoint, getHttpTriggerEndpointKey, httpRequestTriggerDefinition, type HttpTriggerEndpointOptions, type HttpTriggerScope, } from "./core-http.js";
3
3
  export { automationInvokedTriggerDefinition } from "./core-invocation.js";
4
4
  export { getMailhookAddress, getMailhookAddressKey, mailhookEmailReceivedTriggerDefinition, PLATFORM_EMAIL_DOMAIN, type MailhookAddressOptions, type MailhookScope, } from "./core-mailhook.js";
@@ -3,7 +3,7 @@ import { httpRequestTriggerDefinition } from "./core-http.js";
3
3
  import { automationInvokedTriggerDefinition } from "./core-invocation.js";
4
4
  import { mailhookEmailReceivedTriggerDefinition } from "./core-mailhook.js";
5
5
  import { cronTickTriggerDefinition } from "./core-schedule.js";
6
- export { DASHBOARD_RUN_CONFIG_SCHEMA, dashboardRunTriggerDefinition, getDashboardRunEndpoint, getDashboardRunEndpointKey, } from "./core-dashboard.js";
6
+ export { DASHBOARD_RUN_CONFIG_SCHEMA, DASHBOARD_RUN_FIELDS_SCHEMA, dashboardRunTriggerDefinition, getDashboardRunEndpoint, getDashboardRunEndpointKey, getDashboardRunFieldDefaultValue, isDashboardRunFieldValueValid, } from "./core-dashboard.js";
7
7
  export { getHttpTriggerEndpoint, getHttpTriggerEndpointKey, httpRequestTriggerDefinition, } from "./core-http.js";
8
8
  export { automationInvokedTriggerDefinition } from "./core-invocation.js";
9
9
  export { getMailhookAddress, getMailhookAddressKey, mailhookEmailReceivedTriggerDefinition, PLATFORM_EMAIL_DOMAIN, } from "./core-mailhook.js";
@@ -1,5 +1,5 @@
1
1
  import type { TriggerDefinition, TriggerPresentation, TriggerPresentationContext, TriggerScopePresentation } from "../types.js";
2
- export { getDashboardRunEndpoint, getDashboardRunEndpointKey, getHttpTriggerEndpoint, getHttpTriggerEndpointKey, getMailhookAddress, getMailhookAddressKey, PLATFORM_EMAIL_DOMAIN, DASHBOARD_RUN_CONFIG_SCHEMA, type DashboardRunConfig, type DashboardRunEndpointOptions, type DashboardRunField, type HttpTriggerEndpointOptions, type HttpTriggerScope, type MailhookAddressOptions, type MailhookScope, } from "./core.js";
2
+ export { getDashboardRunEndpoint, getDashboardRunEndpointKey, getHttpTriggerEndpoint, getHttpTriggerEndpointKey, getMailhookAddress, getMailhookAddressKey, PLATFORM_EMAIL_DOMAIN, DASHBOARD_RUN_CONFIG_SCHEMA, DASHBOARD_RUN_FIELDS_SCHEMA, getDashboardRunFieldDefaultValue, isDashboardRunFieldValueValid, type DashboardRunConfig, type DashboardRunEndpointOptions, type DashboardRunField, type DashboardRunFieldValue, type HttpTriggerEndpointOptions, type HttpTriggerScope, type MailhookAddressOptions, type MailhookScope, } from "./core.js";
3
3
  /** Plain shared definitions for every public trigger type. */
4
4
  export declare const triggerDefinitions: {
5
5
  readonly whatsappMessageDelivered: {
@@ -6108,6 +6108,132 @@ export declare const triggerDefinitions: {
6108
6108
  readonly name: "Mailhook";
6109
6109
  readonly type: "mailhook.email.received";
6110
6110
  };
6111
+ readonly calendlyEventTypeCreated: {
6112
+ readonly account: {
6113
+ readonly connectionOptions: readonly [{
6114
+ readonly connectionMethodId: "oauth";
6115
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
6116
+ }];
6117
+ readonly serviceId: "calendly";
6118
+ };
6119
+ readonly getPrimary: (context: TriggerPresentationContext) => {
6120
+ copyable: boolean;
6121
+ value: string;
6122
+ };
6123
+ readonly type: "calendly.event-type.created";
6124
+ };
6125
+ readonly calendlyEventTypeDeleted: {
6126
+ readonly account: {
6127
+ readonly connectionOptions: readonly [{
6128
+ readonly connectionMethodId: "oauth";
6129
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
6130
+ }];
6131
+ readonly serviceId: "calendly";
6132
+ };
6133
+ readonly getPrimary: (context: TriggerPresentationContext) => {
6134
+ copyable: boolean;
6135
+ value: string;
6136
+ };
6137
+ readonly type: "calendly.event-type.deleted";
6138
+ };
6139
+ readonly calendlyEventTypeUpdated: {
6140
+ readonly account: {
6141
+ readonly connectionOptions: readonly [{
6142
+ readonly connectionMethodId: "oauth";
6143
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
6144
+ }];
6145
+ readonly serviceId: "calendly";
6146
+ };
6147
+ readonly getPrimary: (context: TriggerPresentationContext) => {
6148
+ copyable: boolean;
6149
+ value: string;
6150
+ };
6151
+ readonly type: "calendly.event-type.updated";
6152
+ };
6153
+ readonly calendlyInviteeCanceled: {
6154
+ readonly account: {
6155
+ readonly connectionOptions: readonly [{
6156
+ readonly connectionMethodId: "oauth";
6157
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
6158
+ }];
6159
+ readonly serviceId: "calendly";
6160
+ };
6161
+ readonly getPrimary: (context: TriggerPresentationContext) => {
6162
+ copyable: boolean;
6163
+ value: string;
6164
+ };
6165
+ readonly type: "calendly.invitee.canceled";
6166
+ };
6167
+ readonly calendlyInviteeCreated: {
6168
+ readonly account: {
6169
+ readonly connectionOptions: readonly [{
6170
+ readonly connectionMethodId: "oauth";
6171
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
6172
+ }];
6173
+ readonly serviceId: "calendly";
6174
+ };
6175
+ readonly getPrimary: (context: TriggerPresentationContext) => {
6176
+ copyable: boolean;
6177
+ value: string;
6178
+ };
6179
+ readonly type: "calendly.invitee.created";
6180
+ };
6181
+ readonly calendlyInviteeNoShowCreated: {
6182
+ readonly account: {
6183
+ readonly connectionOptions: readonly [{
6184
+ readonly connectionMethodId: "oauth";
6185
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
6186
+ }];
6187
+ readonly serviceId: "calendly";
6188
+ };
6189
+ readonly getPrimary: (context: TriggerPresentationContext) => {
6190
+ copyable: boolean;
6191
+ value: string;
6192
+ };
6193
+ readonly type: "calendly.invitee-no-show.created";
6194
+ };
6195
+ readonly calendlyInviteeNoShowDeleted: {
6196
+ readonly account: {
6197
+ readonly connectionOptions: readonly [{
6198
+ readonly connectionMethodId: "oauth";
6199
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
6200
+ }];
6201
+ readonly serviceId: "calendly";
6202
+ };
6203
+ readonly getPrimary: (context: TriggerPresentationContext) => {
6204
+ copyable: boolean;
6205
+ value: string;
6206
+ };
6207
+ readonly type: "calendly.invitee-no-show.deleted";
6208
+ };
6209
+ readonly calendlyRoutingFormSubmissionCreated: {
6210
+ readonly account: {
6211
+ readonly connectionOptions: readonly [{
6212
+ readonly connectionMethodId: "oauth";
6213
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
6214
+ }];
6215
+ readonly serviceId: "calendly";
6216
+ };
6217
+ readonly getPrimary: (context: TriggerPresentationContext) => {
6218
+ copyable: boolean;
6219
+ value: string;
6220
+ };
6221
+ readonly type: "calendly.routing-form-submission.created";
6222
+ };
6223
+ readonly calendlySchedulingEvent: {
6224
+ readonly account: {
6225
+ readonly connectionOptions: readonly [{
6226
+ readonly connectionMethodId: "oauth";
6227
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
6228
+ }];
6229
+ readonly serviceId: "calendly";
6230
+ };
6231
+ readonly getPrimary: (context: TriggerPresentationContext) => {
6232
+ copyable: boolean;
6233
+ value: string;
6234
+ };
6235
+ readonly type: "calendly.scheduling.event";
6236
+ };
6111
6237
  readonly clickUpFolderCreated: {
6112
6238
  readonly account: {
6113
6239
  readonly connectionOptions: readonly [{
@@ -10963,6 +11089,132 @@ export declare const triggerCatalog: ({
10963
11089
  value: string;
10964
11090
  };
10965
11091
  type: "clickup.workspace.event";
11092
+ } | {
11093
+ name: string;
11094
+ account: {
11095
+ readonly connectionOptions: readonly [{
11096
+ readonly connectionMethodId: "oauth";
11097
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
11098
+ }];
11099
+ readonly serviceId: "calendly";
11100
+ };
11101
+ getPrimary: (context: TriggerPresentationContext) => {
11102
+ copyable: boolean;
11103
+ value: string;
11104
+ };
11105
+ type: "calendly.event-type.created";
11106
+ } | {
11107
+ name: string;
11108
+ account: {
11109
+ readonly connectionOptions: readonly [{
11110
+ readonly connectionMethodId: "oauth";
11111
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
11112
+ }];
11113
+ readonly serviceId: "calendly";
11114
+ };
11115
+ getPrimary: (context: TriggerPresentationContext) => {
11116
+ copyable: boolean;
11117
+ value: string;
11118
+ };
11119
+ type: "calendly.event-type.deleted";
11120
+ } | {
11121
+ name: string;
11122
+ account: {
11123
+ readonly connectionOptions: readonly [{
11124
+ readonly connectionMethodId: "oauth";
11125
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
11126
+ }];
11127
+ readonly serviceId: "calendly";
11128
+ };
11129
+ getPrimary: (context: TriggerPresentationContext) => {
11130
+ copyable: boolean;
11131
+ value: string;
11132
+ };
11133
+ type: "calendly.event-type.updated";
11134
+ } | {
11135
+ name: string;
11136
+ account: {
11137
+ readonly connectionOptions: readonly [{
11138
+ readonly connectionMethodId: "oauth";
11139
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
11140
+ }];
11141
+ readonly serviceId: "calendly";
11142
+ };
11143
+ getPrimary: (context: TriggerPresentationContext) => {
11144
+ copyable: boolean;
11145
+ value: string;
11146
+ };
11147
+ type: "calendly.invitee.canceled";
11148
+ } | {
11149
+ name: string;
11150
+ account: {
11151
+ readonly connectionOptions: readonly [{
11152
+ readonly connectionMethodId: "oauth";
11153
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
11154
+ }];
11155
+ readonly serviceId: "calendly";
11156
+ };
11157
+ getPrimary: (context: TriggerPresentationContext) => {
11158
+ copyable: boolean;
11159
+ value: string;
11160
+ };
11161
+ type: "calendly.invitee.created";
11162
+ } | {
11163
+ name: string;
11164
+ account: {
11165
+ readonly connectionOptions: readonly [{
11166
+ readonly connectionMethodId: "oauth";
11167
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
11168
+ }];
11169
+ readonly serviceId: "calendly";
11170
+ };
11171
+ getPrimary: (context: TriggerPresentationContext) => {
11172
+ copyable: boolean;
11173
+ value: string;
11174
+ };
11175
+ type: "calendly.invitee-no-show.created";
11176
+ } | {
11177
+ name: string;
11178
+ account: {
11179
+ readonly connectionOptions: readonly [{
11180
+ readonly connectionMethodId: "oauth";
11181
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
11182
+ }];
11183
+ readonly serviceId: "calendly";
11184
+ };
11185
+ getPrimary: (context: TriggerPresentationContext) => {
11186
+ copyable: boolean;
11187
+ value: string;
11188
+ };
11189
+ type: "calendly.invitee-no-show.deleted";
11190
+ } | {
11191
+ name: string;
11192
+ account: {
11193
+ readonly connectionOptions: readonly [{
11194
+ readonly connectionMethodId: "oauth";
11195
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
11196
+ }];
11197
+ readonly serviceId: "calendly";
11198
+ };
11199
+ getPrimary: (context: TriggerPresentationContext) => {
11200
+ copyable: boolean;
11201
+ value: string;
11202
+ };
11203
+ type: "calendly.routing-form-submission.created";
11204
+ } | {
11205
+ name: string;
11206
+ account: {
11207
+ readonly connectionOptions: readonly [{
11208
+ readonly connectionMethodId: "oauth";
11209
+ readonly requiredScopes: readonly [import("..").IntegrationScopeRequirement];
11210
+ }];
11211
+ readonly serviceId: "calendly";
11212
+ };
11213
+ getPrimary: (context: TriggerPresentationContext) => {
11214
+ copyable: boolean;
11215
+ value: string;
11216
+ };
11217
+ type: "calendly.scheduling.event";
10966
11218
  } | {
10967
11219
  name: string;
10968
11220
  getDetails: ({ config }: TriggerPresentationContext) => {
@@ -10,6 +10,7 @@ import { discordTriggerDefinitions } from "./discord.js";
10
10
  import { closeTriggerDefinitions } from "./close.js";
11
11
  import { cloudflareTriggerDefinitions } from "./cloudflare.js";
12
12
  import { clickUpTriggerDefinitions } from "./clickup.js";
13
+ import { calendlyTriggerDefinitions } from "./calendly.js";
13
14
  import { coreTriggerDefinitions } from "./core.js";
14
15
  import { githubTriggerDefinitions } from "./github.js";
15
16
  import { googleTriggerDefinitions } from "./google.js";
@@ -30,7 +31,7 @@ import { webflowTriggerDefinitions } from "./webflow.js";
30
31
  import { whatsappTriggerDefinitions } from "./whatsapp.js";
31
32
  import { sentenceCase } from "./name.js";
32
33
  import { getIntegrationService } from "../catalog.js";
33
- export { getDashboardRunEndpoint, getDashboardRunEndpointKey, getHttpTriggerEndpoint, getHttpTriggerEndpointKey, getMailhookAddress, getMailhookAddressKey, PLATFORM_EMAIL_DOMAIN, DASHBOARD_RUN_CONFIG_SCHEMA, } from "./core.js";
34
+ export { getDashboardRunEndpoint, getDashboardRunEndpointKey, getHttpTriggerEndpoint, getHttpTriggerEndpointKey, getMailhookAddress, getMailhookAddressKey, PLATFORM_EMAIL_DOMAIN, DASHBOARD_RUN_CONFIG_SCHEMA, DASHBOARD_RUN_FIELDS_SCHEMA, getDashboardRunFieldDefaultValue, isDashboardRunFieldValueValid, } from "./core.js";
34
35
  /** Plain shared definitions for every public trigger type. */
35
36
  export const triggerDefinitions = {
36
37
  ...anthropicTriggerDefinitions,
@@ -45,6 +46,7 @@ export const triggerDefinitions = {
45
46
  ...closeTriggerDefinitions,
46
47
  ...cloudflareTriggerDefinitions,
47
48
  ...clickUpTriggerDefinitions,
49
+ ...calendlyTriggerDefinitions,
48
50
  ...coreTriggerDefinitions,
49
51
  ...githubTriggerDefinitions,
50
52
  ...googleTriggerDefinitions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automate.ax/catalog",
3
- "version": "0.143.9",
3
+ "version": "0.144.1",
4
4
  "description": "Shared integration service and trigger definitions for Automate.ax.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -26,6 +26,7 @@
26
26
  "./triggers/axiom": "./src/triggers/axiom.ts",
27
27
  "./triggers/automate": "./src/triggers/automate.ts",
28
28
  "./triggers/asana": "./src/triggers/asana.ts",
29
+ "./triggers/calendly": "./src/triggers/calendly.ts",
29
30
  "./triggers/clickup": "./src/triggers/clickup.ts",
30
31
  "./triggers/brevo": "./src/triggers/brevo.ts",
31
32
  "./triggers/cloudflare": "./src/triggers/cloudflare.ts",
@@ -133,6 +134,11 @@
133
134
  "types": "./dist/triggers/asana.d.ts",
134
135
  "default": "./dist/triggers/asana.js"
135
136
  },
137
+ "./triggers/calendly": {
138
+ "bun": "./src/triggers/calendly.ts",
139
+ "types": "./dist/triggers/calendly.d.ts",
140
+ "default": "./dist/triggers/calendly.js"
141
+ },
136
142
  "./triggers/clickup": {
137
143
  "bun": "./src/triggers/clickup.ts",
138
144
  "types": "./dist/triggers/clickup.d.ts",
package/src/catalog.ts CHANGED
@@ -118,6 +118,14 @@ export const asanaService = defineIntegrationService({
118
118
  name: "Asana",
119
119
  })
120
120
 
121
+ export const calendlyService = defineIntegrationService({
122
+ connectionMethods: [{ id: "oauth", name: "OAuth", type: "redirect" }],
123
+ description:
124
+ "Connect Calendly for scheduling actions and signed lifecycle triggers.",
125
+ id: "calendly",
126
+ name: "Calendly",
127
+ })
128
+
121
129
  export const automateService = defineIntegrationService({
122
130
  connectionMethods: [
123
131
  {
@@ -868,6 +876,7 @@ export const integrationCatalog = defineIntegrationCatalog([
868
876
  apolloService,
869
877
  apifyService,
870
878
  asanaService,
879
+ calendlyService,
871
880
  automateService,
872
881
  axiomService,
873
882
  brevoService,
package/src/index.ts CHANGED
@@ -4,6 +4,7 @@ export {
4
4
  apolloService,
5
5
  apifyService,
6
6
  asanaService,
7
+ calendlyService,
7
8
  automateService,
8
9
  axiomService,
9
10
  brevoService,
@@ -85,6 +86,9 @@ export {
85
86
  getMailhookAddress,
86
87
  getMailhookAddressKey,
87
88
  DASHBOARD_RUN_CONFIG_SCHEMA,
89
+ DASHBOARD_RUN_FIELDS_SCHEMA,
90
+ getDashboardRunFieldDefaultValue,
91
+ isDashboardRunFieldValueValid,
88
92
  getTriggerDefinition,
89
93
  getTriggerName,
90
94
  getTriggerPresentation,
@@ -95,6 +99,7 @@ export {
95
99
  type DashboardRunConfig,
96
100
  type DashboardRunEndpointOptions,
97
101
  type DashboardRunField,
102
+ type DashboardRunFieldValue,
98
103
  type HttpTriggerEndpointOptions,
99
104
  type HttpTriggerScope,
100
105
  type MailhookAddressOptions,
@@ -0,0 +1,96 @@
1
+ import { integrationScope } from "../types"
2
+ import type {
3
+ IntegrationAccountRequirement,
4
+ TriggerDefinition,
5
+ TriggerPresentationContext,
6
+ } from "../types"
7
+
8
+ const WEBHOOK_SCOPE = "webhooks:write"
9
+ const SCHEDULED_SCOPE = integrationScope.and(
10
+ WEBHOOK_SCOPE,
11
+ "scheduled_events:read",
12
+ )
13
+ const EVENT_TYPE_SCOPE = integrationScope.and(WEBHOOK_SCOPE, "event_types:read")
14
+ const ROUTING_SCOPE = integrationScope.and(WEBHOOK_SCOPE, "routing_forms:read")
15
+ const ALL_SCOPE = integrationScope.and(
16
+ WEBHOOK_SCOPE,
17
+ "event_types:read",
18
+ "routing_forms:read",
19
+ "scheduled_events:read",
20
+ )
21
+
22
+ export const calendlyTriggerDefinitions = {
23
+ calendlyEventTypeCreated: definition(
24
+ "calendly.event-type.created",
25
+ EVENT_TYPE_SCOPE,
26
+ ),
27
+ calendlyEventTypeDeleted: definition(
28
+ "calendly.event-type.deleted",
29
+ EVENT_TYPE_SCOPE,
30
+ ),
31
+ calendlyEventTypeUpdated: definition(
32
+ "calendly.event-type.updated",
33
+ EVENT_TYPE_SCOPE,
34
+ ),
35
+ calendlyInviteeCanceled: definition(
36
+ "calendly.invitee.canceled",
37
+ SCHEDULED_SCOPE,
38
+ ),
39
+ calendlyInviteeCreated: definition(
40
+ "calendly.invitee.created",
41
+ SCHEDULED_SCOPE,
42
+ ),
43
+ calendlyInviteeNoShowCreated: definition(
44
+ "calendly.invitee-no-show.created",
45
+ SCHEDULED_SCOPE,
46
+ ),
47
+ calendlyInviteeNoShowDeleted: definition(
48
+ "calendly.invitee-no-show.deleted",
49
+ SCHEDULED_SCOPE,
50
+ ),
51
+ calendlyRoutingFormSubmissionCreated: definition(
52
+ "calendly.routing-form-submission.created",
53
+ ROUTING_SCOPE,
54
+ ),
55
+ calendlySchedulingEvent: definition("calendly.scheduling.event", ALL_SCOPE),
56
+ } as const satisfies Record<string, TriggerDefinition>
57
+
58
+ /**
59
+ * Builds a Calendly trigger catalog definition.
60
+ *
61
+ * @param type - Public event type.
62
+ * @param requiredScope - Combined OAuth scope requirement.
63
+ */
64
+ function definition<TType extends string>(
65
+ type: TType,
66
+ requiredScope: Parameters<typeof integrationScope.and>[number],
67
+ ) {
68
+ return {
69
+ account: {
70
+ connectionOptions: [
71
+ { connectionMethodId: "oauth", requiredScopes: [requiredScope] },
72
+ ],
73
+ serviceId: "calendly",
74
+ } as const satisfies IntegrationAccountRequirement,
75
+ getPrimary: calendlyScopePrimary,
76
+ type,
77
+ } as const
78
+ }
79
+
80
+ /**
81
+ * Presents the provider webhook scope as a trigger identity.
82
+ *
83
+ * @param context - Trigger presentation context.
84
+ * @throws When the stored trigger configuration lacks a scope.
85
+ */
86
+ function calendlyScopePrimary(context: TriggerPresentationContext) {
87
+ if (
88
+ typeof context.config !== "object" ||
89
+ context.config === null ||
90
+ !("scope" in context.config) ||
91
+ typeof context.config.scope !== "string"
92
+ ) {
93
+ throw new TypeError("Calendly trigger configuration requires a scope.")
94
+ }
95
+ return { copyable: false, value: context.config.scope }
96
+ }
@@ -4,6 +4,8 @@ import * as z from "zod/mini"
4
4
 
5
5
  const EMAIL_SCHEMA = z.email()
6
6
  const URL_SCHEMA = z.url()
7
+ const DATE_SCHEMA = z.iso.date()
8
+ const DATETIME_SCHEMA = z.iso.datetime({ local: true })
7
9
  const FIELD_NAME_SCHEMA = z
8
10
  .string()
9
11
  .check(z.trim(), z.minLength(1), z.maxLength(100))
@@ -115,17 +117,120 @@ const DASHBOARD_RUN_FIELD_SCHEMA = z.pipe(
115
117
  `${sentenceCase(field.name)}${field.type === "checkbox" ? "?" : ""}`,
116
118
  })),
117
119
  )
118
- const DASHBOARD_RUN_FIELDS_SCHEMA = z.array(DASHBOARD_RUN_FIELD_SCHEMA).check(
119
- z.refine(
120
- (fields) =>
121
- new Set(fields.map((field) => field.name)).size === fields.length,
122
- "Dashboard run field names must be unique.",
123
- ),
124
- z.refine(
125
- (fields) => fields.every(isDashboardRunFieldDefaultValid),
126
- "Dashboard run field defaults must satisfy their field constraints.",
127
- ),
128
- )
120
+ export const DASHBOARD_RUN_FIELDS_SCHEMA = z
121
+ .array(DASHBOARD_RUN_FIELD_SCHEMA)
122
+ .check(
123
+ z.refine(
124
+ (fields) =>
125
+ new Set(fields.map((field) => field.name)).size === fields.length,
126
+ "Dashboard run field names must be unique.",
127
+ ),
128
+ z.refine(
129
+ (fields) => fields.every(isDashboardRunFieldDefaultValid),
130
+ "Dashboard run field defaults must satisfy their field constraints.",
131
+ ),
132
+ )
133
+
134
+ export type DashboardRunFieldValue =
135
+ | boolean
136
+ | number
137
+ | string
138
+ | readonly string[]
139
+ | null
140
+
141
+ /**
142
+ * Returns the configured fallback for a field without an assigned value.
143
+ *
144
+ * @param field - Field whose fallback should be resolved.
145
+ */
146
+ export function getDashboardRunFieldDefaultValue(field: DashboardRunField) {
147
+ if (field.defaultValue !== undefined) return field.defaultValue
148
+ if (field.type === "checkbox") return false
149
+ if (field.type === "multi-select") return []
150
+ if (field.type === "number")
151
+ return field.required === false ? null : undefined
152
+ return field.required === false ? "" : undefined
153
+ }
154
+
155
+ /**
156
+ * Checks one decoded value against a dashboard field declaration.
157
+ *
158
+ * @param field - Field declaration whose constraints apply.
159
+ * @param value - Decoded value to validate.
160
+ */
161
+ export function isDashboardRunFieldValueValid(
162
+ field: DashboardRunField,
163
+ value: unknown,
164
+ ) {
165
+ if (field.type === "checkbox") {
166
+ return typeof value === "boolean" && (field.required === false || value)
167
+ }
168
+ if (field.type === "multi-select") {
169
+ return (
170
+ Array.isArray(value) &&
171
+ (field.required === false || value.length > 0) &&
172
+ value.every(
173
+ (entry) =>
174
+ typeof entry === "string" &&
175
+ field.options.some((option) => option.value === entry),
176
+ )
177
+ )
178
+ }
179
+ if (field.type === "number") {
180
+ if (value === null) return field.required === false
181
+ return (
182
+ typeof value === "number" &&
183
+ Number.isFinite(value) &&
184
+ (field.min === undefined || value >= field.min) &&
185
+ (field.max === undefined || value <= field.max) &&
186
+ !isDashboardRunStepMismatch(
187
+ value,
188
+ field.min ?? field.defaultValue ?? 0,
189
+ field.step ?? 1,
190
+ )
191
+ )
192
+ }
193
+ if (typeof value !== "string") return false
194
+ if (field.type === "radio" || field.type === "select") {
195
+ return (
196
+ (field.required === false && value === "") ||
197
+ field.options.some((option) => option.value === value)
198
+ )
199
+ }
200
+ if (field.type === "date" || field.type === "datetime") {
201
+ if (field.required === false && value === "") return true
202
+ const parsed = parseDashboardRunDateValue(field.type, value)
203
+ return (
204
+ (field.type === "date" ? DATE_SCHEMA : DATETIME_SCHEMA).safeParse(value)
205
+ .success &&
206
+ Number.isFinite(parsed) &&
207
+ (field.min === undefined ||
208
+ parsed >= parseDashboardRunDateValue(field.type, field.min)) &&
209
+ (field.max === undefined ||
210
+ parsed <= parseDashboardRunDateValue(field.type, field.max)) &&
211
+ !isDashboardRunStepMismatch(
212
+ parsed,
213
+ parseDashboardRunDateValue(
214
+ field.type,
215
+ field.min ??
216
+ field.defaultValue ??
217
+ (field.type === "date" ? "1970-01-01" : "1970-01-01T00:00"),
218
+ ),
219
+ (field.step ?? (field.type === "date" ? 1 : 60)) *
220
+ (field.type === "date" ? 86_400_000 : 1_000),
221
+ )
222
+ )
223
+ }
224
+
225
+ const normalized = value.trim()
226
+ return (
227
+ (normalized.length > 0 || field.required === false) &&
228
+ (field.minLength === undefined || normalized.length >= field.minLength) &&
229
+ (field.maxLength === undefined || normalized.length <= field.maxLength) &&
230
+ (field.type !== "email" || EMAIL_SCHEMA.safeParse(normalized).success) &&
231
+ (field.type !== "url" || URL_SCHEMA.safeParse(normalized).success)
232
+ )
233
+ }
129
234
 
130
235
  export const DASHBOARD_RUN_CONFIG_SCHEMA = z.object({
131
236
  description: z.optional(FIELD_DESCRIPTION_SCHEMA),
@@ -7,12 +7,16 @@ import { cronTickTriggerDefinition } from "./core-schedule"
7
7
 
8
8
  export {
9
9
  DASHBOARD_RUN_CONFIG_SCHEMA,
10
+ DASHBOARD_RUN_FIELDS_SCHEMA,
10
11
  dashboardRunTriggerDefinition,
11
12
  getDashboardRunEndpoint,
12
13
  getDashboardRunEndpointKey,
14
+ getDashboardRunFieldDefaultValue,
15
+ isDashboardRunFieldValueValid,
13
16
  type DashboardRunConfig,
14
17
  type DashboardRunEndpointOptions,
15
18
  type DashboardRunField,
19
+ type DashboardRunFieldValue,
16
20
  } from "./core-dashboard"
17
21
  export {
18
22
  getHttpTriggerEndpoint,
@@ -10,6 +10,7 @@ import { discordTriggerDefinitions } from "./discord"
10
10
  import { closeTriggerDefinitions } from "./close"
11
11
  import { cloudflareTriggerDefinitions } from "./cloudflare"
12
12
  import { clickUpTriggerDefinitions } from "./clickup"
13
+ import { calendlyTriggerDefinitions } from "./calendly"
13
14
  import { coreTriggerDefinitions } from "./core"
14
15
  import { githubTriggerDefinitions } from "./github"
15
16
  import { googleTriggerDefinitions } from "./google"
@@ -46,9 +47,13 @@ export {
46
47
  getMailhookAddressKey,
47
48
  PLATFORM_EMAIL_DOMAIN,
48
49
  DASHBOARD_RUN_CONFIG_SCHEMA,
50
+ DASHBOARD_RUN_FIELDS_SCHEMA,
51
+ getDashboardRunFieldDefaultValue,
52
+ isDashboardRunFieldValueValid,
49
53
  type DashboardRunConfig,
50
54
  type DashboardRunEndpointOptions,
51
55
  type DashboardRunField,
56
+ type DashboardRunFieldValue,
52
57
  type HttpTriggerEndpointOptions,
53
58
  type HttpTriggerScope,
54
59
  type MailhookAddressOptions,
@@ -69,6 +74,7 @@ export const triggerDefinitions = {
69
74
  ...closeTriggerDefinitions,
70
75
  ...cloudflareTriggerDefinitions,
71
76
  ...clickUpTriggerDefinitions,
77
+ ...calendlyTriggerDefinitions,
72
78
  ...coreTriggerDefinitions,
73
79
  ...githubTriggerDefinitions,
74
80
  ...googleTriggerDefinitions,