@gpt-platform/admin 0.5.1 → 0.6.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 +3980 -2302
- package/dist/index.d.ts +3980 -2302
- package/dist/index.js +560 -179
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +560 -179
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -853,8 +853,8 @@ var createClient = (config = {}) => {
|
|
|
853
853
|
};
|
|
854
854
|
|
|
855
855
|
// src/version.ts
|
|
856
|
-
var SDK_VERSION = "0.
|
|
857
|
-
var DEFAULT_API_VERSION = "2026-
|
|
856
|
+
var SDK_VERSION = "0.6.0";
|
|
857
|
+
var DEFAULT_API_VERSION = "2026-03-09";
|
|
858
858
|
|
|
859
859
|
// src/base-client.ts
|
|
860
860
|
function isSecureUrl(url) {
|
|
@@ -1945,6 +1945,15 @@ var patchAdminExtractionDocumentsByIdReprocess = (options) => (options.client ??
|
|
|
1945
1945
|
...options.headers
|
|
1946
1946
|
}
|
|
1947
1947
|
});
|
|
1948
|
+
var postAdminCrmSyncConfigs = (options) => (options.client ?? client).post({
|
|
1949
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1950
|
+
url: "/admin/crm/sync-configs",
|
|
1951
|
+
...options,
|
|
1952
|
+
headers: {
|
|
1953
|
+
"Content-Type": "application/vnd.api+json",
|
|
1954
|
+
...options.headers
|
|
1955
|
+
}
|
|
1956
|
+
});
|
|
1948
1957
|
var patchAdminStorageRecommendationsByIdDismiss = (options) => (options.client ?? client).patch({
|
|
1949
1958
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1950
1959
|
url: "/admin/storage-recommendations/{id}/dismiss",
|
|
@@ -2144,15 +2153,6 @@ var patchAdminStorageFilesByIdRestore = (options) => (options.client ?? client).
|
|
|
2144
2153
|
...options.headers
|
|
2145
2154
|
}
|
|
2146
2155
|
});
|
|
2147
|
-
var postAdminAgentsPredict = (options) => (options.client ?? client).post({
|
|
2148
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
2149
|
-
url: "/admin/agents/predict",
|
|
2150
|
-
...options,
|
|
2151
|
-
headers: {
|
|
2152
|
-
"Content-Type": "application/vnd.api+json",
|
|
2153
|
-
...options.headers
|
|
2154
|
-
}
|
|
2155
|
-
});
|
|
2156
2156
|
var patchAdminCrawlerSchedulesByIdDisable = (options) => (options.client ?? client).patch({
|
|
2157
2157
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2158
2158
|
url: "/admin/crawler/schedules/{id}/disable",
|
|
@@ -2303,6 +2303,20 @@ var postAdminCrawlerJobs = (options) => (options.client ?? client).post({
|
|
|
2303
2303
|
...options.headers
|
|
2304
2304
|
}
|
|
2305
2305
|
});
|
|
2306
|
+
var getAdminPipelines = (options) => (options.client ?? client).get({
|
|
2307
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2308
|
+
url: "/admin/pipelines",
|
|
2309
|
+
...options
|
|
2310
|
+
});
|
|
2311
|
+
var postAdminPipelines = (options) => (options.client ?? client).post({
|
|
2312
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2313
|
+
url: "/admin/pipelines",
|
|
2314
|
+
...options,
|
|
2315
|
+
headers: {
|
|
2316
|
+
"Content-Type": "application/vnd.api+json",
|
|
2317
|
+
...options.headers
|
|
2318
|
+
}
|
|
2319
|
+
});
|
|
2306
2320
|
var deleteAdminCrmContactsById = (options) => (options.client ?? client).delete({
|
|
2307
2321
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2308
2322
|
url: "/admin/crm/contacts/{id}",
|
|
@@ -2458,25 +2472,6 @@ var patchAdminSocialAccountsByIdEnablePosting = (options) => (options.client ??
|
|
|
2458
2472
|
...options.headers
|
|
2459
2473
|
}
|
|
2460
2474
|
});
|
|
2461
|
-
var deleteAdminIsvCrmFieldDefinitionsById = (options) => (options.client ?? client).delete({
|
|
2462
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
2463
|
-
url: "/admin/isv/crm/field-definitions/{id}",
|
|
2464
|
-
...options
|
|
2465
|
-
});
|
|
2466
|
-
var getAdminIsvCrmFieldDefinitionsById = (options) => (options.client ?? client).get({
|
|
2467
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
2468
|
-
url: "/admin/isv/crm/field-definitions/{id}",
|
|
2469
|
-
...options
|
|
2470
|
-
});
|
|
2471
|
-
var patchAdminIsvCrmFieldDefinitionsById = (options) => (options.client ?? client).patch({
|
|
2472
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
2473
|
-
url: "/admin/isv/crm/field-definitions/{id}",
|
|
2474
|
-
...options,
|
|
2475
|
-
headers: {
|
|
2476
|
-
"Content-Type": "application/vnd.api+json",
|
|
2477
|
-
...options.headers
|
|
2478
|
-
}
|
|
2479
|
-
});
|
|
2480
2475
|
var postAdminEmailMarketingCampaigns = (options) => (options.client ?? client).post({
|
|
2481
2476
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2482
2477
|
url: "/admin/email-marketing/campaigns",
|
|
@@ -2773,6 +2768,11 @@ var getAdminCrmDealsWorkspaceByWorkspaceId = (options) => (options.client ?? cli
|
|
|
2773
2768
|
url: "/admin/crm/deals/workspace/{workspace_id}",
|
|
2774
2769
|
...options
|
|
2775
2770
|
});
|
|
2771
|
+
var getAdminCrmFieldDefinitionsEntityTypeByEntityType = (options) => (options.client ?? client).get({
|
|
2772
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2773
|
+
url: "/admin/crm/field-definitions/entity-type/{entity_type}",
|
|
2774
|
+
...options
|
|
2775
|
+
});
|
|
2776
2776
|
var getAdminSchedulingEventTypesById = (options) => (options.client ?? client).get({
|
|
2777
2777
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2778
2778
|
url: "/admin/scheduling/event-types/{id}",
|
|
@@ -2891,15 +2891,6 @@ var getAdminExtractionDocumentsWorkspaceByWorkspaceIdByStatusByStatus = (options
|
|
|
2891
2891
|
url: "/admin/extraction/documents/workspace/{workspace_id}/by-status/{status}",
|
|
2892
2892
|
...options
|
|
2893
2893
|
});
|
|
2894
|
-
var postAdminIsvCrmSyncConfigs = (options) => (options.client ?? client).post({
|
|
2895
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
2896
|
-
url: "/admin/isv/crm/sync-configs",
|
|
2897
|
-
...options,
|
|
2898
|
-
headers: {
|
|
2899
|
-
"Content-Type": "application/vnd.api+json",
|
|
2900
|
-
...options.headers
|
|
2901
|
-
}
|
|
2902
|
-
});
|
|
2903
2894
|
var getAdminIsvCrmEntityTypesApplicationByApplicationId = (options) => (options.client ?? client).get({
|
|
2904
2895
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2905
2896
|
url: "/admin/isv/crm/entity-types/application/{application_id}",
|
|
@@ -3111,6 +3102,11 @@ var getAdminSocialMetricsPostBySocialPostIdLatest = (options) => (options.client
|
|
|
3111
3102
|
url: "/admin/social/metrics/post/{social_post_id}/latest",
|
|
3112
3103
|
...options
|
|
3113
3104
|
});
|
|
3105
|
+
var getAdminCrmSyncConfigsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
3106
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3107
|
+
url: "/admin/crm/sync-configs/workspace/{workspace_id}",
|
|
3108
|
+
...options
|
|
3109
|
+
});
|
|
3114
3110
|
var postAdminEmailOutboundEmails = (options) => (options.client ?? client).post({
|
|
3115
3111
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3116
3112
|
url: "/admin/email/outbound-emails",
|
|
@@ -3365,11 +3361,6 @@ var getAdminSupportTicketAttachmentsMessageByTicketMessageId = (options) => (opt
|
|
|
3365
3361
|
url: "/admin/support/ticket-attachments/message/{ticket_message_id}",
|
|
3366
3362
|
...options
|
|
3367
3363
|
});
|
|
3368
|
-
var getAdminIsvCrmSyncConfigsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
3369
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
3370
|
-
url: "/admin/isv/crm/sync-configs/workspace/{workspace_id}",
|
|
3371
|
-
...options
|
|
3372
|
-
});
|
|
3373
3364
|
var getAdminWebhookConfigs = (options) => (options.client ?? client).get({
|
|
3374
3365
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3375
3366
|
url: "/admin/webhook-configs",
|
|
@@ -3657,15 +3648,6 @@ var patchAdminExtractionDocumentsByIdRestore = (options) => (options.client ?? c
|
|
|
3657
3648
|
...options.headers
|
|
3658
3649
|
}
|
|
3659
3650
|
});
|
|
3660
|
-
var postAdminIsvCrmFieldDefinitions = (options) => (options.client ?? client).post({
|
|
3661
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
3662
|
-
url: "/admin/isv/crm/field-definitions",
|
|
3663
|
-
...options,
|
|
3664
|
-
headers: {
|
|
3665
|
-
"Content-Type": "application/vnd.api+json",
|
|
3666
|
-
...options.headers
|
|
3667
|
-
}
|
|
3668
|
-
});
|
|
3669
3651
|
var postAdminExtractionDocumentsUpload = (options) => (options.client ?? client).post({
|
|
3670
3652
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3671
3653
|
url: "/admin/extraction/documents/upload",
|
|
@@ -3807,6 +3789,15 @@ var postAdminAgentVersionsByIdRemoveSystemField = (options) => (options.client ?
|
|
|
3807
3789
|
...options.headers
|
|
3808
3790
|
}
|
|
3809
3791
|
});
|
|
3792
|
+
var postAdminCrmFieldDefinitions = (options) => (options.client ?? client).post({
|
|
3793
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3794
|
+
url: "/admin/crm/field-definitions",
|
|
3795
|
+
...options,
|
|
3796
|
+
headers: {
|
|
3797
|
+
"Content-Type": "application/vnd.api+json",
|
|
3798
|
+
...options.headers
|
|
3799
|
+
}
|
|
3800
|
+
});
|
|
3810
3801
|
var getAdminApiKeysStats = (options) => (options.client ?? client).get({
|
|
3811
3802
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3812
3803
|
url: "/admin/api-keys/stats",
|
|
@@ -3835,11 +3826,6 @@ var postAdminSupportRoutingRules = (options) => (options.client ?? client).post(
|
|
|
3835
3826
|
...options.headers
|
|
3836
3827
|
}
|
|
3837
3828
|
});
|
|
3838
|
-
var getAdminIsvCrmFieldDefinitionsEntityTypeByEntityType = (options) => (options.client ?? client).get({
|
|
3839
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
3840
|
-
url: "/admin/isv/crm/field-definitions/entity-type/{entity_type}",
|
|
3841
|
-
...options
|
|
3842
|
-
});
|
|
3843
3829
|
var getAdminSocialPostsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
3844
3830
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3845
3831
|
url: "/admin/social/posts/workspace/{workspace_id}",
|
|
@@ -3966,20 +3952,6 @@ var patchAdminCrmPipelineStagesById = (options) => (options.client ?? client).pa
|
|
|
3966
3952
|
...options.headers
|
|
3967
3953
|
}
|
|
3968
3954
|
});
|
|
3969
|
-
var deleteAdminIsvCrmSyncConfigsById = (options) => (options.client ?? client).delete({
|
|
3970
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
3971
|
-
url: "/admin/isv/crm/sync-configs/{id}",
|
|
3972
|
-
...options
|
|
3973
|
-
});
|
|
3974
|
-
var patchAdminIsvCrmSyncConfigsById = (options) => (options.client ?? client).patch({
|
|
3975
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
3976
|
-
url: "/admin/isv/crm/sync-configs/{id}",
|
|
3977
|
-
...options,
|
|
3978
|
-
headers: {
|
|
3979
|
-
"Content-Type": "application/vnd.api+json",
|
|
3980
|
-
...options.headers
|
|
3981
|
-
}
|
|
3982
|
-
});
|
|
3983
3955
|
var postAdminSupportAiConfigs = (options) => (options.client ?? client).post({
|
|
3984
3956
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3985
3957
|
url: "/admin/support/ai-configs",
|
|
@@ -4281,6 +4253,25 @@ var getAdminSocialMetricsAccountBySocialAccountId = (options) => (options.client
|
|
|
4281
4253
|
url: "/admin/social/metrics/account/{social_account_id}",
|
|
4282
4254
|
...options
|
|
4283
4255
|
});
|
|
4256
|
+
var deleteAdminCrmFieldDefinitionsById = (options) => (options.client ?? client).delete({
|
|
4257
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4258
|
+
url: "/admin/crm/field-definitions/{id}",
|
|
4259
|
+
...options
|
|
4260
|
+
});
|
|
4261
|
+
var getAdminCrmFieldDefinitionsById = (options) => (options.client ?? client).get({
|
|
4262
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4263
|
+
url: "/admin/crm/field-definitions/{id}",
|
|
4264
|
+
...options
|
|
4265
|
+
});
|
|
4266
|
+
var patchAdminCrmFieldDefinitionsById = (options) => (options.client ?? client).patch({
|
|
4267
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4268
|
+
url: "/admin/crm/field-definitions/{id}",
|
|
4269
|
+
...options,
|
|
4270
|
+
headers: {
|
|
4271
|
+
"Content-Type": "application/vnd.api+json",
|
|
4272
|
+
...options.headers
|
|
4273
|
+
}
|
|
4274
|
+
});
|
|
4284
4275
|
var getAdminCrmCompaniesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
4285
4276
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4286
4277
|
url: "/admin/crm/companies/workspace/{workspace_id}",
|
|
@@ -4655,6 +4646,25 @@ var postAdminAgentsByIdValidate = (options) => (options.client ?? client).post({
|
|
|
4655
4646
|
...options.headers
|
|
4656
4647
|
}
|
|
4657
4648
|
});
|
|
4649
|
+
var deleteAdminPipelinesById = (options) => (options.client ?? client).delete({
|
|
4650
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4651
|
+
url: "/admin/pipelines/{id}",
|
|
4652
|
+
...options
|
|
4653
|
+
});
|
|
4654
|
+
var getAdminPipelinesById = (options) => (options.client ?? client).get({
|
|
4655
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4656
|
+
url: "/admin/pipelines/{id}",
|
|
4657
|
+
...options
|
|
4658
|
+
});
|
|
4659
|
+
var patchAdminPipelinesById = (options) => (options.client ?? client).patch({
|
|
4660
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4661
|
+
url: "/admin/pipelines/{id}",
|
|
4662
|
+
...options,
|
|
4663
|
+
headers: {
|
|
4664
|
+
"Content-Type": "application/vnd.api+json",
|
|
4665
|
+
...options.headers
|
|
4666
|
+
}
|
|
4667
|
+
});
|
|
4658
4668
|
var deleteAdminSocialPostsById = (options) => (options.client ?? client).delete({
|
|
4659
4669
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4660
4670
|
url: "/admin/social/posts/{id}",
|
|
@@ -4706,6 +4716,20 @@ var getAdminExtractionBatchesByIdUploadUrls = (options) => (options.client ?? cl
|
|
|
4706
4716
|
url: "/admin/extraction/batches/{id}/upload-urls",
|
|
4707
4717
|
...options
|
|
4708
4718
|
});
|
|
4719
|
+
var deleteAdminCrmSyncConfigsById = (options) => (options.client ?? client).delete({
|
|
4720
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4721
|
+
url: "/admin/crm/sync-configs/{id}",
|
|
4722
|
+
...options
|
|
4723
|
+
});
|
|
4724
|
+
var patchAdminCrmSyncConfigsById = (options) => (options.client ?? client).patch({
|
|
4725
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4726
|
+
url: "/admin/crm/sync-configs/{id}",
|
|
4727
|
+
...options,
|
|
4728
|
+
headers: {
|
|
4729
|
+
"Content-Type": "application/vnd.api+json",
|
|
4730
|
+
...options.headers
|
|
4731
|
+
}
|
|
4732
|
+
});
|
|
4709
4733
|
var getAdminLlmAnalyticsCosts = (options) => (options.client ?? client).get({
|
|
4710
4734
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4711
4735
|
url: "/admin/llm-analytics/costs",
|
|
@@ -4876,31 +4900,6 @@ function createAgentsNamespace(rb) {
|
|
|
4876
4900
|
options
|
|
4877
4901
|
);
|
|
4878
4902
|
},
|
|
4879
|
-
/**
|
|
4880
|
-
* Runs prediction/inference on an agent.
|
|
4881
|
-
*
|
|
4882
|
-
* @param agentId - The UUID of the agent.
|
|
4883
|
-
* @param input - Input data for prediction.
|
|
4884
|
-
* @param options - Optional request options.
|
|
4885
|
-
* @returns Prediction result.
|
|
4886
|
-
*
|
|
4887
|
-
* @example
|
|
4888
|
-
* const result = await admin.agents.predict('agt_01...', { text: 'Classify this' });
|
|
4889
|
-
*/
|
|
4890
|
-
predict: async (agentId, input, options) => {
|
|
4891
|
-
return rb.execute(
|
|
4892
|
-
postAdminAgentsPredict,
|
|
4893
|
-
{
|
|
4894
|
-
body: {
|
|
4895
|
-
data: {
|
|
4896
|
-
type: "agent",
|
|
4897
|
-
attributes: { agent_id: agentId, ...input }
|
|
4898
|
-
}
|
|
4899
|
-
}
|
|
4900
|
-
},
|
|
4901
|
-
options
|
|
4902
|
-
);
|
|
4903
|
-
},
|
|
4904
4903
|
/**
|
|
4905
4904
|
* Runs an agent against a test input and returns the result.
|
|
4906
4905
|
*
|
|
@@ -8798,20 +8797,12 @@ function createConnectorsNamespace(rb) {
|
|
|
8798
8797
|
options
|
|
8799
8798
|
),
|
|
8800
8799
|
/** Delete a connector instance. */
|
|
8801
|
-
delete: async (id, options) => rb.executeDelete(
|
|
8802
|
-
deleteAdminConnectorsById,
|
|
8803
|
-
{ path: { id } },
|
|
8804
|
-
options
|
|
8805
|
-
)
|
|
8800
|
+
delete: async (id, options) => rb.executeDelete(deleteAdminConnectorsById, { path: { id } }, options)
|
|
8806
8801
|
},
|
|
8807
8802
|
/** Credentials — OAuth tokens and API keys. */
|
|
8808
8803
|
credentials: {
|
|
8809
8804
|
/** List all credentials. */
|
|
8810
|
-
list: async (options) => rb.execute(
|
|
8811
|
-
getAdminConnectorsCredentials,
|
|
8812
|
-
{},
|
|
8813
|
-
options
|
|
8814
|
-
),
|
|
8805
|
+
list: async (options) => rb.execute(getAdminConnectorsCredentials, {}, options),
|
|
8815
8806
|
/** Get a credential by ID. */
|
|
8816
8807
|
get: async (id, options) => rb.execute(
|
|
8817
8808
|
getAdminConnectorsCredentialsById,
|
|
@@ -10388,7 +10379,10 @@ function createCrmNamespace(rb) {
|
|
|
10388
10379
|
update: async (id, attributes, options) => {
|
|
10389
10380
|
return rb.execute(
|
|
10390
10381
|
patchAdminCrmContactsById,
|
|
10391
|
-
{
|
|
10382
|
+
{
|
|
10383
|
+
path: { id },
|
|
10384
|
+
body: { data: { type: "crm_contact", id, attributes } }
|
|
10385
|
+
},
|
|
10392
10386
|
options
|
|
10393
10387
|
);
|
|
10394
10388
|
},
|
|
@@ -10396,7 +10390,10 @@ function createCrmNamespace(rb) {
|
|
|
10396
10390
|
archive: async (id, options) => {
|
|
10397
10391
|
return rb.execute(
|
|
10398
10392
|
patchAdminCrmContactsByIdArchive,
|
|
10399
|
-
{
|
|
10393
|
+
{
|
|
10394
|
+
path: { id },
|
|
10395
|
+
body: { data: { type: "crm_contact", id, attributes: {} } }
|
|
10396
|
+
},
|
|
10400
10397
|
options
|
|
10401
10398
|
);
|
|
10402
10399
|
},
|
|
@@ -10404,7 +10401,10 @@ function createCrmNamespace(rb) {
|
|
|
10404
10401
|
unarchive: async (id, options) => {
|
|
10405
10402
|
return rb.execute(
|
|
10406
10403
|
postAdminCrmContactsByIdUnarchive,
|
|
10407
|
-
{
|
|
10404
|
+
{
|
|
10405
|
+
path: { id },
|
|
10406
|
+
body: { data: { type: "crm_contact", id, attributes: {} } }
|
|
10407
|
+
},
|
|
10408
10408
|
options
|
|
10409
10409
|
);
|
|
10410
10410
|
},
|
|
@@ -10438,13 +10438,20 @@ function createCrmNamespace(rb) {
|
|
|
10438
10438
|
update: async (id, attributes, options) => {
|
|
10439
10439
|
return rb.execute(
|
|
10440
10440
|
patchAdminCrmCompaniesById,
|
|
10441
|
-
{
|
|
10441
|
+
{
|
|
10442
|
+
path: { id },
|
|
10443
|
+
body: { data: { type: "crm_company", id, attributes } }
|
|
10444
|
+
},
|
|
10442
10445
|
options
|
|
10443
10446
|
);
|
|
10444
10447
|
},
|
|
10445
10448
|
/** Delete a company. */
|
|
10446
10449
|
delete: async (id, options) => {
|
|
10447
|
-
return rb.execute(
|
|
10450
|
+
return rb.execute(
|
|
10451
|
+
deleteAdminCrmCompaniesById,
|
|
10452
|
+
{ path: { id } },
|
|
10453
|
+
options
|
|
10454
|
+
);
|
|
10448
10455
|
}
|
|
10449
10456
|
},
|
|
10450
10457
|
// ========== Deals ==========
|
|
@@ -10473,7 +10480,10 @@ function createCrmNamespace(rb) {
|
|
|
10473
10480
|
update: async (id, attributes, options) => {
|
|
10474
10481
|
return rb.execute(
|
|
10475
10482
|
patchAdminCrmDealsById,
|
|
10476
|
-
{
|
|
10483
|
+
{
|
|
10484
|
+
path: { id },
|
|
10485
|
+
body: { data: { type: "crm_deal", id, attributes } }
|
|
10486
|
+
},
|
|
10477
10487
|
options
|
|
10478
10488
|
);
|
|
10479
10489
|
},
|
|
@@ -10481,7 +10491,10 @@ function createCrmNamespace(rb) {
|
|
|
10481
10491
|
moveStage: async (id, attributes, options) => {
|
|
10482
10492
|
return rb.execute(
|
|
10483
10493
|
patchAdminCrmDealsByIdMoveStage,
|
|
10484
|
-
{
|
|
10494
|
+
{
|
|
10495
|
+
path: { id },
|
|
10496
|
+
body: { data: { type: "crm_deal", id, attributes } }
|
|
10497
|
+
},
|
|
10485
10498
|
options
|
|
10486
10499
|
);
|
|
10487
10500
|
},
|
|
@@ -10516,13 +10529,20 @@ function createCrmNamespace(rb) {
|
|
|
10516
10529
|
update: async (id, attributes, options) => {
|
|
10517
10530
|
return rb.execute(
|
|
10518
10531
|
patchAdminCrmActivitiesById,
|
|
10519
|
-
{
|
|
10532
|
+
{
|
|
10533
|
+
path: { id },
|
|
10534
|
+
body: { data: { type: "crm_activity", id, attributes } }
|
|
10535
|
+
},
|
|
10520
10536
|
options
|
|
10521
10537
|
);
|
|
10522
10538
|
},
|
|
10523
10539
|
/** Delete an activity. */
|
|
10524
10540
|
delete: async (id, options) => {
|
|
10525
|
-
return rb.execute(
|
|
10541
|
+
return rb.execute(
|
|
10542
|
+
deleteAdminCrmActivitiesById,
|
|
10543
|
+
{ path: { id } },
|
|
10544
|
+
options
|
|
10545
|
+
);
|
|
10526
10546
|
}
|
|
10527
10547
|
},
|
|
10528
10548
|
// ========== Pipelines ==========
|
|
@@ -10551,20 +10571,31 @@ function createCrmNamespace(rb) {
|
|
|
10551
10571
|
update: async (id, attributes, options) => {
|
|
10552
10572
|
return rb.execute(
|
|
10553
10573
|
patchAdminCrmPipelinesById,
|
|
10554
|
-
{
|
|
10574
|
+
{
|
|
10575
|
+
path: { id },
|
|
10576
|
+
body: { data: { type: "crm_pipeline", id, attributes } }
|
|
10577
|
+
},
|
|
10555
10578
|
options
|
|
10556
10579
|
);
|
|
10557
10580
|
},
|
|
10558
10581
|
/** Delete a pipeline. */
|
|
10559
10582
|
delete: async (id, options) => {
|
|
10560
|
-
return rb.execute(
|
|
10583
|
+
return rb.execute(
|
|
10584
|
+
deleteAdminCrmPipelinesById,
|
|
10585
|
+
{ path: { id } },
|
|
10586
|
+
options
|
|
10587
|
+
);
|
|
10561
10588
|
}
|
|
10562
10589
|
},
|
|
10563
10590
|
// ========== Pipeline Stages ==========
|
|
10564
10591
|
pipelineStages: {
|
|
10565
10592
|
/** Get a pipeline stage by ID. */
|
|
10566
10593
|
get: async (id, options) => {
|
|
10567
|
-
return rb.execute(
|
|
10594
|
+
return rb.execute(
|
|
10595
|
+
getAdminCrmPipelineStagesById,
|
|
10596
|
+
{ path: { id } },
|
|
10597
|
+
options
|
|
10598
|
+
);
|
|
10568
10599
|
},
|
|
10569
10600
|
/** List stages for a specific pipeline. */
|
|
10570
10601
|
listByPipeline: async (pipelineId, options) => {
|
|
@@ -10586,20 +10617,31 @@ function createCrmNamespace(rb) {
|
|
|
10586
10617
|
update: async (id, attributes, options) => {
|
|
10587
10618
|
return rb.execute(
|
|
10588
10619
|
patchAdminCrmPipelineStagesById,
|
|
10589
|
-
{
|
|
10620
|
+
{
|
|
10621
|
+
path: { id },
|
|
10622
|
+
body: { data: { type: "crm_pipeline_stage", id, attributes } }
|
|
10623
|
+
},
|
|
10590
10624
|
options
|
|
10591
10625
|
);
|
|
10592
10626
|
},
|
|
10593
10627
|
/** Delete a pipeline stage. */
|
|
10594
10628
|
delete: async (id, options) => {
|
|
10595
|
-
return rb.execute(
|
|
10629
|
+
return rb.execute(
|
|
10630
|
+
deleteAdminCrmPipelineStagesById,
|
|
10631
|
+
{ path: { id } },
|
|
10632
|
+
options
|
|
10633
|
+
);
|
|
10596
10634
|
}
|
|
10597
10635
|
},
|
|
10598
10636
|
// ========== Relationships ==========
|
|
10599
10637
|
relationships: {
|
|
10600
10638
|
/** Get a relationship by ID. */
|
|
10601
10639
|
get: async (id, options) => {
|
|
10602
|
-
return rb.execute(
|
|
10640
|
+
return rb.execute(
|
|
10641
|
+
getAdminCrmRelationshipsById,
|
|
10642
|
+
{ path: { id } },
|
|
10643
|
+
options
|
|
10644
|
+
);
|
|
10603
10645
|
},
|
|
10604
10646
|
/** List relationships by workspace. */
|
|
10605
10647
|
listByWorkspace: async (workspaceId, options) => {
|
|
@@ -10619,14 +10661,22 @@ function createCrmNamespace(rb) {
|
|
|
10619
10661
|
},
|
|
10620
10662
|
/** Delete a relationship. */
|
|
10621
10663
|
delete: async (id, options) => {
|
|
10622
|
-
return rb.execute(
|
|
10664
|
+
return rb.execute(
|
|
10665
|
+
deleteAdminCrmRelationshipsById,
|
|
10666
|
+
{ path: { id } },
|
|
10667
|
+
options
|
|
10668
|
+
);
|
|
10623
10669
|
}
|
|
10624
10670
|
},
|
|
10625
10671
|
// ========== Relationship Types ==========
|
|
10626
10672
|
relationshipTypes: {
|
|
10627
10673
|
/** Get a relationship type by ID. */
|
|
10628
10674
|
get: async (id, options) => {
|
|
10629
|
-
return rb.execute(
|
|
10675
|
+
return rb.execute(
|
|
10676
|
+
getAdminCrmRelationshipTypesById,
|
|
10677
|
+
{ path: { id } },
|
|
10678
|
+
options
|
|
10679
|
+
);
|
|
10630
10680
|
},
|
|
10631
10681
|
/** List all relationship types. */
|
|
10632
10682
|
list: async (options) => {
|
|
@@ -10644,20 +10694,31 @@ function createCrmNamespace(rb) {
|
|
|
10644
10694
|
update: async (id, attributes, options) => {
|
|
10645
10695
|
return rb.execute(
|
|
10646
10696
|
patchAdminCrmRelationshipTypesById,
|
|
10647
|
-
{
|
|
10697
|
+
{
|
|
10698
|
+
path: { id },
|
|
10699
|
+
body: { data: { type: "crm_relationship_type", id, attributes } }
|
|
10700
|
+
},
|
|
10648
10701
|
options
|
|
10649
10702
|
);
|
|
10650
10703
|
},
|
|
10651
10704
|
/** Delete a relationship type. */
|
|
10652
10705
|
delete: async (id, options) => {
|
|
10653
|
-
return rb.execute(
|
|
10706
|
+
return rb.execute(
|
|
10707
|
+
deleteAdminCrmRelationshipTypesById,
|
|
10708
|
+
{ path: { id } },
|
|
10709
|
+
options
|
|
10710
|
+
);
|
|
10654
10711
|
}
|
|
10655
10712
|
},
|
|
10656
10713
|
// ========== Custom Entities ==========
|
|
10657
10714
|
customEntities: {
|
|
10658
10715
|
/** Get a custom entity by ID. */
|
|
10659
10716
|
get: async (id, options) => {
|
|
10660
|
-
return rb.execute(
|
|
10717
|
+
return rb.execute(
|
|
10718
|
+
getAdminCrmCustomEntitiesById,
|
|
10719
|
+
{ path: { id } },
|
|
10720
|
+
options
|
|
10721
|
+
);
|
|
10661
10722
|
},
|
|
10662
10723
|
/** List custom entities by workspace. */
|
|
10663
10724
|
listByWorkspace: async (workspaceId, options) => {
|
|
@@ -10679,13 +10740,20 @@ function createCrmNamespace(rb) {
|
|
|
10679
10740
|
update: async (id, attributes, options) => {
|
|
10680
10741
|
return rb.execute(
|
|
10681
10742
|
patchAdminCrmCustomEntitiesById,
|
|
10682
|
-
{
|
|
10743
|
+
{
|
|
10744
|
+
path: { id },
|
|
10745
|
+
body: { data: { type: "crm_custom_entity", id, attributes } }
|
|
10746
|
+
},
|
|
10683
10747
|
options
|
|
10684
10748
|
);
|
|
10685
10749
|
},
|
|
10686
10750
|
/** Delete a custom entity. */
|
|
10687
10751
|
delete: async (id, options) => {
|
|
10688
|
-
return rb.execute(
|
|
10752
|
+
return rb.execute(
|
|
10753
|
+
deleteAdminCrmCustomEntitiesById,
|
|
10754
|
+
{ path: { id } },
|
|
10755
|
+
options
|
|
10756
|
+
);
|
|
10689
10757
|
},
|
|
10690
10758
|
/** List versions for a custom entity. */
|
|
10691
10759
|
listVersions: async (entityId, options) => {
|
|
@@ -10712,7 +10780,11 @@ function createCrmNamespace(rb) {
|
|
|
10712
10780
|
},
|
|
10713
10781
|
/** Get a deal product by ID. */
|
|
10714
10782
|
get: async (id, options) => {
|
|
10715
|
-
return rb.execute(
|
|
10783
|
+
return rb.execute(
|
|
10784
|
+
getAdminCrmDealProductsById,
|
|
10785
|
+
{ path: { id } },
|
|
10786
|
+
options
|
|
10787
|
+
);
|
|
10716
10788
|
},
|
|
10717
10789
|
/** Create a deal product. */
|
|
10718
10790
|
create: async (attributes, options) => {
|
|
@@ -10724,7 +10796,11 @@ function createCrmNamespace(rb) {
|
|
|
10724
10796
|
},
|
|
10725
10797
|
/** Delete a deal product. */
|
|
10726
10798
|
delete: async (id, options) => {
|
|
10727
|
-
return rb.execute(
|
|
10799
|
+
return rb.execute(
|
|
10800
|
+
deleteAdminCrmDealProductsById,
|
|
10801
|
+
{ path: { id } },
|
|
10802
|
+
options
|
|
10803
|
+
);
|
|
10728
10804
|
}
|
|
10729
10805
|
},
|
|
10730
10806
|
// ========== Exports ==========
|
|
@@ -10753,7 +10829,10 @@ function createCrmNamespace(rb) {
|
|
|
10753
10829
|
refreshUrl: async (id, options) => {
|
|
10754
10830
|
return rb.execute(
|
|
10755
10831
|
patchAdminCrmExportsByIdRefreshUrl,
|
|
10756
|
-
{
|
|
10832
|
+
{
|
|
10833
|
+
path: { id },
|
|
10834
|
+
body: { data: { type: "crm_data_export_job", id, attributes: {} } }
|
|
10835
|
+
},
|
|
10757
10836
|
options
|
|
10758
10837
|
);
|
|
10759
10838
|
}
|
|
@@ -10762,7 +10841,11 @@ function createCrmNamespace(rb) {
|
|
|
10762
10841
|
entityTypes: {
|
|
10763
10842
|
/** Get an entity type by ID. */
|
|
10764
10843
|
get: async (id, options) => {
|
|
10765
|
-
return rb.execute(
|
|
10844
|
+
return rb.execute(
|
|
10845
|
+
getAdminIsvCrmEntityTypesById,
|
|
10846
|
+
{ path: { id } },
|
|
10847
|
+
options
|
|
10848
|
+
);
|
|
10766
10849
|
},
|
|
10767
10850
|
/** List entity types by application. */
|
|
10768
10851
|
listByApplication: async (applicationId, options) => {
|
|
@@ -10784,25 +10867,36 @@ function createCrmNamespace(rb) {
|
|
|
10784
10867
|
update: async (id, attributes, options) => {
|
|
10785
10868
|
return rb.execute(
|
|
10786
10869
|
patchAdminIsvCrmEntityTypesById,
|
|
10787
|
-
{
|
|
10870
|
+
{
|
|
10871
|
+
path: { id },
|
|
10872
|
+
body: { data: { type: "crm_custom_entity_type", id, attributes } }
|
|
10873
|
+
},
|
|
10788
10874
|
options
|
|
10789
10875
|
);
|
|
10790
10876
|
},
|
|
10791
10877
|
/** Delete an entity type. */
|
|
10792
10878
|
delete: async (id, options) => {
|
|
10793
|
-
return rb.execute(
|
|
10879
|
+
return rb.execute(
|
|
10880
|
+
deleteAdminIsvCrmEntityTypesById,
|
|
10881
|
+
{ path: { id } },
|
|
10882
|
+
options
|
|
10883
|
+
);
|
|
10794
10884
|
}
|
|
10795
10885
|
},
|
|
10796
10886
|
// ========== ISV: Field Definitions ==========
|
|
10797
10887
|
fieldDefinitions: {
|
|
10798
10888
|
/** Get a field definition by ID. */
|
|
10799
10889
|
get: async (id, options) => {
|
|
10800
|
-
return rb.execute(
|
|
10890
|
+
return rb.execute(
|
|
10891
|
+
getAdminCrmFieldDefinitionsById,
|
|
10892
|
+
{ path: { id } },
|
|
10893
|
+
options
|
|
10894
|
+
);
|
|
10801
10895
|
},
|
|
10802
10896
|
/** List field definitions by entity type. */
|
|
10803
10897
|
listByEntityType: async (entityType, options) => {
|
|
10804
10898
|
return rb.execute(
|
|
10805
|
-
|
|
10899
|
+
getAdminCrmFieldDefinitionsEntityTypeByEntityType,
|
|
10806
10900
|
{ path: { entity_type: entityType } },
|
|
10807
10901
|
options
|
|
10808
10902
|
);
|
|
@@ -10810,35 +10904,52 @@ function createCrmNamespace(rb) {
|
|
|
10810
10904
|
/** Create a field definition. */
|
|
10811
10905
|
create: async (attributes, options) => {
|
|
10812
10906
|
return rb.execute(
|
|
10813
|
-
|
|
10814
|
-
{
|
|
10907
|
+
postAdminCrmFieldDefinitions,
|
|
10908
|
+
{
|
|
10909
|
+
body: { data: { type: "crm_custom_field_definition", attributes } }
|
|
10910
|
+
},
|
|
10815
10911
|
options
|
|
10816
10912
|
);
|
|
10817
10913
|
},
|
|
10818
10914
|
/** Update a field definition. */
|
|
10819
10915
|
update: async (id, attributes, options) => {
|
|
10820
10916
|
return rb.execute(
|
|
10821
|
-
|
|
10822
|
-
{
|
|
10917
|
+
patchAdminCrmFieldDefinitionsById,
|
|
10918
|
+
{
|
|
10919
|
+
path: { id },
|
|
10920
|
+
body: {
|
|
10921
|
+
data: { type: "crm_custom_field_definition", id, attributes }
|
|
10922
|
+
}
|
|
10923
|
+
},
|
|
10823
10924
|
options
|
|
10824
10925
|
);
|
|
10825
10926
|
},
|
|
10826
10927
|
/** Delete a field definition. */
|
|
10827
10928
|
delete: async (id, options) => {
|
|
10828
|
-
return rb.execute(
|
|
10929
|
+
return rb.execute(
|
|
10930
|
+
deleteAdminCrmFieldDefinitionsById,
|
|
10931
|
+
{ path: { id } },
|
|
10932
|
+
options
|
|
10933
|
+
);
|
|
10829
10934
|
}
|
|
10830
10935
|
},
|
|
10831
10936
|
// ========== ISV: Channel Capture Config ==========
|
|
10832
10937
|
channelCaptureConfig: {
|
|
10833
10938
|
/** Get channel capture config by ID. */
|
|
10834
10939
|
get: async (id, options) => {
|
|
10835
|
-
return rb.execute(
|
|
10940
|
+
return rb.execute(
|
|
10941
|
+
getAdminIsvCrmChannelCaptureConfigById,
|
|
10942
|
+
{ path: { id } },
|
|
10943
|
+
options
|
|
10944
|
+
);
|
|
10836
10945
|
},
|
|
10837
10946
|
/** Create or upsert channel capture config. */
|
|
10838
10947
|
create: async (attributes, options) => {
|
|
10839
10948
|
return rb.execute(
|
|
10840
10949
|
postAdminIsvCrmChannelCaptureConfig,
|
|
10841
|
-
{
|
|
10950
|
+
{
|
|
10951
|
+
body: { data: { type: "crm_channel_capture_config", attributes } }
|
|
10952
|
+
},
|
|
10842
10953
|
options
|
|
10843
10954
|
);
|
|
10844
10955
|
},
|
|
@@ -10846,7 +10957,12 @@ function createCrmNamespace(rb) {
|
|
|
10846
10957
|
update: async (id, attributes, options) => {
|
|
10847
10958
|
return rb.execute(
|
|
10848
10959
|
patchAdminIsvCrmChannelCaptureConfigById,
|
|
10849
|
-
{
|
|
10960
|
+
{
|
|
10961
|
+
path: { id },
|
|
10962
|
+
body: {
|
|
10963
|
+
data: { type: "crm_channel_capture_config", id, attributes }
|
|
10964
|
+
}
|
|
10965
|
+
},
|
|
10850
10966
|
options
|
|
10851
10967
|
);
|
|
10852
10968
|
}
|
|
@@ -10856,7 +10972,7 @@ function createCrmNamespace(rb) {
|
|
|
10856
10972
|
/** List sync configs by workspace. */
|
|
10857
10973
|
listByWorkspace: async (workspaceId, options) => {
|
|
10858
10974
|
return rb.execute(
|
|
10859
|
-
|
|
10975
|
+
getAdminCrmSyncConfigsWorkspaceByWorkspaceId,
|
|
10860
10976
|
{ path: { workspace_id: workspaceId } },
|
|
10861
10977
|
options
|
|
10862
10978
|
);
|
|
@@ -10864,7 +10980,7 @@ function createCrmNamespace(rb) {
|
|
|
10864
10980
|
/** Create a sync config. */
|
|
10865
10981
|
create: async (attributes, options) => {
|
|
10866
10982
|
return rb.execute(
|
|
10867
|
-
|
|
10983
|
+
postAdminCrmSyncConfigs,
|
|
10868
10984
|
{ body: { data: { type: "crm_sync_config", attributes } } },
|
|
10869
10985
|
options
|
|
10870
10986
|
);
|
|
@@ -10872,14 +10988,21 @@ function createCrmNamespace(rb) {
|
|
|
10872
10988
|
/** Update a sync config. */
|
|
10873
10989
|
update: async (id, attributes, options) => {
|
|
10874
10990
|
return rb.execute(
|
|
10875
|
-
|
|
10876
|
-
{
|
|
10991
|
+
patchAdminCrmSyncConfigsById,
|
|
10992
|
+
{
|
|
10993
|
+
path: { id },
|
|
10994
|
+
body: { data: { type: "crm_sync_config", id, attributes } }
|
|
10995
|
+
},
|
|
10877
10996
|
options
|
|
10878
10997
|
);
|
|
10879
10998
|
},
|
|
10880
10999
|
/** Delete a sync config. */
|
|
10881
11000
|
delete: async (id, options) => {
|
|
10882
|
-
return rb.execute(
|
|
11001
|
+
return rb.execute(
|
|
11002
|
+
deleteAdminCrmSyncConfigsById,
|
|
11003
|
+
{ path: { id } },
|
|
11004
|
+
options
|
|
11005
|
+
);
|
|
10883
11006
|
}
|
|
10884
11007
|
}
|
|
10885
11008
|
};
|
|
@@ -10892,7 +11015,11 @@ function createSupportNamespace(rb) {
|
|
|
10892
11015
|
tickets: {
|
|
10893
11016
|
/** Get a support ticket by ID */
|
|
10894
11017
|
get: async (id, options) => {
|
|
10895
|
-
return rb.execute(
|
|
11018
|
+
return rb.execute(
|
|
11019
|
+
getAdminSupportTicketsById,
|
|
11020
|
+
{ path: { id } },
|
|
11021
|
+
options
|
|
11022
|
+
);
|
|
10896
11023
|
},
|
|
10897
11024
|
/** List tickets for a workspace */
|
|
10898
11025
|
listByWorkspace: async (workspaceId, options) => {
|
|
@@ -10914,7 +11041,10 @@ function createSupportNamespace(rb) {
|
|
|
10914
11041
|
update: async (id, attributes, options) => {
|
|
10915
11042
|
return rb.execute(
|
|
10916
11043
|
patchAdminSupportTicketsById,
|
|
10917
|
-
{
|
|
11044
|
+
{
|
|
11045
|
+
path: { id },
|
|
11046
|
+
body: { data: { type: "support_ticket", id, attributes } }
|
|
11047
|
+
},
|
|
10918
11048
|
options
|
|
10919
11049
|
);
|
|
10920
11050
|
},
|
|
@@ -10922,7 +11052,10 @@ function createSupportNamespace(rb) {
|
|
|
10922
11052
|
assign: async (id, attributes, options) => {
|
|
10923
11053
|
return rb.execute(
|
|
10924
11054
|
patchAdminSupportTicketsByIdAssign,
|
|
10925
|
-
{
|
|
11055
|
+
{
|
|
11056
|
+
path: { id },
|
|
11057
|
+
body: { data: { type: "support_ticket", id, attributes } }
|
|
11058
|
+
},
|
|
10926
11059
|
options
|
|
10927
11060
|
);
|
|
10928
11061
|
},
|
|
@@ -10930,7 +11063,10 @@ function createSupportNamespace(rb) {
|
|
|
10930
11063
|
resolve: async (id, attributes, options) => {
|
|
10931
11064
|
return rb.execute(
|
|
10932
11065
|
patchAdminSupportTicketsByIdResolve,
|
|
10933
|
-
{
|
|
11066
|
+
{
|
|
11067
|
+
path: { id },
|
|
11068
|
+
body: { data: { type: "support_ticket", id, attributes } }
|
|
11069
|
+
},
|
|
10934
11070
|
options
|
|
10935
11071
|
);
|
|
10936
11072
|
},
|
|
@@ -10938,7 +11074,10 @@ function createSupportNamespace(rb) {
|
|
|
10938
11074
|
close: async (id, attributes, options) => {
|
|
10939
11075
|
return rb.execute(
|
|
10940
11076
|
patchAdminSupportTicketsByIdClose,
|
|
10941
|
-
{
|
|
11077
|
+
{
|
|
11078
|
+
path: { id },
|
|
11079
|
+
body: { data: { type: "support_ticket", id, attributes } }
|
|
11080
|
+
},
|
|
10942
11081
|
options
|
|
10943
11082
|
);
|
|
10944
11083
|
},
|
|
@@ -10946,7 +11085,10 @@ function createSupportNamespace(rb) {
|
|
|
10946
11085
|
reopen: async (id, attributes, options) => {
|
|
10947
11086
|
return rb.execute(
|
|
10948
11087
|
patchAdminSupportTicketsByIdReopen,
|
|
10949
|
-
{
|
|
11088
|
+
{
|
|
11089
|
+
path: { id },
|
|
11090
|
+
body: { data: { type: "support_ticket", id, attributes } }
|
|
11091
|
+
},
|
|
10950
11092
|
options
|
|
10951
11093
|
);
|
|
10952
11094
|
},
|
|
@@ -10954,13 +11096,20 @@ function createSupportNamespace(rb) {
|
|
|
10954
11096
|
merge: async (id, attributes, options) => {
|
|
10955
11097
|
return rb.execute(
|
|
10956
11098
|
patchAdminSupportTicketsByIdMerge,
|
|
10957
|
-
{
|
|
11099
|
+
{
|
|
11100
|
+
path: { id },
|
|
11101
|
+
body: { data: { type: "support_ticket", id, attributes } }
|
|
11102
|
+
},
|
|
10958
11103
|
options
|
|
10959
11104
|
);
|
|
10960
11105
|
},
|
|
10961
11106
|
/** Delete a support ticket */
|
|
10962
11107
|
delete: async (id, options) => {
|
|
10963
|
-
return rb.executeDelete(
|
|
11108
|
+
return rb.executeDelete(
|
|
11109
|
+
deleteAdminSupportTicketsById,
|
|
11110
|
+
{ path: { id } },
|
|
11111
|
+
options
|
|
11112
|
+
);
|
|
10964
11113
|
}
|
|
10965
11114
|
},
|
|
10966
11115
|
// --- Messages ---
|
|
@@ -11032,7 +11181,11 @@ function createSupportNamespace(rb) {
|
|
|
11032
11181
|
},
|
|
11033
11182
|
/** Delete a tag */
|
|
11034
11183
|
delete: async (id, options) => {
|
|
11035
|
-
return rb.executeDelete(
|
|
11184
|
+
return rb.executeDelete(
|
|
11185
|
+
deleteAdminSupportTagsById,
|
|
11186
|
+
{ path: { id } },
|
|
11187
|
+
options
|
|
11188
|
+
);
|
|
11036
11189
|
}
|
|
11037
11190
|
},
|
|
11038
11191
|
// --- Queues ---
|
|
@@ -11061,13 +11214,20 @@ function createSupportNamespace(rb) {
|
|
|
11061
11214
|
update: async (id, attributes, options) => {
|
|
11062
11215
|
return rb.execute(
|
|
11063
11216
|
patchAdminSupportQueuesById,
|
|
11064
|
-
{
|
|
11217
|
+
{
|
|
11218
|
+
path: { id },
|
|
11219
|
+
body: { data: { type: "support_queue", id, attributes } }
|
|
11220
|
+
},
|
|
11065
11221
|
options
|
|
11066
11222
|
);
|
|
11067
11223
|
},
|
|
11068
11224
|
/** Delete a queue */
|
|
11069
11225
|
delete: async (id, options) => {
|
|
11070
|
-
return rb.executeDelete(
|
|
11226
|
+
return rb.executeDelete(
|
|
11227
|
+
deleteAdminSupportQueuesById,
|
|
11228
|
+
{ path: { id } },
|
|
11229
|
+
options
|
|
11230
|
+
);
|
|
11071
11231
|
}
|
|
11072
11232
|
},
|
|
11073
11233
|
// --- Queue Members ---
|
|
@@ -11100,20 +11260,31 @@ function createSupportNamespace(rb) {
|
|
|
11100
11260
|
update: async (id, attributes, options) => {
|
|
11101
11261
|
return rb.execute(
|
|
11102
11262
|
patchAdminSupportQueueMembersById,
|
|
11103
|
-
{
|
|
11263
|
+
{
|
|
11264
|
+
path: { id },
|
|
11265
|
+
body: { data: { type: "support_queue_member", id, attributes } }
|
|
11266
|
+
},
|
|
11104
11267
|
options
|
|
11105
11268
|
);
|
|
11106
11269
|
},
|
|
11107
11270
|
/** Remove a member from a queue */
|
|
11108
11271
|
delete: async (id, options) => {
|
|
11109
|
-
return rb.executeDelete(
|
|
11272
|
+
return rb.executeDelete(
|
|
11273
|
+
deleteAdminSupportQueueMembersById,
|
|
11274
|
+
{ path: { id } },
|
|
11275
|
+
options
|
|
11276
|
+
);
|
|
11110
11277
|
}
|
|
11111
11278
|
},
|
|
11112
11279
|
// --- Routing Rules ---
|
|
11113
11280
|
routingRules: {
|
|
11114
11281
|
/** Get a routing rule by ID */
|
|
11115
11282
|
get: async (id, options) => {
|
|
11116
|
-
return rb.execute(
|
|
11283
|
+
return rb.execute(
|
|
11284
|
+
getAdminSupportRoutingRulesById,
|
|
11285
|
+
{ path: { id } },
|
|
11286
|
+
options
|
|
11287
|
+
);
|
|
11117
11288
|
},
|
|
11118
11289
|
/** List routing rules for an application */
|
|
11119
11290
|
listByApplication: async (applicationId, options) => {
|
|
@@ -11135,20 +11306,31 @@ function createSupportNamespace(rb) {
|
|
|
11135
11306
|
update: async (id, attributes, options) => {
|
|
11136
11307
|
return rb.execute(
|
|
11137
11308
|
patchAdminSupportRoutingRulesById,
|
|
11138
|
-
{
|
|
11309
|
+
{
|
|
11310
|
+
path: { id },
|
|
11311
|
+
body: { data: { type: "support_routing_rule", id, attributes } }
|
|
11312
|
+
},
|
|
11139
11313
|
options
|
|
11140
11314
|
);
|
|
11141
11315
|
},
|
|
11142
11316
|
/** Delete a routing rule */
|
|
11143
11317
|
delete: async (id, options) => {
|
|
11144
|
-
return rb.executeDelete(
|
|
11318
|
+
return rb.executeDelete(
|
|
11319
|
+
deleteAdminSupportRoutingRulesById,
|
|
11320
|
+
{ path: { id } },
|
|
11321
|
+
options
|
|
11322
|
+
);
|
|
11145
11323
|
}
|
|
11146
11324
|
},
|
|
11147
11325
|
// --- SLA Policies ---
|
|
11148
11326
|
slaPolicies: {
|
|
11149
11327
|
/** Get an SLA policy by ID */
|
|
11150
11328
|
get: async (id, options) => {
|
|
11151
|
-
return rb.execute(
|
|
11329
|
+
return rb.execute(
|
|
11330
|
+
getAdminSupportSlaPoliciesById,
|
|
11331
|
+
{ path: { id } },
|
|
11332
|
+
options
|
|
11333
|
+
);
|
|
11152
11334
|
},
|
|
11153
11335
|
/** List SLA policies for an application */
|
|
11154
11336
|
listByApplication: async (applicationId, options) => {
|
|
@@ -11170,13 +11352,20 @@ function createSupportNamespace(rb) {
|
|
|
11170
11352
|
update: async (id, attributes, options) => {
|
|
11171
11353
|
return rb.execute(
|
|
11172
11354
|
patchAdminSupportSlaPoliciesById,
|
|
11173
|
-
{
|
|
11355
|
+
{
|
|
11356
|
+
path: { id },
|
|
11357
|
+
body: { data: { type: "support_sla_policy", id, attributes } }
|
|
11358
|
+
},
|
|
11174
11359
|
options
|
|
11175
11360
|
);
|
|
11176
11361
|
},
|
|
11177
11362
|
/** Delete an SLA policy */
|
|
11178
11363
|
delete: async (id, options) => {
|
|
11179
|
-
return rb.executeDelete(
|
|
11364
|
+
return rb.executeDelete(
|
|
11365
|
+
deleteAdminSupportSlaPoliciesById,
|
|
11366
|
+
{ path: { id } },
|
|
11367
|
+
options
|
|
11368
|
+
);
|
|
11180
11369
|
}
|
|
11181
11370
|
},
|
|
11182
11371
|
// --- AI Config ---
|
|
@@ -11212,7 +11401,11 @@ function createSupportNamespace(rb) {
|
|
|
11212
11401
|
upsert: async (attributes, options) => {
|
|
11213
11402
|
return rb.execute(
|
|
11214
11403
|
postAdminSupportChannelCaptureConfigs,
|
|
11215
|
-
{
|
|
11404
|
+
{
|
|
11405
|
+
body: {
|
|
11406
|
+
data: { type: "support_channel_capture_config", attributes }
|
|
11407
|
+
}
|
|
11408
|
+
},
|
|
11216
11409
|
options
|
|
11217
11410
|
);
|
|
11218
11411
|
}
|
|
@@ -11239,13 +11432,20 @@ function createSupportNamespace(rb) {
|
|
|
11239
11432
|
update: async (id, attributes, options) => {
|
|
11240
11433
|
return rb.execute(
|
|
11241
11434
|
patchAdminSupportSyncConfigsById,
|
|
11242
|
-
{
|
|
11435
|
+
{
|
|
11436
|
+
path: { id },
|
|
11437
|
+
body: { data: { type: "support_sync_config", id, attributes } }
|
|
11438
|
+
},
|
|
11243
11439
|
options
|
|
11244
11440
|
);
|
|
11245
11441
|
},
|
|
11246
11442
|
/** Delete a sync config */
|
|
11247
11443
|
delete: async (id, options) => {
|
|
11248
|
-
return rb.executeDelete(
|
|
11444
|
+
return rb.executeDelete(
|
|
11445
|
+
deleteAdminSupportSyncConfigsById,
|
|
11446
|
+
{ path: { id } },
|
|
11447
|
+
options
|
|
11448
|
+
);
|
|
11249
11449
|
}
|
|
11250
11450
|
},
|
|
11251
11451
|
// --- Canned Responses ---
|
|
@@ -11270,13 +11470,20 @@ function createSupportNamespace(rb) {
|
|
|
11270
11470
|
update: async (id, attributes, options) => {
|
|
11271
11471
|
return rb.execute(
|
|
11272
11472
|
patchAdminSupportCannedResponsesById,
|
|
11273
|
-
{
|
|
11473
|
+
{
|
|
11474
|
+
path: { id },
|
|
11475
|
+
body: { data: { type: "support_canned_response", id, attributes } }
|
|
11476
|
+
},
|
|
11274
11477
|
options
|
|
11275
11478
|
);
|
|
11276
11479
|
},
|
|
11277
11480
|
/** Delete a canned response */
|
|
11278
11481
|
delete: async (id, options) => {
|
|
11279
|
-
return rb.executeDelete(
|
|
11482
|
+
return rb.executeDelete(
|
|
11483
|
+
deleteAdminSupportCannedResponsesById,
|
|
11484
|
+
{ path: { id } },
|
|
11485
|
+
options
|
|
11486
|
+
);
|
|
11280
11487
|
}
|
|
11281
11488
|
}
|
|
11282
11489
|
};
|
|
@@ -11602,16 +11809,186 @@ function createAiNamespace(rb) {
|
|
|
11602
11809
|
* console.log('Semantic cache cleared');
|
|
11603
11810
|
*/
|
|
11604
11811
|
clear: async (options) => {
|
|
11605
|
-
return rb.execute(
|
|
11606
|
-
postAdminSysSemanticCacheClear,
|
|
11607
|
-
{},
|
|
11608
|
-
options
|
|
11609
|
-
);
|
|
11812
|
+
return rb.execute(postAdminSysSemanticCacheClear, {}, options);
|
|
11610
11813
|
}
|
|
11611
11814
|
}
|
|
11612
11815
|
};
|
|
11613
11816
|
}
|
|
11614
11817
|
|
|
11818
|
+
// src/namespaces/crm-clusters.ts
|
|
11819
|
+
function createCrmClustersNamespace(rb) {
|
|
11820
|
+
return {
|
|
11821
|
+
/**
|
|
11822
|
+
* Discovers relationship clusters in the workspace CRM using community detection.
|
|
11823
|
+
* Each cluster is automatically labeled by AI.
|
|
11824
|
+
*
|
|
11825
|
+
* @param workspaceId - The workspace ID to discover clusters for
|
|
11826
|
+
* @returns Array of discovered clusters with AI-generated labels
|
|
11827
|
+
* @example
|
|
11828
|
+
* ```typescript
|
|
11829
|
+
* const { data } = await admin.crmClusters.discover('workspace-uuid');
|
|
11830
|
+
* ```
|
|
11831
|
+
*/
|
|
11832
|
+
async discover(workspaceId) {
|
|
11833
|
+
return rb.rawGet(
|
|
11834
|
+
`/isv/crm/clusters?workspace_id=${encodeURIComponent(workspaceId)}`
|
|
11835
|
+
);
|
|
11836
|
+
}
|
|
11837
|
+
};
|
|
11838
|
+
}
|
|
11839
|
+
|
|
11840
|
+
// src/namespaces/compliance.ts
|
|
11841
|
+
function createComplianceNamespace(rb) {
|
|
11842
|
+
return {
|
|
11843
|
+
/**
|
|
11844
|
+
* Scans text for PII and PHI violations (HIPAA Safe Harbor).
|
|
11845
|
+
*
|
|
11846
|
+
* @param text - The text to scan for compliance violations
|
|
11847
|
+
* @returns Scan result with clean flag, detections, and scrubbed preview
|
|
11848
|
+
* @example
|
|
11849
|
+
* ```typescript
|
|
11850
|
+
* const result = await admin.compliance.scan('Patient DOB: 03/15/1985');
|
|
11851
|
+
* ```
|
|
11852
|
+
*/
|
|
11853
|
+
async scan(text) {
|
|
11854
|
+
return rb.rawPost("/isv/compliance/scan", { text });
|
|
11855
|
+
}
|
|
11856
|
+
};
|
|
11857
|
+
}
|
|
11858
|
+
|
|
11859
|
+
// src/namespaces/pipelines.ts
|
|
11860
|
+
var postAdminPipelinesByIdTrigger = (options) => (options.client ?? null).post({
|
|
11861
|
+
url: "/admin/pipelines/{id}/trigger",
|
|
11862
|
+
...options,
|
|
11863
|
+
headers: { "Content-Type": "application/vnd.api+json", ...options.headers }
|
|
11864
|
+
});
|
|
11865
|
+
function createPipelinesNamespace(rb) {
|
|
11866
|
+
return {
|
|
11867
|
+
/**
|
|
11868
|
+
* List all pipelines.
|
|
11869
|
+
*
|
|
11870
|
+
* @param options - Optional request options.
|
|
11871
|
+
* @returns Array of pipelines.
|
|
11872
|
+
*/
|
|
11873
|
+
async list(options) {
|
|
11874
|
+
return rb.execute(getAdminPipelines, {}, options);
|
|
11875
|
+
},
|
|
11876
|
+
/**
|
|
11877
|
+
* Get a pipeline by ID.
|
|
11878
|
+
*
|
|
11879
|
+
* @param id - Pipeline UUID.
|
|
11880
|
+
* @param options - Optional request options.
|
|
11881
|
+
* @returns Pipeline resource.
|
|
11882
|
+
*/
|
|
11883
|
+
async get(id, options) {
|
|
11884
|
+
return rb.execute(getAdminPipelinesById, { path: { id } }, options);
|
|
11885
|
+
},
|
|
11886
|
+
/**
|
|
11887
|
+
* Create a new pipeline.
|
|
11888
|
+
*
|
|
11889
|
+
* @param attributes - Pipeline configuration including node DAG.
|
|
11890
|
+
* @param options - Optional request options.
|
|
11891
|
+
* @returns Created pipeline resource.
|
|
11892
|
+
*/
|
|
11893
|
+
async create(attributes, options) {
|
|
11894
|
+
return rb.execute(
|
|
11895
|
+
postAdminPipelines,
|
|
11896
|
+
{ body: { data: { type: "pipeline", attributes } } },
|
|
11897
|
+
options
|
|
11898
|
+
);
|
|
11899
|
+
},
|
|
11900
|
+
/**
|
|
11901
|
+
* Update an existing pipeline.
|
|
11902
|
+
*
|
|
11903
|
+
* @param id - Pipeline UUID.
|
|
11904
|
+
* @param attributes - Fields to update.
|
|
11905
|
+
* @param options - Optional request options.
|
|
11906
|
+
* @returns Updated pipeline resource.
|
|
11907
|
+
*/
|
|
11908
|
+
async update(id, attributes, options) {
|
|
11909
|
+
return rb.execute(
|
|
11910
|
+
patchAdminPipelinesById,
|
|
11911
|
+
{ path: { id }, body: { data: { type: "pipeline", id, attributes } } },
|
|
11912
|
+
options
|
|
11913
|
+
);
|
|
11914
|
+
},
|
|
11915
|
+
/**
|
|
11916
|
+
* Delete a pipeline.
|
|
11917
|
+
*
|
|
11918
|
+
* @param id - Pipeline UUID.
|
|
11919
|
+
* @param options - Optional request options.
|
|
11920
|
+
*/
|
|
11921
|
+
async delete(id, options) {
|
|
11922
|
+
return rb.execute(deleteAdminPipelinesById, { path: { id } }, options);
|
|
11923
|
+
},
|
|
11924
|
+
/**
|
|
11925
|
+
* Trigger pipeline execution.
|
|
11926
|
+
*
|
|
11927
|
+
* @param id - Pipeline UUID.
|
|
11928
|
+
* @param attributes - Execution parameters including workspace_id and input.
|
|
11929
|
+
* @param options - Optional request options.
|
|
11930
|
+
* @returns Pipeline execution result map.
|
|
11931
|
+
*/
|
|
11932
|
+
async trigger(id, attributes, options) {
|
|
11933
|
+
return rb.execute(
|
|
11934
|
+
postAdminPipelinesByIdTrigger,
|
|
11935
|
+
{
|
|
11936
|
+
path: { id },
|
|
11937
|
+
body: {
|
|
11938
|
+
data: {
|
|
11939
|
+
type: "pipeline",
|
|
11940
|
+
attributes: {
|
|
11941
|
+
pipeline_id: id,
|
|
11942
|
+
...attributes
|
|
11943
|
+
}
|
|
11944
|
+
}
|
|
11945
|
+
}
|
|
11946
|
+
},
|
|
11947
|
+
options
|
|
11948
|
+
);
|
|
11949
|
+
}
|
|
11950
|
+
};
|
|
11951
|
+
}
|
|
11952
|
+
|
|
11953
|
+
// src/namespaces/tenants.ts
|
|
11954
|
+
function createTenantsNamespace(rb) {
|
|
11955
|
+
return {
|
|
11956
|
+
/**
|
|
11957
|
+
* Suspends a tenant, preventing billing charges and access.
|
|
11958
|
+
*
|
|
11959
|
+
* @param id - Tenant UUID
|
|
11960
|
+
* @param reason - Human-readable reason for suspension (required)
|
|
11961
|
+
* @returns Updated tenant id and status
|
|
11962
|
+
*/
|
|
11963
|
+
async suspend(id, reason) {
|
|
11964
|
+
return rb.rawPost(`/isv/tenants/${id}/suspend`, {
|
|
11965
|
+
reason
|
|
11966
|
+
});
|
|
11967
|
+
},
|
|
11968
|
+
/**
|
|
11969
|
+
* Restores a suspended tenant to active status.
|
|
11970
|
+
*
|
|
11971
|
+
* @param id - Tenant UUID
|
|
11972
|
+
* @returns Updated tenant id and status
|
|
11973
|
+
*/
|
|
11974
|
+
async unsuspend(id) {
|
|
11975
|
+
return rb.rawPost(
|
|
11976
|
+
`/isv/tenants/${id}/unsuspend`,
|
|
11977
|
+
{}
|
|
11978
|
+
);
|
|
11979
|
+
},
|
|
11980
|
+
/**
|
|
11981
|
+
* Permanently cancels a tenant.
|
|
11982
|
+
*
|
|
11983
|
+
* @param id - Tenant UUID
|
|
11984
|
+
* @returns Updated tenant id and status
|
|
11985
|
+
*/
|
|
11986
|
+
async cancel(id) {
|
|
11987
|
+
return rb.rawPost(`/isv/tenants/${id}/cancel`, {});
|
|
11988
|
+
}
|
|
11989
|
+
};
|
|
11990
|
+
}
|
|
11991
|
+
|
|
11615
11992
|
// src/gpt-admin.ts
|
|
11616
11993
|
var GptAdmin = class extends BaseClient {
|
|
11617
11994
|
constructor(config) {
|
|
@@ -11646,6 +12023,10 @@ var GptAdmin = class extends BaseClient {
|
|
|
11646
12023
|
this.support = createSupportNamespace(rb);
|
|
11647
12024
|
this.models = createModelsNamespace(rb);
|
|
11648
12025
|
this.ai = createAiNamespace(rb);
|
|
12026
|
+
this.crmClusters = createCrmClustersNamespace(rb);
|
|
12027
|
+
this.compliance = createComplianceNamespace(rb);
|
|
12028
|
+
this.pipelines = createPipelinesNamespace(rb);
|
|
12029
|
+
this.tenants = createTenantsNamespace(rb);
|
|
11649
12030
|
}
|
|
11650
12031
|
};
|
|
11651
12032
|
|