@corsair-dev/activecampaign 0.1.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/LICENSE +191 -0
- package/dist/behaviour.test.d.ts +2 -0
- package/dist/behaviour.test.d.ts.map +1 -0
- package/dist/client.d.ts +29 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.test.d.ts +2 -0
- package/dist/client.test.d.ts.map +1 -0
- package/dist/endpoints/accounts.d.ts +107 -0
- package/dist/endpoints/accounts.d.ts.map +1 -0
- package/dist/endpoints/contacts.d.ts +166 -0
- package/dist/endpoints/contacts.d.ts.map +1 -0
- package/dist/endpoints/content.d.ts +178 -0
- package/dist/endpoints/content.d.ts.map +1 -0
- package/dist/endpoints/deals.d.ts +89 -0
- package/dist/endpoints/deals.d.ts.map +1 -0
- package/dist/endpoints/fields.d.ts +44 -0
- package/dist/endpoints/fields.d.ts.map +1 -0
- package/dist/endpoints/imports.d.ts +31 -0
- package/dist/endpoints/imports.d.ts.map +1 -0
- package/dist/endpoints/index.d.ts +21 -0
- package/dist/endpoints/index.d.ts.map +1 -0
- package/dist/endpoints/lists.d.ts +21 -0
- package/dist/endpoints/lists.d.ts.map +1 -0
- package/dist/endpoints/logging.d.ts +20 -0
- package/dist/endpoints/logging.d.ts.map +1 -0
- package/dist/endpoints/persist.d.ts +57 -0
- package/dist/endpoints/persist.d.ts.map +1 -0
- package/dist/endpoints/platform.d.ts +239 -0
- package/dist/endpoints/platform.d.ts.map +1 -0
- package/dist/endpoints/resource.d.ts +81 -0
- package/dist/endpoints/resource.d.ts.map +1 -0
- package/dist/endpoints/segments-v2.d.ts +71 -0
- package/dist/endpoints/segments-v2.d.ts.map +1 -0
- package/dist/endpoints/shared.d.ts +55 -0
- package/dist/endpoints/shared.d.ts.map +1 -0
- package/dist/endpoints/tags.d.ts +17 -0
- package/dist/endpoints/tags.d.ts.map +1 -0
- package/dist/endpoints/types.d.ts +10533 -0
- package/dist/endpoints/types.d.ts.map +1 -0
- package/dist/endpoints.test.d.ts +2 -0
- package/dist/endpoints.test.d.ts.map +1 -0
- package/dist/error-handlers.d.ts +85 -0
- package/dist/error-handlers.d.ts.map +1 -0
- package/dist/index.d.ts +7901 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/integration.test.d.ts +2 -0
- package/dist/integration.test.d.ts.map +1 -0
- package/dist/persist.test.d.ts +2 -0
- package/dist/persist.test.d.ts.map +1 -0
- package/dist/routing.test.d.ts +2 -0
- package/dist/routing.test.d.ts.map +1 -0
- package/dist/schema/database.d.ts +874 -0
- package/dist/schema/database.d.ts.map +1 -0
- package/dist/schema/index.d.ts +731 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema.test.d.ts +2 -0
- package/dist/schema.test.d.ts.map +1 -0
- package/dist/segments-v2.test.d.ts +2 -0
- package/dist/segments-v2.test.d.ts.map +1 -0
- package/dist/tsup.config.d.ts +3 -0
- package/dist/tsup.config.d.ts.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import type { ActiveCampaignEndpoints } from '../index';
|
|
2
|
+
export declare const listCampaigns: ActiveCampaignEndpoints["campaignsList"];
|
|
3
|
+
export declare const getCampaign: ActiveCampaignEndpoints["campaignsGet"];
|
|
4
|
+
export declare const createCampaign: ActiveCampaignEndpoints["campaignsCreate"];
|
|
5
|
+
export declare const updateCampaign: ActiveCampaignEndpoints["campaignsUpdate"];
|
|
6
|
+
export declare const listMessages: ActiveCampaignEndpoints["messagesList"];
|
|
7
|
+
export declare const getMessage: ActiveCampaignEndpoints["messagesGet"];
|
|
8
|
+
export declare const createMessage: ActiveCampaignEndpoints["messagesCreate"];
|
|
9
|
+
export declare const updateMessage: ActiveCampaignEndpoints["messagesUpdate"];
|
|
10
|
+
export declare const removeMessage: ActiveCampaignEndpoints["messagesDelete"];
|
|
11
|
+
export declare const listSavedResponses: ActiveCampaignEndpoints["savedResponsesList"];
|
|
12
|
+
export declare const getSavedResponse: ActiveCampaignEndpoints["savedResponsesGet"];
|
|
13
|
+
export declare const createSavedResponse: ActiveCampaignEndpoints["savedResponsesCreate"];
|
|
14
|
+
export declare const updateSavedResponse: ActiveCampaignEndpoints["savedResponsesUpdate"];
|
|
15
|
+
export declare const removeSavedResponse: ActiveCampaignEndpoints["savedResponsesDelete"];
|
|
16
|
+
export declare const listForms: ActiveCampaignEndpoints["formsList"];
|
|
17
|
+
export declare const getForm: ActiveCampaignEndpoints["formsGet"];
|
|
18
|
+
export declare const removeForm: ActiveCampaignEndpoints["formsDelete"];
|
|
19
|
+
export declare const listVariables: ActiveCampaignEndpoints["personalizationsList"];
|
|
20
|
+
export declare const getVariable: ActiveCampaignEndpoints["personalizationsGet"];
|
|
21
|
+
export declare const updateVariable: ActiveCampaignEndpoints["personalizationsUpdate"];
|
|
22
|
+
export declare const removeVariable: ActiveCampaignEndpoints["personalizationsDelete"];
|
|
23
|
+
export declare const getTemplate: ActiveCampaignEndpoints["templatesGet"];
|
|
24
|
+
export declare const listAutomations: ActiveCampaignEndpoints["automationsList"];
|
|
25
|
+
export declare const listSegments: ActiveCampaignEndpoints["segmentsList"];
|
|
26
|
+
export declare const getSegment: ActiveCampaignEndpoints["segmentsGet"];
|
|
27
|
+
export declare const createSegment: ActiveCampaignEndpoints["segmentsCreate"];
|
|
28
|
+
export declare const updateSegment: ActiveCampaignEndpoints["segmentsUpdate"];
|
|
29
|
+
export declare const removeSegment: ActiveCampaignEndpoints["segmentsDelete"];
|
|
30
|
+
export declare const getCampaignLinks: (ctx: import("../index").ActiveCampaignContext, args: {
|
|
31
|
+
id: string;
|
|
32
|
+
limit?: number | undefined;
|
|
33
|
+
offset?: number | undefined;
|
|
34
|
+
}) => Promise<{
|
|
35
|
+
[x: string]: unknown;
|
|
36
|
+
links: unknown[];
|
|
37
|
+
meta?: {
|
|
38
|
+
[x: string]: unknown;
|
|
39
|
+
total?: string | number | null | undefined;
|
|
40
|
+
} | null | undefined;
|
|
41
|
+
}>;
|
|
42
|
+
export declare const getCampaignMessages: (ctx: import("../index").ActiveCampaignContext, args: {
|
|
43
|
+
id: string;
|
|
44
|
+
limit?: number | undefined;
|
|
45
|
+
offset?: number | undefined;
|
|
46
|
+
}) => Promise<{
|
|
47
|
+
[x: string]: unknown;
|
|
48
|
+
campaignMessages: unknown[];
|
|
49
|
+
meta?: {
|
|
50
|
+
[x: string]: unknown;
|
|
51
|
+
total?: string | number | null | undefined;
|
|
52
|
+
} | null | undefined;
|
|
53
|
+
}>;
|
|
54
|
+
export declare const getCampaignAutomations: (ctx: import("../index").ActiveCampaignContext, args: {
|
|
55
|
+
id: string;
|
|
56
|
+
limit?: number | undefined;
|
|
57
|
+
offset?: number | undefined;
|
|
58
|
+
}) => Promise<{
|
|
59
|
+
[x: string]: unknown;
|
|
60
|
+
automations: unknown[];
|
|
61
|
+
meta?: {
|
|
62
|
+
[x: string]: unknown;
|
|
63
|
+
total?: string | number | null | undefined;
|
|
64
|
+
} | null | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
export declare const getCampaignAutomationLists: (ctx: import("../index").ActiveCampaignContext, args: {
|
|
67
|
+
id: string;
|
|
68
|
+
limit?: number | undefined;
|
|
69
|
+
offset?: number | undefined;
|
|
70
|
+
}) => Promise<{
|
|
71
|
+
[x: string]: unknown;
|
|
72
|
+
campaignLists: unknown[];
|
|
73
|
+
meta?: {
|
|
74
|
+
[x: string]: unknown;
|
|
75
|
+
total?: string | number | null | undefined;
|
|
76
|
+
} | null | undefined;
|
|
77
|
+
}>;
|
|
78
|
+
export declare const getCampaignUser: (ctx: import("../index").ActiveCampaignContext, args: {
|
|
79
|
+
id: string;
|
|
80
|
+
limit?: number | undefined;
|
|
81
|
+
offset?: number | undefined;
|
|
82
|
+
}) => Promise<{
|
|
83
|
+
[x: string]: unknown;
|
|
84
|
+
user: unknown;
|
|
85
|
+
}>;
|
|
86
|
+
/**
|
|
87
|
+
* Duplicates an existing campaign, content and configuration included.
|
|
88
|
+
*/
|
|
89
|
+
export declare const duplicateCampaign: ActiveCampaignEndpoints['campaignsDuplicate'];
|
|
90
|
+
/**
|
|
91
|
+
* Creates a shareable link for a campaign template.
|
|
92
|
+
*/
|
|
93
|
+
export declare const createTemplateShareLink: ActiveCampaignEndpoints['templatesCreateShareLink'];
|
|
94
|
+
/**
|
|
95
|
+
* Submits a form opt-in on a contact's behalf.
|
|
96
|
+
*
|
|
97
|
+
* This is a consent action: it records that the contact opted in through the
|
|
98
|
+
* given form, and can trigger the form's automations. The email is the
|
|
99
|
+
* subject's own data, so only the form id and the result are logged.
|
|
100
|
+
*/
|
|
101
|
+
export declare const createFormOptin: ActiveCampaignEndpoints['formsCreateOptin'];
|
|
102
|
+
/**
|
|
103
|
+
* Creates a personalization variable.
|
|
104
|
+
*
|
|
105
|
+
* Uses the singular `personalization` path, unlike the plural collection the
|
|
106
|
+
* other verbs use.
|
|
107
|
+
*/
|
|
108
|
+
export declare const createVariable: ActiveCampaignEndpoints['personalizationsCreate'];
|
|
109
|
+
/**
|
|
110
|
+
* Deletes many personalization variables at once. Ids that do not exist are
|
|
111
|
+
* ignored by ActiveCampaign rather than raising.
|
|
112
|
+
*/
|
|
113
|
+
export declare const removeVariablesBulk: ActiveCampaignEndpoints['personalizationsDeleteBulk'];
|
|
114
|
+
export declare const lockVariable: (ctx: import("../index").ActiveCampaignContext, args: {
|
|
115
|
+
id: string;
|
|
116
|
+
}) => Promise<{
|
|
117
|
+
[x: string]: unknown;
|
|
118
|
+
personalization: {
|
|
119
|
+
[x: string]: unknown;
|
|
120
|
+
id: string;
|
|
121
|
+
name?: string | null | undefined;
|
|
122
|
+
tag?: string | null | undefined;
|
|
123
|
+
content?: string | null | undefined;
|
|
124
|
+
format?: string | null | undefined;
|
|
125
|
+
locked?: string | null | undefined;
|
|
126
|
+
cdate?: string | null | undefined;
|
|
127
|
+
udate?: string | null | undefined;
|
|
128
|
+
links?: unknown;
|
|
129
|
+
};
|
|
130
|
+
}>;
|
|
131
|
+
export declare const unlockVariable: (ctx: import("../index").ActiveCampaignContext, args: {
|
|
132
|
+
id: string;
|
|
133
|
+
}) => Promise<{
|
|
134
|
+
[x: string]: unknown;
|
|
135
|
+
personalization: {
|
|
136
|
+
[x: string]: unknown;
|
|
137
|
+
id: string;
|
|
138
|
+
name?: string | null | undefined;
|
|
139
|
+
tag?: string | null | undefined;
|
|
140
|
+
content?: string | null | undefined;
|
|
141
|
+
format?: string | null | undefined;
|
|
142
|
+
locked?: string | null | undefined;
|
|
143
|
+
cdate?: string | null | undefined;
|
|
144
|
+
udate?: string | null | undefined;
|
|
145
|
+
links?: unknown;
|
|
146
|
+
};
|
|
147
|
+
}>;
|
|
148
|
+
/**
|
|
149
|
+
* Contact-to-automation enrolments. Transactional - a contact can enter the
|
|
150
|
+
* same automation many times - so these are never mirrored.
|
|
151
|
+
*/
|
|
152
|
+
export declare const listContactAutomations: ActiveCampaignEndpoints['contactAutomationsList'];
|
|
153
|
+
export declare const getContactAutomation: ActiveCampaignEndpoints['contactAutomationsGet'];
|
|
154
|
+
/**
|
|
155
|
+
* How many times a contact has entered each automation.
|
|
156
|
+
*/
|
|
157
|
+
export declare const getAutomationEntryCounts: ActiveCampaignEndpoints['contactAutomationsEntryCounts'];
|
|
158
|
+
/**
|
|
159
|
+
* Enrols a contact in an automation, looked up by email.
|
|
160
|
+
*
|
|
161
|
+
* Automations cannot be created through the API - only through the UI - so the
|
|
162
|
+
* automation must already exist. The contact is resolved to an id first,
|
|
163
|
+
* because the enrolment endpoint takes ids rather than emails.
|
|
164
|
+
*/
|
|
165
|
+
export declare const addContactToAutomation: ActiveCampaignEndpoints['contactAutomationsAdd'];
|
|
166
|
+
/**
|
|
167
|
+
* Removes a contact from an automation.
|
|
168
|
+
*
|
|
169
|
+
* A contact can hold several enrolments in the same automation, so this
|
|
170
|
+
* resolves the contact, lists their enrolments, and removes either every
|
|
171
|
+
* matching run or only the most recent. Destructive and not reversible.
|
|
172
|
+
*/
|
|
173
|
+
export declare const removeContactFromAutomation: ActiveCampaignEndpoints['contactAutomationsRemove'];
|
|
174
|
+
/**
|
|
175
|
+
* Saved segments, exposed by ActiveCampaign as "audiences".
|
|
176
|
+
*/
|
|
177
|
+
export declare const listAudiences: ActiveCampaignEndpoints['segmentsListAudiences'];
|
|
178
|
+
//# sourceMappingURL=content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../endpoints/content.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAsIxD,eAAO,MAAM,aAAa,EACP,uBAAuB,CAAC,eAAe,CAAC,CAAC;AAC5D,eAAO,MAAM,WAAW,EACN,uBAAuB,CAAC,cAAc,CAAC,CAAC;AAC1D,eAAO,MAAM,cAAc,EACN,uBAAuB,CAAC,iBAAiB,CAAC,CAAC;AAChE,eAAO,MAAM,cAAc,EACN,uBAAuB,CAAC,iBAAiB,CAAC,CAAC;AAGhE,eAAO,MAAM,YAAY,EACP,uBAAuB,CAAC,cAAc,CAAC,CAAC;AAC1D,eAAO,MAAM,UAAU,EACN,uBAAuB,CAAC,aAAa,CAAC,CAAC;AACxD,eAAO,MAAM,aAAa,EACN,uBAAuB,CAAC,gBAAgB,CAAC,CAAC;AAC9D,eAAO,MAAM,aAAa,EACN,uBAAuB,CAAC,gBAAgB,CAAC,CAAC;AAC9D,eAAO,MAAM,aAAa,EACN,uBAAuB,CAAC,gBAAgB,CAAC,CAAC;AAG9D,eAAO,MAAM,kBAAkB,EACP,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;AACtE,eAAO,MAAM,gBAAgB,EACN,uBAAuB,CAAC,mBAAmB,CAAC,CAAC;AACpE,eAAO,MAAM,mBAAmB,EACN,uBAAuB,CAAC,sBAAsB,CAAC,CAAC;AAC1E,eAAO,MAAM,mBAAmB,EACN,uBAAuB,CAAC,sBAAsB,CAAC,CAAC;AAC1E,eAAO,MAAM,mBA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E,uBAAuB,CAAC,oBAAoB,CAc1E,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,uBAAuB,CAAC,0BAA0B,CAgBtF,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,uBAAuB,CAAC,kBAAkB,CAwBtE,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,uBAAuB,CAAC,wBAAwB,CAyB3E,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,uBAAuB,CAAC,4BAA4B,CAiCpF,CAAC;AA8BH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;EAGxB,CAAC;AACF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;EAG1B,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,uBAAuB,CAAC,wBAAwB,CAqBnF,CAAC;AAEH,eAAO,MAAM,oBAAoB,EAAE,uBAAuB,CAAC,uBAAuB,CAchF,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,uBAAuB,CAAC,+BAA+B,CAgB5F,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,EAAE,uBAAuB,CAAC,uBAAuB,CAyClF,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,EAAE,uBAAuB,CAAC,0BAA0B,CAmF1F,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,uBAAuB,CAAC,uBAAuB,CAwBzE,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { ActiveCampaignEndpoints } from '../index';
|
|
2
|
+
export declare const list: ActiveCampaignEndpoints["dealsList"];
|
|
3
|
+
export declare const listFiltered: ActiveCampaignEndpoints["dealsListFiltered"];
|
|
4
|
+
export declare const get: ActiveCampaignEndpoints["dealsGet"];
|
|
5
|
+
export declare const update: ActiveCampaignEndpoints["dealsUpdate"];
|
|
6
|
+
export declare const remove: ActiveCampaignEndpoints["dealsDelete"];
|
|
7
|
+
export declare const listGroups: ActiveCampaignEndpoints["dealGroupsList"];
|
|
8
|
+
export declare const getGroup: ActiveCampaignEndpoints["dealGroupsGet"];
|
|
9
|
+
export declare const createGroup: ActiveCampaignEndpoints["dealGroupsCreate"];
|
|
10
|
+
export declare const updateGroup: ActiveCampaignEndpoints["dealGroupsUpdate"];
|
|
11
|
+
export declare const removeGroup: ActiveCampaignEndpoints["dealGroupsDelete"];
|
|
12
|
+
export declare const listStages: ActiveCampaignEndpoints["dealStagesList"];
|
|
13
|
+
export declare const getStage: ActiveCampaignEndpoints["dealStagesGet"];
|
|
14
|
+
export declare const createStage: ActiveCampaignEndpoints["dealStagesCreate"];
|
|
15
|
+
export declare const updateStage: ActiveCampaignEndpoints["dealStagesUpdate"];
|
|
16
|
+
export declare const removeStage: ActiveCampaignEndpoints["dealStagesDelete"];
|
|
17
|
+
export declare const listTasks: ActiveCampaignEndpoints["dealTasksList"];
|
|
18
|
+
export declare const getTask: ActiveCampaignEndpoints["dealTasksGet"];
|
|
19
|
+
export declare const createTask: ActiveCampaignEndpoints["dealTasksCreate"];
|
|
20
|
+
export declare const updateTask: ActiveCampaignEndpoints["dealTasksUpdate"];
|
|
21
|
+
export declare const removeTask: ActiveCampaignEndpoints["dealTasksDelete"];
|
|
22
|
+
export declare const listTaskTypes: ActiveCampaignEndpoints["dealTaskTypesList"];
|
|
23
|
+
export declare const getTaskType: ActiveCampaignEndpoints["dealTaskTypesGet"];
|
|
24
|
+
export declare const createTaskType: ActiveCampaignEndpoints["dealTaskTypesCreate"];
|
|
25
|
+
export declare const updateTaskType: ActiveCampaignEndpoints["dealTaskTypesUpdate"];
|
|
26
|
+
export declare const listOutcomes: ActiveCampaignEndpoints["taskOutcomesList"];
|
|
27
|
+
export declare const getOutcome: ActiveCampaignEndpoints["taskOutcomesGet"];
|
|
28
|
+
export declare const createOutcome: ActiveCampaignEndpoints["taskOutcomesCreate"];
|
|
29
|
+
export declare const listRoles: ActiveCampaignEndpoints["dealRolesList"];
|
|
30
|
+
export declare const createRole: ActiveCampaignEndpoints["dealRolesCreate"];
|
|
31
|
+
export declare const removeRole: ActiveCampaignEndpoints["dealRolesDelete"];
|
|
32
|
+
export declare const listSecondaryContacts: ActiveCampaignEndpoints["contactDealsList"];
|
|
33
|
+
export declare const getSecondaryContact: ActiveCampaignEndpoints["contactDealsGet"];
|
|
34
|
+
export declare const addSecondaryContact: ActiveCampaignEndpoints["contactDealsCreate"];
|
|
35
|
+
export declare const updateSecondaryContact: ActiveCampaignEndpoints["contactDealsUpdate"];
|
|
36
|
+
export declare const removeSecondaryContact: ActiveCampaignEndpoints["contactDealsDelete"];
|
|
37
|
+
export declare const listFieldMeta: ActiveCampaignEndpoints["dealCustomFieldMetaList"];
|
|
38
|
+
export declare const getFieldMeta: ActiveCampaignEndpoints["dealCustomFieldMetaGet"];
|
|
39
|
+
export declare const createFieldMeta: ActiveCampaignEndpoints["dealCustomFieldMetaCreate"];
|
|
40
|
+
export declare const updateFieldMeta: ActiveCampaignEndpoints["dealCustomFieldMetaUpdate"];
|
|
41
|
+
export declare const removeFieldMeta: ActiveCampaignEndpoints["dealCustomFieldMetaDelete"];
|
|
42
|
+
export declare const listFieldData: ActiveCampaignEndpoints["dealCustomFieldDataList"];
|
|
43
|
+
export declare const getFieldData: ActiveCampaignEndpoints["dealCustomFieldDataGet"];
|
|
44
|
+
export declare const updateFieldData: ActiveCampaignEndpoints["dealCustomFieldDataUpdate"];
|
|
45
|
+
export declare const removeFieldData: ActiveCampaignEndpoints["dealCustomFieldDataDelete"];
|
|
46
|
+
/**
|
|
47
|
+
* Deal activity feed. Read-only and never mirrored - activities are appended
|
|
48
|
+
* continuously and are only meaningful against a time range.
|
|
49
|
+
*/
|
|
50
|
+
export declare const listActivities: ActiveCampaignEndpoints['dealActivitiesList'];
|
|
51
|
+
/**
|
|
52
|
+
* Reassigns many deals to new owners in one call.
|
|
53
|
+
*
|
|
54
|
+
* Requires deal-management, pipeline and reassign permissions. The whole batch
|
|
55
|
+
* is one request, so a retry would re-apply every reassignment - it is listed
|
|
56
|
+
* as non-idempotent for that reason.
|
|
57
|
+
*/
|
|
58
|
+
export declare const updateOwnersBulk: ActiveCampaignEndpoints['dealsUpdateOwnersBulk'];
|
|
59
|
+
/**
|
|
60
|
+
* Moves every deal in one stage to another stage.
|
|
61
|
+
*
|
|
62
|
+
* Both stages must belong to the same pipeline; ActiveCampaign answers 422
|
|
63
|
+
* otherwise, which the validation handler surfaces without a retry.
|
|
64
|
+
*/
|
|
65
|
+
export declare const moveStageDeals: ActiveCampaignEndpoints['dealStagesMoveDeals'];
|
|
66
|
+
/**
|
|
67
|
+
* Deletes a pipeline stage, optionally moving its deals first.
|
|
68
|
+
*
|
|
69
|
+
* `action_type: 'Move'` requires both `new_pipeline_id` and `new_stage_id`;
|
|
70
|
+
* the input schema enforces that pairing with a refinement, because deleting a
|
|
71
|
+
* stage without relocating its deals destroys them.
|
|
72
|
+
*/
|
|
73
|
+
export declare const removeStageWithDeals: ActiveCampaignEndpoints['dealStagesDeleteWithDeals'];
|
|
74
|
+
/**
|
|
75
|
+
* Tasks against a contact.
|
|
76
|
+
*
|
|
77
|
+
* ActiveCampaign has no `/tasks` collection - it answers 404 - so contact
|
|
78
|
+
* tasks are deal tasks with `reltype: 'Subscriber'`. Exposed as contact-facing
|
|
79
|
+
* operations because that is how the catalog lists them.
|
|
80
|
+
*/
|
|
81
|
+
export declare const createContactTask: ActiveCampaignEndpoints['contactTasksCreate'];
|
|
82
|
+
/**
|
|
83
|
+
* Finds contact tasks by title, optionally narrowed to one contact.
|
|
84
|
+
*
|
|
85
|
+
* The collection has no title filter, so matching happens here; the title is
|
|
86
|
+
* caller-supplied text and only the match count is logged.
|
|
87
|
+
*/
|
|
88
|
+
export declare const findContactTask: ActiveCampaignEndpoints['contactTasksFind'];
|
|
89
|
+
//# sourceMappingURL=deals.d.ts.map
|
|
@@ -0,0 +1 @@
|
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AAO,MAAM,YAAY,EACG,uBAAuB,CAAC,wBAAwB,CAAC,CAAC;AAC9E,eAAO,MAAM,eAAe,EACG,uBAAuB,CAAC,2BAA2B,CAAC,CAAC;AACpF,eAAO,MAAM,eAAe,EACG,uBAAuB,CAAC,2BAA2B,CAAC,CAAC;AACpF,eAAO,MAAM,eAAe,EACG,uBAAuB,CAAC,2BAA2B,CAAC,CAAC;AAEpF,eAAO,MAAM,aAAa,EACG,uBAAuB,CAAC,yBAAyB,CAAC,CAAC;AAChF,eAAO,MAAM,YAAY,EACG,uBAAuB,CAAC,wBAAwB,CAAC,CAAC;AAC9E,eAAO,MAAM,eAAe,EACG,uBAAuB,CAAC,2BAA2B,CAAC,CAAC;AACpF,eAAO,MAAM,eAAe,EACG,uBAAuB,CAAC,2BAA2B,CAAC,CAAC;AAMpF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,uBAAuB,CAAC,oBAAoB,CA6BvE,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,uBAAuB,CAAC,uBAAuB,CAiB5E,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,uBAAuB,CAAC,qBAAqB,CAiBxE,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,uBAAuB,CAAC,2BAA2B,CAgCpF,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,uBAAuB,CAAC,oBAAoB,CAkC1E,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,uBAAuB,CAAC,kBAAkB,CA4CtE,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ActiveCampaignEndpoints } from '../index';
|
|
2
|
+
/**
|
|
3
|
+
* Custom field *definitions*. An agent needs the account's field schema to
|
|
4
|
+
* interpret the values attached to a contact, which is why the definitions are
|
|
5
|
+
* mirrored.
|
|
6
|
+
*/
|
|
7
|
+
export declare const list: ActiveCampaignEndpoints['fieldsList'];
|
|
8
|
+
export declare const get: ActiveCampaignEndpoints['fieldsGet'];
|
|
9
|
+
export declare const create: ActiveCampaignEndpoints['fieldsCreate'];
|
|
10
|
+
export declare const update: ActiveCampaignEndpoints['fieldsUpdate'];
|
|
11
|
+
/**
|
|
12
|
+
* Deleting a field definition also destroys every value stored against it
|
|
13
|
+
* upstream, so both the field and its cached values are evicted - leaving the
|
|
14
|
+
* values behind would let the mirror describe data that no longer exists.
|
|
15
|
+
*/
|
|
16
|
+
export declare const remove: ActiveCampaignEndpoints['fieldsDelete'];
|
|
17
|
+
/**
|
|
18
|
+
* Creates options in bulk for a dropdown, radio, checkbox or listbox field.
|
|
19
|
+
* The field must already exist.
|
|
20
|
+
*/
|
|
21
|
+
export declare const createOptionsBulk: ActiveCampaignEndpoints['fieldOptionsCreateBulk'];
|
|
22
|
+
export declare const listValues: ActiveCampaignEndpoints['fieldValuesList'];
|
|
23
|
+
export declare const getValue: ActiveCampaignEndpoints['fieldValuesGet'];
|
|
24
|
+
/**
|
|
25
|
+
* Sets a custom field value on a contact.
|
|
26
|
+
*
|
|
27
|
+
* The value is caller-supplied contact data, so it is never logged - only the
|
|
28
|
+
* contact and field identifiers are.
|
|
29
|
+
*/
|
|
30
|
+
export declare const setValueForContact: ActiveCampaignEndpoints['fieldValuesSetForContact'];
|
|
31
|
+
export declare const updateValue: ActiveCampaignEndpoints['fieldValuesUpdate'];
|
|
32
|
+
export declare const removeValue: ActiveCampaignEndpoints['fieldValuesDelete'];
|
|
33
|
+
export declare const listRels: ActiveCampaignEndpoints['fieldRelsList'];
|
|
34
|
+
export declare const createRel: ActiveCampaignEndpoints['fieldRelsCreate'];
|
|
35
|
+
export declare const removeRel: ActiveCampaignEndpoints['fieldRelsDelete'];
|
|
36
|
+
export declare const listGroupMembers: ActiveCampaignEndpoints['groupMembersList'];
|
|
37
|
+
/**
|
|
38
|
+
* Adds a custom field to a display group, which is what makes it visible on
|
|
39
|
+
* contact and deal pages. Takes the field *relationship* id, not the field id.
|
|
40
|
+
*/
|
|
41
|
+
export declare const createGroupMember: ActiveCampaignEndpoints['groupMembersCreate'];
|
|
42
|
+
export declare const updateGroupMember: ActiveCampaignEndpoints['groupMembersUpdate'];
|
|
43
|
+
export declare const removeGroupMember: ActiveCampaignEndpoints['groupMembersDelete'];
|
|
44
|
+
//# sourceMappingURL=fields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../endpoints/fields.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAiBxD;;;;GAIG;AACH,eAAO,MAAM,IAAI,EAAE,uBAAuB,CAAC,YAAY,CA0BtD,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,uBAAuB,CAAC,WAAW,CAepD,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,uBAAuB,CAAC,cAAc,CAmC1D,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,uBAAuB,CAAC,cAAc,CAkC1D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,MAAM,EAAE,uBAAuB,CAAC,cAAc,CAsB1D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,uBAAuB,CAAC,wBAAwB,CAmC9E,CAAC;AAMH,eAAO,MAAM,UAAU,EAAE,uBAAuB,CAAC,iBAAiB,CA8BjE,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,uBAAuB,CAAC,gBAAgB,CAuB9D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,uBAAuB,CAAC,0BAA0B,CAiCjF,CAAC;AAEH,eAAO,MAAM,WAAW,EAAE,uBAAuB,CAAC,mBAAmB,CA6BpE,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,uBAAuB,CAAC,mBAAmB,CAqBpE,CAAC;AAMF,eAAO,MAAM,QAAQ,EAAE,uBAAuB,CAAC,eAAe,CA8B7D,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,uBAAuB,CAAC,iBAAiB,CA0BhE,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,uBAAuB,CAAC,iBAAiB,CAqBhE,CAAC;AAMF,eAAO,MAAM,gBAAgB,EAAE,uBAAuB,CAAC,kBAAkB,CA4BvE,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,uBAAuB,CAAC,oBAAoB,CA8B1E,CAAC;AAEH,eAAO,MAAM,iBAAiB,EAAE,uBAAuB,CAAC,oBAAoB,CA8B1E,CAAC;AAEH,eAAO,MAAM,iBAAiB,EAAE,uBAAuB,CAAC,oBAAoB,CAmB1E,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ActiveCampaignEndpoints } from '../index';
|
|
2
|
+
/**
|
|
3
|
+
* Queues contacts for asynchronous import.
|
|
4
|
+
*
|
|
5
|
+
* ActiveCampaign accepts up to 250 contacts per call below 400 KB and returns
|
|
6
|
+
* immediately with a batch id; the rows are written in the background. Nothing
|
|
7
|
+
* is mirrored here, because the response carries a batch receipt rather than
|
|
8
|
+
* the contacts themselves - the imported rows only become visible through the
|
|
9
|
+
* contact endpoints once processing finishes.
|
|
10
|
+
*
|
|
11
|
+
* `exclude_automations` is sent explicitly rather than omitted. Omitting it
|
|
12
|
+
* lets ActiveCampaign apply its own default, which runs every automation
|
|
13
|
+
* triggered by a list subscription - for a bulk import that can mean a
|
|
14
|
+
* very large amount of outbound mail. The safe value has to be chosen by the
|
|
15
|
+
* caller, so the default here is to exclude.
|
|
16
|
+
*/
|
|
17
|
+
export declare const createBulk: ActiveCampaignEndpoints['importsCreateBulk'];
|
|
18
|
+
/**
|
|
19
|
+
* Outstanding and recently completed import batches. ActiveCampaign returns a
|
|
20
|
+
* rolling window rather than full history.
|
|
21
|
+
*/
|
|
22
|
+
export declare const list: ActiveCampaignEndpoints['importsList'];
|
|
23
|
+
/**
|
|
24
|
+
* Progress of a single batch.
|
|
25
|
+
*
|
|
26
|
+
* `batchId` is required - the endpoint answers 400 with
|
|
27
|
+
* "'batchId' is a required field." when it is absent, so it is a required
|
|
28
|
+
* input rather than an optional filter.
|
|
29
|
+
*/
|
|
30
|
+
export declare const getStatus: ActiveCampaignEndpoints['importsGetStatus'];
|
|
31
|
+
//# sourceMappingURL=imports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imports.d.ts","sourceRoot":"","sources":["../../endpoints/imports.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAKxD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,UAAU,EAAE,uBAAuB,CAAC,mBAAmB,CAmCnE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,uBAAuB,CAAC,aAAa,CAgBvD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,EAAE,uBAAuB,CAAC,kBAAkB,CAmBjE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as AccountsEndpoints from './accounts';
|
|
2
|
+
import * as ContactsEndpoints from './contacts';
|
|
3
|
+
import * as ContentEndpoints from './content';
|
|
4
|
+
import * as DealsEndpoints from './deals';
|
|
5
|
+
import * as FieldsEndpoints from './fields';
|
|
6
|
+
import * as ImportsEndpoints from './imports';
|
|
7
|
+
import * as ListsEndpoints from './lists';
|
|
8
|
+
import * as PlatformEndpoints from './platform';
|
|
9
|
+
import * as SegmentsV2Endpoints from './segments-v2';
|
|
10
|
+
import * as TagsEndpoints from './tags';
|
|
11
|
+
export declare const Accounts: typeof AccountsEndpoints;
|
|
12
|
+
export declare const Contacts: typeof ContactsEndpoints;
|
|
13
|
+
export declare const Content: typeof ContentEndpoints;
|
|
14
|
+
export declare const Deals: typeof DealsEndpoints;
|
|
15
|
+
export declare const Lists: typeof ListsEndpoints;
|
|
16
|
+
export declare const Platform: typeof PlatformEndpoints;
|
|
17
|
+
export declare const SegmentsV2: typeof SegmentsV2Endpoints;
|
|
18
|
+
export declare const Tags: typeof TagsEndpoints;
|
|
19
|
+
export declare const Fields: typeof FieldsEndpoints;
|
|
20
|
+
export declare const Imports: typeof ImportsEndpoints;
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../endpoints/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,iBAAiB,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,gBAAgB,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,cAAc,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,eAAe,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,gBAAgB,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,cAAc,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,iBAAiB,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,mBAAmB,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,aAAa,MAAM,QAAQ,CAAC;AAExC,eAAO,MAAM,QAAQ,0BAAoB,CAAC;AAC1C,eAAO,MAAM,QAAQ,0BAAoB,CAAC;AAC1C,eAAO,MAAM,OAAO,yBAAmB,CAAC;AACxC,eAAO,MAAM,KAAK,uBAAiB,CAAC;AACpC,eAAO,MAAM,KAAK,uBAAiB,CAAC;AACpC,eAAO,MAAM,QAAQ,0BAAoB,CAAC;AAC1C,eAAO,MAAM,UAAU,4BAAsB,CAAC;AAC9C,eAAO,MAAM,IAAI,sBAAgB,CAAC;AAClC,eAAO,MAAM,MAAM,wBAAkB,CAAC;AACtC,eAAO,MAAM,OAAO,yBAAmB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ActiveCampaignEndpoints } from '../index';
|
|
2
|
+
export declare const list: ActiveCampaignEndpoints['listsList'];
|
|
3
|
+
export declare const get: ActiveCampaignEndpoints['listsGet'];
|
|
4
|
+
export declare const create: ActiveCampaignEndpoints['listsCreate'];
|
|
5
|
+
export declare const remove: ActiveCampaignEndpoints['listsDelete'];
|
|
6
|
+
export declare const listContactLists: ActiveCampaignEndpoints['contactListsList'];
|
|
7
|
+
/**
|
|
8
|
+
* Subscribes (status 1) or unsubscribes (status 2) a contact.
|
|
9
|
+
*
|
|
10
|
+
* The association row is not deleted on an unsubscribe - ActiveCampaign keeps
|
|
11
|
+
* it so the history survives - so this never evicts from the mirror.
|
|
12
|
+
*/
|
|
13
|
+
export declare const updateSubscription: ActiveCampaignEndpoints['listsUpdateSubscription'];
|
|
14
|
+
/**
|
|
15
|
+
* Grants a user group a set of permissions over a list.
|
|
16
|
+
*
|
|
17
|
+
* ActiveCampaign derives the individual permission flags from the account's
|
|
18
|
+
* defaults; this endpoint only takes the list and the group.
|
|
19
|
+
*/
|
|
20
|
+
export declare const createListGroup: ActiveCampaignEndpoints['listGroupsCreate'];
|
|
21
|
+
//# sourceMappingURL=lists.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../endpoints/lists.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAgBxD,eAAO,MAAM,IAAI,EAAE,uBAAuB,CAAC,WAAW,CA0BrD,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,uBAAuB,CAAC,UAAU,CAenD,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,uBAAuB,CAAC,aAAa,CAsCzD,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,uBAAuB,CAAC,aAAa,CAqBzD,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,uBAAuB,CAAC,kBAAkB,CA4BvE,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,uBAAuB,CAAC,yBAAyB,CA8BhF,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,uBAAuB,CAAC,kBAAkB,CA0BtE,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds the payload recorded in `corsair_events` for an operation.
|
|
3
|
+
*
|
|
4
|
+
* ActiveCampaign inputs carry personal data - email addresses, first and last
|
|
5
|
+
* names, phone numbers, and free-text note bodies. None of that belongs in a
|
|
6
|
+
* durable event log, so this allow-lists the keys that may be recorded by
|
|
7
|
+
* value (identifiers, pagination, status flags) and records every other
|
|
8
|
+
* supplied key by *name only*, so an audit still shows which fields an
|
|
9
|
+
* operation touched without storing what was in them.
|
|
10
|
+
*
|
|
11
|
+
* `endpoints.test.ts` asserts the exact payload for the operations that accept
|
|
12
|
+
* personal data, because this is the one place caller-supplied text could
|
|
13
|
+
* reach durable storage.
|
|
14
|
+
*/
|
|
15
|
+
export declare function auditPayload(input: Record<string, unknown>, allowedKeys: readonly string[]): Record<string, unknown>;
|
|
16
|
+
/**
|
|
17
|
+
* Records how many rows a list operation returned, rather than the rows.
|
|
18
|
+
*/
|
|
19
|
+
export declare function listAuditPayload(input: Record<string, unknown>, allowedKeys: readonly string[], returnedCount: number): Record<string, unknown>;
|
|
20
|
+
//# sourceMappingURL=logging.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../endpoints/logging.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,WAAW,EAAE,SAAS,MAAM,EAAE,GAC5B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAoBzB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,aAAa,EAAE,MAAM,GACnB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The subset of the entity store these helpers use.
|
|
4
|
+
*
|
|
5
|
+
* Declared with method shorthand rather than function properties on purpose:
|
|
6
|
+
* the real store types its `data` parameter as the specific entity, and under
|
|
7
|
+
* property syntax TypeScript checks parameters contravariantly, so a store for
|
|
8
|
+
* a concrete entity would not be assignable to a store for a generic row.
|
|
9
|
+
* Method shorthand is bivariant, which is what lets one helper serve all 43
|
|
10
|
+
* entities.
|
|
11
|
+
*/
|
|
12
|
+
type Store = {
|
|
13
|
+
upsertByEntityId(entityId: string, data: never): Promise<unknown>;
|
|
14
|
+
deleteByEntityId?(entityId: string): Promise<unknown>;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The extra capability {@link evictChildren} needs: a search by stored field.
|
|
18
|
+
* Kept separate from {@link Store} so the common helpers do not require it.
|
|
19
|
+
*/
|
|
20
|
+
type ChildStore = Store & {
|
|
21
|
+
search?(options: never): Promise<Array<{
|
|
22
|
+
entity_id?: string;
|
|
23
|
+
} | undefined>>;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Validates and writes a single row.
|
|
27
|
+
*/
|
|
28
|
+
export declare function persistRow(store: Store | undefined, schema: z.ZodType, row: unknown, entityName: string): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Validates and writes a page of rows, bounded to {@link WRITE_CONCURRENCY}.
|
|
31
|
+
*/
|
|
32
|
+
export declare function persistRows(store: Store | undefined, schema: z.ZodType, rows: unknown, entityName: string): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Removes a row from the mirror after the record is deleted upstream.
|
|
35
|
+
*
|
|
36
|
+
* Reads deliberately do not evict: ActiveCampaign archives far more often than
|
|
37
|
+
* it deletes, and a record that stops appearing in a filtered list is usually
|
|
38
|
+
* still a real record. An explicit DELETE is different - it is permanent, and
|
|
39
|
+
* leaving the row would let the mirror outlive the record it describes.
|
|
40
|
+
*/
|
|
41
|
+
export declare function evictRow(store: Store | undefined, entityId: string, entityName: string): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Removes every mirrored row that points at a deleted parent.
|
|
44
|
+
*
|
|
45
|
+
* Some deletions cascade upstream: removing a custom field destroys every
|
|
46
|
+
* value stored against it, and removing a tag removes every contact-tag
|
|
47
|
+
* association. Evicting only the parent would leave those children in the
|
|
48
|
+
* mirror describing something that no longer exists, which is the same
|
|
49
|
+
* staleness `evictRow` exists to prevent - just one level down.
|
|
50
|
+
*
|
|
51
|
+
* The store exposes `search`, so the children are found by their foreign key
|
|
52
|
+
* and evicted individually. Best-effort throughout: a mirror that cannot be
|
|
53
|
+
* cleaned must not fail the API call that already succeeded.
|
|
54
|
+
*/
|
|
55
|
+
export declare function evictChildren(store: ChildStore | undefined, foreignKey: string, parentId: string, entityName: string): Promise<void>;
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=persist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persist.d.ts","sourceRoot":"","sources":["../../endpoints/persist.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqB7B;;;;;;;;;GASG;AACH,KAAK,KAAK,GAAG;IACZ,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAClE,gBAAgB,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtD,CAAC;AAEF;;;GAGG;AACH,KAAK,UAAU,GAAG,KAAK,GAAG;IAKzB,MAAM,CAAC,CAAC,OAAO,EAAE,KAAK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