@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.mjs
CHANGED
|
@@ -814,8 +814,8 @@ var createClient = (config = {}) => {
|
|
|
814
814
|
};
|
|
815
815
|
|
|
816
816
|
// src/version.ts
|
|
817
|
-
var SDK_VERSION = "0.
|
|
818
|
-
var DEFAULT_API_VERSION = "2026-03-
|
|
817
|
+
var SDK_VERSION = "0.10.1";
|
|
818
|
+
var DEFAULT_API_VERSION = "2026-03-23";
|
|
819
819
|
|
|
820
820
|
// src/base-client.ts
|
|
821
821
|
function isSecureUrl(url) {
|
|
@@ -963,7 +963,7 @@ var ServerError = class extends GptCoreError {
|
|
|
963
963
|
function handleApiError(error) {
|
|
964
964
|
const err = error;
|
|
965
965
|
const response = err?.response || err;
|
|
966
|
-
|
|
966
|
+
let statusCode = response?.status || err?.status || err?.statusCode;
|
|
967
967
|
const headers = response?.headers || err?.headers;
|
|
968
968
|
const requestId = headers?.get?.("x-request-id") || headers?.["x-request-id"];
|
|
969
969
|
const body = response?.body || response?.data || err?.body || err?.data || err;
|
|
@@ -977,6 +977,13 @@ function handleApiError(error) {
|
|
|
977
977
|
field: e.source?.pointer?.split("/").pop(),
|
|
978
978
|
message: e.detail || e.title || "Unknown error"
|
|
979
979
|
}));
|
|
980
|
+
if (!statusCode && firstError?.status) {
|
|
981
|
+
const parsed = parseInt(firstError.status, 10);
|
|
982
|
+
if (!isNaN(parsed)) statusCode = parsed;
|
|
983
|
+
}
|
|
984
|
+
} else if (bodyObj?.errors && typeof bodyObj.errors === "object" && !Array.isArray(bodyObj.errors)) {
|
|
985
|
+
const errObj = bodyObj.errors;
|
|
986
|
+
message = errObj.detail || errObj.title || message;
|
|
980
987
|
} else if (bodyObj?.message) {
|
|
981
988
|
message = bodyObj.message;
|
|
982
989
|
} else if (typeof body === "string") {
|
|
@@ -1158,15 +1165,18 @@ var RequestBuilder = class {
|
|
|
1158
1165
|
async execute(fn, params, options) {
|
|
1159
1166
|
const headers = buildHeaders(this.getHeaders, options);
|
|
1160
1167
|
try {
|
|
1161
|
-
const
|
|
1168
|
+
const result = await this.requestWithRetry(
|
|
1162
1169
|
() => fn({
|
|
1163
1170
|
client: this.clientInstance,
|
|
1164
|
-
throwOnError: true,
|
|
1165
1171
|
headers,
|
|
1166
1172
|
...params,
|
|
1167
1173
|
...options?.signal && { signal: options.signal }
|
|
1168
1174
|
})
|
|
1169
1175
|
);
|
|
1176
|
+
const { data, error } = result;
|
|
1177
|
+
if (error) {
|
|
1178
|
+
throw enrichError(error, result);
|
|
1179
|
+
}
|
|
1170
1180
|
return this.unwrap(data?.data);
|
|
1171
1181
|
} catch (error) {
|
|
1172
1182
|
throw handleApiError(error);
|
|
@@ -1178,15 +1188,18 @@ var RequestBuilder = class {
|
|
|
1178
1188
|
async executeDelete(fn, params, options) {
|
|
1179
1189
|
const headers = buildHeaders(this.getHeaders, options);
|
|
1180
1190
|
try {
|
|
1181
|
-
await this.requestWithRetry(
|
|
1191
|
+
const result = await this.requestWithRetry(
|
|
1182
1192
|
() => fn({
|
|
1183
1193
|
client: this.clientInstance,
|
|
1184
|
-
throwOnError: true,
|
|
1185
1194
|
headers,
|
|
1186
1195
|
...params,
|
|
1187
1196
|
...options?.signal && { signal: options.signal }
|
|
1188
1197
|
})
|
|
1189
1198
|
);
|
|
1199
|
+
const { error } = result;
|
|
1200
|
+
if (error) {
|
|
1201
|
+
throw enrichError(error, result);
|
|
1202
|
+
}
|
|
1190
1203
|
return true;
|
|
1191
1204
|
} catch (error) {
|
|
1192
1205
|
throw handleApiError(error);
|
|
@@ -1443,6 +1456,11 @@ var client = createClient(
|
|
|
1443
1456
|
);
|
|
1444
1457
|
|
|
1445
1458
|
// src/_internal/sdk.gen.ts
|
|
1459
|
+
var getAdminEmailTemplateVersionsTemplateByTemplateId = (options) => (options.client ?? client).get({
|
|
1460
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1461
|
+
url: "/admin/email/template-versions/template/{template_id}",
|
|
1462
|
+
...options
|
|
1463
|
+
});
|
|
1446
1464
|
var getAdminWorkspaces = (options) => (options.client ?? client).get({
|
|
1447
1465
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1448
1466
|
url: "/admin/workspaces",
|
|
@@ -1457,6 +1475,16 @@ var postAdminWorkspaces = (options) => (options.client ?? client).post({
|
|
|
1457
1475
|
...options.headers
|
|
1458
1476
|
}
|
|
1459
1477
|
});
|
|
1478
|
+
var deleteAdminVoiceTranscriptionJobsById = (options) => (options.client ?? client).delete({
|
|
1479
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1480
|
+
url: "/admin/voice/transcription-jobs/{id}",
|
|
1481
|
+
...options
|
|
1482
|
+
});
|
|
1483
|
+
var getAdminVoiceTranscriptionJobsById = (options) => (options.client ?? client).get({
|
|
1484
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1485
|
+
url: "/admin/voice/transcription-jobs/{id}",
|
|
1486
|
+
...options
|
|
1487
|
+
});
|
|
1460
1488
|
var getAdminWallet = (options) => (options.client ?? client).get({
|
|
1461
1489
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1462
1490
|
url: "/admin/wallet",
|
|
@@ -1622,6 +1650,20 @@ var getAdminSocialMetricsCampaignBySocialCampaignId = (options) => (options.clie
|
|
|
1622
1650
|
url: "/admin/social/metrics/campaign/{social_campaign_id}",
|
|
1623
1651
|
...options
|
|
1624
1652
|
});
|
|
1653
|
+
var getAdminVoiceTranscriptionJobs = (options) => (options.client ?? client).get({
|
|
1654
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1655
|
+
url: "/admin/voice/transcription-jobs",
|
|
1656
|
+
...options
|
|
1657
|
+
});
|
|
1658
|
+
var postAdminVoiceTranscriptionJobs = (options) => (options.client ?? client).post({
|
|
1659
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1660
|
+
url: "/admin/voice/transcription-jobs",
|
|
1661
|
+
...options,
|
|
1662
|
+
headers: {
|
|
1663
|
+
"Content-Type": "application/vnd.api+json",
|
|
1664
|
+
...options.headers
|
|
1665
|
+
}
|
|
1666
|
+
});
|
|
1625
1667
|
var getAdminFieldTemplates = (options) => (options.client ?? client).get({
|
|
1626
1668
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1627
1669
|
url: "/admin/field-templates",
|
|
@@ -1650,6 +1692,25 @@ var postAdminConnectors = (options) => (options.client ?? client).post({
|
|
|
1650
1692
|
...options.headers
|
|
1651
1693
|
}
|
|
1652
1694
|
});
|
|
1695
|
+
var deleteAdminCampaignsSequencesById = (options) => (options.client ?? client).delete({
|
|
1696
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1697
|
+
url: "/admin/campaigns/sequences/{id}",
|
|
1698
|
+
...options
|
|
1699
|
+
});
|
|
1700
|
+
var getAdminCampaignsSequencesById = (options) => (options.client ?? client).get({
|
|
1701
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1702
|
+
url: "/admin/campaigns/sequences/{id}",
|
|
1703
|
+
...options
|
|
1704
|
+
});
|
|
1705
|
+
var patchAdminCampaignsSequencesById = (options) => (options.client ?? client).patch({
|
|
1706
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1707
|
+
url: "/admin/campaigns/sequences/{id}",
|
|
1708
|
+
...options,
|
|
1709
|
+
headers: {
|
|
1710
|
+
"Content-Type": "application/vnd.api+json",
|
|
1711
|
+
...options.headers
|
|
1712
|
+
}
|
|
1713
|
+
});
|
|
1653
1714
|
var deleteAdminCrmRelationshipTypesById = (options) => (options.client ?? client).delete({
|
|
1654
1715
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1655
1716
|
url: "/admin/crm/relationship-types/{id}",
|
|
@@ -1782,6 +1843,15 @@ var getAdminCrmRelationshipsById = (options) => (options.client ?? client).get({
|
|
|
1782
1843
|
url: "/admin/crm/relationships/{id}",
|
|
1783
1844
|
...options
|
|
1784
1845
|
});
|
|
1846
|
+
var postAdminEmailMarketingCampaignsByIdCreateFollowup = (options) => (options.client ?? client).post({
|
|
1847
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1848
|
+
url: "/admin/email-marketing/campaigns/{id}/create-followup",
|
|
1849
|
+
...options,
|
|
1850
|
+
headers: {
|
|
1851
|
+
"Content-Type": "application/vnd.api+json",
|
|
1852
|
+
...options.headers
|
|
1853
|
+
}
|
|
1854
|
+
});
|
|
1785
1855
|
var getAdminExtractionResultsDocumentByDocumentIdHistory = (options) => (options.client ?? client).get({
|
|
1786
1856
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1787
1857
|
url: "/admin/extraction/results/document/{document_id}/history",
|
|
@@ -1842,6 +1912,15 @@ var postAdminClinicalPracticeResources = (options) => (options.client ?? client)
|
|
|
1842
1912
|
...options.headers
|
|
1843
1913
|
}
|
|
1844
1914
|
});
|
|
1915
|
+
var patchAdminCampaignsSequencesByIdActivate = (options) => (options.client ?? client).patch({
|
|
1916
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1917
|
+
url: "/admin/campaigns/sequences/{id}/activate",
|
|
1918
|
+
...options,
|
|
1919
|
+
headers: {
|
|
1920
|
+
"Content-Type": "application/vnd.api+json",
|
|
1921
|
+
...options.headers
|
|
1922
|
+
}
|
|
1923
|
+
});
|
|
1845
1924
|
var getAdminLlmAnalyticsSummary = (options) => (options.client ?? client).get({
|
|
1846
1925
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1847
1926
|
url: "/admin/llm-analytics/summary",
|
|
@@ -1875,6 +1954,15 @@ var postAdminClinicalClientGoals = (options) => (options.client ?? client).post(
|
|
|
1875
1954
|
...options.headers
|
|
1876
1955
|
}
|
|
1877
1956
|
});
|
|
1957
|
+
var patchAdminCampaignsSequencesByIdResume = (options) => (options.client ?? client).patch({
|
|
1958
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1959
|
+
url: "/admin/campaigns/sequences/{id}/resume",
|
|
1960
|
+
...options,
|
|
1961
|
+
headers: {
|
|
1962
|
+
"Content-Type": "application/vnd.api+json",
|
|
1963
|
+
...options.headers
|
|
1964
|
+
}
|
|
1965
|
+
});
|
|
1878
1966
|
var patchAdminTenantsByIdAutoTopUp = (options) => (options.client ?? client).patch({
|
|
1879
1967
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1880
1968
|
url: "/admin/tenants/{id}/auto-top-up",
|
|
@@ -1945,6 +2033,15 @@ var postAdminSchedulingCalendarSyncs = (options) => (options.client ?? client).p
|
|
|
1945
2033
|
...options.headers
|
|
1946
2034
|
}
|
|
1947
2035
|
});
|
|
2036
|
+
var postAdminEmailMarketingCampaignsByIdAnalyze = (options) => (options.client ?? client).post({
|
|
2037
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2038
|
+
url: "/admin/email-marketing/campaigns/{id}/analyze",
|
|
2039
|
+
...options,
|
|
2040
|
+
headers: {
|
|
2041
|
+
"Content-Type": "application/vnd.api+json",
|
|
2042
|
+
...options.headers
|
|
2043
|
+
}
|
|
2044
|
+
});
|
|
1948
2045
|
var postAdminCrmCustomEntities = (options) => (options.client ?? client).post({
|
|
1949
2046
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1950
2047
|
url: "/admin/crm/custom-entities",
|
|
@@ -2006,6 +2103,24 @@ var patchAdminIsvCrmEntityTypesById = (options) => (options.client ?? client).pa
|
|
|
2006
2103
|
...options.headers
|
|
2007
2104
|
}
|
|
2008
2105
|
});
|
|
2106
|
+
var postAdminCampaignsSequenceSteps = (options) => (options.client ?? client).post({
|
|
2107
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2108
|
+
url: "/admin/campaigns/sequence-steps",
|
|
2109
|
+
...options,
|
|
2110
|
+
headers: {
|
|
2111
|
+
"Content-Type": "application/vnd.api+json",
|
|
2112
|
+
...options.headers
|
|
2113
|
+
}
|
|
2114
|
+
});
|
|
2115
|
+
var patchAdminEmailMarketingGeneratedEmailsByIdReject = (options) => (options.client ?? client).patch({
|
|
2116
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2117
|
+
url: "/admin/email-marketing/generated-emails/{id}/reject",
|
|
2118
|
+
...options,
|
|
2119
|
+
headers: {
|
|
2120
|
+
"Content-Type": "application/vnd.api+json",
|
|
2121
|
+
...options.headers
|
|
2122
|
+
}
|
|
2123
|
+
});
|
|
2009
2124
|
var getAdminCrmPipelineStagesPipelineByPipelineId = (options) => (options.client ?? client).get({
|
|
2010
2125
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2011
2126
|
url: "/admin/crm/pipeline-stages/pipeline/{pipeline_id}",
|
|
@@ -2039,6 +2154,15 @@ var postAdminTenantPricingOverrides = (options) => (options.client ?? client).po
|
|
|
2039
2154
|
...options.headers
|
|
2040
2155
|
}
|
|
2041
2156
|
});
|
|
2157
|
+
var patchAdminEmailMarketingTemplatesByIdUnpublish = (options) => (options.client ?? client).patch({
|
|
2158
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2159
|
+
url: "/admin/email-marketing/templates/{id}/unpublish",
|
|
2160
|
+
...options,
|
|
2161
|
+
headers: {
|
|
2162
|
+
"Content-Type": "application/vnd.api+json",
|
|
2163
|
+
...options.headers
|
|
2164
|
+
}
|
|
2165
|
+
});
|
|
2042
2166
|
var postAdminWebhookConfigsByIdReplay = (options) => (options.client ?? client).post({
|
|
2043
2167
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2044
2168
|
url: "/admin/webhook-configs/{id}/replay",
|
|
@@ -2118,6 +2242,15 @@ var getAdminAgentVersionsByIdRevisions = (options) => (options.client ?? client)
|
|
|
2118
2242
|
url: "/admin/agent-versions/{id}/revisions",
|
|
2119
2243
|
...options
|
|
2120
2244
|
});
|
|
2245
|
+
var patchAdminEmailMarketingTemplatesByIdArchive = (options) => (options.client ?? client).patch({
|
|
2246
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2247
|
+
url: "/admin/email-marketing/templates/{id}/archive",
|
|
2248
|
+
...options,
|
|
2249
|
+
headers: {
|
|
2250
|
+
"Content-Type": "application/vnd.api+json",
|
|
2251
|
+
...options.headers
|
|
2252
|
+
}
|
|
2253
|
+
});
|
|
2121
2254
|
var patchAdminSchedulingEventsByIdReschedule = (options) => (options.client ?? client).patch({
|
|
2122
2255
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2123
2256
|
url: "/admin/scheduling/events/{id}/reschedule",
|
|
@@ -2417,6 +2550,11 @@ var postAdminClinicalGoalTemplatesCatalog = (options) => (options.client ?? clie
|
|
|
2417
2550
|
...options.headers
|
|
2418
2551
|
}
|
|
2419
2552
|
});
|
|
2553
|
+
var getAdminCampaignsSequencesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
2554
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2555
|
+
url: "/admin/campaigns/sequences/workspace/{workspace_id}",
|
|
2556
|
+
...options
|
|
2557
|
+
});
|
|
2420
2558
|
var getAdminSchedulingEventsById = (options) => (options.client ?? client).get({
|
|
2421
2559
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2422
2560
|
url: "/admin/scheduling/events/{id}",
|
|
@@ -2540,6 +2678,15 @@ var getAdminEmailMarketingCampaignsById = (options) => (options.client ?? client
|
|
|
2540
2678
|
url: "/admin/email-marketing/campaigns/{id}",
|
|
2541
2679
|
...options
|
|
2542
2680
|
});
|
|
2681
|
+
var patchAdminEmailMarketingCampaignsById = (options) => (options.client ?? client).patch({
|
|
2682
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2683
|
+
url: "/admin/email-marketing/campaigns/{id}",
|
|
2684
|
+
...options,
|
|
2685
|
+
headers: {
|
|
2686
|
+
"Content-Type": "application/vnd.api+json",
|
|
2687
|
+
...options.headers
|
|
2688
|
+
}
|
|
2689
|
+
});
|
|
2543
2690
|
var getAdminSupportSlaPoliciesApplicationByApplicationId = (options) => (options.client ?? client).get({
|
|
2544
2691
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2545
2692
|
url: "/admin/support/sla-policies/application/{application_id}",
|
|
@@ -2756,6 +2903,15 @@ var getAdminThreadsByIdMessages = (options) => (options.client ?? client).get({
|
|
|
2756
2903
|
url: "/admin/threads/{id}/messages",
|
|
2757
2904
|
...options
|
|
2758
2905
|
});
|
|
2906
|
+
var postAdminThreadsByIdMessages = (options) => (options.client ?? client).post({
|
|
2907
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2908
|
+
url: "/admin/threads/{id}/messages",
|
|
2909
|
+
...options,
|
|
2910
|
+
headers: {
|
|
2911
|
+
"Content-Type": "application/vnd.api+json",
|
|
2912
|
+
...options.headers
|
|
2913
|
+
}
|
|
2914
|
+
});
|
|
2759
2915
|
var getAdminSocialTrendingHistoryRange = (options) => (options.client ?? client).get({
|
|
2760
2916
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2761
2917
|
url: "/admin/social/trending/history/range",
|
|
@@ -2991,6 +3147,15 @@ var patchAdminClinicalPracticeToolsCatalogByIdRestore = (options) => (options.cl
|
|
|
2991
3147
|
...options.headers
|
|
2992
3148
|
}
|
|
2993
3149
|
});
|
|
3150
|
+
var patchAdminCampaignsSequencesByIdPause = (options) => (options.client ?? client).patch({
|
|
3151
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3152
|
+
url: "/admin/campaigns/sequences/{id}/pause",
|
|
3153
|
+
...options,
|
|
3154
|
+
headers: {
|
|
3155
|
+
"Content-Type": "application/vnd.api+json",
|
|
3156
|
+
...options.headers
|
|
3157
|
+
}
|
|
3158
|
+
});
|
|
2994
3159
|
var getAdminVoiceSessions = (options) => (options.client ?? client).get({
|
|
2995
3160
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2996
3161
|
url: "/admin/voice/sessions",
|
|
@@ -3005,6 +3170,15 @@ var patchAdminClinicalNotesByIdArchive = (options) => (options.client ?? client)
|
|
|
3005
3170
|
...options.headers
|
|
3006
3171
|
}
|
|
3007
3172
|
});
|
|
3173
|
+
var postAdminEmailMarketingCampaignsByIdOptimizeSubjects = (options) => (options.client ?? client).post({
|
|
3174
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3175
|
+
url: "/admin/email-marketing/campaigns/{id}/optimize-subjects",
|
|
3176
|
+
...options,
|
|
3177
|
+
headers: {
|
|
3178
|
+
"Content-Type": "application/vnd.api+json",
|
|
3179
|
+
...options.headers
|
|
3180
|
+
}
|
|
3181
|
+
});
|
|
3008
3182
|
var getAdminCrmActivitiesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
3009
3183
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3010
3184
|
url: "/admin/crm/activities/workspace/{workspace_id}",
|
|
@@ -3159,6 +3333,11 @@ var postAdminConnectorsOauthAppConfigs = (options) => (options.client ?? client)
|
|
|
3159
3333
|
...options.headers
|
|
3160
3334
|
}
|
|
3161
3335
|
});
|
|
3336
|
+
var getAdminCampaignsSequenceStepsSequenceBySequenceId = (options) => (options.client ?? client).get({
|
|
3337
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3338
|
+
url: "/admin/campaigns/sequence-steps/sequence/{sequence_id}",
|
|
3339
|
+
...options
|
|
3340
|
+
});
|
|
3162
3341
|
var deleteAdminClinicalPracticeResourcesByIdPermanent = (options) => (options.client ?? client).delete({
|
|
3163
3342
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3164
3343
|
url: "/admin/clinical/practice-resources/{id}/permanent",
|
|
@@ -3296,6 +3475,11 @@ var postAdminConnectorsOauthInitiate = (options) => (options.client ?? client).p
|
|
|
3296
3475
|
...options.headers
|
|
3297
3476
|
}
|
|
3298
3477
|
});
|
|
3478
|
+
var getAdminCampaignsRecipientsById = (options) => (options.client ?? client).get({
|
|
3479
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3480
|
+
url: "/admin/campaigns/recipients/{id}",
|
|
3481
|
+
...options
|
|
3482
|
+
});
|
|
3299
3483
|
var getAdminVoiceSessionsById = (options) => (options.client ?? client).get({
|
|
3300
3484
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3301
3485
|
url: "/admin/voice/sessions/{id}",
|
|
@@ -3527,6 +3711,15 @@ var patchAdminCrawlerJobsByIdCancel = (options) => (options.client ?? client).pa
|
|
|
3527
3711
|
...options.headers
|
|
3528
3712
|
}
|
|
3529
3713
|
});
|
|
3714
|
+
var patchAdminCampaignsSequencesByIdComplete = (options) => (options.client ?? client).patch({
|
|
3715
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3716
|
+
url: "/admin/campaigns/sequences/{id}/complete",
|
|
3717
|
+
...options,
|
|
3718
|
+
headers: {
|
|
3719
|
+
"Content-Type": "application/vnd.api+json",
|
|
3720
|
+
...options.headers
|
|
3721
|
+
}
|
|
3722
|
+
});
|
|
3530
3723
|
var getAdminExtractionResultsDocumentByDocumentIdPartial = (options) => (options.client ?? client).get({
|
|
3531
3724
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3532
3725
|
url: "/admin/extraction/results/document/{document_id}/partial",
|
|
@@ -3580,6 +3773,11 @@ var getAdminClinicalGoalTemplatesCategoriesCatalog = (options) => (options.clien
|
|
|
3580
3773
|
url: "/admin/clinical/goal-templates/categories/catalog",
|
|
3581
3774
|
...options
|
|
3582
3775
|
});
|
|
3776
|
+
var getAdminSchedulingAvailabilityRulesByEventType = (options) => (options.client ?? client).get({
|
|
3777
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3778
|
+
url: "/admin/scheduling/availability-rules/by-event-type",
|
|
3779
|
+
...options
|
|
3780
|
+
});
|
|
3583
3781
|
var patchAdminClinicalNotesByIdRestore = (options) => (options.client ?? client).patch({
|
|
3584
3782
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3585
3783
|
url: "/admin/clinical/notes/{id}/restore",
|
|
@@ -3607,6 +3805,15 @@ var patchAdminUsersByIdConfirmEmail = (options) => (options.client ?? client).pa
|
|
|
3607
3805
|
...options.headers
|
|
3608
3806
|
}
|
|
3609
3807
|
});
|
|
3808
|
+
var postAdminEmailMarketingTemplates = (options) => (options.client ?? client).post({
|
|
3809
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3810
|
+
url: "/admin/email-marketing/templates",
|
|
3811
|
+
...options,
|
|
3812
|
+
headers: {
|
|
3813
|
+
"Content-Type": "application/vnd.api+json",
|
|
3814
|
+
...options.headers
|
|
3815
|
+
}
|
|
3816
|
+
});
|
|
3610
3817
|
var getAdminExtractionResultsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
3611
3818
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3612
3819
|
url: "/admin/extraction/results/workspace/{workspace_id}",
|
|
@@ -3645,6 +3852,11 @@ var deleteAdminClinicalNotesByIdPermanent = (options) => (options.client ?? clie
|
|
|
3645
3852
|
url: "/admin/clinical/notes/{id}/permanent",
|
|
3646
3853
|
...options
|
|
3647
3854
|
});
|
|
3855
|
+
var getAdminPipelinesBySlugBySlug = (options) => (options.client ?? client).get({
|
|
3856
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3857
|
+
url: "/admin/pipelines/by-slug/{slug}",
|
|
3858
|
+
...options
|
|
3859
|
+
});
|
|
3648
3860
|
var getAdminStorageRecommendationsPending = (options) => (options.client ?? client).get({
|
|
3649
3861
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3650
3862
|
url: "/admin/storage-recommendations/pending",
|
|
@@ -3764,6 +3976,11 @@ var getAdminExtractionShadowComparisonsById = (options) => (options.client ?? cl
|
|
|
3764
3976
|
url: "/admin/extraction/shadow-comparisons/{id}",
|
|
3765
3977
|
...options
|
|
3766
3978
|
});
|
|
3979
|
+
var getAdminEmailMarketingTemplatesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
3980
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3981
|
+
url: "/admin/email-marketing/templates/workspace/{workspace_id}",
|
|
3982
|
+
...options
|
|
3983
|
+
});
|
|
3767
3984
|
var postAdminSocialCampaignsByIdGenerateMasterCopy = (options) => (options.client ?? client).post({
|
|
3768
3985
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3769
3986
|
url: "/admin/social/campaigns/{id}/generate-master-copy",
|
|
@@ -3824,6 +4041,15 @@ var patchAdminClinicalPracticeResourcesCatalogByIdRestore = (options) => (option
|
|
|
3824
4041
|
...options.headers
|
|
3825
4042
|
}
|
|
3826
4043
|
});
|
|
4044
|
+
var patchAdminEmailMarketingTemplatesByIdRestore = (options) => (options.client ?? client).patch({
|
|
4045
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4046
|
+
url: "/admin/email-marketing/templates/{id}/restore",
|
|
4047
|
+
...options,
|
|
4048
|
+
headers: {
|
|
4049
|
+
"Content-Type": "application/vnd.api+json",
|
|
4050
|
+
...options.headers
|
|
4051
|
+
}
|
|
4052
|
+
});
|
|
3827
4053
|
var patchAdminWalletPlan = (options) => (options.client ?? client).patch({
|
|
3828
4054
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3829
4055
|
url: "/admin/wallet/plan",
|
|
@@ -3885,6 +4111,15 @@ var getAdminAgentsByIdUsage = (options) => (options.client ?? client).get({
|
|
|
3885
4111
|
url: "/admin/agents/{id}/usage",
|
|
3886
4112
|
...options
|
|
3887
4113
|
});
|
|
4114
|
+
var patchAdminEmailMarketingGeneratedEmailsByIdSchedule = (options) => (options.client ?? client).patch({
|
|
4115
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4116
|
+
url: "/admin/email-marketing/generated-emails/{id}/schedule",
|
|
4117
|
+
...options,
|
|
4118
|
+
headers: {
|
|
4119
|
+
"Content-Type": "application/vnd.api+json",
|
|
4120
|
+
...options.headers
|
|
4121
|
+
}
|
|
4122
|
+
});
|
|
3888
4123
|
var getAdminEmailTrackingEventsById = (options) => (options.client ?? client).get({
|
|
3889
4124
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3890
4125
|
url: "/admin/email/tracking-events/{id}",
|
|
@@ -4027,6 +4262,20 @@ var patchAdminClinicalClientGoalsByIdRestore = (options) => (options.client ?? c
|
|
|
4027
4262
|
...options.headers
|
|
4028
4263
|
}
|
|
4029
4264
|
});
|
|
4265
|
+
var getAdminEmailMarketingGeneratedEmailsById = (options) => (options.client ?? client).get({
|
|
4266
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4267
|
+
url: "/admin/email-marketing/generated-emails/{id}",
|
|
4268
|
+
...options
|
|
4269
|
+
});
|
|
4270
|
+
var patchAdminEmailMarketingGeneratedEmailsById = (options) => (options.client ?? client).patch({
|
|
4271
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4272
|
+
url: "/admin/email-marketing/generated-emails/{id}",
|
|
4273
|
+
...options,
|
|
4274
|
+
headers: {
|
|
4275
|
+
"Content-Type": "application/vnd.api+json",
|
|
4276
|
+
...options.headers
|
|
4277
|
+
}
|
|
4278
|
+
});
|
|
4030
4279
|
var getAdminInvitationsMe = (options) => (options.client ?? client).get({
|
|
4031
4280
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4032
4281
|
url: "/admin/invitations/me",
|
|
@@ -4065,6 +4314,11 @@ var getAdminVoiceSessionsWorkspaceByWorkspaceId = (options) => (options.client ?
|
|
|
4065
4314
|
url: "/admin/voice/sessions/workspace/{workspace_id}",
|
|
4066
4315
|
...options
|
|
4067
4316
|
});
|
|
4317
|
+
var getAdminCampaignsRecipientsCampaignByCampaignId = (options) => (options.client ?? client).get({
|
|
4318
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4319
|
+
url: "/admin/campaigns/recipients/campaign/{campaign_id}",
|
|
4320
|
+
...options
|
|
4321
|
+
});
|
|
4068
4322
|
var getAdminInvitationsConsumeByToken = (options) => (options.client ?? client).get({
|
|
4069
4323
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4070
4324
|
url: "/admin/invitations/consume/{token}",
|
|
@@ -4103,6 +4357,25 @@ var postAdminWorkspaceAgentConfigs = (options) => (options.client ?? client).pos
|
|
|
4103
4357
|
...options.headers
|
|
4104
4358
|
}
|
|
4105
4359
|
});
|
|
4360
|
+
var getAdminEmailTemplateVersionsByTemplateIdVersionsByVersionNumber = (options) => (options.client ?? client).get({
|
|
4361
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4362
|
+
url: "/admin/email/template-versions/{template_id}/versions/{version_number}",
|
|
4363
|
+
...options
|
|
4364
|
+
});
|
|
4365
|
+
var postAdminEmailMarketingCampaignsByIdOptimizeSendTimes = (options) => (options.client ?? client).post({
|
|
4366
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4367
|
+
url: "/admin/email-marketing/campaigns/{id}/optimize-send-times",
|
|
4368
|
+
...options,
|
|
4369
|
+
headers: {
|
|
4370
|
+
"Content-Type": "application/vnd.api+json",
|
|
4371
|
+
...options.headers
|
|
4372
|
+
}
|
|
4373
|
+
});
|
|
4374
|
+
var getAdminVoiceTranscriptionJobsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
4375
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4376
|
+
url: "/admin/voice/transcription-jobs/workspace/{workspace_id}",
|
|
4377
|
+
...options
|
|
4378
|
+
});
|
|
4106
4379
|
var getAdminSocialMetricsPostBySocialPostIdLatest = (options) => (options.client ?? client).get({
|
|
4107
4380
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4108
4381
|
url: "/admin/social/metrics/post/{social_post_id}/latest",
|
|
@@ -4221,6 +4494,15 @@ var postAdminExtractionDocumentsBulkReprocess = (options) => (options.client ??
|
|
|
4221
4494
|
...options.headers
|
|
4222
4495
|
}
|
|
4223
4496
|
});
|
|
4497
|
+
var postAdminEmailMarketingCampaignsByIdGenerateEmails = (options) => (options.client ?? client).post({
|
|
4498
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4499
|
+
url: "/admin/email-marketing/campaigns/{id}/generate-emails",
|
|
4500
|
+
...options,
|
|
4501
|
+
headers: {
|
|
4502
|
+
"Content-Type": "application/vnd.api+json",
|
|
4503
|
+
...options.headers
|
|
4504
|
+
}
|
|
4505
|
+
});
|
|
4224
4506
|
var postAdminContentEditImage = (options) => (options.client ?? client).post({
|
|
4225
4507
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4226
4508
|
url: "/admin/content/edit-image",
|
|
@@ -4353,6 +4635,15 @@ var patchAdminExtractionResultsByIdRegenerate = (options) => (options.client ??
|
|
|
4353
4635
|
...options.headers
|
|
4354
4636
|
}
|
|
4355
4637
|
});
|
|
4638
|
+
var patchAdminEmailMarketingTemplatesByIdPreview = (options) => (options.client ?? client).patch({
|
|
4639
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4640
|
+
url: "/admin/email-marketing/templates/{id}/preview",
|
|
4641
|
+
...options,
|
|
4642
|
+
headers: {
|
|
4643
|
+
"Content-Type": "application/vnd.api+json",
|
|
4644
|
+
...options.headers
|
|
4645
|
+
}
|
|
4646
|
+
});
|
|
4356
4647
|
var postAdminWorkspacesByWorkspaceIdExtractionDocumentsDismissAllTrained = (options) => (options.client ?? client).post({
|
|
4357
4648
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4358
4649
|
url: "/admin/workspaces/{workspace_id}/extraction/documents/dismiss-all-trained",
|
|
@@ -4460,6 +4751,25 @@ var patchAdminAgentDeploymentsByIdAcceptUpdate = (options) => (options.client ??
|
|
|
4460
4751
|
...options.headers
|
|
4461
4752
|
}
|
|
4462
4753
|
});
|
|
4754
|
+
var deleteAdminEmailMarketingTemplatesById = (options) => (options.client ?? client).delete({
|
|
4755
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4756
|
+
url: "/admin/email-marketing/templates/{id}",
|
|
4757
|
+
...options
|
|
4758
|
+
});
|
|
4759
|
+
var getAdminEmailMarketingTemplatesById = (options) => (options.client ?? client).get({
|
|
4760
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4761
|
+
url: "/admin/email-marketing/templates/{id}",
|
|
4762
|
+
...options
|
|
4763
|
+
});
|
|
4764
|
+
var patchAdminEmailMarketingTemplatesById = (options) => (options.client ?? client).patch({
|
|
4765
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4766
|
+
url: "/admin/email-marketing/templates/{id}",
|
|
4767
|
+
...options,
|
|
4768
|
+
headers: {
|
|
4769
|
+
"Content-Type": "application/vnd.api+json",
|
|
4770
|
+
...options.headers
|
|
4771
|
+
}
|
|
4772
|
+
});
|
|
4463
4773
|
var getAdminDocumentsStats = (options) => (options.client ?? client).get({
|
|
4464
4774
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4465
4775
|
url: "/admin/documents/stats",
|
|
@@ -4685,6 +4995,15 @@ var getAdminCrmExportsWorkspaceByWorkspaceId = (options) => (options.client ?? c
|
|
|
4685
4995
|
url: "/admin/crm/exports/workspace/{workspace_id}",
|
|
4686
4996
|
...options
|
|
4687
4997
|
});
|
|
4998
|
+
var postAdminEmailMarketingCampaignsByIdImportRecipients = (options) => (options.client ?? client).post({
|
|
4999
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5000
|
+
url: "/admin/email-marketing/campaigns/{id}/import-recipients",
|
|
5001
|
+
...options,
|
|
5002
|
+
headers: {
|
|
5003
|
+
"Content-Type": "application/vnd.api+json",
|
|
5004
|
+
...options.headers
|
|
5005
|
+
}
|
|
5006
|
+
});
|
|
4688
5007
|
var getAdminSupportTicketMessagesTicketByTicketId = (options) => (options.client ?? client).get({
|
|
4689
5008
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4690
5009
|
url: "/admin/support/ticket-messages/ticket/{ticket_id}",
|
|
@@ -4704,6 +5023,11 @@ var getAdminWorkspacesByWorkspaceIdExtractionExportsById = (options) => (options
|
|
|
4704
5023
|
url: "/admin/workspaces/{workspace_id}/extraction/exports/{id}",
|
|
4705
5024
|
...options
|
|
4706
5025
|
});
|
|
5026
|
+
var getAdminEmailMarketingGeneratedEmailsCampaignByCampaignId = (options) => (options.client ?? client).get({
|
|
5027
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5028
|
+
url: "/admin/email-marketing/generated-emails/campaign/{campaign_id}",
|
|
5029
|
+
...options
|
|
5030
|
+
});
|
|
4707
5031
|
var postAdminSupportCannedResponses = (options) => (options.client ?? client).post({
|
|
4708
5032
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4709
5033
|
url: "/admin/support/canned-responses",
|
|
@@ -4750,6 +5074,15 @@ var postAdminSupportTicketRatings = (options) => (options.client ?? client).post
|
|
|
4750
5074
|
...options.headers
|
|
4751
5075
|
}
|
|
4752
5076
|
});
|
|
5077
|
+
var postAdminCampaignsSequences = (options) => (options.client ?? client).post({
|
|
5078
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5079
|
+
url: "/admin/campaigns/sequences",
|
|
5080
|
+
...options,
|
|
5081
|
+
headers: {
|
|
5082
|
+
"Content-Type": "application/vnd.api+json",
|
|
5083
|
+
...options.headers
|
|
5084
|
+
}
|
|
5085
|
+
});
|
|
4753
5086
|
var postAdminCrmActivities = (options) => (options.client ?? client).post({
|
|
4754
5087
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4755
5088
|
url: "/admin/crm/activities",
|
|
@@ -4796,6 +5129,15 @@ var patchAdminPricingStrategiesById = (options) => (options.client ?? client).pa
|
|
|
4796
5129
|
...options.headers
|
|
4797
5130
|
}
|
|
4798
5131
|
});
|
|
5132
|
+
var postAdminEmailMarketingCampaignsByIdExport = (options) => (options.client ?? client).post({
|
|
5133
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5134
|
+
url: "/admin/email-marketing/campaigns/{id}/export",
|
|
5135
|
+
...options,
|
|
5136
|
+
headers: {
|
|
5137
|
+
"Content-Type": "application/vnd.api+json",
|
|
5138
|
+
...options.headers
|
|
5139
|
+
}
|
|
5140
|
+
});
|
|
4799
5141
|
var getAdminCrmRelationshipsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
4800
5142
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4801
5143
|
url: "/admin/crm/relationships/workspace/{workspace_id}",
|
|
@@ -4880,6 +5222,15 @@ var postAdminAgentsByIdTest = (options) => (options.client ?? client).post({
|
|
|
4880
5222
|
...options.headers
|
|
4881
5223
|
}
|
|
4882
5224
|
});
|
|
5225
|
+
var patchAdminSchedulingRemindersByIdCancel = (options) => (options.client ?? client).patch({
|
|
5226
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5227
|
+
url: "/admin/scheduling/reminders/{id}/cancel",
|
|
5228
|
+
...options,
|
|
5229
|
+
headers: {
|
|
5230
|
+
"Content-Type": "application/vnd.api+json",
|
|
5231
|
+
...options.headers
|
|
5232
|
+
}
|
|
5233
|
+
});
|
|
4883
5234
|
var getAdminSchedulingLocationsById = (options) => (options.client ?? client).get({
|
|
4884
5235
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4885
5236
|
url: "/admin/scheduling/locations/{id}",
|
|
@@ -5240,6 +5591,11 @@ var getAdminSchedulingRemindersById = (options) => (options.client ?? client).ge
|
|
|
5240
5591
|
url: "/admin/scheduling/reminders/{id}",
|
|
5241
5592
|
...options
|
|
5242
5593
|
});
|
|
5594
|
+
var getAdminSchedulingBookingsByBooker = (options) => (options.client ?? client).get({
|
|
5595
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5596
|
+
url: "/admin/scheduling/bookings/by-booker",
|
|
5597
|
+
...options
|
|
5598
|
+
});
|
|
5243
5599
|
var deleteAdminClinicalPatientsById = (options) => (options.client ?? client).delete({
|
|
5244
5600
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5245
5601
|
url: "/admin/clinical/patients/{id}",
|
|
@@ -5478,6 +5834,15 @@ var getAdminVoiceRecordingsById = (options) => (options.client ?? client).get({
|
|
|
5478
5834
|
url: "/admin/voice/recordings/{id}",
|
|
5479
5835
|
...options
|
|
5480
5836
|
});
|
|
5837
|
+
var patchAdminEmailMarketingGeneratedEmailsByIdApprove = (options) => (options.client ?? client).patch({
|
|
5838
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5839
|
+
url: "/admin/email-marketing/generated-emails/{id}/approve",
|
|
5840
|
+
...options,
|
|
5841
|
+
headers: {
|
|
5842
|
+
"Content-Type": "application/vnd.api+json",
|
|
5843
|
+
...options.headers
|
|
5844
|
+
}
|
|
5845
|
+
});
|
|
5481
5846
|
var patchAdminClinicalMealPlansByIdArchive = (options) => (options.client ?? client).patch({
|
|
5482
5847
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5483
5848
|
url: "/admin/clinical/meal-plans/{id}/archive",
|
|
@@ -5533,6 +5898,25 @@ var postAdminClinicalNotes = (options) => (options.client ?? client).post({
|
|
|
5533
5898
|
...options.headers
|
|
5534
5899
|
}
|
|
5535
5900
|
});
|
|
5901
|
+
var deleteAdminCampaignsSequenceStepsById = (options) => (options.client ?? client).delete({
|
|
5902
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5903
|
+
url: "/admin/campaigns/sequence-steps/{id}",
|
|
5904
|
+
...options
|
|
5905
|
+
});
|
|
5906
|
+
var getAdminCampaignsSequenceStepsById = (options) => (options.client ?? client).get({
|
|
5907
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5908
|
+
url: "/admin/campaigns/sequence-steps/{id}",
|
|
5909
|
+
...options
|
|
5910
|
+
});
|
|
5911
|
+
var patchAdminCampaignsSequenceStepsById = (options) => (options.client ?? client).patch({
|
|
5912
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5913
|
+
url: "/admin/campaigns/sequence-steps/{id}",
|
|
5914
|
+
...options,
|
|
5915
|
+
headers: {
|
|
5916
|
+
"Content-Type": "application/vnd.api+json",
|
|
5917
|
+
...options.headers
|
|
5918
|
+
}
|
|
5919
|
+
});
|
|
5536
5920
|
var getAdminClinicalPatientsByIdGoals = (options) => (options.client ?? client).get({
|
|
5537
5921
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5538
5922
|
url: "/admin/clinical/patients/{id}/goals",
|
|
@@ -5580,6 +5964,15 @@ var getAdminSupportRoutingRulesApplicationByApplicationId = (options) => (option
|
|
|
5580
5964
|
url: "/admin/support/routing-rules/application/{application_id}",
|
|
5581
5965
|
...options
|
|
5582
5966
|
});
|
|
5967
|
+
var postAdminEmailMarketingTemplatesCompile = (options) => (options.client ?? client).post({
|
|
5968
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5969
|
+
url: "/admin/email-marketing/templates/compile",
|
|
5970
|
+
...options,
|
|
5971
|
+
headers: {
|
|
5972
|
+
"Content-Type": "application/vnd.api+json",
|
|
5973
|
+
...options.headers
|
|
5974
|
+
}
|
|
5975
|
+
});
|
|
5583
5976
|
var getAdminClinicalNotesArchived = (options) => (options.client ?? client).get({
|
|
5584
5977
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5585
5978
|
url: "/admin/clinical/notes/archived",
|
|
@@ -5715,6 +6108,15 @@ var postAdminSysSemanticCacheClear = (options) => (options.client ?? client).pos
|
|
|
5715
6108
|
...options.headers
|
|
5716
6109
|
}
|
|
5717
6110
|
});
|
|
6111
|
+
var patchAdminEmailMarketingTemplatesByIdRollback = (options) => (options.client ?? client).patch({
|
|
6112
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6113
|
+
url: "/admin/email-marketing/templates/{id}/rollback",
|
|
6114
|
+
...options,
|
|
6115
|
+
headers: {
|
|
6116
|
+
"Content-Type": "application/vnd.api+json",
|
|
6117
|
+
...options.headers
|
|
6118
|
+
}
|
|
6119
|
+
});
|
|
5718
6120
|
var getAdminSocialTrendingWatchesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
5719
6121
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5720
6122
|
url: "/admin/social/trending/watches/workspace/{workspace_id}",
|
|
@@ -5941,6 +6343,15 @@ var patchAdminSocialTrendingWatchesById = (options) => (options.client ?? client
|
|
|
5941
6343
|
...options.headers
|
|
5942
6344
|
}
|
|
5943
6345
|
});
|
|
6346
|
+
var patchAdminEmailMarketingTemplatesByIdPublish = (options) => (options.client ?? client).patch({
|
|
6347
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6348
|
+
url: "/admin/email-marketing/templates/{id}/publish",
|
|
6349
|
+
...options,
|
|
6350
|
+
headers: {
|
|
6351
|
+
"Content-Type": "application/vnd.api+json",
|
|
6352
|
+
...options.headers
|
|
6353
|
+
}
|
|
6354
|
+
});
|
|
5944
6355
|
var getAdminSocialMetricsAccountBySocialAccountId = (options) => (options.client ?? client).get({
|
|
5945
6356
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5946
6357
|
url: "/admin/social/metrics/account/{social_account_id}",
|
|
@@ -6065,6 +6476,15 @@ var patchAdminPlansById = (options) => (options.client ?? client).patch({
|
|
|
6065
6476
|
...options.headers
|
|
6066
6477
|
}
|
|
6067
6478
|
});
|
|
6479
|
+
var patchAdminSchedulingEventTypesByIdArchive = (options) => (options.client ?? client).patch({
|
|
6480
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6481
|
+
url: "/admin/scheduling/event-types/{id}/archive",
|
|
6482
|
+
...options,
|
|
6483
|
+
headers: {
|
|
6484
|
+
"Content-Type": "application/vnd.api+json",
|
|
6485
|
+
...options.headers
|
|
6486
|
+
}
|
|
6487
|
+
});
|
|
6068
6488
|
var patchAdminUsersByIdResetPassword = (options) => (options.client ?? client).patch({
|
|
6069
6489
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6070
6490
|
url: "/admin/users/{id}/reset-password",
|
|
@@ -6409,6 +6829,11 @@ var postAdminThreadsByIdComplete = (options) => (options.client ?? client).post(
|
|
|
6409
6829
|
...options.headers
|
|
6410
6830
|
}
|
|
6411
6831
|
});
|
|
6832
|
+
var getAdminVoiceTranscriptionJobsMine = (options) => (options.client ?? client).get({
|
|
6833
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6834
|
+
url: "/admin/voice/transcription-jobs/mine",
|
|
6835
|
+
...options
|
|
6836
|
+
});
|
|
6412
6837
|
var deleteAdminConnectorsOauthAppConfigsById = (options) => (options.client ?? client).delete({
|
|
6413
6838
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6414
6839
|
url: "/admin/connectors/oauth-app-configs/{id}",
|
|
@@ -6428,6 +6853,11 @@ var patchAdminConnectorsOauthAppConfigsById = (options) => (options.client ?? cl
|
|
|
6428
6853
|
...options.headers
|
|
6429
6854
|
}
|
|
6430
6855
|
});
|
|
6856
|
+
var getAdminSchedulingAvailabilityRulesByUser = (options) => (options.client ?? client).get({
|
|
6857
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6858
|
+
url: "/admin/scheduling/availability-rules/by-user",
|
|
6859
|
+
...options
|
|
6860
|
+
});
|
|
6431
6861
|
var getAdminClinicalClientResourceAssignments = (options) => (options.client ?? client).get({
|
|
6432
6862
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6433
6863
|
url: "/admin/clinical/client-resource-assignments",
|
|
@@ -6619,6 +7049,11 @@ var patchAdminInvitationsByIdDecline = (options) => (options.client ?? client).p
|
|
|
6619
7049
|
...options.headers
|
|
6620
7050
|
}
|
|
6621
7051
|
});
|
|
7052
|
+
var getAdminSchedulingEventTypesBySlug = (options) => (options.client ?? client).get({
|
|
7053
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
7054
|
+
url: "/admin/scheduling/event-types/by-slug",
|
|
7055
|
+
...options
|
|
7056
|
+
});
|
|
6622
7057
|
var deleteAdminClinicalGoalTemplatesCatalogByIdPermanent = (options) => (options.client ?? client).delete({
|
|
6623
7058
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6624
7059
|
url: "/admin/clinical/goal-templates/catalog/{id}/permanent",
|
|
@@ -7189,7 +7624,7 @@ function createAgentsNamespace(rb) {
|
|
|
7189
7624
|
create: async (attributes, options) => {
|
|
7190
7625
|
return rb.execute(
|
|
7191
7626
|
postAdminAgentVersions,
|
|
7192
|
-
{ body: { data: { type: "
|
|
7627
|
+
{ body: { data: { type: "agent-version", attributes } } },
|
|
7193
7628
|
options
|
|
7194
7629
|
);
|
|
7195
7630
|
},
|
|
@@ -7211,7 +7646,7 @@ function createAgentsNamespace(rb) {
|
|
|
7211
7646
|
path: { id },
|
|
7212
7647
|
body: {
|
|
7213
7648
|
data: {
|
|
7214
|
-
type: "
|
|
7649
|
+
type: "agent-version",
|
|
7215
7650
|
system_field_name: fieldName
|
|
7216
7651
|
}
|
|
7217
7652
|
}
|
|
@@ -7237,7 +7672,7 @@ function createAgentsNamespace(rb) {
|
|
|
7237
7672
|
path: { id },
|
|
7238
7673
|
body: {
|
|
7239
7674
|
data: {
|
|
7240
|
-
type: "
|
|
7675
|
+
type: "agent-version",
|
|
7241
7676
|
system_field_name: fieldName
|
|
7242
7677
|
}
|
|
7243
7678
|
}
|
|
@@ -7263,7 +7698,7 @@ function createAgentsNamespace(rb) {
|
|
|
7263
7698
|
path: { id },
|
|
7264
7699
|
body: {
|
|
7265
7700
|
data: {
|
|
7266
|
-
type: "
|
|
7701
|
+
type: "agent-version",
|
|
7267
7702
|
system_field_names: fieldNames
|
|
7268
7703
|
}
|
|
7269
7704
|
}
|
|
@@ -7355,7 +7790,7 @@ function createAgentsNamespace(rb) {
|
|
|
7355
7790
|
{
|
|
7356
7791
|
body: {
|
|
7357
7792
|
data: {
|
|
7358
|
-
type: "
|
|
7793
|
+
type: "agent-version-comparison",
|
|
7359
7794
|
attributes: {
|
|
7360
7795
|
version_a_id: versionAId,
|
|
7361
7796
|
version_b_id: versionBId
|
|
@@ -7403,7 +7838,7 @@ function createAgentsNamespace(rb) {
|
|
|
7403
7838
|
postAdminAgentsByIdSchemaVersions,
|
|
7404
7839
|
{
|
|
7405
7840
|
path: { id: agentId },
|
|
7406
|
-
body: { data: { type: "
|
|
7841
|
+
body: { data: { type: "agent-version", ...attributes } }
|
|
7407
7842
|
},
|
|
7408
7843
|
options
|
|
7409
7844
|
);
|
|
@@ -7443,7 +7878,7 @@ function createAgentsNamespace(rb) {
|
|
|
7443
7878
|
patchAdminAgentsByIdSchemaVersionsByVersionId,
|
|
7444
7879
|
{
|
|
7445
7880
|
path: { id: agentId, version_id: versionId },
|
|
7446
|
-
body: { data: { type: "
|
|
7881
|
+
body: { data: { type: "agent-version", ...attributes } }
|
|
7447
7882
|
},
|
|
7448
7883
|
options
|
|
7449
7884
|
);
|
|
@@ -7500,7 +7935,7 @@ function createAgentsNamespace(rb) {
|
|
|
7500
7935
|
create: async (attributes, options) => {
|
|
7501
7936
|
return rb.execute(
|
|
7502
7937
|
postAdminTrainingExamples,
|
|
7503
|
-
{ body: { data: { type: "
|
|
7938
|
+
{ body: { data: { type: "training-example", attributes } } },
|
|
7504
7939
|
options
|
|
7505
7940
|
);
|
|
7506
7941
|
},
|
|
@@ -7520,7 +7955,7 @@ function createAgentsNamespace(rb) {
|
|
|
7520
7955
|
patchAdminTrainingExamplesById,
|
|
7521
7956
|
{
|
|
7522
7957
|
path: { id },
|
|
7523
|
-
body: { data: { id, type: "
|
|
7958
|
+
body: { data: { id, type: "training-example", attributes } }
|
|
7524
7959
|
},
|
|
7525
7960
|
options
|
|
7526
7961
|
);
|
|
@@ -7560,7 +7995,7 @@ function createAgentsNamespace(rb) {
|
|
|
7560
7995
|
{
|
|
7561
7996
|
body: {
|
|
7562
7997
|
data: {
|
|
7563
|
-
type: "
|
|
7998
|
+
type: "training-example",
|
|
7564
7999
|
agent_id: examples[0]?.agent_id,
|
|
7565
8000
|
examples
|
|
7566
8001
|
}
|
|
@@ -7583,7 +8018,7 @@ function createAgentsNamespace(rb) {
|
|
|
7583
8018
|
return rb.execute(
|
|
7584
8019
|
postAdminTrainingExamplesBulkDelete,
|
|
7585
8020
|
{
|
|
7586
|
-
body: { data: { type: "
|
|
8021
|
+
body: { data: { type: "training-example", ids } }
|
|
7587
8022
|
},
|
|
7588
8023
|
options
|
|
7589
8024
|
);
|
|
@@ -7603,7 +8038,7 @@ function createAgentsNamespace(rb) {
|
|
|
7603
8038
|
postAdminTrainingExamplesSearch,
|
|
7604
8039
|
{
|
|
7605
8040
|
body: {
|
|
7606
|
-
data: { type: "
|
|
8041
|
+
data: { type: "training-example", query }
|
|
7607
8042
|
}
|
|
7608
8043
|
},
|
|
7609
8044
|
options
|
|
@@ -7747,7 +8182,7 @@ function createAgentsNamespace(rb) {
|
|
|
7747
8182
|
create: async (attributes, options) => {
|
|
7748
8183
|
return rb.execute(
|
|
7749
8184
|
postAdminFieldTemplates,
|
|
7750
|
-
{ body: { data: { type: "
|
|
8185
|
+
{ body: { data: { type: "field-template", attributes } } },
|
|
7751
8186
|
options
|
|
7752
8187
|
);
|
|
7753
8188
|
},
|
|
@@ -8850,7 +9285,7 @@ function createApiKeysNamespace(rb) {
|
|
|
8850
9285
|
create: async (attributes, options) => {
|
|
8851
9286
|
return rb.execute(
|
|
8852
9287
|
postAdminApiKeys,
|
|
8853
|
-
{ body: { data: { type: "
|
|
9288
|
+
{ body: { data: { type: "api-key", attributes } } },
|
|
8854
9289
|
options
|
|
8855
9290
|
);
|
|
8856
9291
|
},
|
|
@@ -8863,7 +9298,7 @@ function createApiKeysNamespace(rb) {
|
|
|
8863
9298
|
update: async (id, attributes, options) => {
|
|
8864
9299
|
return rb.execute(
|
|
8865
9300
|
patchAdminApiKeysById,
|
|
8866
|
-
{ path: { id }, body: { data: { id, type: "
|
|
9301
|
+
{ path: { id }, body: { data: { id, type: "api-key", attributes } } },
|
|
8867
9302
|
options
|
|
8868
9303
|
);
|
|
8869
9304
|
},
|
|
@@ -8893,7 +9328,7 @@ function createApiKeysNamespace(rb) {
|
|
|
8893
9328
|
body: {
|
|
8894
9329
|
data: {
|
|
8895
9330
|
id,
|
|
8896
|
-
type: "
|
|
9331
|
+
type: "api-key",
|
|
8897
9332
|
attributes: {
|
|
8898
9333
|
credit_limit: creditLimit,
|
|
8899
9334
|
credit_limit_period: creditLimitPeriod
|
|
@@ -8932,7 +9367,7 @@ function createApiKeysNamespace(rb) {
|
|
|
8932
9367
|
patchAdminApiKeysByIdResetPeriod,
|
|
8933
9368
|
{
|
|
8934
9369
|
path: { id },
|
|
8935
|
-
body: { data: { id, type: "
|
|
9370
|
+
body: { data: { id, type: "api-key", attributes: {} } }
|
|
8936
9371
|
},
|
|
8937
9372
|
options
|
|
8938
9373
|
);
|
|
@@ -9224,7 +9659,7 @@ function createStorageNamespace(rb) {
|
|
|
9224
9659
|
archive: async (id, options) => {
|
|
9225
9660
|
return rb.execute(
|
|
9226
9661
|
patchAdminStorageFilesByIdArchive,
|
|
9227
|
-
{ path: { id }, body: { data: { id, type: "
|
|
9662
|
+
{ path: { id }, body: { data: { id, type: "storage-file" } } },
|
|
9228
9663
|
options
|
|
9229
9664
|
);
|
|
9230
9665
|
},
|
|
@@ -9232,7 +9667,7 @@ function createStorageNamespace(rb) {
|
|
|
9232
9667
|
restore: async (id, options) => {
|
|
9233
9668
|
return rb.execute(
|
|
9234
9669
|
patchAdminStorageFilesByIdRestore,
|
|
9235
|
-
{ path: { id }, body: { data: { id, type: "
|
|
9670
|
+
{ path: { id }, body: { data: { id, type: "storage-file" } } },
|
|
9236
9671
|
options
|
|
9237
9672
|
);
|
|
9238
9673
|
},
|
|
@@ -9245,7 +9680,7 @@ function createStorageNamespace(rb) {
|
|
|
9245
9680
|
body: {
|
|
9246
9681
|
data: {
|
|
9247
9682
|
id,
|
|
9248
|
-
type: "
|
|
9683
|
+
type: "storage-file",
|
|
9249
9684
|
attributes: attributes ?? {}
|
|
9250
9685
|
}
|
|
9251
9686
|
}
|
|
@@ -9257,7 +9692,7 @@ function createStorageNamespace(rb) {
|
|
|
9257
9692
|
softDelete: async (id, options) => {
|
|
9258
9693
|
return rb.execute(
|
|
9259
9694
|
patchAdminStorageFilesByIdSoftDelete,
|
|
9260
|
-
{ path: { id }, body: { data: { id, type: "
|
|
9695
|
+
{ path: { id }, body: { data: { id, type: "storage-file" } } },
|
|
9261
9696
|
options
|
|
9262
9697
|
);
|
|
9263
9698
|
},
|
|
@@ -9268,7 +9703,7 @@ function createStorageNamespace(rb) {
|
|
|
9268
9703
|
{
|
|
9269
9704
|
path: { id },
|
|
9270
9705
|
body: {
|
|
9271
|
-
data: { id, type: "
|
|
9706
|
+
data: { id, type: "storage-file", attributes: { tags } }
|
|
9272
9707
|
}
|
|
9273
9708
|
},
|
|
9274
9709
|
options
|
|
@@ -9283,7 +9718,7 @@ function createStorageNamespace(rb) {
|
|
|
9283
9718
|
body: {
|
|
9284
9719
|
data: {
|
|
9285
9720
|
id,
|
|
9286
|
-
type: "
|
|
9721
|
+
type: "storage-file",
|
|
9287
9722
|
attributes: { new_metadata: newMetadata }
|
|
9288
9723
|
}
|
|
9289
9724
|
}
|
|
@@ -9763,6 +10198,132 @@ function createVoiceNamespace(rb) {
|
|
|
9763
10198
|
options
|
|
9764
10199
|
);
|
|
9765
10200
|
}
|
|
10201
|
+
},
|
|
10202
|
+
/**
|
|
10203
|
+
* Transcription job management — admin view.
|
|
10204
|
+
*
|
|
10205
|
+
* Transcription jobs enable chunked, progressive transcription of long
|
|
10206
|
+
* audio recordings. Each job tracks uploaded chunks, assembly status,
|
|
10207
|
+
* and the final assembled transcript.
|
|
10208
|
+
*/
|
|
10209
|
+
transcriptionJobs: {
|
|
10210
|
+
/**
|
|
10211
|
+
* List transcription jobs across all workspaces.
|
|
10212
|
+
*
|
|
10213
|
+
* @param options - Optional pagination and request options.
|
|
10214
|
+
* @returns Array of TranscriptionJob objects.
|
|
10215
|
+
*
|
|
10216
|
+
* @example
|
|
10217
|
+
* ```typescript
|
|
10218
|
+
* const jobs = await admin.voice.transcriptionJobs.list();
|
|
10219
|
+
* ```
|
|
10220
|
+
*/
|
|
10221
|
+
list: async (options) => {
|
|
10222
|
+
return rb.execute(
|
|
10223
|
+
getAdminVoiceTranscriptionJobs,
|
|
10224
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
10225
|
+
options
|
|
10226
|
+
);
|
|
10227
|
+
},
|
|
10228
|
+
/**
|
|
10229
|
+
* Retrieve a single transcription job by ID.
|
|
10230
|
+
*
|
|
10231
|
+
* @param id - The UUID of the transcription job.
|
|
10232
|
+
* @param options - Optional request options.
|
|
10233
|
+
* @returns The TranscriptionJob.
|
|
10234
|
+
*
|
|
10235
|
+
* @example
|
|
10236
|
+
* ```typescript
|
|
10237
|
+
* const job = await admin.voice.transcriptionJobs.get('job-uuid');
|
|
10238
|
+
* ```
|
|
10239
|
+
*/
|
|
10240
|
+
get: async (id, options) => {
|
|
10241
|
+
return rb.execute(
|
|
10242
|
+
getAdminVoiceTranscriptionJobsById,
|
|
10243
|
+
{ path: { id } },
|
|
10244
|
+
options
|
|
10245
|
+
);
|
|
10246
|
+
},
|
|
10247
|
+
/**
|
|
10248
|
+
* List transcription jobs owned by the current actor.
|
|
10249
|
+
*
|
|
10250
|
+
* @param options - Optional pagination and request options.
|
|
10251
|
+
* @returns Array of TranscriptionJob objects.
|
|
10252
|
+
*
|
|
10253
|
+
* @example
|
|
10254
|
+
* ```typescript
|
|
10255
|
+
* const myJobs = await admin.voice.transcriptionJobs.listMine();
|
|
10256
|
+
* ```
|
|
10257
|
+
*/
|
|
10258
|
+
listMine: async (options) => {
|
|
10259
|
+
return rb.execute(
|
|
10260
|
+
getAdminVoiceTranscriptionJobsMine,
|
|
10261
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
10262
|
+
options
|
|
10263
|
+
);
|
|
10264
|
+
},
|
|
10265
|
+
/**
|
|
10266
|
+
* List transcription jobs in a specific workspace.
|
|
10267
|
+
*
|
|
10268
|
+
* @param workspaceId - The UUID of the workspace.
|
|
10269
|
+
* @param options - Optional pagination and request options.
|
|
10270
|
+
* @returns Array of TranscriptionJob objects in the workspace.
|
|
10271
|
+
*
|
|
10272
|
+
* @example
|
|
10273
|
+
* ```typescript
|
|
10274
|
+
* const jobs = await admin.voice.transcriptionJobs.listByWorkspace('ws-uuid');
|
|
10275
|
+
* ```
|
|
10276
|
+
*/
|
|
10277
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
10278
|
+
return rb.execute(
|
|
10279
|
+
getAdminVoiceTranscriptionJobsWorkspaceByWorkspaceId,
|
|
10280
|
+
{
|
|
10281
|
+
path: { workspace_id: workspaceId },
|
|
10282
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
10283
|
+
},
|
|
10284
|
+
options
|
|
10285
|
+
);
|
|
10286
|
+
},
|
|
10287
|
+
/**
|
|
10288
|
+
* Create a new transcription job.
|
|
10289
|
+
*
|
|
10290
|
+
* @param data - Job creation attributes (language, model_size, etc.).
|
|
10291
|
+
* @param options - Optional request options.
|
|
10292
|
+
* @returns The created TranscriptionJob.
|
|
10293
|
+
*
|
|
10294
|
+
* @example
|
|
10295
|
+
* ```typescript
|
|
10296
|
+
* const job = await admin.voice.transcriptionJobs.create({
|
|
10297
|
+
* language: "en",
|
|
10298
|
+
* model_size: "large-v3",
|
|
10299
|
+
* });
|
|
10300
|
+
* ```
|
|
10301
|
+
*/
|
|
10302
|
+
create: async (data, options) => {
|
|
10303
|
+
return rb.execute(
|
|
10304
|
+
postAdminVoiceTranscriptionJobs,
|
|
10305
|
+
{ body: { data: { type: "transcription-job", attributes: data } } },
|
|
10306
|
+
options
|
|
10307
|
+
);
|
|
10308
|
+
},
|
|
10309
|
+
/**
|
|
10310
|
+
* Delete a transcription job by ID.
|
|
10311
|
+
*
|
|
10312
|
+
* @param id - The UUID of the transcription job to delete.
|
|
10313
|
+
* @param options - Optional request options.
|
|
10314
|
+
*
|
|
10315
|
+
* @example
|
|
10316
|
+
* ```typescript
|
|
10317
|
+
* await admin.voice.transcriptionJobs.destroy('job-uuid');
|
|
10318
|
+
* ```
|
|
10319
|
+
*/
|
|
10320
|
+
destroy: async (id, options) => {
|
|
10321
|
+
return rb.execute(
|
|
10322
|
+
deleteAdminVoiceTranscriptionJobsById,
|
|
10323
|
+
{ path: { id } },
|
|
10324
|
+
options
|
|
10325
|
+
);
|
|
10326
|
+
}
|
|
9766
10327
|
}
|
|
9767
10328
|
};
|
|
9768
10329
|
}
|
|
@@ -9964,7 +10525,7 @@ function createWebhooksNamespace(rb) {
|
|
|
9964
10525
|
{
|
|
9965
10526
|
body: {
|
|
9966
10527
|
data: {
|
|
9967
|
-
type: "
|
|
10528
|
+
type: "webhook-config",
|
|
9968
10529
|
attributes: {
|
|
9969
10530
|
name,
|
|
9970
10531
|
url,
|
|
@@ -10009,7 +10570,7 @@ function createWebhooksNamespace(rb) {
|
|
|
10009
10570
|
patchAdminWebhookConfigsById,
|
|
10010
10571
|
{
|
|
10011
10572
|
path: { id },
|
|
10012
|
-
body: { data: { id, type: "
|
|
10573
|
+
body: { data: { id, type: "webhook-config", attributes } }
|
|
10013
10574
|
},
|
|
10014
10575
|
options
|
|
10015
10576
|
);
|
|
@@ -10157,68 +10718,933 @@ function createWebhooksNamespace(rb) {
|
|
|
10157
10718
|
},
|
|
10158
10719
|
deliveries: {
|
|
10159
10720
|
/**
|
|
10160
|
-
* Lists all webhook delivery records across all configurations.
|
|
10161
|
-
*
|
|
10162
|
-
* Each delivery record tracks the attempt count, status, payload, and
|
|
10163
|
-
* response for a single event dispatch.
|
|
10721
|
+
* Lists all webhook delivery records across all configurations.
|
|
10722
|
+
*
|
|
10723
|
+
* Each delivery record tracks the attempt count, status, payload, and
|
|
10724
|
+
* response for a single event dispatch.
|
|
10725
|
+
*
|
|
10726
|
+
* @param options - Optional request options.
|
|
10727
|
+
* @returns Array of WebhookDelivery objects.
|
|
10728
|
+
*/
|
|
10729
|
+
list: async (options) => {
|
|
10730
|
+
return rb.execute(
|
|
10731
|
+
getAdminWebhookDeliveries,
|
|
10732
|
+
{},
|
|
10733
|
+
options
|
|
10734
|
+
);
|
|
10735
|
+
},
|
|
10736
|
+
/**
|
|
10737
|
+
* Fetches a single delivery record by ID.
|
|
10738
|
+
*
|
|
10739
|
+
* @param id - WebhookDelivery ID.
|
|
10740
|
+
* @param options - Optional request options.
|
|
10741
|
+
* @returns The WebhookDelivery.
|
|
10742
|
+
*/
|
|
10743
|
+
get: async (id, options) => {
|
|
10744
|
+
return rb.execute(
|
|
10745
|
+
getAdminWebhookDeliveriesById,
|
|
10746
|
+
{ path: { id } },
|
|
10747
|
+
options
|
|
10748
|
+
);
|
|
10749
|
+
},
|
|
10750
|
+
/**
|
|
10751
|
+
* Re-enqueues a failed or pending delivery for immediate re-dispatch.
|
|
10752
|
+
*
|
|
10753
|
+
* Sets the delivery status to `retrying` and inserts a new WebhookSender
|
|
10754
|
+
* Oban job. Use this to recover from transient endpoint failures without
|
|
10755
|
+
* waiting for the automatic retry schedule.
|
|
10756
|
+
*
|
|
10757
|
+
* @param id - WebhookDelivery ID.
|
|
10758
|
+
* @param options - Optional request options.
|
|
10759
|
+
* @returns Updated WebhookDelivery with status `retrying`.
|
|
10760
|
+
*/
|
|
10761
|
+
retry: async (id, options) => {
|
|
10762
|
+
return rb.execute(
|
|
10763
|
+
postAdminWebhookDeliveriesByIdRetry,
|
|
10764
|
+
{ path: { id }, body: {} },
|
|
10765
|
+
options
|
|
10766
|
+
);
|
|
10767
|
+
},
|
|
10768
|
+
/**
|
|
10769
|
+
* Sets multiple delivery records to `retrying` status in bulk.
|
|
10770
|
+
*
|
|
10771
|
+
* Authorization is actor-scoped — only deliveries the actor can update
|
|
10772
|
+
* are affected. Use this to recover from endpoint outages without
|
|
10773
|
+
* retrying each delivery individually.
|
|
10774
|
+
*
|
|
10775
|
+
* @param ids - Array of WebhookDelivery IDs to retry.
|
|
10776
|
+
* @param options - Optional request options.
|
|
10777
|
+
* @returns An object with `success: true` and the count of queued retries.
|
|
10778
|
+
*/
|
|
10779
|
+
bulkRetry: async (ids, options) => {
|
|
10780
|
+
return rb.execute(
|
|
10781
|
+
postAdminWebhookDeliveriesBulkRetry,
|
|
10782
|
+
{ body: { data: { ids } } },
|
|
10783
|
+
options
|
|
10784
|
+
);
|
|
10785
|
+
}
|
|
10786
|
+
}
|
|
10787
|
+
};
|
|
10788
|
+
}
|
|
10789
|
+
|
|
10790
|
+
// src/namespaces/campaigns.ts
|
|
10791
|
+
function createCampaignsNamespace(rb) {
|
|
10792
|
+
return {
|
|
10793
|
+
/**
|
|
10794
|
+
* Campaigns -- email campaign orchestration.
|
|
10795
|
+
*
|
|
10796
|
+
* A campaign represents a single bulk email send (or a scheduled future
|
|
10797
|
+
* send) targeting a list of recipients. Campaigns can be created from
|
|
10798
|
+
* templates, analysed with AI for performance insights, have their send
|
|
10799
|
+
* times AI-optimised, and spawn follow-up campaigns automatically.
|
|
10800
|
+
*/
|
|
10801
|
+
campaigns: {
|
|
10802
|
+
/**
|
|
10803
|
+
* Fetch a single campaign by its unique ID.
|
|
10804
|
+
*
|
|
10805
|
+
* @param id - The unique identifier of the campaign to retrieve.
|
|
10806
|
+
* @param options - Optional request-level overrides.
|
|
10807
|
+
* @returns A promise that resolves to the matching {@link Campaign}.
|
|
10808
|
+
*/
|
|
10809
|
+
get: async (id, options) => {
|
|
10810
|
+
return rb.execute(
|
|
10811
|
+
getAdminEmailMarketingCampaignsById,
|
|
10812
|
+
{ path: { id } },
|
|
10813
|
+
options
|
|
10814
|
+
);
|
|
10815
|
+
},
|
|
10816
|
+
/**
|
|
10817
|
+
* List campaigns for a workspace with optional pagination.
|
|
10818
|
+
*
|
|
10819
|
+
* @param workspaceId - The ID of the workspace whose campaigns to list.
|
|
10820
|
+
* @param options - Optional pagination controls and request-level overrides.
|
|
10821
|
+
* @returns A promise that resolves to an array of {@link Campaign} records.
|
|
10822
|
+
*/
|
|
10823
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
10824
|
+
return rb.execute(
|
|
10825
|
+
getAdminEmailMarketingCampaignsWorkspaceByWorkspaceId,
|
|
10826
|
+
{
|
|
10827
|
+
path: { workspace_id: workspaceId },
|
|
10828
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
10829
|
+
},
|
|
10830
|
+
options
|
|
10831
|
+
);
|
|
10832
|
+
},
|
|
10833
|
+
/**
|
|
10834
|
+
* Create a new email campaign.
|
|
10835
|
+
*
|
|
10836
|
+
* @param attributes - Campaign attributes including `workspace_id`, `name`, and `template_id`.
|
|
10837
|
+
* @param options - Optional request-level overrides.
|
|
10838
|
+
* @returns A promise that resolves to the newly created {@link Campaign}.
|
|
10839
|
+
*/
|
|
10840
|
+
create: async (attributes, options) => {
|
|
10841
|
+
return rb.execute(
|
|
10842
|
+
postAdminEmailMarketingCampaigns,
|
|
10843
|
+
{ body: { data: { type: "campaign", attributes } } },
|
|
10844
|
+
options
|
|
10845
|
+
);
|
|
10846
|
+
},
|
|
10847
|
+
/**
|
|
10848
|
+
* Update an existing campaign's attributes (PATCH semantics).
|
|
10849
|
+
*
|
|
10850
|
+
* @param id - The unique identifier of the campaign to update.
|
|
10851
|
+
* @param attributes - Key/value map of attributes to change.
|
|
10852
|
+
* @param options - Optional request-level overrides.
|
|
10853
|
+
* @returns A promise that resolves to the updated {@link Campaign}.
|
|
10854
|
+
*/
|
|
10855
|
+
update: async (id, attributes, options) => {
|
|
10856
|
+
return rb.execute(
|
|
10857
|
+
patchAdminEmailMarketingCampaignsById,
|
|
10858
|
+
{
|
|
10859
|
+
path: { id },
|
|
10860
|
+
body: {
|
|
10861
|
+
data: { id, type: "campaign", attributes }
|
|
10862
|
+
}
|
|
10863
|
+
},
|
|
10864
|
+
options
|
|
10865
|
+
);
|
|
10866
|
+
},
|
|
10867
|
+
/**
|
|
10868
|
+
* Trigger immediate delivery of a campaign to all recipients.
|
|
10869
|
+
*
|
|
10870
|
+
* @param id - The unique identifier of the campaign to send.
|
|
10871
|
+
* @param options - Optional request-level overrides.
|
|
10872
|
+
* @returns A promise that resolves to the updated {@link Campaign}.
|
|
10873
|
+
*/
|
|
10874
|
+
send: async (id, options) => {
|
|
10875
|
+
return rb.execute(
|
|
10876
|
+
postAdminEmailMarketingCampaignsByIdSend,
|
|
10877
|
+
{ path: { id }, body: {} },
|
|
10878
|
+
options
|
|
10879
|
+
);
|
|
10880
|
+
},
|
|
10881
|
+
/**
|
|
10882
|
+
* Request an AI-powered performance analysis of a sent campaign.
|
|
10883
|
+
*
|
|
10884
|
+
* @param id - The unique identifier of the campaign to analyse.
|
|
10885
|
+
* @param options - Optional request-level overrides.
|
|
10886
|
+
* @returns A promise that resolves to the AI-generated analysis report payload.
|
|
10887
|
+
*/
|
|
10888
|
+
analyze: async (id, options) => {
|
|
10889
|
+
return rb.execute(
|
|
10890
|
+
postAdminEmailMarketingCampaignsByIdAnalyze,
|
|
10891
|
+
{ path: { id }, body: {} },
|
|
10892
|
+
options
|
|
10893
|
+
);
|
|
10894
|
+
},
|
|
10895
|
+
/**
|
|
10896
|
+
* Use AI to determine the optimal send time for a campaign.
|
|
10897
|
+
*
|
|
10898
|
+
* @param id - The unique identifier of the campaign to optimise.
|
|
10899
|
+
* @param options - Optional request-level overrides.
|
|
10900
|
+
* @returns A promise that resolves to the optimisation result payload.
|
|
10901
|
+
*/
|
|
10902
|
+
optimizeSendTimes: async (id, options) => {
|
|
10903
|
+
return rb.execute(
|
|
10904
|
+
postAdminEmailMarketingCampaignsByIdOptimizeSendTimes,
|
|
10905
|
+
{ path: { id }, body: {} },
|
|
10906
|
+
options
|
|
10907
|
+
);
|
|
10908
|
+
},
|
|
10909
|
+
/**
|
|
10910
|
+
* Create a follow-up campaign targeted at non-engaged recipients.
|
|
10911
|
+
*
|
|
10912
|
+
* @param id - The ID of the original campaign to follow up on.
|
|
10913
|
+
* @param attributes - Additional attributes for the follow-up campaign.
|
|
10914
|
+
* @param options - Optional request-level overrides.
|
|
10915
|
+
* @returns A promise that resolves to the newly created follow-up {@link Campaign}.
|
|
10916
|
+
*/
|
|
10917
|
+
createFollowup: async (id, attributes, options) => {
|
|
10918
|
+
return rb.execute(
|
|
10919
|
+
postAdminEmailMarketingCampaignsByIdCreateFollowup,
|
|
10920
|
+
{
|
|
10921
|
+
path: { id },
|
|
10922
|
+
body: { data: { type: "campaign", ...attributes } }
|
|
10923
|
+
},
|
|
10924
|
+
options
|
|
10925
|
+
);
|
|
10926
|
+
},
|
|
10927
|
+
/**
|
|
10928
|
+
* Import recipients from a CSV file stored in platform storage.
|
|
10929
|
+
*
|
|
10930
|
+
* @param id - The campaign ID to import recipients into.
|
|
10931
|
+
* @param attributes - Import configuration including `csv_storage_key` and `workspace_id`.
|
|
10932
|
+
* @param options - Optional request-level overrides.
|
|
10933
|
+
* @returns A promise resolving to the import job details.
|
|
10934
|
+
*/
|
|
10935
|
+
importRecipients: async (id, attributes, options) => {
|
|
10936
|
+
return rb.execute(
|
|
10937
|
+
postAdminEmailMarketingCampaignsByIdImportRecipients,
|
|
10938
|
+
{ path: { id }, body: { data: { type: "campaign", attributes } } },
|
|
10939
|
+
options
|
|
10940
|
+
);
|
|
10941
|
+
},
|
|
10942
|
+
/**
|
|
10943
|
+
* Trigger AI-powered email generation for all campaign recipients.
|
|
10944
|
+
*
|
|
10945
|
+
* @param id - The campaign ID to generate emails for.
|
|
10946
|
+
* @param workspaceId - The workspace ID.
|
|
10947
|
+
* @param options - Optional request-level overrides.
|
|
10948
|
+
* @returns A promise resolving to the generation job details.
|
|
10949
|
+
*/
|
|
10950
|
+
generateEmails: async (id, workspaceId, options) => {
|
|
10951
|
+
return rb.execute(
|
|
10952
|
+
postAdminEmailMarketingCampaignsByIdGenerateEmails,
|
|
10953
|
+
{
|
|
10954
|
+
path: { id },
|
|
10955
|
+
body: {
|
|
10956
|
+
data: {
|
|
10957
|
+
type: "campaign",
|
|
10958
|
+
attributes: { workspace_id: workspaceId }
|
|
10959
|
+
}
|
|
10960
|
+
}
|
|
10961
|
+
},
|
|
10962
|
+
options
|
|
10963
|
+
);
|
|
10964
|
+
},
|
|
10965
|
+
/**
|
|
10966
|
+
* Generate A/B test subject line variants using AI.
|
|
10967
|
+
*
|
|
10968
|
+
* @param id - The campaign ID to optimize subjects for.
|
|
10969
|
+
* @param attributes - Subject optimization parameters.
|
|
10970
|
+
* @param options - Optional request-level overrides.
|
|
10971
|
+
* @returns A promise resolving to the optimization result with variant suggestions.
|
|
10972
|
+
*/
|
|
10973
|
+
optimizeSubjects: async (id, attributes, options) => {
|
|
10974
|
+
return rb.execute(
|
|
10975
|
+
postAdminEmailMarketingCampaignsByIdOptimizeSubjects,
|
|
10976
|
+
{
|
|
10977
|
+
path: { id },
|
|
10978
|
+
body: {
|
|
10979
|
+
data: { type: "campaign", attributes }
|
|
10980
|
+
}
|
|
10981
|
+
},
|
|
10982
|
+
options
|
|
10983
|
+
);
|
|
10984
|
+
},
|
|
10985
|
+
/**
|
|
10986
|
+
* Export campaign data (recipients, results, or analytics) as CSV.
|
|
10987
|
+
*
|
|
10988
|
+
* @param id - The campaign ID to export.
|
|
10989
|
+
* @param attributes - Export configuration including `workspace_id`.
|
|
10990
|
+
* @param options - Optional request-level overrides.
|
|
10991
|
+
* @returns A promise resolving to the export job details.
|
|
10992
|
+
*/
|
|
10993
|
+
export: async (id, attributes, options) => {
|
|
10994
|
+
return rb.execute(
|
|
10995
|
+
postAdminEmailMarketingCampaignsByIdExport,
|
|
10996
|
+
{
|
|
10997
|
+
path: { id },
|
|
10998
|
+
body: {
|
|
10999
|
+
data: { type: "campaign", attributes }
|
|
11000
|
+
}
|
|
11001
|
+
},
|
|
11002
|
+
options
|
|
11003
|
+
);
|
|
11004
|
+
},
|
|
11005
|
+
/**
|
|
11006
|
+
* Permanently delete a campaign.
|
|
11007
|
+
*
|
|
11008
|
+
* @param id - The unique identifier of the campaign to delete.
|
|
11009
|
+
* @param options - Optional request-level overrides.
|
|
11010
|
+
* @returns A promise that resolves to `true` on successful deletion.
|
|
11011
|
+
*/
|
|
11012
|
+
delete: async (id, options) => {
|
|
11013
|
+
return rb.executeDelete(
|
|
11014
|
+
deleteAdminEmailMarketingCampaignsById,
|
|
11015
|
+
{ path: { id } },
|
|
11016
|
+
options
|
|
11017
|
+
);
|
|
11018
|
+
}
|
|
11019
|
+
},
|
|
11020
|
+
/**
|
|
11021
|
+
* Templates -- reusable MJML-based email layout templates with versioning.
|
|
11022
|
+
*
|
|
11023
|
+
* Templates define the HTML and/or plain-text structure of an email.
|
|
11024
|
+
* They support live MJML compilation, publish/unpublish lifecycle,
|
|
11025
|
+
* archive/restore, rollback, and immutable version snapshots.
|
|
11026
|
+
*/
|
|
11027
|
+
templates: {
|
|
11028
|
+
/**
|
|
11029
|
+
* Fetch a single template by its unique ID.
|
|
11030
|
+
*
|
|
11031
|
+
* @param id - The unique identifier of the template to retrieve.
|
|
11032
|
+
* @param options - Optional request-level overrides.
|
|
11033
|
+
* @returns A promise that resolves to the matching {@link EmailMarketingTemplate}.
|
|
11034
|
+
*/
|
|
11035
|
+
get: async (id, options) => {
|
|
11036
|
+
return rb.execute(
|
|
11037
|
+
getAdminEmailMarketingTemplatesById,
|
|
11038
|
+
{ path: { id } },
|
|
11039
|
+
options
|
|
11040
|
+
);
|
|
11041
|
+
},
|
|
11042
|
+
/**
|
|
11043
|
+
* List all email templates for a workspace with optional pagination.
|
|
11044
|
+
*
|
|
11045
|
+
* @param workspaceId - The ID of the workspace whose templates to list.
|
|
11046
|
+
* @param options - Optional pagination controls and request-level overrides.
|
|
11047
|
+
* @returns A promise that resolves to an array of {@link EmailMarketingTemplate} records.
|
|
11048
|
+
*/
|
|
11049
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
11050
|
+
return rb.execute(
|
|
11051
|
+
getAdminEmailMarketingTemplatesWorkspaceByWorkspaceId,
|
|
11052
|
+
{
|
|
11053
|
+
path: { workspace_id: workspaceId },
|
|
11054
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
11055
|
+
},
|
|
11056
|
+
options
|
|
11057
|
+
);
|
|
11058
|
+
},
|
|
11059
|
+
/**
|
|
11060
|
+
* Create a new email template.
|
|
11061
|
+
*
|
|
11062
|
+
* @param attributes - Template attributes including `name`.
|
|
11063
|
+
* @param options - Optional request-level overrides.
|
|
11064
|
+
* @returns A promise that resolves to the newly created {@link EmailMarketingTemplate}.
|
|
11065
|
+
*/
|
|
11066
|
+
create: async (attributes, options) => {
|
|
11067
|
+
return rb.execute(
|
|
11068
|
+
postAdminEmailMarketingTemplates,
|
|
11069
|
+
{ body: { data: { type: "email-marketing-template", attributes } } },
|
|
11070
|
+
options
|
|
11071
|
+
);
|
|
11072
|
+
},
|
|
11073
|
+
/**
|
|
11074
|
+
* Update an existing template's attributes (PATCH semantics).
|
|
11075
|
+
*
|
|
11076
|
+
* @param id - The unique identifier of the template to update.
|
|
11077
|
+
* @param attributes - Key/value map of attributes to change.
|
|
11078
|
+
* @param options - Optional request-level overrides.
|
|
11079
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingTemplate}.
|
|
11080
|
+
*/
|
|
11081
|
+
update: async (id, attributes, options) => {
|
|
11082
|
+
return rb.execute(
|
|
11083
|
+
patchAdminEmailMarketingTemplatesById,
|
|
11084
|
+
{
|
|
11085
|
+
path: { id },
|
|
11086
|
+
body: {
|
|
11087
|
+
data: { id, type: "email-marketing-template", attributes }
|
|
11088
|
+
}
|
|
11089
|
+
},
|
|
11090
|
+
options
|
|
11091
|
+
);
|
|
11092
|
+
},
|
|
11093
|
+
/**
|
|
11094
|
+
* Permanently delete a template.
|
|
11095
|
+
*
|
|
11096
|
+
* @param id - The unique identifier of the template to delete.
|
|
11097
|
+
* @param options - Optional request-level overrides.
|
|
11098
|
+
* @returns A promise that resolves to `true` on successful deletion.
|
|
11099
|
+
*/
|
|
11100
|
+
delete: async (id, options) => {
|
|
11101
|
+
return rb.executeDelete(
|
|
11102
|
+
deleteAdminEmailMarketingTemplatesById,
|
|
11103
|
+
{ path: { id } },
|
|
11104
|
+
options
|
|
11105
|
+
);
|
|
11106
|
+
},
|
|
11107
|
+
/**
|
|
11108
|
+
* Publish a template, creating an immutable version snapshot.
|
|
11109
|
+
*
|
|
11110
|
+
* @param id - The unique identifier of the template to publish.
|
|
11111
|
+
* @param options - Optional request-level overrides.
|
|
11112
|
+
* @returns A promise that resolves to the published {@link EmailMarketingTemplate}.
|
|
11113
|
+
*/
|
|
11114
|
+
publish: async (id, options) => {
|
|
11115
|
+
return rb.execute(
|
|
11116
|
+
patchAdminEmailMarketingTemplatesByIdPublish,
|
|
11117
|
+
{ path: { id }, body: {} },
|
|
11118
|
+
options
|
|
11119
|
+
);
|
|
11120
|
+
},
|
|
11121
|
+
/**
|
|
11122
|
+
* Unpublish a template, reverting it to draft state.
|
|
11123
|
+
*
|
|
11124
|
+
* @param id - The unique identifier of the template to unpublish.
|
|
11125
|
+
* @param options - Optional request-level overrides.
|
|
11126
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingTemplate}.
|
|
11127
|
+
*/
|
|
11128
|
+
unpublish: async (id, options) => {
|
|
11129
|
+
return rb.execute(
|
|
11130
|
+
patchAdminEmailMarketingTemplatesByIdUnpublish,
|
|
11131
|
+
{ path: { id }, body: {} },
|
|
11132
|
+
options
|
|
11133
|
+
);
|
|
11134
|
+
},
|
|
11135
|
+
/**
|
|
11136
|
+
* Archive a template, removing it from active listings.
|
|
11137
|
+
*
|
|
11138
|
+
* @param id - The unique identifier of the template to archive.
|
|
11139
|
+
* @param options - Optional request-level overrides.
|
|
11140
|
+
* @returns A promise that resolves to the archived {@link EmailMarketingTemplate}.
|
|
11141
|
+
*/
|
|
11142
|
+
archive: async (id, options) => {
|
|
11143
|
+
return rb.execute(
|
|
11144
|
+
patchAdminEmailMarketingTemplatesByIdArchive,
|
|
11145
|
+
{ path: { id }, body: {} },
|
|
11146
|
+
options
|
|
11147
|
+
);
|
|
11148
|
+
},
|
|
11149
|
+
/**
|
|
11150
|
+
* Restore an archived template back to active state.
|
|
11151
|
+
*
|
|
11152
|
+
* @param id - The unique identifier of the template to restore.
|
|
11153
|
+
* @param options - Optional request-level overrides.
|
|
11154
|
+
* @returns A promise that resolves to the restored {@link EmailMarketingTemplate}.
|
|
11155
|
+
*/
|
|
11156
|
+
restore: async (id, options) => {
|
|
11157
|
+
return rb.execute(
|
|
11158
|
+
patchAdminEmailMarketingTemplatesByIdRestore,
|
|
11159
|
+
{ path: { id }, body: {} },
|
|
11160
|
+
options
|
|
11161
|
+
);
|
|
11162
|
+
},
|
|
11163
|
+
/**
|
|
11164
|
+
* Roll back a template's MJML source to a previous version.
|
|
11165
|
+
*
|
|
11166
|
+
* Does NOT auto-publish. Call `publish` after reviewing the restored content.
|
|
11167
|
+
*
|
|
11168
|
+
* @param id - The unique identifier of the template to roll back.
|
|
11169
|
+
* @param versionNumber - The version number to restore from.
|
|
11170
|
+
* @param options - Optional request-level overrides.
|
|
11171
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingTemplate}.
|
|
11172
|
+
*/
|
|
11173
|
+
rollback: async (id, versionNumber, options) => {
|
|
11174
|
+
return rb.execute(
|
|
11175
|
+
patchAdminEmailMarketingTemplatesByIdRollback,
|
|
11176
|
+
{
|
|
11177
|
+
path: { id },
|
|
11178
|
+
body: {
|
|
11179
|
+
data: {
|
|
11180
|
+
id,
|
|
11181
|
+
type: "email-marketing-template",
|
|
11182
|
+
attributes: { version_number: versionNumber }
|
|
11183
|
+
}
|
|
11184
|
+
}
|
|
11185
|
+
},
|
|
11186
|
+
options
|
|
11187
|
+
);
|
|
11188
|
+
},
|
|
11189
|
+
/**
|
|
11190
|
+
* Render a saved template with variable overrides for preview.
|
|
11191
|
+
*
|
|
11192
|
+
* @param id - The unique identifier of the template to preview.
|
|
11193
|
+
* @param variables - Key/value map of variable substitutions.
|
|
11194
|
+
* @param options - Optional request-level overrides.
|
|
11195
|
+
* @returns A promise that resolves to the preview result.
|
|
11196
|
+
*/
|
|
11197
|
+
preview: async (id, variables, options) => {
|
|
11198
|
+
return rb.execute(
|
|
11199
|
+
patchAdminEmailMarketingTemplatesByIdPreview,
|
|
11200
|
+
{
|
|
11201
|
+
path: { id },
|
|
11202
|
+
body: {
|
|
11203
|
+
data: {
|
|
11204
|
+
id,
|
|
11205
|
+
type: "email-marketing-template",
|
|
11206
|
+
attributes: { variables }
|
|
11207
|
+
}
|
|
11208
|
+
}
|
|
11209
|
+
},
|
|
11210
|
+
options
|
|
11211
|
+
);
|
|
11212
|
+
},
|
|
11213
|
+
/**
|
|
11214
|
+
* Stateless MJML compilation. Does not save. Use for live preview in builder UI.
|
|
11215
|
+
*
|
|
11216
|
+
* @param mjml - Raw MJML source string to compile.
|
|
11217
|
+
* @param options - Optional request-level overrides.
|
|
11218
|
+
* @returns A promise resolving to the compilation result including HTML, variables, and errors.
|
|
11219
|
+
*/
|
|
11220
|
+
compile: async (mjml, options) => {
|
|
11221
|
+
return rb.execute(
|
|
11222
|
+
postAdminEmailMarketingTemplatesCompile,
|
|
11223
|
+
{
|
|
11224
|
+
body: {
|
|
11225
|
+
data: {
|
|
11226
|
+
type: "campaign-template",
|
|
11227
|
+
body_mjml: mjml
|
|
11228
|
+
}
|
|
11229
|
+
}
|
|
11230
|
+
},
|
|
11231
|
+
options
|
|
11232
|
+
);
|
|
11233
|
+
},
|
|
11234
|
+
/**
|
|
11235
|
+
* List all version snapshots for a template, ordered by version_number descending.
|
|
11236
|
+
*
|
|
11237
|
+
* @param templateId - The ID of the template whose versions to list.
|
|
11238
|
+
* @param options - Optional request-level overrides.
|
|
11239
|
+
* @returns A promise resolving to an array of {@link EmailTemplateVersion} records.
|
|
11240
|
+
*/
|
|
11241
|
+
versions: async (templateId, options) => {
|
|
11242
|
+
return rb.execute(
|
|
11243
|
+
getAdminEmailTemplateVersionsTemplateByTemplateId,
|
|
11244
|
+
{ path: { template_id: templateId } },
|
|
11245
|
+
options
|
|
11246
|
+
);
|
|
11247
|
+
},
|
|
11248
|
+
/**
|
|
11249
|
+
* Fetch a specific template version by template ID and version number.
|
|
11250
|
+
*
|
|
11251
|
+
* @param templateId - The ID of the template.
|
|
11252
|
+
* @param versionNumber - The version number to fetch.
|
|
11253
|
+
* @param options - Optional request-level overrides.
|
|
11254
|
+
* @returns A promise resolving to the full {@link EmailTemplateVersion}.
|
|
11255
|
+
*/
|
|
11256
|
+
getVersion: async (templateId, versionNumber, options) => {
|
|
11257
|
+
return rb.execute(
|
|
11258
|
+
getAdminEmailTemplateVersionsByTemplateIdVersionsByVersionNumber,
|
|
11259
|
+
{
|
|
11260
|
+
path: {
|
|
11261
|
+
template_id: templateId,
|
|
11262
|
+
version_number: versionNumber
|
|
11263
|
+
}
|
|
11264
|
+
},
|
|
11265
|
+
options
|
|
11266
|
+
);
|
|
11267
|
+
}
|
|
11268
|
+
},
|
|
11269
|
+
/**
|
|
11270
|
+
* Generated Emails -- AI-personalised email drafts awaiting human review.
|
|
11271
|
+
*
|
|
11272
|
+
* When a campaign uses AI personalisation, the platform generates an
|
|
11273
|
+
* individual email draft for each recipient. These drafts sit in a review
|
|
11274
|
+
* queue until a human approves or rejects them.
|
|
11275
|
+
*/
|
|
11276
|
+
generatedEmails: {
|
|
11277
|
+
/**
|
|
11278
|
+
* Fetch a single AI-generated email draft by its unique ID.
|
|
11279
|
+
*
|
|
11280
|
+
* @param id - The unique identifier of the generated email to retrieve.
|
|
11281
|
+
* @param options - Optional request-level overrides.
|
|
11282
|
+
* @returns A promise that resolves to the matching {@link EmailMarketingGeneratedEmail}.
|
|
11283
|
+
*/
|
|
11284
|
+
get: async (id, options) => {
|
|
11285
|
+
return rb.execute(
|
|
11286
|
+
getAdminEmailMarketingGeneratedEmailsById,
|
|
11287
|
+
{ path: { id } },
|
|
11288
|
+
options
|
|
11289
|
+
);
|
|
11290
|
+
},
|
|
11291
|
+
/**
|
|
11292
|
+
* Update an AI-generated email draft before approval.
|
|
11293
|
+
*
|
|
11294
|
+
* @param id - The unique identifier of the generated email to update.
|
|
11295
|
+
* @param attributes - Key/value map of attributes to change (e.g. `subject`, `body`).
|
|
11296
|
+
* @param options - Optional request-level overrides.
|
|
11297
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingGeneratedEmail}.
|
|
11298
|
+
*/
|
|
11299
|
+
update: async (id, attributes, options) => {
|
|
11300
|
+
return rb.execute(
|
|
11301
|
+
patchAdminEmailMarketingGeneratedEmailsById,
|
|
11302
|
+
{
|
|
11303
|
+
path: { id },
|
|
11304
|
+
body: {
|
|
11305
|
+
data: { id, type: "email-marketing-generated-email", attributes }
|
|
11306
|
+
}
|
|
11307
|
+
},
|
|
11308
|
+
options
|
|
11309
|
+
);
|
|
11310
|
+
},
|
|
11311
|
+
/**
|
|
11312
|
+
* Approve a generated email draft and move it to the sending queue.
|
|
11313
|
+
*
|
|
11314
|
+
* @param id - The unique identifier of the generated email to approve.
|
|
11315
|
+
* @param options - Optional request-level overrides.
|
|
11316
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingGeneratedEmail}.
|
|
11317
|
+
*/
|
|
11318
|
+
approve: async (id, options) => {
|
|
11319
|
+
return rb.execute(
|
|
11320
|
+
patchAdminEmailMarketingGeneratedEmailsByIdApprove,
|
|
11321
|
+
{ path: { id }, body: {} },
|
|
11322
|
+
options
|
|
11323
|
+
);
|
|
11324
|
+
},
|
|
11325
|
+
/**
|
|
11326
|
+
* Reject an AI-generated email draft. The email will not be sent.
|
|
11327
|
+
*
|
|
11328
|
+
* @param id - The unique identifier of the generated email to reject.
|
|
11329
|
+
* @param options - Optional request-level overrides.
|
|
11330
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingGeneratedEmail}.
|
|
11331
|
+
*/
|
|
11332
|
+
reject: async (id, options) => {
|
|
11333
|
+
return rb.execute(
|
|
11334
|
+
patchAdminEmailMarketingGeneratedEmailsByIdReject,
|
|
11335
|
+
{ path: { id }, body: {} },
|
|
11336
|
+
options
|
|
11337
|
+
);
|
|
11338
|
+
},
|
|
11339
|
+
/**
|
|
11340
|
+
* Schedule a generated email for delivery at a specific time.
|
|
11341
|
+
*
|
|
11342
|
+
* @param id - The unique identifier of the generated email to schedule.
|
|
11343
|
+
* @param options - Optional request-level overrides.
|
|
11344
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingGeneratedEmail}.
|
|
11345
|
+
*/
|
|
11346
|
+
schedule: async (id, options) => {
|
|
11347
|
+
return rb.execute(
|
|
11348
|
+
patchAdminEmailMarketingGeneratedEmailsByIdSchedule,
|
|
11349
|
+
{ path: { id }, body: {} },
|
|
11350
|
+
options
|
|
11351
|
+
);
|
|
11352
|
+
},
|
|
11353
|
+
/**
|
|
11354
|
+
* List all generated emails for a specific campaign.
|
|
11355
|
+
*
|
|
11356
|
+
* @param campaignId - The ID of the campaign whose generated emails to list.
|
|
11357
|
+
* @param options - Optional pagination controls and request-level overrides.
|
|
11358
|
+
* @returns A promise resolving to an array of {@link EmailMarketingGeneratedEmail}.
|
|
11359
|
+
*/
|
|
11360
|
+
listByCampaign: async (campaignId, options) => {
|
|
11361
|
+
return rb.execute(
|
|
11362
|
+
getAdminEmailMarketingGeneratedEmailsCampaignByCampaignId,
|
|
11363
|
+
{
|
|
11364
|
+
path: { campaign_id: campaignId },
|
|
11365
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
11366
|
+
},
|
|
11367
|
+
options
|
|
11368
|
+
);
|
|
11369
|
+
}
|
|
11370
|
+
},
|
|
11371
|
+
/**
|
|
11372
|
+
* Sequences -- multi-step drip campaign automation.
|
|
11373
|
+
*
|
|
11374
|
+
* A sequence is a timed series of emails automatically sent to enrolled
|
|
11375
|
+
* contacts over days or weeks. Each step in the sequence has a delay and
|
|
11376
|
+
* references a template or inline content.
|
|
11377
|
+
*/
|
|
11378
|
+
sequences: {
|
|
11379
|
+
/**
|
|
11380
|
+
* Fetch a single sequence by its unique ID.
|
|
11381
|
+
*
|
|
11382
|
+
* @param id - The unique identifier of the sequence to retrieve.
|
|
11383
|
+
* @param options - Optional request-level overrides.
|
|
11384
|
+
* @returns A promise that resolves to the matching {@link EmailMarketingSequence}.
|
|
11385
|
+
*/
|
|
11386
|
+
get: async (id, options) => {
|
|
11387
|
+
return rb.execute(
|
|
11388
|
+
getAdminCampaignsSequencesById,
|
|
11389
|
+
{ path: { id } },
|
|
11390
|
+
options
|
|
11391
|
+
);
|
|
11392
|
+
},
|
|
11393
|
+
/**
|
|
11394
|
+
* Create a new email sequence.
|
|
11395
|
+
*
|
|
11396
|
+
* @param attributes - Sequence attributes including `workspace_id` and `name`.
|
|
11397
|
+
* @param options - Optional request-level overrides.
|
|
11398
|
+
* @returns A promise that resolves to the newly created {@link EmailMarketingSequence}.
|
|
11399
|
+
*/
|
|
11400
|
+
create: async (attributes, options) => {
|
|
11401
|
+
return rb.execute(
|
|
11402
|
+
postAdminCampaignsSequences,
|
|
11403
|
+
{ body: { data: { type: "email-marketing-sequence", attributes } } },
|
|
11404
|
+
options
|
|
11405
|
+
);
|
|
11406
|
+
},
|
|
11407
|
+
/**
|
|
11408
|
+
* Update an existing sequence's attributes (PATCH semantics).
|
|
11409
|
+
*
|
|
11410
|
+
* @param id - The unique identifier of the sequence to update.
|
|
11411
|
+
* @param attributes - Key/value map of attributes to change.
|
|
11412
|
+
* @param options - Optional request-level overrides.
|
|
11413
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingSequence}.
|
|
11414
|
+
*/
|
|
11415
|
+
update: async (id, attributes, options) => {
|
|
11416
|
+
return rb.execute(
|
|
11417
|
+
patchAdminCampaignsSequencesById,
|
|
11418
|
+
{
|
|
11419
|
+
path: { id },
|
|
11420
|
+
body: {
|
|
11421
|
+
data: { id, type: "email-marketing-sequence", attributes }
|
|
11422
|
+
}
|
|
11423
|
+
},
|
|
11424
|
+
options
|
|
11425
|
+
);
|
|
11426
|
+
},
|
|
11427
|
+
/**
|
|
11428
|
+
* List all sequences for a workspace with optional pagination.
|
|
11429
|
+
*
|
|
11430
|
+
* @param workspaceId - The ID of the workspace whose sequences to list.
|
|
11431
|
+
* @param options - Optional pagination controls and request-level overrides.
|
|
11432
|
+
* @returns A promise that resolves to an array of {@link EmailMarketingSequence} records.
|
|
11433
|
+
*/
|
|
11434
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
11435
|
+
return rb.execute(
|
|
11436
|
+
getAdminCampaignsSequencesWorkspaceByWorkspaceId,
|
|
11437
|
+
{
|
|
11438
|
+
path: { workspace_id: workspaceId },
|
|
11439
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
11440
|
+
},
|
|
11441
|
+
options
|
|
11442
|
+
);
|
|
11443
|
+
},
|
|
11444
|
+
/**
|
|
11445
|
+
* Permanently delete a sequence.
|
|
11446
|
+
*
|
|
11447
|
+
* @param id - The unique identifier of the sequence to delete.
|
|
11448
|
+
* @param options - Optional request-level overrides.
|
|
11449
|
+
* @returns A promise that resolves to `true` on successful deletion.
|
|
11450
|
+
*/
|
|
11451
|
+
delete: async (id, options) => {
|
|
11452
|
+
return rb.executeDelete(
|
|
11453
|
+
deleteAdminCampaignsSequencesById,
|
|
11454
|
+
{ path: { id } },
|
|
11455
|
+
options
|
|
11456
|
+
);
|
|
11457
|
+
},
|
|
11458
|
+
/**
|
|
11459
|
+
* Activate a sequence to start delivering emails to enrolled contacts.
|
|
11460
|
+
*
|
|
11461
|
+
* @param id - The unique identifier of the sequence to activate.
|
|
11462
|
+
* @param options - Optional request-level overrides.
|
|
11463
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingSequence}.
|
|
11464
|
+
*/
|
|
11465
|
+
activate: async (id, options) => {
|
|
11466
|
+
return rb.execute(
|
|
11467
|
+
patchAdminCampaignsSequencesByIdActivate,
|
|
11468
|
+
{ path: { id }, body: {} },
|
|
11469
|
+
options
|
|
11470
|
+
);
|
|
11471
|
+
},
|
|
11472
|
+
/**
|
|
11473
|
+
* Pause a running sequence, suspending all pending deliveries.
|
|
11474
|
+
*
|
|
11475
|
+
* @param id - The unique identifier of the sequence to pause.
|
|
11476
|
+
* @param options - Optional request-level overrides.
|
|
11477
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingSequence}.
|
|
11478
|
+
*/
|
|
11479
|
+
pause: async (id, options) => {
|
|
11480
|
+
return rb.execute(
|
|
11481
|
+
patchAdminCampaignsSequencesByIdPause,
|
|
11482
|
+
{ path: { id }, body: {} },
|
|
11483
|
+
options
|
|
11484
|
+
);
|
|
11485
|
+
},
|
|
11486
|
+
/**
|
|
11487
|
+
* Mark a sequence as complete, finalizing all deliveries.
|
|
11488
|
+
*
|
|
11489
|
+
* @param id - The unique identifier of the sequence to complete.
|
|
11490
|
+
* @param options - Optional request-level overrides.
|
|
11491
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingSequence}.
|
|
11492
|
+
*/
|
|
11493
|
+
complete: async (id, options) => {
|
|
11494
|
+
return rb.execute(
|
|
11495
|
+
patchAdminCampaignsSequencesByIdComplete,
|
|
11496
|
+
{ path: { id }, body: {} },
|
|
11497
|
+
options
|
|
11498
|
+
);
|
|
11499
|
+
},
|
|
11500
|
+
/**
|
|
11501
|
+
* Resume a paused sequence from where it left off.
|
|
11502
|
+
*
|
|
11503
|
+
* @param id - The unique identifier of the sequence to resume.
|
|
11504
|
+
* @param options - Optional request-level overrides.
|
|
11505
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingSequence}.
|
|
11506
|
+
*/
|
|
11507
|
+
resume: async (id, options) => {
|
|
11508
|
+
return rb.execute(
|
|
11509
|
+
patchAdminCampaignsSequencesByIdResume,
|
|
11510
|
+
{ path: { id }, body: {} },
|
|
11511
|
+
options
|
|
11512
|
+
);
|
|
11513
|
+
}
|
|
11514
|
+
},
|
|
11515
|
+
/**
|
|
11516
|
+
* Recipients -- campaign audience members.
|
|
11517
|
+
*
|
|
11518
|
+
* Each recipient represents one email address on a campaign's send list,
|
|
11519
|
+
* with optional merge fields for personalisation.
|
|
11520
|
+
*/
|
|
11521
|
+
recipients: {
|
|
11522
|
+
/**
|
|
11523
|
+
* Fetch a single recipient by its unique ID.
|
|
11524
|
+
*
|
|
11525
|
+
* @param id - The unique identifier of the recipient.
|
|
11526
|
+
* @param options - Optional request-level overrides.
|
|
11527
|
+
* @returns A promise resolving to the {@link EmailMarketingRecipient}.
|
|
11528
|
+
*/
|
|
11529
|
+
get: async (id, options) => {
|
|
11530
|
+
return rb.execute(
|
|
11531
|
+
getAdminCampaignsRecipientsById,
|
|
11532
|
+
{ path: { id } },
|
|
11533
|
+
options
|
|
11534
|
+
);
|
|
11535
|
+
},
|
|
11536
|
+
/**
|
|
11537
|
+
* List all recipients for a specific campaign.
|
|
10164
11538
|
*
|
|
10165
|
-
* @param
|
|
10166
|
-
* @
|
|
11539
|
+
* @param campaignId - The ID of the campaign whose recipients to list.
|
|
11540
|
+
* @param options - Optional pagination controls and request-level overrides.
|
|
11541
|
+
* @returns A promise resolving to an array of {@link EmailMarketingRecipient} records.
|
|
10167
11542
|
*/
|
|
10168
|
-
|
|
11543
|
+
listByCampaign: async (campaignId, options) => {
|
|
10169
11544
|
return rb.execute(
|
|
10170
|
-
|
|
10171
|
-
{
|
|
11545
|
+
getAdminCampaignsRecipientsCampaignByCampaignId,
|
|
11546
|
+
{
|
|
11547
|
+
path: { campaign_id: campaignId },
|
|
11548
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
11549
|
+
},
|
|
10172
11550
|
options
|
|
10173
11551
|
);
|
|
10174
|
-
}
|
|
11552
|
+
}
|
|
11553
|
+
},
|
|
11554
|
+
/**
|
|
11555
|
+
* Sequence Steps -- individual steps within a drip sequence.
|
|
11556
|
+
*
|
|
11557
|
+
* Each step defines a timed email delivery within a sequence, with a
|
|
11558
|
+
* delay offset and template or inline content.
|
|
11559
|
+
*/
|
|
11560
|
+
sequenceSteps: {
|
|
10175
11561
|
/**
|
|
10176
|
-
*
|
|
11562
|
+
* Fetch a single sequence step by its unique ID.
|
|
10177
11563
|
*
|
|
10178
|
-
* @param id -
|
|
10179
|
-
* @param options - Optional request
|
|
10180
|
-
* @returns
|
|
11564
|
+
* @param id - The unique identifier of the sequence step.
|
|
11565
|
+
* @param options - Optional request-level overrides.
|
|
11566
|
+
* @returns A promise resolving to the {@link EmailMarketingSequenceStep}.
|
|
10181
11567
|
*/
|
|
10182
11568
|
get: async (id, options) => {
|
|
10183
11569
|
return rb.execute(
|
|
10184
|
-
|
|
11570
|
+
getAdminCampaignsSequenceStepsById,
|
|
10185
11571
|
{ path: { id } },
|
|
10186
11572
|
options
|
|
10187
11573
|
);
|
|
10188
11574
|
},
|
|
10189
11575
|
/**
|
|
10190
|
-
*
|
|
11576
|
+
* Create a new step within a sequence.
|
|
10191
11577
|
*
|
|
10192
|
-
*
|
|
10193
|
-
*
|
|
10194
|
-
*
|
|
11578
|
+
* @param attributes - Step attributes including `sequence_id`.
|
|
11579
|
+
* @param options - Optional request-level overrides.
|
|
11580
|
+
* @returns A promise resolving to the newly created {@link EmailMarketingSequenceStep}.
|
|
11581
|
+
*/
|
|
11582
|
+
create: async (attributes, options) => {
|
|
11583
|
+
return rb.execute(
|
|
11584
|
+
postAdminCampaignsSequenceSteps,
|
|
11585
|
+
{
|
|
11586
|
+
body: {
|
|
11587
|
+
data: {
|
|
11588
|
+
type: "email-marketing-sequence-step",
|
|
11589
|
+
attributes
|
|
11590
|
+
}
|
|
11591
|
+
}
|
|
11592
|
+
},
|
|
11593
|
+
options
|
|
11594
|
+
);
|
|
11595
|
+
},
|
|
11596
|
+
/**
|
|
11597
|
+
* Update an existing sequence step's attributes (PATCH semantics).
|
|
10195
11598
|
*
|
|
10196
|
-
* @param id -
|
|
10197
|
-
* @param
|
|
10198
|
-
* @
|
|
11599
|
+
* @param id - The unique identifier of the sequence step to update.
|
|
11600
|
+
* @param attributes - Key/value map of attributes to change.
|
|
11601
|
+
* @param options - Optional request-level overrides.
|
|
11602
|
+
* @returns A promise resolving to the updated {@link EmailMarketingSequenceStep}.
|
|
10199
11603
|
*/
|
|
10200
|
-
|
|
11604
|
+
update: async (id, attributes, options) => {
|
|
10201
11605
|
return rb.execute(
|
|
10202
|
-
|
|
10203
|
-
{
|
|
11606
|
+
patchAdminCampaignsSequenceStepsById,
|
|
11607
|
+
{
|
|
11608
|
+
path: { id },
|
|
11609
|
+
body: {
|
|
11610
|
+
data: {
|
|
11611
|
+
id,
|
|
11612
|
+
type: "email-marketing-sequence-step",
|
|
11613
|
+
attributes
|
|
11614
|
+
}
|
|
11615
|
+
}
|
|
11616
|
+
},
|
|
10204
11617
|
options
|
|
10205
11618
|
);
|
|
10206
11619
|
},
|
|
10207
11620
|
/**
|
|
10208
|
-
*
|
|
11621
|
+
* Permanently delete a sequence step.
|
|
10209
11622
|
*
|
|
10210
|
-
*
|
|
10211
|
-
*
|
|
10212
|
-
*
|
|
11623
|
+
* @param id - The unique identifier of the sequence step to delete.
|
|
11624
|
+
* @param options - Optional request-level overrides.
|
|
11625
|
+
* @returns A promise that resolves to `true` on successful deletion.
|
|
11626
|
+
*/
|
|
11627
|
+
delete: async (id, options) => {
|
|
11628
|
+
return rb.executeDelete(
|
|
11629
|
+
deleteAdminCampaignsSequenceStepsById,
|
|
11630
|
+
{ path: { id } },
|
|
11631
|
+
options
|
|
11632
|
+
);
|
|
11633
|
+
},
|
|
11634
|
+
/**
|
|
11635
|
+
* List all steps in a specific sequence.
|
|
10213
11636
|
*
|
|
10214
|
-
* @param
|
|
10215
|
-
* @param options - Optional request
|
|
10216
|
-
* @returns
|
|
11637
|
+
* @param sequenceId - The ID of the sequence whose steps to list.
|
|
11638
|
+
* @param options - Optional pagination controls and request-level overrides.
|
|
11639
|
+
* @returns A promise resolving to an array of {@link EmailMarketingSequenceStep} records.
|
|
10217
11640
|
*/
|
|
10218
|
-
|
|
11641
|
+
listBySequence: async (sequenceId, options) => {
|
|
10219
11642
|
return rb.execute(
|
|
10220
|
-
|
|
10221
|
-
{
|
|
11643
|
+
getAdminCampaignsSequenceStepsSequenceBySequenceId,
|
|
11644
|
+
{
|
|
11645
|
+
path: { sequence_id: sequenceId },
|
|
11646
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
11647
|
+
},
|
|
10222
11648
|
options
|
|
10223
11649
|
);
|
|
10224
11650
|
}
|
|
@@ -10226,119 +11652,6 @@ function createWebhooksNamespace(rb) {
|
|
|
10226
11652
|
};
|
|
10227
11653
|
}
|
|
10228
11654
|
|
|
10229
|
-
// src/namespaces/campaigns.ts
|
|
10230
|
-
function createCampaignsNamespace(rb) {
|
|
10231
|
-
return {
|
|
10232
|
-
/**
|
|
10233
|
-
* Get a campaign by ID.
|
|
10234
|
-
*
|
|
10235
|
-
* @param id - The unique identifier of the campaign.
|
|
10236
|
-
* @param options - Optional request-level overrides.
|
|
10237
|
-
* @returns A promise resolving to the {@link Campaign}.
|
|
10238
|
-
*
|
|
10239
|
-
* @example
|
|
10240
|
-
* ```typescript
|
|
10241
|
-
* const admin = new GptAdmin({ apiKey: 'sk_srv_...' });
|
|
10242
|
-
* const campaign = await admin.campaigns.get('camp_abc123');
|
|
10243
|
-
* ```
|
|
10244
|
-
*/
|
|
10245
|
-
get: async (id, options) => {
|
|
10246
|
-
return rb.execute(
|
|
10247
|
-
getAdminEmailMarketingCampaignsById,
|
|
10248
|
-
{ path: { id } },
|
|
10249
|
-
options
|
|
10250
|
-
);
|
|
10251
|
-
},
|
|
10252
|
-
/**
|
|
10253
|
-
* List all campaigns for a workspace.
|
|
10254
|
-
*
|
|
10255
|
-
* @param workspaceId - The ID of the workspace to query.
|
|
10256
|
-
* @param options - Optional pagination and request options.
|
|
10257
|
-
* @returns A promise resolving to an array of {@link Campaign} records.
|
|
10258
|
-
*
|
|
10259
|
-
* @example
|
|
10260
|
-
* ```typescript
|
|
10261
|
-
* const admin = new GptAdmin({ apiKey: 'sk_srv_...' });
|
|
10262
|
-
* const campaigns = await admin.campaigns.listByWorkspace('ws_abc123');
|
|
10263
|
-
* ```
|
|
10264
|
-
*/
|
|
10265
|
-
listByWorkspace: async (workspaceId, options) => {
|
|
10266
|
-
return rb.execute(
|
|
10267
|
-
getAdminEmailMarketingCampaignsWorkspaceByWorkspaceId,
|
|
10268
|
-
{
|
|
10269
|
-
path: { workspace_id: workspaceId },
|
|
10270
|
-
...buildPageQuery(options?.page, options?.pageSize)
|
|
10271
|
-
},
|
|
10272
|
-
options
|
|
10273
|
-
);
|
|
10274
|
-
},
|
|
10275
|
-
/**
|
|
10276
|
-
* Create a new campaign.
|
|
10277
|
-
*
|
|
10278
|
-
* @param attributes - Campaign attributes including `workspace_id`, `name`, `template_id`.
|
|
10279
|
-
* @param options - Optional request-level overrides.
|
|
10280
|
-
* @returns A promise resolving to the newly created {@link Campaign}.
|
|
10281
|
-
*
|
|
10282
|
-
* @example
|
|
10283
|
-
* ```typescript
|
|
10284
|
-
* const admin = new GptAdmin({ apiKey: 'sk_srv_...' });
|
|
10285
|
-
* const campaign = await admin.campaigns.create({
|
|
10286
|
-
* workspace_id: 'ws_abc123',
|
|
10287
|
-
* name: 'Q1 Outreach',
|
|
10288
|
-
* template_id: 'tmpl_xyz',
|
|
10289
|
-
* });
|
|
10290
|
-
* ```
|
|
10291
|
-
*/
|
|
10292
|
-
create: async (attributes, options) => {
|
|
10293
|
-
return rb.execute(
|
|
10294
|
-
postAdminEmailMarketingCampaigns,
|
|
10295
|
-
{ body: { data: { type: "campaign", attributes } } },
|
|
10296
|
-
options
|
|
10297
|
-
);
|
|
10298
|
-
},
|
|
10299
|
-
/**
|
|
10300
|
-
* Trigger sending for an approved campaign.
|
|
10301
|
-
*
|
|
10302
|
-
* @param id - The ID of the campaign to send.
|
|
10303
|
-
* @param options - Optional request-level overrides.
|
|
10304
|
-
* @returns A promise resolving to the updated {@link Campaign}.
|
|
10305
|
-
*
|
|
10306
|
-
* @example
|
|
10307
|
-
* ```typescript
|
|
10308
|
-
* const admin = new GptAdmin({ apiKey: 'sk_srv_...' });
|
|
10309
|
-
* await admin.campaigns.send('camp_abc123');
|
|
10310
|
-
* ```
|
|
10311
|
-
*/
|
|
10312
|
-
send: async (id, options) => {
|
|
10313
|
-
return rb.execute(
|
|
10314
|
-
postAdminEmailMarketingCampaignsByIdSend,
|
|
10315
|
-
{ path: { id }, body: {} },
|
|
10316
|
-
options
|
|
10317
|
-
);
|
|
10318
|
-
},
|
|
10319
|
-
/**
|
|
10320
|
-
* Delete a campaign.
|
|
10321
|
-
*
|
|
10322
|
-
* @param id - The unique identifier of the campaign to delete.
|
|
10323
|
-
* @param options - Optional request-level overrides.
|
|
10324
|
-
* @returns A promise that resolves to `true` on successful deletion.
|
|
10325
|
-
*
|
|
10326
|
-
* @example
|
|
10327
|
-
* ```typescript
|
|
10328
|
-
* const admin = new GptAdmin({ apiKey: 'sk_srv_...' });
|
|
10329
|
-
* await admin.campaigns.delete('camp_abc123');
|
|
10330
|
-
* ```
|
|
10331
|
-
*/
|
|
10332
|
-
delete: async (id, options) => {
|
|
10333
|
-
return rb.executeDelete(
|
|
10334
|
-
deleteAdminEmailMarketingCampaignsById,
|
|
10335
|
-
{ path: { id } },
|
|
10336
|
-
options
|
|
10337
|
-
);
|
|
10338
|
-
}
|
|
10339
|
-
};
|
|
10340
|
-
}
|
|
10341
|
-
|
|
10342
11655
|
// src/namespaces/email.ts
|
|
10343
11656
|
function createEmailNamespace(rb) {
|
|
10344
11657
|
return {
|
|
@@ -10410,7 +11723,7 @@ function createEmailNamespace(rb) {
|
|
|
10410
11723
|
create: async (attributes, options) => {
|
|
10411
11724
|
return rb.execute(
|
|
10412
11725
|
postAdminEmailOutboundEmails,
|
|
10413
|
-
{ body: { data: { type: "
|
|
11726
|
+
{ body: { data: { type: "email-outbound-email", attributes } } },
|
|
10414
11727
|
options
|
|
10415
11728
|
);
|
|
10416
11729
|
},
|
|
@@ -10502,7 +11815,11 @@ function createEmailNamespace(rb) {
|
|
|
10502
11815
|
create: async (attributes, options) => {
|
|
10503
11816
|
return rb.execute(
|
|
10504
11817
|
postAdminEmailMarketingSenderProfiles,
|
|
10505
|
-
{
|
|
11818
|
+
{
|
|
11819
|
+
body: {
|
|
11820
|
+
data: { type: "email-marketing-sender-profile", attributes }
|
|
11821
|
+
}
|
|
11822
|
+
},
|
|
10506
11823
|
options
|
|
10507
11824
|
);
|
|
10508
11825
|
},
|
|
@@ -10527,7 +11844,9 @@ function createEmailNamespace(rb) {
|
|
|
10527
11844
|
patchAdminEmailMarketingSenderProfilesById,
|
|
10528
11845
|
{
|
|
10529
11846
|
path: { id },
|
|
10530
|
-
body: {
|
|
11847
|
+
body: {
|
|
11848
|
+
data: { id, type: "email-marketing-sender-profile", attributes }
|
|
11849
|
+
}
|
|
10531
11850
|
},
|
|
10532
11851
|
options
|
|
10533
11852
|
);
|
|
@@ -10695,7 +12014,7 @@ function createBillingNamespace(rb) {
|
|
|
10695
12014
|
body: {
|
|
10696
12015
|
data: {
|
|
10697
12016
|
id: walletId,
|
|
10698
|
-
type: "wallet",
|
|
12017
|
+
type: "wallet-public",
|
|
10699
12018
|
attributes: { plan_slug: planSlug }
|
|
10700
12019
|
}
|
|
10701
12020
|
}
|
|
@@ -10732,7 +12051,7 @@ function createBillingNamespace(rb) {
|
|
|
10732
12051
|
body: {
|
|
10733
12052
|
data: {
|
|
10734
12053
|
id: walletId,
|
|
10735
|
-
type: "wallet",
|
|
12054
|
+
type: "wallet-public",
|
|
10736
12055
|
attributes
|
|
10737
12056
|
}
|
|
10738
12057
|
}
|
|
@@ -10853,7 +12172,7 @@ function createBillingNamespace(rb) {
|
|
|
10853
12172
|
create: async (attrs, options) => {
|
|
10854
12173
|
return rb.execute(
|
|
10855
12174
|
postAdminPricingStrategies,
|
|
10856
|
-
{ body: { data: { type: "
|
|
12175
|
+
{ body: { data: { type: "pricing-strategy", attributes: attrs } } },
|
|
10857
12176
|
options
|
|
10858
12177
|
);
|
|
10859
12178
|
},
|
|
@@ -10868,7 +12187,7 @@ function createBillingNamespace(rb) {
|
|
|
10868
12187
|
patchAdminPricingStrategiesById,
|
|
10869
12188
|
{
|
|
10870
12189
|
path: { id },
|
|
10871
|
-
body: { data: { id, type: "
|
|
12190
|
+
body: { data: { id, type: "pricing-strategy", attributes: attrs } }
|
|
10872
12191
|
},
|
|
10873
12192
|
options
|
|
10874
12193
|
);
|
|
@@ -10911,7 +12230,7 @@ function createBillingNamespace(rb) {
|
|
|
10911
12230
|
postAdminTenantPricingOverrides,
|
|
10912
12231
|
{
|
|
10913
12232
|
body: {
|
|
10914
|
-
data: { type: "
|
|
12233
|
+
data: { type: "tenant-pricing-override", attributes: attrs }
|
|
10915
12234
|
}
|
|
10916
12235
|
},
|
|
10917
12236
|
options
|
|
@@ -10929,7 +12248,7 @@ function createBillingNamespace(rb) {
|
|
|
10929
12248
|
{
|
|
10930
12249
|
path: { id },
|
|
10931
12250
|
body: {
|
|
10932
|
-
data: { id, type: "
|
|
12251
|
+
data: { id, type: "tenant-pricing-override", attributes: attrs }
|
|
10933
12252
|
}
|
|
10934
12253
|
},
|
|
10935
12254
|
options
|
|
@@ -10985,7 +12304,7 @@ function createBillingNamespace(rb) {
|
|
|
10985
12304
|
return rb.execute(
|
|
10986
12305
|
postAdminWholesaleAgreements,
|
|
10987
12306
|
{
|
|
10988
|
-
body: { data: { type: "
|
|
12307
|
+
body: { data: { type: "wholesale-agreement", attributes: attrs } }
|
|
10989
12308
|
},
|
|
10990
12309
|
options
|
|
10991
12310
|
);
|
|
@@ -11002,7 +12321,7 @@ function createBillingNamespace(rb) {
|
|
|
11002
12321
|
{
|
|
11003
12322
|
path: { id },
|
|
11004
12323
|
body: {
|
|
11005
|
-
data: { id, type: "
|
|
12324
|
+
data: { id, type: "wholesale-agreement", attributes: attrs }
|
|
11006
12325
|
}
|
|
11007
12326
|
},
|
|
11008
12327
|
options
|
|
@@ -11137,7 +12456,7 @@ function createBillingNamespace(rb) {
|
|
|
11137
12456
|
postAdminFeatureDefinitions,
|
|
11138
12457
|
{
|
|
11139
12458
|
body: {
|
|
11140
|
-
data: { type: "
|
|
12459
|
+
data: { type: "feature-definition", attributes: attrs }
|
|
11141
12460
|
}
|
|
11142
12461
|
},
|
|
11143
12462
|
options
|
|
@@ -11150,7 +12469,7 @@ function createBillingNamespace(rb) {
|
|
|
11150
12469
|
{
|
|
11151
12470
|
path: { id },
|
|
11152
12471
|
body: {
|
|
11153
|
-
data: { id, type: "
|
|
12472
|
+
data: { id, type: "feature-definition", attributes: attrs }
|
|
11154
12473
|
}
|
|
11155
12474
|
},
|
|
11156
12475
|
options
|
|
@@ -11250,7 +12569,7 @@ function createBillingNamespace(rb) {
|
|
|
11250
12569
|
list: async (options) => {
|
|
11251
12570
|
const result = await rb.execute(
|
|
11252
12571
|
getAdminFeatureUsages,
|
|
11253
|
-
|
|
12572
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
11254
12573
|
options
|
|
11255
12574
|
);
|
|
11256
12575
|
return result.data ?? result;
|
|
@@ -11267,7 +12586,10 @@ function createBillingNamespace(rb) {
|
|
|
11267
12586
|
listByTenant: async (tenantId, options) => {
|
|
11268
12587
|
const result = await rb.execute(
|
|
11269
12588
|
getAdminFeatureUsagesByTenantByTenantId,
|
|
11270
|
-
{
|
|
12589
|
+
{
|
|
12590
|
+
path: { tenant_id: tenantId },
|
|
12591
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
12592
|
+
},
|
|
11271
12593
|
options
|
|
11272
12594
|
);
|
|
11273
12595
|
return result.data ?? result;
|
|
@@ -11295,7 +12617,11 @@ function createBillingNamespace(rb) {
|
|
|
11295
12617
|
* @returns A promise resolving to an array of {@link UsageEvent} objects.
|
|
11296
12618
|
*/
|
|
11297
12619
|
list: async (tenantId, filters, options) => {
|
|
11298
|
-
const
|
|
12620
|
+
const pageQuery = buildPageQuery(filters?.page, filters?.pageSize);
|
|
12621
|
+
const query = {
|
|
12622
|
+
tenant_id: tenantId,
|
|
12623
|
+
...pageQuery.query
|
|
12624
|
+
};
|
|
11299
12625
|
if (filters?.startDate) query.start_date = filters.startDate;
|
|
11300
12626
|
if (filters?.endDate) query.end_date = filters.endDate;
|
|
11301
12627
|
const result = await rb.execute(
|
|
@@ -11332,9 +12658,11 @@ function createBillingNamespace(rb) {
|
|
|
11332
12658
|
* @returns A promise resolving to an array of {@link UsageEvent} objects.
|
|
11333
12659
|
*/
|
|
11334
12660
|
listByUser: async (tenantId, userId, filters, options) => {
|
|
12661
|
+
const pageQuery = buildPageQuery(filters?.page, filters?.pageSize);
|
|
11335
12662
|
const query = {
|
|
11336
12663
|
tenant_id: tenantId,
|
|
11337
|
-
user_id: userId
|
|
12664
|
+
user_id: userId,
|
|
12665
|
+
...pageQuery.query
|
|
11338
12666
|
};
|
|
11339
12667
|
if (filters?.startDate) query.start_date = filters.startDate;
|
|
11340
12668
|
if (filters?.endDate) query.end_date = filters.endDate;
|
|
@@ -11358,7 +12686,11 @@ function createBillingNamespace(rb) {
|
|
|
11358
12686
|
* @returns A promise resolving to an array of {@link UsageEvent} objects.
|
|
11359
12687
|
*/
|
|
11360
12688
|
summary: async (tenantId, filters, options) => {
|
|
11361
|
-
const
|
|
12689
|
+
const pageQuery = buildPageQuery(filters?.page, filters?.pageSize);
|
|
12690
|
+
const query = {
|
|
12691
|
+
tenant_id: tenantId,
|
|
12692
|
+
...pageQuery.query
|
|
12693
|
+
};
|
|
11362
12694
|
if (filters?.startDate) query.start_date = filters.startDate;
|
|
11363
12695
|
if (filters?.endDate) query.end_date = filters.endDate;
|
|
11364
12696
|
const result = await rb.execute(
|
|
@@ -11638,7 +12970,7 @@ function createSocialNamespace(rb) {
|
|
|
11638
12970
|
postAdminSocialAccounts,
|
|
11639
12971
|
{
|
|
11640
12972
|
body: {
|
|
11641
|
-
data: { type: "
|
|
12973
|
+
data: { type: "social-account", attributes }
|
|
11642
12974
|
}
|
|
11643
12975
|
},
|
|
11644
12976
|
options
|
|
@@ -11651,7 +12983,7 @@ function createSocialNamespace(rb) {
|
|
|
11651
12983
|
{
|
|
11652
12984
|
path: { id },
|
|
11653
12985
|
body: {
|
|
11654
|
-
data: { type: "
|
|
12986
|
+
data: { type: "social-account", id, attributes }
|
|
11655
12987
|
}
|
|
11656
12988
|
},
|
|
11657
12989
|
options
|
|
@@ -11672,7 +13004,7 @@ function createSocialNamespace(rb) {
|
|
|
11672
13004
|
{
|
|
11673
13005
|
path: { id },
|
|
11674
13006
|
body: {
|
|
11675
|
-
data: { type: "
|
|
13007
|
+
data: { type: "social-account", id, attributes: {} }
|
|
11676
13008
|
}
|
|
11677
13009
|
},
|
|
11678
13010
|
options
|
|
@@ -11685,7 +13017,7 @@ function createSocialNamespace(rb) {
|
|
|
11685
13017
|
{
|
|
11686
13018
|
path: { id },
|
|
11687
13019
|
body: {
|
|
11688
|
-
data: { type: "
|
|
13020
|
+
data: { type: "social-account", id, attributes: {} }
|
|
11689
13021
|
}
|
|
11690
13022
|
},
|
|
11691
13023
|
options
|
|
@@ -11698,7 +13030,7 @@ function createSocialNamespace(rb) {
|
|
|
11698
13030
|
{
|
|
11699
13031
|
path: { id },
|
|
11700
13032
|
body: {
|
|
11701
|
-
data: { type: "
|
|
13033
|
+
data: { type: "social-account", id, attributes: {} }
|
|
11702
13034
|
}
|
|
11703
13035
|
},
|
|
11704
13036
|
options
|
|
@@ -11713,7 +13045,7 @@ function createSocialNamespace(rb) {
|
|
|
11713
13045
|
postAdminSocialPosts,
|
|
11714
13046
|
{
|
|
11715
13047
|
body: {
|
|
11716
|
-
data: { type: "
|
|
13048
|
+
data: { type: "social-post", attributes }
|
|
11717
13049
|
}
|
|
11718
13050
|
},
|
|
11719
13051
|
options
|
|
@@ -11730,7 +13062,7 @@ function createSocialNamespace(rb) {
|
|
|
11730
13062
|
{
|
|
11731
13063
|
path: { id },
|
|
11732
13064
|
body: {
|
|
11733
|
-
data: { type: "
|
|
13065
|
+
data: { type: "social-post", id, attributes }
|
|
11734
13066
|
}
|
|
11735
13067
|
},
|
|
11736
13068
|
options
|
|
@@ -11752,7 +13084,7 @@ function createSocialNamespace(rb) {
|
|
|
11752
13084
|
path: { id },
|
|
11753
13085
|
body: {
|
|
11754
13086
|
data: {
|
|
11755
|
-
type: "
|
|
13087
|
+
type: "social-post",
|
|
11756
13088
|
id,
|
|
11757
13089
|
attributes: { scheduled_at: scheduledAt }
|
|
11758
13090
|
}
|
|
@@ -11768,7 +13100,7 @@ function createSocialNamespace(rb) {
|
|
|
11768
13100
|
{
|
|
11769
13101
|
path: { id },
|
|
11770
13102
|
body: {
|
|
11771
|
-
data: { type: "
|
|
13103
|
+
data: { type: "social-post", id, attributes: {} }
|
|
11772
13104
|
}
|
|
11773
13105
|
},
|
|
11774
13106
|
options
|
|
@@ -11781,7 +13113,7 @@ function createSocialNamespace(rb) {
|
|
|
11781
13113
|
{
|
|
11782
13114
|
path: { id },
|
|
11783
13115
|
body: {
|
|
11784
|
-
data: { type: "
|
|
13116
|
+
data: { type: "social-post", id, attributes: {} }
|
|
11785
13117
|
}
|
|
11786
13118
|
},
|
|
11787
13119
|
options
|
|
@@ -11794,7 +13126,7 @@ function createSocialNamespace(rb) {
|
|
|
11794
13126
|
{
|
|
11795
13127
|
path: { id },
|
|
11796
13128
|
body: {
|
|
11797
|
-
data: { type: "
|
|
13129
|
+
data: { type: "social-post", id, attributes: {} }
|
|
11798
13130
|
}
|
|
11799
13131
|
},
|
|
11800
13132
|
options
|
|
@@ -11807,7 +13139,7 @@ function createSocialNamespace(rb) {
|
|
|
11807
13139
|
{
|
|
11808
13140
|
path: { id },
|
|
11809
13141
|
body: {
|
|
11810
|
-
data: { type: "
|
|
13142
|
+
data: { type: "social-post", id, attributes }
|
|
11811
13143
|
}
|
|
11812
13144
|
},
|
|
11813
13145
|
options
|
|
@@ -11895,13 +13227,17 @@ function createSocialNamespace(rb) {
|
|
|
11895
13227
|
options
|
|
11896
13228
|
);
|
|
11897
13229
|
},
|
|
11898
|
-
/**
|
|
13230
|
+
/**
|
|
13231
|
+
* Create a new social campaign.
|
|
13232
|
+
* Workspace is resolved from the authenticated actor's context — do NOT
|
|
13233
|
+
* pass `workspace_id` in attributes.
|
|
13234
|
+
*/
|
|
11899
13235
|
create: async (attributes, options) => {
|
|
11900
13236
|
return rb.execute(
|
|
11901
13237
|
postAdminSocialCampaigns,
|
|
11902
13238
|
{
|
|
11903
13239
|
body: {
|
|
11904
|
-
data: { type: "
|
|
13240
|
+
data: { type: "social-campaign", attributes }
|
|
11905
13241
|
}
|
|
11906
13242
|
},
|
|
11907
13243
|
options
|
|
@@ -11914,7 +13250,7 @@ function createSocialNamespace(rb) {
|
|
|
11914
13250
|
{
|
|
11915
13251
|
path: { id },
|
|
11916
13252
|
body: {
|
|
11917
|
-
data: { type: "
|
|
13253
|
+
data: { type: "social-campaign", id, attributes }
|
|
11918
13254
|
}
|
|
11919
13255
|
},
|
|
11920
13256
|
options
|
|
@@ -11936,7 +13272,7 @@ function createSocialNamespace(rb) {
|
|
|
11936
13272
|
path: { id },
|
|
11937
13273
|
body: {
|
|
11938
13274
|
data: {
|
|
11939
|
-
type: "
|
|
13275
|
+
type: "social-campaign",
|
|
11940
13276
|
id,
|
|
11941
13277
|
attributes: { scheduled_at: scheduledAt }
|
|
11942
13278
|
}
|
|
@@ -11952,7 +13288,7 @@ function createSocialNamespace(rb) {
|
|
|
11952
13288
|
{
|
|
11953
13289
|
path: { id },
|
|
11954
13290
|
body: {
|
|
11955
|
-
data: { type: "
|
|
13291
|
+
data: { type: "social-campaign", id, attributes: {} }
|
|
11956
13292
|
}
|
|
11957
13293
|
},
|
|
11958
13294
|
options
|
|
@@ -12223,7 +13559,7 @@ function createConnectorsNamespace(rb) {
|
|
|
12223
13559
|
/** Create a connector instance. */
|
|
12224
13560
|
create: async (attributes, options) => rb.execute(
|
|
12225
13561
|
postAdminConnectors,
|
|
12226
|
-
{ body: { data: { type: "
|
|
13562
|
+
{ body: { data: { type: "connector-instance", attributes } } },
|
|
12227
13563
|
options
|
|
12228
13564
|
),
|
|
12229
13565
|
/** Update a connector instance. */
|
|
@@ -12231,7 +13567,7 @@ function createConnectorsNamespace(rb) {
|
|
|
12231
13567
|
patchAdminConnectorsById,
|
|
12232
13568
|
{
|
|
12233
13569
|
path: { id },
|
|
12234
|
-
body: { data: { type: "
|
|
13570
|
+
body: { data: { type: "connector-instance", id, attributes } }
|
|
12235
13571
|
},
|
|
12236
13572
|
options
|
|
12237
13573
|
),
|
|
@@ -12271,7 +13607,7 @@ function createConnectorsNamespace(rb) {
|
|
|
12271
13607
|
{
|
|
12272
13608
|
body: {
|
|
12273
13609
|
data: {
|
|
12274
|
-
type: "
|
|
13610
|
+
type: "connector-instance",
|
|
12275
13611
|
connector_type: connectorType,
|
|
12276
13612
|
workspace_id: workspaceId
|
|
12277
13613
|
}
|
|
@@ -12285,7 +13621,7 @@ function createConnectorsNamespace(rb) {
|
|
|
12285
13621
|
{
|
|
12286
13622
|
body: {
|
|
12287
13623
|
data: {
|
|
12288
|
-
type: "
|
|
13624
|
+
type: "connector-instance",
|
|
12289
13625
|
connector_type: connectorType,
|
|
12290
13626
|
code,
|
|
12291
13627
|
state,
|
|
@@ -12317,7 +13653,7 @@ function createConnectorsNamespace(rb) {
|
|
|
12317
13653
|
create: async (attributes, options) => rb.execute(
|
|
12318
13654
|
postAdminConnectorsOauthAppConfigs,
|
|
12319
13655
|
{
|
|
12320
|
-
body: { data: { type: "
|
|
13656
|
+
body: { data: { type: "oauth-app-config", attributes } }
|
|
12321
13657
|
},
|
|
12322
13658
|
options
|
|
12323
13659
|
),
|
|
@@ -12326,7 +13662,7 @@ function createConnectorsNamespace(rb) {
|
|
|
12326
13662
|
patchAdminConnectorsOauthAppConfigsById,
|
|
12327
13663
|
{
|
|
12328
13664
|
path: { id },
|
|
12329
|
-
body: { data: { type: "
|
|
13665
|
+
body: { data: { type: "oauth-app-config", id, attributes } }
|
|
12330
13666
|
},
|
|
12331
13667
|
options
|
|
12332
13668
|
),
|
|
@@ -12420,7 +13756,7 @@ function createCrawlerNamespace(rb) {
|
|
|
12420
13756
|
create: async (attributes, options) => {
|
|
12421
13757
|
return rb.execute(
|
|
12422
13758
|
postAdminCrawlerJobs,
|
|
12423
|
-
{ body: { data: { type: "
|
|
13759
|
+
{ body: { data: { type: "crawler-job", attributes } } },
|
|
12424
13760
|
options
|
|
12425
13761
|
);
|
|
12426
13762
|
},
|
|
@@ -12465,7 +13801,7 @@ function createCrawlerNamespace(rb) {
|
|
|
12465
13801
|
postAdminCrawlerSchedules,
|
|
12466
13802
|
{
|
|
12467
13803
|
body: {
|
|
12468
|
-
data: { type: "
|
|
13804
|
+
data: { type: "crawler-schedule", attributes }
|
|
12469
13805
|
}
|
|
12470
13806
|
},
|
|
12471
13807
|
options
|
|
@@ -12478,7 +13814,7 @@ function createCrawlerNamespace(rb) {
|
|
|
12478
13814
|
{
|
|
12479
13815
|
path: { id },
|
|
12480
13816
|
body: {
|
|
12481
|
-
data: { id, type: "
|
|
13817
|
+
data: { id, type: "crawler-schedule", attributes }
|
|
12482
13818
|
}
|
|
12483
13819
|
},
|
|
12484
13820
|
options
|
|
@@ -12556,7 +13892,7 @@ function createCrawlerNamespace(rb) {
|
|
|
12556
13892
|
postAdminCrawlerSiteConfigs,
|
|
12557
13893
|
{
|
|
12558
13894
|
body: {
|
|
12559
|
-
data: { type: "
|
|
13895
|
+
data: { type: "crawler-site-config", attributes }
|
|
12560
13896
|
}
|
|
12561
13897
|
},
|
|
12562
13898
|
options
|
|
@@ -12569,7 +13905,7 @@ function createCrawlerNamespace(rb) {
|
|
|
12569
13905
|
{
|
|
12570
13906
|
path: { id },
|
|
12571
13907
|
body: {
|
|
12572
|
-
data: { id, type: "
|
|
13908
|
+
data: { id, type: "crawler-site-config", attributes }
|
|
12573
13909
|
}
|
|
12574
13910
|
},
|
|
12575
13911
|
options
|
|
@@ -12639,7 +13975,7 @@ function createExtractionNamespace(rb) {
|
|
|
12639
13975
|
{
|
|
12640
13976
|
path: { id },
|
|
12641
13977
|
body: {
|
|
12642
|
-
data: { id, type: "
|
|
13978
|
+
data: { id, type: "extraction-document", attributes }
|
|
12643
13979
|
}
|
|
12644
13980
|
},
|
|
12645
13981
|
options
|
|
@@ -12700,7 +14036,7 @@ function createExtractionNamespace(rb) {
|
|
|
12700
14036
|
{
|
|
12701
14037
|
path: { id },
|
|
12702
14038
|
body: {
|
|
12703
|
-
data: { id, type: "
|
|
14039
|
+
data: { id, type: "extraction-document", attributes }
|
|
12704
14040
|
}
|
|
12705
14041
|
},
|
|
12706
14042
|
options
|
|
@@ -12736,7 +14072,7 @@ function createExtractionNamespace(rb) {
|
|
|
12736
14072
|
postAdminExtractionDocumentsBeginUpload,
|
|
12737
14073
|
{
|
|
12738
14074
|
body: {
|
|
12739
|
-
data: { type: "
|
|
14075
|
+
data: { type: "presigned-url", attributes }
|
|
12740
14076
|
}
|
|
12741
14077
|
},
|
|
12742
14078
|
options
|
|
@@ -12748,7 +14084,7 @@ function createExtractionNamespace(rb) {
|
|
|
12748
14084
|
postAdminExtractionDocumentsFindOrBeginUpload,
|
|
12749
14085
|
{
|
|
12750
14086
|
body: {
|
|
12751
|
-
data: { type: "
|
|
14087
|
+
data: { type: "presigned-url", attributes }
|
|
12752
14088
|
}
|
|
12753
14089
|
},
|
|
12754
14090
|
options
|
|
@@ -12760,7 +14096,7 @@ function createExtractionNamespace(rb) {
|
|
|
12760
14096
|
postAdminExtractionDocumentsUpload,
|
|
12761
14097
|
{
|
|
12762
14098
|
body: {
|
|
12763
|
-
data: { type: "
|
|
14099
|
+
data: { type: "extraction-document", attributes }
|
|
12764
14100
|
}
|
|
12765
14101
|
},
|
|
12766
14102
|
options
|
|
@@ -12773,7 +14109,7 @@ function createExtractionNamespace(rb) {
|
|
|
12773
14109
|
{
|
|
12774
14110
|
body: {
|
|
12775
14111
|
data: {
|
|
12776
|
-
type: "
|
|
14112
|
+
type: "bulk-reprocess-result",
|
|
12777
14113
|
attributes: { ids }
|
|
12778
14114
|
}
|
|
12779
14115
|
}
|
|
@@ -12787,7 +14123,7 @@ function createExtractionNamespace(rb) {
|
|
|
12787
14123
|
postAdminDocumentsBulkDelete,
|
|
12788
14124
|
{
|
|
12789
14125
|
body: {
|
|
12790
|
-
data: { type: "
|
|
14126
|
+
data: { type: "bulk-delete", attributes: { ids } }
|
|
12791
14127
|
}
|
|
12792
14128
|
},
|
|
12793
14129
|
options
|
|
@@ -12882,7 +14218,7 @@ function createExtractionNamespace(rb) {
|
|
|
12882
14218
|
{
|
|
12883
14219
|
path: { id },
|
|
12884
14220
|
body: {
|
|
12885
|
-
data: { id, type: "
|
|
14221
|
+
data: { id, type: "extraction-result", attributes }
|
|
12886
14222
|
}
|
|
12887
14223
|
},
|
|
12888
14224
|
options
|
|
@@ -12927,7 +14263,7 @@ function createExtractionNamespace(rb) {
|
|
|
12927
14263
|
{
|
|
12928
14264
|
path: { id },
|
|
12929
14265
|
body: {
|
|
12930
|
-
data: { id, type: "
|
|
14266
|
+
data: { id, type: "extraction-result", attributes }
|
|
12931
14267
|
}
|
|
12932
14268
|
},
|
|
12933
14269
|
options
|
|
@@ -12940,7 +14276,7 @@ function createExtractionNamespace(rb) {
|
|
|
12940
14276
|
{
|
|
12941
14277
|
path: { id },
|
|
12942
14278
|
body: {
|
|
12943
|
-
data: { id, type: "
|
|
14279
|
+
data: { id, type: "extraction-result", attributes }
|
|
12944
14280
|
}
|
|
12945
14281
|
},
|
|
12946
14282
|
options
|
|
@@ -12979,7 +14315,7 @@ function createExtractionNamespace(rb) {
|
|
|
12979
14315
|
postAdminExtractionBatches,
|
|
12980
14316
|
{
|
|
12981
14317
|
body: {
|
|
12982
|
-
data: { type: "
|
|
14318
|
+
data: { type: "extraction-batch", attributes }
|
|
12983
14319
|
}
|
|
12984
14320
|
},
|
|
12985
14321
|
options
|
|
@@ -13019,7 +14355,7 @@ function createExtractionNamespace(rb) {
|
|
|
13019
14355
|
{
|
|
13020
14356
|
path: { workspace_id: workspaceId },
|
|
13021
14357
|
body: {
|
|
13022
|
-
data: { type: "
|
|
14358
|
+
data: { type: "extraction-export", attributes }
|
|
13023
14359
|
}
|
|
13024
14360
|
},
|
|
13025
14361
|
options
|
|
@@ -13050,7 +14386,7 @@ function createExtractionNamespace(rb) {
|
|
|
13050
14386
|
postAdminExtractionWorkflows,
|
|
13051
14387
|
{
|
|
13052
14388
|
body: {
|
|
13053
|
-
data: { type: "
|
|
14389
|
+
data: { type: "extraction-workflow", attributes }
|
|
13054
14390
|
}
|
|
13055
14391
|
},
|
|
13056
14392
|
options
|
|
@@ -13071,7 +14407,7 @@ function createExtractionNamespace(rb) {
|
|
|
13071
14407
|
{
|
|
13072
14408
|
path: { id },
|
|
13073
14409
|
body: {
|
|
13074
|
-
data: { id, type: "
|
|
14410
|
+
data: { id, type: "extraction-workflow", attributes }
|
|
13075
14411
|
}
|
|
13076
14412
|
},
|
|
13077
14413
|
options
|
|
@@ -13102,7 +14438,7 @@ function createExtractionNamespace(rb) {
|
|
|
13102
14438
|
postAdminExtractionConfigEnums,
|
|
13103
14439
|
{
|
|
13104
14440
|
body: {
|
|
13105
|
-
data: { type: "
|
|
14441
|
+
data: { type: "config-enum", attributes }
|
|
13106
14442
|
}
|
|
13107
14443
|
},
|
|
13108
14444
|
options
|
|
@@ -13123,7 +14459,7 @@ function createExtractionNamespace(rb) {
|
|
|
13123
14459
|
{
|
|
13124
14460
|
path: { id },
|
|
13125
14461
|
body: {
|
|
13126
|
-
data: { id, type: "
|
|
14462
|
+
data: { id, type: "config-enum", attributes }
|
|
13127
14463
|
}
|
|
13128
14464
|
},
|
|
13129
14465
|
options
|
|
@@ -13138,7 +14474,7 @@ function createExtractionNamespace(rb) {
|
|
|
13138
14474
|
postAdminExtractionSchemaDiscoveries,
|
|
13139
14475
|
{
|
|
13140
14476
|
body: {
|
|
13141
|
-
data: { type: "
|
|
14477
|
+
data: { type: "schema-discovery", attributes }
|
|
13142
14478
|
}
|
|
13143
14479
|
},
|
|
13144
14480
|
options
|
|
@@ -13158,7 +14494,7 @@ function createExtractionNamespace(rb) {
|
|
|
13158
14494
|
postAdminExtractionSchemaDiscoveriesBootstrap,
|
|
13159
14495
|
{
|
|
13160
14496
|
body: {
|
|
13161
|
-
data: { type: "
|
|
14497
|
+
data: { type: "schema-discovery", attributes }
|
|
13162
14498
|
}
|
|
13163
14499
|
},
|
|
13164
14500
|
options
|
|
@@ -13182,7 +14518,7 @@ function createExtractionNamespace(rb) {
|
|
|
13182
14518
|
{
|
|
13183
14519
|
path: { workspace_id: workspaceId, document_id: documentId },
|
|
13184
14520
|
body: {
|
|
13185
|
-
data: { type: "
|
|
14521
|
+
data: { type: "field-mapping-result", attributes }
|
|
13186
14522
|
}
|
|
13187
14523
|
},
|
|
13188
14524
|
options
|
|
@@ -13213,7 +14549,7 @@ function createExtractionNamespace(rb) {
|
|
|
13213
14549
|
postAdminExtractionShadowComparisons,
|
|
13214
14550
|
{
|
|
13215
14551
|
body: {
|
|
13216
|
-
data: { type: "
|
|
14552
|
+
data: { type: "shadow-comparison", attributes }
|
|
13217
14553
|
}
|
|
13218
14554
|
},
|
|
13219
14555
|
options
|
|
@@ -13326,7 +14662,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13326
14662
|
create: async (attributes, options) => {
|
|
13327
14663
|
return rb.execute(
|
|
13328
14664
|
postAdminSchedulingLocations,
|
|
13329
|
-
{ body: { data: { type: "
|
|
14665
|
+
{ body: { data: { type: "scheduling-location", attributes } } },
|
|
13330
14666
|
options
|
|
13331
14667
|
);
|
|
13332
14668
|
},
|
|
@@ -13337,7 +14673,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13337
14673
|
{
|
|
13338
14674
|
path: { id },
|
|
13339
14675
|
body: {
|
|
13340
|
-
data: { id, type: "
|
|
14676
|
+
data: { id, type: "scheduling-location", attributes }
|
|
13341
14677
|
}
|
|
13342
14678
|
},
|
|
13343
14679
|
options
|
|
@@ -13352,7 +14688,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13352
14688
|
body: {
|
|
13353
14689
|
data: {
|
|
13354
14690
|
id,
|
|
13355
|
-
type: "
|
|
14691
|
+
type: "scheduling-location",
|
|
13356
14692
|
attributes: { is_active: false }
|
|
13357
14693
|
}
|
|
13358
14694
|
}
|
|
@@ -13383,7 +14719,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13383
14719
|
create: async (attributes, options) => {
|
|
13384
14720
|
return rb.execute(
|
|
13385
14721
|
postAdminSchedulingEventTypes,
|
|
13386
|
-
{ body: { data: { type: "
|
|
14722
|
+
{ body: { data: { type: "scheduling-event-type", attributes } } },
|
|
13387
14723
|
options
|
|
13388
14724
|
);
|
|
13389
14725
|
},
|
|
@@ -13394,20 +14730,36 @@ function createSchedulingNamespace(rb) {
|
|
|
13394
14730
|
{
|
|
13395
14731
|
path: { id },
|
|
13396
14732
|
body: {
|
|
13397
|
-
data: { id, type: "
|
|
14733
|
+
data: { id, type: "scheduling-event-type", attributes }
|
|
13398
14734
|
}
|
|
13399
14735
|
},
|
|
13400
14736
|
options
|
|
13401
14737
|
);
|
|
14738
|
+
},
|
|
14739
|
+
/** Archive an event type. */
|
|
14740
|
+
archive: async (id, options) => {
|
|
14741
|
+
return rb.execute(
|
|
14742
|
+
patchAdminSchedulingEventTypesByIdArchive,
|
|
14743
|
+
{ path: { id }, body: {} },
|
|
14744
|
+
options
|
|
14745
|
+
);
|
|
14746
|
+
},
|
|
14747
|
+
/** Get an event type by its public slug. */
|
|
14748
|
+
getBySlug: async (slug, workspaceId, options) => {
|
|
14749
|
+
return rb.execute(
|
|
14750
|
+
getAdminSchedulingEventTypesBySlug,
|
|
14751
|
+
{ query: { slug, workspace_id: workspaceId } },
|
|
14752
|
+
options
|
|
14753
|
+
);
|
|
13402
14754
|
}
|
|
13403
14755
|
},
|
|
13404
14756
|
/** Events — scheduled occurrences between workspace members. */
|
|
13405
14757
|
events: {
|
|
13406
|
-
/** List events. */
|
|
13407
|
-
list: async (options) => {
|
|
14758
|
+
/** List events in a workspace. */
|
|
14759
|
+
list: async (workspaceId, options) => {
|
|
13408
14760
|
return rb.execute(
|
|
13409
14761
|
getAdminSchedulingEvents,
|
|
13410
|
-
{},
|
|
14762
|
+
{ query: { workspace_id: workspaceId } },
|
|
13411
14763
|
options
|
|
13412
14764
|
);
|
|
13413
14765
|
},
|
|
@@ -13423,7 +14775,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13423
14775
|
create: async (attributes, options) => {
|
|
13424
14776
|
return rb.execute(
|
|
13425
14777
|
postAdminSchedulingEvents,
|
|
13426
|
-
{ body: { data: { type: "
|
|
14778
|
+
{ body: { data: { type: "scheduling-event", attributes } } },
|
|
13427
14779
|
options
|
|
13428
14780
|
);
|
|
13429
14781
|
},
|
|
@@ -13433,7 +14785,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13433
14785
|
patchAdminSchedulingEventsById,
|
|
13434
14786
|
{
|
|
13435
14787
|
path: { id },
|
|
13436
|
-
body: { data: { id, type: "
|
|
14788
|
+
body: { data: { id, type: "scheduling-event", attributes } }
|
|
13437
14789
|
},
|
|
13438
14790
|
options
|
|
13439
14791
|
);
|
|
@@ -13444,7 +14796,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13444
14796
|
patchAdminSchedulingEventsByIdCancel,
|
|
13445
14797
|
{
|
|
13446
14798
|
path: { id },
|
|
13447
|
-
body: attributes ? { data: { type: "
|
|
14799
|
+
body: attributes ? { data: { type: "scheduling-event", attributes } } : {}
|
|
13448
14800
|
},
|
|
13449
14801
|
options
|
|
13450
14802
|
);
|
|
@@ -13463,7 +14815,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13463
14815
|
patchAdminSchedulingEventsByIdReschedule,
|
|
13464
14816
|
{
|
|
13465
14817
|
path: { id },
|
|
13466
|
-
body: { data: { type: "
|
|
14818
|
+
body: { data: { type: "scheduling-event", attributes } }
|
|
13467
14819
|
},
|
|
13468
14820
|
options
|
|
13469
14821
|
);
|
|
@@ -13515,7 +14867,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13515
14867
|
postAdminSchedulingParticipants,
|
|
13516
14868
|
{
|
|
13517
14869
|
body: {
|
|
13518
|
-
data: { type: "
|
|
14870
|
+
data: { type: "scheduling-participant", attributes }
|
|
13519
14871
|
}
|
|
13520
14872
|
},
|
|
13521
14873
|
options
|
|
@@ -13528,7 +14880,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13528
14880
|
{
|
|
13529
14881
|
path: { id },
|
|
13530
14882
|
body: {
|
|
13531
|
-
data: { id, type: "
|
|
14883
|
+
data: { id, type: "scheduling-participant", attributes }
|
|
13532
14884
|
}
|
|
13533
14885
|
},
|
|
13534
14886
|
options
|
|
@@ -13542,7 +14894,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13542
14894
|
path: { id },
|
|
13543
14895
|
body: {
|
|
13544
14896
|
data: {
|
|
13545
|
-
type: "
|
|
14897
|
+
type: "scheduling-participant",
|
|
13546
14898
|
attributes: { status }
|
|
13547
14899
|
}
|
|
13548
14900
|
}
|
|
@@ -13583,7 +14935,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13583
14935
|
postAdminSchedulingAvailabilityRules,
|
|
13584
14936
|
{
|
|
13585
14937
|
body: {
|
|
13586
|
-
data: { type: "
|
|
14938
|
+
data: { type: "scheduling-availability-rule", attributes }
|
|
13587
14939
|
}
|
|
13588
14940
|
},
|
|
13589
14941
|
options
|
|
@@ -13598,7 +14950,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13598
14950
|
body: {
|
|
13599
14951
|
data: {
|
|
13600
14952
|
id,
|
|
13601
|
-
type: "
|
|
14953
|
+
type: "scheduling-availability-rule",
|
|
13602
14954
|
attributes
|
|
13603
14955
|
}
|
|
13604
14956
|
}
|
|
@@ -13613,6 +14965,22 @@ function createSchedulingNamespace(rb) {
|
|
|
13613
14965
|
{ path: { id } },
|
|
13614
14966
|
options
|
|
13615
14967
|
);
|
|
14968
|
+
},
|
|
14969
|
+
/** List availability rules for a specific user. */
|
|
14970
|
+
listByUser: async (userId, options) => {
|
|
14971
|
+
return rb.execute(
|
|
14972
|
+
getAdminSchedulingAvailabilityRulesByUser,
|
|
14973
|
+
{ query: { user_id: userId } },
|
|
14974
|
+
options
|
|
14975
|
+
);
|
|
14976
|
+
},
|
|
14977
|
+
/** List availability rules for a specific event type. */
|
|
14978
|
+
listByEventType: async (eventTypeId, options) => {
|
|
14979
|
+
return rb.execute(
|
|
14980
|
+
getAdminSchedulingAvailabilityRulesByEventType,
|
|
14981
|
+
{ query: { event_type_id: eventTypeId } },
|
|
14982
|
+
options
|
|
14983
|
+
);
|
|
13616
14984
|
}
|
|
13617
14985
|
},
|
|
13618
14986
|
/** Bookings — external party appointment requests. */
|
|
@@ -13637,7 +15005,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13637
15005
|
create: async (attributes, options) => {
|
|
13638
15006
|
return rb.execute(
|
|
13639
15007
|
postAdminSchedulingBookings,
|
|
13640
|
-
{ body: { data: { type: "
|
|
15008
|
+
{ body: { data: { type: "scheduling-booking", attributes } } },
|
|
13641
15009
|
options
|
|
13642
15010
|
);
|
|
13643
15011
|
},
|
|
@@ -13655,7 +15023,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13655
15023
|
patchAdminSchedulingBookingsByIdCancel,
|
|
13656
15024
|
{
|
|
13657
15025
|
path: { id },
|
|
13658
|
-
body: attributes ? { data: { type: "
|
|
15026
|
+
body: attributes ? { data: { type: "scheduling-booking", attributes } } : {}
|
|
13659
15027
|
},
|
|
13660
15028
|
options
|
|
13661
15029
|
);
|
|
@@ -13666,7 +15034,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13666
15034
|
patchAdminSchedulingBookingsByIdReschedule,
|
|
13667
15035
|
{
|
|
13668
15036
|
path: { id },
|
|
13669
|
-
body: { data: { type: "
|
|
15037
|
+
body: { data: { type: "scheduling-booking", attributes } }
|
|
13670
15038
|
},
|
|
13671
15039
|
options
|
|
13672
15040
|
);
|
|
@@ -13678,6 +15046,14 @@ function createSchedulingNamespace(rb) {
|
|
|
13678
15046
|
{ path: { id }, body: {} },
|
|
13679
15047
|
options
|
|
13680
15048
|
);
|
|
15049
|
+
},
|
|
15050
|
+
/** List bookings by booker email address. */
|
|
15051
|
+
listByBooker: async (email, options) => {
|
|
15052
|
+
return rb.execute(
|
|
15053
|
+
getAdminSchedulingBookingsByBooker,
|
|
15054
|
+
{ query: { booker_email: email } },
|
|
15055
|
+
options
|
|
15056
|
+
);
|
|
13681
15057
|
}
|
|
13682
15058
|
},
|
|
13683
15059
|
/** Reminders — scheduled notifications tied to events. */
|
|
@@ -13702,7 +15078,15 @@ function createSchedulingNamespace(rb) {
|
|
|
13702
15078
|
create: async (attributes, options) => {
|
|
13703
15079
|
return rb.execute(
|
|
13704
15080
|
postAdminSchedulingReminders,
|
|
13705
|
-
{ body: { data: { type: "
|
|
15081
|
+
{ body: { data: { type: "scheduling-reminder", attributes } } },
|
|
15082
|
+
options
|
|
15083
|
+
);
|
|
15084
|
+
},
|
|
15085
|
+
/** Cancel a pending reminder. */
|
|
15086
|
+
cancel: async (id, options) => {
|
|
15087
|
+
return rb.execute(
|
|
15088
|
+
patchAdminSchedulingRemindersByIdCancel,
|
|
15089
|
+
{ path: { id }, body: {} },
|
|
13706
15090
|
options
|
|
13707
15091
|
);
|
|
13708
15092
|
}
|
|
@@ -13731,7 +15115,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13731
15115
|
postAdminSchedulingCalendarSyncs,
|
|
13732
15116
|
{
|
|
13733
15117
|
body: {
|
|
13734
|
-
data: { type: "
|
|
15118
|
+
data: { type: "scheduling-calendar-sync", attributes }
|
|
13735
15119
|
}
|
|
13736
15120
|
},
|
|
13737
15121
|
options
|
|
@@ -13744,7 +15128,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13744
15128
|
{
|
|
13745
15129
|
path: { id },
|
|
13746
15130
|
body: {
|
|
13747
|
-
data: { id, type: "
|
|
15131
|
+
data: { id, type: "scheduling-calendar-sync", attributes }
|
|
13748
15132
|
}
|
|
13749
15133
|
},
|
|
13750
15134
|
options
|
|
@@ -13806,7 +15190,7 @@ function createCrmNamespace(rb) {
|
|
|
13806
15190
|
create: async (attributes, options) => {
|
|
13807
15191
|
return rb.execute(
|
|
13808
15192
|
postAdminCrmContacts,
|
|
13809
|
-
{ body: { data: { type: "
|
|
15193
|
+
{ body: { data: { type: "crm-contact", attributes } } },
|
|
13810
15194
|
options
|
|
13811
15195
|
);
|
|
13812
15196
|
},
|
|
@@ -13816,7 +15200,7 @@ function createCrmNamespace(rb) {
|
|
|
13816
15200
|
patchAdminCrmContactsById,
|
|
13817
15201
|
{
|
|
13818
15202
|
path: { id },
|
|
13819
|
-
body: { data: { type: "
|
|
15203
|
+
body: { data: { type: "crm-contact", id, attributes } }
|
|
13820
15204
|
},
|
|
13821
15205
|
options
|
|
13822
15206
|
);
|
|
@@ -13827,7 +15211,7 @@ function createCrmNamespace(rb) {
|
|
|
13827
15211
|
patchAdminCrmContactsByIdArchive,
|
|
13828
15212
|
{
|
|
13829
15213
|
path: { id },
|
|
13830
|
-
body: { data: { type: "
|
|
15214
|
+
body: { data: { type: "crm-contact", id, attributes: {} } }
|
|
13831
15215
|
},
|
|
13832
15216
|
options
|
|
13833
15217
|
);
|
|
@@ -13838,7 +15222,7 @@ function createCrmNamespace(rb) {
|
|
|
13838
15222
|
postAdminCrmContactsByIdUnarchive,
|
|
13839
15223
|
{
|
|
13840
15224
|
path: { id },
|
|
13841
|
-
body: { data: { type: "
|
|
15225
|
+
body: { data: { type: "crm-contact", id } }
|
|
13842
15226
|
},
|
|
13843
15227
|
options
|
|
13844
15228
|
);
|
|
@@ -13865,7 +15249,7 @@ function createCrmNamespace(rb) {
|
|
|
13865
15249
|
create: async (attributes, options) => {
|
|
13866
15250
|
return rb.execute(
|
|
13867
15251
|
postAdminCrmCompanies,
|
|
13868
|
-
{ body: { data: { type: "
|
|
15252
|
+
{ body: { data: { type: "crm-company", attributes } } },
|
|
13869
15253
|
options
|
|
13870
15254
|
);
|
|
13871
15255
|
},
|
|
@@ -13875,7 +15259,7 @@ function createCrmNamespace(rb) {
|
|
|
13875
15259
|
patchAdminCrmCompaniesById,
|
|
13876
15260
|
{
|
|
13877
15261
|
path: { id },
|
|
13878
|
-
body: { data: { type: "
|
|
15262
|
+
body: { data: { type: "crm-company", id, attributes } }
|
|
13879
15263
|
},
|
|
13880
15264
|
options
|
|
13881
15265
|
);
|
|
@@ -13907,7 +15291,7 @@ function createCrmNamespace(rb) {
|
|
|
13907
15291
|
create: async (attributes, options) => {
|
|
13908
15292
|
return rb.execute(
|
|
13909
15293
|
postAdminCrmDeals,
|
|
13910
|
-
{ body: { data: { type: "
|
|
15294
|
+
{ body: { data: { type: "crm-deal", attributes } } },
|
|
13911
15295
|
options
|
|
13912
15296
|
);
|
|
13913
15297
|
},
|
|
@@ -13917,7 +15301,7 @@ function createCrmNamespace(rb) {
|
|
|
13917
15301
|
patchAdminCrmDealsById,
|
|
13918
15302
|
{
|
|
13919
15303
|
path: { id },
|
|
13920
|
-
body: { data: { type: "
|
|
15304
|
+
body: { data: { type: "crm-deal", id, attributes } }
|
|
13921
15305
|
},
|
|
13922
15306
|
options
|
|
13923
15307
|
);
|
|
@@ -13928,7 +15312,7 @@ function createCrmNamespace(rb) {
|
|
|
13928
15312
|
patchAdminCrmDealsByIdMoveStage,
|
|
13929
15313
|
{
|
|
13930
15314
|
path: { id },
|
|
13931
|
-
body: { data: { type: "
|
|
15315
|
+
body: { data: { type: "crm-deal", id, attributes } }
|
|
13932
15316
|
},
|
|
13933
15317
|
options
|
|
13934
15318
|
);
|
|
@@ -13956,7 +15340,7 @@ function createCrmNamespace(rb) {
|
|
|
13956
15340
|
create: async (attributes, options) => {
|
|
13957
15341
|
return rb.execute(
|
|
13958
15342
|
postAdminCrmActivities,
|
|
13959
|
-
{ body: { data: { type: "
|
|
15343
|
+
{ body: { data: { type: "crm-activity", attributes } } },
|
|
13960
15344
|
options
|
|
13961
15345
|
);
|
|
13962
15346
|
},
|
|
@@ -13966,7 +15350,7 @@ function createCrmNamespace(rb) {
|
|
|
13966
15350
|
patchAdminCrmActivitiesById,
|
|
13967
15351
|
{
|
|
13968
15352
|
path: { id },
|
|
13969
|
-
body: { data: { type: "
|
|
15353
|
+
body: { data: { type: "crm-activity", id, attributes } }
|
|
13970
15354
|
},
|
|
13971
15355
|
options
|
|
13972
15356
|
);
|
|
@@ -13998,7 +15382,7 @@ function createCrmNamespace(rb) {
|
|
|
13998
15382
|
create: async (attributes, options) => {
|
|
13999
15383
|
return rb.execute(
|
|
14000
15384
|
postAdminCrmPipelines,
|
|
14001
|
-
{ body: { data: { type: "
|
|
15385
|
+
{ body: { data: { type: "crm-pipeline", attributes } } },
|
|
14002
15386
|
options
|
|
14003
15387
|
);
|
|
14004
15388
|
},
|
|
@@ -14008,7 +15392,7 @@ function createCrmNamespace(rb) {
|
|
|
14008
15392
|
patchAdminCrmPipelinesById,
|
|
14009
15393
|
{
|
|
14010
15394
|
path: { id },
|
|
14011
|
-
body: { data: { type: "
|
|
15395
|
+
body: { data: { type: "crm-pipeline", id, attributes } }
|
|
14012
15396
|
},
|
|
14013
15397
|
options
|
|
14014
15398
|
);
|
|
@@ -14044,7 +15428,7 @@ function createCrmNamespace(rb) {
|
|
|
14044
15428
|
create: async (attributes, options) => {
|
|
14045
15429
|
return rb.execute(
|
|
14046
15430
|
postAdminCrmPipelineStages,
|
|
14047
|
-
{ body: { data: { type: "
|
|
15431
|
+
{ body: { data: { type: "crm-pipeline-stage", attributes } } },
|
|
14048
15432
|
options
|
|
14049
15433
|
);
|
|
14050
15434
|
},
|
|
@@ -14054,7 +15438,7 @@ function createCrmNamespace(rb) {
|
|
|
14054
15438
|
patchAdminCrmPipelineStagesById,
|
|
14055
15439
|
{
|
|
14056
15440
|
path: { id },
|
|
14057
|
-
body: { data: { type: "
|
|
15441
|
+
body: { data: { type: "crm-pipeline-stage", id, attributes } }
|
|
14058
15442
|
},
|
|
14059
15443
|
options
|
|
14060
15444
|
);
|
|
@@ -14090,7 +15474,7 @@ function createCrmNamespace(rb) {
|
|
|
14090
15474
|
create: async (attributes, options) => {
|
|
14091
15475
|
return rb.execute(
|
|
14092
15476
|
postAdminCrmRelationships,
|
|
14093
|
-
{ body: { data: { type: "
|
|
15477
|
+
{ body: { data: { type: "crm-relationship", attributes } } },
|
|
14094
15478
|
options
|
|
14095
15479
|
);
|
|
14096
15480
|
},
|
|
@@ -14121,7 +15505,7 @@ function createCrmNamespace(rb) {
|
|
|
14121
15505
|
create: async (attributes, options) => {
|
|
14122
15506
|
return rb.execute(
|
|
14123
15507
|
postAdminCrmRelationshipTypes,
|
|
14124
|
-
{ body: { data: { type: "
|
|
15508
|
+
{ body: { data: { type: "crm-relationship-type", attributes } } },
|
|
14125
15509
|
options
|
|
14126
15510
|
);
|
|
14127
15511
|
},
|
|
@@ -14131,7 +15515,7 @@ function createCrmNamespace(rb) {
|
|
|
14131
15515
|
patchAdminCrmRelationshipTypesById,
|
|
14132
15516
|
{
|
|
14133
15517
|
path: { id },
|
|
14134
|
-
body: { data: { type: "
|
|
15518
|
+
body: { data: { type: "crm-relationship-type", id, attributes } }
|
|
14135
15519
|
},
|
|
14136
15520
|
options
|
|
14137
15521
|
);
|
|
@@ -14167,7 +15551,7 @@ function createCrmNamespace(rb) {
|
|
|
14167
15551
|
create: async (attributes, options) => {
|
|
14168
15552
|
return rb.execute(
|
|
14169
15553
|
postAdminCrmCustomEntities,
|
|
14170
|
-
{ body: { data: { type: "
|
|
15554
|
+
{ body: { data: { type: "crm-custom-entity", attributes } } },
|
|
14171
15555
|
options
|
|
14172
15556
|
);
|
|
14173
15557
|
},
|
|
@@ -14177,7 +15561,7 @@ function createCrmNamespace(rb) {
|
|
|
14177
15561
|
patchAdminCrmCustomEntitiesById,
|
|
14178
15562
|
{
|
|
14179
15563
|
path: { id },
|
|
14180
|
-
body: { data: { type: "
|
|
15564
|
+
body: { data: { type: "crm-custom-entity", id, attributes } }
|
|
14181
15565
|
},
|
|
14182
15566
|
options
|
|
14183
15567
|
);
|
|
@@ -14225,7 +15609,7 @@ function createCrmNamespace(rb) {
|
|
|
14225
15609
|
create: async (attributes, options) => {
|
|
14226
15610
|
return rb.execute(
|
|
14227
15611
|
postAdminCrmDealProducts,
|
|
14228
|
-
{ body: { data: { type: "
|
|
15612
|
+
{ body: { data: { type: "crm-deal-product", attributes } } },
|
|
14229
15613
|
options
|
|
14230
15614
|
);
|
|
14231
15615
|
},
|
|
@@ -14256,7 +15640,7 @@ function createCrmNamespace(rb) {
|
|
|
14256
15640
|
create: async (attributes, options) => {
|
|
14257
15641
|
return rb.execute(
|
|
14258
15642
|
postAdminCrmExports,
|
|
14259
|
-
{ body: { data: { type: "
|
|
15643
|
+
{ body: { data: { type: "crm-data-export-job", attributes } } },
|
|
14260
15644
|
options
|
|
14261
15645
|
);
|
|
14262
15646
|
},
|
|
@@ -14266,7 +15650,7 @@ function createCrmNamespace(rb) {
|
|
|
14266
15650
|
patchAdminCrmExportsByIdRefreshUrl,
|
|
14267
15651
|
{
|
|
14268
15652
|
path: { id },
|
|
14269
|
-
body: { data: { type: "
|
|
15653
|
+
body: { data: { type: "crm-data-export-job", id, attributes: {} } }
|
|
14270
15654
|
},
|
|
14271
15655
|
options
|
|
14272
15656
|
);
|
|
@@ -14294,7 +15678,7 @@ function createCrmNamespace(rb) {
|
|
|
14294
15678
|
create: async (attributes, options) => {
|
|
14295
15679
|
return rb.execute(
|
|
14296
15680
|
postAdminIsvCrmEntityTypes,
|
|
14297
|
-
{ body: { data: { type: "
|
|
15681
|
+
{ body: { data: { type: "crm-custom-entity-type", attributes } } },
|
|
14298
15682
|
options
|
|
14299
15683
|
);
|
|
14300
15684
|
},
|
|
@@ -14304,7 +15688,7 @@ function createCrmNamespace(rb) {
|
|
|
14304
15688
|
patchAdminIsvCrmEntityTypesById,
|
|
14305
15689
|
{
|
|
14306
15690
|
path: { id },
|
|
14307
|
-
body: { data: { type: "
|
|
15691
|
+
body: { data: { type: "crm-custom-entity-type", id, attributes } }
|
|
14308
15692
|
},
|
|
14309
15693
|
options
|
|
14310
15694
|
);
|
|
@@ -14341,7 +15725,7 @@ function createCrmNamespace(rb) {
|
|
|
14341
15725
|
return rb.execute(
|
|
14342
15726
|
postAdminCrmFieldDefinitions,
|
|
14343
15727
|
{
|
|
14344
|
-
body: { data: { type: "
|
|
15728
|
+
body: { data: { type: "crm-custom-field-definition", attributes } }
|
|
14345
15729
|
},
|
|
14346
15730
|
options
|
|
14347
15731
|
);
|
|
@@ -14353,7 +15737,7 @@ function createCrmNamespace(rb) {
|
|
|
14353
15737
|
{
|
|
14354
15738
|
path: { id },
|
|
14355
15739
|
body: {
|
|
14356
|
-
data: { type: "
|
|
15740
|
+
data: { type: "crm-custom-field-definition", id, attributes }
|
|
14357
15741
|
}
|
|
14358
15742
|
},
|
|
14359
15743
|
options
|
|
@@ -14383,7 +15767,7 @@ function createCrmNamespace(rb) {
|
|
|
14383
15767
|
return rb.execute(
|
|
14384
15768
|
postAdminIsvCrmChannelCaptureConfig,
|
|
14385
15769
|
{
|
|
14386
|
-
body: { data: { type: "
|
|
15770
|
+
body: { data: { type: "crm-channel-capture-config", attributes } }
|
|
14387
15771
|
},
|
|
14388
15772
|
options
|
|
14389
15773
|
);
|
|
@@ -14395,7 +15779,7 @@ function createCrmNamespace(rb) {
|
|
|
14395
15779
|
{
|
|
14396
15780
|
path: { id },
|
|
14397
15781
|
body: {
|
|
14398
|
-
data: { type: "
|
|
15782
|
+
data: { type: "crm-channel-capture-config", id, attributes }
|
|
14399
15783
|
}
|
|
14400
15784
|
},
|
|
14401
15785
|
options
|
|
@@ -14416,7 +15800,7 @@ function createCrmNamespace(rb) {
|
|
|
14416
15800
|
create: async (attributes, options) => {
|
|
14417
15801
|
return rb.execute(
|
|
14418
15802
|
postAdminCrmSyncConfigs,
|
|
14419
|
-
{ body: { data: { type: "
|
|
15803
|
+
{ body: { data: { type: "crm-sync-config", attributes } } },
|
|
14420
15804
|
options
|
|
14421
15805
|
);
|
|
14422
15806
|
},
|
|
@@ -14426,7 +15810,7 @@ function createCrmNamespace(rb) {
|
|
|
14426
15810
|
patchAdminCrmSyncConfigsById,
|
|
14427
15811
|
{
|
|
14428
15812
|
path: { id },
|
|
14429
|
-
body: { data: { type: "
|
|
15813
|
+
body: { data: { type: "crm-sync-config", id, attributes } }
|
|
14430
15814
|
},
|
|
14431
15815
|
options
|
|
14432
15816
|
);
|
|
@@ -14468,7 +15852,7 @@ function createSupportNamespace(rb) {
|
|
|
14468
15852
|
create: async (attributes, options) => {
|
|
14469
15853
|
return rb.execute(
|
|
14470
15854
|
postAdminSupportTickets,
|
|
14471
|
-
{ body: { data: { type: "
|
|
15855
|
+
{ body: { data: { type: "support-ticket", attributes } } },
|
|
14472
15856
|
options
|
|
14473
15857
|
);
|
|
14474
15858
|
},
|
|
@@ -14478,7 +15862,7 @@ function createSupportNamespace(rb) {
|
|
|
14478
15862
|
patchAdminSupportTicketsById,
|
|
14479
15863
|
{
|
|
14480
15864
|
path: { id },
|
|
14481
|
-
body: { data: { type: "
|
|
15865
|
+
body: { data: { type: "support-ticket", id, attributes } }
|
|
14482
15866
|
},
|
|
14483
15867
|
options
|
|
14484
15868
|
);
|
|
@@ -14489,7 +15873,7 @@ function createSupportNamespace(rb) {
|
|
|
14489
15873
|
patchAdminSupportTicketsByIdAssign,
|
|
14490
15874
|
{
|
|
14491
15875
|
path: { id },
|
|
14492
|
-
body: { data: { type: "
|
|
15876
|
+
body: { data: { type: "support-ticket", id, attributes } }
|
|
14493
15877
|
},
|
|
14494
15878
|
options
|
|
14495
15879
|
);
|
|
@@ -14500,7 +15884,7 @@ function createSupportNamespace(rb) {
|
|
|
14500
15884
|
patchAdminSupportTicketsByIdResolve,
|
|
14501
15885
|
{
|
|
14502
15886
|
path: { id },
|
|
14503
|
-
body: { data: { type: "
|
|
15887
|
+
body: { data: { type: "support-ticket", id, attributes } }
|
|
14504
15888
|
},
|
|
14505
15889
|
options
|
|
14506
15890
|
);
|
|
@@ -14511,7 +15895,7 @@ function createSupportNamespace(rb) {
|
|
|
14511
15895
|
patchAdminSupportTicketsByIdClose,
|
|
14512
15896
|
{
|
|
14513
15897
|
path: { id },
|
|
14514
|
-
body: { data: { type: "
|
|
15898
|
+
body: { data: { type: "support-ticket", id, attributes } }
|
|
14515
15899
|
},
|
|
14516
15900
|
options
|
|
14517
15901
|
);
|
|
@@ -14522,7 +15906,7 @@ function createSupportNamespace(rb) {
|
|
|
14522
15906
|
patchAdminSupportTicketsByIdReopen,
|
|
14523
15907
|
{
|
|
14524
15908
|
path: { id },
|
|
14525
|
-
body: { data: { type: "
|
|
15909
|
+
body: { data: { type: "support-ticket", id, attributes } }
|
|
14526
15910
|
},
|
|
14527
15911
|
options
|
|
14528
15912
|
);
|
|
@@ -14533,7 +15917,7 @@ function createSupportNamespace(rb) {
|
|
|
14533
15917
|
patchAdminSupportTicketsByIdMerge,
|
|
14534
15918
|
{
|
|
14535
15919
|
path: { id },
|
|
14536
|
-
body: { data: { type: "
|
|
15920
|
+
body: { data: { type: "support-ticket", id, attributes } }
|
|
14537
15921
|
},
|
|
14538
15922
|
options
|
|
14539
15923
|
);
|
|
@@ -14561,7 +15945,7 @@ function createSupportNamespace(rb) {
|
|
|
14561
15945
|
create: async (attributes, options) => {
|
|
14562
15946
|
return rb.execute(
|
|
14563
15947
|
postAdminSupportTicketMessages,
|
|
14564
|
-
{ body: { data: { type: "
|
|
15948
|
+
{ body: { data: { type: "support-ticket-message", attributes } } },
|
|
14565
15949
|
options
|
|
14566
15950
|
);
|
|
14567
15951
|
}
|
|
@@ -14580,7 +15964,7 @@ function createSupportNamespace(rb) {
|
|
|
14580
15964
|
create: async (attributes, options) => {
|
|
14581
15965
|
return rb.execute(
|
|
14582
15966
|
postAdminSupportTicketAttachments,
|
|
14583
|
-
{ body: { data: { type: "
|
|
15967
|
+
{ body: { data: { type: "support-ticket-attachment", attributes } } },
|
|
14584
15968
|
options
|
|
14585
15969
|
);
|
|
14586
15970
|
}
|
|
@@ -14591,7 +15975,7 @@ function createSupportNamespace(rb) {
|
|
|
14591
15975
|
create: async (attributes, options) => {
|
|
14592
15976
|
return rb.execute(
|
|
14593
15977
|
postAdminSupportTicketRatings,
|
|
14594
|
-
{ body: { data: { type: "
|
|
15978
|
+
{ body: { data: { type: "support-ticket-rating", attributes } } },
|
|
14595
15979
|
options
|
|
14596
15980
|
);
|
|
14597
15981
|
}
|
|
@@ -14610,7 +15994,7 @@ function createSupportNamespace(rb) {
|
|
|
14610
15994
|
create: async (attributes, options) => {
|
|
14611
15995
|
return rb.execute(
|
|
14612
15996
|
postAdminSupportTags,
|
|
14613
|
-
{ body: { data: { type: "
|
|
15997
|
+
{ body: { data: { type: "support-tag", attributes } } },
|
|
14614
15998
|
options
|
|
14615
15999
|
);
|
|
14616
16000
|
},
|
|
@@ -14641,7 +16025,7 @@ function createSupportNamespace(rb) {
|
|
|
14641
16025
|
create: async (attributes, options) => {
|
|
14642
16026
|
return rb.execute(
|
|
14643
16027
|
postAdminSupportQueues,
|
|
14644
|
-
{ body: { data: { type: "
|
|
16028
|
+
{ body: { data: { type: "support-queue", attributes } } },
|
|
14645
16029
|
options
|
|
14646
16030
|
);
|
|
14647
16031
|
},
|
|
@@ -14651,7 +16035,7 @@ function createSupportNamespace(rb) {
|
|
|
14651
16035
|
patchAdminSupportQueuesById,
|
|
14652
16036
|
{
|
|
14653
16037
|
path: { id },
|
|
14654
|
-
body: { data: { type: "
|
|
16038
|
+
body: { data: { type: "support-queue", id, attributes } }
|
|
14655
16039
|
},
|
|
14656
16040
|
options
|
|
14657
16041
|
);
|
|
@@ -14687,7 +16071,7 @@ function createSupportNamespace(rb) {
|
|
|
14687
16071
|
create: async (attributes, options) => {
|
|
14688
16072
|
return rb.execute(
|
|
14689
16073
|
postAdminSupportQueueMembers,
|
|
14690
|
-
{ body: { data: { type: "
|
|
16074
|
+
{ body: { data: { type: "support-queue-member", attributes } } },
|
|
14691
16075
|
options
|
|
14692
16076
|
);
|
|
14693
16077
|
},
|
|
@@ -14697,7 +16081,7 @@ function createSupportNamespace(rb) {
|
|
|
14697
16081
|
patchAdminSupportQueueMembersById,
|
|
14698
16082
|
{
|
|
14699
16083
|
path: { id },
|
|
14700
|
-
body: { data: { type: "
|
|
16084
|
+
body: { data: { type: "support-queue-member", id, attributes } }
|
|
14701
16085
|
},
|
|
14702
16086
|
options
|
|
14703
16087
|
);
|
|
@@ -14733,7 +16117,7 @@ function createSupportNamespace(rb) {
|
|
|
14733
16117
|
create: async (attributes, options) => {
|
|
14734
16118
|
return rb.execute(
|
|
14735
16119
|
postAdminSupportRoutingRules,
|
|
14736
|
-
{ body: { data: { type: "
|
|
16120
|
+
{ body: { data: { type: "support-routing-rule", attributes } } },
|
|
14737
16121
|
options
|
|
14738
16122
|
);
|
|
14739
16123
|
},
|
|
@@ -14743,7 +16127,7 @@ function createSupportNamespace(rb) {
|
|
|
14743
16127
|
patchAdminSupportRoutingRulesById,
|
|
14744
16128
|
{
|
|
14745
16129
|
path: { id },
|
|
14746
|
-
body: { data: { type: "
|
|
16130
|
+
body: { data: { type: "support-routing-rule", id, attributes } }
|
|
14747
16131
|
},
|
|
14748
16132
|
options
|
|
14749
16133
|
);
|
|
@@ -14779,7 +16163,7 @@ function createSupportNamespace(rb) {
|
|
|
14779
16163
|
create: async (attributes, options) => {
|
|
14780
16164
|
return rb.execute(
|
|
14781
16165
|
postAdminSupportSlaPolicies,
|
|
14782
|
-
{ body: { data: { type: "
|
|
16166
|
+
{ body: { data: { type: "support-sla-policy", attributes } } },
|
|
14783
16167
|
options
|
|
14784
16168
|
);
|
|
14785
16169
|
},
|
|
@@ -14789,7 +16173,7 @@ function createSupportNamespace(rb) {
|
|
|
14789
16173
|
patchAdminSupportSlaPoliciesById,
|
|
14790
16174
|
{
|
|
14791
16175
|
path: { id },
|
|
14792
|
-
body: { data: { type: "
|
|
16176
|
+
body: { data: { type: "support-sla-policy", id, attributes } }
|
|
14793
16177
|
},
|
|
14794
16178
|
options
|
|
14795
16179
|
);
|
|
@@ -14817,7 +16201,7 @@ function createSupportNamespace(rb) {
|
|
|
14817
16201
|
upsert: async (attributes, options) => {
|
|
14818
16202
|
return rb.execute(
|
|
14819
16203
|
postAdminSupportAiConfigs,
|
|
14820
|
-
{ body: { data: { type: "
|
|
16204
|
+
{ body: { data: { type: "support-ai-config", attributes } } },
|
|
14821
16205
|
options
|
|
14822
16206
|
);
|
|
14823
16207
|
}
|
|
@@ -14838,7 +16222,7 @@ function createSupportNamespace(rb) {
|
|
|
14838
16222
|
postAdminSupportChannelCaptureConfigs,
|
|
14839
16223
|
{
|
|
14840
16224
|
body: {
|
|
14841
|
-
data: { type: "
|
|
16225
|
+
data: { type: "support-channel-capture-config", attributes }
|
|
14842
16226
|
}
|
|
14843
16227
|
},
|
|
14844
16228
|
options
|
|
@@ -14859,7 +16243,7 @@ function createSupportNamespace(rb) {
|
|
|
14859
16243
|
create: async (attributes, options) => {
|
|
14860
16244
|
return rb.execute(
|
|
14861
16245
|
postAdminSupportSyncConfigs,
|
|
14862
|
-
{ body: { data: { type: "
|
|
16246
|
+
{ body: { data: { type: "support-sync-config", attributes } } },
|
|
14863
16247
|
options
|
|
14864
16248
|
);
|
|
14865
16249
|
},
|
|
@@ -14869,7 +16253,7 @@ function createSupportNamespace(rb) {
|
|
|
14869
16253
|
patchAdminSupportSyncConfigsById,
|
|
14870
16254
|
{
|
|
14871
16255
|
path: { id },
|
|
14872
|
-
body: { data: { type: "
|
|
16256
|
+
body: { data: { type: "support-sync-config", id, attributes } }
|
|
14873
16257
|
},
|
|
14874
16258
|
options
|
|
14875
16259
|
);
|
|
@@ -14897,7 +16281,7 @@ function createSupportNamespace(rb) {
|
|
|
14897
16281
|
create: async (attributes, options) => {
|
|
14898
16282
|
return rb.execute(
|
|
14899
16283
|
postAdminSupportCannedResponses,
|
|
14900
|
-
{ body: { data: { type: "
|
|
16284
|
+
{ body: { data: { type: "support-canned-response", attributes } } },
|
|
14901
16285
|
options
|
|
14902
16286
|
);
|
|
14903
16287
|
},
|
|
@@ -14907,7 +16291,7 @@ function createSupportNamespace(rb) {
|
|
|
14907
16291
|
patchAdminSupportCannedResponsesById,
|
|
14908
16292
|
{
|
|
14909
16293
|
path: { id },
|
|
14910
|
-
body: { data: { type: "
|
|
16294
|
+
body: { data: { type: "support-canned-response", id, attributes } }
|
|
14911
16295
|
},
|
|
14912
16296
|
options
|
|
14913
16297
|
);
|
|
@@ -15359,7 +16743,7 @@ function createComplianceNamespace(rb) {
|
|
|
15359
16743
|
create: async (attributes, options) => {
|
|
15360
16744
|
return rb.execute(
|
|
15361
16745
|
postAdminLegalDocuments,
|
|
15362
|
-
{ body: { data: { type: "
|
|
16746
|
+
{ body: { data: { type: "legal-document", attributes } } },
|
|
15363
16747
|
options
|
|
15364
16748
|
);
|
|
15365
16749
|
},
|
|
@@ -15383,7 +16767,7 @@ function createComplianceNamespace(rb) {
|
|
|
15383
16767
|
patchAdminLegalDocumentsById,
|
|
15384
16768
|
{
|
|
15385
16769
|
path: { id },
|
|
15386
|
-
body: { data: { type: "
|
|
16770
|
+
body: { data: { type: "legal-document", id, attributes } }
|
|
15387
16771
|
},
|
|
15388
16772
|
options
|
|
15389
16773
|
);
|
|
@@ -15461,7 +16845,7 @@ function createComplianceNamespace(rb) {
|
|
|
15461
16845
|
patchAdminLegalDocumentsByIdPublish,
|
|
15462
16846
|
{
|
|
15463
16847
|
path: { id },
|
|
15464
|
-
body: { data: { type: "
|
|
16848
|
+
body: { data: { type: "legal-document", id, attributes: {} } }
|
|
15465
16849
|
},
|
|
15466
16850
|
options
|
|
15467
16851
|
);
|
|
@@ -15483,7 +16867,7 @@ function createComplianceNamespace(rb) {
|
|
|
15483
16867
|
patchAdminLegalDocumentsByIdUnpublish,
|
|
15484
16868
|
{
|
|
15485
16869
|
path: { id },
|
|
15486
|
-
body: { data: { type: "
|
|
16870
|
+
body: { data: { type: "legal-document", id, attributes: {} } }
|
|
15487
16871
|
},
|
|
15488
16872
|
options
|
|
15489
16873
|
);
|
|
@@ -15540,6 +16924,25 @@ function createPipelinesNamespace(rb) {
|
|
|
15540
16924
|
async get(id, options) {
|
|
15541
16925
|
return rb.execute(getAdminPipelinesById, { path: { id } }, options);
|
|
15542
16926
|
},
|
|
16927
|
+
/**
|
|
16928
|
+
* Get a pipeline by its system slug, scoped to an application.
|
|
16929
|
+
*
|
|
16930
|
+
* @param slug - Pipeline system slug.
|
|
16931
|
+
* @param options - Optional request options.
|
|
16932
|
+
* @returns Pipeline resource, or not-found error.
|
|
16933
|
+
*
|
|
16934
|
+
* @example
|
|
16935
|
+
* ```typescript
|
|
16936
|
+
* const pipeline = await admin.pipelines.getBySlug("post-session-documentation");
|
|
16937
|
+
* ```
|
|
16938
|
+
*/
|
|
16939
|
+
async getBySlug(slug, options) {
|
|
16940
|
+
return rb.execute(
|
|
16941
|
+
getAdminPipelinesBySlugBySlug,
|
|
16942
|
+
{ path: { slug } },
|
|
16943
|
+
options
|
|
16944
|
+
);
|
|
16945
|
+
},
|
|
15543
16946
|
/**
|
|
15544
16947
|
* Create a new pipeline.
|
|
15545
16948
|
*
|
|
@@ -15685,7 +17088,7 @@ function createPipelineExecutionsNamespace(rb) {
|
|
|
15685
17088
|
{
|
|
15686
17089
|
path: { id },
|
|
15687
17090
|
body: {
|
|
15688
|
-
data: { type: "
|
|
17091
|
+
data: { type: "pipeline-execution", id, attributes: {} }
|
|
15689
17092
|
}
|
|
15690
17093
|
},
|
|
15691
17094
|
options
|
|
@@ -15704,7 +17107,7 @@ function createPipelineExecutionsNamespace(rb) {
|
|
|
15704
17107
|
{
|
|
15705
17108
|
path: { id },
|
|
15706
17109
|
body: {
|
|
15707
|
-
data: { type: "
|
|
17110
|
+
data: { type: "pipeline-execution", id, attributes: {} }
|
|
15708
17111
|
}
|
|
15709
17112
|
},
|
|
15710
17113
|
options
|
|
@@ -15725,7 +17128,7 @@ function createPipelineExecutionsNamespace(rb) {
|
|
|
15725
17128
|
{
|
|
15726
17129
|
path: { id },
|
|
15727
17130
|
body: {
|
|
15728
|
-
data: { type: "
|
|
17131
|
+
data: { type: "pipeline-execution", id, attributes }
|
|
15729
17132
|
}
|
|
15730
17133
|
},
|
|
15731
17134
|
options
|
|
@@ -15746,7 +17149,7 @@ function createPipelineExecutionsNamespace(rb) {
|
|
|
15746
17149
|
path: { id },
|
|
15747
17150
|
body: {
|
|
15748
17151
|
data: {
|
|
15749
|
-
type: "
|
|
17152
|
+
type: "pipeline-execution",
|
|
15750
17153
|
id,
|
|
15751
17154
|
attributes: { checkpoint_notes: note }
|
|
15752
17155
|
}
|
|
@@ -15771,7 +17174,7 @@ function createPipelineExecutionsNamespace(rb) {
|
|
|
15771
17174
|
path: { id },
|
|
15772
17175
|
body: {
|
|
15773
17176
|
data: {
|
|
15774
|
-
type: "
|
|
17177
|
+
type: "pipeline-execution",
|
|
15775
17178
|
id,
|
|
15776
17179
|
attributes: { node_id: nodeId, instruction }
|
|
15777
17180
|
}
|
|
@@ -16599,10 +18002,13 @@ function createThreadsNamespace(rb) {
|
|
|
16599
18002
|
* const fork = await admin.threads.fork('thr_01HXYZ...');
|
|
16600
18003
|
* ```
|
|
16601
18004
|
*/
|
|
16602
|
-
fork: async (id, options) => {
|
|
18005
|
+
fork: async (id, title, options) => {
|
|
16603
18006
|
return rb.execute(
|
|
16604
18007
|
postAdminThreadsByIdFork,
|
|
16605
|
-
{
|
|
18008
|
+
{
|
|
18009
|
+
path: { id },
|
|
18010
|
+
body: title ? { data: { type: "chat-thread", attributes: { title } } } : {}
|
|
18011
|
+
},
|
|
16606
18012
|
options
|
|
16607
18013
|
);
|
|
16608
18014
|
},
|
|
@@ -16686,7 +18092,7 @@ function createThreadsNamespace(rb) {
|
|
|
16686
18092
|
);
|
|
16687
18093
|
},
|
|
16688
18094
|
/**
|
|
16689
|
-
* Sub-namespace for
|
|
18095
|
+
* Sub-namespace for managing messages within a thread.
|
|
16690
18096
|
*/
|
|
16691
18097
|
messages: {
|
|
16692
18098
|
/**
|
|
@@ -16708,6 +18114,36 @@ function createThreadsNamespace(rb) {
|
|
|
16708
18114
|
{ path: { id: threadId } },
|
|
16709
18115
|
options
|
|
16710
18116
|
);
|
|
18117
|
+
},
|
|
18118
|
+
/**
|
|
18119
|
+
* Sends a message to a thread and triggers AI processing.
|
|
18120
|
+
*
|
|
18121
|
+
* @param threadId - The UUID of the thread.
|
|
18122
|
+
* @param content - The message content to send.
|
|
18123
|
+
* @param attributes - Optional extra attributes (role, metadata, attachments).
|
|
18124
|
+
* @param options - Optional request options.
|
|
18125
|
+
* @returns A promise resolving to the thread with the AI response.
|
|
18126
|
+
*
|
|
18127
|
+
* @example
|
|
18128
|
+
* ```typescript
|
|
18129
|
+
* const admin = new GptAdmin({ apiKey: 'sk_srv_...' });
|
|
18130
|
+
* const result = await admin.threads.messages.send('thr_01HXYZ...', 'Analyze this data');
|
|
18131
|
+
* ```
|
|
18132
|
+
*/
|
|
18133
|
+
send: async (threadId, content, attributes, options) => {
|
|
18134
|
+
return rb.execute(
|
|
18135
|
+
postAdminThreadsByIdMessages,
|
|
18136
|
+
{
|
|
18137
|
+
path: { id: threadId },
|
|
18138
|
+
body: {
|
|
18139
|
+
data: {
|
|
18140
|
+
type: "chat-thread",
|
|
18141
|
+
attributes: { content, ...attributes }
|
|
18142
|
+
}
|
|
18143
|
+
}
|
|
18144
|
+
},
|
|
18145
|
+
options
|
|
18146
|
+
);
|
|
16711
18147
|
}
|
|
16712
18148
|
}
|
|
16713
18149
|
};
|
|
@@ -19116,7 +20552,7 @@ function createBrandIdentitiesNamespace(rb) {
|
|
|
19116
20552
|
create: async (attributes, options) => {
|
|
19117
20553
|
return rb.execute(
|
|
19118
20554
|
postAdminBrandIdentities,
|
|
19119
|
-
{ body: { data: { type: "
|
|
20555
|
+
{ body: { data: { type: "brand-identity", attributes } } },
|
|
19120
20556
|
options
|
|
19121
20557
|
);
|
|
19122
20558
|
},
|
|
@@ -19140,7 +20576,7 @@ function createBrandIdentitiesNamespace(rb) {
|
|
|
19140
20576
|
patchAdminBrandIdentitiesById,
|
|
19141
20577
|
{
|
|
19142
20578
|
path: { id },
|
|
19143
|
-
body: { data: { id, type: "
|
|
20579
|
+
body: { data: { id, type: "brand-identity", attributes } }
|
|
19144
20580
|
},
|
|
19145
20581
|
options
|
|
19146
20582
|
);
|
|
@@ -19257,7 +20693,7 @@ function createBrandIdentitiesNamespace(rb) {
|
|
|
19257
20693
|
patchAdminBrandIdentitiesByIdSetDefault,
|
|
19258
20694
|
{
|
|
19259
20695
|
path: { id },
|
|
19260
|
-
body: { data: { id, type: "
|
|
20696
|
+
body: { data: { id, type: "brand-identity", attributes: {} } }
|
|
19261
20697
|
},
|
|
19262
20698
|
options
|
|
19263
20699
|
);
|
|
@@ -19279,7 +20715,7 @@ function createBrandIdentitiesNamespace(rb) {
|
|
|
19279
20715
|
patchAdminBrandIdentitiesByIdUnsetDefault,
|
|
19280
20716
|
{
|
|
19281
20717
|
path: { id },
|
|
19282
|
-
body: { data: { id, type: "
|
|
20718
|
+
body: { data: { id, type: "brand-identity", attributes: {} } }
|
|
19283
20719
|
},
|
|
19284
20720
|
options
|
|
19285
20721
|
);
|
|
@@ -19341,7 +20777,7 @@ function createPlatformTonesNamespace(rb) {
|
|
|
19341
20777
|
create: async (attributes, options) => {
|
|
19342
20778
|
return rb.execute(
|
|
19343
20779
|
postAdminPlatformTones,
|
|
19344
|
-
{ body: { data: { type: "
|
|
20780
|
+
{ body: { data: { type: "platform-tone", attributes } } },
|
|
19345
20781
|
options
|
|
19346
20782
|
);
|
|
19347
20783
|
},
|
|
@@ -19365,7 +20801,7 @@ function createPlatformTonesNamespace(rb) {
|
|
|
19365
20801
|
patchAdminPlatformTonesById,
|
|
19366
20802
|
{
|
|
19367
20803
|
path: { id },
|
|
19368
|
-
body: { data: { id, type: "
|
|
20804
|
+
body: { data: { id, type: "platform-tone", attributes } }
|
|
19369
20805
|
},
|
|
19370
20806
|
options
|
|
19371
20807
|
);
|
|
@@ -19412,11 +20848,23 @@ function createPlatformTonesNamespace(rb) {
|
|
|
19412
20848
|
}
|
|
19413
20849
|
|
|
19414
20850
|
// src/namespaces/channels.ts
|
|
20851
|
+
function mapResponse(raw) {
|
|
20852
|
+
return {
|
|
20853
|
+
channelToken: raw.channel_token,
|
|
20854
|
+
expiresAt: raw.expires_at,
|
|
20855
|
+
channels: raw.channels,
|
|
20856
|
+
workspaceId: raw.workspace_id
|
|
20857
|
+
};
|
|
20858
|
+
}
|
|
19415
20859
|
function createChannelsNamespace(rb) {
|
|
19416
20860
|
return {
|
|
19417
20861
|
/**
|
|
19418
20862
|
* Exchange the current bearer token for a scoped channel token.
|
|
19419
20863
|
*
|
|
20864
|
+
* **Important:** This endpoint requires user context (Bearer token from a
|
|
20865
|
+
* `sk_tenant_` key). Server keys (`sk_srv_`, `sk_sys_`) are explicitly
|
|
20866
|
+
* rejected — channel tokens are scoped to end-user sessions.
|
|
20867
|
+
*
|
|
19420
20868
|
* @param request - Workspace and channel scope
|
|
19421
20869
|
* @param options - Request options (signal, etc.)
|
|
19422
20870
|
* @returns Channel token response
|
|
@@ -19430,12 +20878,7 @@ function createChannelsNamespace(rb) {
|
|
|
19430
20878
|
},
|
|
19431
20879
|
options
|
|
19432
20880
|
);
|
|
19433
|
-
return
|
|
19434
|
-
channelToken: raw.channel_token,
|
|
19435
|
-
expiresAt: raw.expires_at,
|
|
19436
|
-
channels: raw.channels,
|
|
19437
|
-
workspaceId: raw.workspace_id
|
|
19438
|
-
};
|
|
20881
|
+
return mapResponse(raw);
|
|
19439
20882
|
}
|
|
19440
20883
|
};
|
|
19441
20884
|
}
|
|
@@ -19627,6 +21070,7 @@ export {
|
|
|
19627
21070
|
ServerError,
|
|
19628
21071
|
TimeoutError,
|
|
19629
21072
|
ValidationError,
|
|
21073
|
+
createChannelsNamespace,
|
|
19630
21074
|
createImportsNamespace,
|
|
19631
21075
|
index_default as default,
|
|
19632
21076
|
handleApiError
|