@gpt-platform/admin 0.5.1 → 0.5.2
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 +577 -467
- package/dist/index.d.ts +577 -467
- package/dist/index.js +364 -77
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +364 -77
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -853,7 +853,7 @@ var createClient = (config = {}) => {
|
|
|
853
853
|
};
|
|
854
854
|
|
|
855
855
|
// src/version.ts
|
|
856
|
-
var SDK_VERSION = "0.5.
|
|
856
|
+
var SDK_VERSION = "0.5.2";
|
|
857
857
|
var DEFAULT_API_VERSION = "2026-02-27";
|
|
858
858
|
|
|
859
859
|
// src/base-client.ts
|
|
@@ -8798,20 +8798,12 @@ function createConnectorsNamespace(rb) {
|
|
|
8798
8798
|
options
|
|
8799
8799
|
),
|
|
8800
8800
|
/** Delete a connector instance. */
|
|
8801
|
-
delete: async (id, options) => rb.executeDelete(
|
|
8802
|
-
deleteAdminConnectorsById,
|
|
8803
|
-
{ path: { id } },
|
|
8804
|
-
options
|
|
8805
|
-
)
|
|
8801
|
+
delete: async (id, options) => rb.executeDelete(deleteAdminConnectorsById, { path: { id } }, options)
|
|
8806
8802
|
},
|
|
8807
8803
|
/** Credentials — OAuth tokens and API keys. */
|
|
8808
8804
|
credentials: {
|
|
8809
8805
|
/** List all credentials. */
|
|
8810
|
-
list: async (options) => rb.execute(
|
|
8811
|
-
getAdminConnectorsCredentials,
|
|
8812
|
-
{},
|
|
8813
|
-
options
|
|
8814
|
-
),
|
|
8806
|
+
list: async (options) => rb.execute(getAdminConnectorsCredentials, {}, options),
|
|
8815
8807
|
/** Get a credential by ID. */
|
|
8816
8808
|
get: async (id, options) => rb.execute(
|
|
8817
8809
|
getAdminConnectorsCredentialsById,
|
|
@@ -10388,7 +10380,10 @@ function createCrmNamespace(rb) {
|
|
|
10388
10380
|
update: async (id, attributes, options) => {
|
|
10389
10381
|
return rb.execute(
|
|
10390
10382
|
patchAdminCrmContactsById,
|
|
10391
|
-
{
|
|
10383
|
+
{
|
|
10384
|
+
path: { id },
|
|
10385
|
+
body: { data: { type: "crm_contact", id, attributes } }
|
|
10386
|
+
},
|
|
10392
10387
|
options
|
|
10393
10388
|
);
|
|
10394
10389
|
},
|
|
@@ -10396,7 +10391,10 @@ function createCrmNamespace(rb) {
|
|
|
10396
10391
|
archive: async (id, options) => {
|
|
10397
10392
|
return rb.execute(
|
|
10398
10393
|
patchAdminCrmContactsByIdArchive,
|
|
10399
|
-
{
|
|
10394
|
+
{
|
|
10395
|
+
path: { id },
|
|
10396
|
+
body: { data: { type: "crm_contact", id, attributes: {} } }
|
|
10397
|
+
},
|
|
10400
10398
|
options
|
|
10401
10399
|
);
|
|
10402
10400
|
},
|
|
@@ -10404,7 +10402,10 @@ function createCrmNamespace(rb) {
|
|
|
10404
10402
|
unarchive: async (id, options) => {
|
|
10405
10403
|
return rb.execute(
|
|
10406
10404
|
postAdminCrmContactsByIdUnarchive,
|
|
10407
|
-
{
|
|
10405
|
+
{
|
|
10406
|
+
path: { id },
|
|
10407
|
+
body: { data: { type: "crm_contact", id, attributes: {} } }
|
|
10408
|
+
},
|
|
10408
10409
|
options
|
|
10409
10410
|
);
|
|
10410
10411
|
},
|
|
@@ -10438,13 +10439,20 @@ function createCrmNamespace(rb) {
|
|
|
10438
10439
|
update: async (id, attributes, options) => {
|
|
10439
10440
|
return rb.execute(
|
|
10440
10441
|
patchAdminCrmCompaniesById,
|
|
10441
|
-
{
|
|
10442
|
+
{
|
|
10443
|
+
path: { id },
|
|
10444
|
+
body: { data: { type: "crm_company", id, attributes } }
|
|
10445
|
+
},
|
|
10442
10446
|
options
|
|
10443
10447
|
);
|
|
10444
10448
|
},
|
|
10445
10449
|
/** Delete a company. */
|
|
10446
10450
|
delete: async (id, options) => {
|
|
10447
|
-
return rb.execute(
|
|
10451
|
+
return rb.execute(
|
|
10452
|
+
deleteAdminCrmCompaniesById,
|
|
10453
|
+
{ path: { id } },
|
|
10454
|
+
options
|
|
10455
|
+
);
|
|
10448
10456
|
}
|
|
10449
10457
|
},
|
|
10450
10458
|
// ========== Deals ==========
|
|
@@ -10473,7 +10481,10 @@ function createCrmNamespace(rb) {
|
|
|
10473
10481
|
update: async (id, attributes, options) => {
|
|
10474
10482
|
return rb.execute(
|
|
10475
10483
|
patchAdminCrmDealsById,
|
|
10476
|
-
{
|
|
10484
|
+
{
|
|
10485
|
+
path: { id },
|
|
10486
|
+
body: { data: { type: "crm_deal", id, attributes } }
|
|
10487
|
+
},
|
|
10477
10488
|
options
|
|
10478
10489
|
);
|
|
10479
10490
|
},
|
|
@@ -10481,7 +10492,10 @@ function createCrmNamespace(rb) {
|
|
|
10481
10492
|
moveStage: async (id, attributes, options) => {
|
|
10482
10493
|
return rb.execute(
|
|
10483
10494
|
patchAdminCrmDealsByIdMoveStage,
|
|
10484
|
-
{
|
|
10495
|
+
{
|
|
10496
|
+
path: { id },
|
|
10497
|
+
body: { data: { type: "crm_deal", id, attributes } }
|
|
10498
|
+
},
|
|
10485
10499
|
options
|
|
10486
10500
|
);
|
|
10487
10501
|
},
|
|
@@ -10516,13 +10530,20 @@ function createCrmNamespace(rb) {
|
|
|
10516
10530
|
update: async (id, attributes, options) => {
|
|
10517
10531
|
return rb.execute(
|
|
10518
10532
|
patchAdminCrmActivitiesById,
|
|
10519
|
-
{
|
|
10533
|
+
{
|
|
10534
|
+
path: { id },
|
|
10535
|
+
body: { data: { type: "crm_activity", id, attributes } }
|
|
10536
|
+
},
|
|
10520
10537
|
options
|
|
10521
10538
|
);
|
|
10522
10539
|
},
|
|
10523
10540
|
/** Delete an activity. */
|
|
10524
10541
|
delete: async (id, options) => {
|
|
10525
|
-
return rb.execute(
|
|
10542
|
+
return rb.execute(
|
|
10543
|
+
deleteAdminCrmActivitiesById,
|
|
10544
|
+
{ path: { id } },
|
|
10545
|
+
options
|
|
10546
|
+
);
|
|
10526
10547
|
}
|
|
10527
10548
|
},
|
|
10528
10549
|
// ========== Pipelines ==========
|
|
@@ -10551,20 +10572,31 @@ function createCrmNamespace(rb) {
|
|
|
10551
10572
|
update: async (id, attributes, options) => {
|
|
10552
10573
|
return rb.execute(
|
|
10553
10574
|
patchAdminCrmPipelinesById,
|
|
10554
|
-
{
|
|
10575
|
+
{
|
|
10576
|
+
path: { id },
|
|
10577
|
+
body: { data: { type: "crm_pipeline", id, attributes } }
|
|
10578
|
+
},
|
|
10555
10579
|
options
|
|
10556
10580
|
);
|
|
10557
10581
|
},
|
|
10558
10582
|
/** Delete a pipeline. */
|
|
10559
10583
|
delete: async (id, options) => {
|
|
10560
|
-
return rb.execute(
|
|
10584
|
+
return rb.execute(
|
|
10585
|
+
deleteAdminCrmPipelinesById,
|
|
10586
|
+
{ path: { id } },
|
|
10587
|
+
options
|
|
10588
|
+
);
|
|
10561
10589
|
}
|
|
10562
10590
|
},
|
|
10563
10591
|
// ========== Pipeline Stages ==========
|
|
10564
10592
|
pipelineStages: {
|
|
10565
10593
|
/** Get a pipeline stage by ID. */
|
|
10566
10594
|
get: async (id, options) => {
|
|
10567
|
-
return rb.execute(
|
|
10595
|
+
return rb.execute(
|
|
10596
|
+
getAdminCrmPipelineStagesById,
|
|
10597
|
+
{ path: { id } },
|
|
10598
|
+
options
|
|
10599
|
+
);
|
|
10568
10600
|
},
|
|
10569
10601
|
/** List stages for a specific pipeline. */
|
|
10570
10602
|
listByPipeline: async (pipelineId, options) => {
|
|
@@ -10586,20 +10618,31 @@ function createCrmNamespace(rb) {
|
|
|
10586
10618
|
update: async (id, attributes, options) => {
|
|
10587
10619
|
return rb.execute(
|
|
10588
10620
|
patchAdminCrmPipelineStagesById,
|
|
10589
|
-
{
|
|
10621
|
+
{
|
|
10622
|
+
path: { id },
|
|
10623
|
+
body: { data: { type: "crm_pipeline_stage", id, attributes } }
|
|
10624
|
+
},
|
|
10590
10625
|
options
|
|
10591
10626
|
);
|
|
10592
10627
|
},
|
|
10593
10628
|
/** Delete a pipeline stage. */
|
|
10594
10629
|
delete: async (id, options) => {
|
|
10595
|
-
return rb.execute(
|
|
10630
|
+
return rb.execute(
|
|
10631
|
+
deleteAdminCrmPipelineStagesById,
|
|
10632
|
+
{ path: { id } },
|
|
10633
|
+
options
|
|
10634
|
+
);
|
|
10596
10635
|
}
|
|
10597
10636
|
},
|
|
10598
10637
|
// ========== Relationships ==========
|
|
10599
10638
|
relationships: {
|
|
10600
10639
|
/** Get a relationship by ID. */
|
|
10601
10640
|
get: async (id, options) => {
|
|
10602
|
-
return rb.execute(
|
|
10641
|
+
return rb.execute(
|
|
10642
|
+
getAdminCrmRelationshipsById,
|
|
10643
|
+
{ path: { id } },
|
|
10644
|
+
options
|
|
10645
|
+
);
|
|
10603
10646
|
},
|
|
10604
10647
|
/** List relationships by workspace. */
|
|
10605
10648
|
listByWorkspace: async (workspaceId, options) => {
|
|
@@ -10619,14 +10662,22 @@ function createCrmNamespace(rb) {
|
|
|
10619
10662
|
},
|
|
10620
10663
|
/** Delete a relationship. */
|
|
10621
10664
|
delete: async (id, options) => {
|
|
10622
|
-
return rb.execute(
|
|
10665
|
+
return rb.execute(
|
|
10666
|
+
deleteAdminCrmRelationshipsById,
|
|
10667
|
+
{ path: { id } },
|
|
10668
|
+
options
|
|
10669
|
+
);
|
|
10623
10670
|
}
|
|
10624
10671
|
},
|
|
10625
10672
|
// ========== Relationship Types ==========
|
|
10626
10673
|
relationshipTypes: {
|
|
10627
10674
|
/** Get a relationship type by ID. */
|
|
10628
10675
|
get: async (id, options) => {
|
|
10629
|
-
return rb.execute(
|
|
10676
|
+
return rb.execute(
|
|
10677
|
+
getAdminCrmRelationshipTypesById,
|
|
10678
|
+
{ path: { id } },
|
|
10679
|
+
options
|
|
10680
|
+
);
|
|
10630
10681
|
},
|
|
10631
10682
|
/** List all relationship types. */
|
|
10632
10683
|
list: async (options) => {
|
|
@@ -10644,20 +10695,31 @@ function createCrmNamespace(rb) {
|
|
|
10644
10695
|
update: async (id, attributes, options) => {
|
|
10645
10696
|
return rb.execute(
|
|
10646
10697
|
patchAdminCrmRelationshipTypesById,
|
|
10647
|
-
{
|
|
10698
|
+
{
|
|
10699
|
+
path: { id },
|
|
10700
|
+
body: { data: { type: "crm_relationship_type", id, attributes } }
|
|
10701
|
+
},
|
|
10648
10702
|
options
|
|
10649
10703
|
);
|
|
10650
10704
|
},
|
|
10651
10705
|
/** Delete a relationship type. */
|
|
10652
10706
|
delete: async (id, options) => {
|
|
10653
|
-
return rb.execute(
|
|
10707
|
+
return rb.execute(
|
|
10708
|
+
deleteAdminCrmRelationshipTypesById,
|
|
10709
|
+
{ path: { id } },
|
|
10710
|
+
options
|
|
10711
|
+
);
|
|
10654
10712
|
}
|
|
10655
10713
|
},
|
|
10656
10714
|
// ========== Custom Entities ==========
|
|
10657
10715
|
customEntities: {
|
|
10658
10716
|
/** Get a custom entity by ID. */
|
|
10659
10717
|
get: async (id, options) => {
|
|
10660
|
-
return rb.execute(
|
|
10718
|
+
return rb.execute(
|
|
10719
|
+
getAdminCrmCustomEntitiesById,
|
|
10720
|
+
{ path: { id } },
|
|
10721
|
+
options
|
|
10722
|
+
);
|
|
10661
10723
|
},
|
|
10662
10724
|
/** List custom entities by workspace. */
|
|
10663
10725
|
listByWorkspace: async (workspaceId, options) => {
|
|
@@ -10679,13 +10741,20 @@ function createCrmNamespace(rb) {
|
|
|
10679
10741
|
update: async (id, attributes, options) => {
|
|
10680
10742
|
return rb.execute(
|
|
10681
10743
|
patchAdminCrmCustomEntitiesById,
|
|
10682
|
-
{
|
|
10744
|
+
{
|
|
10745
|
+
path: { id },
|
|
10746
|
+
body: { data: { type: "crm_custom_entity", id, attributes } }
|
|
10747
|
+
},
|
|
10683
10748
|
options
|
|
10684
10749
|
);
|
|
10685
10750
|
},
|
|
10686
10751
|
/** Delete a custom entity. */
|
|
10687
10752
|
delete: async (id, options) => {
|
|
10688
|
-
return rb.execute(
|
|
10753
|
+
return rb.execute(
|
|
10754
|
+
deleteAdminCrmCustomEntitiesById,
|
|
10755
|
+
{ path: { id } },
|
|
10756
|
+
options
|
|
10757
|
+
);
|
|
10689
10758
|
},
|
|
10690
10759
|
/** List versions for a custom entity. */
|
|
10691
10760
|
listVersions: async (entityId, options) => {
|
|
@@ -10712,7 +10781,11 @@ function createCrmNamespace(rb) {
|
|
|
10712
10781
|
},
|
|
10713
10782
|
/** Get a deal product by ID. */
|
|
10714
10783
|
get: async (id, options) => {
|
|
10715
|
-
return rb.execute(
|
|
10784
|
+
return rb.execute(
|
|
10785
|
+
getAdminCrmDealProductsById,
|
|
10786
|
+
{ path: { id } },
|
|
10787
|
+
options
|
|
10788
|
+
);
|
|
10716
10789
|
},
|
|
10717
10790
|
/** Create a deal product. */
|
|
10718
10791
|
create: async (attributes, options) => {
|
|
@@ -10724,7 +10797,11 @@ function createCrmNamespace(rb) {
|
|
|
10724
10797
|
},
|
|
10725
10798
|
/** Delete a deal product. */
|
|
10726
10799
|
delete: async (id, options) => {
|
|
10727
|
-
return rb.execute(
|
|
10800
|
+
return rb.execute(
|
|
10801
|
+
deleteAdminCrmDealProductsById,
|
|
10802
|
+
{ path: { id } },
|
|
10803
|
+
options
|
|
10804
|
+
);
|
|
10728
10805
|
}
|
|
10729
10806
|
},
|
|
10730
10807
|
// ========== Exports ==========
|
|
@@ -10753,7 +10830,10 @@ function createCrmNamespace(rb) {
|
|
|
10753
10830
|
refreshUrl: async (id, options) => {
|
|
10754
10831
|
return rb.execute(
|
|
10755
10832
|
patchAdminCrmExportsByIdRefreshUrl,
|
|
10756
|
-
{
|
|
10833
|
+
{
|
|
10834
|
+
path: { id },
|
|
10835
|
+
body: { data: { type: "crm_data_export_job", id, attributes: {} } }
|
|
10836
|
+
},
|
|
10757
10837
|
options
|
|
10758
10838
|
);
|
|
10759
10839
|
}
|
|
@@ -10762,7 +10842,11 @@ function createCrmNamespace(rb) {
|
|
|
10762
10842
|
entityTypes: {
|
|
10763
10843
|
/** Get an entity type by ID. */
|
|
10764
10844
|
get: async (id, options) => {
|
|
10765
|
-
return rb.execute(
|
|
10845
|
+
return rb.execute(
|
|
10846
|
+
getAdminIsvCrmEntityTypesById,
|
|
10847
|
+
{ path: { id } },
|
|
10848
|
+
options
|
|
10849
|
+
);
|
|
10766
10850
|
},
|
|
10767
10851
|
/** List entity types by application. */
|
|
10768
10852
|
listByApplication: async (applicationId, options) => {
|
|
@@ -10784,20 +10868,31 @@ function createCrmNamespace(rb) {
|
|
|
10784
10868
|
update: async (id, attributes, options) => {
|
|
10785
10869
|
return rb.execute(
|
|
10786
10870
|
patchAdminIsvCrmEntityTypesById,
|
|
10787
|
-
{
|
|
10871
|
+
{
|
|
10872
|
+
path: { id },
|
|
10873
|
+
body: { data: { type: "crm_custom_entity_type", id, attributes } }
|
|
10874
|
+
},
|
|
10788
10875
|
options
|
|
10789
10876
|
);
|
|
10790
10877
|
},
|
|
10791
10878
|
/** Delete an entity type. */
|
|
10792
10879
|
delete: async (id, options) => {
|
|
10793
|
-
return rb.execute(
|
|
10880
|
+
return rb.execute(
|
|
10881
|
+
deleteAdminIsvCrmEntityTypesById,
|
|
10882
|
+
{ path: { id } },
|
|
10883
|
+
options
|
|
10884
|
+
);
|
|
10794
10885
|
}
|
|
10795
10886
|
},
|
|
10796
10887
|
// ========== ISV: Field Definitions ==========
|
|
10797
10888
|
fieldDefinitions: {
|
|
10798
10889
|
/** Get a field definition by ID. */
|
|
10799
10890
|
get: async (id, options) => {
|
|
10800
|
-
return rb.execute(
|
|
10891
|
+
return rb.execute(
|
|
10892
|
+
getAdminIsvCrmFieldDefinitionsById,
|
|
10893
|
+
{ path: { id } },
|
|
10894
|
+
options
|
|
10895
|
+
);
|
|
10801
10896
|
},
|
|
10802
10897
|
/** List field definitions by entity type. */
|
|
10803
10898
|
listByEntityType: async (entityType, options) => {
|
|
@@ -10811,7 +10906,9 @@ function createCrmNamespace(rb) {
|
|
|
10811
10906
|
create: async (attributes, options) => {
|
|
10812
10907
|
return rb.execute(
|
|
10813
10908
|
postAdminIsvCrmFieldDefinitions,
|
|
10814
|
-
{
|
|
10909
|
+
{
|
|
10910
|
+
body: { data: { type: "crm_custom_field_definition", attributes } }
|
|
10911
|
+
},
|
|
10815
10912
|
options
|
|
10816
10913
|
);
|
|
10817
10914
|
},
|
|
@@ -10819,26 +10916,41 @@ function createCrmNamespace(rb) {
|
|
|
10819
10916
|
update: async (id, attributes, options) => {
|
|
10820
10917
|
return rb.execute(
|
|
10821
10918
|
patchAdminIsvCrmFieldDefinitionsById,
|
|
10822
|
-
{
|
|
10919
|
+
{
|
|
10920
|
+
path: { id },
|
|
10921
|
+
body: {
|
|
10922
|
+
data: { type: "crm_custom_field_definition", id, attributes }
|
|
10923
|
+
}
|
|
10924
|
+
},
|
|
10823
10925
|
options
|
|
10824
10926
|
);
|
|
10825
10927
|
},
|
|
10826
10928
|
/** Delete a field definition. */
|
|
10827
10929
|
delete: async (id, options) => {
|
|
10828
|
-
return rb.execute(
|
|
10930
|
+
return rb.execute(
|
|
10931
|
+
deleteAdminIsvCrmFieldDefinitionsById,
|
|
10932
|
+
{ path: { id } },
|
|
10933
|
+
options
|
|
10934
|
+
);
|
|
10829
10935
|
}
|
|
10830
10936
|
},
|
|
10831
10937
|
// ========== ISV: Channel Capture Config ==========
|
|
10832
10938
|
channelCaptureConfig: {
|
|
10833
10939
|
/** Get channel capture config by ID. */
|
|
10834
10940
|
get: async (id, options) => {
|
|
10835
|
-
return rb.execute(
|
|
10941
|
+
return rb.execute(
|
|
10942
|
+
getAdminIsvCrmChannelCaptureConfigById,
|
|
10943
|
+
{ path: { id } },
|
|
10944
|
+
options
|
|
10945
|
+
);
|
|
10836
10946
|
},
|
|
10837
10947
|
/** Create or upsert channel capture config. */
|
|
10838
10948
|
create: async (attributes, options) => {
|
|
10839
10949
|
return rb.execute(
|
|
10840
10950
|
postAdminIsvCrmChannelCaptureConfig,
|
|
10841
|
-
{
|
|
10951
|
+
{
|
|
10952
|
+
body: { data: { type: "crm_channel_capture_config", attributes } }
|
|
10953
|
+
},
|
|
10842
10954
|
options
|
|
10843
10955
|
);
|
|
10844
10956
|
},
|
|
@@ -10846,7 +10958,12 @@ function createCrmNamespace(rb) {
|
|
|
10846
10958
|
update: async (id, attributes, options) => {
|
|
10847
10959
|
return rb.execute(
|
|
10848
10960
|
patchAdminIsvCrmChannelCaptureConfigById,
|
|
10849
|
-
{
|
|
10961
|
+
{
|
|
10962
|
+
path: { id },
|
|
10963
|
+
body: {
|
|
10964
|
+
data: { type: "crm_channel_capture_config", id, attributes }
|
|
10965
|
+
}
|
|
10966
|
+
},
|
|
10850
10967
|
options
|
|
10851
10968
|
);
|
|
10852
10969
|
}
|
|
@@ -10873,13 +10990,20 @@ function createCrmNamespace(rb) {
|
|
|
10873
10990
|
update: async (id, attributes, options) => {
|
|
10874
10991
|
return rb.execute(
|
|
10875
10992
|
patchAdminIsvCrmSyncConfigsById,
|
|
10876
|
-
{
|
|
10993
|
+
{
|
|
10994
|
+
path: { id },
|
|
10995
|
+
body: { data: { type: "crm_sync_config", id, attributes } }
|
|
10996
|
+
},
|
|
10877
10997
|
options
|
|
10878
10998
|
);
|
|
10879
10999
|
},
|
|
10880
11000
|
/** Delete a sync config. */
|
|
10881
11001
|
delete: async (id, options) => {
|
|
10882
|
-
return rb.execute(
|
|
11002
|
+
return rb.execute(
|
|
11003
|
+
deleteAdminIsvCrmSyncConfigsById,
|
|
11004
|
+
{ path: { id } },
|
|
11005
|
+
options
|
|
11006
|
+
);
|
|
10883
11007
|
}
|
|
10884
11008
|
}
|
|
10885
11009
|
};
|
|
@@ -10892,7 +11016,11 @@ function createSupportNamespace(rb) {
|
|
|
10892
11016
|
tickets: {
|
|
10893
11017
|
/** Get a support ticket by ID */
|
|
10894
11018
|
get: async (id, options) => {
|
|
10895
|
-
return rb.execute(
|
|
11019
|
+
return rb.execute(
|
|
11020
|
+
getAdminSupportTicketsById,
|
|
11021
|
+
{ path: { id } },
|
|
11022
|
+
options
|
|
11023
|
+
);
|
|
10896
11024
|
},
|
|
10897
11025
|
/** List tickets for a workspace */
|
|
10898
11026
|
listByWorkspace: async (workspaceId, options) => {
|
|
@@ -10914,7 +11042,10 @@ function createSupportNamespace(rb) {
|
|
|
10914
11042
|
update: async (id, attributes, options) => {
|
|
10915
11043
|
return rb.execute(
|
|
10916
11044
|
patchAdminSupportTicketsById,
|
|
10917
|
-
{
|
|
11045
|
+
{
|
|
11046
|
+
path: { id },
|
|
11047
|
+
body: { data: { type: "support_ticket", id, attributes } }
|
|
11048
|
+
},
|
|
10918
11049
|
options
|
|
10919
11050
|
);
|
|
10920
11051
|
},
|
|
@@ -10922,7 +11053,10 @@ function createSupportNamespace(rb) {
|
|
|
10922
11053
|
assign: async (id, attributes, options) => {
|
|
10923
11054
|
return rb.execute(
|
|
10924
11055
|
patchAdminSupportTicketsByIdAssign,
|
|
10925
|
-
{
|
|
11056
|
+
{
|
|
11057
|
+
path: { id },
|
|
11058
|
+
body: { data: { type: "support_ticket", id, attributes } }
|
|
11059
|
+
},
|
|
10926
11060
|
options
|
|
10927
11061
|
);
|
|
10928
11062
|
},
|
|
@@ -10930,7 +11064,10 @@ function createSupportNamespace(rb) {
|
|
|
10930
11064
|
resolve: async (id, attributes, options) => {
|
|
10931
11065
|
return rb.execute(
|
|
10932
11066
|
patchAdminSupportTicketsByIdResolve,
|
|
10933
|
-
{
|
|
11067
|
+
{
|
|
11068
|
+
path: { id },
|
|
11069
|
+
body: { data: { type: "support_ticket", id, attributes } }
|
|
11070
|
+
},
|
|
10934
11071
|
options
|
|
10935
11072
|
);
|
|
10936
11073
|
},
|
|
@@ -10938,7 +11075,10 @@ function createSupportNamespace(rb) {
|
|
|
10938
11075
|
close: async (id, attributes, options) => {
|
|
10939
11076
|
return rb.execute(
|
|
10940
11077
|
patchAdminSupportTicketsByIdClose,
|
|
10941
|
-
{
|
|
11078
|
+
{
|
|
11079
|
+
path: { id },
|
|
11080
|
+
body: { data: { type: "support_ticket", id, attributes } }
|
|
11081
|
+
},
|
|
10942
11082
|
options
|
|
10943
11083
|
);
|
|
10944
11084
|
},
|
|
@@ -10946,7 +11086,10 @@ function createSupportNamespace(rb) {
|
|
|
10946
11086
|
reopen: async (id, attributes, options) => {
|
|
10947
11087
|
return rb.execute(
|
|
10948
11088
|
patchAdminSupportTicketsByIdReopen,
|
|
10949
|
-
{
|
|
11089
|
+
{
|
|
11090
|
+
path: { id },
|
|
11091
|
+
body: { data: { type: "support_ticket", id, attributes } }
|
|
11092
|
+
},
|
|
10950
11093
|
options
|
|
10951
11094
|
);
|
|
10952
11095
|
},
|
|
@@ -10954,13 +11097,20 @@ function createSupportNamespace(rb) {
|
|
|
10954
11097
|
merge: async (id, attributes, options) => {
|
|
10955
11098
|
return rb.execute(
|
|
10956
11099
|
patchAdminSupportTicketsByIdMerge,
|
|
10957
|
-
{
|
|
11100
|
+
{
|
|
11101
|
+
path: { id },
|
|
11102
|
+
body: { data: { type: "support_ticket", id, attributes } }
|
|
11103
|
+
},
|
|
10958
11104
|
options
|
|
10959
11105
|
);
|
|
10960
11106
|
},
|
|
10961
11107
|
/** Delete a support ticket */
|
|
10962
11108
|
delete: async (id, options) => {
|
|
10963
|
-
return rb.executeDelete(
|
|
11109
|
+
return rb.executeDelete(
|
|
11110
|
+
deleteAdminSupportTicketsById,
|
|
11111
|
+
{ path: { id } },
|
|
11112
|
+
options
|
|
11113
|
+
);
|
|
10964
11114
|
}
|
|
10965
11115
|
},
|
|
10966
11116
|
// --- Messages ---
|
|
@@ -11032,7 +11182,11 @@ function createSupportNamespace(rb) {
|
|
|
11032
11182
|
},
|
|
11033
11183
|
/** Delete a tag */
|
|
11034
11184
|
delete: async (id, options) => {
|
|
11035
|
-
return rb.executeDelete(
|
|
11185
|
+
return rb.executeDelete(
|
|
11186
|
+
deleteAdminSupportTagsById,
|
|
11187
|
+
{ path: { id } },
|
|
11188
|
+
options
|
|
11189
|
+
);
|
|
11036
11190
|
}
|
|
11037
11191
|
},
|
|
11038
11192
|
// --- Queues ---
|
|
@@ -11061,13 +11215,20 @@ function createSupportNamespace(rb) {
|
|
|
11061
11215
|
update: async (id, attributes, options) => {
|
|
11062
11216
|
return rb.execute(
|
|
11063
11217
|
patchAdminSupportQueuesById,
|
|
11064
|
-
{
|
|
11218
|
+
{
|
|
11219
|
+
path: { id },
|
|
11220
|
+
body: { data: { type: "support_queue", id, attributes } }
|
|
11221
|
+
},
|
|
11065
11222
|
options
|
|
11066
11223
|
);
|
|
11067
11224
|
},
|
|
11068
11225
|
/** Delete a queue */
|
|
11069
11226
|
delete: async (id, options) => {
|
|
11070
|
-
return rb.executeDelete(
|
|
11227
|
+
return rb.executeDelete(
|
|
11228
|
+
deleteAdminSupportQueuesById,
|
|
11229
|
+
{ path: { id } },
|
|
11230
|
+
options
|
|
11231
|
+
);
|
|
11071
11232
|
}
|
|
11072
11233
|
},
|
|
11073
11234
|
// --- Queue Members ---
|
|
@@ -11100,20 +11261,31 @@ function createSupportNamespace(rb) {
|
|
|
11100
11261
|
update: async (id, attributes, options) => {
|
|
11101
11262
|
return rb.execute(
|
|
11102
11263
|
patchAdminSupportQueueMembersById,
|
|
11103
|
-
{
|
|
11264
|
+
{
|
|
11265
|
+
path: { id },
|
|
11266
|
+
body: { data: { type: "support_queue_member", id, attributes } }
|
|
11267
|
+
},
|
|
11104
11268
|
options
|
|
11105
11269
|
);
|
|
11106
11270
|
},
|
|
11107
11271
|
/** Remove a member from a queue */
|
|
11108
11272
|
delete: async (id, options) => {
|
|
11109
|
-
return rb.executeDelete(
|
|
11273
|
+
return rb.executeDelete(
|
|
11274
|
+
deleteAdminSupportQueueMembersById,
|
|
11275
|
+
{ path: { id } },
|
|
11276
|
+
options
|
|
11277
|
+
);
|
|
11110
11278
|
}
|
|
11111
11279
|
},
|
|
11112
11280
|
// --- Routing Rules ---
|
|
11113
11281
|
routingRules: {
|
|
11114
11282
|
/** Get a routing rule by ID */
|
|
11115
11283
|
get: async (id, options) => {
|
|
11116
|
-
return rb.execute(
|
|
11284
|
+
return rb.execute(
|
|
11285
|
+
getAdminSupportRoutingRulesById,
|
|
11286
|
+
{ path: { id } },
|
|
11287
|
+
options
|
|
11288
|
+
);
|
|
11117
11289
|
},
|
|
11118
11290
|
/** List routing rules for an application */
|
|
11119
11291
|
listByApplication: async (applicationId, options) => {
|
|
@@ -11135,20 +11307,31 @@ function createSupportNamespace(rb) {
|
|
|
11135
11307
|
update: async (id, attributes, options) => {
|
|
11136
11308
|
return rb.execute(
|
|
11137
11309
|
patchAdminSupportRoutingRulesById,
|
|
11138
|
-
{
|
|
11310
|
+
{
|
|
11311
|
+
path: { id },
|
|
11312
|
+
body: { data: { type: "support_routing_rule", id, attributes } }
|
|
11313
|
+
},
|
|
11139
11314
|
options
|
|
11140
11315
|
);
|
|
11141
11316
|
},
|
|
11142
11317
|
/** Delete a routing rule */
|
|
11143
11318
|
delete: async (id, options) => {
|
|
11144
|
-
return rb.executeDelete(
|
|
11319
|
+
return rb.executeDelete(
|
|
11320
|
+
deleteAdminSupportRoutingRulesById,
|
|
11321
|
+
{ path: { id } },
|
|
11322
|
+
options
|
|
11323
|
+
);
|
|
11145
11324
|
}
|
|
11146
11325
|
},
|
|
11147
11326
|
// --- SLA Policies ---
|
|
11148
11327
|
slaPolicies: {
|
|
11149
11328
|
/** Get an SLA policy by ID */
|
|
11150
11329
|
get: async (id, options) => {
|
|
11151
|
-
return rb.execute(
|
|
11330
|
+
return rb.execute(
|
|
11331
|
+
getAdminSupportSlaPoliciesById,
|
|
11332
|
+
{ path: { id } },
|
|
11333
|
+
options
|
|
11334
|
+
);
|
|
11152
11335
|
},
|
|
11153
11336
|
/** List SLA policies for an application */
|
|
11154
11337
|
listByApplication: async (applicationId, options) => {
|
|
@@ -11170,13 +11353,20 @@ function createSupportNamespace(rb) {
|
|
|
11170
11353
|
update: async (id, attributes, options) => {
|
|
11171
11354
|
return rb.execute(
|
|
11172
11355
|
patchAdminSupportSlaPoliciesById,
|
|
11173
|
-
{
|
|
11356
|
+
{
|
|
11357
|
+
path: { id },
|
|
11358
|
+
body: { data: { type: "support_sla_policy", id, attributes } }
|
|
11359
|
+
},
|
|
11174
11360
|
options
|
|
11175
11361
|
);
|
|
11176
11362
|
},
|
|
11177
11363
|
/** Delete an SLA policy */
|
|
11178
11364
|
delete: async (id, options) => {
|
|
11179
|
-
return rb.executeDelete(
|
|
11365
|
+
return rb.executeDelete(
|
|
11366
|
+
deleteAdminSupportSlaPoliciesById,
|
|
11367
|
+
{ path: { id } },
|
|
11368
|
+
options
|
|
11369
|
+
);
|
|
11180
11370
|
}
|
|
11181
11371
|
},
|
|
11182
11372
|
// --- AI Config ---
|
|
@@ -11212,7 +11402,11 @@ function createSupportNamespace(rb) {
|
|
|
11212
11402
|
upsert: async (attributes, options) => {
|
|
11213
11403
|
return rb.execute(
|
|
11214
11404
|
postAdminSupportChannelCaptureConfigs,
|
|
11215
|
-
{
|
|
11405
|
+
{
|
|
11406
|
+
body: {
|
|
11407
|
+
data: { type: "support_channel_capture_config", attributes }
|
|
11408
|
+
}
|
|
11409
|
+
},
|
|
11216
11410
|
options
|
|
11217
11411
|
);
|
|
11218
11412
|
}
|
|
@@ -11239,13 +11433,20 @@ function createSupportNamespace(rb) {
|
|
|
11239
11433
|
update: async (id, attributes, options) => {
|
|
11240
11434
|
return rb.execute(
|
|
11241
11435
|
patchAdminSupportSyncConfigsById,
|
|
11242
|
-
{
|
|
11436
|
+
{
|
|
11437
|
+
path: { id },
|
|
11438
|
+
body: { data: { type: "support_sync_config", id, attributes } }
|
|
11439
|
+
},
|
|
11243
11440
|
options
|
|
11244
11441
|
);
|
|
11245
11442
|
},
|
|
11246
11443
|
/** Delete a sync config */
|
|
11247
11444
|
delete: async (id, options) => {
|
|
11248
|
-
return rb.executeDelete(
|
|
11445
|
+
return rb.executeDelete(
|
|
11446
|
+
deleteAdminSupportSyncConfigsById,
|
|
11447
|
+
{ path: { id } },
|
|
11448
|
+
options
|
|
11449
|
+
);
|
|
11249
11450
|
}
|
|
11250
11451
|
},
|
|
11251
11452
|
// --- Canned Responses ---
|
|
@@ -11270,13 +11471,20 @@ function createSupportNamespace(rb) {
|
|
|
11270
11471
|
update: async (id, attributes, options) => {
|
|
11271
11472
|
return rb.execute(
|
|
11272
11473
|
patchAdminSupportCannedResponsesById,
|
|
11273
|
-
{
|
|
11474
|
+
{
|
|
11475
|
+
path: { id },
|
|
11476
|
+
body: { data: { type: "support_canned_response", id, attributes } }
|
|
11477
|
+
},
|
|
11274
11478
|
options
|
|
11275
11479
|
);
|
|
11276
11480
|
},
|
|
11277
11481
|
/** Delete a canned response */
|
|
11278
11482
|
delete: async (id, options) => {
|
|
11279
|
-
return rb.executeDelete(
|
|
11483
|
+
return rb.executeDelete(
|
|
11484
|
+
deleteAdminSupportCannedResponsesById,
|
|
11485
|
+
{ path: { id } },
|
|
11486
|
+
options
|
|
11487
|
+
);
|
|
11280
11488
|
}
|
|
11281
11489
|
}
|
|
11282
11490
|
};
|
|
@@ -11602,16 +11810,92 @@ function createAiNamespace(rb) {
|
|
|
11602
11810
|
* console.log('Semantic cache cleared');
|
|
11603
11811
|
*/
|
|
11604
11812
|
clear: async (options) => {
|
|
11605
|
-
return rb.execute(
|
|
11606
|
-
postAdminSysSemanticCacheClear,
|
|
11607
|
-
{},
|
|
11608
|
-
options
|
|
11609
|
-
);
|
|
11813
|
+
return rb.execute(postAdminSysSemanticCacheClear, {}, options);
|
|
11610
11814
|
}
|
|
11611
11815
|
}
|
|
11612
11816
|
};
|
|
11613
11817
|
}
|
|
11614
11818
|
|
|
11819
|
+
// src/namespaces/crm-clusters.ts
|
|
11820
|
+
function createCrmClustersNamespace(rb) {
|
|
11821
|
+
return {
|
|
11822
|
+
/**
|
|
11823
|
+
* Discovers relationship clusters in the workspace CRM using community detection.
|
|
11824
|
+
* Each cluster is automatically labeled by AI.
|
|
11825
|
+
*
|
|
11826
|
+
* @param workspaceId - The workspace ID to discover clusters for
|
|
11827
|
+
* @returns Array of discovered clusters with AI-generated labels
|
|
11828
|
+
* @example
|
|
11829
|
+
* ```typescript
|
|
11830
|
+
* const { data } = await admin.crmClusters.discover('workspace-uuid');
|
|
11831
|
+
* ```
|
|
11832
|
+
*/
|
|
11833
|
+
async discover(workspaceId) {
|
|
11834
|
+
return rb.rawGet(
|
|
11835
|
+
`/isv/crm/clusters?workspace_id=${encodeURIComponent(workspaceId)}`
|
|
11836
|
+
);
|
|
11837
|
+
}
|
|
11838
|
+
};
|
|
11839
|
+
}
|
|
11840
|
+
|
|
11841
|
+
// src/namespaces/compliance.ts
|
|
11842
|
+
function createComplianceNamespace(rb) {
|
|
11843
|
+
return {
|
|
11844
|
+
/**
|
|
11845
|
+
* Scans text for PII and PHI violations (HIPAA Safe Harbor).
|
|
11846
|
+
*
|
|
11847
|
+
* @param text - The text to scan for compliance violations
|
|
11848
|
+
* @returns Scan result with clean flag, detections, and scrubbed preview
|
|
11849
|
+
* @example
|
|
11850
|
+
* ```typescript
|
|
11851
|
+
* const result = await admin.compliance.scan('Patient DOB: 03/15/1985');
|
|
11852
|
+
* ```
|
|
11853
|
+
*/
|
|
11854
|
+
async scan(text) {
|
|
11855
|
+
return rb.rawPost("/isv/compliance/scan", { text });
|
|
11856
|
+
}
|
|
11857
|
+
};
|
|
11858
|
+
}
|
|
11859
|
+
|
|
11860
|
+
// src/namespaces/tenants.ts
|
|
11861
|
+
function createTenantsNamespace(rb) {
|
|
11862
|
+
return {
|
|
11863
|
+
/**
|
|
11864
|
+
* Suspends a tenant, preventing billing charges and access.
|
|
11865
|
+
*
|
|
11866
|
+
* @param id - Tenant UUID
|
|
11867
|
+
* @param reason - Human-readable reason for suspension (required)
|
|
11868
|
+
* @returns Updated tenant id and status
|
|
11869
|
+
*/
|
|
11870
|
+
async suspend(id, reason) {
|
|
11871
|
+
return rb.rawPost(`/isv/tenants/${id}/suspend`, {
|
|
11872
|
+
reason
|
|
11873
|
+
});
|
|
11874
|
+
},
|
|
11875
|
+
/**
|
|
11876
|
+
* Restores a suspended tenant to active status.
|
|
11877
|
+
*
|
|
11878
|
+
* @param id - Tenant UUID
|
|
11879
|
+
* @returns Updated tenant id and status
|
|
11880
|
+
*/
|
|
11881
|
+
async unsuspend(id) {
|
|
11882
|
+
return rb.rawPost(
|
|
11883
|
+
`/isv/tenants/${id}/unsuspend`,
|
|
11884
|
+
{}
|
|
11885
|
+
);
|
|
11886
|
+
},
|
|
11887
|
+
/**
|
|
11888
|
+
* Permanently cancels a tenant.
|
|
11889
|
+
*
|
|
11890
|
+
* @param id - Tenant UUID
|
|
11891
|
+
* @returns Updated tenant id and status
|
|
11892
|
+
*/
|
|
11893
|
+
async cancel(id) {
|
|
11894
|
+
return rb.rawPost(`/isv/tenants/${id}/cancel`, {});
|
|
11895
|
+
}
|
|
11896
|
+
};
|
|
11897
|
+
}
|
|
11898
|
+
|
|
11615
11899
|
// src/gpt-admin.ts
|
|
11616
11900
|
var GptAdmin = class extends BaseClient {
|
|
11617
11901
|
constructor(config) {
|
|
@@ -11646,6 +11930,9 @@ var GptAdmin = class extends BaseClient {
|
|
|
11646
11930
|
this.support = createSupportNamespace(rb);
|
|
11647
11931
|
this.models = createModelsNamespace(rb);
|
|
11648
11932
|
this.ai = createAiNamespace(rb);
|
|
11933
|
+
this.crmClusters = createCrmClustersNamespace(rb);
|
|
11934
|
+
this.compliance = createComplianceNamespace(rb);
|
|
11935
|
+
this.tenants = createTenantsNamespace(rb);
|
|
11649
11936
|
}
|
|
11650
11937
|
};
|
|
11651
11938
|
|