@automate.ax/catalog 0.146.0 → 0.147.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.
- package/dist/catalog.d.ts +39 -0
- package/dist/catalog.js +8 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/triggers/highlevel.js +2 -1
- package/dist/triggers/index.d.ts +56 -0
- package/dist/triggers/index.js +2 -0
- package/dist/triggers/tally.d.ts +36 -0
- package/dist/triggers/tally.js +35 -0
- package/package.json +7 -1
- package/src/catalog.ts +10 -0
- package/src/index.ts +1 -0
- package/src/triggers/highlevel.ts +2 -1
- package/src/triggers/index.ts +2 -0
- package/src/triggers/tally.ts +46 -0
package/dist/catalog.d.ts
CHANGED
|
@@ -1154,6 +1154,26 @@ export declare const xaiService: {
|
|
|
1154
1154
|
readonly credentialUrl?: string | undefined;
|
|
1155
1155
|
}];
|
|
1156
1156
|
};
|
|
1157
|
+
export declare const tallyService: {
|
|
1158
|
+
readonly id: "tally";
|
|
1159
|
+
readonly name: string;
|
|
1160
|
+
readonly icon?: string | undefined;
|
|
1161
|
+
readonly description: string;
|
|
1162
|
+
readonly connectionNotice?: import("./types").IntegrationConnectionNotice | undefined;
|
|
1163
|
+
readonly connectionMethods: readonly [{
|
|
1164
|
+
readonly fields: readonly [{
|
|
1165
|
+
readonly placeholder: string;
|
|
1166
|
+
readonly input: "password";
|
|
1167
|
+
readonly label: "API key";
|
|
1168
|
+
readonly name: "apiKey";
|
|
1169
|
+
readonly required: true;
|
|
1170
|
+
}];
|
|
1171
|
+
readonly id: "api-key";
|
|
1172
|
+
readonly name: "API key";
|
|
1173
|
+
readonly type: "form";
|
|
1174
|
+
readonly credentialUrl?: string | undefined;
|
|
1175
|
+
}];
|
|
1176
|
+
};
|
|
1157
1177
|
export declare const integrationCatalog: readonly [{
|
|
1158
1178
|
readonly connectionMethods: readonly [{
|
|
1159
1179
|
readonly id: "oauth";
|
|
@@ -2117,6 +2137,25 @@ export declare const integrationCatalog: readonly [{
|
|
|
2117
2137
|
readonly type: "form";
|
|
2118
2138
|
readonly credentialUrl?: string | undefined;
|
|
2119
2139
|
}];
|
|
2140
|
+
}, {
|
|
2141
|
+
readonly id: "tally";
|
|
2142
|
+
readonly name: string;
|
|
2143
|
+
readonly icon?: string | undefined;
|
|
2144
|
+
readonly description: string;
|
|
2145
|
+
readonly connectionNotice?: import("./types").IntegrationConnectionNotice | undefined;
|
|
2146
|
+
readonly connectionMethods: readonly [{
|
|
2147
|
+
readonly fields: readonly [{
|
|
2148
|
+
readonly placeholder: string;
|
|
2149
|
+
readonly input: "password";
|
|
2150
|
+
readonly label: "API key";
|
|
2151
|
+
readonly name: "apiKey";
|
|
2152
|
+
readonly required: true;
|
|
2153
|
+
}];
|
|
2154
|
+
readonly id: "api-key";
|
|
2155
|
+
readonly name: "API key";
|
|
2156
|
+
readonly type: "form";
|
|
2157
|
+
readonly credentialUrl?: string | undefined;
|
|
2158
|
+
}];
|
|
2120
2159
|
}, {
|
|
2121
2160
|
readonly connectionMethods: readonly [{
|
|
2122
2161
|
readonly id: "oauth";
|
package/dist/catalog.js
CHANGED
|
@@ -840,6 +840,13 @@ export const xaiService = defineApiKeyService({
|
|
|
840
840
|
name: "xAI",
|
|
841
841
|
placeholder: "xai-...",
|
|
842
842
|
});
|
|
843
|
+
export const tallyService = defineApiKeyService({
|
|
844
|
+
credentialUrl: "https://tally.so/settings/api-keys",
|
|
845
|
+
description: "Connect a Tally API key for forms, submissions, analytics, and signed triggers.",
|
|
846
|
+
id: "tally",
|
|
847
|
+
name: "Tally",
|
|
848
|
+
placeholder: "tly-...",
|
|
849
|
+
});
|
|
843
850
|
export const integrationCatalog = defineIntegrationCatalog([
|
|
844
851
|
airtableService,
|
|
845
852
|
anthropicService,
|
|
@@ -890,6 +897,7 @@ export const integrationCatalog = defineIntegrationCatalog([
|
|
|
890
897
|
scrapflyService,
|
|
891
898
|
slackService,
|
|
892
899
|
stripeService,
|
|
900
|
+
tallyService,
|
|
893
901
|
tidycalService,
|
|
894
902
|
togetheraiService,
|
|
895
903
|
trelloService,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { airtableService, anthropicService, apolloService, apifyService, asanaService, calendlyService, automateService, axiomService, brevoService, calcomService, browserbaseService, cerebrasService, chatgptService, cloudflareService, metaAdsService, closeService, closeBotService, clickUpService, codexService, cohereService, convexService, discordService, deepinfraService, deepseekService, firecrawlService, fireworksService, getIntegrationService, githubService, googleGenaiService, googleService, groqService, huggingfaceService, hubspotService, highLevelService, 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, calcomService, browserbaseService, cerebrasService, chatgptService, cloudflareService, metaAdsService, closeService, closeBotService, clickUpService, codexService, cohereService, convexService, discordService, deepinfraService, deepseekService, firecrawlService, fireworksService, getIntegrationService, githubService, googleGenaiService, googleService, groqService, huggingfaceService, hubspotService, highLevelService, integrationCatalog, jobNimbusService, linearService, microsoftService, millionverifierService, mistralService, notionService, openaiService, onePasswordService, openrouterService, perplexityService, postgresService, redditService, resendService, scrapflyService, slackService, stripeService, tallyService, 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
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, calendlyService, automateService, axiomService, brevoService, calcomService, browserbaseService, cerebrasService, chatgptService, cloudflareService, metaAdsService, closeService, closeBotService, clickUpService, codexService, cohereService, convexService, discordService, deepinfraService, deepseekService, firecrawlService, fireworksService, getIntegrationService, githubService, googleGenaiService, googleService, groqService, huggingfaceService, hubspotService, highLevelService, 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, calcomService, browserbaseService, cerebrasService, chatgptService, cloudflareService, metaAdsService, closeService, closeBotService, clickUpService, codexService, cohereService, convexService, discordService, deepinfraService, deepseekService, firecrawlService, fireworksService, getIntegrationService, githubService, googleGenaiService, googleService, groqService, huggingfaceService, hubspotService, highLevelService, integrationCatalog, jobNimbusService, linearService, microsoftService, millionverifierService, mistralService, notionService, openaiService, onePasswordService, openrouterService, perplexityService, postgresService, redditService, resendService, scrapflyService, slackService, stripeService, tallyService, tidycalService, togetheraiService, trelloService, vercelAiGatewayService, vercelService, webflowService, whatsappService, xaiService, } from "./catalog.js";
|
|
2
2
|
export { defineIntegrationCatalog, defineIntegrationService, integrationScope, } from "./types.js";
|
|
3
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";
|
|
@@ -7,7 +7,7 @@ const MESSAGE_ACCOUNT = highLevelOAuthAccount([
|
|
|
7
7
|
]);
|
|
8
8
|
const OPPORTUNITY_ACCOUNT = highLevelOAuthAccount(["opportunities.readonly"]);
|
|
9
9
|
const LOCATION_ACCOUNT = highLevelOAuthAccount(["locations.readonly"]);
|
|
10
|
-
const USER_ACCOUNT = highLevelOAuthAccount(["users.
|
|
10
|
+
const USER_ACCOUNT = highLevelOAuthAccount(["users.write"]);
|
|
11
11
|
export const highLevelTriggerDefinitions = {
|
|
12
12
|
highLevelAppointmentCreated: definition(APPOINTMENT_ACCOUNT, "highlevel.appointment.created"),
|
|
13
13
|
highLevelAppointmentDeleted: definition(APPOINTMENT_ACCOUNT, "highlevel.appointment.deleted"),
|
|
@@ -29,6 +29,7 @@ export const highLevelTriggerDefinitions = {
|
|
|
29
29
|
"locations.readonly",
|
|
30
30
|
"opportunities.readonly",
|
|
31
31
|
"users.readonly",
|
|
32
|
+
"users.write",
|
|
32
33
|
]), "highlevel.event"),
|
|
33
34
|
highLevelLocationUpdated: definition(LOCATION_ACCOUNT, "highlevel.location.updated"),
|
|
34
35
|
highLevelMessageReceived: definition(MESSAGE_ACCOUNT, "highlevel.message.received"),
|
package/dist/triggers/index.d.ts
CHANGED
|
@@ -766,6 +766,34 @@ export declare const triggerDefinitions: {
|
|
|
766
766
|
};
|
|
767
767
|
readonly type: "vercel.alert.triggered";
|
|
768
768
|
};
|
|
769
|
+
readonly tallyFormEvent: {
|
|
770
|
+
readonly account: {
|
|
771
|
+
readonly connectionOptions: readonly [{
|
|
772
|
+
readonly connectionMethodId: "api-key";
|
|
773
|
+
readonly requiredScopes: readonly [];
|
|
774
|
+
}];
|
|
775
|
+
readonly serviceId: "tally";
|
|
776
|
+
};
|
|
777
|
+
readonly getPrimary: (context: TriggerPresentationContext) => {
|
|
778
|
+
copyable: boolean;
|
|
779
|
+
value: string;
|
|
780
|
+
};
|
|
781
|
+
readonly type: "tally.form.event";
|
|
782
|
+
};
|
|
783
|
+
readonly tallyFormResponse: {
|
|
784
|
+
readonly account: {
|
|
785
|
+
readonly connectionOptions: readonly [{
|
|
786
|
+
readonly connectionMethodId: "api-key";
|
|
787
|
+
readonly requiredScopes: readonly [];
|
|
788
|
+
}];
|
|
789
|
+
readonly serviceId: "tally";
|
|
790
|
+
};
|
|
791
|
+
readonly getPrimary: (context: TriggerPresentationContext) => {
|
|
792
|
+
copyable: boolean;
|
|
793
|
+
value: string;
|
|
794
|
+
};
|
|
795
|
+
readonly type: "tally.form.response";
|
|
796
|
+
};
|
|
769
797
|
readonly trelloAttachmentAdded: {
|
|
770
798
|
readonly account: {
|
|
771
799
|
readonly connectionOptions: readonly [{
|
|
@@ -17045,6 +17073,34 @@ export declare const triggerCatalog: ({
|
|
|
17045
17073
|
readonly serviceId: "trello";
|
|
17046
17074
|
};
|
|
17047
17075
|
type: "trello.list.updated";
|
|
17076
|
+
} | {
|
|
17077
|
+
name: string;
|
|
17078
|
+
account: {
|
|
17079
|
+
readonly connectionOptions: readonly [{
|
|
17080
|
+
readonly connectionMethodId: "api-key";
|
|
17081
|
+
readonly requiredScopes: readonly [];
|
|
17082
|
+
}];
|
|
17083
|
+
readonly serviceId: "tally";
|
|
17084
|
+
};
|
|
17085
|
+
getPrimary: (context: TriggerPresentationContext) => {
|
|
17086
|
+
copyable: boolean;
|
|
17087
|
+
value: string;
|
|
17088
|
+
};
|
|
17089
|
+
type: "tally.form.event";
|
|
17090
|
+
} | {
|
|
17091
|
+
name: string;
|
|
17092
|
+
account: {
|
|
17093
|
+
readonly connectionOptions: readonly [{
|
|
17094
|
+
readonly connectionMethodId: "api-key";
|
|
17095
|
+
readonly requiredScopes: readonly [];
|
|
17096
|
+
}];
|
|
17097
|
+
readonly serviceId: "tally";
|
|
17098
|
+
};
|
|
17099
|
+
getPrimary: (context: TriggerPresentationContext) => {
|
|
17100
|
+
copyable: boolean;
|
|
17101
|
+
value: string;
|
|
17102
|
+
};
|
|
17103
|
+
type: "tally.form.response";
|
|
17048
17104
|
} | {
|
|
17049
17105
|
name: string;
|
|
17050
17106
|
account: {
|
package/dist/triggers/index.js
CHANGED
|
@@ -27,6 +27,7 @@ import { resendTriggerDefinitions } from "./resend.js";
|
|
|
27
27
|
import { slackTriggerDefinitions } from "./slack.js";
|
|
28
28
|
import { stripeTriggerDefinitions } from "./stripe.js";
|
|
29
29
|
import { trelloTriggerDefinitions } from "./trello.js";
|
|
30
|
+
import { tallyTriggerDefinitions } from "./tally.js";
|
|
30
31
|
import { vercelTriggerDefinitions } from "./vercel.js";
|
|
31
32
|
import { webflowTriggerDefinitions } from "./webflow.js";
|
|
32
33
|
import { whatsappTriggerDefinitions } from "./whatsapp.js";
|
|
@@ -64,6 +65,7 @@ export const triggerDefinitions = {
|
|
|
64
65
|
...slackTriggerDefinitions,
|
|
65
66
|
...stripeTriggerDefinitions,
|
|
66
67
|
...trelloTriggerDefinitions,
|
|
68
|
+
...tallyTriggerDefinitions,
|
|
67
69
|
...vercelTriggerDefinitions,
|
|
68
70
|
...webflowTriggerDefinitions,
|
|
69
71
|
...whatsappTriggerDefinitions,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { TriggerPresentationContext } from "../types.js";
|
|
2
|
+
export declare const tallyTriggerDefinitions: {
|
|
3
|
+
readonly tallyFormEvent: {
|
|
4
|
+
readonly account: {
|
|
5
|
+
readonly connectionOptions: readonly [{
|
|
6
|
+
readonly connectionMethodId: "api-key";
|
|
7
|
+
readonly requiredScopes: readonly [];
|
|
8
|
+
}];
|
|
9
|
+
readonly serviceId: "tally";
|
|
10
|
+
};
|
|
11
|
+
readonly getPrimary: typeof getFormId;
|
|
12
|
+
readonly type: "tally.form.event";
|
|
13
|
+
};
|
|
14
|
+
readonly tallyFormResponse: {
|
|
15
|
+
readonly account: {
|
|
16
|
+
readonly connectionOptions: readonly [{
|
|
17
|
+
readonly connectionMethodId: "api-key";
|
|
18
|
+
readonly requiredScopes: readonly [];
|
|
19
|
+
}];
|
|
20
|
+
readonly serviceId: "tally";
|
|
21
|
+
};
|
|
22
|
+
readonly getPrimary: typeof getFormId;
|
|
23
|
+
readonly type: "tally.form.response";
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Extracts the provider form ID displayed for a Tally trigger.
|
|
28
|
+
*
|
|
29
|
+
* @param context Trigger presentation context.
|
|
30
|
+
* @throws When the trigger config omits its form ID.
|
|
31
|
+
*/
|
|
32
|
+
declare function getFormId(context: TriggerPresentationContext): {
|
|
33
|
+
copyable: boolean;
|
|
34
|
+
value: string;
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const TALLY_ACCOUNT = {
|
|
2
|
+
connectionOptions: [{ connectionMethodId: "api-key", requiredScopes: [] }],
|
|
3
|
+
serviceId: "tally",
|
|
4
|
+
};
|
|
5
|
+
export const tallyTriggerDefinitions = {
|
|
6
|
+
tallyFormEvent: definition("tally.form.event"),
|
|
7
|
+
tallyFormResponse: definition("tally.form.response"),
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Builds one account-backed Tally trigger definition.
|
|
11
|
+
*
|
|
12
|
+
* @param type Registered trigger type.
|
|
13
|
+
*/
|
|
14
|
+
function definition(type) {
|
|
15
|
+
return {
|
|
16
|
+
account: TALLY_ACCOUNT,
|
|
17
|
+
getPrimary: getFormId,
|
|
18
|
+
type,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Extracts the provider form ID displayed for a Tally trigger.
|
|
23
|
+
*
|
|
24
|
+
* @param context Trigger presentation context.
|
|
25
|
+
* @throws When the trigger config omits its form ID.
|
|
26
|
+
*/
|
|
27
|
+
function getFormId(context) {
|
|
28
|
+
if (typeof context.config !== "object" ||
|
|
29
|
+
context.config === null ||
|
|
30
|
+
!("formId" in context.config) ||
|
|
31
|
+
typeof context.config.formId !== "string") {
|
|
32
|
+
throw new TypeError("Tally trigger configuration requires a formId.");
|
|
33
|
+
}
|
|
34
|
+
return { copyable: true, value: context.config.formId };
|
|
35
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/catalog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.147.0",
|
|
4
4
|
"description": "Shared integration service and trigger definitions for Automate.ax.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"./triggers/resend": "./src/triggers/resend.ts",
|
|
55
55
|
"./triggers/slack": "./src/triggers/slack.ts",
|
|
56
56
|
"./triggers/stripe": "./src/triggers/stripe.ts",
|
|
57
|
+
"./triggers/tally": "./src/triggers/tally.ts",
|
|
57
58
|
"./triggers/trello": "./src/triggers/trello.ts",
|
|
58
59
|
"./triggers/vercel": "./src/triggers/vercel.ts",
|
|
59
60
|
"./triggers/webflow": "./src/triggers/webflow.ts",
|
|
@@ -276,6 +277,11 @@
|
|
|
276
277
|
"types": "./dist/triggers/stripe.d.ts",
|
|
277
278
|
"default": "./dist/triggers/stripe.js"
|
|
278
279
|
},
|
|
280
|
+
"./triggers/tally": {
|
|
281
|
+
"bun": "./src/triggers/tally.ts",
|
|
282
|
+
"types": "./dist/triggers/tally.d.ts",
|
|
283
|
+
"default": "./dist/triggers/tally.js"
|
|
284
|
+
},
|
|
279
285
|
"./triggers/trello": {
|
|
280
286
|
"bun": "./src/triggers/trello.ts",
|
|
281
287
|
"types": "./dist/triggers/trello.d.ts",
|
package/src/catalog.ts
CHANGED
|
@@ -927,6 +927,15 @@ export const xaiService = defineApiKeyService({
|
|
|
927
927
|
placeholder: "xai-...",
|
|
928
928
|
})
|
|
929
929
|
|
|
930
|
+
export const tallyService = defineApiKeyService({
|
|
931
|
+
credentialUrl: "https://tally.so/settings/api-keys",
|
|
932
|
+
description:
|
|
933
|
+
"Connect a Tally API key for forms, submissions, analytics, and signed triggers.",
|
|
934
|
+
id: "tally",
|
|
935
|
+
name: "Tally",
|
|
936
|
+
placeholder: "tly-...",
|
|
937
|
+
})
|
|
938
|
+
|
|
930
939
|
export const integrationCatalog = defineIntegrationCatalog([
|
|
931
940
|
airtableService,
|
|
932
941
|
anthropicService,
|
|
@@ -977,6 +986,7 @@ export const integrationCatalog = defineIntegrationCatalog([
|
|
|
977
986
|
scrapflyService,
|
|
978
987
|
slackService,
|
|
979
988
|
stripeService,
|
|
989
|
+
tallyService,
|
|
980
990
|
tidycalService,
|
|
981
991
|
togetheraiService,
|
|
982
992
|
trelloService,
|
package/src/index.ts
CHANGED
|
@@ -9,7 +9,7 @@ const MESSAGE_ACCOUNT = highLevelOAuthAccount([
|
|
|
9
9
|
])
|
|
10
10
|
const OPPORTUNITY_ACCOUNT = highLevelOAuthAccount(["opportunities.readonly"])
|
|
11
11
|
const LOCATION_ACCOUNT = highLevelOAuthAccount(["locations.readonly"])
|
|
12
|
-
const USER_ACCOUNT = highLevelOAuthAccount(["users.
|
|
12
|
+
const USER_ACCOUNT = highLevelOAuthAccount(["users.write"])
|
|
13
13
|
|
|
14
14
|
export const highLevelTriggerDefinitions = {
|
|
15
15
|
highLevelAppointmentCreated: definition(
|
|
@@ -66,6 +66,7 @@ export const highLevelTriggerDefinitions = {
|
|
|
66
66
|
"locations.readonly",
|
|
67
67
|
"opportunities.readonly",
|
|
68
68
|
"users.readonly",
|
|
69
|
+
"users.write",
|
|
69
70
|
]),
|
|
70
71
|
"highlevel.event",
|
|
71
72
|
),
|
package/src/triggers/index.ts
CHANGED
|
@@ -27,6 +27,7 @@ import { resendTriggerDefinitions } from "./resend"
|
|
|
27
27
|
import { slackTriggerDefinitions } from "./slack"
|
|
28
28
|
import { stripeTriggerDefinitions } from "./stripe"
|
|
29
29
|
import { trelloTriggerDefinitions } from "./trello"
|
|
30
|
+
import { tallyTriggerDefinitions } from "./tally"
|
|
30
31
|
import { vercelTriggerDefinitions } from "./vercel"
|
|
31
32
|
import { webflowTriggerDefinitions } from "./webflow"
|
|
32
33
|
import { whatsappTriggerDefinitions } from "./whatsapp"
|
|
@@ -92,6 +93,7 @@ export const triggerDefinitions = {
|
|
|
92
93
|
...slackTriggerDefinitions,
|
|
93
94
|
...stripeTriggerDefinitions,
|
|
94
95
|
...trelloTriggerDefinitions,
|
|
96
|
+
...tallyTriggerDefinitions,
|
|
95
97
|
...vercelTriggerDefinitions,
|
|
96
98
|
...webflowTriggerDefinitions,
|
|
97
99
|
...whatsappTriggerDefinitions,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
IntegrationAccountRequirement,
|
|
3
|
+
TriggerDefinition,
|
|
4
|
+
TriggerPresentationContext,
|
|
5
|
+
} from "../types"
|
|
6
|
+
|
|
7
|
+
const TALLY_ACCOUNT = {
|
|
8
|
+
connectionOptions: [{ connectionMethodId: "api-key", requiredScopes: [] }],
|
|
9
|
+
serviceId: "tally",
|
|
10
|
+
} as const satisfies IntegrationAccountRequirement
|
|
11
|
+
|
|
12
|
+
export const tallyTriggerDefinitions = {
|
|
13
|
+
tallyFormEvent: definition("tally.form.event"),
|
|
14
|
+
tallyFormResponse: definition("tally.form.response"),
|
|
15
|
+
} as const satisfies Record<string, TriggerDefinition>
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Builds one account-backed Tally trigger definition.
|
|
19
|
+
*
|
|
20
|
+
* @param type Registered trigger type.
|
|
21
|
+
*/
|
|
22
|
+
function definition<TType extends string>(type: TType) {
|
|
23
|
+
return {
|
|
24
|
+
account: TALLY_ACCOUNT,
|
|
25
|
+
getPrimary: getFormId,
|
|
26
|
+
type,
|
|
27
|
+
} as const
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Extracts the provider form ID displayed for a Tally trigger.
|
|
32
|
+
*
|
|
33
|
+
* @param context Trigger presentation context.
|
|
34
|
+
* @throws When the trigger config omits its form ID.
|
|
35
|
+
*/
|
|
36
|
+
function getFormId(context: TriggerPresentationContext) {
|
|
37
|
+
if (
|
|
38
|
+
typeof context.config !== "object" ||
|
|
39
|
+
context.config === null ||
|
|
40
|
+
!("formId" in context.config) ||
|
|
41
|
+
typeof context.config.formId !== "string"
|
|
42
|
+
) {
|
|
43
|
+
throw new TypeError("Tally trigger configuration requires a formId.")
|
|
44
|
+
}
|
|
45
|
+
return { copyable: true, value: context.config.formId }
|
|
46
|
+
}
|