@gpt-platform/admin 0.9.0 → 0.10.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/index.d.mts +27076 -21325
- package/dist/index.d.ts +27076 -21325
- package/dist/index.js +1794 -349
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1793 -349
- package/dist/index.mjs.map +1 -1
- package/llms.txt +500 -445
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32,6 +32,7 @@ __export(index_exports, {
|
|
|
32
32
|
ServerError: () => ServerError,
|
|
33
33
|
TimeoutError: () => TimeoutError,
|
|
34
34
|
ValidationError: () => ValidationError,
|
|
35
|
+
createChannelsNamespace: () => createChannelsNamespace,
|
|
35
36
|
createImportsNamespace: () => createImportsNamespace,
|
|
36
37
|
default: () => index_default,
|
|
37
38
|
handleApiError: () => handleApiError
|
|
@@ -854,8 +855,8 @@ var createClient = (config = {}) => {
|
|
|
854
855
|
};
|
|
855
856
|
|
|
856
857
|
// src/version.ts
|
|
857
|
-
var SDK_VERSION = "0.
|
|
858
|
-
var DEFAULT_API_VERSION = "2026-03-
|
|
858
|
+
var SDK_VERSION = "0.10.1";
|
|
859
|
+
var DEFAULT_API_VERSION = "2026-03-23";
|
|
859
860
|
|
|
860
861
|
// src/base-client.ts
|
|
861
862
|
function isSecureUrl(url) {
|
|
@@ -1003,7 +1004,7 @@ var ServerError = class extends GptCoreError {
|
|
|
1003
1004
|
function handleApiError(error) {
|
|
1004
1005
|
const err = error;
|
|
1005
1006
|
const response = err?.response || err;
|
|
1006
|
-
|
|
1007
|
+
let statusCode = response?.status || err?.status || err?.statusCode;
|
|
1007
1008
|
const headers = response?.headers || err?.headers;
|
|
1008
1009
|
const requestId = headers?.get?.("x-request-id") || headers?.["x-request-id"];
|
|
1009
1010
|
const body = response?.body || response?.data || err?.body || err?.data || err;
|
|
@@ -1017,6 +1018,13 @@ function handleApiError(error) {
|
|
|
1017
1018
|
field: e.source?.pointer?.split("/").pop(),
|
|
1018
1019
|
message: e.detail || e.title || "Unknown error"
|
|
1019
1020
|
}));
|
|
1021
|
+
if (!statusCode && firstError?.status) {
|
|
1022
|
+
const parsed = parseInt(firstError.status, 10);
|
|
1023
|
+
if (!isNaN(parsed)) statusCode = parsed;
|
|
1024
|
+
}
|
|
1025
|
+
} else if (bodyObj?.errors && typeof bodyObj.errors === "object" && !Array.isArray(bodyObj.errors)) {
|
|
1026
|
+
const errObj = bodyObj.errors;
|
|
1027
|
+
message = errObj.detail || errObj.title || message;
|
|
1020
1028
|
} else if (bodyObj?.message) {
|
|
1021
1029
|
message = bodyObj.message;
|
|
1022
1030
|
} else if (typeof body === "string") {
|
|
@@ -1198,15 +1206,18 @@ var RequestBuilder = class {
|
|
|
1198
1206
|
async execute(fn, params, options) {
|
|
1199
1207
|
const headers = buildHeaders(this.getHeaders, options);
|
|
1200
1208
|
try {
|
|
1201
|
-
const
|
|
1209
|
+
const result = await this.requestWithRetry(
|
|
1202
1210
|
() => fn({
|
|
1203
1211
|
client: this.clientInstance,
|
|
1204
|
-
throwOnError: true,
|
|
1205
1212
|
headers,
|
|
1206
1213
|
...params,
|
|
1207
1214
|
...options?.signal && { signal: options.signal }
|
|
1208
1215
|
})
|
|
1209
1216
|
);
|
|
1217
|
+
const { data, error } = result;
|
|
1218
|
+
if (error) {
|
|
1219
|
+
throw enrichError(error, result);
|
|
1220
|
+
}
|
|
1210
1221
|
return this.unwrap(data?.data);
|
|
1211
1222
|
} catch (error) {
|
|
1212
1223
|
throw handleApiError(error);
|
|
@@ -1218,15 +1229,18 @@ var RequestBuilder = class {
|
|
|
1218
1229
|
async executeDelete(fn, params, options) {
|
|
1219
1230
|
const headers = buildHeaders(this.getHeaders, options);
|
|
1220
1231
|
try {
|
|
1221
|
-
await this.requestWithRetry(
|
|
1232
|
+
const result = await this.requestWithRetry(
|
|
1222
1233
|
() => fn({
|
|
1223
1234
|
client: this.clientInstance,
|
|
1224
|
-
throwOnError: true,
|
|
1225
1235
|
headers,
|
|
1226
1236
|
...params,
|
|
1227
1237
|
...options?.signal && { signal: options.signal }
|
|
1228
1238
|
})
|
|
1229
1239
|
);
|
|
1240
|
+
const { error } = result;
|
|
1241
|
+
if (error) {
|
|
1242
|
+
throw enrichError(error, result);
|
|
1243
|
+
}
|
|
1230
1244
|
return true;
|
|
1231
1245
|
} catch (error) {
|
|
1232
1246
|
throw handleApiError(error);
|
|
@@ -1483,6 +1497,11 @@ var client = createClient(
|
|
|
1483
1497
|
);
|
|
1484
1498
|
|
|
1485
1499
|
// src/_internal/sdk.gen.ts
|
|
1500
|
+
var getAdminEmailTemplateVersionsTemplateByTemplateId = (options) => (options.client ?? client).get({
|
|
1501
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1502
|
+
url: "/admin/email/template-versions/template/{template_id}",
|
|
1503
|
+
...options
|
|
1504
|
+
});
|
|
1486
1505
|
var getAdminWorkspaces = (options) => (options.client ?? client).get({
|
|
1487
1506
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1488
1507
|
url: "/admin/workspaces",
|
|
@@ -1497,6 +1516,16 @@ var postAdminWorkspaces = (options) => (options.client ?? client).post({
|
|
|
1497
1516
|
...options.headers
|
|
1498
1517
|
}
|
|
1499
1518
|
});
|
|
1519
|
+
var deleteAdminVoiceTranscriptionJobsById = (options) => (options.client ?? client).delete({
|
|
1520
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1521
|
+
url: "/admin/voice/transcription-jobs/{id}",
|
|
1522
|
+
...options
|
|
1523
|
+
});
|
|
1524
|
+
var getAdminVoiceTranscriptionJobsById = (options) => (options.client ?? client).get({
|
|
1525
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1526
|
+
url: "/admin/voice/transcription-jobs/{id}",
|
|
1527
|
+
...options
|
|
1528
|
+
});
|
|
1500
1529
|
var getAdminWallet = (options) => (options.client ?? client).get({
|
|
1501
1530
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1502
1531
|
url: "/admin/wallet",
|
|
@@ -1662,6 +1691,20 @@ var getAdminSocialMetricsCampaignBySocialCampaignId = (options) => (options.clie
|
|
|
1662
1691
|
url: "/admin/social/metrics/campaign/{social_campaign_id}",
|
|
1663
1692
|
...options
|
|
1664
1693
|
});
|
|
1694
|
+
var getAdminVoiceTranscriptionJobs = (options) => (options.client ?? client).get({
|
|
1695
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1696
|
+
url: "/admin/voice/transcription-jobs",
|
|
1697
|
+
...options
|
|
1698
|
+
});
|
|
1699
|
+
var postAdminVoiceTranscriptionJobs = (options) => (options.client ?? client).post({
|
|
1700
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1701
|
+
url: "/admin/voice/transcription-jobs",
|
|
1702
|
+
...options,
|
|
1703
|
+
headers: {
|
|
1704
|
+
"Content-Type": "application/vnd.api+json",
|
|
1705
|
+
...options.headers
|
|
1706
|
+
}
|
|
1707
|
+
});
|
|
1665
1708
|
var getAdminFieldTemplates = (options) => (options.client ?? client).get({
|
|
1666
1709
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1667
1710
|
url: "/admin/field-templates",
|
|
@@ -1690,6 +1733,25 @@ var postAdminConnectors = (options) => (options.client ?? client).post({
|
|
|
1690
1733
|
...options.headers
|
|
1691
1734
|
}
|
|
1692
1735
|
});
|
|
1736
|
+
var deleteAdminCampaignsSequencesById = (options) => (options.client ?? client).delete({
|
|
1737
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1738
|
+
url: "/admin/campaigns/sequences/{id}",
|
|
1739
|
+
...options
|
|
1740
|
+
});
|
|
1741
|
+
var getAdminCampaignsSequencesById = (options) => (options.client ?? client).get({
|
|
1742
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1743
|
+
url: "/admin/campaigns/sequences/{id}",
|
|
1744
|
+
...options
|
|
1745
|
+
});
|
|
1746
|
+
var patchAdminCampaignsSequencesById = (options) => (options.client ?? client).patch({
|
|
1747
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1748
|
+
url: "/admin/campaigns/sequences/{id}",
|
|
1749
|
+
...options,
|
|
1750
|
+
headers: {
|
|
1751
|
+
"Content-Type": "application/vnd.api+json",
|
|
1752
|
+
...options.headers
|
|
1753
|
+
}
|
|
1754
|
+
});
|
|
1693
1755
|
var deleteAdminCrmRelationshipTypesById = (options) => (options.client ?? client).delete({
|
|
1694
1756
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1695
1757
|
url: "/admin/crm/relationship-types/{id}",
|
|
@@ -1822,6 +1884,15 @@ var getAdminCrmRelationshipsById = (options) => (options.client ?? client).get({
|
|
|
1822
1884
|
url: "/admin/crm/relationships/{id}",
|
|
1823
1885
|
...options
|
|
1824
1886
|
});
|
|
1887
|
+
var postAdminEmailMarketingCampaignsByIdCreateFollowup = (options) => (options.client ?? client).post({
|
|
1888
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1889
|
+
url: "/admin/email-marketing/campaigns/{id}/create-followup",
|
|
1890
|
+
...options,
|
|
1891
|
+
headers: {
|
|
1892
|
+
"Content-Type": "application/vnd.api+json",
|
|
1893
|
+
...options.headers
|
|
1894
|
+
}
|
|
1895
|
+
});
|
|
1825
1896
|
var getAdminExtractionResultsDocumentByDocumentIdHistory = (options) => (options.client ?? client).get({
|
|
1826
1897
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1827
1898
|
url: "/admin/extraction/results/document/{document_id}/history",
|
|
@@ -1882,6 +1953,15 @@ var postAdminClinicalPracticeResources = (options) => (options.client ?? client)
|
|
|
1882
1953
|
...options.headers
|
|
1883
1954
|
}
|
|
1884
1955
|
});
|
|
1956
|
+
var patchAdminCampaignsSequencesByIdActivate = (options) => (options.client ?? client).patch({
|
|
1957
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1958
|
+
url: "/admin/campaigns/sequences/{id}/activate",
|
|
1959
|
+
...options,
|
|
1960
|
+
headers: {
|
|
1961
|
+
"Content-Type": "application/vnd.api+json",
|
|
1962
|
+
...options.headers
|
|
1963
|
+
}
|
|
1964
|
+
});
|
|
1885
1965
|
var getAdminLlmAnalyticsSummary = (options) => (options.client ?? client).get({
|
|
1886
1966
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1887
1967
|
url: "/admin/llm-analytics/summary",
|
|
@@ -1915,6 +1995,15 @@ var postAdminClinicalClientGoals = (options) => (options.client ?? client).post(
|
|
|
1915
1995
|
...options.headers
|
|
1916
1996
|
}
|
|
1917
1997
|
});
|
|
1998
|
+
var patchAdminCampaignsSequencesByIdResume = (options) => (options.client ?? client).patch({
|
|
1999
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2000
|
+
url: "/admin/campaigns/sequences/{id}/resume",
|
|
2001
|
+
...options,
|
|
2002
|
+
headers: {
|
|
2003
|
+
"Content-Type": "application/vnd.api+json",
|
|
2004
|
+
...options.headers
|
|
2005
|
+
}
|
|
2006
|
+
});
|
|
1918
2007
|
var patchAdminTenantsByIdAutoTopUp = (options) => (options.client ?? client).patch({
|
|
1919
2008
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1920
2009
|
url: "/admin/tenants/{id}/auto-top-up",
|
|
@@ -1985,6 +2074,15 @@ var postAdminSchedulingCalendarSyncs = (options) => (options.client ?? client).p
|
|
|
1985
2074
|
...options.headers
|
|
1986
2075
|
}
|
|
1987
2076
|
});
|
|
2077
|
+
var postAdminEmailMarketingCampaignsByIdAnalyze = (options) => (options.client ?? client).post({
|
|
2078
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2079
|
+
url: "/admin/email-marketing/campaigns/{id}/analyze",
|
|
2080
|
+
...options,
|
|
2081
|
+
headers: {
|
|
2082
|
+
"Content-Type": "application/vnd.api+json",
|
|
2083
|
+
...options.headers
|
|
2084
|
+
}
|
|
2085
|
+
});
|
|
1988
2086
|
var postAdminCrmCustomEntities = (options) => (options.client ?? client).post({
|
|
1989
2087
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1990
2088
|
url: "/admin/crm/custom-entities",
|
|
@@ -2046,6 +2144,24 @@ var patchAdminIsvCrmEntityTypesById = (options) => (options.client ?? client).pa
|
|
|
2046
2144
|
...options.headers
|
|
2047
2145
|
}
|
|
2048
2146
|
});
|
|
2147
|
+
var postAdminCampaignsSequenceSteps = (options) => (options.client ?? client).post({
|
|
2148
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2149
|
+
url: "/admin/campaigns/sequence-steps",
|
|
2150
|
+
...options,
|
|
2151
|
+
headers: {
|
|
2152
|
+
"Content-Type": "application/vnd.api+json",
|
|
2153
|
+
...options.headers
|
|
2154
|
+
}
|
|
2155
|
+
});
|
|
2156
|
+
var patchAdminEmailMarketingGeneratedEmailsByIdReject = (options) => (options.client ?? client).patch({
|
|
2157
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2158
|
+
url: "/admin/email-marketing/generated-emails/{id}/reject",
|
|
2159
|
+
...options,
|
|
2160
|
+
headers: {
|
|
2161
|
+
"Content-Type": "application/vnd.api+json",
|
|
2162
|
+
...options.headers
|
|
2163
|
+
}
|
|
2164
|
+
});
|
|
2049
2165
|
var getAdminCrmPipelineStagesPipelineByPipelineId = (options) => (options.client ?? client).get({
|
|
2050
2166
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2051
2167
|
url: "/admin/crm/pipeline-stages/pipeline/{pipeline_id}",
|
|
@@ -2079,6 +2195,15 @@ var postAdminTenantPricingOverrides = (options) => (options.client ?? client).po
|
|
|
2079
2195
|
...options.headers
|
|
2080
2196
|
}
|
|
2081
2197
|
});
|
|
2198
|
+
var patchAdminEmailMarketingTemplatesByIdUnpublish = (options) => (options.client ?? client).patch({
|
|
2199
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2200
|
+
url: "/admin/email-marketing/templates/{id}/unpublish",
|
|
2201
|
+
...options,
|
|
2202
|
+
headers: {
|
|
2203
|
+
"Content-Type": "application/vnd.api+json",
|
|
2204
|
+
...options.headers
|
|
2205
|
+
}
|
|
2206
|
+
});
|
|
2082
2207
|
var postAdminWebhookConfigsByIdReplay = (options) => (options.client ?? client).post({
|
|
2083
2208
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2084
2209
|
url: "/admin/webhook-configs/{id}/replay",
|
|
@@ -2158,6 +2283,15 @@ var getAdminAgentVersionsByIdRevisions = (options) => (options.client ?? client)
|
|
|
2158
2283
|
url: "/admin/agent-versions/{id}/revisions",
|
|
2159
2284
|
...options
|
|
2160
2285
|
});
|
|
2286
|
+
var patchAdminEmailMarketingTemplatesByIdArchive = (options) => (options.client ?? client).patch({
|
|
2287
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2288
|
+
url: "/admin/email-marketing/templates/{id}/archive",
|
|
2289
|
+
...options,
|
|
2290
|
+
headers: {
|
|
2291
|
+
"Content-Type": "application/vnd.api+json",
|
|
2292
|
+
...options.headers
|
|
2293
|
+
}
|
|
2294
|
+
});
|
|
2161
2295
|
var patchAdminSchedulingEventsByIdReschedule = (options) => (options.client ?? client).patch({
|
|
2162
2296
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2163
2297
|
url: "/admin/scheduling/events/{id}/reschedule",
|
|
@@ -2457,6 +2591,11 @@ var postAdminClinicalGoalTemplatesCatalog = (options) => (options.client ?? clie
|
|
|
2457
2591
|
...options.headers
|
|
2458
2592
|
}
|
|
2459
2593
|
});
|
|
2594
|
+
var getAdminCampaignsSequencesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
2595
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2596
|
+
url: "/admin/campaigns/sequences/workspace/{workspace_id}",
|
|
2597
|
+
...options
|
|
2598
|
+
});
|
|
2460
2599
|
var getAdminSchedulingEventsById = (options) => (options.client ?? client).get({
|
|
2461
2600
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2462
2601
|
url: "/admin/scheduling/events/{id}",
|
|
@@ -2580,6 +2719,15 @@ var getAdminEmailMarketingCampaignsById = (options) => (options.client ?? client
|
|
|
2580
2719
|
url: "/admin/email-marketing/campaigns/{id}",
|
|
2581
2720
|
...options
|
|
2582
2721
|
});
|
|
2722
|
+
var patchAdminEmailMarketingCampaignsById = (options) => (options.client ?? client).patch({
|
|
2723
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2724
|
+
url: "/admin/email-marketing/campaigns/{id}",
|
|
2725
|
+
...options,
|
|
2726
|
+
headers: {
|
|
2727
|
+
"Content-Type": "application/vnd.api+json",
|
|
2728
|
+
...options.headers
|
|
2729
|
+
}
|
|
2730
|
+
});
|
|
2583
2731
|
var getAdminSupportSlaPoliciesApplicationByApplicationId = (options) => (options.client ?? client).get({
|
|
2584
2732
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2585
2733
|
url: "/admin/support/sla-policies/application/{application_id}",
|
|
@@ -2796,6 +2944,15 @@ var getAdminThreadsByIdMessages = (options) => (options.client ?? client).get({
|
|
|
2796
2944
|
url: "/admin/threads/{id}/messages",
|
|
2797
2945
|
...options
|
|
2798
2946
|
});
|
|
2947
|
+
var postAdminThreadsByIdMessages = (options) => (options.client ?? client).post({
|
|
2948
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2949
|
+
url: "/admin/threads/{id}/messages",
|
|
2950
|
+
...options,
|
|
2951
|
+
headers: {
|
|
2952
|
+
"Content-Type": "application/vnd.api+json",
|
|
2953
|
+
...options.headers
|
|
2954
|
+
}
|
|
2955
|
+
});
|
|
2799
2956
|
var getAdminSocialTrendingHistoryRange = (options) => (options.client ?? client).get({
|
|
2800
2957
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2801
2958
|
url: "/admin/social/trending/history/range",
|
|
@@ -3031,6 +3188,15 @@ var patchAdminClinicalPracticeToolsCatalogByIdRestore = (options) => (options.cl
|
|
|
3031
3188
|
...options.headers
|
|
3032
3189
|
}
|
|
3033
3190
|
});
|
|
3191
|
+
var patchAdminCampaignsSequencesByIdPause = (options) => (options.client ?? client).patch({
|
|
3192
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3193
|
+
url: "/admin/campaigns/sequences/{id}/pause",
|
|
3194
|
+
...options,
|
|
3195
|
+
headers: {
|
|
3196
|
+
"Content-Type": "application/vnd.api+json",
|
|
3197
|
+
...options.headers
|
|
3198
|
+
}
|
|
3199
|
+
});
|
|
3034
3200
|
var getAdminVoiceSessions = (options) => (options.client ?? client).get({
|
|
3035
3201
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3036
3202
|
url: "/admin/voice/sessions",
|
|
@@ -3045,6 +3211,15 @@ var patchAdminClinicalNotesByIdArchive = (options) => (options.client ?? client)
|
|
|
3045
3211
|
...options.headers
|
|
3046
3212
|
}
|
|
3047
3213
|
});
|
|
3214
|
+
var postAdminEmailMarketingCampaignsByIdOptimizeSubjects = (options) => (options.client ?? client).post({
|
|
3215
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3216
|
+
url: "/admin/email-marketing/campaigns/{id}/optimize-subjects",
|
|
3217
|
+
...options,
|
|
3218
|
+
headers: {
|
|
3219
|
+
"Content-Type": "application/vnd.api+json",
|
|
3220
|
+
...options.headers
|
|
3221
|
+
}
|
|
3222
|
+
});
|
|
3048
3223
|
var getAdminCrmActivitiesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
3049
3224
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3050
3225
|
url: "/admin/crm/activities/workspace/{workspace_id}",
|
|
@@ -3199,6 +3374,11 @@ var postAdminConnectorsOauthAppConfigs = (options) => (options.client ?? client)
|
|
|
3199
3374
|
...options.headers
|
|
3200
3375
|
}
|
|
3201
3376
|
});
|
|
3377
|
+
var getAdminCampaignsSequenceStepsSequenceBySequenceId = (options) => (options.client ?? client).get({
|
|
3378
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3379
|
+
url: "/admin/campaigns/sequence-steps/sequence/{sequence_id}",
|
|
3380
|
+
...options
|
|
3381
|
+
});
|
|
3202
3382
|
var deleteAdminClinicalPracticeResourcesByIdPermanent = (options) => (options.client ?? client).delete({
|
|
3203
3383
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3204
3384
|
url: "/admin/clinical/practice-resources/{id}/permanent",
|
|
@@ -3336,6 +3516,11 @@ var postAdminConnectorsOauthInitiate = (options) => (options.client ?? client).p
|
|
|
3336
3516
|
...options.headers
|
|
3337
3517
|
}
|
|
3338
3518
|
});
|
|
3519
|
+
var getAdminCampaignsRecipientsById = (options) => (options.client ?? client).get({
|
|
3520
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3521
|
+
url: "/admin/campaigns/recipients/{id}",
|
|
3522
|
+
...options
|
|
3523
|
+
});
|
|
3339
3524
|
var getAdminVoiceSessionsById = (options) => (options.client ?? client).get({
|
|
3340
3525
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3341
3526
|
url: "/admin/voice/sessions/{id}",
|
|
@@ -3567,6 +3752,15 @@ var patchAdminCrawlerJobsByIdCancel = (options) => (options.client ?? client).pa
|
|
|
3567
3752
|
...options.headers
|
|
3568
3753
|
}
|
|
3569
3754
|
});
|
|
3755
|
+
var patchAdminCampaignsSequencesByIdComplete = (options) => (options.client ?? client).patch({
|
|
3756
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3757
|
+
url: "/admin/campaigns/sequences/{id}/complete",
|
|
3758
|
+
...options,
|
|
3759
|
+
headers: {
|
|
3760
|
+
"Content-Type": "application/vnd.api+json",
|
|
3761
|
+
...options.headers
|
|
3762
|
+
}
|
|
3763
|
+
});
|
|
3570
3764
|
var getAdminExtractionResultsDocumentByDocumentIdPartial = (options) => (options.client ?? client).get({
|
|
3571
3765
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3572
3766
|
url: "/admin/extraction/results/document/{document_id}/partial",
|
|
@@ -3620,6 +3814,11 @@ var getAdminClinicalGoalTemplatesCategoriesCatalog = (options) => (options.clien
|
|
|
3620
3814
|
url: "/admin/clinical/goal-templates/categories/catalog",
|
|
3621
3815
|
...options
|
|
3622
3816
|
});
|
|
3817
|
+
var getAdminSchedulingAvailabilityRulesByEventType = (options) => (options.client ?? client).get({
|
|
3818
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3819
|
+
url: "/admin/scheduling/availability-rules/by-event-type",
|
|
3820
|
+
...options
|
|
3821
|
+
});
|
|
3623
3822
|
var patchAdminClinicalNotesByIdRestore = (options) => (options.client ?? client).patch({
|
|
3624
3823
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3625
3824
|
url: "/admin/clinical/notes/{id}/restore",
|
|
@@ -3647,6 +3846,15 @@ var patchAdminUsersByIdConfirmEmail = (options) => (options.client ?? client).pa
|
|
|
3647
3846
|
...options.headers
|
|
3648
3847
|
}
|
|
3649
3848
|
});
|
|
3849
|
+
var postAdminEmailMarketingTemplates = (options) => (options.client ?? client).post({
|
|
3850
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3851
|
+
url: "/admin/email-marketing/templates",
|
|
3852
|
+
...options,
|
|
3853
|
+
headers: {
|
|
3854
|
+
"Content-Type": "application/vnd.api+json",
|
|
3855
|
+
...options.headers
|
|
3856
|
+
}
|
|
3857
|
+
});
|
|
3650
3858
|
var getAdminExtractionResultsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
3651
3859
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3652
3860
|
url: "/admin/extraction/results/workspace/{workspace_id}",
|
|
@@ -3685,6 +3893,11 @@ var deleteAdminClinicalNotesByIdPermanent = (options) => (options.client ?? clie
|
|
|
3685
3893
|
url: "/admin/clinical/notes/{id}/permanent",
|
|
3686
3894
|
...options
|
|
3687
3895
|
});
|
|
3896
|
+
var getAdminPipelinesBySlugBySlug = (options) => (options.client ?? client).get({
|
|
3897
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3898
|
+
url: "/admin/pipelines/by-slug/{slug}",
|
|
3899
|
+
...options
|
|
3900
|
+
});
|
|
3688
3901
|
var getAdminStorageRecommendationsPending = (options) => (options.client ?? client).get({
|
|
3689
3902
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3690
3903
|
url: "/admin/storage-recommendations/pending",
|
|
@@ -3804,6 +4017,11 @@ var getAdminExtractionShadowComparisonsById = (options) => (options.client ?? cl
|
|
|
3804
4017
|
url: "/admin/extraction/shadow-comparisons/{id}",
|
|
3805
4018
|
...options
|
|
3806
4019
|
});
|
|
4020
|
+
var getAdminEmailMarketingTemplatesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
4021
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4022
|
+
url: "/admin/email-marketing/templates/workspace/{workspace_id}",
|
|
4023
|
+
...options
|
|
4024
|
+
});
|
|
3807
4025
|
var postAdminSocialCampaignsByIdGenerateMasterCopy = (options) => (options.client ?? client).post({
|
|
3808
4026
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3809
4027
|
url: "/admin/social/campaigns/{id}/generate-master-copy",
|
|
@@ -3864,6 +4082,15 @@ var patchAdminClinicalPracticeResourcesCatalogByIdRestore = (options) => (option
|
|
|
3864
4082
|
...options.headers
|
|
3865
4083
|
}
|
|
3866
4084
|
});
|
|
4085
|
+
var patchAdminEmailMarketingTemplatesByIdRestore = (options) => (options.client ?? client).patch({
|
|
4086
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4087
|
+
url: "/admin/email-marketing/templates/{id}/restore",
|
|
4088
|
+
...options,
|
|
4089
|
+
headers: {
|
|
4090
|
+
"Content-Type": "application/vnd.api+json",
|
|
4091
|
+
...options.headers
|
|
4092
|
+
}
|
|
4093
|
+
});
|
|
3867
4094
|
var patchAdminWalletPlan = (options) => (options.client ?? client).patch({
|
|
3868
4095
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3869
4096
|
url: "/admin/wallet/plan",
|
|
@@ -3925,6 +4152,15 @@ var getAdminAgentsByIdUsage = (options) => (options.client ?? client).get({
|
|
|
3925
4152
|
url: "/admin/agents/{id}/usage",
|
|
3926
4153
|
...options
|
|
3927
4154
|
});
|
|
4155
|
+
var patchAdminEmailMarketingGeneratedEmailsByIdSchedule = (options) => (options.client ?? client).patch({
|
|
4156
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4157
|
+
url: "/admin/email-marketing/generated-emails/{id}/schedule",
|
|
4158
|
+
...options,
|
|
4159
|
+
headers: {
|
|
4160
|
+
"Content-Type": "application/vnd.api+json",
|
|
4161
|
+
...options.headers
|
|
4162
|
+
}
|
|
4163
|
+
});
|
|
3928
4164
|
var getAdminEmailTrackingEventsById = (options) => (options.client ?? client).get({
|
|
3929
4165
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3930
4166
|
url: "/admin/email/tracking-events/{id}",
|
|
@@ -4067,6 +4303,20 @@ var patchAdminClinicalClientGoalsByIdRestore = (options) => (options.client ?? c
|
|
|
4067
4303
|
...options.headers
|
|
4068
4304
|
}
|
|
4069
4305
|
});
|
|
4306
|
+
var getAdminEmailMarketingGeneratedEmailsById = (options) => (options.client ?? client).get({
|
|
4307
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4308
|
+
url: "/admin/email-marketing/generated-emails/{id}",
|
|
4309
|
+
...options
|
|
4310
|
+
});
|
|
4311
|
+
var patchAdminEmailMarketingGeneratedEmailsById = (options) => (options.client ?? client).patch({
|
|
4312
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4313
|
+
url: "/admin/email-marketing/generated-emails/{id}",
|
|
4314
|
+
...options,
|
|
4315
|
+
headers: {
|
|
4316
|
+
"Content-Type": "application/vnd.api+json",
|
|
4317
|
+
...options.headers
|
|
4318
|
+
}
|
|
4319
|
+
});
|
|
4070
4320
|
var getAdminInvitationsMe = (options) => (options.client ?? client).get({
|
|
4071
4321
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4072
4322
|
url: "/admin/invitations/me",
|
|
@@ -4105,6 +4355,11 @@ var getAdminVoiceSessionsWorkspaceByWorkspaceId = (options) => (options.client ?
|
|
|
4105
4355
|
url: "/admin/voice/sessions/workspace/{workspace_id}",
|
|
4106
4356
|
...options
|
|
4107
4357
|
});
|
|
4358
|
+
var getAdminCampaignsRecipientsCampaignByCampaignId = (options) => (options.client ?? client).get({
|
|
4359
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4360
|
+
url: "/admin/campaigns/recipients/campaign/{campaign_id}",
|
|
4361
|
+
...options
|
|
4362
|
+
});
|
|
4108
4363
|
var getAdminInvitationsConsumeByToken = (options) => (options.client ?? client).get({
|
|
4109
4364
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4110
4365
|
url: "/admin/invitations/consume/{token}",
|
|
@@ -4143,6 +4398,25 @@ var postAdminWorkspaceAgentConfigs = (options) => (options.client ?? client).pos
|
|
|
4143
4398
|
...options.headers
|
|
4144
4399
|
}
|
|
4145
4400
|
});
|
|
4401
|
+
var getAdminEmailTemplateVersionsByTemplateIdVersionsByVersionNumber = (options) => (options.client ?? client).get({
|
|
4402
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4403
|
+
url: "/admin/email/template-versions/{template_id}/versions/{version_number}",
|
|
4404
|
+
...options
|
|
4405
|
+
});
|
|
4406
|
+
var postAdminEmailMarketingCampaignsByIdOptimizeSendTimes = (options) => (options.client ?? client).post({
|
|
4407
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4408
|
+
url: "/admin/email-marketing/campaigns/{id}/optimize-send-times",
|
|
4409
|
+
...options,
|
|
4410
|
+
headers: {
|
|
4411
|
+
"Content-Type": "application/vnd.api+json",
|
|
4412
|
+
...options.headers
|
|
4413
|
+
}
|
|
4414
|
+
});
|
|
4415
|
+
var getAdminVoiceTranscriptionJobsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
4416
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4417
|
+
url: "/admin/voice/transcription-jobs/workspace/{workspace_id}",
|
|
4418
|
+
...options
|
|
4419
|
+
});
|
|
4146
4420
|
var getAdminSocialMetricsPostBySocialPostIdLatest = (options) => (options.client ?? client).get({
|
|
4147
4421
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4148
4422
|
url: "/admin/social/metrics/post/{social_post_id}/latest",
|
|
@@ -4261,6 +4535,15 @@ var postAdminExtractionDocumentsBulkReprocess = (options) => (options.client ??
|
|
|
4261
4535
|
...options.headers
|
|
4262
4536
|
}
|
|
4263
4537
|
});
|
|
4538
|
+
var postAdminEmailMarketingCampaignsByIdGenerateEmails = (options) => (options.client ?? client).post({
|
|
4539
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4540
|
+
url: "/admin/email-marketing/campaigns/{id}/generate-emails",
|
|
4541
|
+
...options,
|
|
4542
|
+
headers: {
|
|
4543
|
+
"Content-Type": "application/vnd.api+json",
|
|
4544
|
+
...options.headers
|
|
4545
|
+
}
|
|
4546
|
+
});
|
|
4264
4547
|
var postAdminContentEditImage = (options) => (options.client ?? client).post({
|
|
4265
4548
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4266
4549
|
url: "/admin/content/edit-image",
|
|
@@ -4393,6 +4676,15 @@ var patchAdminExtractionResultsByIdRegenerate = (options) => (options.client ??
|
|
|
4393
4676
|
...options.headers
|
|
4394
4677
|
}
|
|
4395
4678
|
});
|
|
4679
|
+
var patchAdminEmailMarketingTemplatesByIdPreview = (options) => (options.client ?? client).patch({
|
|
4680
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4681
|
+
url: "/admin/email-marketing/templates/{id}/preview",
|
|
4682
|
+
...options,
|
|
4683
|
+
headers: {
|
|
4684
|
+
"Content-Type": "application/vnd.api+json",
|
|
4685
|
+
...options.headers
|
|
4686
|
+
}
|
|
4687
|
+
});
|
|
4396
4688
|
var postAdminWorkspacesByWorkspaceIdExtractionDocumentsDismissAllTrained = (options) => (options.client ?? client).post({
|
|
4397
4689
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4398
4690
|
url: "/admin/workspaces/{workspace_id}/extraction/documents/dismiss-all-trained",
|
|
@@ -4500,6 +4792,25 @@ var patchAdminAgentDeploymentsByIdAcceptUpdate = (options) => (options.client ??
|
|
|
4500
4792
|
...options.headers
|
|
4501
4793
|
}
|
|
4502
4794
|
});
|
|
4795
|
+
var deleteAdminEmailMarketingTemplatesById = (options) => (options.client ?? client).delete({
|
|
4796
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4797
|
+
url: "/admin/email-marketing/templates/{id}",
|
|
4798
|
+
...options
|
|
4799
|
+
});
|
|
4800
|
+
var getAdminEmailMarketingTemplatesById = (options) => (options.client ?? client).get({
|
|
4801
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4802
|
+
url: "/admin/email-marketing/templates/{id}",
|
|
4803
|
+
...options
|
|
4804
|
+
});
|
|
4805
|
+
var patchAdminEmailMarketingTemplatesById = (options) => (options.client ?? client).patch({
|
|
4806
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4807
|
+
url: "/admin/email-marketing/templates/{id}",
|
|
4808
|
+
...options,
|
|
4809
|
+
headers: {
|
|
4810
|
+
"Content-Type": "application/vnd.api+json",
|
|
4811
|
+
...options.headers
|
|
4812
|
+
}
|
|
4813
|
+
});
|
|
4503
4814
|
var getAdminDocumentsStats = (options) => (options.client ?? client).get({
|
|
4504
4815
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4505
4816
|
url: "/admin/documents/stats",
|
|
@@ -4725,6 +5036,15 @@ var getAdminCrmExportsWorkspaceByWorkspaceId = (options) => (options.client ?? c
|
|
|
4725
5036
|
url: "/admin/crm/exports/workspace/{workspace_id}",
|
|
4726
5037
|
...options
|
|
4727
5038
|
});
|
|
5039
|
+
var postAdminEmailMarketingCampaignsByIdImportRecipients = (options) => (options.client ?? client).post({
|
|
5040
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5041
|
+
url: "/admin/email-marketing/campaigns/{id}/import-recipients",
|
|
5042
|
+
...options,
|
|
5043
|
+
headers: {
|
|
5044
|
+
"Content-Type": "application/vnd.api+json",
|
|
5045
|
+
...options.headers
|
|
5046
|
+
}
|
|
5047
|
+
});
|
|
4728
5048
|
var getAdminSupportTicketMessagesTicketByTicketId = (options) => (options.client ?? client).get({
|
|
4729
5049
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4730
5050
|
url: "/admin/support/ticket-messages/ticket/{ticket_id}",
|
|
@@ -4744,6 +5064,11 @@ var getAdminWorkspacesByWorkspaceIdExtractionExportsById = (options) => (options
|
|
|
4744
5064
|
url: "/admin/workspaces/{workspace_id}/extraction/exports/{id}",
|
|
4745
5065
|
...options
|
|
4746
5066
|
});
|
|
5067
|
+
var getAdminEmailMarketingGeneratedEmailsCampaignByCampaignId = (options) => (options.client ?? client).get({
|
|
5068
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5069
|
+
url: "/admin/email-marketing/generated-emails/campaign/{campaign_id}",
|
|
5070
|
+
...options
|
|
5071
|
+
});
|
|
4747
5072
|
var postAdminSupportCannedResponses = (options) => (options.client ?? client).post({
|
|
4748
5073
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4749
5074
|
url: "/admin/support/canned-responses",
|
|
@@ -4790,6 +5115,15 @@ var postAdminSupportTicketRatings = (options) => (options.client ?? client).post
|
|
|
4790
5115
|
...options.headers
|
|
4791
5116
|
}
|
|
4792
5117
|
});
|
|
5118
|
+
var postAdminCampaignsSequences = (options) => (options.client ?? client).post({
|
|
5119
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5120
|
+
url: "/admin/campaigns/sequences",
|
|
5121
|
+
...options,
|
|
5122
|
+
headers: {
|
|
5123
|
+
"Content-Type": "application/vnd.api+json",
|
|
5124
|
+
...options.headers
|
|
5125
|
+
}
|
|
5126
|
+
});
|
|
4793
5127
|
var postAdminCrmActivities = (options) => (options.client ?? client).post({
|
|
4794
5128
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4795
5129
|
url: "/admin/crm/activities",
|
|
@@ -4836,6 +5170,15 @@ var patchAdminPricingStrategiesById = (options) => (options.client ?? client).pa
|
|
|
4836
5170
|
...options.headers
|
|
4837
5171
|
}
|
|
4838
5172
|
});
|
|
5173
|
+
var postAdminEmailMarketingCampaignsByIdExport = (options) => (options.client ?? client).post({
|
|
5174
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5175
|
+
url: "/admin/email-marketing/campaigns/{id}/export",
|
|
5176
|
+
...options,
|
|
5177
|
+
headers: {
|
|
5178
|
+
"Content-Type": "application/vnd.api+json",
|
|
5179
|
+
...options.headers
|
|
5180
|
+
}
|
|
5181
|
+
});
|
|
4839
5182
|
var getAdminCrmRelationshipsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
4840
5183
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4841
5184
|
url: "/admin/crm/relationships/workspace/{workspace_id}",
|
|
@@ -4920,6 +5263,15 @@ var postAdminAgentsByIdTest = (options) => (options.client ?? client).post({
|
|
|
4920
5263
|
...options.headers
|
|
4921
5264
|
}
|
|
4922
5265
|
});
|
|
5266
|
+
var patchAdminSchedulingRemindersByIdCancel = (options) => (options.client ?? client).patch({
|
|
5267
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5268
|
+
url: "/admin/scheduling/reminders/{id}/cancel",
|
|
5269
|
+
...options,
|
|
5270
|
+
headers: {
|
|
5271
|
+
"Content-Type": "application/vnd.api+json",
|
|
5272
|
+
...options.headers
|
|
5273
|
+
}
|
|
5274
|
+
});
|
|
4923
5275
|
var getAdminSchedulingLocationsById = (options) => (options.client ?? client).get({
|
|
4924
5276
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4925
5277
|
url: "/admin/scheduling/locations/{id}",
|
|
@@ -5280,6 +5632,11 @@ var getAdminSchedulingRemindersById = (options) => (options.client ?? client).ge
|
|
|
5280
5632
|
url: "/admin/scheduling/reminders/{id}",
|
|
5281
5633
|
...options
|
|
5282
5634
|
});
|
|
5635
|
+
var getAdminSchedulingBookingsByBooker = (options) => (options.client ?? client).get({
|
|
5636
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5637
|
+
url: "/admin/scheduling/bookings/by-booker",
|
|
5638
|
+
...options
|
|
5639
|
+
});
|
|
5283
5640
|
var deleteAdminClinicalPatientsById = (options) => (options.client ?? client).delete({
|
|
5284
5641
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5285
5642
|
url: "/admin/clinical/patients/{id}",
|
|
@@ -5518,6 +5875,15 @@ var getAdminVoiceRecordingsById = (options) => (options.client ?? client).get({
|
|
|
5518
5875
|
url: "/admin/voice/recordings/{id}",
|
|
5519
5876
|
...options
|
|
5520
5877
|
});
|
|
5878
|
+
var patchAdminEmailMarketingGeneratedEmailsByIdApprove = (options) => (options.client ?? client).patch({
|
|
5879
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5880
|
+
url: "/admin/email-marketing/generated-emails/{id}/approve",
|
|
5881
|
+
...options,
|
|
5882
|
+
headers: {
|
|
5883
|
+
"Content-Type": "application/vnd.api+json",
|
|
5884
|
+
...options.headers
|
|
5885
|
+
}
|
|
5886
|
+
});
|
|
5521
5887
|
var patchAdminClinicalMealPlansByIdArchive = (options) => (options.client ?? client).patch({
|
|
5522
5888
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5523
5889
|
url: "/admin/clinical/meal-plans/{id}/archive",
|
|
@@ -5573,6 +5939,25 @@ var postAdminClinicalNotes = (options) => (options.client ?? client).post({
|
|
|
5573
5939
|
...options.headers
|
|
5574
5940
|
}
|
|
5575
5941
|
});
|
|
5942
|
+
var deleteAdminCampaignsSequenceStepsById = (options) => (options.client ?? client).delete({
|
|
5943
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5944
|
+
url: "/admin/campaigns/sequence-steps/{id}",
|
|
5945
|
+
...options
|
|
5946
|
+
});
|
|
5947
|
+
var getAdminCampaignsSequenceStepsById = (options) => (options.client ?? client).get({
|
|
5948
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5949
|
+
url: "/admin/campaigns/sequence-steps/{id}",
|
|
5950
|
+
...options
|
|
5951
|
+
});
|
|
5952
|
+
var patchAdminCampaignsSequenceStepsById = (options) => (options.client ?? client).patch({
|
|
5953
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5954
|
+
url: "/admin/campaigns/sequence-steps/{id}",
|
|
5955
|
+
...options,
|
|
5956
|
+
headers: {
|
|
5957
|
+
"Content-Type": "application/vnd.api+json",
|
|
5958
|
+
...options.headers
|
|
5959
|
+
}
|
|
5960
|
+
});
|
|
5576
5961
|
var getAdminClinicalPatientsByIdGoals = (options) => (options.client ?? client).get({
|
|
5577
5962
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5578
5963
|
url: "/admin/clinical/patients/{id}/goals",
|
|
@@ -5620,6 +6005,15 @@ var getAdminSupportRoutingRulesApplicationByApplicationId = (options) => (option
|
|
|
5620
6005
|
url: "/admin/support/routing-rules/application/{application_id}",
|
|
5621
6006
|
...options
|
|
5622
6007
|
});
|
|
6008
|
+
var postAdminEmailMarketingTemplatesCompile = (options) => (options.client ?? client).post({
|
|
6009
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6010
|
+
url: "/admin/email-marketing/templates/compile",
|
|
6011
|
+
...options,
|
|
6012
|
+
headers: {
|
|
6013
|
+
"Content-Type": "application/vnd.api+json",
|
|
6014
|
+
...options.headers
|
|
6015
|
+
}
|
|
6016
|
+
});
|
|
5623
6017
|
var getAdminClinicalNotesArchived = (options) => (options.client ?? client).get({
|
|
5624
6018
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5625
6019
|
url: "/admin/clinical/notes/archived",
|
|
@@ -5755,6 +6149,15 @@ var postAdminSysSemanticCacheClear = (options) => (options.client ?? client).pos
|
|
|
5755
6149
|
...options.headers
|
|
5756
6150
|
}
|
|
5757
6151
|
});
|
|
6152
|
+
var patchAdminEmailMarketingTemplatesByIdRollback = (options) => (options.client ?? client).patch({
|
|
6153
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6154
|
+
url: "/admin/email-marketing/templates/{id}/rollback",
|
|
6155
|
+
...options,
|
|
6156
|
+
headers: {
|
|
6157
|
+
"Content-Type": "application/vnd.api+json",
|
|
6158
|
+
...options.headers
|
|
6159
|
+
}
|
|
6160
|
+
});
|
|
5758
6161
|
var getAdminSocialTrendingWatchesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
5759
6162
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5760
6163
|
url: "/admin/social/trending/watches/workspace/{workspace_id}",
|
|
@@ -5981,6 +6384,15 @@ var patchAdminSocialTrendingWatchesById = (options) => (options.client ?? client
|
|
|
5981
6384
|
...options.headers
|
|
5982
6385
|
}
|
|
5983
6386
|
});
|
|
6387
|
+
var patchAdminEmailMarketingTemplatesByIdPublish = (options) => (options.client ?? client).patch({
|
|
6388
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6389
|
+
url: "/admin/email-marketing/templates/{id}/publish",
|
|
6390
|
+
...options,
|
|
6391
|
+
headers: {
|
|
6392
|
+
"Content-Type": "application/vnd.api+json",
|
|
6393
|
+
...options.headers
|
|
6394
|
+
}
|
|
6395
|
+
});
|
|
5984
6396
|
var getAdminSocialMetricsAccountBySocialAccountId = (options) => (options.client ?? client).get({
|
|
5985
6397
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5986
6398
|
url: "/admin/social/metrics/account/{social_account_id}",
|
|
@@ -6105,6 +6517,15 @@ var patchAdminPlansById = (options) => (options.client ?? client).patch({
|
|
|
6105
6517
|
...options.headers
|
|
6106
6518
|
}
|
|
6107
6519
|
});
|
|
6520
|
+
var patchAdminSchedulingEventTypesByIdArchive = (options) => (options.client ?? client).patch({
|
|
6521
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6522
|
+
url: "/admin/scheduling/event-types/{id}/archive",
|
|
6523
|
+
...options,
|
|
6524
|
+
headers: {
|
|
6525
|
+
"Content-Type": "application/vnd.api+json",
|
|
6526
|
+
...options.headers
|
|
6527
|
+
}
|
|
6528
|
+
});
|
|
6108
6529
|
var patchAdminUsersByIdResetPassword = (options) => (options.client ?? client).patch({
|
|
6109
6530
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6110
6531
|
url: "/admin/users/{id}/reset-password",
|
|
@@ -6449,6 +6870,11 @@ var postAdminThreadsByIdComplete = (options) => (options.client ?? client).post(
|
|
|
6449
6870
|
...options.headers
|
|
6450
6871
|
}
|
|
6451
6872
|
});
|
|
6873
|
+
var getAdminVoiceTranscriptionJobsMine = (options) => (options.client ?? client).get({
|
|
6874
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6875
|
+
url: "/admin/voice/transcription-jobs/mine",
|
|
6876
|
+
...options
|
|
6877
|
+
});
|
|
6452
6878
|
var deleteAdminConnectorsOauthAppConfigsById = (options) => (options.client ?? client).delete({
|
|
6453
6879
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6454
6880
|
url: "/admin/connectors/oauth-app-configs/{id}",
|
|
@@ -6468,6 +6894,11 @@ var patchAdminConnectorsOauthAppConfigsById = (options) => (options.client ?? cl
|
|
|
6468
6894
|
...options.headers
|
|
6469
6895
|
}
|
|
6470
6896
|
});
|
|
6897
|
+
var getAdminSchedulingAvailabilityRulesByUser = (options) => (options.client ?? client).get({
|
|
6898
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6899
|
+
url: "/admin/scheduling/availability-rules/by-user",
|
|
6900
|
+
...options
|
|
6901
|
+
});
|
|
6471
6902
|
var getAdminClinicalClientResourceAssignments = (options) => (options.client ?? client).get({
|
|
6472
6903
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6473
6904
|
url: "/admin/clinical/client-resource-assignments",
|
|
@@ -6659,6 +7090,11 @@ var patchAdminInvitationsByIdDecline = (options) => (options.client ?? client).p
|
|
|
6659
7090
|
...options.headers
|
|
6660
7091
|
}
|
|
6661
7092
|
});
|
|
7093
|
+
var getAdminSchedulingEventTypesBySlug = (options) => (options.client ?? client).get({
|
|
7094
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
7095
|
+
url: "/admin/scheduling/event-types/by-slug",
|
|
7096
|
+
...options
|
|
7097
|
+
});
|
|
6662
7098
|
var deleteAdminClinicalGoalTemplatesCatalogByIdPermanent = (options) => (options.client ?? client).delete({
|
|
6663
7099
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6664
7100
|
url: "/admin/clinical/goal-templates/catalog/{id}/permanent",
|
|
@@ -7229,7 +7665,7 @@ function createAgentsNamespace(rb) {
|
|
|
7229
7665
|
create: async (attributes, options) => {
|
|
7230
7666
|
return rb.execute(
|
|
7231
7667
|
postAdminAgentVersions,
|
|
7232
|
-
{ body: { data: { type: "
|
|
7668
|
+
{ body: { data: { type: "agent-version", attributes } } },
|
|
7233
7669
|
options
|
|
7234
7670
|
);
|
|
7235
7671
|
},
|
|
@@ -7251,7 +7687,7 @@ function createAgentsNamespace(rb) {
|
|
|
7251
7687
|
path: { id },
|
|
7252
7688
|
body: {
|
|
7253
7689
|
data: {
|
|
7254
|
-
type: "
|
|
7690
|
+
type: "agent-version",
|
|
7255
7691
|
system_field_name: fieldName
|
|
7256
7692
|
}
|
|
7257
7693
|
}
|
|
@@ -7277,7 +7713,7 @@ function createAgentsNamespace(rb) {
|
|
|
7277
7713
|
path: { id },
|
|
7278
7714
|
body: {
|
|
7279
7715
|
data: {
|
|
7280
|
-
type: "
|
|
7716
|
+
type: "agent-version",
|
|
7281
7717
|
system_field_name: fieldName
|
|
7282
7718
|
}
|
|
7283
7719
|
}
|
|
@@ -7303,7 +7739,7 @@ function createAgentsNamespace(rb) {
|
|
|
7303
7739
|
path: { id },
|
|
7304
7740
|
body: {
|
|
7305
7741
|
data: {
|
|
7306
|
-
type: "
|
|
7742
|
+
type: "agent-version",
|
|
7307
7743
|
system_field_names: fieldNames
|
|
7308
7744
|
}
|
|
7309
7745
|
}
|
|
@@ -7395,7 +7831,7 @@ function createAgentsNamespace(rb) {
|
|
|
7395
7831
|
{
|
|
7396
7832
|
body: {
|
|
7397
7833
|
data: {
|
|
7398
|
-
type: "
|
|
7834
|
+
type: "agent-version-comparison",
|
|
7399
7835
|
attributes: {
|
|
7400
7836
|
version_a_id: versionAId,
|
|
7401
7837
|
version_b_id: versionBId
|
|
@@ -7443,7 +7879,7 @@ function createAgentsNamespace(rb) {
|
|
|
7443
7879
|
postAdminAgentsByIdSchemaVersions,
|
|
7444
7880
|
{
|
|
7445
7881
|
path: { id: agentId },
|
|
7446
|
-
body: { data: { type: "
|
|
7882
|
+
body: { data: { type: "agent-version", ...attributes } }
|
|
7447
7883
|
},
|
|
7448
7884
|
options
|
|
7449
7885
|
);
|
|
@@ -7483,7 +7919,7 @@ function createAgentsNamespace(rb) {
|
|
|
7483
7919
|
patchAdminAgentsByIdSchemaVersionsByVersionId,
|
|
7484
7920
|
{
|
|
7485
7921
|
path: { id: agentId, version_id: versionId },
|
|
7486
|
-
body: { data: { type: "
|
|
7922
|
+
body: { data: { type: "agent-version", ...attributes } }
|
|
7487
7923
|
},
|
|
7488
7924
|
options
|
|
7489
7925
|
);
|
|
@@ -7540,7 +7976,7 @@ function createAgentsNamespace(rb) {
|
|
|
7540
7976
|
create: async (attributes, options) => {
|
|
7541
7977
|
return rb.execute(
|
|
7542
7978
|
postAdminTrainingExamples,
|
|
7543
|
-
{ body: { data: { type: "
|
|
7979
|
+
{ body: { data: { type: "training-example", attributes } } },
|
|
7544
7980
|
options
|
|
7545
7981
|
);
|
|
7546
7982
|
},
|
|
@@ -7560,7 +7996,7 @@ function createAgentsNamespace(rb) {
|
|
|
7560
7996
|
patchAdminTrainingExamplesById,
|
|
7561
7997
|
{
|
|
7562
7998
|
path: { id },
|
|
7563
|
-
body: { data: { id, type: "
|
|
7999
|
+
body: { data: { id, type: "training-example", attributes } }
|
|
7564
8000
|
},
|
|
7565
8001
|
options
|
|
7566
8002
|
);
|
|
@@ -7600,7 +8036,7 @@ function createAgentsNamespace(rb) {
|
|
|
7600
8036
|
{
|
|
7601
8037
|
body: {
|
|
7602
8038
|
data: {
|
|
7603
|
-
type: "
|
|
8039
|
+
type: "training-example",
|
|
7604
8040
|
agent_id: examples[0]?.agent_id,
|
|
7605
8041
|
examples
|
|
7606
8042
|
}
|
|
@@ -7623,7 +8059,7 @@ function createAgentsNamespace(rb) {
|
|
|
7623
8059
|
return rb.execute(
|
|
7624
8060
|
postAdminTrainingExamplesBulkDelete,
|
|
7625
8061
|
{
|
|
7626
|
-
body: { data: { type: "
|
|
8062
|
+
body: { data: { type: "training-example", ids } }
|
|
7627
8063
|
},
|
|
7628
8064
|
options
|
|
7629
8065
|
);
|
|
@@ -7643,7 +8079,7 @@ function createAgentsNamespace(rb) {
|
|
|
7643
8079
|
postAdminTrainingExamplesSearch,
|
|
7644
8080
|
{
|
|
7645
8081
|
body: {
|
|
7646
|
-
data: { type: "
|
|
8082
|
+
data: { type: "training-example", query }
|
|
7647
8083
|
}
|
|
7648
8084
|
},
|
|
7649
8085
|
options
|
|
@@ -7787,7 +8223,7 @@ function createAgentsNamespace(rb) {
|
|
|
7787
8223
|
create: async (attributes, options) => {
|
|
7788
8224
|
return rb.execute(
|
|
7789
8225
|
postAdminFieldTemplates,
|
|
7790
|
-
{ body: { data: { type: "
|
|
8226
|
+
{ body: { data: { type: "field-template", attributes } } },
|
|
7791
8227
|
options
|
|
7792
8228
|
);
|
|
7793
8229
|
},
|
|
@@ -8890,7 +9326,7 @@ function createApiKeysNamespace(rb) {
|
|
|
8890
9326
|
create: async (attributes, options) => {
|
|
8891
9327
|
return rb.execute(
|
|
8892
9328
|
postAdminApiKeys,
|
|
8893
|
-
{ body: { data: { type: "
|
|
9329
|
+
{ body: { data: { type: "api-key", attributes } } },
|
|
8894
9330
|
options
|
|
8895
9331
|
);
|
|
8896
9332
|
},
|
|
@@ -8903,7 +9339,7 @@ function createApiKeysNamespace(rb) {
|
|
|
8903
9339
|
update: async (id, attributes, options) => {
|
|
8904
9340
|
return rb.execute(
|
|
8905
9341
|
patchAdminApiKeysById,
|
|
8906
|
-
{ path: { id }, body: { data: { id, type: "
|
|
9342
|
+
{ path: { id }, body: { data: { id, type: "api-key", attributes } } },
|
|
8907
9343
|
options
|
|
8908
9344
|
);
|
|
8909
9345
|
},
|
|
@@ -8933,7 +9369,7 @@ function createApiKeysNamespace(rb) {
|
|
|
8933
9369
|
body: {
|
|
8934
9370
|
data: {
|
|
8935
9371
|
id,
|
|
8936
|
-
type: "
|
|
9372
|
+
type: "api-key",
|
|
8937
9373
|
attributes: {
|
|
8938
9374
|
credit_limit: creditLimit,
|
|
8939
9375
|
credit_limit_period: creditLimitPeriod
|
|
@@ -8972,7 +9408,7 @@ function createApiKeysNamespace(rb) {
|
|
|
8972
9408
|
patchAdminApiKeysByIdResetPeriod,
|
|
8973
9409
|
{
|
|
8974
9410
|
path: { id },
|
|
8975
|
-
body: { data: { id, type: "
|
|
9411
|
+
body: { data: { id, type: "api-key", attributes: {} } }
|
|
8976
9412
|
},
|
|
8977
9413
|
options
|
|
8978
9414
|
);
|
|
@@ -9264,7 +9700,7 @@ function createStorageNamespace(rb) {
|
|
|
9264
9700
|
archive: async (id, options) => {
|
|
9265
9701
|
return rb.execute(
|
|
9266
9702
|
patchAdminStorageFilesByIdArchive,
|
|
9267
|
-
{ path: { id }, body: { data: { id, type: "
|
|
9703
|
+
{ path: { id }, body: { data: { id, type: "storage-file" } } },
|
|
9268
9704
|
options
|
|
9269
9705
|
);
|
|
9270
9706
|
},
|
|
@@ -9272,7 +9708,7 @@ function createStorageNamespace(rb) {
|
|
|
9272
9708
|
restore: async (id, options) => {
|
|
9273
9709
|
return rb.execute(
|
|
9274
9710
|
patchAdminStorageFilesByIdRestore,
|
|
9275
|
-
{ path: { id }, body: { data: { id, type: "
|
|
9711
|
+
{ path: { id }, body: { data: { id, type: "storage-file" } } },
|
|
9276
9712
|
options
|
|
9277
9713
|
);
|
|
9278
9714
|
},
|
|
@@ -9285,7 +9721,7 @@ function createStorageNamespace(rb) {
|
|
|
9285
9721
|
body: {
|
|
9286
9722
|
data: {
|
|
9287
9723
|
id,
|
|
9288
|
-
type: "
|
|
9724
|
+
type: "storage-file",
|
|
9289
9725
|
attributes: attributes ?? {}
|
|
9290
9726
|
}
|
|
9291
9727
|
}
|
|
@@ -9297,7 +9733,7 @@ function createStorageNamespace(rb) {
|
|
|
9297
9733
|
softDelete: async (id, options) => {
|
|
9298
9734
|
return rb.execute(
|
|
9299
9735
|
patchAdminStorageFilesByIdSoftDelete,
|
|
9300
|
-
{ path: { id }, body: { data: { id, type: "
|
|
9736
|
+
{ path: { id }, body: { data: { id, type: "storage-file" } } },
|
|
9301
9737
|
options
|
|
9302
9738
|
);
|
|
9303
9739
|
},
|
|
@@ -9308,7 +9744,7 @@ function createStorageNamespace(rb) {
|
|
|
9308
9744
|
{
|
|
9309
9745
|
path: { id },
|
|
9310
9746
|
body: {
|
|
9311
|
-
data: { id, type: "
|
|
9747
|
+
data: { id, type: "storage-file", attributes: { tags } }
|
|
9312
9748
|
}
|
|
9313
9749
|
},
|
|
9314
9750
|
options
|
|
@@ -9323,7 +9759,7 @@ function createStorageNamespace(rb) {
|
|
|
9323
9759
|
body: {
|
|
9324
9760
|
data: {
|
|
9325
9761
|
id,
|
|
9326
|
-
type: "
|
|
9762
|
+
type: "storage-file",
|
|
9327
9763
|
attributes: { new_metadata: newMetadata }
|
|
9328
9764
|
}
|
|
9329
9765
|
}
|
|
@@ -9803,6 +10239,132 @@ function createVoiceNamespace(rb) {
|
|
|
9803
10239
|
options
|
|
9804
10240
|
);
|
|
9805
10241
|
}
|
|
10242
|
+
},
|
|
10243
|
+
/**
|
|
10244
|
+
* Transcription job management — admin view.
|
|
10245
|
+
*
|
|
10246
|
+
* Transcription jobs enable chunked, progressive transcription of long
|
|
10247
|
+
* audio recordings. Each job tracks uploaded chunks, assembly status,
|
|
10248
|
+
* and the final assembled transcript.
|
|
10249
|
+
*/
|
|
10250
|
+
transcriptionJobs: {
|
|
10251
|
+
/**
|
|
10252
|
+
* List transcription jobs across all workspaces.
|
|
10253
|
+
*
|
|
10254
|
+
* @param options - Optional pagination and request options.
|
|
10255
|
+
* @returns Array of TranscriptionJob objects.
|
|
10256
|
+
*
|
|
10257
|
+
* @example
|
|
10258
|
+
* ```typescript
|
|
10259
|
+
* const jobs = await admin.voice.transcriptionJobs.list();
|
|
10260
|
+
* ```
|
|
10261
|
+
*/
|
|
10262
|
+
list: async (options) => {
|
|
10263
|
+
return rb.execute(
|
|
10264
|
+
getAdminVoiceTranscriptionJobs,
|
|
10265
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
10266
|
+
options
|
|
10267
|
+
);
|
|
10268
|
+
},
|
|
10269
|
+
/**
|
|
10270
|
+
* Retrieve a single transcription job by ID.
|
|
10271
|
+
*
|
|
10272
|
+
* @param id - The UUID of the transcription job.
|
|
10273
|
+
* @param options - Optional request options.
|
|
10274
|
+
* @returns The TranscriptionJob.
|
|
10275
|
+
*
|
|
10276
|
+
* @example
|
|
10277
|
+
* ```typescript
|
|
10278
|
+
* const job = await admin.voice.transcriptionJobs.get('job-uuid');
|
|
10279
|
+
* ```
|
|
10280
|
+
*/
|
|
10281
|
+
get: async (id, options) => {
|
|
10282
|
+
return rb.execute(
|
|
10283
|
+
getAdminVoiceTranscriptionJobsById,
|
|
10284
|
+
{ path: { id } },
|
|
10285
|
+
options
|
|
10286
|
+
);
|
|
10287
|
+
},
|
|
10288
|
+
/**
|
|
10289
|
+
* List transcription jobs owned by the current actor.
|
|
10290
|
+
*
|
|
10291
|
+
* @param options - Optional pagination and request options.
|
|
10292
|
+
* @returns Array of TranscriptionJob objects.
|
|
10293
|
+
*
|
|
10294
|
+
* @example
|
|
10295
|
+
* ```typescript
|
|
10296
|
+
* const myJobs = await admin.voice.transcriptionJobs.listMine();
|
|
10297
|
+
* ```
|
|
10298
|
+
*/
|
|
10299
|
+
listMine: async (options) => {
|
|
10300
|
+
return rb.execute(
|
|
10301
|
+
getAdminVoiceTranscriptionJobsMine,
|
|
10302
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
10303
|
+
options
|
|
10304
|
+
);
|
|
10305
|
+
},
|
|
10306
|
+
/**
|
|
10307
|
+
* List transcription jobs in a specific workspace.
|
|
10308
|
+
*
|
|
10309
|
+
* @param workspaceId - The UUID of the workspace.
|
|
10310
|
+
* @param options - Optional pagination and request options.
|
|
10311
|
+
* @returns Array of TranscriptionJob objects in the workspace.
|
|
10312
|
+
*
|
|
10313
|
+
* @example
|
|
10314
|
+
* ```typescript
|
|
10315
|
+
* const jobs = await admin.voice.transcriptionJobs.listByWorkspace('ws-uuid');
|
|
10316
|
+
* ```
|
|
10317
|
+
*/
|
|
10318
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
10319
|
+
return rb.execute(
|
|
10320
|
+
getAdminVoiceTranscriptionJobsWorkspaceByWorkspaceId,
|
|
10321
|
+
{
|
|
10322
|
+
path: { workspace_id: workspaceId },
|
|
10323
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
10324
|
+
},
|
|
10325
|
+
options
|
|
10326
|
+
);
|
|
10327
|
+
},
|
|
10328
|
+
/**
|
|
10329
|
+
* Create a new transcription job.
|
|
10330
|
+
*
|
|
10331
|
+
* @param data - Job creation attributes (language, model_size, etc.).
|
|
10332
|
+
* @param options - Optional request options.
|
|
10333
|
+
* @returns The created TranscriptionJob.
|
|
10334
|
+
*
|
|
10335
|
+
* @example
|
|
10336
|
+
* ```typescript
|
|
10337
|
+
* const job = await admin.voice.transcriptionJobs.create({
|
|
10338
|
+
* language: "en",
|
|
10339
|
+
* model_size: "large-v3",
|
|
10340
|
+
* });
|
|
10341
|
+
* ```
|
|
10342
|
+
*/
|
|
10343
|
+
create: async (data, options) => {
|
|
10344
|
+
return rb.execute(
|
|
10345
|
+
postAdminVoiceTranscriptionJobs,
|
|
10346
|
+
{ body: { data: { type: "transcription-job", attributes: data } } },
|
|
10347
|
+
options
|
|
10348
|
+
);
|
|
10349
|
+
},
|
|
10350
|
+
/**
|
|
10351
|
+
* Delete a transcription job by ID.
|
|
10352
|
+
*
|
|
10353
|
+
* @param id - The UUID of the transcription job to delete.
|
|
10354
|
+
* @param options - Optional request options.
|
|
10355
|
+
*
|
|
10356
|
+
* @example
|
|
10357
|
+
* ```typescript
|
|
10358
|
+
* await admin.voice.transcriptionJobs.destroy('job-uuid');
|
|
10359
|
+
* ```
|
|
10360
|
+
*/
|
|
10361
|
+
destroy: async (id, options) => {
|
|
10362
|
+
return rb.execute(
|
|
10363
|
+
deleteAdminVoiceTranscriptionJobsById,
|
|
10364
|
+
{ path: { id } },
|
|
10365
|
+
options
|
|
10366
|
+
);
|
|
10367
|
+
}
|
|
9806
10368
|
}
|
|
9807
10369
|
};
|
|
9808
10370
|
}
|
|
@@ -10004,7 +10566,7 @@ function createWebhooksNamespace(rb) {
|
|
|
10004
10566
|
{
|
|
10005
10567
|
body: {
|
|
10006
10568
|
data: {
|
|
10007
|
-
type: "
|
|
10569
|
+
type: "webhook-config",
|
|
10008
10570
|
attributes: {
|
|
10009
10571
|
name,
|
|
10010
10572
|
url,
|
|
@@ -10049,7 +10611,7 @@ function createWebhooksNamespace(rb) {
|
|
|
10049
10611
|
patchAdminWebhookConfigsById,
|
|
10050
10612
|
{
|
|
10051
10613
|
path: { id },
|
|
10052
|
-
body: { data: { id, type: "
|
|
10614
|
+
body: { data: { id, type: "webhook-config", attributes } }
|
|
10053
10615
|
},
|
|
10054
10616
|
options
|
|
10055
10617
|
);
|
|
@@ -10197,68 +10759,933 @@ function createWebhooksNamespace(rb) {
|
|
|
10197
10759
|
},
|
|
10198
10760
|
deliveries: {
|
|
10199
10761
|
/**
|
|
10200
|
-
* Lists all webhook delivery records across all configurations.
|
|
10201
|
-
*
|
|
10202
|
-
* Each delivery record tracks the attempt count, status, payload, and
|
|
10203
|
-
* response for a single event dispatch.
|
|
10762
|
+
* Lists all webhook delivery records across all configurations.
|
|
10763
|
+
*
|
|
10764
|
+
* Each delivery record tracks the attempt count, status, payload, and
|
|
10765
|
+
* response for a single event dispatch.
|
|
10766
|
+
*
|
|
10767
|
+
* @param options - Optional request options.
|
|
10768
|
+
* @returns Array of WebhookDelivery objects.
|
|
10769
|
+
*/
|
|
10770
|
+
list: async (options) => {
|
|
10771
|
+
return rb.execute(
|
|
10772
|
+
getAdminWebhookDeliveries,
|
|
10773
|
+
{},
|
|
10774
|
+
options
|
|
10775
|
+
);
|
|
10776
|
+
},
|
|
10777
|
+
/**
|
|
10778
|
+
* Fetches a single delivery record by ID.
|
|
10779
|
+
*
|
|
10780
|
+
* @param id - WebhookDelivery ID.
|
|
10781
|
+
* @param options - Optional request options.
|
|
10782
|
+
* @returns The WebhookDelivery.
|
|
10783
|
+
*/
|
|
10784
|
+
get: async (id, options) => {
|
|
10785
|
+
return rb.execute(
|
|
10786
|
+
getAdminWebhookDeliveriesById,
|
|
10787
|
+
{ path: { id } },
|
|
10788
|
+
options
|
|
10789
|
+
);
|
|
10790
|
+
},
|
|
10791
|
+
/**
|
|
10792
|
+
* Re-enqueues a failed or pending delivery for immediate re-dispatch.
|
|
10793
|
+
*
|
|
10794
|
+
* Sets the delivery status to `retrying` and inserts a new WebhookSender
|
|
10795
|
+
* Oban job. Use this to recover from transient endpoint failures without
|
|
10796
|
+
* waiting for the automatic retry schedule.
|
|
10797
|
+
*
|
|
10798
|
+
* @param id - WebhookDelivery ID.
|
|
10799
|
+
* @param options - Optional request options.
|
|
10800
|
+
* @returns Updated WebhookDelivery with status `retrying`.
|
|
10801
|
+
*/
|
|
10802
|
+
retry: async (id, options) => {
|
|
10803
|
+
return rb.execute(
|
|
10804
|
+
postAdminWebhookDeliveriesByIdRetry,
|
|
10805
|
+
{ path: { id }, body: {} },
|
|
10806
|
+
options
|
|
10807
|
+
);
|
|
10808
|
+
},
|
|
10809
|
+
/**
|
|
10810
|
+
* Sets multiple delivery records to `retrying` status in bulk.
|
|
10811
|
+
*
|
|
10812
|
+
* Authorization is actor-scoped — only deliveries the actor can update
|
|
10813
|
+
* are affected. Use this to recover from endpoint outages without
|
|
10814
|
+
* retrying each delivery individually.
|
|
10815
|
+
*
|
|
10816
|
+
* @param ids - Array of WebhookDelivery IDs to retry.
|
|
10817
|
+
* @param options - Optional request options.
|
|
10818
|
+
* @returns An object with `success: true` and the count of queued retries.
|
|
10819
|
+
*/
|
|
10820
|
+
bulkRetry: async (ids, options) => {
|
|
10821
|
+
return rb.execute(
|
|
10822
|
+
postAdminWebhookDeliveriesBulkRetry,
|
|
10823
|
+
{ body: { data: { ids } } },
|
|
10824
|
+
options
|
|
10825
|
+
);
|
|
10826
|
+
}
|
|
10827
|
+
}
|
|
10828
|
+
};
|
|
10829
|
+
}
|
|
10830
|
+
|
|
10831
|
+
// src/namespaces/campaigns.ts
|
|
10832
|
+
function createCampaignsNamespace(rb) {
|
|
10833
|
+
return {
|
|
10834
|
+
/**
|
|
10835
|
+
* Campaigns -- email campaign orchestration.
|
|
10836
|
+
*
|
|
10837
|
+
* A campaign represents a single bulk email send (or a scheduled future
|
|
10838
|
+
* send) targeting a list of recipients. Campaigns can be created from
|
|
10839
|
+
* templates, analysed with AI for performance insights, have their send
|
|
10840
|
+
* times AI-optimised, and spawn follow-up campaigns automatically.
|
|
10841
|
+
*/
|
|
10842
|
+
campaigns: {
|
|
10843
|
+
/**
|
|
10844
|
+
* Fetch a single campaign by its unique ID.
|
|
10845
|
+
*
|
|
10846
|
+
* @param id - The unique identifier of the campaign to retrieve.
|
|
10847
|
+
* @param options - Optional request-level overrides.
|
|
10848
|
+
* @returns A promise that resolves to the matching {@link Campaign}.
|
|
10849
|
+
*/
|
|
10850
|
+
get: async (id, options) => {
|
|
10851
|
+
return rb.execute(
|
|
10852
|
+
getAdminEmailMarketingCampaignsById,
|
|
10853
|
+
{ path: { id } },
|
|
10854
|
+
options
|
|
10855
|
+
);
|
|
10856
|
+
},
|
|
10857
|
+
/**
|
|
10858
|
+
* List campaigns for a workspace with optional pagination.
|
|
10859
|
+
*
|
|
10860
|
+
* @param workspaceId - The ID of the workspace whose campaigns to list.
|
|
10861
|
+
* @param options - Optional pagination controls and request-level overrides.
|
|
10862
|
+
* @returns A promise that resolves to an array of {@link Campaign} records.
|
|
10863
|
+
*/
|
|
10864
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
10865
|
+
return rb.execute(
|
|
10866
|
+
getAdminEmailMarketingCampaignsWorkspaceByWorkspaceId,
|
|
10867
|
+
{
|
|
10868
|
+
path: { workspace_id: workspaceId },
|
|
10869
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
10870
|
+
},
|
|
10871
|
+
options
|
|
10872
|
+
);
|
|
10873
|
+
},
|
|
10874
|
+
/**
|
|
10875
|
+
* Create a new email campaign.
|
|
10876
|
+
*
|
|
10877
|
+
* @param attributes - Campaign attributes including `workspace_id`, `name`, and `template_id`.
|
|
10878
|
+
* @param options - Optional request-level overrides.
|
|
10879
|
+
* @returns A promise that resolves to the newly created {@link Campaign}.
|
|
10880
|
+
*/
|
|
10881
|
+
create: async (attributes, options) => {
|
|
10882
|
+
return rb.execute(
|
|
10883
|
+
postAdminEmailMarketingCampaigns,
|
|
10884
|
+
{ body: { data: { type: "campaign", attributes } } },
|
|
10885
|
+
options
|
|
10886
|
+
);
|
|
10887
|
+
},
|
|
10888
|
+
/**
|
|
10889
|
+
* Update an existing campaign's attributes (PATCH semantics).
|
|
10890
|
+
*
|
|
10891
|
+
* @param id - The unique identifier of the campaign to update.
|
|
10892
|
+
* @param attributes - Key/value map of attributes to change.
|
|
10893
|
+
* @param options - Optional request-level overrides.
|
|
10894
|
+
* @returns A promise that resolves to the updated {@link Campaign}.
|
|
10895
|
+
*/
|
|
10896
|
+
update: async (id, attributes, options) => {
|
|
10897
|
+
return rb.execute(
|
|
10898
|
+
patchAdminEmailMarketingCampaignsById,
|
|
10899
|
+
{
|
|
10900
|
+
path: { id },
|
|
10901
|
+
body: {
|
|
10902
|
+
data: { id, type: "campaign", attributes }
|
|
10903
|
+
}
|
|
10904
|
+
},
|
|
10905
|
+
options
|
|
10906
|
+
);
|
|
10907
|
+
},
|
|
10908
|
+
/**
|
|
10909
|
+
* Trigger immediate delivery of a campaign to all recipients.
|
|
10910
|
+
*
|
|
10911
|
+
* @param id - The unique identifier of the campaign to send.
|
|
10912
|
+
* @param options - Optional request-level overrides.
|
|
10913
|
+
* @returns A promise that resolves to the updated {@link Campaign}.
|
|
10914
|
+
*/
|
|
10915
|
+
send: async (id, options) => {
|
|
10916
|
+
return rb.execute(
|
|
10917
|
+
postAdminEmailMarketingCampaignsByIdSend,
|
|
10918
|
+
{ path: { id }, body: {} },
|
|
10919
|
+
options
|
|
10920
|
+
);
|
|
10921
|
+
},
|
|
10922
|
+
/**
|
|
10923
|
+
* Request an AI-powered performance analysis of a sent campaign.
|
|
10924
|
+
*
|
|
10925
|
+
* @param id - The unique identifier of the campaign to analyse.
|
|
10926
|
+
* @param options - Optional request-level overrides.
|
|
10927
|
+
* @returns A promise that resolves to the AI-generated analysis report payload.
|
|
10928
|
+
*/
|
|
10929
|
+
analyze: async (id, options) => {
|
|
10930
|
+
return rb.execute(
|
|
10931
|
+
postAdminEmailMarketingCampaignsByIdAnalyze,
|
|
10932
|
+
{ path: { id }, body: {} },
|
|
10933
|
+
options
|
|
10934
|
+
);
|
|
10935
|
+
},
|
|
10936
|
+
/**
|
|
10937
|
+
* Use AI to determine the optimal send time for a campaign.
|
|
10938
|
+
*
|
|
10939
|
+
* @param id - The unique identifier of the campaign to optimise.
|
|
10940
|
+
* @param options - Optional request-level overrides.
|
|
10941
|
+
* @returns A promise that resolves to the optimisation result payload.
|
|
10942
|
+
*/
|
|
10943
|
+
optimizeSendTimes: async (id, options) => {
|
|
10944
|
+
return rb.execute(
|
|
10945
|
+
postAdminEmailMarketingCampaignsByIdOptimizeSendTimes,
|
|
10946
|
+
{ path: { id }, body: {} },
|
|
10947
|
+
options
|
|
10948
|
+
);
|
|
10949
|
+
},
|
|
10950
|
+
/**
|
|
10951
|
+
* Create a follow-up campaign targeted at non-engaged recipients.
|
|
10952
|
+
*
|
|
10953
|
+
* @param id - The ID of the original campaign to follow up on.
|
|
10954
|
+
* @param attributes - Additional attributes for the follow-up campaign.
|
|
10955
|
+
* @param options - Optional request-level overrides.
|
|
10956
|
+
* @returns A promise that resolves to the newly created follow-up {@link Campaign}.
|
|
10957
|
+
*/
|
|
10958
|
+
createFollowup: async (id, attributes, options) => {
|
|
10959
|
+
return rb.execute(
|
|
10960
|
+
postAdminEmailMarketingCampaignsByIdCreateFollowup,
|
|
10961
|
+
{
|
|
10962
|
+
path: { id },
|
|
10963
|
+
body: { data: { type: "campaign", ...attributes } }
|
|
10964
|
+
},
|
|
10965
|
+
options
|
|
10966
|
+
);
|
|
10967
|
+
},
|
|
10968
|
+
/**
|
|
10969
|
+
* Import recipients from a CSV file stored in platform storage.
|
|
10970
|
+
*
|
|
10971
|
+
* @param id - The campaign ID to import recipients into.
|
|
10972
|
+
* @param attributes - Import configuration including `csv_storage_key` and `workspace_id`.
|
|
10973
|
+
* @param options - Optional request-level overrides.
|
|
10974
|
+
* @returns A promise resolving to the import job details.
|
|
10975
|
+
*/
|
|
10976
|
+
importRecipients: async (id, attributes, options) => {
|
|
10977
|
+
return rb.execute(
|
|
10978
|
+
postAdminEmailMarketingCampaignsByIdImportRecipients,
|
|
10979
|
+
{ path: { id }, body: { data: { type: "campaign", attributes } } },
|
|
10980
|
+
options
|
|
10981
|
+
);
|
|
10982
|
+
},
|
|
10983
|
+
/**
|
|
10984
|
+
* Trigger AI-powered email generation for all campaign recipients.
|
|
10985
|
+
*
|
|
10986
|
+
* @param id - The campaign ID to generate emails for.
|
|
10987
|
+
* @param workspaceId - The workspace ID.
|
|
10988
|
+
* @param options - Optional request-level overrides.
|
|
10989
|
+
* @returns A promise resolving to the generation job details.
|
|
10990
|
+
*/
|
|
10991
|
+
generateEmails: async (id, workspaceId, options) => {
|
|
10992
|
+
return rb.execute(
|
|
10993
|
+
postAdminEmailMarketingCampaignsByIdGenerateEmails,
|
|
10994
|
+
{
|
|
10995
|
+
path: { id },
|
|
10996
|
+
body: {
|
|
10997
|
+
data: {
|
|
10998
|
+
type: "campaign",
|
|
10999
|
+
attributes: { workspace_id: workspaceId }
|
|
11000
|
+
}
|
|
11001
|
+
}
|
|
11002
|
+
},
|
|
11003
|
+
options
|
|
11004
|
+
);
|
|
11005
|
+
},
|
|
11006
|
+
/**
|
|
11007
|
+
* Generate A/B test subject line variants using AI.
|
|
11008
|
+
*
|
|
11009
|
+
* @param id - The campaign ID to optimize subjects for.
|
|
11010
|
+
* @param attributes - Subject optimization parameters.
|
|
11011
|
+
* @param options - Optional request-level overrides.
|
|
11012
|
+
* @returns A promise resolving to the optimization result with variant suggestions.
|
|
11013
|
+
*/
|
|
11014
|
+
optimizeSubjects: async (id, attributes, options) => {
|
|
11015
|
+
return rb.execute(
|
|
11016
|
+
postAdminEmailMarketingCampaignsByIdOptimizeSubjects,
|
|
11017
|
+
{
|
|
11018
|
+
path: { id },
|
|
11019
|
+
body: {
|
|
11020
|
+
data: { type: "campaign", attributes }
|
|
11021
|
+
}
|
|
11022
|
+
},
|
|
11023
|
+
options
|
|
11024
|
+
);
|
|
11025
|
+
},
|
|
11026
|
+
/**
|
|
11027
|
+
* Export campaign data (recipients, results, or analytics) as CSV.
|
|
11028
|
+
*
|
|
11029
|
+
* @param id - The campaign ID to export.
|
|
11030
|
+
* @param attributes - Export configuration including `workspace_id`.
|
|
11031
|
+
* @param options - Optional request-level overrides.
|
|
11032
|
+
* @returns A promise resolving to the export job details.
|
|
11033
|
+
*/
|
|
11034
|
+
export: async (id, attributes, options) => {
|
|
11035
|
+
return rb.execute(
|
|
11036
|
+
postAdminEmailMarketingCampaignsByIdExport,
|
|
11037
|
+
{
|
|
11038
|
+
path: { id },
|
|
11039
|
+
body: {
|
|
11040
|
+
data: { type: "campaign", attributes }
|
|
11041
|
+
}
|
|
11042
|
+
},
|
|
11043
|
+
options
|
|
11044
|
+
);
|
|
11045
|
+
},
|
|
11046
|
+
/**
|
|
11047
|
+
* Permanently delete a campaign.
|
|
11048
|
+
*
|
|
11049
|
+
* @param id - The unique identifier of the campaign to delete.
|
|
11050
|
+
* @param options - Optional request-level overrides.
|
|
11051
|
+
* @returns A promise that resolves to `true` on successful deletion.
|
|
11052
|
+
*/
|
|
11053
|
+
delete: async (id, options) => {
|
|
11054
|
+
return rb.executeDelete(
|
|
11055
|
+
deleteAdminEmailMarketingCampaignsById,
|
|
11056
|
+
{ path: { id } },
|
|
11057
|
+
options
|
|
11058
|
+
);
|
|
11059
|
+
}
|
|
11060
|
+
},
|
|
11061
|
+
/**
|
|
11062
|
+
* Templates -- reusable MJML-based email layout templates with versioning.
|
|
11063
|
+
*
|
|
11064
|
+
* Templates define the HTML and/or plain-text structure of an email.
|
|
11065
|
+
* They support live MJML compilation, publish/unpublish lifecycle,
|
|
11066
|
+
* archive/restore, rollback, and immutable version snapshots.
|
|
11067
|
+
*/
|
|
11068
|
+
templates: {
|
|
11069
|
+
/**
|
|
11070
|
+
* Fetch a single template by its unique ID.
|
|
11071
|
+
*
|
|
11072
|
+
* @param id - The unique identifier of the template to retrieve.
|
|
11073
|
+
* @param options - Optional request-level overrides.
|
|
11074
|
+
* @returns A promise that resolves to the matching {@link EmailMarketingTemplate}.
|
|
11075
|
+
*/
|
|
11076
|
+
get: async (id, options) => {
|
|
11077
|
+
return rb.execute(
|
|
11078
|
+
getAdminEmailMarketingTemplatesById,
|
|
11079
|
+
{ path: { id } },
|
|
11080
|
+
options
|
|
11081
|
+
);
|
|
11082
|
+
},
|
|
11083
|
+
/**
|
|
11084
|
+
* List all email templates for a workspace with optional pagination.
|
|
11085
|
+
*
|
|
11086
|
+
* @param workspaceId - The ID of the workspace whose templates to list.
|
|
11087
|
+
* @param options - Optional pagination controls and request-level overrides.
|
|
11088
|
+
* @returns A promise that resolves to an array of {@link EmailMarketingTemplate} records.
|
|
11089
|
+
*/
|
|
11090
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
11091
|
+
return rb.execute(
|
|
11092
|
+
getAdminEmailMarketingTemplatesWorkspaceByWorkspaceId,
|
|
11093
|
+
{
|
|
11094
|
+
path: { workspace_id: workspaceId },
|
|
11095
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
11096
|
+
},
|
|
11097
|
+
options
|
|
11098
|
+
);
|
|
11099
|
+
},
|
|
11100
|
+
/**
|
|
11101
|
+
* Create a new email template.
|
|
11102
|
+
*
|
|
11103
|
+
* @param attributes - Template attributes including `name`.
|
|
11104
|
+
* @param options - Optional request-level overrides.
|
|
11105
|
+
* @returns A promise that resolves to the newly created {@link EmailMarketingTemplate}.
|
|
11106
|
+
*/
|
|
11107
|
+
create: async (attributes, options) => {
|
|
11108
|
+
return rb.execute(
|
|
11109
|
+
postAdminEmailMarketingTemplates,
|
|
11110
|
+
{ body: { data: { type: "email-marketing-template", attributes } } },
|
|
11111
|
+
options
|
|
11112
|
+
);
|
|
11113
|
+
},
|
|
11114
|
+
/**
|
|
11115
|
+
* Update an existing template's attributes (PATCH semantics).
|
|
11116
|
+
*
|
|
11117
|
+
* @param id - The unique identifier of the template to update.
|
|
11118
|
+
* @param attributes - Key/value map of attributes to change.
|
|
11119
|
+
* @param options - Optional request-level overrides.
|
|
11120
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingTemplate}.
|
|
11121
|
+
*/
|
|
11122
|
+
update: async (id, attributes, options) => {
|
|
11123
|
+
return rb.execute(
|
|
11124
|
+
patchAdminEmailMarketingTemplatesById,
|
|
11125
|
+
{
|
|
11126
|
+
path: { id },
|
|
11127
|
+
body: {
|
|
11128
|
+
data: { id, type: "email-marketing-template", attributes }
|
|
11129
|
+
}
|
|
11130
|
+
},
|
|
11131
|
+
options
|
|
11132
|
+
);
|
|
11133
|
+
},
|
|
11134
|
+
/**
|
|
11135
|
+
* Permanently delete a template.
|
|
11136
|
+
*
|
|
11137
|
+
* @param id - The unique identifier of the template to delete.
|
|
11138
|
+
* @param options - Optional request-level overrides.
|
|
11139
|
+
* @returns A promise that resolves to `true` on successful deletion.
|
|
11140
|
+
*/
|
|
11141
|
+
delete: async (id, options) => {
|
|
11142
|
+
return rb.executeDelete(
|
|
11143
|
+
deleteAdminEmailMarketingTemplatesById,
|
|
11144
|
+
{ path: { id } },
|
|
11145
|
+
options
|
|
11146
|
+
);
|
|
11147
|
+
},
|
|
11148
|
+
/**
|
|
11149
|
+
* Publish a template, creating an immutable version snapshot.
|
|
11150
|
+
*
|
|
11151
|
+
* @param id - The unique identifier of the template to publish.
|
|
11152
|
+
* @param options - Optional request-level overrides.
|
|
11153
|
+
* @returns A promise that resolves to the published {@link EmailMarketingTemplate}.
|
|
11154
|
+
*/
|
|
11155
|
+
publish: async (id, options) => {
|
|
11156
|
+
return rb.execute(
|
|
11157
|
+
patchAdminEmailMarketingTemplatesByIdPublish,
|
|
11158
|
+
{ path: { id }, body: {} },
|
|
11159
|
+
options
|
|
11160
|
+
);
|
|
11161
|
+
},
|
|
11162
|
+
/**
|
|
11163
|
+
* Unpublish a template, reverting it to draft state.
|
|
11164
|
+
*
|
|
11165
|
+
* @param id - The unique identifier of the template to unpublish.
|
|
11166
|
+
* @param options - Optional request-level overrides.
|
|
11167
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingTemplate}.
|
|
11168
|
+
*/
|
|
11169
|
+
unpublish: async (id, options) => {
|
|
11170
|
+
return rb.execute(
|
|
11171
|
+
patchAdminEmailMarketingTemplatesByIdUnpublish,
|
|
11172
|
+
{ path: { id }, body: {} },
|
|
11173
|
+
options
|
|
11174
|
+
);
|
|
11175
|
+
},
|
|
11176
|
+
/**
|
|
11177
|
+
* Archive a template, removing it from active listings.
|
|
11178
|
+
*
|
|
11179
|
+
* @param id - The unique identifier of the template to archive.
|
|
11180
|
+
* @param options - Optional request-level overrides.
|
|
11181
|
+
* @returns A promise that resolves to the archived {@link EmailMarketingTemplate}.
|
|
11182
|
+
*/
|
|
11183
|
+
archive: async (id, options) => {
|
|
11184
|
+
return rb.execute(
|
|
11185
|
+
patchAdminEmailMarketingTemplatesByIdArchive,
|
|
11186
|
+
{ path: { id }, body: {} },
|
|
11187
|
+
options
|
|
11188
|
+
);
|
|
11189
|
+
},
|
|
11190
|
+
/**
|
|
11191
|
+
* Restore an archived template back to active state.
|
|
11192
|
+
*
|
|
11193
|
+
* @param id - The unique identifier of the template to restore.
|
|
11194
|
+
* @param options - Optional request-level overrides.
|
|
11195
|
+
* @returns A promise that resolves to the restored {@link EmailMarketingTemplate}.
|
|
11196
|
+
*/
|
|
11197
|
+
restore: async (id, options) => {
|
|
11198
|
+
return rb.execute(
|
|
11199
|
+
patchAdminEmailMarketingTemplatesByIdRestore,
|
|
11200
|
+
{ path: { id }, body: {} },
|
|
11201
|
+
options
|
|
11202
|
+
);
|
|
11203
|
+
},
|
|
11204
|
+
/**
|
|
11205
|
+
* Roll back a template's MJML source to a previous version.
|
|
11206
|
+
*
|
|
11207
|
+
* Does NOT auto-publish. Call `publish` after reviewing the restored content.
|
|
11208
|
+
*
|
|
11209
|
+
* @param id - The unique identifier of the template to roll back.
|
|
11210
|
+
* @param versionNumber - The version number to restore from.
|
|
11211
|
+
* @param options - Optional request-level overrides.
|
|
11212
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingTemplate}.
|
|
11213
|
+
*/
|
|
11214
|
+
rollback: async (id, versionNumber, options) => {
|
|
11215
|
+
return rb.execute(
|
|
11216
|
+
patchAdminEmailMarketingTemplatesByIdRollback,
|
|
11217
|
+
{
|
|
11218
|
+
path: { id },
|
|
11219
|
+
body: {
|
|
11220
|
+
data: {
|
|
11221
|
+
id,
|
|
11222
|
+
type: "email-marketing-template",
|
|
11223
|
+
attributes: { version_number: versionNumber }
|
|
11224
|
+
}
|
|
11225
|
+
}
|
|
11226
|
+
},
|
|
11227
|
+
options
|
|
11228
|
+
);
|
|
11229
|
+
},
|
|
11230
|
+
/**
|
|
11231
|
+
* Render a saved template with variable overrides for preview.
|
|
11232
|
+
*
|
|
11233
|
+
* @param id - The unique identifier of the template to preview.
|
|
11234
|
+
* @param variables - Key/value map of variable substitutions.
|
|
11235
|
+
* @param options - Optional request-level overrides.
|
|
11236
|
+
* @returns A promise that resolves to the preview result.
|
|
11237
|
+
*/
|
|
11238
|
+
preview: async (id, variables, options) => {
|
|
11239
|
+
return rb.execute(
|
|
11240
|
+
patchAdminEmailMarketingTemplatesByIdPreview,
|
|
11241
|
+
{
|
|
11242
|
+
path: { id },
|
|
11243
|
+
body: {
|
|
11244
|
+
data: {
|
|
11245
|
+
id,
|
|
11246
|
+
type: "email-marketing-template",
|
|
11247
|
+
attributes: { variables }
|
|
11248
|
+
}
|
|
11249
|
+
}
|
|
11250
|
+
},
|
|
11251
|
+
options
|
|
11252
|
+
);
|
|
11253
|
+
},
|
|
11254
|
+
/**
|
|
11255
|
+
* Stateless MJML compilation. Does not save. Use for live preview in builder UI.
|
|
11256
|
+
*
|
|
11257
|
+
* @param mjml - Raw MJML source string to compile.
|
|
11258
|
+
* @param options - Optional request-level overrides.
|
|
11259
|
+
* @returns A promise resolving to the compilation result including HTML, variables, and errors.
|
|
11260
|
+
*/
|
|
11261
|
+
compile: async (mjml, options) => {
|
|
11262
|
+
return rb.execute(
|
|
11263
|
+
postAdminEmailMarketingTemplatesCompile,
|
|
11264
|
+
{
|
|
11265
|
+
body: {
|
|
11266
|
+
data: {
|
|
11267
|
+
type: "campaign-template",
|
|
11268
|
+
body_mjml: mjml
|
|
11269
|
+
}
|
|
11270
|
+
}
|
|
11271
|
+
},
|
|
11272
|
+
options
|
|
11273
|
+
);
|
|
11274
|
+
},
|
|
11275
|
+
/**
|
|
11276
|
+
* List all version snapshots for a template, ordered by version_number descending.
|
|
11277
|
+
*
|
|
11278
|
+
* @param templateId - The ID of the template whose versions to list.
|
|
11279
|
+
* @param options - Optional request-level overrides.
|
|
11280
|
+
* @returns A promise resolving to an array of {@link EmailTemplateVersion} records.
|
|
11281
|
+
*/
|
|
11282
|
+
versions: async (templateId, options) => {
|
|
11283
|
+
return rb.execute(
|
|
11284
|
+
getAdminEmailTemplateVersionsTemplateByTemplateId,
|
|
11285
|
+
{ path: { template_id: templateId } },
|
|
11286
|
+
options
|
|
11287
|
+
);
|
|
11288
|
+
},
|
|
11289
|
+
/**
|
|
11290
|
+
* Fetch a specific template version by template ID and version number.
|
|
11291
|
+
*
|
|
11292
|
+
* @param templateId - The ID of the template.
|
|
11293
|
+
* @param versionNumber - The version number to fetch.
|
|
11294
|
+
* @param options - Optional request-level overrides.
|
|
11295
|
+
* @returns A promise resolving to the full {@link EmailTemplateVersion}.
|
|
11296
|
+
*/
|
|
11297
|
+
getVersion: async (templateId, versionNumber, options) => {
|
|
11298
|
+
return rb.execute(
|
|
11299
|
+
getAdminEmailTemplateVersionsByTemplateIdVersionsByVersionNumber,
|
|
11300
|
+
{
|
|
11301
|
+
path: {
|
|
11302
|
+
template_id: templateId,
|
|
11303
|
+
version_number: versionNumber
|
|
11304
|
+
}
|
|
11305
|
+
},
|
|
11306
|
+
options
|
|
11307
|
+
);
|
|
11308
|
+
}
|
|
11309
|
+
},
|
|
11310
|
+
/**
|
|
11311
|
+
* Generated Emails -- AI-personalised email drafts awaiting human review.
|
|
11312
|
+
*
|
|
11313
|
+
* When a campaign uses AI personalisation, the platform generates an
|
|
11314
|
+
* individual email draft for each recipient. These drafts sit in a review
|
|
11315
|
+
* queue until a human approves or rejects them.
|
|
11316
|
+
*/
|
|
11317
|
+
generatedEmails: {
|
|
11318
|
+
/**
|
|
11319
|
+
* Fetch a single AI-generated email draft by its unique ID.
|
|
11320
|
+
*
|
|
11321
|
+
* @param id - The unique identifier of the generated email to retrieve.
|
|
11322
|
+
* @param options - Optional request-level overrides.
|
|
11323
|
+
* @returns A promise that resolves to the matching {@link EmailMarketingGeneratedEmail}.
|
|
11324
|
+
*/
|
|
11325
|
+
get: async (id, options) => {
|
|
11326
|
+
return rb.execute(
|
|
11327
|
+
getAdminEmailMarketingGeneratedEmailsById,
|
|
11328
|
+
{ path: { id } },
|
|
11329
|
+
options
|
|
11330
|
+
);
|
|
11331
|
+
},
|
|
11332
|
+
/**
|
|
11333
|
+
* Update an AI-generated email draft before approval.
|
|
11334
|
+
*
|
|
11335
|
+
* @param id - The unique identifier of the generated email to update.
|
|
11336
|
+
* @param attributes - Key/value map of attributes to change (e.g. `subject`, `body`).
|
|
11337
|
+
* @param options - Optional request-level overrides.
|
|
11338
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingGeneratedEmail}.
|
|
11339
|
+
*/
|
|
11340
|
+
update: async (id, attributes, options) => {
|
|
11341
|
+
return rb.execute(
|
|
11342
|
+
patchAdminEmailMarketingGeneratedEmailsById,
|
|
11343
|
+
{
|
|
11344
|
+
path: { id },
|
|
11345
|
+
body: {
|
|
11346
|
+
data: { id, type: "email-marketing-generated-email", attributes }
|
|
11347
|
+
}
|
|
11348
|
+
},
|
|
11349
|
+
options
|
|
11350
|
+
);
|
|
11351
|
+
},
|
|
11352
|
+
/**
|
|
11353
|
+
* Approve a generated email draft and move it to the sending queue.
|
|
11354
|
+
*
|
|
11355
|
+
* @param id - The unique identifier of the generated email to approve.
|
|
11356
|
+
* @param options - Optional request-level overrides.
|
|
11357
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingGeneratedEmail}.
|
|
11358
|
+
*/
|
|
11359
|
+
approve: async (id, options) => {
|
|
11360
|
+
return rb.execute(
|
|
11361
|
+
patchAdminEmailMarketingGeneratedEmailsByIdApprove,
|
|
11362
|
+
{ path: { id }, body: {} },
|
|
11363
|
+
options
|
|
11364
|
+
);
|
|
11365
|
+
},
|
|
11366
|
+
/**
|
|
11367
|
+
* Reject an AI-generated email draft. The email will not be sent.
|
|
11368
|
+
*
|
|
11369
|
+
* @param id - The unique identifier of the generated email to reject.
|
|
11370
|
+
* @param options - Optional request-level overrides.
|
|
11371
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingGeneratedEmail}.
|
|
11372
|
+
*/
|
|
11373
|
+
reject: async (id, options) => {
|
|
11374
|
+
return rb.execute(
|
|
11375
|
+
patchAdminEmailMarketingGeneratedEmailsByIdReject,
|
|
11376
|
+
{ path: { id }, body: {} },
|
|
11377
|
+
options
|
|
11378
|
+
);
|
|
11379
|
+
},
|
|
11380
|
+
/**
|
|
11381
|
+
* Schedule a generated email for delivery at a specific time.
|
|
11382
|
+
*
|
|
11383
|
+
* @param id - The unique identifier of the generated email to schedule.
|
|
11384
|
+
* @param options - Optional request-level overrides.
|
|
11385
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingGeneratedEmail}.
|
|
11386
|
+
*/
|
|
11387
|
+
schedule: async (id, options) => {
|
|
11388
|
+
return rb.execute(
|
|
11389
|
+
patchAdminEmailMarketingGeneratedEmailsByIdSchedule,
|
|
11390
|
+
{ path: { id }, body: {} },
|
|
11391
|
+
options
|
|
11392
|
+
);
|
|
11393
|
+
},
|
|
11394
|
+
/**
|
|
11395
|
+
* List all generated emails for a specific campaign.
|
|
11396
|
+
*
|
|
11397
|
+
* @param campaignId - The ID of the campaign whose generated emails to list.
|
|
11398
|
+
* @param options - Optional pagination controls and request-level overrides.
|
|
11399
|
+
* @returns A promise resolving to an array of {@link EmailMarketingGeneratedEmail}.
|
|
11400
|
+
*/
|
|
11401
|
+
listByCampaign: async (campaignId, options) => {
|
|
11402
|
+
return rb.execute(
|
|
11403
|
+
getAdminEmailMarketingGeneratedEmailsCampaignByCampaignId,
|
|
11404
|
+
{
|
|
11405
|
+
path: { campaign_id: campaignId },
|
|
11406
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
11407
|
+
},
|
|
11408
|
+
options
|
|
11409
|
+
);
|
|
11410
|
+
}
|
|
11411
|
+
},
|
|
11412
|
+
/**
|
|
11413
|
+
* Sequences -- multi-step drip campaign automation.
|
|
11414
|
+
*
|
|
11415
|
+
* A sequence is a timed series of emails automatically sent to enrolled
|
|
11416
|
+
* contacts over days or weeks. Each step in the sequence has a delay and
|
|
11417
|
+
* references a template or inline content.
|
|
11418
|
+
*/
|
|
11419
|
+
sequences: {
|
|
11420
|
+
/**
|
|
11421
|
+
* Fetch a single sequence by its unique ID.
|
|
11422
|
+
*
|
|
11423
|
+
* @param id - The unique identifier of the sequence to retrieve.
|
|
11424
|
+
* @param options - Optional request-level overrides.
|
|
11425
|
+
* @returns A promise that resolves to the matching {@link EmailMarketingSequence}.
|
|
11426
|
+
*/
|
|
11427
|
+
get: async (id, options) => {
|
|
11428
|
+
return rb.execute(
|
|
11429
|
+
getAdminCampaignsSequencesById,
|
|
11430
|
+
{ path: { id } },
|
|
11431
|
+
options
|
|
11432
|
+
);
|
|
11433
|
+
},
|
|
11434
|
+
/**
|
|
11435
|
+
* Create a new email sequence.
|
|
11436
|
+
*
|
|
11437
|
+
* @param attributes - Sequence attributes including `workspace_id` and `name`.
|
|
11438
|
+
* @param options - Optional request-level overrides.
|
|
11439
|
+
* @returns A promise that resolves to the newly created {@link EmailMarketingSequence}.
|
|
11440
|
+
*/
|
|
11441
|
+
create: async (attributes, options) => {
|
|
11442
|
+
return rb.execute(
|
|
11443
|
+
postAdminCampaignsSequences,
|
|
11444
|
+
{ body: { data: { type: "email-marketing-sequence", attributes } } },
|
|
11445
|
+
options
|
|
11446
|
+
);
|
|
11447
|
+
},
|
|
11448
|
+
/**
|
|
11449
|
+
* Update an existing sequence's attributes (PATCH semantics).
|
|
11450
|
+
*
|
|
11451
|
+
* @param id - The unique identifier of the sequence to update.
|
|
11452
|
+
* @param attributes - Key/value map of attributes to change.
|
|
11453
|
+
* @param options - Optional request-level overrides.
|
|
11454
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingSequence}.
|
|
11455
|
+
*/
|
|
11456
|
+
update: async (id, attributes, options) => {
|
|
11457
|
+
return rb.execute(
|
|
11458
|
+
patchAdminCampaignsSequencesById,
|
|
11459
|
+
{
|
|
11460
|
+
path: { id },
|
|
11461
|
+
body: {
|
|
11462
|
+
data: { id, type: "email-marketing-sequence", attributes }
|
|
11463
|
+
}
|
|
11464
|
+
},
|
|
11465
|
+
options
|
|
11466
|
+
);
|
|
11467
|
+
},
|
|
11468
|
+
/**
|
|
11469
|
+
* List all sequences for a workspace with optional pagination.
|
|
11470
|
+
*
|
|
11471
|
+
* @param workspaceId - The ID of the workspace whose sequences to list.
|
|
11472
|
+
* @param options - Optional pagination controls and request-level overrides.
|
|
11473
|
+
* @returns A promise that resolves to an array of {@link EmailMarketingSequence} records.
|
|
11474
|
+
*/
|
|
11475
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
11476
|
+
return rb.execute(
|
|
11477
|
+
getAdminCampaignsSequencesWorkspaceByWorkspaceId,
|
|
11478
|
+
{
|
|
11479
|
+
path: { workspace_id: workspaceId },
|
|
11480
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
11481
|
+
},
|
|
11482
|
+
options
|
|
11483
|
+
);
|
|
11484
|
+
},
|
|
11485
|
+
/**
|
|
11486
|
+
* Permanently delete a sequence.
|
|
11487
|
+
*
|
|
11488
|
+
* @param id - The unique identifier of the sequence to delete.
|
|
11489
|
+
* @param options - Optional request-level overrides.
|
|
11490
|
+
* @returns A promise that resolves to `true` on successful deletion.
|
|
11491
|
+
*/
|
|
11492
|
+
delete: async (id, options) => {
|
|
11493
|
+
return rb.executeDelete(
|
|
11494
|
+
deleteAdminCampaignsSequencesById,
|
|
11495
|
+
{ path: { id } },
|
|
11496
|
+
options
|
|
11497
|
+
);
|
|
11498
|
+
},
|
|
11499
|
+
/**
|
|
11500
|
+
* Activate a sequence to start delivering emails to enrolled contacts.
|
|
11501
|
+
*
|
|
11502
|
+
* @param id - The unique identifier of the sequence to activate.
|
|
11503
|
+
* @param options - Optional request-level overrides.
|
|
11504
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingSequence}.
|
|
11505
|
+
*/
|
|
11506
|
+
activate: async (id, options) => {
|
|
11507
|
+
return rb.execute(
|
|
11508
|
+
patchAdminCampaignsSequencesByIdActivate,
|
|
11509
|
+
{ path: { id }, body: {} },
|
|
11510
|
+
options
|
|
11511
|
+
);
|
|
11512
|
+
},
|
|
11513
|
+
/**
|
|
11514
|
+
* Pause a running sequence, suspending all pending deliveries.
|
|
11515
|
+
*
|
|
11516
|
+
* @param id - The unique identifier of the sequence to pause.
|
|
11517
|
+
* @param options - Optional request-level overrides.
|
|
11518
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingSequence}.
|
|
11519
|
+
*/
|
|
11520
|
+
pause: async (id, options) => {
|
|
11521
|
+
return rb.execute(
|
|
11522
|
+
patchAdminCampaignsSequencesByIdPause,
|
|
11523
|
+
{ path: { id }, body: {} },
|
|
11524
|
+
options
|
|
11525
|
+
);
|
|
11526
|
+
},
|
|
11527
|
+
/**
|
|
11528
|
+
* Mark a sequence as complete, finalizing all deliveries.
|
|
11529
|
+
*
|
|
11530
|
+
* @param id - The unique identifier of the sequence to complete.
|
|
11531
|
+
* @param options - Optional request-level overrides.
|
|
11532
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingSequence}.
|
|
11533
|
+
*/
|
|
11534
|
+
complete: async (id, options) => {
|
|
11535
|
+
return rb.execute(
|
|
11536
|
+
patchAdminCampaignsSequencesByIdComplete,
|
|
11537
|
+
{ path: { id }, body: {} },
|
|
11538
|
+
options
|
|
11539
|
+
);
|
|
11540
|
+
},
|
|
11541
|
+
/**
|
|
11542
|
+
* Resume a paused sequence from where it left off.
|
|
11543
|
+
*
|
|
11544
|
+
* @param id - The unique identifier of the sequence to resume.
|
|
11545
|
+
* @param options - Optional request-level overrides.
|
|
11546
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingSequence}.
|
|
11547
|
+
*/
|
|
11548
|
+
resume: async (id, options) => {
|
|
11549
|
+
return rb.execute(
|
|
11550
|
+
patchAdminCampaignsSequencesByIdResume,
|
|
11551
|
+
{ path: { id }, body: {} },
|
|
11552
|
+
options
|
|
11553
|
+
);
|
|
11554
|
+
}
|
|
11555
|
+
},
|
|
11556
|
+
/**
|
|
11557
|
+
* Recipients -- campaign audience members.
|
|
11558
|
+
*
|
|
11559
|
+
* Each recipient represents one email address on a campaign's send list,
|
|
11560
|
+
* with optional merge fields for personalisation.
|
|
11561
|
+
*/
|
|
11562
|
+
recipients: {
|
|
11563
|
+
/**
|
|
11564
|
+
* Fetch a single recipient by its unique ID.
|
|
11565
|
+
*
|
|
11566
|
+
* @param id - The unique identifier of the recipient.
|
|
11567
|
+
* @param options - Optional request-level overrides.
|
|
11568
|
+
* @returns A promise resolving to the {@link EmailMarketingRecipient}.
|
|
11569
|
+
*/
|
|
11570
|
+
get: async (id, options) => {
|
|
11571
|
+
return rb.execute(
|
|
11572
|
+
getAdminCampaignsRecipientsById,
|
|
11573
|
+
{ path: { id } },
|
|
11574
|
+
options
|
|
11575
|
+
);
|
|
11576
|
+
},
|
|
11577
|
+
/**
|
|
11578
|
+
* List all recipients for a specific campaign.
|
|
10204
11579
|
*
|
|
10205
|
-
* @param
|
|
10206
|
-
* @
|
|
11580
|
+
* @param campaignId - The ID of the campaign whose recipients to list.
|
|
11581
|
+
* @param options - Optional pagination controls and request-level overrides.
|
|
11582
|
+
* @returns A promise resolving to an array of {@link EmailMarketingRecipient} records.
|
|
10207
11583
|
*/
|
|
10208
|
-
|
|
11584
|
+
listByCampaign: async (campaignId, options) => {
|
|
10209
11585
|
return rb.execute(
|
|
10210
|
-
|
|
10211
|
-
{
|
|
11586
|
+
getAdminCampaignsRecipientsCampaignByCampaignId,
|
|
11587
|
+
{
|
|
11588
|
+
path: { campaign_id: campaignId },
|
|
11589
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
11590
|
+
},
|
|
10212
11591
|
options
|
|
10213
11592
|
);
|
|
10214
|
-
}
|
|
11593
|
+
}
|
|
11594
|
+
},
|
|
11595
|
+
/**
|
|
11596
|
+
* Sequence Steps -- individual steps within a drip sequence.
|
|
11597
|
+
*
|
|
11598
|
+
* Each step defines a timed email delivery within a sequence, with a
|
|
11599
|
+
* delay offset and template or inline content.
|
|
11600
|
+
*/
|
|
11601
|
+
sequenceSteps: {
|
|
10215
11602
|
/**
|
|
10216
|
-
*
|
|
11603
|
+
* Fetch a single sequence step by its unique ID.
|
|
10217
11604
|
*
|
|
10218
|
-
* @param id -
|
|
10219
|
-
* @param options - Optional request
|
|
10220
|
-
* @returns
|
|
11605
|
+
* @param id - The unique identifier of the sequence step.
|
|
11606
|
+
* @param options - Optional request-level overrides.
|
|
11607
|
+
* @returns A promise resolving to the {@link EmailMarketingSequenceStep}.
|
|
10221
11608
|
*/
|
|
10222
11609
|
get: async (id, options) => {
|
|
10223
11610
|
return rb.execute(
|
|
10224
|
-
|
|
11611
|
+
getAdminCampaignsSequenceStepsById,
|
|
10225
11612
|
{ path: { id } },
|
|
10226
11613
|
options
|
|
10227
11614
|
);
|
|
10228
11615
|
},
|
|
10229
11616
|
/**
|
|
10230
|
-
*
|
|
11617
|
+
* Create a new step within a sequence.
|
|
10231
11618
|
*
|
|
10232
|
-
*
|
|
10233
|
-
*
|
|
10234
|
-
*
|
|
11619
|
+
* @param attributes - Step attributes including `sequence_id`.
|
|
11620
|
+
* @param options - Optional request-level overrides.
|
|
11621
|
+
* @returns A promise resolving to the newly created {@link EmailMarketingSequenceStep}.
|
|
11622
|
+
*/
|
|
11623
|
+
create: async (attributes, options) => {
|
|
11624
|
+
return rb.execute(
|
|
11625
|
+
postAdminCampaignsSequenceSteps,
|
|
11626
|
+
{
|
|
11627
|
+
body: {
|
|
11628
|
+
data: {
|
|
11629
|
+
type: "email-marketing-sequence-step",
|
|
11630
|
+
attributes
|
|
11631
|
+
}
|
|
11632
|
+
}
|
|
11633
|
+
},
|
|
11634
|
+
options
|
|
11635
|
+
);
|
|
11636
|
+
},
|
|
11637
|
+
/**
|
|
11638
|
+
* Update an existing sequence step's attributes (PATCH semantics).
|
|
10235
11639
|
*
|
|
10236
|
-
* @param id -
|
|
10237
|
-
* @param
|
|
10238
|
-
* @
|
|
11640
|
+
* @param id - The unique identifier of the sequence step to update.
|
|
11641
|
+
* @param attributes - Key/value map of attributes to change.
|
|
11642
|
+
* @param options - Optional request-level overrides.
|
|
11643
|
+
* @returns A promise resolving to the updated {@link EmailMarketingSequenceStep}.
|
|
10239
11644
|
*/
|
|
10240
|
-
|
|
11645
|
+
update: async (id, attributes, options) => {
|
|
10241
11646
|
return rb.execute(
|
|
10242
|
-
|
|
10243
|
-
{
|
|
11647
|
+
patchAdminCampaignsSequenceStepsById,
|
|
11648
|
+
{
|
|
11649
|
+
path: { id },
|
|
11650
|
+
body: {
|
|
11651
|
+
data: {
|
|
11652
|
+
id,
|
|
11653
|
+
type: "email-marketing-sequence-step",
|
|
11654
|
+
attributes
|
|
11655
|
+
}
|
|
11656
|
+
}
|
|
11657
|
+
},
|
|
10244
11658
|
options
|
|
10245
11659
|
);
|
|
10246
11660
|
},
|
|
10247
11661
|
/**
|
|
10248
|
-
*
|
|
11662
|
+
* Permanently delete a sequence step.
|
|
10249
11663
|
*
|
|
10250
|
-
*
|
|
10251
|
-
*
|
|
10252
|
-
*
|
|
11664
|
+
* @param id - The unique identifier of the sequence step to delete.
|
|
11665
|
+
* @param options - Optional request-level overrides.
|
|
11666
|
+
* @returns A promise that resolves to `true` on successful deletion.
|
|
11667
|
+
*/
|
|
11668
|
+
delete: async (id, options) => {
|
|
11669
|
+
return rb.executeDelete(
|
|
11670
|
+
deleteAdminCampaignsSequenceStepsById,
|
|
11671
|
+
{ path: { id } },
|
|
11672
|
+
options
|
|
11673
|
+
);
|
|
11674
|
+
},
|
|
11675
|
+
/**
|
|
11676
|
+
* List all steps in a specific sequence.
|
|
10253
11677
|
*
|
|
10254
|
-
* @param
|
|
10255
|
-
* @param options - Optional request
|
|
10256
|
-
* @returns
|
|
11678
|
+
* @param sequenceId - The ID of the sequence whose steps to list.
|
|
11679
|
+
* @param options - Optional pagination controls and request-level overrides.
|
|
11680
|
+
* @returns A promise resolving to an array of {@link EmailMarketingSequenceStep} records.
|
|
10257
11681
|
*/
|
|
10258
|
-
|
|
11682
|
+
listBySequence: async (sequenceId, options) => {
|
|
10259
11683
|
return rb.execute(
|
|
10260
|
-
|
|
10261
|
-
{
|
|
11684
|
+
getAdminCampaignsSequenceStepsSequenceBySequenceId,
|
|
11685
|
+
{
|
|
11686
|
+
path: { sequence_id: sequenceId },
|
|
11687
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
11688
|
+
},
|
|
10262
11689
|
options
|
|
10263
11690
|
);
|
|
10264
11691
|
}
|
|
@@ -10266,119 +11693,6 @@ function createWebhooksNamespace(rb) {
|
|
|
10266
11693
|
};
|
|
10267
11694
|
}
|
|
10268
11695
|
|
|
10269
|
-
// src/namespaces/campaigns.ts
|
|
10270
|
-
function createCampaignsNamespace(rb) {
|
|
10271
|
-
return {
|
|
10272
|
-
/**
|
|
10273
|
-
* Get a campaign by ID.
|
|
10274
|
-
*
|
|
10275
|
-
* @param id - The unique identifier of the campaign.
|
|
10276
|
-
* @param options - Optional request-level overrides.
|
|
10277
|
-
* @returns A promise resolving to the {@link Campaign}.
|
|
10278
|
-
*
|
|
10279
|
-
* @example
|
|
10280
|
-
* ```typescript
|
|
10281
|
-
* const admin = new GptAdmin({ apiKey: 'sk_srv_...' });
|
|
10282
|
-
* const campaign = await admin.campaigns.get('camp_abc123');
|
|
10283
|
-
* ```
|
|
10284
|
-
*/
|
|
10285
|
-
get: async (id, options) => {
|
|
10286
|
-
return rb.execute(
|
|
10287
|
-
getAdminEmailMarketingCampaignsById,
|
|
10288
|
-
{ path: { id } },
|
|
10289
|
-
options
|
|
10290
|
-
);
|
|
10291
|
-
},
|
|
10292
|
-
/**
|
|
10293
|
-
* List all campaigns for a workspace.
|
|
10294
|
-
*
|
|
10295
|
-
* @param workspaceId - The ID of the workspace to query.
|
|
10296
|
-
* @param options - Optional pagination and request options.
|
|
10297
|
-
* @returns A promise resolving to an array of {@link Campaign} records.
|
|
10298
|
-
*
|
|
10299
|
-
* @example
|
|
10300
|
-
* ```typescript
|
|
10301
|
-
* const admin = new GptAdmin({ apiKey: 'sk_srv_...' });
|
|
10302
|
-
* const campaigns = await admin.campaigns.listByWorkspace('ws_abc123');
|
|
10303
|
-
* ```
|
|
10304
|
-
*/
|
|
10305
|
-
listByWorkspace: async (workspaceId, options) => {
|
|
10306
|
-
return rb.execute(
|
|
10307
|
-
getAdminEmailMarketingCampaignsWorkspaceByWorkspaceId,
|
|
10308
|
-
{
|
|
10309
|
-
path: { workspace_id: workspaceId },
|
|
10310
|
-
...buildPageQuery(options?.page, options?.pageSize)
|
|
10311
|
-
},
|
|
10312
|
-
options
|
|
10313
|
-
);
|
|
10314
|
-
},
|
|
10315
|
-
/**
|
|
10316
|
-
* Create a new campaign.
|
|
10317
|
-
*
|
|
10318
|
-
* @param attributes - Campaign attributes including `workspace_id`, `name`, `template_id`.
|
|
10319
|
-
* @param options - Optional request-level overrides.
|
|
10320
|
-
* @returns A promise resolving to the newly created {@link Campaign}.
|
|
10321
|
-
*
|
|
10322
|
-
* @example
|
|
10323
|
-
* ```typescript
|
|
10324
|
-
* const admin = new GptAdmin({ apiKey: 'sk_srv_...' });
|
|
10325
|
-
* const campaign = await admin.campaigns.create({
|
|
10326
|
-
* workspace_id: 'ws_abc123',
|
|
10327
|
-
* name: 'Q1 Outreach',
|
|
10328
|
-
* template_id: 'tmpl_xyz',
|
|
10329
|
-
* });
|
|
10330
|
-
* ```
|
|
10331
|
-
*/
|
|
10332
|
-
create: async (attributes, options) => {
|
|
10333
|
-
return rb.execute(
|
|
10334
|
-
postAdminEmailMarketingCampaigns,
|
|
10335
|
-
{ body: { data: { type: "campaign", attributes } } },
|
|
10336
|
-
options
|
|
10337
|
-
);
|
|
10338
|
-
},
|
|
10339
|
-
/**
|
|
10340
|
-
* Trigger sending for an approved campaign.
|
|
10341
|
-
*
|
|
10342
|
-
* @param id - The ID of the campaign to send.
|
|
10343
|
-
* @param options - Optional request-level overrides.
|
|
10344
|
-
* @returns A promise resolving to the updated {@link Campaign}.
|
|
10345
|
-
*
|
|
10346
|
-
* @example
|
|
10347
|
-
* ```typescript
|
|
10348
|
-
* const admin = new GptAdmin({ apiKey: 'sk_srv_...' });
|
|
10349
|
-
* await admin.campaigns.send('camp_abc123');
|
|
10350
|
-
* ```
|
|
10351
|
-
*/
|
|
10352
|
-
send: async (id, options) => {
|
|
10353
|
-
return rb.execute(
|
|
10354
|
-
postAdminEmailMarketingCampaignsByIdSend,
|
|
10355
|
-
{ path: { id }, body: {} },
|
|
10356
|
-
options
|
|
10357
|
-
);
|
|
10358
|
-
},
|
|
10359
|
-
/**
|
|
10360
|
-
* Delete a campaign.
|
|
10361
|
-
*
|
|
10362
|
-
* @param id - The unique identifier of the campaign to delete.
|
|
10363
|
-
* @param options - Optional request-level overrides.
|
|
10364
|
-
* @returns A promise that resolves to `true` on successful deletion.
|
|
10365
|
-
*
|
|
10366
|
-
* @example
|
|
10367
|
-
* ```typescript
|
|
10368
|
-
* const admin = new GptAdmin({ apiKey: 'sk_srv_...' });
|
|
10369
|
-
* await admin.campaigns.delete('camp_abc123');
|
|
10370
|
-
* ```
|
|
10371
|
-
*/
|
|
10372
|
-
delete: async (id, options) => {
|
|
10373
|
-
return rb.executeDelete(
|
|
10374
|
-
deleteAdminEmailMarketingCampaignsById,
|
|
10375
|
-
{ path: { id } },
|
|
10376
|
-
options
|
|
10377
|
-
);
|
|
10378
|
-
}
|
|
10379
|
-
};
|
|
10380
|
-
}
|
|
10381
|
-
|
|
10382
11696
|
// src/namespaces/email.ts
|
|
10383
11697
|
function createEmailNamespace(rb) {
|
|
10384
11698
|
return {
|
|
@@ -10450,7 +11764,7 @@ function createEmailNamespace(rb) {
|
|
|
10450
11764
|
create: async (attributes, options) => {
|
|
10451
11765
|
return rb.execute(
|
|
10452
11766
|
postAdminEmailOutboundEmails,
|
|
10453
|
-
{ body: { data: { type: "
|
|
11767
|
+
{ body: { data: { type: "email-outbound-email", attributes } } },
|
|
10454
11768
|
options
|
|
10455
11769
|
);
|
|
10456
11770
|
},
|
|
@@ -10542,7 +11856,11 @@ function createEmailNamespace(rb) {
|
|
|
10542
11856
|
create: async (attributes, options) => {
|
|
10543
11857
|
return rb.execute(
|
|
10544
11858
|
postAdminEmailMarketingSenderProfiles,
|
|
10545
|
-
{
|
|
11859
|
+
{
|
|
11860
|
+
body: {
|
|
11861
|
+
data: { type: "email-marketing-sender-profile", attributes }
|
|
11862
|
+
}
|
|
11863
|
+
},
|
|
10546
11864
|
options
|
|
10547
11865
|
);
|
|
10548
11866
|
},
|
|
@@ -10567,7 +11885,9 @@ function createEmailNamespace(rb) {
|
|
|
10567
11885
|
patchAdminEmailMarketingSenderProfilesById,
|
|
10568
11886
|
{
|
|
10569
11887
|
path: { id },
|
|
10570
|
-
body: {
|
|
11888
|
+
body: {
|
|
11889
|
+
data: { id, type: "email-marketing-sender-profile", attributes }
|
|
11890
|
+
}
|
|
10571
11891
|
},
|
|
10572
11892
|
options
|
|
10573
11893
|
);
|
|
@@ -10735,7 +12055,7 @@ function createBillingNamespace(rb) {
|
|
|
10735
12055
|
body: {
|
|
10736
12056
|
data: {
|
|
10737
12057
|
id: walletId,
|
|
10738
|
-
type: "wallet",
|
|
12058
|
+
type: "wallet-public",
|
|
10739
12059
|
attributes: { plan_slug: planSlug }
|
|
10740
12060
|
}
|
|
10741
12061
|
}
|
|
@@ -10772,7 +12092,7 @@ function createBillingNamespace(rb) {
|
|
|
10772
12092
|
body: {
|
|
10773
12093
|
data: {
|
|
10774
12094
|
id: walletId,
|
|
10775
|
-
type: "wallet",
|
|
12095
|
+
type: "wallet-public",
|
|
10776
12096
|
attributes
|
|
10777
12097
|
}
|
|
10778
12098
|
}
|
|
@@ -10893,7 +12213,7 @@ function createBillingNamespace(rb) {
|
|
|
10893
12213
|
create: async (attrs, options) => {
|
|
10894
12214
|
return rb.execute(
|
|
10895
12215
|
postAdminPricingStrategies,
|
|
10896
|
-
{ body: { data: { type: "
|
|
12216
|
+
{ body: { data: { type: "pricing-strategy", attributes: attrs } } },
|
|
10897
12217
|
options
|
|
10898
12218
|
);
|
|
10899
12219
|
},
|
|
@@ -10908,7 +12228,7 @@ function createBillingNamespace(rb) {
|
|
|
10908
12228
|
patchAdminPricingStrategiesById,
|
|
10909
12229
|
{
|
|
10910
12230
|
path: { id },
|
|
10911
|
-
body: { data: { id, type: "
|
|
12231
|
+
body: { data: { id, type: "pricing-strategy", attributes: attrs } }
|
|
10912
12232
|
},
|
|
10913
12233
|
options
|
|
10914
12234
|
);
|
|
@@ -10951,7 +12271,7 @@ function createBillingNamespace(rb) {
|
|
|
10951
12271
|
postAdminTenantPricingOverrides,
|
|
10952
12272
|
{
|
|
10953
12273
|
body: {
|
|
10954
|
-
data: { type: "
|
|
12274
|
+
data: { type: "tenant-pricing-override", attributes: attrs }
|
|
10955
12275
|
}
|
|
10956
12276
|
},
|
|
10957
12277
|
options
|
|
@@ -10969,7 +12289,7 @@ function createBillingNamespace(rb) {
|
|
|
10969
12289
|
{
|
|
10970
12290
|
path: { id },
|
|
10971
12291
|
body: {
|
|
10972
|
-
data: { id, type: "
|
|
12292
|
+
data: { id, type: "tenant-pricing-override", attributes: attrs }
|
|
10973
12293
|
}
|
|
10974
12294
|
},
|
|
10975
12295
|
options
|
|
@@ -11025,7 +12345,7 @@ function createBillingNamespace(rb) {
|
|
|
11025
12345
|
return rb.execute(
|
|
11026
12346
|
postAdminWholesaleAgreements,
|
|
11027
12347
|
{
|
|
11028
|
-
body: { data: { type: "
|
|
12348
|
+
body: { data: { type: "wholesale-agreement", attributes: attrs } }
|
|
11029
12349
|
},
|
|
11030
12350
|
options
|
|
11031
12351
|
);
|
|
@@ -11042,7 +12362,7 @@ function createBillingNamespace(rb) {
|
|
|
11042
12362
|
{
|
|
11043
12363
|
path: { id },
|
|
11044
12364
|
body: {
|
|
11045
|
-
data: { id, type: "
|
|
12365
|
+
data: { id, type: "wholesale-agreement", attributes: attrs }
|
|
11046
12366
|
}
|
|
11047
12367
|
},
|
|
11048
12368
|
options
|
|
@@ -11177,7 +12497,7 @@ function createBillingNamespace(rb) {
|
|
|
11177
12497
|
postAdminFeatureDefinitions,
|
|
11178
12498
|
{
|
|
11179
12499
|
body: {
|
|
11180
|
-
data: { type: "
|
|
12500
|
+
data: { type: "feature-definition", attributes: attrs }
|
|
11181
12501
|
}
|
|
11182
12502
|
},
|
|
11183
12503
|
options
|
|
@@ -11190,7 +12510,7 @@ function createBillingNamespace(rb) {
|
|
|
11190
12510
|
{
|
|
11191
12511
|
path: { id },
|
|
11192
12512
|
body: {
|
|
11193
|
-
data: { id, type: "
|
|
12513
|
+
data: { id, type: "feature-definition", attributes: attrs }
|
|
11194
12514
|
}
|
|
11195
12515
|
},
|
|
11196
12516
|
options
|
|
@@ -11290,7 +12610,7 @@ function createBillingNamespace(rb) {
|
|
|
11290
12610
|
list: async (options) => {
|
|
11291
12611
|
const result = await rb.execute(
|
|
11292
12612
|
getAdminFeatureUsages,
|
|
11293
|
-
|
|
12613
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
11294
12614
|
options
|
|
11295
12615
|
);
|
|
11296
12616
|
return result.data ?? result;
|
|
@@ -11307,7 +12627,10 @@ function createBillingNamespace(rb) {
|
|
|
11307
12627
|
listByTenant: async (tenantId, options) => {
|
|
11308
12628
|
const result = await rb.execute(
|
|
11309
12629
|
getAdminFeatureUsagesByTenantByTenantId,
|
|
11310
|
-
{
|
|
12630
|
+
{
|
|
12631
|
+
path: { tenant_id: tenantId },
|
|
12632
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
12633
|
+
},
|
|
11311
12634
|
options
|
|
11312
12635
|
);
|
|
11313
12636
|
return result.data ?? result;
|
|
@@ -11335,7 +12658,11 @@ function createBillingNamespace(rb) {
|
|
|
11335
12658
|
* @returns A promise resolving to an array of {@link UsageEvent} objects.
|
|
11336
12659
|
*/
|
|
11337
12660
|
list: async (tenantId, filters, options) => {
|
|
11338
|
-
const
|
|
12661
|
+
const pageQuery = buildPageQuery(filters?.page, filters?.pageSize);
|
|
12662
|
+
const query = {
|
|
12663
|
+
tenant_id: tenantId,
|
|
12664
|
+
...pageQuery.query
|
|
12665
|
+
};
|
|
11339
12666
|
if (filters?.startDate) query.start_date = filters.startDate;
|
|
11340
12667
|
if (filters?.endDate) query.end_date = filters.endDate;
|
|
11341
12668
|
const result = await rb.execute(
|
|
@@ -11372,9 +12699,11 @@ function createBillingNamespace(rb) {
|
|
|
11372
12699
|
* @returns A promise resolving to an array of {@link UsageEvent} objects.
|
|
11373
12700
|
*/
|
|
11374
12701
|
listByUser: async (tenantId, userId, filters, options) => {
|
|
12702
|
+
const pageQuery = buildPageQuery(filters?.page, filters?.pageSize);
|
|
11375
12703
|
const query = {
|
|
11376
12704
|
tenant_id: tenantId,
|
|
11377
|
-
user_id: userId
|
|
12705
|
+
user_id: userId,
|
|
12706
|
+
...pageQuery.query
|
|
11378
12707
|
};
|
|
11379
12708
|
if (filters?.startDate) query.start_date = filters.startDate;
|
|
11380
12709
|
if (filters?.endDate) query.end_date = filters.endDate;
|
|
@@ -11398,7 +12727,11 @@ function createBillingNamespace(rb) {
|
|
|
11398
12727
|
* @returns A promise resolving to an array of {@link UsageEvent} objects.
|
|
11399
12728
|
*/
|
|
11400
12729
|
summary: async (tenantId, filters, options) => {
|
|
11401
|
-
const
|
|
12730
|
+
const pageQuery = buildPageQuery(filters?.page, filters?.pageSize);
|
|
12731
|
+
const query = {
|
|
12732
|
+
tenant_id: tenantId,
|
|
12733
|
+
...pageQuery.query
|
|
12734
|
+
};
|
|
11402
12735
|
if (filters?.startDate) query.start_date = filters.startDate;
|
|
11403
12736
|
if (filters?.endDate) query.end_date = filters.endDate;
|
|
11404
12737
|
const result = await rb.execute(
|
|
@@ -11678,7 +13011,7 @@ function createSocialNamespace(rb) {
|
|
|
11678
13011
|
postAdminSocialAccounts,
|
|
11679
13012
|
{
|
|
11680
13013
|
body: {
|
|
11681
|
-
data: { type: "
|
|
13014
|
+
data: { type: "social-account", attributes }
|
|
11682
13015
|
}
|
|
11683
13016
|
},
|
|
11684
13017
|
options
|
|
@@ -11691,7 +13024,7 @@ function createSocialNamespace(rb) {
|
|
|
11691
13024
|
{
|
|
11692
13025
|
path: { id },
|
|
11693
13026
|
body: {
|
|
11694
|
-
data: { type: "
|
|
13027
|
+
data: { type: "social-account", id, attributes }
|
|
11695
13028
|
}
|
|
11696
13029
|
},
|
|
11697
13030
|
options
|
|
@@ -11712,7 +13045,7 @@ function createSocialNamespace(rb) {
|
|
|
11712
13045
|
{
|
|
11713
13046
|
path: { id },
|
|
11714
13047
|
body: {
|
|
11715
|
-
data: { type: "
|
|
13048
|
+
data: { type: "social-account", id, attributes: {} }
|
|
11716
13049
|
}
|
|
11717
13050
|
},
|
|
11718
13051
|
options
|
|
@@ -11725,7 +13058,7 @@ function createSocialNamespace(rb) {
|
|
|
11725
13058
|
{
|
|
11726
13059
|
path: { id },
|
|
11727
13060
|
body: {
|
|
11728
|
-
data: { type: "
|
|
13061
|
+
data: { type: "social-account", id, attributes: {} }
|
|
11729
13062
|
}
|
|
11730
13063
|
},
|
|
11731
13064
|
options
|
|
@@ -11738,7 +13071,7 @@ function createSocialNamespace(rb) {
|
|
|
11738
13071
|
{
|
|
11739
13072
|
path: { id },
|
|
11740
13073
|
body: {
|
|
11741
|
-
data: { type: "
|
|
13074
|
+
data: { type: "social-account", id, attributes: {} }
|
|
11742
13075
|
}
|
|
11743
13076
|
},
|
|
11744
13077
|
options
|
|
@@ -11753,7 +13086,7 @@ function createSocialNamespace(rb) {
|
|
|
11753
13086
|
postAdminSocialPosts,
|
|
11754
13087
|
{
|
|
11755
13088
|
body: {
|
|
11756
|
-
data: { type: "
|
|
13089
|
+
data: { type: "social-post", attributes }
|
|
11757
13090
|
}
|
|
11758
13091
|
},
|
|
11759
13092
|
options
|
|
@@ -11770,7 +13103,7 @@ function createSocialNamespace(rb) {
|
|
|
11770
13103
|
{
|
|
11771
13104
|
path: { id },
|
|
11772
13105
|
body: {
|
|
11773
|
-
data: { type: "
|
|
13106
|
+
data: { type: "social-post", id, attributes }
|
|
11774
13107
|
}
|
|
11775
13108
|
},
|
|
11776
13109
|
options
|
|
@@ -11792,7 +13125,7 @@ function createSocialNamespace(rb) {
|
|
|
11792
13125
|
path: { id },
|
|
11793
13126
|
body: {
|
|
11794
13127
|
data: {
|
|
11795
|
-
type: "
|
|
13128
|
+
type: "social-post",
|
|
11796
13129
|
id,
|
|
11797
13130
|
attributes: { scheduled_at: scheduledAt }
|
|
11798
13131
|
}
|
|
@@ -11808,7 +13141,7 @@ function createSocialNamespace(rb) {
|
|
|
11808
13141
|
{
|
|
11809
13142
|
path: { id },
|
|
11810
13143
|
body: {
|
|
11811
|
-
data: { type: "
|
|
13144
|
+
data: { type: "social-post", id, attributes: {} }
|
|
11812
13145
|
}
|
|
11813
13146
|
},
|
|
11814
13147
|
options
|
|
@@ -11821,7 +13154,7 @@ function createSocialNamespace(rb) {
|
|
|
11821
13154
|
{
|
|
11822
13155
|
path: { id },
|
|
11823
13156
|
body: {
|
|
11824
|
-
data: { type: "
|
|
13157
|
+
data: { type: "social-post", id, attributes: {} }
|
|
11825
13158
|
}
|
|
11826
13159
|
},
|
|
11827
13160
|
options
|
|
@@ -11834,7 +13167,7 @@ function createSocialNamespace(rb) {
|
|
|
11834
13167
|
{
|
|
11835
13168
|
path: { id },
|
|
11836
13169
|
body: {
|
|
11837
|
-
data: { type: "
|
|
13170
|
+
data: { type: "social-post", id, attributes: {} }
|
|
11838
13171
|
}
|
|
11839
13172
|
},
|
|
11840
13173
|
options
|
|
@@ -11847,7 +13180,7 @@ function createSocialNamespace(rb) {
|
|
|
11847
13180
|
{
|
|
11848
13181
|
path: { id },
|
|
11849
13182
|
body: {
|
|
11850
|
-
data: { type: "
|
|
13183
|
+
data: { type: "social-post", id, attributes }
|
|
11851
13184
|
}
|
|
11852
13185
|
},
|
|
11853
13186
|
options
|
|
@@ -11935,13 +13268,17 @@ function createSocialNamespace(rb) {
|
|
|
11935
13268
|
options
|
|
11936
13269
|
);
|
|
11937
13270
|
},
|
|
11938
|
-
/**
|
|
13271
|
+
/**
|
|
13272
|
+
* Create a new social campaign.
|
|
13273
|
+
* Workspace is resolved from the authenticated actor's context — do NOT
|
|
13274
|
+
* pass `workspace_id` in attributes.
|
|
13275
|
+
*/
|
|
11939
13276
|
create: async (attributes, options) => {
|
|
11940
13277
|
return rb.execute(
|
|
11941
13278
|
postAdminSocialCampaigns,
|
|
11942
13279
|
{
|
|
11943
13280
|
body: {
|
|
11944
|
-
data: { type: "
|
|
13281
|
+
data: { type: "social-campaign", attributes }
|
|
11945
13282
|
}
|
|
11946
13283
|
},
|
|
11947
13284
|
options
|
|
@@ -11954,7 +13291,7 @@ function createSocialNamespace(rb) {
|
|
|
11954
13291
|
{
|
|
11955
13292
|
path: { id },
|
|
11956
13293
|
body: {
|
|
11957
|
-
data: { type: "
|
|
13294
|
+
data: { type: "social-campaign", id, attributes }
|
|
11958
13295
|
}
|
|
11959
13296
|
},
|
|
11960
13297
|
options
|
|
@@ -11976,7 +13313,7 @@ function createSocialNamespace(rb) {
|
|
|
11976
13313
|
path: { id },
|
|
11977
13314
|
body: {
|
|
11978
13315
|
data: {
|
|
11979
|
-
type: "
|
|
13316
|
+
type: "social-campaign",
|
|
11980
13317
|
id,
|
|
11981
13318
|
attributes: { scheduled_at: scheduledAt }
|
|
11982
13319
|
}
|
|
@@ -11992,7 +13329,7 @@ function createSocialNamespace(rb) {
|
|
|
11992
13329
|
{
|
|
11993
13330
|
path: { id },
|
|
11994
13331
|
body: {
|
|
11995
|
-
data: { type: "
|
|
13332
|
+
data: { type: "social-campaign", id, attributes: {} }
|
|
11996
13333
|
}
|
|
11997
13334
|
},
|
|
11998
13335
|
options
|
|
@@ -12263,7 +13600,7 @@ function createConnectorsNamespace(rb) {
|
|
|
12263
13600
|
/** Create a connector instance. */
|
|
12264
13601
|
create: async (attributes, options) => rb.execute(
|
|
12265
13602
|
postAdminConnectors,
|
|
12266
|
-
{ body: { data: { type: "
|
|
13603
|
+
{ body: { data: { type: "connector-instance", attributes } } },
|
|
12267
13604
|
options
|
|
12268
13605
|
),
|
|
12269
13606
|
/** Update a connector instance. */
|
|
@@ -12271,7 +13608,7 @@ function createConnectorsNamespace(rb) {
|
|
|
12271
13608
|
patchAdminConnectorsById,
|
|
12272
13609
|
{
|
|
12273
13610
|
path: { id },
|
|
12274
|
-
body: { data: { type: "
|
|
13611
|
+
body: { data: { type: "connector-instance", id, attributes } }
|
|
12275
13612
|
},
|
|
12276
13613
|
options
|
|
12277
13614
|
),
|
|
@@ -12311,7 +13648,7 @@ function createConnectorsNamespace(rb) {
|
|
|
12311
13648
|
{
|
|
12312
13649
|
body: {
|
|
12313
13650
|
data: {
|
|
12314
|
-
type: "
|
|
13651
|
+
type: "connector-instance",
|
|
12315
13652
|
connector_type: connectorType,
|
|
12316
13653
|
workspace_id: workspaceId
|
|
12317
13654
|
}
|
|
@@ -12325,7 +13662,7 @@ function createConnectorsNamespace(rb) {
|
|
|
12325
13662
|
{
|
|
12326
13663
|
body: {
|
|
12327
13664
|
data: {
|
|
12328
|
-
type: "
|
|
13665
|
+
type: "connector-instance",
|
|
12329
13666
|
connector_type: connectorType,
|
|
12330
13667
|
code,
|
|
12331
13668
|
state,
|
|
@@ -12357,7 +13694,7 @@ function createConnectorsNamespace(rb) {
|
|
|
12357
13694
|
create: async (attributes, options) => rb.execute(
|
|
12358
13695
|
postAdminConnectorsOauthAppConfigs,
|
|
12359
13696
|
{
|
|
12360
|
-
body: { data: { type: "
|
|
13697
|
+
body: { data: { type: "oauth-app-config", attributes } }
|
|
12361
13698
|
},
|
|
12362
13699
|
options
|
|
12363
13700
|
),
|
|
@@ -12366,7 +13703,7 @@ function createConnectorsNamespace(rb) {
|
|
|
12366
13703
|
patchAdminConnectorsOauthAppConfigsById,
|
|
12367
13704
|
{
|
|
12368
13705
|
path: { id },
|
|
12369
|
-
body: { data: { type: "
|
|
13706
|
+
body: { data: { type: "oauth-app-config", id, attributes } }
|
|
12370
13707
|
},
|
|
12371
13708
|
options
|
|
12372
13709
|
),
|
|
@@ -12460,7 +13797,7 @@ function createCrawlerNamespace(rb) {
|
|
|
12460
13797
|
create: async (attributes, options) => {
|
|
12461
13798
|
return rb.execute(
|
|
12462
13799
|
postAdminCrawlerJobs,
|
|
12463
|
-
{ body: { data: { type: "
|
|
13800
|
+
{ body: { data: { type: "crawler-job", attributes } } },
|
|
12464
13801
|
options
|
|
12465
13802
|
);
|
|
12466
13803
|
},
|
|
@@ -12505,7 +13842,7 @@ function createCrawlerNamespace(rb) {
|
|
|
12505
13842
|
postAdminCrawlerSchedules,
|
|
12506
13843
|
{
|
|
12507
13844
|
body: {
|
|
12508
|
-
data: { type: "
|
|
13845
|
+
data: { type: "crawler-schedule", attributes }
|
|
12509
13846
|
}
|
|
12510
13847
|
},
|
|
12511
13848
|
options
|
|
@@ -12518,7 +13855,7 @@ function createCrawlerNamespace(rb) {
|
|
|
12518
13855
|
{
|
|
12519
13856
|
path: { id },
|
|
12520
13857
|
body: {
|
|
12521
|
-
data: { id, type: "
|
|
13858
|
+
data: { id, type: "crawler-schedule", attributes }
|
|
12522
13859
|
}
|
|
12523
13860
|
},
|
|
12524
13861
|
options
|
|
@@ -12596,7 +13933,7 @@ function createCrawlerNamespace(rb) {
|
|
|
12596
13933
|
postAdminCrawlerSiteConfigs,
|
|
12597
13934
|
{
|
|
12598
13935
|
body: {
|
|
12599
|
-
data: { type: "
|
|
13936
|
+
data: { type: "crawler-site-config", attributes }
|
|
12600
13937
|
}
|
|
12601
13938
|
},
|
|
12602
13939
|
options
|
|
@@ -12609,7 +13946,7 @@ function createCrawlerNamespace(rb) {
|
|
|
12609
13946
|
{
|
|
12610
13947
|
path: { id },
|
|
12611
13948
|
body: {
|
|
12612
|
-
data: { id, type: "
|
|
13949
|
+
data: { id, type: "crawler-site-config", attributes }
|
|
12613
13950
|
}
|
|
12614
13951
|
},
|
|
12615
13952
|
options
|
|
@@ -12679,7 +14016,7 @@ function createExtractionNamespace(rb) {
|
|
|
12679
14016
|
{
|
|
12680
14017
|
path: { id },
|
|
12681
14018
|
body: {
|
|
12682
|
-
data: { id, type: "
|
|
14019
|
+
data: { id, type: "extraction-document", attributes }
|
|
12683
14020
|
}
|
|
12684
14021
|
},
|
|
12685
14022
|
options
|
|
@@ -12740,7 +14077,7 @@ function createExtractionNamespace(rb) {
|
|
|
12740
14077
|
{
|
|
12741
14078
|
path: { id },
|
|
12742
14079
|
body: {
|
|
12743
|
-
data: { id, type: "
|
|
14080
|
+
data: { id, type: "extraction-document", attributes }
|
|
12744
14081
|
}
|
|
12745
14082
|
},
|
|
12746
14083
|
options
|
|
@@ -12776,7 +14113,7 @@ function createExtractionNamespace(rb) {
|
|
|
12776
14113
|
postAdminExtractionDocumentsBeginUpload,
|
|
12777
14114
|
{
|
|
12778
14115
|
body: {
|
|
12779
|
-
data: { type: "
|
|
14116
|
+
data: { type: "presigned-url", attributes }
|
|
12780
14117
|
}
|
|
12781
14118
|
},
|
|
12782
14119
|
options
|
|
@@ -12788,7 +14125,7 @@ function createExtractionNamespace(rb) {
|
|
|
12788
14125
|
postAdminExtractionDocumentsFindOrBeginUpload,
|
|
12789
14126
|
{
|
|
12790
14127
|
body: {
|
|
12791
|
-
data: { type: "
|
|
14128
|
+
data: { type: "presigned-url", attributes }
|
|
12792
14129
|
}
|
|
12793
14130
|
},
|
|
12794
14131
|
options
|
|
@@ -12800,7 +14137,7 @@ function createExtractionNamespace(rb) {
|
|
|
12800
14137
|
postAdminExtractionDocumentsUpload,
|
|
12801
14138
|
{
|
|
12802
14139
|
body: {
|
|
12803
|
-
data: { type: "
|
|
14140
|
+
data: { type: "extraction-document", attributes }
|
|
12804
14141
|
}
|
|
12805
14142
|
},
|
|
12806
14143
|
options
|
|
@@ -12813,7 +14150,7 @@ function createExtractionNamespace(rb) {
|
|
|
12813
14150
|
{
|
|
12814
14151
|
body: {
|
|
12815
14152
|
data: {
|
|
12816
|
-
type: "
|
|
14153
|
+
type: "bulk-reprocess-result",
|
|
12817
14154
|
attributes: { ids }
|
|
12818
14155
|
}
|
|
12819
14156
|
}
|
|
@@ -12827,7 +14164,7 @@ function createExtractionNamespace(rb) {
|
|
|
12827
14164
|
postAdminDocumentsBulkDelete,
|
|
12828
14165
|
{
|
|
12829
14166
|
body: {
|
|
12830
|
-
data: { type: "
|
|
14167
|
+
data: { type: "bulk-delete", attributes: { ids } }
|
|
12831
14168
|
}
|
|
12832
14169
|
},
|
|
12833
14170
|
options
|
|
@@ -12922,7 +14259,7 @@ function createExtractionNamespace(rb) {
|
|
|
12922
14259
|
{
|
|
12923
14260
|
path: { id },
|
|
12924
14261
|
body: {
|
|
12925
|
-
data: { id, type: "
|
|
14262
|
+
data: { id, type: "extraction-result", attributes }
|
|
12926
14263
|
}
|
|
12927
14264
|
},
|
|
12928
14265
|
options
|
|
@@ -12967,7 +14304,7 @@ function createExtractionNamespace(rb) {
|
|
|
12967
14304
|
{
|
|
12968
14305
|
path: { id },
|
|
12969
14306
|
body: {
|
|
12970
|
-
data: { id, type: "
|
|
14307
|
+
data: { id, type: "extraction-result", attributes }
|
|
12971
14308
|
}
|
|
12972
14309
|
},
|
|
12973
14310
|
options
|
|
@@ -12980,7 +14317,7 @@ function createExtractionNamespace(rb) {
|
|
|
12980
14317
|
{
|
|
12981
14318
|
path: { id },
|
|
12982
14319
|
body: {
|
|
12983
|
-
data: { id, type: "
|
|
14320
|
+
data: { id, type: "extraction-result", attributes }
|
|
12984
14321
|
}
|
|
12985
14322
|
},
|
|
12986
14323
|
options
|
|
@@ -13019,7 +14356,7 @@ function createExtractionNamespace(rb) {
|
|
|
13019
14356
|
postAdminExtractionBatches,
|
|
13020
14357
|
{
|
|
13021
14358
|
body: {
|
|
13022
|
-
data: { type: "
|
|
14359
|
+
data: { type: "extraction-batch", attributes }
|
|
13023
14360
|
}
|
|
13024
14361
|
},
|
|
13025
14362
|
options
|
|
@@ -13059,7 +14396,7 @@ function createExtractionNamespace(rb) {
|
|
|
13059
14396
|
{
|
|
13060
14397
|
path: { workspace_id: workspaceId },
|
|
13061
14398
|
body: {
|
|
13062
|
-
data: { type: "
|
|
14399
|
+
data: { type: "extraction-export", attributes }
|
|
13063
14400
|
}
|
|
13064
14401
|
},
|
|
13065
14402
|
options
|
|
@@ -13090,7 +14427,7 @@ function createExtractionNamespace(rb) {
|
|
|
13090
14427
|
postAdminExtractionWorkflows,
|
|
13091
14428
|
{
|
|
13092
14429
|
body: {
|
|
13093
|
-
data: { type: "
|
|
14430
|
+
data: { type: "extraction-workflow", attributes }
|
|
13094
14431
|
}
|
|
13095
14432
|
},
|
|
13096
14433
|
options
|
|
@@ -13111,7 +14448,7 @@ function createExtractionNamespace(rb) {
|
|
|
13111
14448
|
{
|
|
13112
14449
|
path: { id },
|
|
13113
14450
|
body: {
|
|
13114
|
-
data: { id, type: "
|
|
14451
|
+
data: { id, type: "extraction-workflow", attributes }
|
|
13115
14452
|
}
|
|
13116
14453
|
},
|
|
13117
14454
|
options
|
|
@@ -13142,7 +14479,7 @@ function createExtractionNamespace(rb) {
|
|
|
13142
14479
|
postAdminExtractionConfigEnums,
|
|
13143
14480
|
{
|
|
13144
14481
|
body: {
|
|
13145
|
-
data: { type: "
|
|
14482
|
+
data: { type: "config-enum", attributes }
|
|
13146
14483
|
}
|
|
13147
14484
|
},
|
|
13148
14485
|
options
|
|
@@ -13163,7 +14500,7 @@ function createExtractionNamespace(rb) {
|
|
|
13163
14500
|
{
|
|
13164
14501
|
path: { id },
|
|
13165
14502
|
body: {
|
|
13166
|
-
data: { id, type: "
|
|
14503
|
+
data: { id, type: "config-enum", attributes }
|
|
13167
14504
|
}
|
|
13168
14505
|
},
|
|
13169
14506
|
options
|
|
@@ -13178,7 +14515,7 @@ function createExtractionNamespace(rb) {
|
|
|
13178
14515
|
postAdminExtractionSchemaDiscoveries,
|
|
13179
14516
|
{
|
|
13180
14517
|
body: {
|
|
13181
|
-
data: { type: "
|
|
14518
|
+
data: { type: "schema-discovery", attributes }
|
|
13182
14519
|
}
|
|
13183
14520
|
},
|
|
13184
14521
|
options
|
|
@@ -13198,7 +14535,7 @@ function createExtractionNamespace(rb) {
|
|
|
13198
14535
|
postAdminExtractionSchemaDiscoveriesBootstrap,
|
|
13199
14536
|
{
|
|
13200
14537
|
body: {
|
|
13201
|
-
data: { type: "
|
|
14538
|
+
data: { type: "schema-discovery", attributes }
|
|
13202
14539
|
}
|
|
13203
14540
|
},
|
|
13204
14541
|
options
|
|
@@ -13222,7 +14559,7 @@ function createExtractionNamespace(rb) {
|
|
|
13222
14559
|
{
|
|
13223
14560
|
path: { workspace_id: workspaceId, document_id: documentId },
|
|
13224
14561
|
body: {
|
|
13225
|
-
data: { type: "
|
|
14562
|
+
data: { type: "field-mapping-result", attributes }
|
|
13226
14563
|
}
|
|
13227
14564
|
},
|
|
13228
14565
|
options
|
|
@@ -13253,7 +14590,7 @@ function createExtractionNamespace(rb) {
|
|
|
13253
14590
|
postAdminExtractionShadowComparisons,
|
|
13254
14591
|
{
|
|
13255
14592
|
body: {
|
|
13256
|
-
data: { type: "
|
|
14593
|
+
data: { type: "shadow-comparison", attributes }
|
|
13257
14594
|
}
|
|
13258
14595
|
},
|
|
13259
14596
|
options
|
|
@@ -13366,7 +14703,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13366
14703
|
create: async (attributes, options) => {
|
|
13367
14704
|
return rb.execute(
|
|
13368
14705
|
postAdminSchedulingLocations,
|
|
13369
|
-
{ body: { data: { type: "
|
|
14706
|
+
{ body: { data: { type: "scheduling-location", attributes } } },
|
|
13370
14707
|
options
|
|
13371
14708
|
);
|
|
13372
14709
|
},
|
|
@@ -13377,7 +14714,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13377
14714
|
{
|
|
13378
14715
|
path: { id },
|
|
13379
14716
|
body: {
|
|
13380
|
-
data: { id, type: "
|
|
14717
|
+
data: { id, type: "scheduling-location", attributes }
|
|
13381
14718
|
}
|
|
13382
14719
|
},
|
|
13383
14720
|
options
|
|
@@ -13392,7 +14729,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13392
14729
|
body: {
|
|
13393
14730
|
data: {
|
|
13394
14731
|
id,
|
|
13395
|
-
type: "
|
|
14732
|
+
type: "scheduling-location",
|
|
13396
14733
|
attributes: { is_active: false }
|
|
13397
14734
|
}
|
|
13398
14735
|
}
|
|
@@ -13423,7 +14760,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13423
14760
|
create: async (attributes, options) => {
|
|
13424
14761
|
return rb.execute(
|
|
13425
14762
|
postAdminSchedulingEventTypes,
|
|
13426
|
-
{ body: { data: { type: "
|
|
14763
|
+
{ body: { data: { type: "scheduling-event-type", attributes } } },
|
|
13427
14764
|
options
|
|
13428
14765
|
);
|
|
13429
14766
|
},
|
|
@@ -13434,20 +14771,36 @@ function createSchedulingNamespace(rb) {
|
|
|
13434
14771
|
{
|
|
13435
14772
|
path: { id },
|
|
13436
14773
|
body: {
|
|
13437
|
-
data: { id, type: "
|
|
14774
|
+
data: { id, type: "scheduling-event-type", attributes }
|
|
13438
14775
|
}
|
|
13439
14776
|
},
|
|
13440
14777
|
options
|
|
13441
14778
|
);
|
|
14779
|
+
},
|
|
14780
|
+
/** Archive an event type. */
|
|
14781
|
+
archive: async (id, options) => {
|
|
14782
|
+
return rb.execute(
|
|
14783
|
+
patchAdminSchedulingEventTypesByIdArchive,
|
|
14784
|
+
{ path: { id }, body: {} },
|
|
14785
|
+
options
|
|
14786
|
+
);
|
|
14787
|
+
},
|
|
14788
|
+
/** Get an event type by its public slug. */
|
|
14789
|
+
getBySlug: async (slug, workspaceId, options) => {
|
|
14790
|
+
return rb.execute(
|
|
14791
|
+
getAdminSchedulingEventTypesBySlug,
|
|
14792
|
+
{ query: { slug, workspace_id: workspaceId } },
|
|
14793
|
+
options
|
|
14794
|
+
);
|
|
13442
14795
|
}
|
|
13443
14796
|
},
|
|
13444
14797
|
/** Events — scheduled occurrences between workspace members. */
|
|
13445
14798
|
events: {
|
|
13446
|
-
/** List events. */
|
|
13447
|
-
list: async (options) => {
|
|
14799
|
+
/** List events in a workspace. */
|
|
14800
|
+
list: async (workspaceId, options) => {
|
|
13448
14801
|
return rb.execute(
|
|
13449
14802
|
getAdminSchedulingEvents,
|
|
13450
|
-
{},
|
|
14803
|
+
{ query: { workspace_id: workspaceId } },
|
|
13451
14804
|
options
|
|
13452
14805
|
);
|
|
13453
14806
|
},
|
|
@@ -13463,7 +14816,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13463
14816
|
create: async (attributes, options) => {
|
|
13464
14817
|
return rb.execute(
|
|
13465
14818
|
postAdminSchedulingEvents,
|
|
13466
|
-
{ body: { data: { type: "
|
|
14819
|
+
{ body: { data: { type: "scheduling-event", attributes } } },
|
|
13467
14820
|
options
|
|
13468
14821
|
);
|
|
13469
14822
|
},
|
|
@@ -13473,7 +14826,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13473
14826
|
patchAdminSchedulingEventsById,
|
|
13474
14827
|
{
|
|
13475
14828
|
path: { id },
|
|
13476
|
-
body: { data: { id, type: "
|
|
14829
|
+
body: { data: { id, type: "scheduling-event", attributes } }
|
|
13477
14830
|
},
|
|
13478
14831
|
options
|
|
13479
14832
|
);
|
|
@@ -13484,7 +14837,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13484
14837
|
patchAdminSchedulingEventsByIdCancel,
|
|
13485
14838
|
{
|
|
13486
14839
|
path: { id },
|
|
13487
|
-
body: attributes ? { data: { type: "
|
|
14840
|
+
body: attributes ? { data: { type: "scheduling-event", attributes } } : {}
|
|
13488
14841
|
},
|
|
13489
14842
|
options
|
|
13490
14843
|
);
|
|
@@ -13503,7 +14856,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13503
14856
|
patchAdminSchedulingEventsByIdReschedule,
|
|
13504
14857
|
{
|
|
13505
14858
|
path: { id },
|
|
13506
|
-
body: { data: { type: "
|
|
14859
|
+
body: { data: { type: "scheduling-event", attributes } }
|
|
13507
14860
|
},
|
|
13508
14861
|
options
|
|
13509
14862
|
);
|
|
@@ -13555,7 +14908,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13555
14908
|
postAdminSchedulingParticipants,
|
|
13556
14909
|
{
|
|
13557
14910
|
body: {
|
|
13558
|
-
data: { type: "
|
|
14911
|
+
data: { type: "scheduling-participant", attributes }
|
|
13559
14912
|
}
|
|
13560
14913
|
},
|
|
13561
14914
|
options
|
|
@@ -13568,7 +14921,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13568
14921
|
{
|
|
13569
14922
|
path: { id },
|
|
13570
14923
|
body: {
|
|
13571
|
-
data: { id, type: "
|
|
14924
|
+
data: { id, type: "scheduling-participant", attributes }
|
|
13572
14925
|
}
|
|
13573
14926
|
},
|
|
13574
14927
|
options
|
|
@@ -13582,7 +14935,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13582
14935
|
path: { id },
|
|
13583
14936
|
body: {
|
|
13584
14937
|
data: {
|
|
13585
|
-
type: "
|
|
14938
|
+
type: "scheduling-participant",
|
|
13586
14939
|
attributes: { status }
|
|
13587
14940
|
}
|
|
13588
14941
|
}
|
|
@@ -13623,7 +14976,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13623
14976
|
postAdminSchedulingAvailabilityRules,
|
|
13624
14977
|
{
|
|
13625
14978
|
body: {
|
|
13626
|
-
data: { type: "
|
|
14979
|
+
data: { type: "scheduling-availability-rule", attributes }
|
|
13627
14980
|
}
|
|
13628
14981
|
},
|
|
13629
14982
|
options
|
|
@@ -13638,7 +14991,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13638
14991
|
body: {
|
|
13639
14992
|
data: {
|
|
13640
14993
|
id,
|
|
13641
|
-
type: "
|
|
14994
|
+
type: "scheduling-availability-rule",
|
|
13642
14995
|
attributes
|
|
13643
14996
|
}
|
|
13644
14997
|
}
|
|
@@ -13653,6 +15006,22 @@ function createSchedulingNamespace(rb) {
|
|
|
13653
15006
|
{ path: { id } },
|
|
13654
15007
|
options
|
|
13655
15008
|
);
|
|
15009
|
+
},
|
|
15010
|
+
/** List availability rules for a specific user. */
|
|
15011
|
+
listByUser: async (userId, options) => {
|
|
15012
|
+
return rb.execute(
|
|
15013
|
+
getAdminSchedulingAvailabilityRulesByUser,
|
|
15014
|
+
{ query: { user_id: userId } },
|
|
15015
|
+
options
|
|
15016
|
+
);
|
|
15017
|
+
},
|
|
15018
|
+
/** List availability rules for a specific event type. */
|
|
15019
|
+
listByEventType: async (eventTypeId, options) => {
|
|
15020
|
+
return rb.execute(
|
|
15021
|
+
getAdminSchedulingAvailabilityRulesByEventType,
|
|
15022
|
+
{ query: { event_type_id: eventTypeId } },
|
|
15023
|
+
options
|
|
15024
|
+
);
|
|
13656
15025
|
}
|
|
13657
15026
|
},
|
|
13658
15027
|
/** Bookings — external party appointment requests. */
|
|
@@ -13677,7 +15046,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13677
15046
|
create: async (attributes, options) => {
|
|
13678
15047
|
return rb.execute(
|
|
13679
15048
|
postAdminSchedulingBookings,
|
|
13680
|
-
{ body: { data: { type: "
|
|
15049
|
+
{ body: { data: { type: "scheduling-booking", attributes } } },
|
|
13681
15050
|
options
|
|
13682
15051
|
);
|
|
13683
15052
|
},
|
|
@@ -13695,7 +15064,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13695
15064
|
patchAdminSchedulingBookingsByIdCancel,
|
|
13696
15065
|
{
|
|
13697
15066
|
path: { id },
|
|
13698
|
-
body: attributes ? { data: { type: "
|
|
15067
|
+
body: attributes ? { data: { type: "scheduling-booking", attributes } } : {}
|
|
13699
15068
|
},
|
|
13700
15069
|
options
|
|
13701
15070
|
);
|
|
@@ -13706,7 +15075,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13706
15075
|
patchAdminSchedulingBookingsByIdReschedule,
|
|
13707
15076
|
{
|
|
13708
15077
|
path: { id },
|
|
13709
|
-
body: { data: { type: "
|
|
15078
|
+
body: { data: { type: "scheduling-booking", attributes } }
|
|
13710
15079
|
},
|
|
13711
15080
|
options
|
|
13712
15081
|
);
|
|
@@ -13718,6 +15087,14 @@ function createSchedulingNamespace(rb) {
|
|
|
13718
15087
|
{ path: { id }, body: {} },
|
|
13719
15088
|
options
|
|
13720
15089
|
);
|
|
15090
|
+
},
|
|
15091
|
+
/** List bookings by booker email address. */
|
|
15092
|
+
listByBooker: async (email, options) => {
|
|
15093
|
+
return rb.execute(
|
|
15094
|
+
getAdminSchedulingBookingsByBooker,
|
|
15095
|
+
{ query: { booker_email: email } },
|
|
15096
|
+
options
|
|
15097
|
+
);
|
|
13721
15098
|
}
|
|
13722
15099
|
},
|
|
13723
15100
|
/** Reminders — scheduled notifications tied to events. */
|
|
@@ -13742,7 +15119,15 @@ function createSchedulingNamespace(rb) {
|
|
|
13742
15119
|
create: async (attributes, options) => {
|
|
13743
15120
|
return rb.execute(
|
|
13744
15121
|
postAdminSchedulingReminders,
|
|
13745
|
-
{ body: { data: { type: "
|
|
15122
|
+
{ body: { data: { type: "scheduling-reminder", attributes } } },
|
|
15123
|
+
options
|
|
15124
|
+
);
|
|
15125
|
+
},
|
|
15126
|
+
/** Cancel a pending reminder. */
|
|
15127
|
+
cancel: async (id, options) => {
|
|
15128
|
+
return rb.execute(
|
|
15129
|
+
patchAdminSchedulingRemindersByIdCancel,
|
|
15130
|
+
{ path: { id }, body: {} },
|
|
13746
15131
|
options
|
|
13747
15132
|
);
|
|
13748
15133
|
}
|
|
@@ -13771,7 +15156,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13771
15156
|
postAdminSchedulingCalendarSyncs,
|
|
13772
15157
|
{
|
|
13773
15158
|
body: {
|
|
13774
|
-
data: { type: "
|
|
15159
|
+
data: { type: "scheduling-calendar-sync", attributes }
|
|
13775
15160
|
}
|
|
13776
15161
|
},
|
|
13777
15162
|
options
|
|
@@ -13784,7 +15169,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13784
15169
|
{
|
|
13785
15170
|
path: { id },
|
|
13786
15171
|
body: {
|
|
13787
|
-
data: { id, type: "
|
|
15172
|
+
data: { id, type: "scheduling-calendar-sync", attributes }
|
|
13788
15173
|
}
|
|
13789
15174
|
},
|
|
13790
15175
|
options
|
|
@@ -13846,7 +15231,7 @@ function createCrmNamespace(rb) {
|
|
|
13846
15231
|
create: async (attributes, options) => {
|
|
13847
15232
|
return rb.execute(
|
|
13848
15233
|
postAdminCrmContacts,
|
|
13849
|
-
{ body: { data: { type: "
|
|
15234
|
+
{ body: { data: { type: "crm-contact", attributes } } },
|
|
13850
15235
|
options
|
|
13851
15236
|
);
|
|
13852
15237
|
},
|
|
@@ -13856,7 +15241,7 @@ function createCrmNamespace(rb) {
|
|
|
13856
15241
|
patchAdminCrmContactsById,
|
|
13857
15242
|
{
|
|
13858
15243
|
path: { id },
|
|
13859
|
-
body: { data: { type: "
|
|
15244
|
+
body: { data: { type: "crm-contact", id, attributes } }
|
|
13860
15245
|
},
|
|
13861
15246
|
options
|
|
13862
15247
|
);
|
|
@@ -13867,7 +15252,7 @@ function createCrmNamespace(rb) {
|
|
|
13867
15252
|
patchAdminCrmContactsByIdArchive,
|
|
13868
15253
|
{
|
|
13869
15254
|
path: { id },
|
|
13870
|
-
body: { data: { type: "
|
|
15255
|
+
body: { data: { type: "crm-contact", id, attributes: {} } }
|
|
13871
15256
|
},
|
|
13872
15257
|
options
|
|
13873
15258
|
);
|
|
@@ -13878,7 +15263,7 @@ function createCrmNamespace(rb) {
|
|
|
13878
15263
|
postAdminCrmContactsByIdUnarchive,
|
|
13879
15264
|
{
|
|
13880
15265
|
path: { id },
|
|
13881
|
-
body: { data: { type: "
|
|
15266
|
+
body: { data: { type: "crm-contact", id } }
|
|
13882
15267
|
},
|
|
13883
15268
|
options
|
|
13884
15269
|
);
|
|
@@ -13905,7 +15290,7 @@ function createCrmNamespace(rb) {
|
|
|
13905
15290
|
create: async (attributes, options) => {
|
|
13906
15291
|
return rb.execute(
|
|
13907
15292
|
postAdminCrmCompanies,
|
|
13908
|
-
{ body: { data: { type: "
|
|
15293
|
+
{ body: { data: { type: "crm-company", attributes } } },
|
|
13909
15294
|
options
|
|
13910
15295
|
);
|
|
13911
15296
|
},
|
|
@@ -13915,7 +15300,7 @@ function createCrmNamespace(rb) {
|
|
|
13915
15300
|
patchAdminCrmCompaniesById,
|
|
13916
15301
|
{
|
|
13917
15302
|
path: { id },
|
|
13918
|
-
body: { data: { type: "
|
|
15303
|
+
body: { data: { type: "crm-company", id, attributes } }
|
|
13919
15304
|
},
|
|
13920
15305
|
options
|
|
13921
15306
|
);
|
|
@@ -13947,7 +15332,7 @@ function createCrmNamespace(rb) {
|
|
|
13947
15332
|
create: async (attributes, options) => {
|
|
13948
15333
|
return rb.execute(
|
|
13949
15334
|
postAdminCrmDeals,
|
|
13950
|
-
{ body: { data: { type: "
|
|
15335
|
+
{ body: { data: { type: "crm-deal", attributes } } },
|
|
13951
15336
|
options
|
|
13952
15337
|
);
|
|
13953
15338
|
},
|
|
@@ -13957,7 +15342,7 @@ function createCrmNamespace(rb) {
|
|
|
13957
15342
|
patchAdminCrmDealsById,
|
|
13958
15343
|
{
|
|
13959
15344
|
path: { id },
|
|
13960
|
-
body: { data: { type: "
|
|
15345
|
+
body: { data: { type: "crm-deal", id, attributes } }
|
|
13961
15346
|
},
|
|
13962
15347
|
options
|
|
13963
15348
|
);
|
|
@@ -13968,7 +15353,7 @@ function createCrmNamespace(rb) {
|
|
|
13968
15353
|
patchAdminCrmDealsByIdMoveStage,
|
|
13969
15354
|
{
|
|
13970
15355
|
path: { id },
|
|
13971
|
-
body: { data: { type: "
|
|
15356
|
+
body: { data: { type: "crm-deal", id, attributes } }
|
|
13972
15357
|
},
|
|
13973
15358
|
options
|
|
13974
15359
|
);
|
|
@@ -13996,7 +15381,7 @@ function createCrmNamespace(rb) {
|
|
|
13996
15381
|
create: async (attributes, options) => {
|
|
13997
15382
|
return rb.execute(
|
|
13998
15383
|
postAdminCrmActivities,
|
|
13999
|
-
{ body: { data: { type: "
|
|
15384
|
+
{ body: { data: { type: "crm-activity", attributes } } },
|
|
14000
15385
|
options
|
|
14001
15386
|
);
|
|
14002
15387
|
},
|
|
@@ -14006,7 +15391,7 @@ function createCrmNamespace(rb) {
|
|
|
14006
15391
|
patchAdminCrmActivitiesById,
|
|
14007
15392
|
{
|
|
14008
15393
|
path: { id },
|
|
14009
|
-
body: { data: { type: "
|
|
15394
|
+
body: { data: { type: "crm-activity", id, attributes } }
|
|
14010
15395
|
},
|
|
14011
15396
|
options
|
|
14012
15397
|
);
|
|
@@ -14038,7 +15423,7 @@ function createCrmNamespace(rb) {
|
|
|
14038
15423
|
create: async (attributes, options) => {
|
|
14039
15424
|
return rb.execute(
|
|
14040
15425
|
postAdminCrmPipelines,
|
|
14041
|
-
{ body: { data: { type: "
|
|
15426
|
+
{ body: { data: { type: "crm-pipeline", attributes } } },
|
|
14042
15427
|
options
|
|
14043
15428
|
);
|
|
14044
15429
|
},
|
|
@@ -14048,7 +15433,7 @@ function createCrmNamespace(rb) {
|
|
|
14048
15433
|
patchAdminCrmPipelinesById,
|
|
14049
15434
|
{
|
|
14050
15435
|
path: { id },
|
|
14051
|
-
body: { data: { type: "
|
|
15436
|
+
body: { data: { type: "crm-pipeline", id, attributes } }
|
|
14052
15437
|
},
|
|
14053
15438
|
options
|
|
14054
15439
|
);
|
|
@@ -14084,7 +15469,7 @@ function createCrmNamespace(rb) {
|
|
|
14084
15469
|
create: async (attributes, options) => {
|
|
14085
15470
|
return rb.execute(
|
|
14086
15471
|
postAdminCrmPipelineStages,
|
|
14087
|
-
{ body: { data: { type: "
|
|
15472
|
+
{ body: { data: { type: "crm-pipeline-stage", attributes } } },
|
|
14088
15473
|
options
|
|
14089
15474
|
);
|
|
14090
15475
|
},
|
|
@@ -14094,7 +15479,7 @@ function createCrmNamespace(rb) {
|
|
|
14094
15479
|
patchAdminCrmPipelineStagesById,
|
|
14095
15480
|
{
|
|
14096
15481
|
path: { id },
|
|
14097
|
-
body: { data: { type: "
|
|
15482
|
+
body: { data: { type: "crm-pipeline-stage", id, attributes } }
|
|
14098
15483
|
},
|
|
14099
15484
|
options
|
|
14100
15485
|
);
|
|
@@ -14130,7 +15515,7 @@ function createCrmNamespace(rb) {
|
|
|
14130
15515
|
create: async (attributes, options) => {
|
|
14131
15516
|
return rb.execute(
|
|
14132
15517
|
postAdminCrmRelationships,
|
|
14133
|
-
{ body: { data: { type: "
|
|
15518
|
+
{ body: { data: { type: "crm-relationship", attributes } } },
|
|
14134
15519
|
options
|
|
14135
15520
|
);
|
|
14136
15521
|
},
|
|
@@ -14161,7 +15546,7 @@ function createCrmNamespace(rb) {
|
|
|
14161
15546
|
create: async (attributes, options) => {
|
|
14162
15547
|
return rb.execute(
|
|
14163
15548
|
postAdminCrmRelationshipTypes,
|
|
14164
|
-
{ body: { data: { type: "
|
|
15549
|
+
{ body: { data: { type: "crm-relationship-type", attributes } } },
|
|
14165
15550
|
options
|
|
14166
15551
|
);
|
|
14167
15552
|
},
|
|
@@ -14171,7 +15556,7 @@ function createCrmNamespace(rb) {
|
|
|
14171
15556
|
patchAdminCrmRelationshipTypesById,
|
|
14172
15557
|
{
|
|
14173
15558
|
path: { id },
|
|
14174
|
-
body: { data: { type: "
|
|
15559
|
+
body: { data: { type: "crm-relationship-type", id, attributes } }
|
|
14175
15560
|
},
|
|
14176
15561
|
options
|
|
14177
15562
|
);
|
|
@@ -14207,7 +15592,7 @@ function createCrmNamespace(rb) {
|
|
|
14207
15592
|
create: async (attributes, options) => {
|
|
14208
15593
|
return rb.execute(
|
|
14209
15594
|
postAdminCrmCustomEntities,
|
|
14210
|
-
{ body: { data: { type: "
|
|
15595
|
+
{ body: { data: { type: "crm-custom-entity", attributes } } },
|
|
14211
15596
|
options
|
|
14212
15597
|
);
|
|
14213
15598
|
},
|
|
@@ -14217,7 +15602,7 @@ function createCrmNamespace(rb) {
|
|
|
14217
15602
|
patchAdminCrmCustomEntitiesById,
|
|
14218
15603
|
{
|
|
14219
15604
|
path: { id },
|
|
14220
|
-
body: { data: { type: "
|
|
15605
|
+
body: { data: { type: "crm-custom-entity", id, attributes } }
|
|
14221
15606
|
},
|
|
14222
15607
|
options
|
|
14223
15608
|
);
|
|
@@ -14265,7 +15650,7 @@ function createCrmNamespace(rb) {
|
|
|
14265
15650
|
create: async (attributes, options) => {
|
|
14266
15651
|
return rb.execute(
|
|
14267
15652
|
postAdminCrmDealProducts,
|
|
14268
|
-
{ body: { data: { type: "
|
|
15653
|
+
{ body: { data: { type: "crm-deal-product", attributes } } },
|
|
14269
15654
|
options
|
|
14270
15655
|
);
|
|
14271
15656
|
},
|
|
@@ -14296,7 +15681,7 @@ function createCrmNamespace(rb) {
|
|
|
14296
15681
|
create: async (attributes, options) => {
|
|
14297
15682
|
return rb.execute(
|
|
14298
15683
|
postAdminCrmExports,
|
|
14299
|
-
{ body: { data: { type: "
|
|
15684
|
+
{ body: { data: { type: "crm-data-export-job", attributes } } },
|
|
14300
15685
|
options
|
|
14301
15686
|
);
|
|
14302
15687
|
},
|
|
@@ -14306,7 +15691,7 @@ function createCrmNamespace(rb) {
|
|
|
14306
15691
|
patchAdminCrmExportsByIdRefreshUrl,
|
|
14307
15692
|
{
|
|
14308
15693
|
path: { id },
|
|
14309
|
-
body: { data: { type: "
|
|
15694
|
+
body: { data: { type: "crm-data-export-job", id, attributes: {} } }
|
|
14310
15695
|
},
|
|
14311
15696
|
options
|
|
14312
15697
|
);
|
|
@@ -14334,7 +15719,7 @@ function createCrmNamespace(rb) {
|
|
|
14334
15719
|
create: async (attributes, options) => {
|
|
14335
15720
|
return rb.execute(
|
|
14336
15721
|
postAdminIsvCrmEntityTypes,
|
|
14337
|
-
{ body: { data: { type: "
|
|
15722
|
+
{ body: { data: { type: "crm-custom-entity-type", attributes } } },
|
|
14338
15723
|
options
|
|
14339
15724
|
);
|
|
14340
15725
|
},
|
|
@@ -14344,7 +15729,7 @@ function createCrmNamespace(rb) {
|
|
|
14344
15729
|
patchAdminIsvCrmEntityTypesById,
|
|
14345
15730
|
{
|
|
14346
15731
|
path: { id },
|
|
14347
|
-
body: { data: { type: "
|
|
15732
|
+
body: { data: { type: "crm-custom-entity-type", id, attributes } }
|
|
14348
15733
|
},
|
|
14349
15734
|
options
|
|
14350
15735
|
);
|
|
@@ -14381,7 +15766,7 @@ function createCrmNamespace(rb) {
|
|
|
14381
15766
|
return rb.execute(
|
|
14382
15767
|
postAdminCrmFieldDefinitions,
|
|
14383
15768
|
{
|
|
14384
|
-
body: { data: { type: "
|
|
15769
|
+
body: { data: { type: "crm-custom-field-definition", attributes } }
|
|
14385
15770
|
},
|
|
14386
15771
|
options
|
|
14387
15772
|
);
|
|
@@ -14393,7 +15778,7 @@ function createCrmNamespace(rb) {
|
|
|
14393
15778
|
{
|
|
14394
15779
|
path: { id },
|
|
14395
15780
|
body: {
|
|
14396
|
-
data: { type: "
|
|
15781
|
+
data: { type: "crm-custom-field-definition", id, attributes }
|
|
14397
15782
|
}
|
|
14398
15783
|
},
|
|
14399
15784
|
options
|
|
@@ -14423,7 +15808,7 @@ function createCrmNamespace(rb) {
|
|
|
14423
15808
|
return rb.execute(
|
|
14424
15809
|
postAdminIsvCrmChannelCaptureConfig,
|
|
14425
15810
|
{
|
|
14426
|
-
body: { data: { type: "
|
|
15811
|
+
body: { data: { type: "crm-channel-capture-config", attributes } }
|
|
14427
15812
|
},
|
|
14428
15813
|
options
|
|
14429
15814
|
);
|
|
@@ -14435,7 +15820,7 @@ function createCrmNamespace(rb) {
|
|
|
14435
15820
|
{
|
|
14436
15821
|
path: { id },
|
|
14437
15822
|
body: {
|
|
14438
|
-
data: { type: "
|
|
15823
|
+
data: { type: "crm-channel-capture-config", id, attributes }
|
|
14439
15824
|
}
|
|
14440
15825
|
},
|
|
14441
15826
|
options
|
|
@@ -14456,7 +15841,7 @@ function createCrmNamespace(rb) {
|
|
|
14456
15841
|
create: async (attributes, options) => {
|
|
14457
15842
|
return rb.execute(
|
|
14458
15843
|
postAdminCrmSyncConfigs,
|
|
14459
|
-
{ body: { data: { type: "
|
|
15844
|
+
{ body: { data: { type: "crm-sync-config", attributes } } },
|
|
14460
15845
|
options
|
|
14461
15846
|
);
|
|
14462
15847
|
},
|
|
@@ -14466,7 +15851,7 @@ function createCrmNamespace(rb) {
|
|
|
14466
15851
|
patchAdminCrmSyncConfigsById,
|
|
14467
15852
|
{
|
|
14468
15853
|
path: { id },
|
|
14469
|
-
body: { data: { type: "
|
|
15854
|
+
body: { data: { type: "crm-sync-config", id, attributes } }
|
|
14470
15855
|
},
|
|
14471
15856
|
options
|
|
14472
15857
|
);
|
|
@@ -14508,7 +15893,7 @@ function createSupportNamespace(rb) {
|
|
|
14508
15893
|
create: async (attributes, options) => {
|
|
14509
15894
|
return rb.execute(
|
|
14510
15895
|
postAdminSupportTickets,
|
|
14511
|
-
{ body: { data: { type: "
|
|
15896
|
+
{ body: { data: { type: "support-ticket", attributes } } },
|
|
14512
15897
|
options
|
|
14513
15898
|
);
|
|
14514
15899
|
},
|
|
@@ -14518,7 +15903,7 @@ function createSupportNamespace(rb) {
|
|
|
14518
15903
|
patchAdminSupportTicketsById,
|
|
14519
15904
|
{
|
|
14520
15905
|
path: { id },
|
|
14521
|
-
body: { data: { type: "
|
|
15906
|
+
body: { data: { type: "support-ticket", id, attributes } }
|
|
14522
15907
|
},
|
|
14523
15908
|
options
|
|
14524
15909
|
);
|
|
@@ -14529,7 +15914,7 @@ function createSupportNamespace(rb) {
|
|
|
14529
15914
|
patchAdminSupportTicketsByIdAssign,
|
|
14530
15915
|
{
|
|
14531
15916
|
path: { id },
|
|
14532
|
-
body: { data: { type: "
|
|
15917
|
+
body: { data: { type: "support-ticket", id, attributes } }
|
|
14533
15918
|
},
|
|
14534
15919
|
options
|
|
14535
15920
|
);
|
|
@@ -14540,7 +15925,7 @@ function createSupportNamespace(rb) {
|
|
|
14540
15925
|
patchAdminSupportTicketsByIdResolve,
|
|
14541
15926
|
{
|
|
14542
15927
|
path: { id },
|
|
14543
|
-
body: { data: { type: "
|
|
15928
|
+
body: { data: { type: "support-ticket", id, attributes } }
|
|
14544
15929
|
},
|
|
14545
15930
|
options
|
|
14546
15931
|
);
|
|
@@ -14551,7 +15936,7 @@ function createSupportNamespace(rb) {
|
|
|
14551
15936
|
patchAdminSupportTicketsByIdClose,
|
|
14552
15937
|
{
|
|
14553
15938
|
path: { id },
|
|
14554
|
-
body: { data: { type: "
|
|
15939
|
+
body: { data: { type: "support-ticket", id, attributes } }
|
|
14555
15940
|
},
|
|
14556
15941
|
options
|
|
14557
15942
|
);
|
|
@@ -14562,7 +15947,7 @@ function createSupportNamespace(rb) {
|
|
|
14562
15947
|
patchAdminSupportTicketsByIdReopen,
|
|
14563
15948
|
{
|
|
14564
15949
|
path: { id },
|
|
14565
|
-
body: { data: { type: "
|
|
15950
|
+
body: { data: { type: "support-ticket", id, attributes } }
|
|
14566
15951
|
},
|
|
14567
15952
|
options
|
|
14568
15953
|
);
|
|
@@ -14573,7 +15958,7 @@ function createSupportNamespace(rb) {
|
|
|
14573
15958
|
patchAdminSupportTicketsByIdMerge,
|
|
14574
15959
|
{
|
|
14575
15960
|
path: { id },
|
|
14576
|
-
body: { data: { type: "
|
|
15961
|
+
body: { data: { type: "support-ticket", id, attributes } }
|
|
14577
15962
|
},
|
|
14578
15963
|
options
|
|
14579
15964
|
);
|
|
@@ -14601,7 +15986,7 @@ function createSupportNamespace(rb) {
|
|
|
14601
15986
|
create: async (attributes, options) => {
|
|
14602
15987
|
return rb.execute(
|
|
14603
15988
|
postAdminSupportTicketMessages,
|
|
14604
|
-
{ body: { data: { type: "
|
|
15989
|
+
{ body: { data: { type: "support-ticket-message", attributes } } },
|
|
14605
15990
|
options
|
|
14606
15991
|
);
|
|
14607
15992
|
}
|
|
@@ -14620,7 +16005,7 @@ function createSupportNamespace(rb) {
|
|
|
14620
16005
|
create: async (attributes, options) => {
|
|
14621
16006
|
return rb.execute(
|
|
14622
16007
|
postAdminSupportTicketAttachments,
|
|
14623
|
-
{ body: { data: { type: "
|
|
16008
|
+
{ body: { data: { type: "support-ticket-attachment", attributes } } },
|
|
14624
16009
|
options
|
|
14625
16010
|
);
|
|
14626
16011
|
}
|
|
@@ -14631,7 +16016,7 @@ function createSupportNamespace(rb) {
|
|
|
14631
16016
|
create: async (attributes, options) => {
|
|
14632
16017
|
return rb.execute(
|
|
14633
16018
|
postAdminSupportTicketRatings,
|
|
14634
|
-
{ body: { data: { type: "
|
|
16019
|
+
{ body: { data: { type: "support-ticket-rating", attributes } } },
|
|
14635
16020
|
options
|
|
14636
16021
|
);
|
|
14637
16022
|
}
|
|
@@ -14650,7 +16035,7 @@ function createSupportNamespace(rb) {
|
|
|
14650
16035
|
create: async (attributes, options) => {
|
|
14651
16036
|
return rb.execute(
|
|
14652
16037
|
postAdminSupportTags,
|
|
14653
|
-
{ body: { data: { type: "
|
|
16038
|
+
{ body: { data: { type: "support-tag", attributes } } },
|
|
14654
16039
|
options
|
|
14655
16040
|
);
|
|
14656
16041
|
},
|
|
@@ -14681,7 +16066,7 @@ function createSupportNamespace(rb) {
|
|
|
14681
16066
|
create: async (attributes, options) => {
|
|
14682
16067
|
return rb.execute(
|
|
14683
16068
|
postAdminSupportQueues,
|
|
14684
|
-
{ body: { data: { type: "
|
|
16069
|
+
{ body: { data: { type: "support-queue", attributes } } },
|
|
14685
16070
|
options
|
|
14686
16071
|
);
|
|
14687
16072
|
},
|
|
@@ -14691,7 +16076,7 @@ function createSupportNamespace(rb) {
|
|
|
14691
16076
|
patchAdminSupportQueuesById,
|
|
14692
16077
|
{
|
|
14693
16078
|
path: { id },
|
|
14694
|
-
body: { data: { type: "
|
|
16079
|
+
body: { data: { type: "support-queue", id, attributes } }
|
|
14695
16080
|
},
|
|
14696
16081
|
options
|
|
14697
16082
|
);
|
|
@@ -14727,7 +16112,7 @@ function createSupportNamespace(rb) {
|
|
|
14727
16112
|
create: async (attributes, options) => {
|
|
14728
16113
|
return rb.execute(
|
|
14729
16114
|
postAdminSupportQueueMembers,
|
|
14730
|
-
{ body: { data: { type: "
|
|
16115
|
+
{ body: { data: { type: "support-queue-member", attributes } } },
|
|
14731
16116
|
options
|
|
14732
16117
|
);
|
|
14733
16118
|
},
|
|
@@ -14737,7 +16122,7 @@ function createSupportNamespace(rb) {
|
|
|
14737
16122
|
patchAdminSupportQueueMembersById,
|
|
14738
16123
|
{
|
|
14739
16124
|
path: { id },
|
|
14740
|
-
body: { data: { type: "
|
|
16125
|
+
body: { data: { type: "support-queue-member", id, attributes } }
|
|
14741
16126
|
},
|
|
14742
16127
|
options
|
|
14743
16128
|
);
|
|
@@ -14773,7 +16158,7 @@ function createSupportNamespace(rb) {
|
|
|
14773
16158
|
create: async (attributes, options) => {
|
|
14774
16159
|
return rb.execute(
|
|
14775
16160
|
postAdminSupportRoutingRules,
|
|
14776
|
-
{ body: { data: { type: "
|
|
16161
|
+
{ body: { data: { type: "support-routing-rule", attributes } } },
|
|
14777
16162
|
options
|
|
14778
16163
|
);
|
|
14779
16164
|
},
|
|
@@ -14783,7 +16168,7 @@ function createSupportNamespace(rb) {
|
|
|
14783
16168
|
patchAdminSupportRoutingRulesById,
|
|
14784
16169
|
{
|
|
14785
16170
|
path: { id },
|
|
14786
|
-
body: { data: { type: "
|
|
16171
|
+
body: { data: { type: "support-routing-rule", id, attributes } }
|
|
14787
16172
|
},
|
|
14788
16173
|
options
|
|
14789
16174
|
);
|
|
@@ -14819,7 +16204,7 @@ function createSupportNamespace(rb) {
|
|
|
14819
16204
|
create: async (attributes, options) => {
|
|
14820
16205
|
return rb.execute(
|
|
14821
16206
|
postAdminSupportSlaPolicies,
|
|
14822
|
-
{ body: { data: { type: "
|
|
16207
|
+
{ body: { data: { type: "support-sla-policy", attributes } } },
|
|
14823
16208
|
options
|
|
14824
16209
|
);
|
|
14825
16210
|
},
|
|
@@ -14829,7 +16214,7 @@ function createSupportNamespace(rb) {
|
|
|
14829
16214
|
patchAdminSupportSlaPoliciesById,
|
|
14830
16215
|
{
|
|
14831
16216
|
path: { id },
|
|
14832
|
-
body: { data: { type: "
|
|
16217
|
+
body: { data: { type: "support-sla-policy", id, attributes } }
|
|
14833
16218
|
},
|
|
14834
16219
|
options
|
|
14835
16220
|
);
|
|
@@ -14857,7 +16242,7 @@ function createSupportNamespace(rb) {
|
|
|
14857
16242
|
upsert: async (attributes, options) => {
|
|
14858
16243
|
return rb.execute(
|
|
14859
16244
|
postAdminSupportAiConfigs,
|
|
14860
|
-
{ body: { data: { type: "
|
|
16245
|
+
{ body: { data: { type: "support-ai-config", attributes } } },
|
|
14861
16246
|
options
|
|
14862
16247
|
);
|
|
14863
16248
|
}
|
|
@@ -14878,7 +16263,7 @@ function createSupportNamespace(rb) {
|
|
|
14878
16263
|
postAdminSupportChannelCaptureConfigs,
|
|
14879
16264
|
{
|
|
14880
16265
|
body: {
|
|
14881
|
-
data: { type: "
|
|
16266
|
+
data: { type: "support-channel-capture-config", attributes }
|
|
14882
16267
|
}
|
|
14883
16268
|
},
|
|
14884
16269
|
options
|
|
@@ -14899,7 +16284,7 @@ function createSupportNamespace(rb) {
|
|
|
14899
16284
|
create: async (attributes, options) => {
|
|
14900
16285
|
return rb.execute(
|
|
14901
16286
|
postAdminSupportSyncConfigs,
|
|
14902
|
-
{ body: { data: { type: "
|
|
16287
|
+
{ body: { data: { type: "support-sync-config", attributes } } },
|
|
14903
16288
|
options
|
|
14904
16289
|
);
|
|
14905
16290
|
},
|
|
@@ -14909,7 +16294,7 @@ function createSupportNamespace(rb) {
|
|
|
14909
16294
|
patchAdminSupportSyncConfigsById,
|
|
14910
16295
|
{
|
|
14911
16296
|
path: { id },
|
|
14912
|
-
body: { data: { type: "
|
|
16297
|
+
body: { data: { type: "support-sync-config", id, attributes } }
|
|
14913
16298
|
},
|
|
14914
16299
|
options
|
|
14915
16300
|
);
|
|
@@ -14937,7 +16322,7 @@ function createSupportNamespace(rb) {
|
|
|
14937
16322
|
create: async (attributes, options) => {
|
|
14938
16323
|
return rb.execute(
|
|
14939
16324
|
postAdminSupportCannedResponses,
|
|
14940
|
-
{ body: { data: { type: "
|
|
16325
|
+
{ body: { data: { type: "support-canned-response", attributes } } },
|
|
14941
16326
|
options
|
|
14942
16327
|
);
|
|
14943
16328
|
},
|
|
@@ -14947,7 +16332,7 @@ function createSupportNamespace(rb) {
|
|
|
14947
16332
|
patchAdminSupportCannedResponsesById,
|
|
14948
16333
|
{
|
|
14949
16334
|
path: { id },
|
|
14950
|
-
body: { data: { type: "
|
|
16335
|
+
body: { data: { type: "support-canned-response", id, attributes } }
|
|
14951
16336
|
},
|
|
14952
16337
|
options
|
|
14953
16338
|
);
|
|
@@ -15399,7 +16784,7 @@ function createComplianceNamespace(rb) {
|
|
|
15399
16784
|
create: async (attributes, options) => {
|
|
15400
16785
|
return rb.execute(
|
|
15401
16786
|
postAdminLegalDocuments,
|
|
15402
|
-
{ body: { data: { type: "
|
|
16787
|
+
{ body: { data: { type: "legal-document", attributes } } },
|
|
15403
16788
|
options
|
|
15404
16789
|
);
|
|
15405
16790
|
},
|
|
@@ -15423,7 +16808,7 @@ function createComplianceNamespace(rb) {
|
|
|
15423
16808
|
patchAdminLegalDocumentsById,
|
|
15424
16809
|
{
|
|
15425
16810
|
path: { id },
|
|
15426
|
-
body: { data: { type: "
|
|
16811
|
+
body: { data: { type: "legal-document", id, attributes } }
|
|
15427
16812
|
},
|
|
15428
16813
|
options
|
|
15429
16814
|
);
|
|
@@ -15501,7 +16886,7 @@ function createComplianceNamespace(rb) {
|
|
|
15501
16886
|
patchAdminLegalDocumentsByIdPublish,
|
|
15502
16887
|
{
|
|
15503
16888
|
path: { id },
|
|
15504
|
-
body: { data: { type: "
|
|
16889
|
+
body: { data: { type: "legal-document", id, attributes: {} } }
|
|
15505
16890
|
},
|
|
15506
16891
|
options
|
|
15507
16892
|
);
|
|
@@ -15523,7 +16908,7 @@ function createComplianceNamespace(rb) {
|
|
|
15523
16908
|
patchAdminLegalDocumentsByIdUnpublish,
|
|
15524
16909
|
{
|
|
15525
16910
|
path: { id },
|
|
15526
|
-
body: { data: { type: "
|
|
16911
|
+
body: { data: { type: "legal-document", id, attributes: {} } }
|
|
15527
16912
|
},
|
|
15528
16913
|
options
|
|
15529
16914
|
);
|
|
@@ -15580,6 +16965,25 @@ function createPipelinesNamespace(rb) {
|
|
|
15580
16965
|
async get(id, options) {
|
|
15581
16966
|
return rb.execute(getAdminPipelinesById, { path: { id } }, options);
|
|
15582
16967
|
},
|
|
16968
|
+
/**
|
|
16969
|
+
* Get a pipeline by its system slug, scoped to an application.
|
|
16970
|
+
*
|
|
16971
|
+
* @param slug - Pipeline system slug.
|
|
16972
|
+
* @param options - Optional request options.
|
|
16973
|
+
* @returns Pipeline resource, or not-found error.
|
|
16974
|
+
*
|
|
16975
|
+
* @example
|
|
16976
|
+
* ```typescript
|
|
16977
|
+
* const pipeline = await admin.pipelines.getBySlug("post-session-documentation");
|
|
16978
|
+
* ```
|
|
16979
|
+
*/
|
|
16980
|
+
async getBySlug(slug, options) {
|
|
16981
|
+
return rb.execute(
|
|
16982
|
+
getAdminPipelinesBySlugBySlug,
|
|
16983
|
+
{ path: { slug } },
|
|
16984
|
+
options
|
|
16985
|
+
);
|
|
16986
|
+
},
|
|
15583
16987
|
/**
|
|
15584
16988
|
* Create a new pipeline.
|
|
15585
16989
|
*
|
|
@@ -15725,7 +17129,7 @@ function createPipelineExecutionsNamespace(rb) {
|
|
|
15725
17129
|
{
|
|
15726
17130
|
path: { id },
|
|
15727
17131
|
body: {
|
|
15728
|
-
data: { type: "
|
|
17132
|
+
data: { type: "pipeline-execution", id, attributes: {} }
|
|
15729
17133
|
}
|
|
15730
17134
|
},
|
|
15731
17135
|
options
|
|
@@ -15744,7 +17148,7 @@ function createPipelineExecutionsNamespace(rb) {
|
|
|
15744
17148
|
{
|
|
15745
17149
|
path: { id },
|
|
15746
17150
|
body: {
|
|
15747
|
-
data: { type: "
|
|
17151
|
+
data: { type: "pipeline-execution", id, attributes: {} }
|
|
15748
17152
|
}
|
|
15749
17153
|
},
|
|
15750
17154
|
options
|
|
@@ -15765,7 +17169,7 @@ function createPipelineExecutionsNamespace(rb) {
|
|
|
15765
17169
|
{
|
|
15766
17170
|
path: { id },
|
|
15767
17171
|
body: {
|
|
15768
|
-
data: { type: "
|
|
17172
|
+
data: { type: "pipeline-execution", id, attributes }
|
|
15769
17173
|
}
|
|
15770
17174
|
},
|
|
15771
17175
|
options
|
|
@@ -15786,7 +17190,7 @@ function createPipelineExecutionsNamespace(rb) {
|
|
|
15786
17190
|
path: { id },
|
|
15787
17191
|
body: {
|
|
15788
17192
|
data: {
|
|
15789
|
-
type: "
|
|
17193
|
+
type: "pipeline-execution",
|
|
15790
17194
|
id,
|
|
15791
17195
|
attributes: { checkpoint_notes: note }
|
|
15792
17196
|
}
|
|
@@ -15811,7 +17215,7 @@ function createPipelineExecutionsNamespace(rb) {
|
|
|
15811
17215
|
path: { id },
|
|
15812
17216
|
body: {
|
|
15813
17217
|
data: {
|
|
15814
|
-
type: "
|
|
17218
|
+
type: "pipeline-execution",
|
|
15815
17219
|
id,
|
|
15816
17220
|
attributes: { node_id: nodeId, instruction }
|
|
15817
17221
|
}
|
|
@@ -16639,10 +18043,13 @@ function createThreadsNamespace(rb) {
|
|
|
16639
18043
|
* const fork = await admin.threads.fork('thr_01HXYZ...');
|
|
16640
18044
|
* ```
|
|
16641
18045
|
*/
|
|
16642
|
-
fork: async (id, options) => {
|
|
18046
|
+
fork: async (id, title, options) => {
|
|
16643
18047
|
return rb.execute(
|
|
16644
18048
|
postAdminThreadsByIdFork,
|
|
16645
|
-
{
|
|
18049
|
+
{
|
|
18050
|
+
path: { id },
|
|
18051
|
+
body: title ? { data: { type: "chat-thread", attributes: { title } } } : {}
|
|
18052
|
+
},
|
|
16646
18053
|
options
|
|
16647
18054
|
);
|
|
16648
18055
|
},
|
|
@@ -16726,7 +18133,7 @@ function createThreadsNamespace(rb) {
|
|
|
16726
18133
|
);
|
|
16727
18134
|
},
|
|
16728
18135
|
/**
|
|
16729
|
-
* Sub-namespace for
|
|
18136
|
+
* Sub-namespace for managing messages within a thread.
|
|
16730
18137
|
*/
|
|
16731
18138
|
messages: {
|
|
16732
18139
|
/**
|
|
@@ -16748,6 +18155,36 @@ function createThreadsNamespace(rb) {
|
|
|
16748
18155
|
{ path: { id: threadId } },
|
|
16749
18156
|
options
|
|
16750
18157
|
);
|
|
18158
|
+
},
|
|
18159
|
+
/**
|
|
18160
|
+
* Sends a message to a thread and triggers AI processing.
|
|
18161
|
+
*
|
|
18162
|
+
* @param threadId - The UUID of the thread.
|
|
18163
|
+
* @param content - The message content to send.
|
|
18164
|
+
* @param attributes - Optional extra attributes (role, metadata, attachments).
|
|
18165
|
+
* @param options - Optional request options.
|
|
18166
|
+
* @returns A promise resolving to the thread with the AI response.
|
|
18167
|
+
*
|
|
18168
|
+
* @example
|
|
18169
|
+
* ```typescript
|
|
18170
|
+
* const admin = new GptAdmin({ apiKey: 'sk_srv_...' });
|
|
18171
|
+
* const result = await admin.threads.messages.send('thr_01HXYZ...', 'Analyze this data');
|
|
18172
|
+
* ```
|
|
18173
|
+
*/
|
|
18174
|
+
send: async (threadId, content, attributes, options) => {
|
|
18175
|
+
return rb.execute(
|
|
18176
|
+
postAdminThreadsByIdMessages,
|
|
18177
|
+
{
|
|
18178
|
+
path: { id: threadId },
|
|
18179
|
+
body: {
|
|
18180
|
+
data: {
|
|
18181
|
+
type: "chat-thread",
|
|
18182
|
+
attributes: { content, ...attributes }
|
|
18183
|
+
}
|
|
18184
|
+
}
|
|
18185
|
+
},
|
|
18186
|
+
options
|
|
18187
|
+
);
|
|
16751
18188
|
}
|
|
16752
18189
|
}
|
|
16753
18190
|
};
|
|
@@ -19156,7 +20593,7 @@ function createBrandIdentitiesNamespace(rb) {
|
|
|
19156
20593
|
create: async (attributes, options) => {
|
|
19157
20594
|
return rb.execute(
|
|
19158
20595
|
postAdminBrandIdentities,
|
|
19159
|
-
{ body: { data: { type: "
|
|
20596
|
+
{ body: { data: { type: "brand-identity", attributes } } },
|
|
19160
20597
|
options
|
|
19161
20598
|
);
|
|
19162
20599
|
},
|
|
@@ -19180,7 +20617,7 @@ function createBrandIdentitiesNamespace(rb) {
|
|
|
19180
20617
|
patchAdminBrandIdentitiesById,
|
|
19181
20618
|
{
|
|
19182
20619
|
path: { id },
|
|
19183
|
-
body: { data: { id, type: "
|
|
20620
|
+
body: { data: { id, type: "brand-identity", attributes } }
|
|
19184
20621
|
},
|
|
19185
20622
|
options
|
|
19186
20623
|
);
|
|
@@ -19297,7 +20734,7 @@ function createBrandIdentitiesNamespace(rb) {
|
|
|
19297
20734
|
patchAdminBrandIdentitiesByIdSetDefault,
|
|
19298
20735
|
{
|
|
19299
20736
|
path: { id },
|
|
19300
|
-
body: { data: { id, type: "
|
|
20737
|
+
body: { data: { id, type: "brand-identity", attributes: {} } }
|
|
19301
20738
|
},
|
|
19302
20739
|
options
|
|
19303
20740
|
);
|
|
@@ -19319,7 +20756,7 @@ function createBrandIdentitiesNamespace(rb) {
|
|
|
19319
20756
|
patchAdminBrandIdentitiesByIdUnsetDefault,
|
|
19320
20757
|
{
|
|
19321
20758
|
path: { id },
|
|
19322
|
-
body: { data: { id, type: "
|
|
20759
|
+
body: { data: { id, type: "brand-identity", attributes: {} } }
|
|
19323
20760
|
},
|
|
19324
20761
|
options
|
|
19325
20762
|
);
|
|
@@ -19381,7 +20818,7 @@ function createPlatformTonesNamespace(rb) {
|
|
|
19381
20818
|
create: async (attributes, options) => {
|
|
19382
20819
|
return rb.execute(
|
|
19383
20820
|
postAdminPlatformTones,
|
|
19384
|
-
{ body: { data: { type: "
|
|
20821
|
+
{ body: { data: { type: "platform-tone", attributes } } },
|
|
19385
20822
|
options
|
|
19386
20823
|
);
|
|
19387
20824
|
},
|
|
@@ -19405,7 +20842,7 @@ function createPlatformTonesNamespace(rb) {
|
|
|
19405
20842
|
patchAdminPlatformTonesById,
|
|
19406
20843
|
{
|
|
19407
20844
|
path: { id },
|
|
19408
|
-
body: { data: { id, type: "
|
|
20845
|
+
body: { data: { id, type: "platform-tone", attributes } }
|
|
19409
20846
|
},
|
|
19410
20847
|
options
|
|
19411
20848
|
);
|
|
@@ -19452,11 +20889,23 @@ function createPlatformTonesNamespace(rb) {
|
|
|
19452
20889
|
}
|
|
19453
20890
|
|
|
19454
20891
|
// src/namespaces/channels.ts
|
|
20892
|
+
function mapResponse(raw) {
|
|
20893
|
+
return {
|
|
20894
|
+
channelToken: raw.channel_token,
|
|
20895
|
+
expiresAt: raw.expires_at,
|
|
20896
|
+
channels: raw.channels,
|
|
20897
|
+
workspaceId: raw.workspace_id
|
|
20898
|
+
};
|
|
20899
|
+
}
|
|
19455
20900
|
function createChannelsNamespace(rb) {
|
|
19456
20901
|
return {
|
|
19457
20902
|
/**
|
|
19458
20903
|
* Exchange the current bearer token for a scoped channel token.
|
|
19459
20904
|
*
|
|
20905
|
+
* **Important:** This endpoint requires user context (Bearer token from a
|
|
20906
|
+
* `sk_tenant_` key). Server keys (`sk_srv_`, `sk_sys_`) are explicitly
|
|
20907
|
+
* rejected — channel tokens are scoped to end-user sessions.
|
|
20908
|
+
*
|
|
19460
20909
|
* @param request - Workspace and channel scope
|
|
19461
20910
|
* @param options - Request options (signal, etc.)
|
|
19462
20911
|
* @returns Channel token response
|
|
@@ -19470,12 +20919,7 @@ function createChannelsNamespace(rb) {
|
|
|
19470
20919
|
},
|
|
19471
20920
|
options
|
|
19472
20921
|
);
|
|
19473
|
-
return
|
|
19474
|
-
channelToken: raw.channel_token,
|
|
19475
|
-
expiresAt: raw.expires_at,
|
|
19476
|
-
channels: raw.channels,
|
|
19477
|
-
workspaceId: raw.workspace_id
|
|
19478
|
-
};
|
|
20922
|
+
return mapResponse(raw);
|
|
19479
20923
|
}
|
|
19480
20924
|
};
|
|
19481
20925
|
}
|
|
@@ -19668,6 +21112,7 @@ var index_default = GptAdmin;
|
|
|
19668
21112
|
ServerError,
|
|
19669
21113
|
TimeoutError,
|
|
19670
21114
|
ValidationError,
|
|
21115
|
+
createChannelsNamespace,
|
|
19671
21116
|
createImportsNamespace,
|
|
19672
21117
|
handleApiError
|
|
19673
21118
|
});
|