@gpt-platform/admin 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +26425 -20937
- package/dist/index.d.ts +26425 -20937
- package/dist/index.js +1795 -372
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1794 -372
- package/dist/index.mjs.map +1 -1
- package/llms.txt +499 -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.0";
|
|
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}",
|
|
@@ -3764,6 +3971,11 @@ var getAdminExtractionShadowComparisonsById = (options) => (options.client ?? cl
|
|
|
3764
3971
|
url: "/admin/extraction/shadow-comparisons/{id}",
|
|
3765
3972
|
...options
|
|
3766
3973
|
});
|
|
3974
|
+
var getAdminEmailMarketingTemplatesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
3975
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3976
|
+
url: "/admin/email-marketing/templates/workspace/{workspace_id}",
|
|
3977
|
+
...options
|
|
3978
|
+
});
|
|
3767
3979
|
var postAdminSocialCampaignsByIdGenerateMasterCopy = (options) => (options.client ?? client).post({
|
|
3768
3980
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3769
3981
|
url: "/admin/social/campaigns/{id}/generate-master-copy",
|
|
@@ -3824,6 +4036,15 @@ var patchAdminClinicalPracticeResourcesCatalogByIdRestore = (options) => (option
|
|
|
3824
4036
|
...options.headers
|
|
3825
4037
|
}
|
|
3826
4038
|
});
|
|
4039
|
+
var patchAdminEmailMarketingTemplatesByIdRestore = (options) => (options.client ?? client).patch({
|
|
4040
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4041
|
+
url: "/admin/email-marketing/templates/{id}/restore",
|
|
4042
|
+
...options,
|
|
4043
|
+
headers: {
|
|
4044
|
+
"Content-Type": "application/vnd.api+json",
|
|
4045
|
+
...options.headers
|
|
4046
|
+
}
|
|
4047
|
+
});
|
|
3827
4048
|
var patchAdminWalletPlan = (options) => (options.client ?? client).patch({
|
|
3828
4049
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3829
4050
|
url: "/admin/wallet/plan",
|
|
@@ -3885,6 +4106,15 @@ var getAdminAgentsByIdUsage = (options) => (options.client ?? client).get({
|
|
|
3885
4106
|
url: "/admin/agents/{id}/usage",
|
|
3886
4107
|
...options
|
|
3887
4108
|
});
|
|
4109
|
+
var patchAdminEmailMarketingGeneratedEmailsByIdSchedule = (options) => (options.client ?? client).patch({
|
|
4110
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4111
|
+
url: "/admin/email-marketing/generated-emails/{id}/schedule",
|
|
4112
|
+
...options,
|
|
4113
|
+
headers: {
|
|
4114
|
+
"Content-Type": "application/vnd.api+json",
|
|
4115
|
+
...options.headers
|
|
4116
|
+
}
|
|
4117
|
+
});
|
|
3888
4118
|
var getAdminEmailTrackingEventsById = (options) => (options.client ?? client).get({
|
|
3889
4119
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3890
4120
|
url: "/admin/email/tracking-events/{id}",
|
|
@@ -4027,6 +4257,20 @@ var patchAdminClinicalClientGoalsByIdRestore = (options) => (options.client ?? c
|
|
|
4027
4257
|
...options.headers
|
|
4028
4258
|
}
|
|
4029
4259
|
});
|
|
4260
|
+
var getAdminEmailMarketingGeneratedEmailsById = (options) => (options.client ?? client).get({
|
|
4261
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4262
|
+
url: "/admin/email-marketing/generated-emails/{id}",
|
|
4263
|
+
...options
|
|
4264
|
+
});
|
|
4265
|
+
var patchAdminEmailMarketingGeneratedEmailsById = (options) => (options.client ?? client).patch({
|
|
4266
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4267
|
+
url: "/admin/email-marketing/generated-emails/{id}",
|
|
4268
|
+
...options,
|
|
4269
|
+
headers: {
|
|
4270
|
+
"Content-Type": "application/vnd.api+json",
|
|
4271
|
+
...options.headers
|
|
4272
|
+
}
|
|
4273
|
+
});
|
|
4030
4274
|
var getAdminInvitationsMe = (options) => (options.client ?? client).get({
|
|
4031
4275
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4032
4276
|
url: "/admin/invitations/me",
|
|
@@ -4065,6 +4309,11 @@ var getAdminVoiceSessionsWorkspaceByWorkspaceId = (options) => (options.client ?
|
|
|
4065
4309
|
url: "/admin/voice/sessions/workspace/{workspace_id}",
|
|
4066
4310
|
...options
|
|
4067
4311
|
});
|
|
4312
|
+
var getAdminCampaignsRecipientsCampaignByCampaignId = (options) => (options.client ?? client).get({
|
|
4313
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4314
|
+
url: "/admin/campaigns/recipients/campaign/{campaign_id}",
|
|
4315
|
+
...options
|
|
4316
|
+
});
|
|
4068
4317
|
var getAdminInvitationsConsumeByToken = (options) => (options.client ?? client).get({
|
|
4069
4318
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4070
4319
|
url: "/admin/invitations/consume/{token}",
|
|
@@ -4103,6 +4352,25 @@ var postAdminWorkspaceAgentConfigs = (options) => (options.client ?? client).pos
|
|
|
4103
4352
|
...options.headers
|
|
4104
4353
|
}
|
|
4105
4354
|
});
|
|
4355
|
+
var getAdminEmailTemplateVersionsByTemplateIdVersionsByVersionNumber = (options) => (options.client ?? client).get({
|
|
4356
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4357
|
+
url: "/admin/email/template-versions/{template_id}/versions/{version_number}",
|
|
4358
|
+
...options
|
|
4359
|
+
});
|
|
4360
|
+
var postAdminEmailMarketingCampaignsByIdOptimizeSendTimes = (options) => (options.client ?? client).post({
|
|
4361
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4362
|
+
url: "/admin/email-marketing/campaigns/{id}/optimize-send-times",
|
|
4363
|
+
...options,
|
|
4364
|
+
headers: {
|
|
4365
|
+
"Content-Type": "application/vnd.api+json",
|
|
4366
|
+
...options.headers
|
|
4367
|
+
}
|
|
4368
|
+
});
|
|
4369
|
+
var getAdminVoiceTranscriptionJobsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
4370
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4371
|
+
url: "/admin/voice/transcription-jobs/workspace/{workspace_id}",
|
|
4372
|
+
...options
|
|
4373
|
+
});
|
|
4106
4374
|
var getAdminSocialMetricsPostBySocialPostIdLatest = (options) => (options.client ?? client).get({
|
|
4107
4375
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4108
4376
|
url: "/admin/social/metrics/post/{social_post_id}/latest",
|
|
@@ -4221,6 +4489,15 @@ var postAdminExtractionDocumentsBulkReprocess = (options) => (options.client ??
|
|
|
4221
4489
|
...options.headers
|
|
4222
4490
|
}
|
|
4223
4491
|
});
|
|
4492
|
+
var postAdminEmailMarketingCampaignsByIdGenerateEmails = (options) => (options.client ?? client).post({
|
|
4493
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4494
|
+
url: "/admin/email-marketing/campaigns/{id}/generate-emails",
|
|
4495
|
+
...options,
|
|
4496
|
+
headers: {
|
|
4497
|
+
"Content-Type": "application/vnd.api+json",
|
|
4498
|
+
...options.headers
|
|
4499
|
+
}
|
|
4500
|
+
});
|
|
4224
4501
|
var postAdminContentEditImage = (options) => (options.client ?? client).post({
|
|
4225
4502
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4226
4503
|
url: "/admin/content/edit-image",
|
|
@@ -4353,6 +4630,15 @@ var patchAdminExtractionResultsByIdRegenerate = (options) => (options.client ??
|
|
|
4353
4630
|
...options.headers
|
|
4354
4631
|
}
|
|
4355
4632
|
});
|
|
4633
|
+
var patchAdminEmailMarketingTemplatesByIdPreview = (options) => (options.client ?? client).patch({
|
|
4634
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4635
|
+
url: "/admin/email-marketing/templates/{id}/preview",
|
|
4636
|
+
...options,
|
|
4637
|
+
headers: {
|
|
4638
|
+
"Content-Type": "application/vnd.api+json",
|
|
4639
|
+
...options.headers
|
|
4640
|
+
}
|
|
4641
|
+
});
|
|
4356
4642
|
var postAdminWorkspacesByWorkspaceIdExtractionDocumentsDismissAllTrained = (options) => (options.client ?? client).post({
|
|
4357
4643
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4358
4644
|
url: "/admin/workspaces/{workspace_id}/extraction/documents/dismiss-all-trained",
|
|
@@ -4460,6 +4746,25 @@ var patchAdminAgentDeploymentsByIdAcceptUpdate = (options) => (options.client ??
|
|
|
4460
4746
|
...options.headers
|
|
4461
4747
|
}
|
|
4462
4748
|
});
|
|
4749
|
+
var deleteAdminEmailMarketingTemplatesById = (options) => (options.client ?? client).delete({
|
|
4750
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4751
|
+
url: "/admin/email-marketing/templates/{id}",
|
|
4752
|
+
...options
|
|
4753
|
+
});
|
|
4754
|
+
var getAdminEmailMarketingTemplatesById = (options) => (options.client ?? client).get({
|
|
4755
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4756
|
+
url: "/admin/email-marketing/templates/{id}",
|
|
4757
|
+
...options
|
|
4758
|
+
});
|
|
4759
|
+
var patchAdminEmailMarketingTemplatesById = (options) => (options.client ?? client).patch({
|
|
4760
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4761
|
+
url: "/admin/email-marketing/templates/{id}",
|
|
4762
|
+
...options,
|
|
4763
|
+
headers: {
|
|
4764
|
+
"Content-Type": "application/vnd.api+json",
|
|
4765
|
+
...options.headers
|
|
4766
|
+
}
|
|
4767
|
+
});
|
|
4463
4768
|
var getAdminDocumentsStats = (options) => (options.client ?? client).get({
|
|
4464
4769
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4465
4770
|
url: "/admin/documents/stats",
|
|
@@ -4685,6 +4990,15 @@ var getAdminCrmExportsWorkspaceByWorkspaceId = (options) => (options.client ?? c
|
|
|
4685
4990
|
url: "/admin/crm/exports/workspace/{workspace_id}",
|
|
4686
4991
|
...options
|
|
4687
4992
|
});
|
|
4993
|
+
var postAdminEmailMarketingCampaignsByIdImportRecipients = (options) => (options.client ?? client).post({
|
|
4994
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4995
|
+
url: "/admin/email-marketing/campaigns/{id}/import-recipients",
|
|
4996
|
+
...options,
|
|
4997
|
+
headers: {
|
|
4998
|
+
"Content-Type": "application/vnd.api+json",
|
|
4999
|
+
...options.headers
|
|
5000
|
+
}
|
|
5001
|
+
});
|
|
4688
5002
|
var getAdminSupportTicketMessagesTicketByTicketId = (options) => (options.client ?? client).get({
|
|
4689
5003
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4690
5004
|
url: "/admin/support/ticket-messages/ticket/{ticket_id}",
|
|
@@ -4704,6 +5018,11 @@ var getAdminWorkspacesByWorkspaceIdExtractionExportsById = (options) => (options
|
|
|
4704
5018
|
url: "/admin/workspaces/{workspace_id}/extraction/exports/{id}",
|
|
4705
5019
|
...options
|
|
4706
5020
|
});
|
|
5021
|
+
var getAdminEmailMarketingGeneratedEmailsCampaignByCampaignId = (options) => (options.client ?? client).get({
|
|
5022
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5023
|
+
url: "/admin/email-marketing/generated-emails/campaign/{campaign_id}",
|
|
5024
|
+
...options
|
|
5025
|
+
});
|
|
4707
5026
|
var postAdminSupportCannedResponses = (options) => (options.client ?? client).post({
|
|
4708
5027
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4709
5028
|
url: "/admin/support/canned-responses",
|
|
@@ -4750,6 +5069,15 @@ var postAdminSupportTicketRatings = (options) => (options.client ?? client).post
|
|
|
4750
5069
|
...options.headers
|
|
4751
5070
|
}
|
|
4752
5071
|
});
|
|
5072
|
+
var postAdminCampaignsSequences = (options) => (options.client ?? client).post({
|
|
5073
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5074
|
+
url: "/admin/campaigns/sequences",
|
|
5075
|
+
...options,
|
|
5076
|
+
headers: {
|
|
5077
|
+
"Content-Type": "application/vnd.api+json",
|
|
5078
|
+
...options.headers
|
|
5079
|
+
}
|
|
5080
|
+
});
|
|
4753
5081
|
var postAdminCrmActivities = (options) => (options.client ?? client).post({
|
|
4754
5082
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4755
5083
|
url: "/admin/crm/activities",
|
|
@@ -4796,6 +5124,15 @@ var patchAdminPricingStrategiesById = (options) => (options.client ?? client).pa
|
|
|
4796
5124
|
...options.headers
|
|
4797
5125
|
}
|
|
4798
5126
|
});
|
|
5127
|
+
var postAdminEmailMarketingCampaignsByIdExport = (options) => (options.client ?? client).post({
|
|
5128
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5129
|
+
url: "/admin/email-marketing/campaigns/{id}/export",
|
|
5130
|
+
...options,
|
|
5131
|
+
headers: {
|
|
5132
|
+
"Content-Type": "application/vnd.api+json",
|
|
5133
|
+
...options.headers
|
|
5134
|
+
}
|
|
5135
|
+
});
|
|
4799
5136
|
var getAdminCrmRelationshipsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
4800
5137
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4801
5138
|
url: "/admin/crm/relationships/workspace/{workspace_id}",
|
|
@@ -4880,6 +5217,15 @@ var postAdminAgentsByIdTest = (options) => (options.client ?? client).post({
|
|
|
4880
5217
|
...options.headers
|
|
4881
5218
|
}
|
|
4882
5219
|
});
|
|
5220
|
+
var patchAdminSchedulingRemindersByIdCancel = (options) => (options.client ?? client).patch({
|
|
5221
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5222
|
+
url: "/admin/scheduling/reminders/{id}/cancel",
|
|
5223
|
+
...options,
|
|
5224
|
+
headers: {
|
|
5225
|
+
"Content-Type": "application/vnd.api+json",
|
|
5226
|
+
...options.headers
|
|
5227
|
+
}
|
|
5228
|
+
});
|
|
4883
5229
|
var getAdminSchedulingLocationsById = (options) => (options.client ?? client).get({
|
|
4884
5230
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4885
5231
|
url: "/admin/scheduling/locations/{id}",
|
|
@@ -5240,6 +5586,11 @@ var getAdminSchedulingRemindersById = (options) => (options.client ?? client).ge
|
|
|
5240
5586
|
url: "/admin/scheduling/reminders/{id}",
|
|
5241
5587
|
...options
|
|
5242
5588
|
});
|
|
5589
|
+
var getAdminSchedulingBookingsByBooker = (options) => (options.client ?? client).get({
|
|
5590
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5591
|
+
url: "/admin/scheduling/bookings/by-booker",
|
|
5592
|
+
...options
|
|
5593
|
+
});
|
|
5243
5594
|
var deleteAdminClinicalPatientsById = (options) => (options.client ?? client).delete({
|
|
5244
5595
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5245
5596
|
url: "/admin/clinical/patients/{id}",
|
|
@@ -5478,6 +5829,15 @@ var getAdminVoiceRecordingsById = (options) => (options.client ?? client).get({
|
|
|
5478
5829
|
url: "/admin/voice/recordings/{id}",
|
|
5479
5830
|
...options
|
|
5480
5831
|
});
|
|
5832
|
+
var patchAdminEmailMarketingGeneratedEmailsByIdApprove = (options) => (options.client ?? client).patch({
|
|
5833
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5834
|
+
url: "/admin/email-marketing/generated-emails/{id}/approve",
|
|
5835
|
+
...options,
|
|
5836
|
+
headers: {
|
|
5837
|
+
"Content-Type": "application/vnd.api+json",
|
|
5838
|
+
...options.headers
|
|
5839
|
+
}
|
|
5840
|
+
});
|
|
5481
5841
|
var patchAdminClinicalMealPlansByIdArchive = (options) => (options.client ?? client).patch({
|
|
5482
5842
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5483
5843
|
url: "/admin/clinical/meal-plans/{id}/archive",
|
|
@@ -5533,6 +5893,25 @@ var postAdminClinicalNotes = (options) => (options.client ?? client).post({
|
|
|
5533
5893
|
...options.headers
|
|
5534
5894
|
}
|
|
5535
5895
|
});
|
|
5896
|
+
var deleteAdminCampaignsSequenceStepsById = (options) => (options.client ?? client).delete({
|
|
5897
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5898
|
+
url: "/admin/campaigns/sequence-steps/{id}",
|
|
5899
|
+
...options
|
|
5900
|
+
});
|
|
5901
|
+
var getAdminCampaignsSequenceStepsById = (options) => (options.client ?? client).get({
|
|
5902
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5903
|
+
url: "/admin/campaigns/sequence-steps/{id}",
|
|
5904
|
+
...options
|
|
5905
|
+
});
|
|
5906
|
+
var patchAdminCampaignsSequenceStepsById = (options) => (options.client ?? client).patch({
|
|
5907
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5908
|
+
url: "/admin/campaigns/sequence-steps/{id}",
|
|
5909
|
+
...options,
|
|
5910
|
+
headers: {
|
|
5911
|
+
"Content-Type": "application/vnd.api+json",
|
|
5912
|
+
...options.headers
|
|
5913
|
+
}
|
|
5914
|
+
});
|
|
5536
5915
|
var getAdminClinicalPatientsByIdGoals = (options) => (options.client ?? client).get({
|
|
5537
5916
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5538
5917
|
url: "/admin/clinical/patients/{id}/goals",
|
|
@@ -5580,6 +5959,15 @@ var getAdminSupportRoutingRulesApplicationByApplicationId = (options) => (option
|
|
|
5580
5959
|
url: "/admin/support/routing-rules/application/{application_id}",
|
|
5581
5960
|
...options
|
|
5582
5961
|
});
|
|
5962
|
+
var postAdminEmailMarketingTemplatesCompile = (options) => (options.client ?? client).post({
|
|
5963
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5964
|
+
url: "/admin/email-marketing/templates/compile",
|
|
5965
|
+
...options,
|
|
5966
|
+
headers: {
|
|
5967
|
+
"Content-Type": "application/vnd.api+json",
|
|
5968
|
+
...options.headers
|
|
5969
|
+
}
|
|
5970
|
+
});
|
|
5583
5971
|
var getAdminClinicalNotesArchived = (options) => (options.client ?? client).get({
|
|
5584
5972
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5585
5973
|
url: "/admin/clinical/notes/archived",
|
|
@@ -5715,6 +6103,15 @@ var postAdminSysSemanticCacheClear = (options) => (options.client ?? client).pos
|
|
|
5715
6103
|
...options.headers
|
|
5716
6104
|
}
|
|
5717
6105
|
});
|
|
6106
|
+
var patchAdminEmailMarketingTemplatesByIdRollback = (options) => (options.client ?? client).patch({
|
|
6107
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6108
|
+
url: "/admin/email-marketing/templates/{id}/rollback",
|
|
6109
|
+
...options,
|
|
6110
|
+
headers: {
|
|
6111
|
+
"Content-Type": "application/vnd.api+json",
|
|
6112
|
+
...options.headers
|
|
6113
|
+
}
|
|
6114
|
+
});
|
|
5718
6115
|
var getAdminSocialTrendingWatchesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
5719
6116
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5720
6117
|
url: "/admin/social/trending/watches/workspace/{workspace_id}",
|
|
@@ -5941,6 +6338,15 @@ var patchAdminSocialTrendingWatchesById = (options) => (options.client ?? client
|
|
|
5941
6338
|
...options.headers
|
|
5942
6339
|
}
|
|
5943
6340
|
});
|
|
6341
|
+
var patchAdminEmailMarketingTemplatesByIdPublish = (options) => (options.client ?? client).patch({
|
|
6342
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6343
|
+
url: "/admin/email-marketing/templates/{id}/publish",
|
|
6344
|
+
...options,
|
|
6345
|
+
headers: {
|
|
6346
|
+
"Content-Type": "application/vnd.api+json",
|
|
6347
|
+
...options.headers
|
|
6348
|
+
}
|
|
6349
|
+
});
|
|
5944
6350
|
var getAdminSocialMetricsAccountBySocialAccountId = (options) => (options.client ?? client).get({
|
|
5945
6351
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5946
6352
|
url: "/admin/social/metrics/account/{social_account_id}",
|
|
@@ -6065,6 +6471,15 @@ var patchAdminPlansById = (options) => (options.client ?? client).patch({
|
|
|
6065
6471
|
...options.headers
|
|
6066
6472
|
}
|
|
6067
6473
|
});
|
|
6474
|
+
var patchAdminSchedulingEventTypesByIdArchive = (options) => (options.client ?? client).patch({
|
|
6475
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6476
|
+
url: "/admin/scheduling/event-types/{id}/archive",
|
|
6477
|
+
...options,
|
|
6478
|
+
headers: {
|
|
6479
|
+
"Content-Type": "application/vnd.api+json",
|
|
6480
|
+
...options.headers
|
|
6481
|
+
}
|
|
6482
|
+
});
|
|
6068
6483
|
var patchAdminUsersByIdResetPassword = (options) => (options.client ?? client).patch({
|
|
6069
6484
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6070
6485
|
url: "/admin/users/{id}/reset-password",
|
|
@@ -6409,6 +6824,11 @@ var postAdminThreadsByIdComplete = (options) => (options.client ?? client).post(
|
|
|
6409
6824
|
...options.headers
|
|
6410
6825
|
}
|
|
6411
6826
|
});
|
|
6827
|
+
var getAdminVoiceTranscriptionJobsMine = (options) => (options.client ?? client).get({
|
|
6828
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6829
|
+
url: "/admin/voice/transcription-jobs/mine",
|
|
6830
|
+
...options
|
|
6831
|
+
});
|
|
6412
6832
|
var deleteAdminConnectorsOauthAppConfigsById = (options) => (options.client ?? client).delete({
|
|
6413
6833
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6414
6834
|
url: "/admin/connectors/oauth-app-configs/{id}",
|
|
@@ -6428,6 +6848,11 @@ var patchAdminConnectorsOauthAppConfigsById = (options) => (options.client ?? cl
|
|
|
6428
6848
|
...options.headers
|
|
6429
6849
|
}
|
|
6430
6850
|
});
|
|
6851
|
+
var getAdminSchedulingAvailabilityRulesByUser = (options) => (options.client ?? client).get({
|
|
6852
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6853
|
+
url: "/admin/scheduling/availability-rules/by-user",
|
|
6854
|
+
...options
|
|
6855
|
+
});
|
|
6431
6856
|
var getAdminClinicalClientResourceAssignments = (options) => (options.client ?? client).get({
|
|
6432
6857
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6433
6858
|
url: "/admin/clinical/client-resource-assignments",
|
|
@@ -6619,6 +7044,11 @@ var patchAdminInvitationsByIdDecline = (options) => (options.client ?? client).p
|
|
|
6619
7044
|
...options.headers
|
|
6620
7045
|
}
|
|
6621
7046
|
});
|
|
7047
|
+
var getAdminSchedulingEventTypesBySlug = (options) => (options.client ?? client).get({
|
|
7048
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
7049
|
+
url: "/admin/scheduling/event-types/by-slug",
|
|
7050
|
+
...options
|
|
7051
|
+
});
|
|
6622
7052
|
var deleteAdminClinicalGoalTemplatesCatalogByIdPermanent = (options) => (options.client ?? client).delete({
|
|
6623
7053
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6624
7054
|
url: "/admin/clinical/goal-templates/catalog/{id}/permanent",
|
|
@@ -7189,7 +7619,7 @@ function createAgentsNamespace(rb) {
|
|
|
7189
7619
|
create: async (attributes, options) => {
|
|
7190
7620
|
return rb.execute(
|
|
7191
7621
|
postAdminAgentVersions,
|
|
7192
|
-
{ body: { data: { type: "
|
|
7622
|
+
{ body: { data: { type: "agent-version", attributes } } },
|
|
7193
7623
|
options
|
|
7194
7624
|
);
|
|
7195
7625
|
},
|
|
@@ -7211,7 +7641,7 @@ function createAgentsNamespace(rb) {
|
|
|
7211
7641
|
path: { id },
|
|
7212
7642
|
body: {
|
|
7213
7643
|
data: {
|
|
7214
|
-
type: "
|
|
7644
|
+
type: "agent-version",
|
|
7215
7645
|
system_field_name: fieldName
|
|
7216
7646
|
}
|
|
7217
7647
|
}
|
|
@@ -7237,7 +7667,7 @@ function createAgentsNamespace(rb) {
|
|
|
7237
7667
|
path: { id },
|
|
7238
7668
|
body: {
|
|
7239
7669
|
data: {
|
|
7240
|
-
type: "
|
|
7670
|
+
type: "agent-version",
|
|
7241
7671
|
system_field_name: fieldName
|
|
7242
7672
|
}
|
|
7243
7673
|
}
|
|
@@ -7263,7 +7693,7 @@ function createAgentsNamespace(rb) {
|
|
|
7263
7693
|
path: { id },
|
|
7264
7694
|
body: {
|
|
7265
7695
|
data: {
|
|
7266
|
-
type: "
|
|
7696
|
+
type: "agent-version",
|
|
7267
7697
|
system_field_names: fieldNames
|
|
7268
7698
|
}
|
|
7269
7699
|
}
|
|
@@ -7355,7 +7785,7 @@ function createAgentsNamespace(rb) {
|
|
|
7355
7785
|
{
|
|
7356
7786
|
body: {
|
|
7357
7787
|
data: {
|
|
7358
|
-
type: "
|
|
7788
|
+
type: "agent-version-comparison",
|
|
7359
7789
|
attributes: {
|
|
7360
7790
|
version_a_id: versionAId,
|
|
7361
7791
|
version_b_id: versionBId
|
|
@@ -7403,7 +7833,7 @@ function createAgentsNamespace(rb) {
|
|
|
7403
7833
|
postAdminAgentsByIdSchemaVersions,
|
|
7404
7834
|
{
|
|
7405
7835
|
path: { id: agentId },
|
|
7406
|
-
body: { data: { type: "
|
|
7836
|
+
body: { data: { type: "agent-version", ...attributes } }
|
|
7407
7837
|
},
|
|
7408
7838
|
options
|
|
7409
7839
|
);
|
|
@@ -7443,7 +7873,7 @@ function createAgentsNamespace(rb) {
|
|
|
7443
7873
|
patchAdminAgentsByIdSchemaVersionsByVersionId,
|
|
7444
7874
|
{
|
|
7445
7875
|
path: { id: agentId, version_id: versionId },
|
|
7446
|
-
body: { data: { type: "
|
|
7876
|
+
body: { data: { type: "agent-version", ...attributes } }
|
|
7447
7877
|
},
|
|
7448
7878
|
options
|
|
7449
7879
|
);
|
|
@@ -7500,7 +7930,7 @@ function createAgentsNamespace(rb) {
|
|
|
7500
7930
|
create: async (attributes, options) => {
|
|
7501
7931
|
return rb.execute(
|
|
7502
7932
|
postAdminTrainingExamples,
|
|
7503
|
-
{ body: { data: { type: "
|
|
7933
|
+
{ body: { data: { type: "training-example", attributes } } },
|
|
7504
7934
|
options
|
|
7505
7935
|
);
|
|
7506
7936
|
},
|
|
@@ -7520,7 +7950,7 @@ function createAgentsNamespace(rb) {
|
|
|
7520
7950
|
patchAdminTrainingExamplesById,
|
|
7521
7951
|
{
|
|
7522
7952
|
path: { id },
|
|
7523
|
-
body: { data: { id, type: "
|
|
7953
|
+
body: { data: { id, type: "training-example", attributes } }
|
|
7524
7954
|
},
|
|
7525
7955
|
options
|
|
7526
7956
|
);
|
|
@@ -7560,7 +7990,7 @@ function createAgentsNamespace(rb) {
|
|
|
7560
7990
|
{
|
|
7561
7991
|
body: {
|
|
7562
7992
|
data: {
|
|
7563
|
-
type: "
|
|
7993
|
+
type: "training-example",
|
|
7564
7994
|
agent_id: examples[0]?.agent_id,
|
|
7565
7995
|
examples
|
|
7566
7996
|
}
|
|
@@ -7583,7 +8013,7 @@ function createAgentsNamespace(rb) {
|
|
|
7583
8013
|
return rb.execute(
|
|
7584
8014
|
postAdminTrainingExamplesBulkDelete,
|
|
7585
8015
|
{
|
|
7586
|
-
body: { data: { type: "
|
|
8016
|
+
body: { data: { type: "training-example", ids } }
|
|
7587
8017
|
},
|
|
7588
8018
|
options
|
|
7589
8019
|
);
|
|
@@ -7603,7 +8033,7 @@ function createAgentsNamespace(rb) {
|
|
|
7603
8033
|
postAdminTrainingExamplesSearch,
|
|
7604
8034
|
{
|
|
7605
8035
|
body: {
|
|
7606
|
-
data: { type: "
|
|
8036
|
+
data: { type: "training-example", query }
|
|
7607
8037
|
}
|
|
7608
8038
|
},
|
|
7609
8039
|
options
|
|
@@ -7747,7 +8177,7 @@ function createAgentsNamespace(rb) {
|
|
|
7747
8177
|
create: async (attributes, options) => {
|
|
7748
8178
|
return rb.execute(
|
|
7749
8179
|
postAdminFieldTemplates,
|
|
7750
|
-
{ body: { data: { type: "
|
|
8180
|
+
{ body: { data: { type: "field-template", attributes } } },
|
|
7751
8181
|
options
|
|
7752
8182
|
);
|
|
7753
8183
|
},
|
|
@@ -8850,7 +9280,7 @@ function createApiKeysNamespace(rb) {
|
|
|
8850
9280
|
create: async (attributes, options) => {
|
|
8851
9281
|
return rb.execute(
|
|
8852
9282
|
postAdminApiKeys,
|
|
8853
|
-
{ body: { data: { type: "
|
|
9283
|
+
{ body: { data: { type: "api-key", attributes } } },
|
|
8854
9284
|
options
|
|
8855
9285
|
);
|
|
8856
9286
|
},
|
|
@@ -8863,7 +9293,7 @@ function createApiKeysNamespace(rb) {
|
|
|
8863
9293
|
update: async (id, attributes, options) => {
|
|
8864
9294
|
return rb.execute(
|
|
8865
9295
|
patchAdminApiKeysById,
|
|
8866
|
-
{ path: { id }, body: { data: { id, type: "
|
|
9296
|
+
{ path: { id }, body: { data: { id, type: "api-key", attributes } } },
|
|
8867
9297
|
options
|
|
8868
9298
|
);
|
|
8869
9299
|
},
|
|
@@ -8893,7 +9323,7 @@ function createApiKeysNamespace(rb) {
|
|
|
8893
9323
|
body: {
|
|
8894
9324
|
data: {
|
|
8895
9325
|
id,
|
|
8896
|
-
type: "
|
|
9326
|
+
type: "api-key",
|
|
8897
9327
|
attributes: {
|
|
8898
9328
|
credit_limit: creditLimit,
|
|
8899
9329
|
credit_limit_period: creditLimitPeriod
|
|
@@ -8932,7 +9362,7 @@ function createApiKeysNamespace(rb) {
|
|
|
8932
9362
|
patchAdminApiKeysByIdResetPeriod,
|
|
8933
9363
|
{
|
|
8934
9364
|
path: { id },
|
|
8935
|
-
body: { data: { id, type: "
|
|
9365
|
+
body: { data: { id, type: "api-key", attributes: {} } }
|
|
8936
9366
|
},
|
|
8937
9367
|
options
|
|
8938
9368
|
);
|
|
@@ -9224,7 +9654,7 @@ function createStorageNamespace(rb) {
|
|
|
9224
9654
|
archive: async (id, options) => {
|
|
9225
9655
|
return rb.execute(
|
|
9226
9656
|
patchAdminStorageFilesByIdArchive,
|
|
9227
|
-
{ path: { id }, body: { data: { id, type: "
|
|
9657
|
+
{ path: { id }, body: { data: { id, type: "storage-file" } } },
|
|
9228
9658
|
options
|
|
9229
9659
|
);
|
|
9230
9660
|
},
|
|
@@ -9232,7 +9662,7 @@ function createStorageNamespace(rb) {
|
|
|
9232
9662
|
restore: async (id, options) => {
|
|
9233
9663
|
return rb.execute(
|
|
9234
9664
|
patchAdminStorageFilesByIdRestore,
|
|
9235
|
-
{ path: { id }, body: { data: { id, type: "
|
|
9665
|
+
{ path: { id }, body: { data: { id, type: "storage-file" } } },
|
|
9236
9666
|
options
|
|
9237
9667
|
);
|
|
9238
9668
|
},
|
|
@@ -9245,7 +9675,7 @@ function createStorageNamespace(rb) {
|
|
|
9245
9675
|
body: {
|
|
9246
9676
|
data: {
|
|
9247
9677
|
id,
|
|
9248
|
-
type: "
|
|
9678
|
+
type: "storage-file",
|
|
9249
9679
|
attributes: attributes ?? {}
|
|
9250
9680
|
}
|
|
9251
9681
|
}
|
|
@@ -9257,7 +9687,7 @@ function createStorageNamespace(rb) {
|
|
|
9257
9687
|
softDelete: async (id, options) => {
|
|
9258
9688
|
return rb.execute(
|
|
9259
9689
|
patchAdminStorageFilesByIdSoftDelete,
|
|
9260
|
-
{ path: { id }, body: { data: { id, type: "
|
|
9690
|
+
{ path: { id }, body: { data: { id, type: "storage-file" } } },
|
|
9261
9691
|
options
|
|
9262
9692
|
);
|
|
9263
9693
|
},
|
|
@@ -9268,7 +9698,7 @@ function createStorageNamespace(rb) {
|
|
|
9268
9698
|
{
|
|
9269
9699
|
path: { id },
|
|
9270
9700
|
body: {
|
|
9271
|
-
data: { id, type: "
|
|
9701
|
+
data: { id, type: "storage-file", attributes: { tags } }
|
|
9272
9702
|
}
|
|
9273
9703
|
},
|
|
9274
9704
|
options
|
|
@@ -9283,7 +9713,7 @@ function createStorageNamespace(rb) {
|
|
|
9283
9713
|
body: {
|
|
9284
9714
|
data: {
|
|
9285
9715
|
id,
|
|
9286
|
-
type: "
|
|
9716
|
+
type: "storage-file",
|
|
9287
9717
|
attributes: { new_metadata: newMetadata }
|
|
9288
9718
|
}
|
|
9289
9719
|
}
|
|
@@ -9763,6 +10193,132 @@ function createVoiceNamespace(rb) {
|
|
|
9763
10193
|
options
|
|
9764
10194
|
);
|
|
9765
10195
|
}
|
|
10196
|
+
},
|
|
10197
|
+
/**
|
|
10198
|
+
* Transcription job management — admin view.
|
|
10199
|
+
*
|
|
10200
|
+
* Transcription jobs enable chunked, progressive transcription of long
|
|
10201
|
+
* audio recordings. Each job tracks uploaded chunks, assembly status,
|
|
10202
|
+
* and the final assembled transcript.
|
|
10203
|
+
*/
|
|
10204
|
+
transcriptionJobs: {
|
|
10205
|
+
/**
|
|
10206
|
+
* List transcription jobs across all workspaces.
|
|
10207
|
+
*
|
|
10208
|
+
* @param options - Optional pagination and request options.
|
|
10209
|
+
* @returns Array of TranscriptionJob objects.
|
|
10210
|
+
*
|
|
10211
|
+
* @example
|
|
10212
|
+
* ```typescript
|
|
10213
|
+
* const jobs = await admin.voice.transcriptionJobs.list();
|
|
10214
|
+
* ```
|
|
10215
|
+
*/
|
|
10216
|
+
list: async (options) => {
|
|
10217
|
+
return rb.execute(
|
|
10218
|
+
getAdminVoiceTranscriptionJobs,
|
|
10219
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
10220
|
+
options
|
|
10221
|
+
);
|
|
10222
|
+
},
|
|
10223
|
+
/**
|
|
10224
|
+
* Retrieve a single transcription job by ID.
|
|
10225
|
+
*
|
|
10226
|
+
* @param id - The UUID of the transcription job.
|
|
10227
|
+
* @param options - Optional request options.
|
|
10228
|
+
* @returns The TranscriptionJob.
|
|
10229
|
+
*
|
|
10230
|
+
* @example
|
|
10231
|
+
* ```typescript
|
|
10232
|
+
* const job = await admin.voice.transcriptionJobs.get('job-uuid');
|
|
10233
|
+
* ```
|
|
10234
|
+
*/
|
|
10235
|
+
get: async (id, options) => {
|
|
10236
|
+
return rb.execute(
|
|
10237
|
+
getAdminVoiceTranscriptionJobsById,
|
|
10238
|
+
{ path: { id } },
|
|
10239
|
+
options
|
|
10240
|
+
);
|
|
10241
|
+
},
|
|
10242
|
+
/**
|
|
10243
|
+
* List transcription jobs owned by the current actor.
|
|
10244
|
+
*
|
|
10245
|
+
* @param options - Optional pagination and request options.
|
|
10246
|
+
* @returns Array of TranscriptionJob objects.
|
|
10247
|
+
*
|
|
10248
|
+
* @example
|
|
10249
|
+
* ```typescript
|
|
10250
|
+
* const myJobs = await admin.voice.transcriptionJobs.listMine();
|
|
10251
|
+
* ```
|
|
10252
|
+
*/
|
|
10253
|
+
listMine: async (options) => {
|
|
10254
|
+
return rb.execute(
|
|
10255
|
+
getAdminVoiceTranscriptionJobsMine,
|
|
10256
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
10257
|
+
options
|
|
10258
|
+
);
|
|
10259
|
+
},
|
|
10260
|
+
/**
|
|
10261
|
+
* List transcription jobs in a specific workspace.
|
|
10262
|
+
*
|
|
10263
|
+
* @param workspaceId - The UUID of the workspace.
|
|
10264
|
+
* @param options - Optional pagination and request options.
|
|
10265
|
+
* @returns Array of TranscriptionJob objects in the workspace.
|
|
10266
|
+
*
|
|
10267
|
+
* @example
|
|
10268
|
+
* ```typescript
|
|
10269
|
+
* const jobs = await admin.voice.transcriptionJobs.listByWorkspace('ws-uuid');
|
|
10270
|
+
* ```
|
|
10271
|
+
*/
|
|
10272
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
10273
|
+
return rb.execute(
|
|
10274
|
+
getAdminVoiceTranscriptionJobsWorkspaceByWorkspaceId,
|
|
10275
|
+
{
|
|
10276
|
+
path: { workspace_id: workspaceId },
|
|
10277
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
10278
|
+
},
|
|
10279
|
+
options
|
|
10280
|
+
);
|
|
10281
|
+
},
|
|
10282
|
+
/**
|
|
10283
|
+
* Create a new transcription job.
|
|
10284
|
+
*
|
|
10285
|
+
* @param data - Job creation attributes (language, model_size, etc.).
|
|
10286
|
+
* @param options - Optional request options.
|
|
10287
|
+
* @returns The created TranscriptionJob.
|
|
10288
|
+
*
|
|
10289
|
+
* @example
|
|
10290
|
+
* ```typescript
|
|
10291
|
+
* const job = await admin.voice.transcriptionJobs.create({
|
|
10292
|
+
* language: "en",
|
|
10293
|
+
* model_size: "large-v3",
|
|
10294
|
+
* });
|
|
10295
|
+
* ```
|
|
10296
|
+
*/
|
|
10297
|
+
create: async (data, options) => {
|
|
10298
|
+
return rb.execute(
|
|
10299
|
+
postAdminVoiceTranscriptionJobs,
|
|
10300
|
+
{ body: { data: { type: "transcription-job", attributes: data } } },
|
|
10301
|
+
options
|
|
10302
|
+
);
|
|
10303
|
+
},
|
|
10304
|
+
/**
|
|
10305
|
+
* Delete a transcription job by ID.
|
|
10306
|
+
*
|
|
10307
|
+
* @param id - The UUID of the transcription job to delete.
|
|
10308
|
+
* @param options - Optional request options.
|
|
10309
|
+
*
|
|
10310
|
+
* @example
|
|
10311
|
+
* ```typescript
|
|
10312
|
+
* await admin.voice.transcriptionJobs.destroy('job-uuid');
|
|
10313
|
+
* ```
|
|
10314
|
+
*/
|
|
10315
|
+
destroy: async (id, options) => {
|
|
10316
|
+
return rb.execute(
|
|
10317
|
+
deleteAdminVoiceTranscriptionJobsById,
|
|
10318
|
+
{ path: { id } },
|
|
10319
|
+
options
|
|
10320
|
+
);
|
|
10321
|
+
}
|
|
9766
10322
|
}
|
|
9767
10323
|
};
|
|
9768
10324
|
}
|
|
@@ -9964,7 +10520,7 @@ function createWebhooksNamespace(rb) {
|
|
|
9964
10520
|
{
|
|
9965
10521
|
body: {
|
|
9966
10522
|
data: {
|
|
9967
|
-
type: "
|
|
10523
|
+
type: "webhook-config",
|
|
9968
10524
|
attributes: {
|
|
9969
10525
|
name,
|
|
9970
10526
|
url,
|
|
@@ -10009,7 +10565,7 @@ function createWebhooksNamespace(rb) {
|
|
|
10009
10565
|
patchAdminWebhookConfigsById,
|
|
10010
10566
|
{
|
|
10011
10567
|
path: { id },
|
|
10012
|
-
body: { data: { id, type: "
|
|
10568
|
+
body: { data: { id, type: "webhook-config", attributes } }
|
|
10013
10569
|
},
|
|
10014
10570
|
options
|
|
10015
10571
|
);
|
|
@@ -10137,88 +10693,953 @@ function createWebhooksNamespace(rb) {
|
|
|
10137
10693
|
}
|
|
10138
10694
|
},
|
|
10139
10695
|
/**
|
|
10140
|
-
* Lists all available webhook event types supported by the platform.
|
|
10141
|
-
*
|
|
10142
|
-
* Returns the complete event catalog. Use this to discover which event
|
|
10143
|
-
* types exist, understand their payload shape, and validate the `events`
|
|
10144
|
-
* array when registering or updating webhook configs.
|
|
10145
|
-
*
|
|
10146
|
-
* @param options - Optional request options.
|
|
10147
|
-
* @returns A promise that resolves to an array of event type descriptors,
|
|
10148
|
-
* each with `type`, `description`, and `data_object`.
|
|
10696
|
+
* Lists all available webhook event types supported by the platform.
|
|
10697
|
+
*
|
|
10698
|
+
* Returns the complete event catalog. Use this to discover which event
|
|
10699
|
+
* types exist, understand their payload shape, and validate the `events`
|
|
10700
|
+
* array when registering or updating webhook configs.
|
|
10701
|
+
*
|
|
10702
|
+
* @param options - Optional request options.
|
|
10703
|
+
* @returns A promise that resolves to an array of event type descriptors,
|
|
10704
|
+
* each with `type`, `description`, and `data_object`.
|
|
10705
|
+
*
|
|
10706
|
+
* @example
|
|
10707
|
+
* const admin = new GptAdmin({ apiKey: 'sk_srv_...' });
|
|
10708
|
+
* const types = await admin.webhooks.listEventTypes();
|
|
10709
|
+
* console.log(types.map(t => t.type));
|
|
10710
|
+
*/
|
|
10711
|
+
listEventTypes: async (options) => {
|
|
10712
|
+
return rb.rawGet("/webhook-event-types", options);
|
|
10713
|
+
},
|
|
10714
|
+
deliveries: {
|
|
10715
|
+
/**
|
|
10716
|
+
* Lists all webhook delivery records across all configurations.
|
|
10717
|
+
*
|
|
10718
|
+
* Each delivery record tracks the attempt count, status, payload, and
|
|
10719
|
+
* response for a single event dispatch.
|
|
10720
|
+
*
|
|
10721
|
+
* @param options - Optional request options.
|
|
10722
|
+
* @returns Array of WebhookDelivery objects.
|
|
10723
|
+
*/
|
|
10724
|
+
list: async (options) => {
|
|
10725
|
+
return rb.execute(
|
|
10726
|
+
getAdminWebhookDeliveries,
|
|
10727
|
+
{},
|
|
10728
|
+
options
|
|
10729
|
+
);
|
|
10730
|
+
},
|
|
10731
|
+
/**
|
|
10732
|
+
* Fetches a single delivery record by ID.
|
|
10733
|
+
*
|
|
10734
|
+
* @param id - WebhookDelivery ID.
|
|
10735
|
+
* @param options - Optional request options.
|
|
10736
|
+
* @returns The WebhookDelivery.
|
|
10737
|
+
*/
|
|
10738
|
+
get: async (id, options) => {
|
|
10739
|
+
return rb.execute(
|
|
10740
|
+
getAdminWebhookDeliveriesById,
|
|
10741
|
+
{ path: { id } },
|
|
10742
|
+
options
|
|
10743
|
+
);
|
|
10744
|
+
},
|
|
10745
|
+
/**
|
|
10746
|
+
* Re-enqueues a failed or pending delivery for immediate re-dispatch.
|
|
10747
|
+
*
|
|
10748
|
+
* Sets the delivery status to `retrying` and inserts a new WebhookSender
|
|
10749
|
+
* Oban job. Use this to recover from transient endpoint failures without
|
|
10750
|
+
* waiting for the automatic retry schedule.
|
|
10751
|
+
*
|
|
10752
|
+
* @param id - WebhookDelivery ID.
|
|
10753
|
+
* @param options - Optional request options.
|
|
10754
|
+
* @returns Updated WebhookDelivery with status `retrying`.
|
|
10755
|
+
*/
|
|
10756
|
+
retry: async (id, options) => {
|
|
10757
|
+
return rb.execute(
|
|
10758
|
+
postAdminWebhookDeliveriesByIdRetry,
|
|
10759
|
+
{ path: { id }, body: {} },
|
|
10760
|
+
options
|
|
10761
|
+
);
|
|
10762
|
+
},
|
|
10763
|
+
/**
|
|
10764
|
+
* Sets multiple delivery records to `retrying` status in bulk.
|
|
10765
|
+
*
|
|
10766
|
+
* Authorization is actor-scoped — only deliveries the actor can update
|
|
10767
|
+
* are affected. Use this to recover from endpoint outages without
|
|
10768
|
+
* retrying each delivery individually.
|
|
10769
|
+
*
|
|
10770
|
+
* @param ids - Array of WebhookDelivery IDs to retry.
|
|
10771
|
+
* @param options - Optional request options.
|
|
10772
|
+
* @returns An object with `success: true` and the count of queued retries.
|
|
10773
|
+
*/
|
|
10774
|
+
bulkRetry: async (ids, options) => {
|
|
10775
|
+
return rb.execute(
|
|
10776
|
+
postAdminWebhookDeliveriesBulkRetry,
|
|
10777
|
+
{ body: { data: { ids } } },
|
|
10778
|
+
options
|
|
10779
|
+
);
|
|
10780
|
+
}
|
|
10781
|
+
}
|
|
10782
|
+
};
|
|
10783
|
+
}
|
|
10784
|
+
|
|
10785
|
+
// src/namespaces/campaigns.ts
|
|
10786
|
+
function createCampaignsNamespace(rb) {
|
|
10787
|
+
return {
|
|
10788
|
+
/**
|
|
10789
|
+
* Campaigns -- email campaign orchestration.
|
|
10790
|
+
*
|
|
10791
|
+
* A campaign represents a single bulk email send (or a scheduled future
|
|
10792
|
+
* send) targeting a list of recipients. Campaigns can be created from
|
|
10793
|
+
* templates, analysed with AI for performance insights, have their send
|
|
10794
|
+
* times AI-optimised, and spawn follow-up campaigns automatically.
|
|
10795
|
+
*/
|
|
10796
|
+
campaigns: {
|
|
10797
|
+
/**
|
|
10798
|
+
* Fetch a single campaign by its unique ID.
|
|
10799
|
+
*
|
|
10800
|
+
* @param id - The unique identifier of the campaign to retrieve.
|
|
10801
|
+
* @param options - Optional request-level overrides.
|
|
10802
|
+
* @returns A promise that resolves to the matching {@link Campaign}.
|
|
10803
|
+
*/
|
|
10804
|
+
get: async (id, options) => {
|
|
10805
|
+
return rb.execute(
|
|
10806
|
+
getAdminEmailMarketingCampaignsById,
|
|
10807
|
+
{ path: { id } },
|
|
10808
|
+
options
|
|
10809
|
+
);
|
|
10810
|
+
},
|
|
10811
|
+
/**
|
|
10812
|
+
* List campaigns for a workspace with optional pagination.
|
|
10813
|
+
*
|
|
10814
|
+
* @param workspaceId - The ID of the workspace whose campaigns to list.
|
|
10815
|
+
* @param options - Optional pagination controls and request-level overrides.
|
|
10816
|
+
* @returns A promise that resolves to an array of {@link Campaign} records.
|
|
10817
|
+
*/
|
|
10818
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
10819
|
+
return rb.execute(
|
|
10820
|
+
getAdminEmailMarketingCampaignsWorkspaceByWorkspaceId,
|
|
10821
|
+
{
|
|
10822
|
+
path: { workspace_id: workspaceId },
|
|
10823
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
10824
|
+
},
|
|
10825
|
+
options
|
|
10826
|
+
);
|
|
10827
|
+
},
|
|
10828
|
+
/**
|
|
10829
|
+
* Create a new email campaign.
|
|
10830
|
+
*
|
|
10831
|
+
* @param attributes - Campaign attributes including `workspace_id`, `name`, and `template_id`.
|
|
10832
|
+
* @param options - Optional request-level overrides.
|
|
10833
|
+
* @returns A promise that resolves to the newly created {@link Campaign}.
|
|
10834
|
+
*/
|
|
10835
|
+
create: async (attributes, options) => {
|
|
10836
|
+
return rb.execute(
|
|
10837
|
+
postAdminEmailMarketingCampaigns,
|
|
10838
|
+
{ body: { data: { type: "campaign", attributes } } },
|
|
10839
|
+
options
|
|
10840
|
+
);
|
|
10841
|
+
},
|
|
10842
|
+
/**
|
|
10843
|
+
* Update an existing campaign's attributes (PATCH semantics).
|
|
10844
|
+
*
|
|
10845
|
+
* @param id - The unique identifier of the campaign to update.
|
|
10846
|
+
* @param attributes - Key/value map of attributes to change.
|
|
10847
|
+
* @param options - Optional request-level overrides.
|
|
10848
|
+
* @returns A promise that resolves to the updated {@link Campaign}.
|
|
10849
|
+
*/
|
|
10850
|
+
update: async (id, attributes, options) => {
|
|
10851
|
+
return rb.execute(
|
|
10852
|
+
patchAdminEmailMarketingCampaignsById,
|
|
10853
|
+
{
|
|
10854
|
+
path: { id },
|
|
10855
|
+
body: {
|
|
10856
|
+
data: { id, type: "campaign", attributes }
|
|
10857
|
+
}
|
|
10858
|
+
},
|
|
10859
|
+
options
|
|
10860
|
+
);
|
|
10861
|
+
},
|
|
10862
|
+
/**
|
|
10863
|
+
* Trigger immediate delivery of a campaign to all recipients.
|
|
10864
|
+
*
|
|
10865
|
+
* @param id - The unique identifier of the campaign to send.
|
|
10866
|
+
* @param options - Optional request-level overrides.
|
|
10867
|
+
* @returns A promise that resolves to the updated {@link Campaign}.
|
|
10868
|
+
*/
|
|
10869
|
+
send: async (id, options) => {
|
|
10870
|
+
return rb.execute(
|
|
10871
|
+
postAdminEmailMarketingCampaignsByIdSend,
|
|
10872
|
+
{ path: { id }, body: {} },
|
|
10873
|
+
options
|
|
10874
|
+
);
|
|
10875
|
+
},
|
|
10876
|
+
/**
|
|
10877
|
+
* Request an AI-powered performance analysis of a sent campaign.
|
|
10878
|
+
*
|
|
10879
|
+
* @param id - The unique identifier of the campaign to analyse.
|
|
10880
|
+
* @param options - Optional request-level overrides.
|
|
10881
|
+
* @returns A promise that resolves to the AI-generated analysis report payload.
|
|
10882
|
+
*/
|
|
10883
|
+
analyze: async (id, options) => {
|
|
10884
|
+
return rb.execute(
|
|
10885
|
+
postAdminEmailMarketingCampaignsByIdAnalyze,
|
|
10886
|
+
{ path: { id }, body: {} },
|
|
10887
|
+
options
|
|
10888
|
+
);
|
|
10889
|
+
},
|
|
10890
|
+
/**
|
|
10891
|
+
* Use AI to determine the optimal send time for a campaign.
|
|
10892
|
+
*
|
|
10893
|
+
* @param id - The unique identifier of the campaign to optimise.
|
|
10894
|
+
* @param options - Optional request-level overrides.
|
|
10895
|
+
* @returns A promise that resolves to the optimisation result payload.
|
|
10896
|
+
*/
|
|
10897
|
+
optimizeSendTimes: async (id, options) => {
|
|
10898
|
+
return rb.execute(
|
|
10899
|
+
postAdminEmailMarketingCampaignsByIdOptimizeSendTimes,
|
|
10900
|
+
{ path: { id }, body: {} },
|
|
10901
|
+
options
|
|
10902
|
+
);
|
|
10903
|
+
},
|
|
10904
|
+
/**
|
|
10905
|
+
* Create a follow-up campaign targeted at non-engaged recipients.
|
|
10906
|
+
*
|
|
10907
|
+
* @param id - The ID of the original campaign to follow up on.
|
|
10908
|
+
* @param attributes - Additional attributes for the follow-up campaign.
|
|
10909
|
+
* @param options - Optional request-level overrides.
|
|
10910
|
+
* @returns A promise that resolves to the newly created follow-up {@link Campaign}.
|
|
10911
|
+
*/
|
|
10912
|
+
createFollowup: async (id, attributes, options) => {
|
|
10913
|
+
return rb.execute(
|
|
10914
|
+
postAdminEmailMarketingCampaignsByIdCreateFollowup,
|
|
10915
|
+
{
|
|
10916
|
+
path: { id },
|
|
10917
|
+
body: { data: { type: "campaign", ...attributes } }
|
|
10918
|
+
},
|
|
10919
|
+
options
|
|
10920
|
+
);
|
|
10921
|
+
},
|
|
10922
|
+
/**
|
|
10923
|
+
* Import recipients from a CSV file stored in platform storage.
|
|
10924
|
+
*
|
|
10925
|
+
* @param id - The campaign ID to import recipients into.
|
|
10926
|
+
* @param attributes - Import configuration including `csv_storage_key` and `workspace_id`.
|
|
10927
|
+
* @param options - Optional request-level overrides.
|
|
10928
|
+
* @returns A promise resolving to the import job details.
|
|
10929
|
+
*/
|
|
10930
|
+
importRecipients: async (id, attributes, options) => {
|
|
10931
|
+
return rb.execute(
|
|
10932
|
+
postAdminEmailMarketingCampaignsByIdImportRecipients,
|
|
10933
|
+
{ path: { id }, body: { data: { type: "campaign", attributes } } },
|
|
10934
|
+
options
|
|
10935
|
+
);
|
|
10936
|
+
},
|
|
10937
|
+
/**
|
|
10938
|
+
* Trigger AI-powered email generation for all campaign recipients.
|
|
10939
|
+
*
|
|
10940
|
+
* @param id - The campaign ID to generate emails for.
|
|
10941
|
+
* @param workspaceId - The workspace ID.
|
|
10942
|
+
* @param options - Optional request-level overrides.
|
|
10943
|
+
* @returns A promise resolving to the generation job details.
|
|
10944
|
+
*/
|
|
10945
|
+
generateEmails: async (id, workspaceId, options) => {
|
|
10946
|
+
return rb.execute(
|
|
10947
|
+
postAdminEmailMarketingCampaignsByIdGenerateEmails,
|
|
10948
|
+
{
|
|
10949
|
+
path: { id },
|
|
10950
|
+
body: {
|
|
10951
|
+
data: {
|
|
10952
|
+
type: "campaign",
|
|
10953
|
+
attributes: { workspace_id: workspaceId }
|
|
10954
|
+
}
|
|
10955
|
+
}
|
|
10956
|
+
},
|
|
10957
|
+
options
|
|
10958
|
+
);
|
|
10959
|
+
},
|
|
10960
|
+
/**
|
|
10961
|
+
* Generate A/B test subject line variants using AI.
|
|
10962
|
+
*
|
|
10963
|
+
* @param id - The campaign ID to optimize subjects for.
|
|
10964
|
+
* @param attributes - Subject optimization parameters.
|
|
10965
|
+
* @param options - Optional request-level overrides.
|
|
10966
|
+
* @returns A promise resolving to the optimization result with variant suggestions.
|
|
10967
|
+
*/
|
|
10968
|
+
optimizeSubjects: async (id, attributes, options) => {
|
|
10969
|
+
return rb.execute(
|
|
10970
|
+
postAdminEmailMarketingCampaignsByIdOptimizeSubjects,
|
|
10971
|
+
{
|
|
10972
|
+
path: { id },
|
|
10973
|
+
body: {
|
|
10974
|
+
data: { type: "campaign", attributes }
|
|
10975
|
+
}
|
|
10976
|
+
},
|
|
10977
|
+
options
|
|
10978
|
+
);
|
|
10979
|
+
},
|
|
10980
|
+
/**
|
|
10981
|
+
* Export campaign data (recipients, results, or analytics) as CSV.
|
|
10982
|
+
*
|
|
10983
|
+
* @param id - The campaign ID to export.
|
|
10984
|
+
* @param attributes - Export configuration including `workspace_id`.
|
|
10985
|
+
* @param options - Optional request-level overrides.
|
|
10986
|
+
* @returns A promise resolving to the export job details.
|
|
10987
|
+
*/
|
|
10988
|
+
export: async (id, attributes, options) => {
|
|
10989
|
+
return rb.execute(
|
|
10990
|
+
postAdminEmailMarketingCampaignsByIdExport,
|
|
10991
|
+
{
|
|
10992
|
+
path: { id },
|
|
10993
|
+
body: {
|
|
10994
|
+
data: { type: "campaign", attributes }
|
|
10995
|
+
}
|
|
10996
|
+
},
|
|
10997
|
+
options
|
|
10998
|
+
);
|
|
10999
|
+
},
|
|
11000
|
+
/**
|
|
11001
|
+
* Permanently delete a campaign.
|
|
11002
|
+
*
|
|
11003
|
+
* @param id - The unique identifier of the campaign to delete.
|
|
11004
|
+
* @param options - Optional request-level overrides.
|
|
11005
|
+
* @returns A promise that resolves to `true` on successful deletion.
|
|
11006
|
+
*/
|
|
11007
|
+
delete: async (id, options) => {
|
|
11008
|
+
return rb.executeDelete(
|
|
11009
|
+
deleteAdminEmailMarketingCampaignsById,
|
|
11010
|
+
{ path: { id } },
|
|
11011
|
+
options
|
|
11012
|
+
);
|
|
11013
|
+
}
|
|
11014
|
+
},
|
|
11015
|
+
/**
|
|
11016
|
+
* Templates -- reusable MJML-based email layout templates with versioning.
|
|
11017
|
+
*
|
|
11018
|
+
* Templates define the HTML and/or plain-text structure of an email.
|
|
11019
|
+
* They support live MJML compilation, publish/unpublish lifecycle,
|
|
11020
|
+
* archive/restore, rollback, and immutable version snapshots.
|
|
11021
|
+
*/
|
|
11022
|
+
templates: {
|
|
11023
|
+
/**
|
|
11024
|
+
* Fetch a single template by its unique ID.
|
|
11025
|
+
*
|
|
11026
|
+
* @param id - The unique identifier of the template to retrieve.
|
|
11027
|
+
* @param options - Optional request-level overrides.
|
|
11028
|
+
* @returns A promise that resolves to the matching {@link EmailMarketingTemplate}.
|
|
11029
|
+
*/
|
|
11030
|
+
get: async (id, options) => {
|
|
11031
|
+
return rb.execute(
|
|
11032
|
+
getAdminEmailMarketingTemplatesById,
|
|
11033
|
+
{ path: { id } },
|
|
11034
|
+
options
|
|
11035
|
+
);
|
|
11036
|
+
},
|
|
11037
|
+
/**
|
|
11038
|
+
* List all email templates for a workspace with optional pagination.
|
|
11039
|
+
*
|
|
11040
|
+
* @param workspaceId - The ID of the workspace whose templates to list.
|
|
11041
|
+
* @param options - Optional pagination controls and request-level overrides.
|
|
11042
|
+
* @returns A promise that resolves to an array of {@link EmailMarketingTemplate} records.
|
|
11043
|
+
*/
|
|
11044
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
11045
|
+
return rb.execute(
|
|
11046
|
+
getAdminEmailMarketingTemplatesWorkspaceByWorkspaceId,
|
|
11047
|
+
{
|
|
11048
|
+
path: { workspace_id: workspaceId },
|
|
11049
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
11050
|
+
},
|
|
11051
|
+
options
|
|
11052
|
+
);
|
|
11053
|
+
},
|
|
11054
|
+
/**
|
|
11055
|
+
* Create a new email template.
|
|
11056
|
+
*
|
|
11057
|
+
* @param attributes - Template attributes including `name`.
|
|
11058
|
+
* @param options - Optional request-level overrides.
|
|
11059
|
+
* @returns A promise that resolves to the newly created {@link EmailMarketingTemplate}.
|
|
11060
|
+
*/
|
|
11061
|
+
create: async (attributes, options) => {
|
|
11062
|
+
return rb.execute(
|
|
11063
|
+
postAdminEmailMarketingTemplates,
|
|
11064
|
+
{ body: { data: { type: "email-marketing-template", attributes } } },
|
|
11065
|
+
options
|
|
11066
|
+
);
|
|
11067
|
+
},
|
|
11068
|
+
/**
|
|
11069
|
+
* Update an existing template's attributes (PATCH semantics).
|
|
11070
|
+
*
|
|
11071
|
+
* @param id - The unique identifier of the template to update.
|
|
11072
|
+
* @param attributes - Key/value map of attributes to change.
|
|
11073
|
+
* @param options - Optional request-level overrides.
|
|
11074
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingTemplate}.
|
|
11075
|
+
*/
|
|
11076
|
+
update: async (id, attributes, options) => {
|
|
11077
|
+
return rb.execute(
|
|
11078
|
+
patchAdminEmailMarketingTemplatesById,
|
|
11079
|
+
{
|
|
11080
|
+
path: { id },
|
|
11081
|
+
body: {
|
|
11082
|
+
data: { id, type: "email-marketing-template", attributes }
|
|
11083
|
+
}
|
|
11084
|
+
},
|
|
11085
|
+
options
|
|
11086
|
+
);
|
|
11087
|
+
},
|
|
11088
|
+
/**
|
|
11089
|
+
* Permanently delete a template.
|
|
11090
|
+
*
|
|
11091
|
+
* @param id - The unique identifier of the template to delete.
|
|
11092
|
+
* @param options - Optional request-level overrides.
|
|
11093
|
+
* @returns A promise that resolves to `true` on successful deletion.
|
|
11094
|
+
*/
|
|
11095
|
+
delete: async (id, options) => {
|
|
11096
|
+
return rb.executeDelete(
|
|
11097
|
+
deleteAdminEmailMarketingTemplatesById,
|
|
11098
|
+
{ path: { id } },
|
|
11099
|
+
options
|
|
11100
|
+
);
|
|
11101
|
+
},
|
|
11102
|
+
/**
|
|
11103
|
+
* Publish a template, creating an immutable version snapshot.
|
|
11104
|
+
*
|
|
11105
|
+
* @param id - The unique identifier of the template to publish.
|
|
11106
|
+
* @param options - Optional request-level overrides.
|
|
11107
|
+
* @returns A promise that resolves to the published {@link EmailMarketingTemplate}.
|
|
11108
|
+
*/
|
|
11109
|
+
publish: async (id, options) => {
|
|
11110
|
+
return rb.execute(
|
|
11111
|
+
patchAdminEmailMarketingTemplatesByIdPublish,
|
|
11112
|
+
{ path: { id }, body: {} },
|
|
11113
|
+
options
|
|
11114
|
+
);
|
|
11115
|
+
},
|
|
11116
|
+
/**
|
|
11117
|
+
* Unpublish a template, reverting it to draft state.
|
|
11118
|
+
*
|
|
11119
|
+
* @param id - The unique identifier of the template to unpublish.
|
|
11120
|
+
* @param options - Optional request-level overrides.
|
|
11121
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingTemplate}.
|
|
11122
|
+
*/
|
|
11123
|
+
unpublish: async (id, options) => {
|
|
11124
|
+
return rb.execute(
|
|
11125
|
+
patchAdminEmailMarketingTemplatesByIdUnpublish,
|
|
11126
|
+
{ path: { id }, body: {} },
|
|
11127
|
+
options
|
|
11128
|
+
);
|
|
11129
|
+
},
|
|
11130
|
+
/**
|
|
11131
|
+
* Archive a template, removing it from active listings.
|
|
11132
|
+
*
|
|
11133
|
+
* @param id - The unique identifier of the template to archive.
|
|
11134
|
+
* @param options - Optional request-level overrides.
|
|
11135
|
+
* @returns A promise that resolves to the archived {@link EmailMarketingTemplate}.
|
|
11136
|
+
*/
|
|
11137
|
+
archive: async (id, options) => {
|
|
11138
|
+
return rb.execute(
|
|
11139
|
+
patchAdminEmailMarketingTemplatesByIdArchive,
|
|
11140
|
+
{ path: { id }, body: {} },
|
|
11141
|
+
options
|
|
11142
|
+
);
|
|
11143
|
+
},
|
|
11144
|
+
/**
|
|
11145
|
+
* Restore an archived template back to active state.
|
|
11146
|
+
*
|
|
11147
|
+
* @param id - The unique identifier of the template to restore.
|
|
11148
|
+
* @param options - Optional request-level overrides.
|
|
11149
|
+
* @returns A promise that resolves to the restored {@link EmailMarketingTemplate}.
|
|
11150
|
+
*/
|
|
11151
|
+
restore: async (id, options) => {
|
|
11152
|
+
return rb.execute(
|
|
11153
|
+
patchAdminEmailMarketingTemplatesByIdRestore,
|
|
11154
|
+
{ path: { id }, body: {} },
|
|
11155
|
+
options
|
|
11156
|
+
);
|
|
11157
|
+
},
|
|
11158
|
+
/**
|
|
11159
|
+
* Roll back a template's MJML source to a previous version.
|
|
11160
|
+
*
|
|
11161
|
+
* Does NOT auto-publish. Call `publish` after reviewing the restored content.
|
|
11162
|
+
*
|
|
11163
|
+
* @param id - The unique identifier of the template to roll back.
|
|
11164
|
+
* @param versionNumber - The version number to restore from.
|
|
11165
|
+
* @param options - Optional request-level overrides.
|
|
11166
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingTemplate}.
|
|
11167
|
+
*/
|
|
11168
|
+
rollback: async (id, versionNumber, options) => {
|
|
11169
|
+
return rb.execute(
|
|
11170
|
+
patchAdminEmailMarketingTemplatesByIdRollback,
|
|
11171
|
+
{
|
|
11172
|
+
path: { id },
|
|
11173
|
+
body: {
|
|
11174
|
+
data: {
|
|
11175
|
+
id,
|
|
11176
|
+
type: "email-marketing-template",
|
|
11177
|
+
attributes: { version_number: versionNumber }
|
|
11178
|
+
}
|
|
11179
|
+
}
|
|
11180
|
+
},
|
|
11181
|
+
options
|
|
11182
|
+
);
|
|
11183
|
+
},
|
|
11184
|
+
/**
|
|
11185
|
+
* Render a saved template with variable overrides for preview.
|
|
11186
|
+
*
|
|
11187
|
+
* @param id - The unique identifier of the template to preview.
|
|
11188
|
+
* @param variables - Key/value map of variable substitutions.
|
|
11189
|
+
* @param options - Optional request-level overrides.
|
|
11190
|
+
* @returns A promise that resolves to the preview result.
|
|
11191
|
+
*/
|
|
11192
|
+
preview: async (id, variables, options) => {
|
|
11193
|
+
return rb.execute(
|
|
11194
|
+
patchAdminEmailMarketingTemplatesByIdPreview,
|
|
11195
|
+
{
|
|
11196
|
+
path: { id },
|
|
11197
|
+
body: {
|
|
11198
|
+
data: {
|
|
11199
|
+
id,
|
|
11200
|
+
type: "email-marketing-template",
|
|
11201
|
+
attributes: { variables }
|
|
11202
|
+
}
|
|
11203
|
+
}
|
|
11204
|
+
},
|
|
11205
|
+
options
|
|
11206
|
+
);
|
|
11207
|
+
},
|
|
11208
|
+
/**
|
|
11209
|
+
* Stateless MJML compilation. Does not save. Use for live preview in builder UI.
|
|
11210
|
+
*
|
|
11211
|
+
* @param mjml - Raw MJML source string to compile.
|
|
11212
|
+
* @param options - Optional request-level overrides.
|
|
11213
|
+
* @returns A promise resolving to the compilation result including HTML, variables, and errors.
|
|
11214
|
+
*/
|
|
11215
|
+
compile: async (mjml, options) => {
|
|
11216
|
+
return rb.execute(
|
|
11217
|
+
postAdminEmailMarketingTemplatesCompile,
|
|
11218
|
+
{
|
|
11219
|
+
body: {
|
|
11220
|
+
data: {
|
|
11221
|
+
type: "campaign-template",
|
|
11222
|
+
body_mjml: mjml
|
|
11223
|
+
}
|
|
11224
|
+
}
|
|
11225
|
+
},
|
|
11226
|
+
options
|
|
11227
|
+
);
|
|
11228
|
+
},
|
|
11229
|
+
/**
|
|
11230
|
+
* List all version snapshots for a template, ordered by version_number descending.
|
|
11231
|
+
*
|
|
11232
|
+
* @param templateId - The ID of the template whose versions to list.
|
|
11233
|
+
* @param options - Optional request-level overrides.
|
|
11234
|
+
* @returns A promise resolving to an array of {@link EmailTemplateVersion} records.
|
|
11235
|
+
*/
|
|
11236
|
+
versions: async (templateId, options) => {
|
|
11237
|
+
return rb.execute(
|
|
11238
|
+
getAdminEmailTemplateVersionsTemplateByTemplateId,
|
|
11239
|
+
{ path: { template_id: templateId } },
|
|
11240
|
+
options
|
|
11241
|
+
);
|
|
11242
|
+
},
|
|
11243
|
+
/**
|
|
11244
|
+
* Fetch a specific template version by template ID and version number.
|
|
11245
|
+
*
|
|
11246
|
+
* @param templateId - The ID of the template.
|
|
11247
|
+
* @param versionNumber - The version number to fetch.
|
|
11248
|
+
* @param options - Optional request-level overrides.
|
|
11249
|
+
* @returns A promise resolving to the full {@link EmailTemplateVersion}.
|
|
11250
|
+
*/
|
|
11251
|
+
getVersion: async (templateId, versionNumber, options) => {
|
|
11252
|
+
return rb.execute(
|
|
11253
|
+
getAdminEmailTemplateVersionsByTemplateIdVersionsByVersionNumber,
|
|
11254
|
+
{
|
|
11255
|
+
path: {
|
|
11256
|
+
template_id: templateId,
|
|
11257
|
+
version_number: versionNumber
|
|
11258
|
+
}
|
|
11259
|
+
},
|
|
11260
|
+
options
|
|
11261
|
+
);
|
|
11262
|
+
}
|
|
11263
|
+
},
|
|
11264
|
+
/**
|
|
11265
|
+
* Generated Emails -- AI-personalised email drafts awaiting human review.
|
|
11266
|
+
*
|
|
11267
|
+
* When a campaign uses AI personalisation, the platform generates an
|
|
11268
|
+
* individual email draft for each recipient. These drafts sit in a review
|
|
11269
|
+
* queue until a human approves or rejects them.
|
|
11270
|
+
*/
|
|
11271
|
+
generatedEmails: {
|
|
11272
|
+
/**
|
|
11273
|
+
* Fetch a single AI-generated email draft by its unique ID.
|
|
11274
|
+
*
|
|
11275
|
+
* @param id - The unique identifier of the generated email to retrieve.
|
|
11276
|
+
* @param options - Optional request-level overrides.
|
|
11277
|
+
* @returns A promise that resolves to the matching {@link EmailMarketingGeneratedEmail}.
|
|
11278
|
+
*/
|
|
11279
|
+
get: async (id, options) => {
|
|
11280
|
+
return rb.execute(
|
|
11281
|
+
getAdminEmailMarketingGeneratedEmailsById,
|
|
11282
|
+
{ path: { id } },
|
|
11283
|
+
options
|
|
11284
|
+
);
|
|
11285
|
+
},
|
|
11286
|
+
/**
|
|
11287
|
+
* Update an AI-generated email draft before approval.
|
|
11288
|
+
*
|
|
11289
|
+
* @param id - The unique identifier of the generated email to update.
|
|
11290
|
+
* @param attributes - Key/value map of attributes to change (e.g. `subject`, `body`).
|
|
11291
|
+
* @param options - Optional request-level overrides.
|
|
11292
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingGeneratedEmail}.
|
|
11293
|
+
*/
|
|
11294
|
+
update: async (id, attributes, options) => {
|
|
11295
|
+
return rb.execute(
|
|
11296
|
+
patchAdminEmailMarketingGeneratedEmailsById,
|
|
11297
|
+
{
|
|
11298
|
+
path: { id },
|
|
11299
|
+
body: {
|
|
11300
|
+
data: { id, type: "email-marketing-generated-email", attributes }
|
|
11301
|
+
}
|
|
11302
|
+
},
|
|
11303
|
+
options
|
|
11304
|
+
);
|
|
11305
|
+
},
|
|
11306
|
+
/**
|
|
11307
|
+
* Approve a generated email draft and move it to the sending queue.
|
|
11308
|
+
*
|
|
11309
|
+
* @param id - The unique identifier of the generated email to approve.
|
|
11310
|
+
* @param options - Optional request-level overrides.
|
|
11311
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingGeneratedEmail}.
|
|
11312
|
+
*/
|
|
11313
|
+
approve: async (id, options) => {
|
|
11314
|
+
return rb.execute(
|
|
11315
|
+
patchAdminEmailMarketingGeneratedEmailsByIdApprove,
|
|
11316
|
+
{ path: { id }, body: {} },
|
|
11317
|
+
options
|
|
11318
|
+
);
|
|
11319
|
+
},
|
|
11320
|
+
/**
|
|
11321
|
+
* Reject an AI-generated email draft. The email will not be sent.
|
|
11322
|
+
*
|
|
11323
|
+
* @param id - The unique identifier of the generated email to reject.
|
|
11324
|
+
* @param options - Optional request-level overrides.
|
|
11325
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingGeneratedEmail}.
|
|
11326
|
+
*/
|
|
11327
|
+
reject: async (id, options) => {
|
|
11328
|
+
return rb.execute(
|
|
11329
|
+
patchAdminEmailMarketingGeneratedEmailsByIdReject,
|
|
11330
|
+
{ path: { id }, body: {} },
|
|
11331
|
+
options
|
|
11332
|
+
);
|
|
11333
|
+
},
|
|
11334
|
+
/**
|
|
11335
|
+
* Schedule a generated email for delivery at a specific time.
|
|
11336
|
+
*
|
|
11337
|
+
* @param id - The unique identifier of the generated email to schedule.
|
|
11338
|
+
* @param options - Optional request-level overrides.
|
|
11339
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingGeneratedEmail}.
|
|
11340
|
+
*/
|
|
11341
|
+
schedule: async (id, options) => {
|
|
11342
|
+
return rb.execute(
|
|
11343
|
+
patchAdminEmailMarketingGeneratedEmailsByIdSchedule,
|
|
11344
|
+
{ path: { id }, body: {} },
|
|
11345
|
+
options
|
|
11346
|
+
);
|
|
11347
|
+
},
|
|
11348
|
+
/**
|
|
11349
|
+
* List all generated emails for a specific campaign.
|
|
11350
|
+
*
|
|
11351
|
+
* @param campaignId - The ID of the campaign whose generated emails to list.
|
|
11352
|
+
* @param options - Optional pagination controls and request-level overrides.
|
|
11353
|
+
* @returns A promise resolving to an array of {@link EmailMarketingGeneratedEmail}.
|
|
11354
|
+
*/
|
|
11355
|
+
listByCampaign: async (campaignId, options) => {
|
|
11356
|
+
return rb.execute(
|
|
11357
|
+
getAdminEmailMarketingGeneratedEmailsCampaignByCampaignId,
|
|
11358
|
+
{
|
|
11359
|
+
path: { campaign_id: campaignId },
|
|
11360
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
11361
|
+
},
|
|
11362
|
+
options
|
|
11363
|
+
);
|
|
11364
|
+
}
|
|
11365
|
+
},
|
|
11366
|
+
/**
|
|
11367
|
+
* Sequences -- multi-step drip campaign automation.
|
|
11368
|
+
*
|
|
11369
|
+
* A sequence is a timed series of emails automatically sent to enrolled
|
|
11370
|
+
* contacts over days or weeks. Each step in the sequence has a delay and
|
|
11371
|
+
* references a template or inline content.
|
|
11372
|
+
*/
|
|
11373
|
+
sequences: {
|
|
11374
|
+
/**
|
|
11375
|
+
* Fetch a single sequence by its unique ID.
|
|
11376
|
+
*
|
|
11377
|
+
* @param id - The unique identifier of the sequence to retrieve.
|
|
11378
|
+
* @param options - Optional request-level overrides.
|
|
11379
|
+
* @returns A promise that resolves to the matching {@link EmailMarketingSequence}.
|
|
11380
|
+
*/
|
|
11381
|
+
get: async (id, options) => {
|
|
11382
|
+
return rb.execute(
|
|
11383
|
+
getAdminCampaignsSequencesById,
|
|
11384
|
+
{ path: { id } },
|
|
11385
|
+
options
|
|
11386
|
+
);
|
|
11387
|
+
},
|
|
11388
|
+
/**
|
|
11389
|
+
* Create a new email sequence.
|
|
11390
|
+
*
|
|
11391
|
+
* @param attributes - Sequence attributes including `workspace_id` and `name`.
|
|
11392
|
+
* @param options - Optional request-level overrides.
|
|
11393
|
+
* @returns A promise that resolves to the newly created {@link EmailMarketingSequence}.
|
|
11394
|
+
*/
|
|
11395
|
+
create: async (attributes, options) => {
|
|
11396
|
+
return rb.execute(
|
|
11397
|
+
postAdminCampaignsSequences,
|
|
11398
|
+
{ body: { data: { type: "email-marketing-sequence", attributes } } },
|
|
11399
|
+
options
|
|
11400
|
+
);
|
|
11401
|
+
},
|
|
11402
|
+
/**
|
|
11403
|
+
* Update an existing sequence's attributes (PATCH semantics).
|
|
11404
|
+
*
|
|
11405
|
+
* @param id - The unique identifier of the sequence to update.
|
|
11406
|
+
* @param attributes - Key/value map of attributes to change.
|
|
11407
|
+
* @param options - Optional request-level overrides.
|
|
11408
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingSequence}.
|
|
11409
|
+
*/
|
|
11410
|
+
update: async (id, attributes, options) => {
|
|
11411
|
+
return rb.execute(
|
|
11412
|
+
patchAdminCampaignsSequencesById,
|
|
11413
|
+
{
|
|
11414
|
+
path: { id },
|
|
11415
|
+
body: {
|
|
11416
|
+
data: { id, type: "email-marketing-sequence", attributes }
|
|
11417
|
+
}
|
|
11418
|
+
},
|
|
11419
|
+
options
|
|
11420
|
+
);
|
|
11421
|
+
},
|
|
11422
|
+
/**
|
|
11423
|
+
* List all sequences for a workspace with optional pagination.
|
|
11424
|
+
*
|
|
11425
|
+
* @param workspaceId - The ID of the workspace whose sequences to list.
|
|
11426
|
+
* @param options - Optional pagination controls and request-level overrides.
|
|
11427
|
+
* @returns A promise that resolves to an array of {@link EmailMarketingSequence} records.
|
|
11428
|
+
*/
|
|
11429
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
11430
|
+
return rb.execute(
|
|
11431
|
+
getAdminCampaignsSequencesWorkspaceByWorkspaceId,
|
|
11432
|
+
{
|
|
11433
|
+
path: { workspace_id: workspaceId },
|
|
11434
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
11435
|
+
},
|
|
11436
|
+
options
|
|
11437
|
+
);
|
|
11438
|
+
},
|
|
11439
|
+
/**
|
|
11440
|
+
* Permanently delete a sequence.
|
|
11441
|
+
*
|
|
11442
|
+
* @param id - The unique identifier of the sequence to delete.
|
|
11443
|
+
* @param options - Optional request-level overrides.
|
|
11444
|
+
* @returns A promise that resolves to `true` on successful deletion.
|
|
11445
|
+
*/
|
|
11446
|
+
delete: async (id, options) => {
|
|
11447
|
+
return rb.executeDelete(
|
|
11448
|
+
deleteAdminCampaignsSequencesById,
|
|
11449
|
+
{ path: { id } },
|
|
11450
|
+
options
|
|
11451
|
+
);
|
|
11452
|
+
},
|
|
11453
|
+
/**
|
|
11454
|
+
* Activate a sequence to start delivering emails to enrolled contacts.
|
|
11455
|
+
*
|
|
11456
|
+
* @param id - The unique identifier of the sequence to activate.
|
|
11457
|
+
* @param options - Optional request-level overrides.
|
|
11458
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingSequence}.
|
|
11459
|
+
*/
|
|
11460
|
+
activate: async (id, options) => {
|
|
11461
|
+
return rb.execute(
|
|
11462
|
+
patchAdminCampaignsSequencesByIdActivate,
|
|
11463
|
+
{ path: { id }, body: {} },
|
|
11464
|
+
options
|
|
11465
|
+
);
|
|
11466
|
+
},
|
|
11467
|
+
/**
|
|
11468
|
+
* Pause a running sequence, suspending all pending deliveries.
|
|
11469
|
+
*
|
|
11470
|
+
* @param id - The unique identifier of the sequence to pause.
|
|
11471
|
+
* @param options - Optional request-level overrides.
|
|
11472
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingSequence}.
|
|
11473
|
+
*/
|
|
11474
|
+
pause: async (id, options) => {
|
|
11475
|
+
return rb.execute(
|
|
11476
|
+
patchAdminCampaignsSequencesByIdPause,
|
|
11477
|
+
{ path: { id }, body: {} },
|
|
11478
|
+
options
|
|
11479
|
+
);
|
|
11480
|
+
},
|
|
11481
|
+
/**
|
|
11482
|
+
* Mark a sequence as complete, finalizing all deliveries.
|
|
11483
|
+
*
|
|
11484
|
+
* @param id - The unique identifier of the sequence to complete.
|
|
11485
|
+
* @param options - Optional request-level overrides.
|
|
11486
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingSequence}.
|
|
11487
|
+
*/
|
|
11488
|
+
complete: async (id, options) => {
|
|
11489
|
+
return rb.execute(
|
|
11490
|
+
patchAdminCampaignsSequencesByIdComplete,
|
|
11491
|
+
{ path: { id }, body: {} },
|
|
11492
|
+
options
|
|
11493
|
+
);
|
|
11494
|
+
},
|
|
11495
|
+
/**
|
|
11496
|
+
* Resume a paused sequence from where it left off.
|
|
11497
|
+
*
|
|
11498
|
+
* @param id - The unique identifier of the sequence to resume.
|
|
11499
|
+
* @param options - Optional request-level overrides.
|
|
11500
|
+
* @returns A promise that resolves to the updated {@link EmailMarketingSequence}.
|
|
11501
|
+
*/
|
|
11502
|
+
resume: async (id, options) => {
|
|
11503
|
+
return rb.execute(
|
|
11504
|
+
patchAdminCampaignsSequencesByIdResume,
|
|
11505
|
+
{ path: { id }, body: {} },
|
|
11506
|
+
options
|
|
11507
|
+
);
|
|
11508
|
+
}
|
|
11509
|
+
},
|
|
11510
|
+
/**
|
|
11511
|
+
* Recipients -- campaign audience members.
|
|
11512
|
+
*
|
|
11513
|
+
* Each recipient represents one email address on a campaign's send list,
|
|
11514
|
+
* with optional merge fields for personalisation.
|
|
11515
|
+
*/
|
|
11516
|
+
recipients: {
|
|
11517
|
+
/**
|
|
11518
|
+
* Fetch a single recipient by its unique ID.
|
|
11519
|
+
*
|
|
11520
|
+
* @param id - The unique identifier of the recipient.
|
|
11521
|
+
* @param options - Optional request-level overrides.
|
|
11522
|
+
* @returns A promise resolving to the {@link EmailMarketingRecipient}.
|
|
11523
|
+
*/
|
|
11524
|
+
get: async (id, options) => {
|
|
11525
|
+
return rb.execute(
|
|
11526
|
+
getAdminCampaignsRecipientsById,
|
|
11527
|
+
{ path: { id } },
|
|
11528
|
+
options
|
|
11529
|
+
);
|
|
11530
|
+
},
|
|
11531
|
+
/**
|
|
11532
|
+
* List all recipients for a specific campaign.
|
|
11533
|
+
*
|
|
11534
|
+
* @param campaignId - The ID of the campaign whose recipients to list.
|
|
11535
|
+
* @param options - Optional pagination controls and request-level overrides.
|
|
11536
|
+
* @returns A promise resolving to an array of {@link EmailMarketingRecipient} records.
|
|
11537
|
+
*/
|
|
11538
|
+
listByCampaign: async (campaignId, options) => {
|
|
11539
|
+
return rb.execute(
|
|
11540
|
+
getAdminCampaignsRecipientsCampaignByCampaignId,
|
|
11541
|
+
{
|
|
11542
|
+
path: { campaign_id: campaignId },
|
|
11543
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
11544
|
+
},
|
|
11545
|
+
options
|
|
11546
|
+
);
|
|
11547
|
+
}
|
|
11548
|
+
},
|
|
11549
|
+
/**
|
|
11550
|
+
* Sequence Steps -- individual steps within a drip sequence.
|
|
10149
11551
|
*
|
|
10150
|
-
*
|
|
10151
|
-
*
|
|
10152
|
-
* const types = await admin.webhooks.listEventTypes();
|
|
10153
|
-
* console.log(types.map(t => t.type));
|
|
11552
|
+
* Each step defines a timed email delivery within a sequence, with a
|
|
11553
|
+
* delay offset and template or inline content.
|
|
10154
11554
|
*/
|
|
10155
|
-
|
|
10156
|
-
return rb.rawGet("/webhook-event-types", options);
|
|
10157
|
-
},
|
|
10158
|
-
deliveries: {
|
|
11555
|
+
sequenceSteps: {
|
|
10159
11556
|
/**
|
|
10160
|
-
*
|
|
10161
|
-
*
|
|
10162
|
-
* Each delivery record tracks the attempt count, status, payload, and
|
|
10163
|
-
* response for a single event dispatch.
|
|
11557
|
+
* Fetch a single sequence step by its unique ID.
|
|
10164
11558
|
*
|
|
10165
|
-
* @param
|
|
10166
|
-
* @
|
|
11559
|
+
* @param id - The unique identifier of the sequence step.
|
|
11560
|
+
* @param options - Optional request-level overrides.
|
|
11561
|
+
* @returns A promise resolving to the {@link EmailMarketingSequenceStep}.
|
|
10167
11562
|
*/
|
|
10168
|
-
|
|
11563
|
+
get: async (id, options) => {
|
|
10169
11564
|
return rb.execute(
|
|
10170
|
-
|
|
10171
|
-
{},
|
|
11565
|
+
getAdminCampaignsSequenceStepsById,
|
|
11566
|
+
{ path: { id } },
|
|
10172
11567
|
options
|
|
10173
11568
|
);
|
|
10174
11569
|
},
|
|
10175
11570
|
/**
|
|
10176
|
-
*
|
|
11571
|
+
* Create a new step within a sequence.
|
|
10177
11572
|
*
|
|
10178
|
-
* @param
|
|
10179
|
-
* @param options - Optional request
|
|
10180
|
-
* @returns
|
|
11573
|
+
* @param attributes - Step attributes including `sequence_id`.
|
|
11574
|
+
* @param options - Optional request-level overrides.
|
|
11575
|
+
* @returns A promise resolving to the newly created {@link EmailMarketingSequenceStep}.
|
|
10181
11576
|
*/
|
|
10182
|
-
|
|
11577
|
+
create: async (attributes, options) => {
|
|
10183
11578
|
return rb.execute(
|
|
10184
|
-
|
|
10185
|
-
{
|
|
11579
|
+
postAdminCampaignsSequenceSteps,
|
|
11580
|
+
{
|
|
11581
|
+
body: {
|
|
11582
|
+
data: {
|
|
11583
|
+
type: "email-marketing-sequence-step",
|
|
11584
|
+
attributes
|
|
11585
|
+
}
|
|
11586
|
+
}
|
|
11587
|
+
},
|
|
10186
11588
|
options
|
|
10187
11589
|
);
|
|
10188
11590
|
},
|
|
10189
11591
|
/**
|
|
10190
|
-
*
|
|
10191
|
-
*
|
|
10192
|
-
* Sets the delivery status to `retrying` and inserts a new WebhookSender
|
|
10193
|
-
* Oban job. Use this to recover from transient endpoint failures without
|
|
10194
|
-
* waiting for the automatic retry schedule.
|
|
11592
|
+
* Update an existing sequence step's attributes (PATCH semantics).
|
|
10195
11593
|
*
|
|
10196
|
-
* @param id -
|
|
10197
|
-
* @param
|
|
10198
|
-
* @
|
|
11594
|
+
* @param id - The unique identifier of the sequence step to update.
|
|
11595
|
+
* @param attributes - Key/value map of attributes to change.
|
|
11596
|
+
* @param options - Optional request-level overrides.
|
|
11597
|
+
* @returns A promise resolving to the updated {@link EmailMarketingSequenceStep}.
|
|
10199
11598
|
*/
|
|
10200
|
-
|
|
11599
|
+
update: async (id, attributes, options) => {
|
|
10201
11600
|
return rb.execute(
|
|
10202
|
-
|
|
10203
|
-
{
|
|
11601
|
+
patchAdminCampaignsSequenceStepsById,
|
|
11602
|
+
{
|
|
11603
|
+
path: { id },
|
|
11604
|
+
body: {
|
|
11605
|
+
data: {
|
|
11606
|
+
id,
|
|
11607
|
+
type: "email-marketing-sequence-step",
|
|
11608
|
+
attributes
|
|
11609
|
+
}
|
|
11610
|
+
}
|
|
11611
|
+
},
|
|
10204
11612
|
options
|
|
10205
11613
|
);
|
|
10206
11614
|
},
|
|
10207
11615
|
/**
|
|
10208
|
-
*
|
|
11616
|
+
* Permanently delete a sequence step.
|
|
10209
11617
|
*
|
|
10210
|
-
*
|
|
10211
|
-
*
|
|
10212
|
-
*
|
|
11618
|
+
* @param id - The unique identifier of the sequence step to delete.
|
|
11619
|
+
* @param options - Optional request-level overrides.
|
|
11620
|
+
* @returns A promise that resolves to `true` on successful deletion.
|
|
11621
|
+
*/
|
|
11622
|
+
delete: async (id, options) => {
|
|
11623
|
+
return rb.executeDelete(
|
|
11624
|
+
deleteAdminCampaignsSequenceStepsById,
|
|
11625
|
+
{ path: { id } },
|
|
11626
|
+
options
|
|
11627
|
+
);
|
|
11628
|
+
},
|
|
11629
|
+
/**
|
|
11630
|
+
* List all steps in a specific sequence.
|
|
10213
11631
|
*
|
|
10214
|
-
* @param
|
|
10215
|
-
* @param options - Optional request
|
|
10216
|
-
* @returns
|
|
11632
|
+
* @param sequenceId - The ID of the sequence whose steps to list.
|
|
11633
|
+
* @param options - Optional pagination controls and request-level overrides.
|
|
11634
|
+
* @returns A promise resolving to an array of {@link EmailMarketingSequenceStep} records.
|
|
10217
11635
|
*/
|
|
10218
|
-
|
|
11636
|
+
listBySequence: async (sequenceId, options) => {
|
|
10219
11637
|
return rb.execute(
|
|
10220
|
-
|
|
10221
|
-
{
|
|
11638
|
+
getAdminCampaignsSequenceStepsSequenceBySequenceId,
|
|
11639
|
+
{
|
|
11640
|
+
path: { sequence_id: sequenceId },
|
|
11641
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
11642
|
+
},
|
|
10222
11643
|
options
|
|
10223
11644
|
);
|
|
10224
11645
|
}
|
|
@@ -10226,119 +11647,6 @@ function createWebhooksNamespace(rb) {
|
|
|
10226
11647
|
};
|
|
10227
11648
|
}
|
|
10228
11649
|
|
|
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
11650
|
// src/namespaces/email.ts
|
|
10343
11651
|
function createEmailNamespace(rb) {
|
|
10344
11652
|
return {
|
|
@@ -10410,7 +11718,7 @@ function createEmailNamespace(rb) {
|
|
|
10410
11718
|
create: async (attributes, options) => {
|
|
10411
11719
|
return rb.execute(
|
|
10412
11720
|
postAdminEmailOutboundEmails,
|
|
10413
|
-
{ body: { data: { type: "
|
|
11721
|
+
{ body: { data: { type: "email-outbound-email", attributes } } },
|
|
10414
11722
|
options
|
|
10415
11723
|
);
|
|
10416
11724
|
},
|
|
@@ -10502,7 +11810,11 @@ function createEmailNamespace(rb) {
|
|
|
10502
11810
|
create: async (attributes, options) => {
|
|
10503
11811
|
return rb.execute(
|
|
10504
11812
|
postAdminEmailMarketingSenderProfiles,
|
|
10505
|
-
{
|
|
11813
|
+
{
|
|
11814
|
+
body: {
|
|
11815
|
+
data: { type: "email-marketing-sender-profile", attributes }
|
|
11816
|
+
}
|
|
11817
|
+
},
|
|
10506
11818
|
options
|
|
10507
11819
|
);
|
|
10508
11820
|
},
|
|
@@ -10527,7 +11839,9 @@ function createEmailNamespace(rb) {
|
|
|
10527
11839
|
patchAdminEmailMarketingSenderProfilesById,
|
|
10528
11840
|
{
|
|
10529
11841
|
path: { id },
|
|
10530
|
-
body: {
|
|
11842
|
+
body: {
|
|
11843
|
+
data: { id, type: "email-marketing-sender-profile", attributes }
|
|
11844
|
+
}
|
|
10531
11845
|
},
|
|
10532
11846
|
options
|
|
10533
11847
|
);
|
|
@@ -10695,7 +12009,7 @@ function createBillingNamespace(rb) {
|
|
|
10695
12009
|
body: {
|
|
10696
12010
|
data: {
|
|
10697
12011
|
id: walletId,
|
|
10698
|
-
type: "wallet",
|
|
12012
|
+
type: "wallet-public",
|
|
10699
12013
|
attributes: { plan_slug: planSlug }
|
|
10700
12014
|
}
|
|
10701
12015
|
}
|
|
@@ -10732,7 +12046,7 @@ function createBillingNamespace(rb) {
|
|
|
10732
12046
|
body: {
|
|
10733
12047
|
data: {
|
|
10734
12048
|
id: walletId,
|
|
10735
|
-
type: "wallet",
|
|
12049
|
+
type: "wallet-public",
|
|
10736
12050
|
attributes
|
|
10737
12051
|
}
|
|
10738
12052
|
}
|
|
@@ -10853,7 +12167,7 @@ function createBillingNamespace(rb) {
|
|
|
10853
12167
|
create: async (attrs, options) => {
|
|
10854
12168
|
return rb.execute(
|
|
10855
12169
|
postAdminPricingStrategies,
|
|
10856
|
-
{ body: { data: { type: "
|
|
12170
|
+
{ body: { data: { type: "pricing-strategy", attributes: attrs } } },
|
|
10857
12171
|
options
|
|
10858
12172
|
);
|
|
10859
12173
|
},
|
|
@@ -10868,7 +12182,7 @@ function createBillingNamespace(rb) {
|
|
|
10868
12182
|
patchAdminPricingStrategiesById,
|
|
10869
12183
|
{
|
|
10870
12184
|
path: { id },
|
|
10871
|
-
body: { data: { id, type: "
|
|
12185
|
+
body: { data: { id, type: "pricing-strategy", attributes: attrs } }
|
|
10872
12186
|
},
|
|
10873
12187
|
options
|
|
10874
12188
|
);
|
|
@@ -10911,7 +12225,7 @@ function createBillingNamespace(rb) {
|
|
|
10911
12225
|
postAdminTenantPricingOverrides,
|
|
10912
12226
|
{
|
|
10913
12227
|
body: {
|
|
10914
|
-
data: { type: "
|
|
12228
|
+
data: { type: "tenant-pricing-override", attributes: attrs }
|
|
10915
12229
|
}
|
|
10916
12230
|
},
|
|
10917
12231
|
options
|
|
@@ -10929,7 +12243,7 @@ function createBillingNamespace(rb) {
|
|
|
10929
12243
|
{
|
|
10930
12244
|
path: { id },
|
|
10931
12245
|
body: {
|
|
10932
|
-
data: { id, type: "
|
|
12246
|
+
data: { id, type: "tenant-pricing-override", attributes: attrs }
|
|
10933
12247
|
}
|
|
10934
12248
|
},
|
|
10935
12249
|
options
|
|
@@ -10985,7 +12299,7 @@ function createBillingNamespace(rb) {
|
|
|
10985
12299
|
return rb.execute(
|
|
10986
12300
|
postAdminWholesaleAgreements,
|
|
10987
12301
|
{
|
|
10988
|
-
body: { data: { type: "
|
|
12302
|
+
body: { data: { type: "wholesale-agreement", attributes: attrs } }
|
|
10989
12303
|
},
|
|
10990
12304
|
options
|
|
10991
12305
|
);
|
|
@@ -11002,7 +12316,7 @@ function createBillingNamespace(rb) {
|
|
|
11002
12316
|
{
|
|
11003
12317
|
path: { id },
|
|
11004
12318
|
body: {
|
|
11005
|
-
data: { id, type: "
|
|
12319
|
+
data: { id, type: "wholesale-agreement", attributes: attrs }
|
|
11006
12320
|
}
|
|
11007
12321
|
},
|
|
11008
12322
|
options
|
|
@@ -11137,7 +12451,7 @@ function createBillingNamespace(rb) {
|
|
|
11137
12451
|
postAdminFeatureDefinitions,
|
|
11138
12452
|
{
|
|
11139
12453
|
body: {
|
|
11140
|
-
data: { type: "
|
|
12454
|
+
data: { type: "feature-definition", attributes: attrs }
|
|
11141
12455
|
}
|
|
11142
12456
|
},
|
|
11143
12457
|
options
|
|
@@ -11150,7 +12464,7 @@ function createBillingNamespace(rb) {
|
|
|
11150
12464
|
{
|
|
11151
12465
|
path: { id },
|
|
11152
12466
|
body: {
|
|
11153
|
-
data: { id, type: "
|
|
12467
|
+
data: { id, type: "feature-definition", attributes: attrs }
|
|
11154
12468
|
}
|
|
11155
12469
|
},
|
|
11156
12470
|
options
|
|
@@ -11250,7 +12564,7 @@ function createBillingNamespace(rb) {
|
|
|
11250
12564
|
list: async (options) => {
|
|
11251
12565
|
const result = await rb.execute(
|
|
11252
12566
|
getAdminFeatureUsages,
|
|
11253
|
-
|
|
12567
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
11254
12568
|
options
|
|
11255
12569
|
);
|
|
11256
12570
|
return result.data ?? result;
|
|
@@ -11267,7 +12581,10 @@ function createBillingNamespace(rb) {
|
|
|
11267
12581
|
listByTenant: async (tenantId, options) => {
|
|
11268
12582
|
const result = await rb.execute(
|
|
11269
12583
|
getAdminFeatureUsagesByTenantByTenantId,
|
|
11270
|
-
{
|
|
12584
|
+
{
|
|
12585
|
+
path: { tenant_id: tenantId },
|
|
12586
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
12587
|
+
},
|
|
11271
12588
|
options
|
|
11272
12589
|
);
|
|
11273
12590
|
return result.data ?? result;
|
|
@@ -11295,7 +12612,11 @@ function createBillingNamespace(rb) {
|
|
|
11295
12612
|
* @returns A promise resolving to an array of {@link UsageEvent} objects.
|
|
11296
12613
|
*/
|
|
11297
12614
|
list: async (tenantId, filters, options) => {
|
|
11298
|
-
const
|
|
12615
|
+
const pageQuery = buildPageQuery(filters?.page, filters?.pageSize);
|
|
12616
|
+
const query = {
|
|
12617
|
+
tenant_id: tenantId,
|
|
12618
|
+
...pageQuery.query
|
|
12619
|
+
};
|
|
11299
12620
|
if (filters?.startDate) query.start_date = filters.startDate;
|
|
11300
12621
|
if (filters?.endDate) query.end_date = filters.endDate;
|
|
11301
12622
|
const result = await rb.execute(
|
|
@@ -11332,9 +12653,11 @@ function createBillingNamespace(rb) {
|
|
|
11332
12653
|
* @returns A promise resolving to an array of {@link UsageEvent} objects.
|
|
11333
12654
|
*/
|
|
11334
12655
|
listByUser: async (tenantId, userId, filters, options) => {
|
|
12656
|
+
const pageQuery = buildPageQuery(filters?.page, filters?.pageSize);
|
|
11335
12657
|
const query = {
|
|
11336
12658
|
tenant_id: tenantId,
|
|
11337
|
-
user_id: userId
|
|
12659
|
+
user_id: userId,
|
|
12660
|
+
...pageQuery.query
|
|
11338
12661
|
};
|
|
11339
12662
|
if (filters?.startDate) query.start_date = filters.startDate;
|
|
11340
12663
|
if (filters?.endDate) query.end_date = filters.endDate;
|
|
@@ -11358,7 +12681,11 @@ function createBillingNamespace(rb) {
|
|
|
11358
12681
|
* @returns A promise resolving to an array of {@link UsageEvent} objects.
|
|
11359
12682
|
*/
|
|
11360
12683
|
summary: async (tenantId, filters, options) => {
|
|
11361
|
-
const
|
|
12684
|
+
const pageQuery = buildPageQuery(filters?.page, filters?.pageSize);
|
|
12685
|
+
const query = {
|
|
12686
|
+
tenant_id: tenantId,
|
|
12687
|
+
...pageQuery.query
|
|
12688
|
+
};
|
|
11362
12689
|
if (filters?.startDate) query.start_date = filters.startDate;
|
|
11363
12690
|
if (filters?.endDate) query.end_date = filters.endDate;
|
|
11364
12691
|
const result = await rb.execute(
|
|
@@ -11638,7 +12965,7 @@ function createSocialNamespace(rb) {
|
|
|
11638
12965
|
postAdminSocialAccounts,
|
|
11639
12966
|
{
|
|
11640
12967
|
body: {
|
|
11641
|
-
data: { type: "
|
|
12968
|
+
data: { type: "social-account", attributes }
|
|
11642
12969
|
}
|
|
11643
12970
|
},
|
|
11644
12971
|
options
|
|
@@ -11651,7 +12978,7 @@ function createSocialNamespace(rb) {
|
|
|
11651
12978
|
{
|
|
11652
12979
|
path: { id },
|
|
11653
12980
|
body: {
|
|
11654
|
-
data: { type: "
|
|
12981
|
+
data: { type: "social-account", id, attributes }
|
|
11655
12982
|
}
|
|
11656
12983
|
},
|
|
11657
12984
|
options
|
|
@@ -11672,7 +12999,7 @@ function createSocialNamespace(rb) {
|
|
|
11672
12999
|
{
|
|
11673
13000
|
path: { id },
|
|
11674
13001
|
body: {
|
|
11675
|
-
data: { type: "
|
|
13002
|
+
data: { type: "social-account", id, attributes: {} }
|
|
11676
13003
|
}
|
|
11677
13004
|
},
|
|
11678
13005
|
options
|
|
@@ -11685,7 +13012,7 @@ function createSocialNamespace(rb) {
|
|
|
11685
13012
|
{
|
|
11686
13013
|
path: { id },
|
|
11687
13014
|
body: {
|
|
11688
|
-
data: { type: "
|
|
13015
|
+
data: { type: "social-account", id, attributes: {} }
|
|
11689
13016
|
}
|
|
11690
13017
|
},
|
|
11691
13018
|
options
|
|
@@ -11698,7 +13025,7 @@ function createSocialNamespace(rb) {
|
|
|
11698
13025
|
{
|
|
11699
13026
|
path: { id },
|
|
11700
13027
|
body: {
|
|
11701
|
-
data: { type: "
|
|
13028
|
+
data: { type: "social-account", id, attributes: {} }
|
|
11702
13029
|
}
|
|
11703
13030
|
},
|
|
11704
13031
|
options
|
|
@@ -11713,7 +13040,7 @@ function createSocialNamespace(rb) {
|
|
|
11713
13040
|
postAdminSocialPosts,
|
|
11714
13041
|
{
|
|
11715
13042
|
body: {
|
|
11716
|
-
data: { type: "
|
|
13043
|
+
data: { type: "social-post", attributes }
|
|
11717
13044
|
}
|
|
11718
13045
|
},
|
|
11719
13046
|
options
|
|
@@ -11730,7 +13057,7 @@ function createSocialNamespace(rb) {
|
|
|
11730
13057
|
{
|
|
11731
13058
|
path: { id },
|
|
11732
13059
|
body: {
|
|
11733
|
-
data: { type: "
|
|
13060
|
+
data: { type: "social-post", id, attributes }
|
|
11734
13061
|
}
|
|
11735
13062
|
},
|
|
11736
13063
|
options
|
|
@@ -11752,7 +13079,7 @@ function createSocialNamespace(rb) {
|
|
|
11752
13079
|
path: { id },
|
|
11753
13080
|
body: {
|
|
11754
13081
|
data: {
|
|
11755
|
-
type: "
|
|
13082
|
+
type: "social-post",
|
|
11756
13083
|
id,
|
|
11757
13084
|
attributes: { scheduled_at: scheduledAt }
|
|
11758
13085
|
}
|
|
@@ -11768,7 +13095,7 @@ function createSocialNamespace(rb) {
|
|
|
11768
13095
|
{
|
|
11769
13096
|
path: { id },
|
|
11770
13097
|
body: {
|
|
11771
|
-
data: { type: "
|
|
13098
|
+
data: { type: "social-post", id, attributes: {} }
|
|
11772
13099
|
}
|
|
11773
13100
|
},
|
|
11774
13101
|
options
|
|
@@ -11781,7 +13108,7 @@ function createSocialNamespace(rb) {
|
|
|
11781
13108
|
{
|
|
11782
13109
|
path: { id },
|
|
11783
13110
|
body: {
|
|
11784
|
-
data: { type: "
|
|
13111
|
+
data: { type: "social-post", id, attributes: {} }
|
|
11785
13112
|
}
|
|
11786
13113
|
},
|
|
11787
13114
|
options
|
|
@@ -11794,7 +13121,7 @@ function createSocialNamespace(rb) {
|
|
|
11794
13121
|
{
|
|
11795
13122
|
path: { id },
|
|
11796
13123
|
body: {
|
|
11797
|
-
data: { type: "
|
|
13124
|
+
data: { type: "social-post", id, attributes: {} }
|
|
11798
13125
|
}
|
|
11799
13126
|
},
|
|
11800
13127
|
options
|
|
@@ -11807,7 +13134,7 @@ function createSocialNamespace(rb) {
|
|
|
11807
13134
|
{
|
|
11808
13135
|
path: { id },
|
|
11809
13136
|
body: {
|
|
11810
|
-
data: { type: "
|
|
13137
|
+
data: { type: "social-post", id, attributes }
|
|
11811
13138
|
}
|
|
11812
13139
|
},
|
|
11813
13140
|
options
|
|
@@ -11901,7 +13228,7 @@ function createSocialNamespace(rb) {
|
|
|
11901
13228
|
postAdminSocialCampaigns,
|
|
11902
13229
|
{
|
|
11903
13230
|
body: {
|
|
11904
|
-
data: { type: "
|
|
13231
|
+
data: { type: "social-campaign", attributes }
|
|
11905
13232
|
}
|
|
11906
13233
|
},
|
|
11907
13234
|
options
|
|
@@ -11914,7 +13241,7 @@ function createSocialNamespace(rb) {
|
|
|
11914
13241
|
{
|
|
11915
13242
|
path: { id },
|
|
11916
13243
|
body: {
|
|
11917
|
-
data: { type: "
|
|
13244
|
+
data: { type: "social-campaign", id, attributes }
|
|
11918
13245
|
}
|
|
11919
13246
|
},
|
|
11920
13247
|
options
|
|
@@ -11936,7 +13263,7 @@ function createSocialNamespace(rb) {
|
|
|
11936
13263
|
path: { id },
|
|
11937
13264
|
body: {
|
|
11938
13265
|
data: {
|
|
11939
|
-
type: "
|
|
13266
|
+
type: "social-campaign",
|
|
11940
13267
|
id,
|
|
11941
13268
|
attributes: { scheduled_at: scheduledAt }
|
|
11942
13269
|
}
|
|
@@ -11952,7 +13279,7 @@ function createSocialNamespace(rb) {
|
|
|
11952
13279
|
{
|
|
11953
13280
|
path: { id },
|
|
11954
13281
|
body: {
|
|
11955
|
-
data: { type: "
|
|
13282
|
+
data: { type: "social-campaign", id, attributes: {} }
|
|
11956
13283
|
}
|
|
11957
13284
|
},
|
|
11958
13285
|
options
|
|
@@ -11966,8 +13293,11 @@ function createSocialNamespace(rb) {
|
|
|
11966
13293
|
path: { id },
|
|
11967
13294
|
body: {
|
|
11968
13295
|
data: {
|
|
11969
|
-
|
|
11970
|
-
|
|
13296
|
+
type: "social-campaign",
|
|
13297
|
+
attributes: {
|
|
13298
|
+
campaign_id: id,
|
|
13299
|
+
workspace_id: workspaceId
|
|
13300
|
+
}
|
|
11971
13301
|
}
|
|
11972
13302
|
}
|
|
11973
13303
|
},
|
|
@@ -11982,9 +13312,12 @@ function createSocialNamespace(rb) {
|
|
|
11982
13312
|
path: { id },
|
|
11983
13313
|
body: {
|
|
11984
13314
|
data: {
|
|
11985
|
-
|
|
11986
|
-
|
|
11987
|
-
|
|
13315
|
+
type: "social-campaign",
|
|
13316
|
+
attributes: {
|
|
13317
|
+
campaign_id: id,
|
|
13318
|
+
workspace_id: workspaceId,
|
|
13319
|
+
social_account_id: socialAccountId
|
|
13320
|
+
}
|
|
11988
13321
|
}
|
|
11989
13322
|
}
|
|
11990
13323
|
},
|
|
@@ -12223,7 +13556,7 @@ function createConnectorsNamespace(rb) {
|
|
|
12223
13556
|
/** Create a connector instance. */
|
|
12224
13557
|
create: async (attributes, options) => rb.execute(
|
|
12225
13558
|
postAdminConnectors,
|
|
12226
|
-
{ body: { data: { type: "
|
|
13559
|
+
{ body: { data: { type: "connector-instance", attributes } } },
|
|
12227
13560
|
options
|
|
12228
13561
|
),
|
|
12229
13562
|
/** Update a connector instance. */
|
|
@@ -12231,7 +13564,7 @@ function createConnectorsNamespace(rb) {
|
|
|
12231
13564
|
patchAdminConnectorsById,
|
|
12232
13565
|
{
|
|
12233
13566
|
path: { id },
|
|
12234
|
-
body: { data: { type: "
|
|
13567
|
+
body: { data: { type: "connector-instance", id, attributes } }
|
|
12235
13568
|
},
|
|
12236
13569
|
options
|
|
12237
13570
|
),
|
|
@@ -12271,7 +13604,7 @@ function createConnectorsNamespace(rb) {
|
|
|
12271
13604
|
{
|
|
12272
13605
|
body: {
|
|
12273
13606
|
data: {
|
|
12274
|
-
type: "
|
|
13607
|
+
type: "connector-instance",
|
|
12275
13608
|
connector_type: connectorType,
|
|
12276
13609
|
workspace_id: workspaceId
|
|
12277
13610
|
}
|
|
@@ -12285,7 +13618,7 @@ function createConnectorsNamespace(rb) {
|
|
|
12285
13618
|
{
|
|
12286
13619
|
body: {
|
|
12287
13620
|
data: {
|
|
12288
|
-
type: "
|
|
13621
|
+
type: "connector-instance",
|
|
12289
13622
|
connector_type: connectorType,
|
|
12290
13623
|
code,
|
|
12291
13624
|
state,
|
|
@@ -12317,7 +13650,7 @@ function createConnectorsNamespace(rb) {
|
|
|
12317
13650
|
create: async (attributes, options) => rb.execute(
|
|
12318
13651
|
postAdminConnectorsOauthAppConfigs,
|
|
12319
13652
|
{
|
|
12320
|
-
body: { data: { type: "
|
|
13653
|
+
body: { data: { type: "oauth-app-config", attributes } }
|
|
12321
13654
|
},
|
|
12322
13655
|
options
|
|
12323
13656
|
),
|
|
@@ -12326,7 +13659,7 @@ function createConnectorsNamespace(rb) {
|
|
|
12326
13659
|
patchAdminConnectorsOauthAppConfigsById,
|
|
12327
13660
|
{
|
|
12328
13661
|
path: { id },
|
|
12329
|
-
body: { data: { type: "
|
|
13662
|
+
body: { data: { type: "oauth-app-config", id, attributes } }
|
|
12330
13663
|
},
|
|
12331
13664
|
options
|
|
12332
13665
|
),
|
|
@@ -12420,7 +13753,7 @@ function createCrawlerNamespace(rb) {
|
|
|
12420
13753
|
create: async (attributes, options) => {
|
|
12421
13754
|
return rb.execute(
|
|
12422
13755
|
postAdminCrawlerJobs,
|
|
12423
|
-
{ body: { data: { type: "
|
|
13756
|
+
{ body: { data: { type: "crawler-job", attributes } } },
|
|
12424
13757
|
options
|
|
12425
13758
|
);
|
|
12426
13759
|
},
|
|
@@ -12465,7 +13798,7 @@ function createCrawlerNamespace(rb) {
|
|
|
12465
13798
|
postAdminCrawlerSchedules,
|
|
12466
13799
|
{
|
|
12467
13800
|
body: {
|
|
12468
|
-
data: { type: "
|
|
13801
|
+
data: { type: "crawler-schedule", attributes }
|
|
12469
13802
|
}
|
|
12470
13803
|
},
|
|
12471
13804
|
options
|
|
@@ -12478,7 +13811,7 @@ function createCrawlerNamespace(rb) {
|
|
|
12478
13811
|
{
|
|
12479
13812
|
path: { id },
|
|
12480
13813
|
body: {
|
|
12481
|
-
data: { id, type: "
|
|
13814
|
+
data: { id, type: "crawler-schedule", attributes }
|
|
12482
13815
|
}
|
|
12483
13816
|
},
|
|
12484
13817
|
options
|
|
@@ -12556,7 +13889,7 @@ function createCrawlerNamespace(rb) {
|
|
|
12556
13889
|
postAdminCrawlerSiteConfigs,
|
|
12557
13890
|
{
|
|
12558
13891
|
body: {
|
|
12559
|
-
data: { type: "
|
|
13892
|
+
data: { type: "crawler-site-config", attributes }
|
|
12560
13893
|
}
|
|
12561
13894
|
},
|
|
12562
13895
|
options
|
|
@@ -12569,7 +13902,7 @@ function createCrawlerNamespace(rb) {
|
|
|
12569
13902
|
{
|
|
12570
13903
|
path: { id },
|
|
12571
13904
|
body: {
|
|
12572
|
-
data: { id, type: "
|
|
13905
|
+
data: { id, type: "crawler-site-config", attributes }
|
|
12573
13906
|
}
|
|
12574
13907
|
},
|
|
12575
13908
|
options
|
|
@@ -12639,7 +13972,7 @@ function createExtractionNamespace(rb) {
|
|
|
12639
13972
|
{
|
|
12640
13973
|
path: { id },
|
|
12641
13974
|
body: {
|
|
12642
|
-
data: { id, type: "
|
|
13975
|
+
data: { id, type: "extraction-document", attributes }
|
|
12643
13976
|
}
|
|
12644
13977
|
},
|
|
12645
13978
|
options
|
|
@@ -12700,7 +14033,7 @@ function createExtractionNamespace(rb) {
|
|
|
12700
14033
|
{
|
|
12701
14034
|
path: { id },
|
|
12702
14035
|
body: {
|
|
12703
|
-
data: { id, type: "
|
|
14036
|
+
data: { id, type: "extraction-document", attributes }
|
|
12704
14037
|
}
|
|
12705
14038
|
},
|
|
12706
14039
|
options
|
|
@@ -12736,7 +14069,7 @@ function createExtractionNamespace(rb) {
|
|
|
12736
14069
|
postAdminExtractionDocumentsBeginUpload,
|
|
12737
14070
|
{
|
|
12738
14071
|
body: {
|
|
12739
|
-
data: { type: "
|
|
14072
|
+
data: { type: "presigned-url", attributes }
|
|
12740
14073
|
}
|
|
12741
14074
|
},
|
|
12742
14075
|
options
|
|
@@ -12748,7 +14081,7 @@ function createExtractionNamespace(rb) {
|
|
|
12748
14081
|
postAdminExtractionDocumentsFindOrBeginUpload,
|
|
12749
14082
|
{
|
|
12750
14083
|
body: {
|
|
12751
|
-
data: { type: "
|
|
14084
|
+
data: { type: "presigned-url", attributes }
|
|
12752
14085
|
}
|
|
12753
14086
|
},
|
|
12754
14087
|
options
|
|
@@ -12760,7 +14093,7 @@ function createExtractionNamespace(rb) {
|
|
|
12760
14093
|
postAdminExtractionDocumentsUpload,
|
|
12761
14094
|
{
|
|
12762
14095
|
body: {
|
|
12763
|
-
data: { type: "
|
|
14096
|
+
data: { type: "extraction-document", attributes }
|
|
12764
14097
|
}
|
|
12765
14098
|
},
|
|
12766
14099
|
options
|
|
@@ -12773,7 +14106,7 @@ function createExtractionNamespace(rb) {
|
|
|
12773
14106
|
{
|
|
12774
14107
|
body: {
|
|
12775
14108
|
data: {
|
|
12776
|
-
type: "
|
|
14109
|
+
type: "bulk-reprocess-result",
|
|
12777
14110
|
attributes: { ids }
|
|
12778
14111
|
}
|
|
12779
14112
|
}
|
|
@@ -12787,7 +14120,7 @@ function createExtractionNamespace(rb) {
|
|
|
12787
14120
|
postAdminDocumentsBulkDelete,
|
|
12788
14121
|
{
|
|
12789
14122
|
body: {
|
|
12790
|
-
data: { type: "
|
|
14123
|
+
data: { type: "bulk-delete", attributes: { ids } }
|
|
12791
14124
|
}
|
|
12792
14125
|
},
|
|
12793
14126
|
options
|
|
@@ -12882,7 +14215,7 @@ function createExtractionNamespace(rb) {
|
|
|
12882
14215
|
{
|
|
12883
14216
|
path: { id },
|
|
12884
14217
|
body: {
|
|
12885
|
-
data: { id, type: "
|
|
14218
|
+
data: { id, type: "extraction-result", attributes }
|
|
12886
14219
|
}
|
|
12887
14220
|
},
|
|
12888
14221
|
options
|
|
@@ -12927,7 +14260,7 @@ function createExtractionNamespace(rb) {
|
|
|
12927
14260
|
{
|
|
12928
14261
|
path: { id },
|
|
12929
14262
|
body: {
|
|
12930
|
-
data: { id, type: "
|
|
14263
|
+
data: { id, type: "extraction-result", attributes }
|
|
12931
14264
|
}
|
|
12932
14265
|
},
|
|
12933
14266
|
options
|
|
@@ -12940,7 +14273,7 @@ function createExtractionNamespace(rb) {
|
|
|
12940
14273
|
{
|
|
12941
14274
|
path: { id },
|
|
12942
14275
|
body: {
|
|
12943
|
-
data: { id, type: "
|
|
14276
|
+
data: { id, type: "extraction-result", attributes }
|
|
12944
14277
|
}
|
|
12945
14278
|
},
|
|
12946
14279
|
options
|
|
@@ -12979,7 +14312,7 @@ function createExtractionNamespace(rb) {
|
|
|
12979
14312
|
postAdminExtractionBatches,
|
|
12980
14313
|
{
|
|
12981
14314
|
body: {
|
|
12982
|
-
data: { type: "
|
|
14315
|
+
data: { type: "extraction-batch", attributes }
|
|
12983
14316
|
}
|
|
12984
14317
|
},
|
|
12985
14318
|
options
|
|
@@ -13019,7 +14352,7 @@ function createExtractionNamespace(rb) {
|
|
|
13019
14352
|
{
|
|
13020
14353
|
path: { workspace_id: workspaceId },
|
|
13021
14354
|
body: {
|
|
13022
|
-
data: { type: "
|
|
14355
|
+
data: { type: "extraction-export", attributes }
|
|
13023
14356
|
}
|
|
13024
14357
|
},
|
|
13025
14358
|
options
|
|
@@ -13050,7 +14383,7 @@ function createExtractionNamespace(rb) {
|
|
|
13050
14383
|
postAdminExtractionWorkflows,
|
|
13051
14384
|
{
|
|
13052
14385
|
body: {
|
|
13053
|
-
data: { type: "
|
|
14386
|
+
data: { type: "extraction-workflow", attributes }
|
|
13054
14387
|
}
|
|
13055
14388
|
},
|
|
13056
14389
|
options
|
|
@@ -13071,7 +14404,7 @@ function createExtractionNamespace(rb) {
|
|
|
13071
14404
|
{
|
|
13072
14405
|
path: { id },
|
|
13073
14406
|
body: {
|
|
13074
|
-
data: { id, type: "
|
|
14407
|
+
data: { id, type: "extraction-workflow", attributes }
|
|
13075
14408
|
}
|
|
13076
14409
|
},
|
|
13077
14410
|
options
|
|
@@ -13102,7 +14435,7 @@ function createExtractionNamespace(rb) {
|
|
|
13102
14435
|
postAdminExtractionConfigEnums,
|
|
13103
14436
|
{
|
|
13104
14437
|
body: {
|
|
13105
|
-
data: { type: "
|
|
14438
|
+
data: { type: "config-enum", attributes }
|
|
13106
14439
|
}
|
|
13107
14440
|
},
|
|
13108
14441
|
options
|
|
@@ -13123,7 +14456,7 @@ function createExtractionNamespace(rb) {
|
|
|
13123
14456
|
{
|
|
13124
14457
|
path: { id },
|
|
13125
14458
|
body: {
|
|
13126
|
-
data: { id, type: "
|
|
14459
|
+
data: { id, type: "config-enum", attributes }
|
|
13127
14460
|
}
|
|
13128
14461
|
},
|
|
13129
14462
|
options
|
|
@@ -13138,7 +14471,7 @@ function createExtractionNamespace(rb) {
|
|
|
13138
14471
|
postAdminExtractionSchemaDiscoveries,
|
|
13139
14472
|
{
|
|
13140
14473
|
body: {
|
|
13141
|
-
data: { type: "
|
|
14474
|
+
data: { type: "schema-discovery", attributes }
|
|
13142
14475
|
}
|
|
13143
14476
|
},
|
|
13144
14477
|
options
|
|
@@ -13158,7 +14491,7 @@ function createExtractionNamespace(rb) {
|
|
|
13158
14491
|
postAdminExtractionSchemaDiscoveriesBootstrap,
|
|
13159
14492
|
{
|
|
13160
14493
|
body: {
|
|
13161
|
-
data: { type: "
|
|
14494
|
+
data: { type: "schema-discovery", attributes }
|
|
13162
14495
|
}
|
|
13163
14496
|
},
|
|
13164
14497
|
options
|
|
@@ -13182,7 +14515,7 @@ function createExtractionNamespace(rb) {
|
|
|
13182
14515
|
{
|
|
13183
14516
|
path: { workspace_id: workspaceId, document_id: documentId },
|
|
13184
14517
|
body: {
|
|
13185
|
-
data: { type: "
|
|
14518
|
+
data: { type: "field-mapping-result", attributes }
|
|
13186
14519
|
}
|
|
13187
14520
|
},
|
|
13188
14521
|
options
|
|
@@ -13213,7 +14546,7 @@ function createExtractionNamespace(rb) {
|
|
|
13213
14546
|
postAdminExtractionShadowComparisons,
|
|
13214
14547
|
{
|
|
13215
14548
|
body: {
|
|
13216
|
-
data: { type: "
|
|
14549
|
+
data: { type: "shadow-comparison", attributes }
|
|
13217
14550
|
}
|
|
13218
14551
|
},
|
|
13219
14552
|
options
|
|
@@ -13326,7 +14659,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13326
14659
|
create: async (attributes, options) => {
|
|
13327
14660
|
return rb.execute(
|
|
13328
14661
|
postAdminSchedulingLocations,
|
|
13329
|
-
{ body: { data: { type: "
|
|
14662
|
+
{ body: { data: { type: "scheduling-location", attributes } } },
|
|
13330
14663
|
options
|
|
13331
14664
|
);
|
|
13332
14665
|
},
|
|
@@ -13337,7 +14670,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13337
14670
|
{
|
|
13338
14671
|
path: { id },
|
|
13339
14672
|
body: {
|
|
13340
|
-
data: { id, type: "
|
|
14673
|
+
data: { id, type: "scheduling-location", attributes }
|
|
13341
14674
|
}
|
|
13342
14675
|
},
|
|
13343
14676
|
options
|
|
@@ -13352,7 +14685,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13352
14685
|
body: {
|
|
13353
14686
|
data: {
|
|
13354
14687
|
id,
|
|
13355
|
-
type: "
|
|
14688
|
+
type: "scheduling-location",
|
|
13356
14689
|
attributes: { is_active: false }
|
|
13357
14690
|
}
|
|
13358
14691
|
}
|
|
@@ -13383,7 +14716,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13383
14716
|
create: async (attributes, options) => {
|
|
13384
14717
|
return rb.execute(
|
|
13385
14718
|
postAdminSchedulingEventTypes,
|
|
13386
|
-
{ body: { data: { type: "
|
|
14719
|
+
{ body: { data: { type: "scheduling-event-type", attributes } } },
|
|
13387
14720
|
options
|
|
13388
14721
|
);
|
|
13389
14722
|
},
|
|
@@ -13394,20 +14727,36 @@ function createSchedulingNamespace(rb) {
|
|
|
13394
14727
|
{
|
|
13395
14728
|
path: { id },
|
|
13396
14729
|
body: {
|
|
13397
|
-
data: { id, type: "
|
|
14730
|
+
data: { id, type: "scheduling-event-type", attributes }
|
|
13398
14731
|
}
|
|
13399
14732
|
},
|
|
13400
14733
|
options
|
|
13401
14734
|
);
|
|
14735
|
+
},
|
|
14736
|
+
/** Archive an event type. */
|
|
14737
|
+
archive: async (id, options) => {
|
|
14738
|
+
return rb.execute(
|
|
14739
|
+
patchAdminSchedulingEventTypesByIdArchive,
|
|
14740
|
+
{ path: { id }, body: {} },
|
|
14741
|
+
options
|
|
14742
|
+
);
|
|
14743
|
+
},
|
|
14744
|
+
/** Get an event type by its public slug. */
|
|
14745
|
+
getBySlug: async (slug, workspaceId, options) => {
|
|
14746
|
+
return rb.execute(
|
|
14747
|
+
getAdminSchedulingEventTypesBySlug,
|
|
14748
|
+
{ query: { slug, workspace_id: workspaceId } },
|
|
14749
|
+
options
|
|
14750
|
+
);
|
|
13402
14751
|
}
|
|
13403
14752
|
},
|
|
13404
14753
|
/** Events — scheduled occurrences between workspace members. */
|
|
13405
14754
|
events: {
|
|
13406
|
-
/** List events. */
|
|
13407
|
-
list: async (options) => {
|
|
14755
|
+
/** List events in a workspace. */
|
|
14756
|
+
list: async (workspaceId, options) => {
|
|
13408
14757
|
return rb.execute(
|
|
13409
14758
|
getAdminSchedulingEvents,
|
|
13410
|
-
{},
|
|
14759
|
+
{ query: { workspace_id: workspaceId } },
|
|
13411
14760
|
options
|
|
13412
14761
|
);
|
|
13413
14762
|
},
|
|
@@ -13423,7 +14772,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13423
14772
|
create: async (attributes, options) => {
|
|
13424
14773
|
return rb.execute(
|
|
13425
14774
|
postAdminSchedulingEvents,
|
|
13426
|
-
{ body: { data: { type: "
|
|
14775
|
+
{ body: { data: { type: "scheduling-event", attributes } } },
|
|
13427
14776
|
options
|
|
13428
14777
|
);
|
|
13429
14778
|
},
|
|
@@ -13433,7 +14782,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13433
14782
|
patchAdminSchedulingEventsById,
|
|
13434
14783
|
{
|
|
13435
14784
|
path: { id },
|
|
13436
|
-
body: { data: { id, type: "
|
|
14785
|
+
body: { data: { id, type: "scheduling-event", attributes } }
|
|
13437
14786
|
},
|
|
13438
14787
|
options
|
|
13439
14788
|
);
|
|
@@ -13444,7 +14793,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13444
14793
|
patchAdminSchedulingEventsByIdCancel,
|
|
13445
14794
|
{
|
|
13446
14795
|
path: { id },
|
|
13447
|
-
body: attributes ? { data: { type: "
|
|
14796
|
+
body: attributes ? { data: { type: "scheduling-event", attributes } } : {}
|
|
13448
14797
|
},
|
|
13449
14798
|
options
|
|
13450
14799
|
);
|
|
@@ -13463,7 +14812,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13463
14812
|
patchAdminSchedulingEventsByIdReschedule,
|
|
13464
14813
|
{
|
|
13465
14814
|
path: { id },
|
|
13466
|
-
body: { data: { type: "
|
|
14815
|
+
body: { data: { type: "scheduling-event", attributes } }
|
|
13467
14816
|
},
|
|
13468
14817
|
options
|
|
13469
14818
|
);
|
|
@@ -13515,7 +14864,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13515
14864
|
postAdminSchedulingParticipants,
|
|
13516
14865
|
{
|
|
13517
14866
|
body: {
|
|
13518
|
-
data: { type: "
|
|
14867
|
+
data: { type: "scheduling-participant", attributes }
|
|
13519
14868
|
}
|
|
13520
14869
|
},
|
|
13521
14870
|
options
|
|
@@ -13528,7 +14877,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13528
14877
|
{
|
|
13529
14878
|
path: { id },
|
|
13530
14879
|
body: {
|
|
13531
|
-
data: { id, type: "
|
|
14880
|
+
data: { id, type: "scheduling-participant", attributes }
|
|
13532
14881
|
}
|
|
13533
14882
|
},
|
|
13534
14883
|
options
|
|
@@ -13542,7 +14891,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13542
14891
|
path: { id },
|
|
13543
14892
|
body: {
|
|
13544
14893
|
data: {
|
|
13545
|
-
type: "
|
|
14894
|
+
type: "scheduling-participant",
|
|
13546
14895
|
attributes: { status }
|
|
13547
14896
|
}
|
|
13548
14897
|
}
|
|
@@ -13583,7 +14932,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13583
14932
|
postAdminSchedulingAvailabilityRules,
|
|
13584
14933
|
{
|
|
13585
14934
|
body: {
|
|
13586
|
-
data: { type: "
|
|
14935
|
+
data: { type: "scheduling-availability-rule", attributes }
|
|
13587
14936
|
}
|
|
13588
14937
|
},
|
|
13589
14938
|
options
|
|
@@ -13598,7 +14947,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13598
14947
|
body: {
|
|
13599
14948
|
data: {
|
|
13600
14949
|
id,
|
|
13601
|
-
type: "
|
|
14950
|
+
type: "scheduling-availability-rule",
|
|
13602
14951
|
attributes
|
|
13603
14952
|
}
|
|
13604
14953
|
}
|
|
@@ -13613,6 +14962,22 @@ function createSchedulingNamespace(rb) {
|
|
|
13613
14962
|
{ path: { id } },
|
|
13614
14963
|
options
|
|
13615
14964
|
);
|
|
14965
|
+
},
|
|
14966
|
+
/** List availability rules for a specific user. */
|
|
14967
|
+
listByUser: async (userId, options) => {
|
|
14968
|
+
return rb.execute(
|
|
14969
|
+
getAdminSchedulingAvailabilityRulesByUser,
|
|
14970
|
+
{ query: { user_id: userId } },
|
|
14971
|
+
options
|
|
14972
|
+
);
|
|
14973
|
+
},
|
|
14974
|
+
/** List availability rules for a specific event type. */
|
|
14975
|
+
listByEventType: async (eventTypeId, options) => {
|
|
14976
|
+
return rb.execute(
|
|
14977
|
+
getAdminSchedulingAvailabilityRulesByEventType,
|
|
14978
|
+
{ query: { event_type_id: eventTypeId } },
|
|
14979
|
+
options
|
|
14980
|
+
);
|
|
13616
14981
|
}
|
|
13617
14982
|
},
|
|
13618
14983
|
/** Bookings — external party appointment requests. */
|
|
@@ -13637,7 +15002,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13637
15002
|
create: async (attributes, options) => {
|
|
13638
15003
|
return rb.execute(
|
|
13639
15004
|
postAdminSchedulingBookings,
|
|
13640
|
-
{ body: { data: { type: "
|
|
15005
|
+
{ body: { data: { type: "scheduling-booking", attributes } } },
|
|
13641
15006
|
options
|
|
13642
15007
|
);
|
|
13643
15008
|
},
|
|
@@ -13655,7 +15020,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13655
15020
|
patchAdminSchedulingBookingsByIdCancel,
|
|
13656
15021
|
{
|
|
13657
15022
|
path: { id },
|
|
13658
|
-
body: attributes ? { data: { type: "
|
|
15023
|
+
body: attributes ? { data: { type: "scheduling-booking", attributes } } : {}
|
|
13659
15024
|
},
|
|
13660
15025
|
options
|
|
13661
15026
|
);
|
|
@@ -13666,7 +15031,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13666
15031
|
patchAdminSchedulingBookingsByIdReschedule,
|
|
13667
15032
|
{
|
|
13668
15033
|
path: { id },
|
|
13669
|
-
body: { data: { type: "
|
|
15034
|
+
body: { data: { type: "scheduling-booking", attributes } }
|
|
13670
15035
|
},
|
|
13671
15036
|
options
|
|
13672
15037
|
);
|
|
@@ -13678,6 +15043,14 @@ function createSchedulingNamespace(rb) {
|
|
|
13678
15043
|
{ path: { id }, body: {} },
|
|
13679
15044
|
options
|
|
13680
15045
|
);
|
|
15046
|
+
},
|
|
15047
|
+
/** List bookings by booker email address. */
|
|
15048
|
+
listByBooker: async (email, options) => {
|
|
15049
|
+
return rb.execute(
|
|
15050
|
+
getAdminSchedulingBookingsByBooker,
|
|
15051
|
+
{ query: { booker_email: email } },
|
|
15052
|
+
options
|
|
15053
|
+
);
|
|
13681
15054
|
}
|
|
13682
15055
|
},
|
|
13683
15056
|
/** Reminders — scheduled notifications tied to events. */
|
|
@@ -13702,7 +15075,15 @@ function createSchedulingNamespace(rb) {
|
|
|
13702
15075
|
create: async (attributes, options) => {
|
|
13703
15076
|
return rb.execute(
|
|
13704
15077
|
postAdminSchedulingReminders,
|
|
13705
|
-
{ body: { data: { type: "
|
|
15078
|
+
{ body: { data: { type: "scheduling-reminder", attributes } } },
|
|
15079
|
+
options
|
|
15080
|
+
);
|
|
15081
|
+
},
|
|
15082
|
+
/** Cancel a pending reminder. */
|
|
15083
|
+
cancel: async (id, options) => {
|
|
15084
|
+
return rb.execute(
|
|
15085
|
+
patchAdminSchedulingRemindersByIdCancel,
|
|
15086
|
+
{ path: { id }, body: {} },
|
|
13706
15087
|
options
|
|
13707
15088
|
);
|
|
13708
15089
|
}
|
|
@@ -13731,7 +15112,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13731
15112
|
postAdminSchedulingCalendarSyncs,
|
|
13732
15113
|
{
|
|
13733
15114
|
body: {
|
|
13734
|
-
data: { type: "
|
|
15115
|
+
data: { type: "scheduling-calendar-sync", attributes }
|
|
13735
15116
|
}
|
|
13736
15117
|
},
|
|
13737
15118
|
options
|
|
@@ -13744,7 +15125,7 @@ function createSchedulingNamespace(rb) {
|
|
|
13744
15125
|
{
|
|
13745
15126
|
path: { id },
|
|
13746
15127
|
body: {
|
|
13747
|
-
data: { id, type: "
|
|
15128
|
+
data: { id, type: "scheduling-calendar-sync", attributes }
|
|
13748
15129
|
}
|
|
13749
15130
|
},
|
|
13750
15131
|
options
|
|
@@ -13806,7 +15187,7 @@ function createCrmNamespace(rb) {
|
|
|
13806
15187
|
create: async (attributes, options) => {
|
|
13807
15188
|
return rb.execute(
|
|
13808
15189
|
postAdminCrmContacts,
|
|
13809
|
-
{ body: { data: { type: "
|
|
15190
|
+
{ body: { data: { type: "crm-contact", attributes } } },
|
|
13810
15191
|
options
|
|
13811
15192
|
);
|
|
13812
15193
|
},
|
|
@@ -13816,7 +15197,7 @@ function createCrmNamespace(rb) {
|
|
|
13816
15197
|
patchAdminCrmContactsById,
|
|
13817
15198
|
{
|
|
13818
15199
|
path: { id },
|
|
13819
|
-
body: { data: { type: "
|
|
15200
|
+
body: { data: { type: "crm-contact", id, attributes } }
|
|
13820
15201
|
},
|
|
13821
15202
|
options
|
|
13822
15203
|
);
|
|
@@ -13827,7 +15208,7 @@ function createCrmNamespace(rb) {
|
|
|
13827
15208
|
patchAdminCrmContactsByIdArchive,
|
|
13828
15209
|
{
|
|
13829
15210
|
path: { id },
|
|
13830
|
-
body: { data: { type: "
|
|
15211
|
+
body: { data: { type: "crm-contact", id, attributes: {} } }
|
|
13831
15212
|
},
|
|
13832
15213
|
options
|
|
13833
15214
|
);
|
|
@@ -13838,7 +15219,7 @@ function createCrmNamespace(rb) {
|
|
|
13838
15219
|
postAdminCrmContactsByIdUnarchive,
|
|
13839
15220
|
{
|
|
13840
15221
|
path: { id },
|
|
13841
|
-
body: { data: { type: "
|
|
15222
|
+
body: { data: { type: "crm-contact", id } }
|
|
13842
15223
|
},
|
|
13843
15224
|
options
|
|
13844
15225
|
);
|
|
@@ -13865,7 +15246,7 @@ function createCrmNamespace(rb) {
|
|
|
13865
15246
|
create: async (attributes, options) => {
|
|
13866
15247
|
return rb.execute(
|
|
13867
15248
|
postAdminCrmCompanies,
|
|
13868
|
-
{ body: { data: { type: "
|
|
15249
|
+
{ body: { data: { type: "crm-company", attributes } } },
|
|
13869
15250
|
options
|
|
13870
15251
|
);
|
|
13871
15252
|
},
|
|
@@ -13875,7 +15256,7 @@ function createCrmNamespace(rb) {
|
|
|
13875
15256
|
patchAdminCrmCompaniesById,
|
|
13876
15257
|
{
|
|
13877
15258
|
path: { id },
|
|
13878
|
-
body: { data: { type: "
|
|
15259
|
+
body: { data: { type: "crm-company", id, attributes } }
|
|
13879
15260
|
},
|
|
13880
15261
|
options
|
|
13881
15262
|
);
|
|
@@ -13907,7 +15288,7 @@ function createCrmNamespace(rb) {
|
|
|
13907
15288
|
create: async (attributes, options) => {
|
|
13908
15289
|
return rb.execute(
|
|
13909
15290
|
postAdminCrmDeals,
|
|
13910
|
-
{ body: { data: { type: "
|
|
15291
|
+
{ body: { data: { type: "crm-deal", attributes } } },
|
|
13911
15292
|
options
|
|
13912
15293
|
);
|
|
13913
15294
|
},
|
|
@@ -13917,7 +15298,7 @@ function createCrmNamespace(rb) {
|
|
|
13917
15298
|
patchAdminCrmDealsById,
|
|
13918
15299
|
{
|
|
13919
15300
|
path: { id },
|
|
13920
|
-
body: { data: { type: "
|
|
15301
|
+
body: { data: { type: "crm-deal", id, attributes } }
|
|
13921
15302
|
},
|
|
13922
15303
|
options
|
|
13923
15304
|
);
|
|
@@ -13928,7 +15309,7 @@ function createCrmNamespace(rb) {
|
|
|
13928
15309
|
patchAdminCrmDealsByIdMoveStage,
|
|
13929
15310
|
{
|
|
13930
15311
|
path: { id },
|
|
13931
|
-
body: { data: { type: "
|
|
15312
|
+
body: { data: { type: "crm-deal", id, attributes } }
|
|
13932
15313
|
},
|
|
13933
15314
|
options
|
|
13934
15315
|
);
|
|
@@ -13956,7 +15337,7 @@ function createCrmNamespace(rb) {
|
|
|
13956
15337
|
create: async (attributes, options) => {
|
|
13957
15338
|
return rb.execute(
|
|
13958
15339
|
postAdminCrmActivities,
|
|
13959
|
-
{ body: { data: { type: "
|
|
15340
|
+
{ body: { data: { type: "crm-activity", attributes } } },
|
|
13960
15341
|
options
|
|
13961
15342
|
);
|
|
13962
15343
|
},
|
|
@@ -13966,7 +15347,7 @@ function createCrmNamespace(rb) {
|
|
|
13966
15347
|
patchAdminCrmActivitiesById,
|
|
13967
15348
|
{
|
|
13968
15349
|
path: { id },
|
|
13969
|
-
body: { data: { type: "
|
|
15350
|
+
body: { data: { type: "crm-activity", id, attributes } }
|
|
13970
15351
|
},
|
|
13971
15352
|
options
|
|
13972
15353
|
);
|
|
@@ -13998,7 +15379,7 @@ function createCrmNamespace(rb) {
|
|
|
13998
15379
|
create: async (attributes, options) => {
|
|
13999
15380
|
return rb.execute(
|
|
14000
15381
|
postAdminCrmPipelines,
|
|
14001
|
-
{ body: { data: { type: "
|
|
15382
|
+
{ body: { data: { type: "crm-pipeline", attributes } } },
|
|
14002
15383
|
options
|
|
14003
15384
|
);
|
|
14004
15385
|
},
|
|
@@ -14008,7 +15389,7 @@ function createCrmNamespace(rb) {
|
|
|
14008
15389
|
patchAdminCrmPipelinesById,
|
|
14009
15390
|
{
|
|
14010
15391
|
path: { id },
|
|
14011
|
-
body: { data: { type: "
|
|
15392
|
+
body: { data: { type: "crm-pipeline", id, attributes } }
|
|
14012
15393
|
},
|
|
14013
15394
|
options
|
|
14014
15395
|
);
|
|
@@ -14044,7 +15425,7 @@ function createCrmNamespace(rb) {
|
|
|
14044
15425
|
create: async (attributes, options) => {
|
|
14045
15426
|
return rb.execute(
|
|
14046
15427
|
postAdminCrmPipelineStages,
|
|
14047
|
-
{ body: { data: { type: "
|
|
15428
|
+
{ body: { data: { type: "crm-pipeline-stage", attributes } } },
|
|
14048
15429
|
options
|
|
14049
15430
|
);
|
|
14050
15431
|
},
|
|
@@ -14054,7 +15435,7 @@ function createCrmNamespace(rb) {
|
|
|
14054
15435
|
patchAdminCrmPipelineStagesById,
|
|
14055
15436
|
{
|
|
14056
15437
|
path: { id },
|
|
14057
|
-
body: { data: { type: "
|
|
15438
|
+
body: { data: { type: "crm-pipeline-stage", id, attributes } }
|
|
14058
15439
|
},
|
|
14059
15440
|
options
|
|
14060
15441
|
);
|
|
@@ -14090,7 +15471,7 @@ function createCrmNamespace(rb) {
|
|
|
14090
15471
|
create: async (attributes, options) => {
|
|
14091
15472
|
return rb.execute(
|
|
14092
15473
|
postAdminCrmRelationships,
|
|
14093
|
-
{ body: { data: { type: "
|
|
15474
|
+
{ body: { data: { type: "crm-relationship", attributes } } },
|
|
14094
15475
|
options
|
|
14095
15476
|
);
|
|
14096
15477
|
},
|
|
@@ -14121,7 +15502,7 @@ function createCrmNamespace(rb) {
|
|
|
14121
15502
|
create: async (attributes, options) => {
|
|
14122
15503
|
return rb.execute(
|
|
14123
15504
|
postAdminCrmRelationshipTypes,
|
|
14124
|
-
{ body: { data: { type: "
|
|
15505
|
+
{ body: { data: { type: "crm-relationship-type", attributes } } },
|
|
14125
15506
|
options
|
|
14126
15507
|
);
|
|
14127
15508
|
},
|
|
@@ -14131,7 +15512,7 @@ function createCrmNamespace(rb) {
|
|
|
14131
15512
|
patchAdminCrmRelationshipTypesById,
|
|
14132
15513
|
{
|
|
14133
15514
|
path: { id },
|
|
14134
|
-
body: { data: { type: "
|
|
15515
|
+
body: { data: { type: "crm-relationship-type", id, attributes } }
|
|
14135
15516
|
},
|
|
14136
15517
|
options
|
|
14137
15518
|
);
|
|
@@ -14167,7 +15548,7 @@ function createCrmNamespace(rb) {
|
|
|
14167
15548
|
create: async (attributes, options) => {
|
|
14168
15549
|
return rb.execute(
|
|
14169
15550
|
postAdminCrmCustomEntities,
|
|
14170
|
-
{ body: { data: { type: "
|
|
15551
|
+
{ body: { data: { type: "crm-custom-entity", attributes } } },
|
|
14171
15552
|
options
|
|
14172
15553
|
);
|
|
14173
15554
|
},
|
|
@@ -14177,7 +15558,7 @@ function createCrmNamespace(rb) {
|
|
|
14177
15558
|
patchAdminCrmCustomEntitiesById,
|
|
14178
15559
|
{
|
|
14179
15560
|
path: { id },
|
|
14180
|
-
body: { data: { type: "
|
|
15561
|
+
body: { data: { type: "crm-custom-entity", id, attributes } }
|
|
14181
15562
|
},
|
|
14182
15563
|
options
|
|
14183
15564
|
);
|
|
@@ -14225,7 +15606,7 @@ function createCrmNamespace(rb) {
|
|
|
14225
15606
|
create: async (attributes, options) => {
|
|
14226
15607
|
return rb.execute(
|
|
14227
15608
|
postAdminCrmDealProducts,
|
|
14228
|
-
{ body: { data: { type: "
|
|
15609
|
+
{ body: { data: { type: "crm-deal-product", attributes } } },
|
|
14229
15610
|
options
|
|
14230
15611
|
);
|
|
14231
15612
|
},
|
|
@@ -14256,7 +15637,7 @@ function createCrmNamespace(rb) {
|
|
|
14256
15637
|
create: async (attributes, options) => {
|
|
14257
15638
|
return rb.execute(
|
|
14258
15639
|
postAdminCrmExports,
|
|
14259
|
-
{ body: { data: { type: "
|
|
15640
|
+
{ body: { data: { type: "crm-data-export-job", attributes } } },
|
|
14260
15641
|
options
|
|
14261
15642
|
);
|
|
14262
15643
|
},
|
|
@@ -14266,7 +15647,7 @@ function createCrmNamespace(rb) {
|
|
|
14266
15647
|
patchAdminCrmExportsByIdRefreshUrl,
|
|
14267
15648
|
{
|
|
14268
15649
|
path: { id },
|
|
14269
|
-
body: { data: { type: "
|
|
15650
|
+
body: { data: { type: "crm-data-export-job", id, attributes: {} } }
|
|
14270
15651
|
},
|
|
14271
15652
|
options
|
|
14272
15653
|
);
|
|
@@ -14294,7 +15675,7 @@ function createCrmNamespace(rb) {
|
|
|
14294
15675
|
create: async (attributes, options) => {
|
|
14295
15676
|
return rb.execute(
|
|
14296
15677
|
postAdminIsvCrmEntityTypes,
|
|
14297
|
-
{ body: { data: { type: "
|
|
15678
|
+
{ body: { data: { type: "crm-custom-entity-type", attributes } } },
|
|
14298
15679
|
options
|
|
14299
15680
|
);
|
|
14300
15681
|
},
|
|
@@ -14304,7 +15685,7 @@ function createCrmNamespace(rb) {
|
|
|
14304
15685
|
patchAdminIsvCrmEntityTypesById,
|
|
14305
15686
|
{
|
|
14306
15687
|
path: { id },
|
|
14307
|
-
body: { data: { type: "
|
|
15688
|
+
body: { data: { type: "crm-custom-entity-type", id, attributes } }
|
|
14308
15689
|
},
|
|
14309
15690
|
options
|
|
14310
15691
|
);
|
|
@@ -14341,7 +15722,7 @@ function createCrmNamespace(rb) {
|
|
|
14341
15722
|
return rb.execute(
|
|
14342
15723
|
postAdminCrmFieldDefinitions,
|
|
14343
15724
|
{
|
|
14344
|
-
body: { data: { type: "
|
|
15725
|
+
body: { data: { type: "crm-custom-field-definition", attributes } }
|
|
14345
15726
|
},
|
|
14346
15727
|
options
|
|
14347
15728
|
);
|
|
@@ -14353,7 +15734,7 @@ function createCrmNamespace(rb) {
|
|
|
14353
15734
|
{
|
|
14354
15735
|
path: { id },
|
|
14355
15736
|
body: {
|
|
14356
|
-
data: { type: "
|
|
15737
|
+
data: { type: "crm-custom-field-definition", id, attributes }
|
|
14357
15738
|
}
|
|
14358
15739
|
},
|
|
14359
15740
|
options
|
|
@@ -14383,7 +15764,7 @@ function createCrmNamespace(rb) {
|
|
|
14383
15764
|
return rb.execute(
|
|
14384
15765
|
postAdminIsvCrmChannelCaptureConfig,
|
|
14385
15766
|
{
|
|
14386
|
-
body: { data: { type: "
|
|
15767
|
+
body: { data: { type: "crm-channel-capture-config", attributes } }
|
|
14387
15768
|
},
|
|
14388
15769
|
options
|
|
14389
15770
|
);
|
|
@@ -14395,7 +15776,7 @@ function createCrmNamespace(rb) {
|
|
|
14395
15776
|
{
|
|
14396
15777
|
path: { id },
|
|
14397
15778
|
body: {
|
|
14398
|
-
data: { type: "
|
|
15779
|
+
data: { type: "crm-channel-capture-config", id, attributes }
|
|
14399
15780
|
}
|
|
14400
15781
|
},
|
|
14401
15782
|
options
|
|
@@ -14416,7 +15797,7 @@ function createCrmNamespace(rb) {
|
|
|
14416
15797
|
create: async (attributes, options) => {
|
|
14417
15798
|
return rb.execute(
|
|
14418
15799
|
postAdminCrmSyncConfigs,
|
|
14419
|
-
{ body: { data: { type: "
|
|
15800
|
+
{ body: { data: { type: "crm-sync-config", attributes } } },
|
|
14420
15801
|
options
|
|
14421
15802
|
);
|
|
14422
15803
|
},
|
|
@@ -14426,7 +15807,7 @@ function createCrmNamespace(rb) {
|
|
|
14426
15807
|
patchAdminCrmSyncConfigsById,
|
|
14427
15808
|
{
|
|
14428
15809
|
path: { id },
|
|
14429
|
-
body: { data: { type: "
|
|
15810
|
+
body: { data: { type: "crm-sync-config", id, attributes } }
|
|
14430
15811
|
},
|
|
14431
15812
|
options
|
|
14432
15813
|
);
|
|
@@ -14468,7 +15849,7 @@ function createSupportNamespace(rb) {
|
|
|
14468
15849
|
create: async (attributes, options) => {
|
|
14469
15850
|
return rb.execute(
|
|
14470
15851
|
postAdminSupportTickets,
|
|
14471
|
-
{ body: { data: { type: "
|
|
15852
|
+
{ body: { data: { type: "support-ticket", attributes } } },
|
|
14472
15853
|
options
|
|
14473
15854
|
);
|
|
14474
15855
|
},
|
|
@@ -14478,7 +15859,7 @@ function createSupportNamespace(rb) {
|
|
|
14478
15859
|
patchAdminSupportTicketsById,
|
|
14479
15860
|
{
|
|
14480
15861
|
path: { id },
|
|
14481
|
-
body: { data: { type: "
|
|
15862
|
+
body: { data: { type: "support-ticket", id, attributes } }
|
|
14482
15863
|
},
|
|
14483
15864
|
options
|
|
14484
15865
|
);
|
|
@@ -14489,7 +15870,7 @@ function createSupportNamespace(rb) {
|
|
|
14489
15870
|
patchAdminSupportTicketsByIdAssign,
|
|
14490
15871
|
{
|
|
14491
15872
|
path: { id },
|
|
14492
|
-
body: { data: { type: "
|
|
15873
|
+
body: { data: { type: "support-ticket", id, attributes } }
|
|
14493
15874
|
},
|
|
14494
15875
|
options
|
|
14495
15876
|
);
|
|
@@ -14500,7 +15881,7 @@ function createSupportNamespace(rb) {
|
|
|
14500
15881
|
patchAdminSupportTicketsByIdResolve,
|
|
14501
15882
|
{
|
|
14502
15883
|
path: { id },
|
|
14503
|
-
body: { data: { type: "
|
|
15884
|
+
body: { data: { type: "support-ticket", id, attributes } }
|
|
14504
15885
|
},
|
|
14505
15886
|
options
|
|
14506
15887
|
);
|
|
@@ -14511,7 +15892,7 @@ function createSupportNamespace(rb) {
|
|
|
14511
15892
|
patchAdminSupportTicketsByIdClose,
|
|
14512
15893
|
{
|
|
14513
15894
|
path: { id },
|
|
14514
|
-
body: { data: { type: "
|
|
15895
|
+
body: { data: { type: "support-ticket", id, attributes } }
|
|
14515
15896
|
},
|
|
14516
15897
|
options
|
|
14517
15898
|
);
|
|
@@ -14522,7 +15903,7 @@ function createSupportNamespace(rb) {
|
|
|
14522
15903
|
patchAdminSupportTicketsByIdReopen,
|
|
14523
15904
|
{
|
|
14524
15905
|
path: { id },
|
|
14525
|
-
body: { data: { type: "
|
|
15906
|
+
body: { data: { type: "support-ticket", id, attributes } }
|
|
14526
15907
|
},
|
|
14527
15908
|
options
|
|
14528
15909
|
);
|
|
@@ -14533,7 +15914,7 @@ function createSupportNamespace(rb) {
|
|
|
14533
15914
|
patchAdminSupportTicketsByIdMerge,
|
|
14534
15915
|
{
|
|
14535
15916
|
path: { id },
|
|
14536
|
-
body: { data: { type: "
|
|
15917
|
+
body: { data: { type: "support-ticket", id, attributes } }
|
|
14537
15918
|
},
|
|
14538
15919
|
options
|
|
14539
15920
|
);
|
|
@@ -14561,7 +15942,7 @@ function createSupportNamespace(rb) {
|
|
|
14561
15942
|
create: async (attributes, options) => {
|
|
14562
15943
|
return rb.execute(
|
|
14563
15944
|
postAdminSupportTicketMessages,
|
|
14564
|
-
{ body: { data: { type: "
|
|
15945
|
+
{ body: { data: { type: "support-ticket-message", attributes } } },
|
|
14565
15946
|
options
|
|
14566
15947
|
);
|
|
14567
15948
|
}
|
|
@@ -14580,7 +15961,7 @@ function createSupportNamespace(rb) {
|
|
|
14580
15961
|
create: async (attributes, options) => {
|
|
14581
15962
|
return rb.execute(
|
|
14582
15963
|
postAdminSupportTicketAttachments,
|
|
14583
|
-
{ body: { data: { type: "
|
|
15964
|
+
{ body: { data: { type: "support-ticket-attachment", attributes } } },
|
|
14584
15965
|
options
|
|
14585
15966
|
);
|
|
14586
15967
|
}
|
|
@@ -14591,7 +15972,7 @@ function createSupportNamespace(rb) {
|
|
|
14591
15972
|
create: async (attributes, options) => {
|
|
14592
15973
|
return rb.execute(
|
|
14593
15974
|
postAdminSupportTicketRatings,
|
|
14594
|
-
{ body: { data: { type: "
|
|
15975
|
+
{ body: { data: { type: "support-ticket-rating", attributes } } },
|
|
14595
15976
|
options
|
|
14596
15977
|
);
|
|
14597
15978
|
}
|
|
@@ -14610,7 +15991,7 @@ function createSupportNamespace(rb) {
|
|
|
14610
15991
|
create: async (attributes, options) => {
|
|
14611
15992
|
return rb.execute(
|
|
14612
15993
|
postAdminSupportTags,
|
|
14613
|
-
{ body: { data: { type: "
|
|
15994
|
+
{ body: { data: { type: "support-tag", attributes } } },
|
|
14614
15995
|
options
|
|
14615
15996
|
);
|
|
14616
15997
|
},
|
|
@@ -14641,7 +16022,7 @@ function createSupportNamespace(rb) {
|
|
|
14641
16022
|
create: async (attributes, options) => {
|
|
14642
16023
|
return rb.execute(
|
|
14643
16024
|
postAdminSupportQueues,
|
|
14644
|
-
{ body: { data: { type: "
|
|
16025
|
+
{ body: { data: { type: "support-queue", attributes } } },
|
|
14645
16026
|
options
|
|
14646
16027
|
);
|
|
14647
16028
|
},
|
|
@@ -14651,7 +16032,7 @@ function createSupportNamespace(rb) {
|
|
|
14651
16032
|
patchAdminSupportQueuesById,
|
|
14652
16033
|
{
|
|
14653
16034
|
path: { id },
|
|
14654
|
-
body: { data: { type: "
|
|
16035
|
+
body: { data: { type: "support-queue", id, attributes } }
|
|
14655
16036
|
},
|
|
14656
16037
|
options
|
|
14657
16038
|
);
|
|
@@ -14687,7 +16068,7 @@ function createSupportNamespace(rb) {
|
|
|
14687
16068
|
create: async (attributes, options) => {
|
|
14688
16069
|
return rb.execute(
|
|
14689
16070
|
postAdminSupportQueueMembers,
|
|
14690
|
-
{ body: { data: { type: "
|
|
16071
|
+
{ body: { data: { type: "support-queue-member", attributes } } },
|
|
14691
16072
|
options
|
|
14692
16073
|
);
|
|
14693
16074
|
},
|
|
@@ -14697,7 +16078,7 @@ function createSupportNamespace(rb) {
|
|
|
14697
16078
|
patchAdminSupportQueueMembersById,
|
|
14698
16079
|
{
|
|
14699
16080
|
path: { id },
|
|
14700
|
-
body: { data: { type: "
|
|
16081
|
+
body: { data: { type: "support-queue-member", id, attributes } }
|
|
14701
16082
|
},
|
|
14702
16083
|
options
|
|
14703
16084
|
);
|
|
@@ -14733,7 +16114,7 @@ function createSupportNamespace(rb) {
|
|
|
14733
16114
|
create: async (attributes, options) => {
|
|
14734
16115
|
return rb.execute(
|
|
14735
16116
|
postAdminSupportRoutingRules,
|
|
14736
|
-
{ body: { data: { type: "
|
|
16117
|
+
{ body: { data: { type: "support-routing-rule", attributes } } },
|
|
14737
16118
|
options
|
|
14738
16119
|
);
|
|
14739
16120
|
},
|
|
@@ -14743,7 +16124,7 @@ function createSupportNamespace(rb) {
|
|
|
14743
16124
|
patchAdminSupportRoutingRulesById,
|
|
14744
16125
|
{
|
|
14745
16126
|
path: { id },
|
|
14746
|
-
body: { data: { type: "
|
|
16127
|
+
body: { data: { type: "support-routing-rule", id, attributes } }
|
|
14747
16128
|
},
|
|
14748
16129
|
options
|
|
14749
16130
|
);
|
|
@@ -14779,7 +16160,7 @@ function createSupportNamespace(rb) {
|
|
|
14779
16160
|
create: async (attributes, options) => {
|
|
14780
16161
|
return rb.execute(
|
|
14781
16162
|
postAdminSupportSlaPolicies,
|
|
14782
|
-
{ body: { data: { type: "
|
|
16163
|
+
{ body: { data: { type: "support-sla-policy", attributes } } },
|
|
14783
16164
|
options
|
|
14784
16165
|
);
|
|
14785
16166
|
},
|
|
@@ -14789,7 +16170,7 @@ function createSupportNamespace(rb) {
|
|
|
14789
16170
|
patchAdminSupportSlaPoliciesById,
|
|
14790
16171
|
{
|
|
14791
16172
|
path: { id },
|
|
14792
|
-
body: { data: { type: "
|
|
16173
|
+
body: { data: { type: "support-sla-policy", id, attributes } }
|
|
14793
16174
|
},
|
|
14794
16175
|
options
|
|
14795
16176
|
);
|
|
@@ -14817,7 +16198,7 @@ function createSupportNamespace(rb) {
|
|
|
14817
16198
|
upsert: async (attributes, options) => {
|
|
14818
16199
|
return rb.execute(
|
|
14819
16200
|
postAdminSupportAiConfigs,
|
|
14820
|
-
{ body: { data: { type: "
|
|
16201
|
+
{ body: { data: { type: "support-ai-config", attributes } } },
|
|
14821
16202
|
options
|
|
14822
16203
|
);
|
|
14823
16204
|
}
|
|
@@ -14838,7 +16219,7 @@ function createSupportNamespace(rb) {
|
|
|
14838
16219
|
postAdminSupportChannelCaptureConfigs,
|
|
14839
16220
|
{
|
|
14840
16221
|
body: {
|
|
14841
|
-
data: { type: "
|
|
16222
|
+
data: { type: "support-channel-capture-config", attributes }
|
|
14842
16223
|
}
|
|
14843
16224
|
},
|
|
14844
16225
|
options
|
|
@@ -14859,7 +16240,7 @@ function createSupportNamespace(rb) {
|
|
|
14859
16240
|
create: async (attributes, options) => {
|
|
14860
16241
|
return rb.execute(
|
|
14861
16242
|
postAdminSupportSyncConfigs,
|
|
14862
|
-
{ body: { data: { type: "
|
|
16243
|
+
{ body: { data: { type: "support-sync-config", attributes } } },
|
|
14863
16244
|
options
|
|
14864
16245
|
);
|
|
14865
16246
|
},
|
|
@@ -14869,7 +16250,7 @@ function createSupportNamespace(rb) {
|
|
|
14869
16250
|
patchAdminSupportSyncConfigsById,
|
|
14870
16251
|
{
|
|
14871
16252
|
path: { id },
|
|
14872
|
-
body: { data: { type: "
|
|
16253
|
+
body: { data: { type: "support-sync-config", id, attributes } }
|
|
14873
16254
|
},
|
|
14874
16255
|
options
|
|
14875
16256
|
);
|
|
@@ -14897,7 +16278,7 @@ function createSupportNamespace(rb) {
|
|
|
14897
16278
|
create: async (attributes, options) => {
|
|
14898
16279
|
return rb.execute(
|
|
14899
16280
|
postAdminSupportCannedResponses,
|
|
14900
|
-
{ body: { data: { type: "
|
|
16281
|
+
{ body: { data: { type: "support-canned-response", attributes } } },
|
|
14901
16282
|
options
|
|
14902
16283
|
);
|
|
14903
16284
|
},
|
|
@@ -14907,7 +16288,7 @@ function createSupportNamespace(rb) {
|
|
|
14907
16288
|
patchAdminSupportCannedResponsesById,
|
|
14908
16289
|
{
|
|
14909
16290
|
path: { id },
|
|
14910
|
-
body: { data: { type: "
|
|
16291
|
+
body: { data: { type: "support-canned-response", id, attributes } }
|
|
14911
16292
|
},
|
|
14912
16293
|
options
|
|
14913
16294
|
);
|
|
@@ -15359,7 +16740,7 @@ function createComplianceNamespace(rb) {
|
|
|
15359
16740
|
create: async (attributes, options) => {
|
|
15360
16741
|
return rb.execute(
|
|
15361
16742
|
postAdminLegalDocuments,
|
|
15362
|
-
{ body: { data: { type: "
|
|
16743
|
+
{ body: { data: { type: "legal-document", attributes } } },
|
|
15363
16744
|
options
|
|
15364
16745
|
);
|
|
15365
16746
|
},
|
|
@@ -15383,7 +16764,7 @@ function createComplianceNamespace(rb) {
|
|
|
15383
16764
|
patchAdminLegalDocumentsById,
|
|
15384
16765
|
{
|
|
15385
16766
|
path: { id },
|
|
15386
|
-
body: { data: { type: "
|
|
16767
|
+
body: { data: { type: "legal-document", id, attributes } }
|
|
15387
16768
|
},
|
|
15388
16769
|
options
|
|
15389
16770
|
);
|
|
@@ -15461,7 +16842,7 @@ function createComplianceNamespace(rb) {
|
|
|
15461
16842
|
patchAdminLegalDocumentsByIdPublish,
|
|
15462
16843
|
{
|
|
15463
16844
|
path: { id },
|
|
15464
|
-
body: { data: { type: "
|
|
16845
|
+
body: { data: { type: "legal-document", id, attributes: {} } }
|
|
15465
16846
|
},
|
|
15466
16847
|
options
|
|
15467
16848
|
);
|
|
@@ -15483,7 +16864,7 @@ function createComplianceNamespace(rb) {
|
|
|
15483
16864
|
patchAdminLegalDocumentsByIdUnpublish,
|
|
15484
16865
|
{
|
|
15485
16866
|
path: { id },
|
|
15486
|
-
body: { data: { type: "
|
|
16867
|
+
body: { data: { type: "legal-document", id, attributes: {} } }
|
|
15487
16868
|
},
|
|
15488
16869
|
options
|
|
15489
16870
|
);
|
|
@@ -15685,7 +17066,7 @@ function createPipelineExecutionsNamespace(rb) {
|
|
|
15685
17066
|
{
|
|
15686
17067
|
path: { id },
|
|
15687
17068
|
body: {
|
|
15688
|
-
data: { type: "
|
|
17069
|
+
data: { type: "pipeline-execution", id, attributes: {} }
|
|
15689
17070
|
}
|
|
15690
17071
|
},
|
|
15691
17072
|
options
|
|
@@ -15704,7 +17085,7 @@ function createPipelineExecutionsNamespace(rb) {
|
|
|
15704
17085
|
{
|
|
15705
17086
|
path: { id },
|
|
15706
17087
|
body: {
|
|
15707
|
-
data: { type: "
|
|
17088
|
+
data: { type: "pipeline-execution", id, attributes: {} }
|
|
15708
17089
|
}
|
|
15709
17090
|
},
|
|
15710
17091
|
options
|
|
@@ -15725,7 +17106,7 @@ function createPipelineExecutionsNamespace(rb) {
|
|
|
15725
17106
|
{
|
|
15726
17107
|
path: { id },
|
|
15727
17108
|
body: {
|
|
15728
|
-
data: { type: "
|
|
17109
|
+
data: { type: "pipeline-execution", id, attributes }
|
|
15729
17110
|
}
|
|
15730
17111
|
},
|
|
15731
17112
|
options
|
|
@@ -15746,7 +17127,7 @@ function createPipelineExecutionsNamespace(rb) {
|
|
|
15746
17127
|
path: { id },
|
|
15747
17128
|
body: {
|
|
15748
17129
|
data: {
|
|
15749
|
-
type: "
|
|
17130
|
+
type: "pipeline-execution",
|
|
15750
17131
|
id,
|
|
15751
17132
|
attributes: { checkpoint_notes: note }
|
|
15752
17133
|
}
|
|
@@ -15771,7 +17152,7 @@ function createPipelineExecutionsNamespace(rb) {
|
|
|
15771
17152
|
path: { id },
|
|
15772
17153
|
body: {
|
|
15773
17154
|
data: {
|
|
15774
|
-
type: "
|
|
17155
|
+
type: "pipeline-execution",
|
|
15775
17156
|
id,
|
|
15776
17157
|
attributes: { node_id: nodeId, instruction }
|
|
15777
17158
|
}
|
|
@@ -16599,10 +17980,13 @@ function createThreadsNamespace(rb) {
|
|
|
16599
17980
|
* const fork = await admin.threads.fork('thr_01HXYZ...');
|
|
16600
17981
|
* ```
|
|
16601
17982
|
*/
|
|
16602
|
-
fork: async (id, options) => {
|
|
17983
|
+
fork: async (id, title, options) => {
|
|
16603
17984
|
return rb.execute(
|
|
16604
17985
|
postAdminThreadsByIdFork,
|
|
16605
|
-
{
|
|
17986
|
+
{
|
|
17987
|
+
path: { id },
|
|
17988
|
+
body: title ? { data: { type: "chat-thread", attributes: { title } } } : {}
|
|
17989
|
+
},
|
|
16606
17990
|
options
|
|
16607
17991
|
);
|
|
16608
17992
|
},
|
|
@@ -16686,7 +18070,7 @@ function createThreadsNamespace(rb) {
|
|
|
16686
18070
|
);
|
|
16687
18071
|
},
|
|
16688
18072
|
/**
|
|
16689
|
-
* Sub-namespace for
|
|
18073
|
+
* Sub-namespace for managing messages within a thread.
|
|
16690
18074
|
*/
|
|
16691
18075
|
messages: {
|
|
16692
18076
|
/**
|
|
@@ -16708,6 +18092,36 @@ function createThreadsNamespace(rb) {
|
|
|
16708
18092
|
{ path: { id: threadId } },
|
|
16709
18093
|
options
|
|
16710
18094
|
);
|
|
18095
|
+
},
|
|
18096
|
+
/**
|
|
18097
|
+
* Sends a message to a thread and triggers AI processing.
|
|
18098
|
+
*
|
|
18099
|
+
* @param threadId - The UUID of the thread.
|
|
18100
|
+
* @param content - The message content to send.
|
|
18101
|
+
* @param attributes - Optional extra attributes (role, metadata, attachments).
|
|
18102
|
+
* @param options - Optional request options.
|
|
18103
|
+
* @returns A promise resolving to the thread with the AI response.
|
|
18104
|
+
*
|
|
18105
|
+
* @example
|
|
18106
|
+
* ```typescript
|
|
18107
|
+
* const admin = new GptAdmin({ apiKey: 'sk_srv_...' });
|
|
18108
|
+
* const result = await admin.threads.messages.send('thr_01HXYZ...', 'Analyze this data');
|
|
18109
|
+
* ```
|
|
18110
|
+
*/
|
|
18111
|
+
send: async (threadId, content, attributes, options) => {
|
|
18112
|
+
return rb.execute(
|
|
18113
|
+
postAdminThreadsByIdMessages,
|
|
18114
|
+
{
|
|
18115
|
+
path: { id: threadId },
|
|
18116
|
+
body: {
|
|
18117
|
+
data: {
|
|
18118
|
+
type: "chat-thread",
|
|
18119
|
+
attributes: { content, ...attributes }
|
|
18120
|
+
}
|
|
18121
|
+
}
|
|
18122
|
+
},
|
|
18123
|
+
options
|
|
18124
|
+
);
|
|
16711
18125
|
}
|
|
16712
18126
|
}
|
|
16713
18127
|
};
|
|
@@ -19116,7 +20530,7 @@ function createBrandIdentitiesNamespace(rb) {
|
|
|
19116
20530
|
create: async (attributes, options) => {
|
|
19117
20531
|
return rb.execute(
|
|
19118
20532
|
postAdminBrandIdentities,
|
|
19119
|
-
{ body: { data: { type: "
|
|
20533
|
+
{ body: { data: { type: "brand-identity", attributes } } },
|
|
19120
20534
|
options
|
|
19121
20535
|
);
|
|
19122
20536
|
},
|
|
@@ -19140,7 +20554,7 @@ function createBrandIdentitiesNamespace(rb) {
|
|
|
19140
20554
|
patchAdminBrandIdentitiesById,
|
|
19141
20555
|
{
|
|
19142
20556
|
path: { id },
|
|
19143
|
-
body: { data: { id, type: "
|
|
20557
|
+
body: { data: { id, type: "brand-identity", attributes } }
|
|
19144
20558
|
},
|
|
19145
20559
|
options
|
|
19146
20560
|
);
|
|
@@ -19257,7 +20671,7 @@ function createBrandIdentitiesNamespace(rb) {
|
|
|
19257
20671
|
patchAdminBrandIdentitiesByIdSetDefault,
|
|
19258
20672
|
{
|
|
19259
20673
|
path: { id },
|
|
19260
|
-
body: { data: { id, type: "
|
|
20674
|
+
body: { data: { id, type: "brand-identity", attributes: {} } }
|
|
19261
20675
|
},
|
|
19262
20676
|
options
|
|
19263
20677
|
);
|
|
@@ -19279,7 +20693,7 @@ function createBrandIdentitiesNamespace(rb) {
|
|
|
19279
20693
|
patchAdminBrandIdentitiesByIdUnsetDefault,
|
|
19280
20694
|
{
|
|
19281
20695
|
path: { id },
|
|
19282
|
-
body: { data: { id, type: "
|
|
20696
|
+
body: { data: { id, type: "brand-identity", attributes: {} } }
|
|
19283
20697
|
},
|
|
19284
20698
|
options
|
|
19285
20699
|
);
|
|
@@ -19341,7 +20755,7 @@ function createPlatformTonesNamespace(rb) {
|
|
|
19341
20755
|
create: async (attributes, options) => {
|
|
19342
20756
|
return rb.execute(
|
|
19343
20757
|
postAdminPlatformTones,
|
|
19344
|
-
{ body: { data: { type: "
|
|
20758
|
+
{ body: { data: { type: "platform-tone", attributes } } },
|
|
19345
20759
|
options
|
|
19346
20760
|
);
|
|
19347
20761
|
},
|
|
@@ -19365,7 +20779,7 @@ function createPlatformTonesNamespace(rb) {
|
|
|
19365
20779
|
patchAdminPlatformTonesById,
|
|
19366
20780
|
{
|
|
19367
20781
|
path: { id },
|
|
19368
|
-
body: { data: { id, type: "
|
|
20782
|
+
body: { data: { id, type: "platform-tone", attributes } }
|
|
19369
20783
|
},
|
|
19370
20784
|
options
|
|
19371
20785
|
);
|
|
@@ -19412,11 +20826,23 @@ function createPlatformTonesNamespace(rb) {
|
|
|
19412
20826
|
}
|
|
19413
20827
|
|
|
19414
20828
|
// src/namespaces/channels.ts
|
|
20829
|
+
function mapResponse(raw) {
|
|
20830
|
+
return {
|
|
20831
|
+
channelToken: raw.channel_token,
|
|
20832
|
+
expiresAt: raw.expires_at,
|
|
20833
|
+
channels: raw.channels,
|
|
20834
|
+
workspaceId: raw.workspace_id
|
|
20835
|
+
};
|
|
20836
|
+
}
|
|
19415
20837
|
function createChannelsNamespace(rb) {
|
|
19416
20838
|
return {
|
|
19417
20839
|
/**
|
|
19418
20840
|
* Exchange the current bearer token for a scoped channel token.
|
|
19419
20841
|
*
|
|
20842
|
+
* **Important:** This endpoint requires user context (Bearer token from a
|
|
20843
|
+
* `sk_tenant_` key). Server keys (`sk_srv_`, `sk_sys_`) are explicitly
|
|
20844
|
+
* rejected — channel tokens are scoped to end-user sessions.
|
|
20845
|
+
*
|
|
19420
20846
|
* @param request - Workspace and channel scope
|
|
19421
20847
|
* @param options - Request options (signal, etc.)
|
|
19422
20848
|
* @returns Channel token response
|
|
@@ -19430,12 +20856,7 @@ function createChannelsNamespace(rb) {
|
|
|
19430
20856
|
},
|
|
19431
20857
|
options
|
|
19432
20858
|
);
|
|
19433
|
-
return
|
|
19434
|
-
channelToken: raw.channel_token,
|
|
19435
|
-
expiresAt: raw.expires_at,
|
|
19436
|
-
channels: raw.channels,
|
|
19437
|
-
workspaceId: raw.workspace_id
|
|
19438
|
-
};
|
|
20859
|
+
return mapResponse(raw);
|
|
19439
20860
|
}
|
|
19440
20861
|
};
|
|
19441
20862
|
}
|
|
@@ -19627,6 +21048,7 @@ export {
|
|
|
19627
21048
|
ServerError,
|
|
19628
21049
|
TimeoutError,
|
|
19629
21050
|
ValidationError,
|
|
21051
|
+
createChannelsNamespace,
|
|
19630
21052
|
createImportsNamespace,
|
|
19631
21053
|
index_default as default,
|
|
19632
21054
|
handleApiError
|