@gpt-platform/admin 0.5.2 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -814,8 +814,8 @@ var createClient = (config = {}) => {
814
814
  };
815
815
 
816
816
  // src/version.ts
817
- var SDK_VERSION = "0.5.2";
818
- var DEFAULT_API_VERSION = "2026-02-27";
817
+ var SDK_VERSION = "0.6.1";
818
+ var DEFAULT_API_VERSION = "2026-03-09";
819
819
 
820
820
  // src/base-client.ts
821
821
  function isSecureUrl(url) {
@@ -1906,6 +1906,15 @@ var patchAdminExtractionDocumentsByIdReprocess = (options) => (options.client ??
1906
1906
  ...options.headers
1907
1907
  }
1908
1908
  });
1909
+ var postAdminCrmSyncConfigs = (options) => (options.client ?? client).post({
1910
+ security: [{ scheme: "bearer", type: "http" }],
1911
+ url: "/admin/crm/sync-configs",
1912
+ ...options,
1913
+ headers: {
1914
+ "Content-Type": "application/vnd.api+json",
1915
+ ...options.headers
1916
+ }
1917
+ });
1909
1918
  var patchAdminStorageRecommendationsByIdDismiss = (options) => (options.client ?? client).patch({
1910
1919
  security: [{ scheme: "bearer", type: "http" }],
1911
1920
  url: "/admin/storage-recommendations/{id}/dismiss",
@@ -2105,15 +2114,6 @@ var patchAdminStorageFilesByIdRestore = (options) => (options.client ?? client).
2105
2114
  ...options.headers
2106
2115
  }
2107
2116
  });
2108
- var postAdminAgentsPredict = (options) => (options.client ?? client).post({
2109
- security: [{ scheme: "bearer", type: "http" }],
2110
- url: "/admin/agents/predict",
2111
- ...options,
2112
- headers: {
2113
- "Content-Type": "application/vnd.api+json",
2114
- ...options.headers
2115
- }
2116
- });
2117
2117
  var patchAdminCrawlerSchedulesByIdDisable = (options) => (options.client ?? client).patch({
2118
2118
  security: [{ scheme: "bearer", type: "http" }],
2119
2119
  url: "/admin/crawler/schedules/{id}/disable",
@@ -2264,6 +2264,20 @@ var postAdminCrawlerJobs = (options) => (options.client ?? client).post({
2264
2264
  ...options.headers
2265
2265
  }
2266
2266
  });
2267
+ var getAdminPipelines = (options) => (options.client ?? client).get({
2268
+ security: [{ scheme: "bearer", type: "http" }],
2269
+ url: "/admin/pipelines",
2270
+ ...options
2271
+ });
2272
+ var postAdminPipelines = (options) => (options.client ?? client).post({
2273
+ security: [{ scheme: "bearer", type: "http" }],
2274
+ url: "/admin/pipelines",
2275
+ ...options,
2276
+ headers: {
2277
+ "Content-Type": "application/vnd.api+json",
2278
+ ...options.headers
2279
+ }
2280
+ });
2267
2281
  var deleteAdminCrmContactsById = (options) => (options.client ?? client).delete({
2268
2282
  security: [{ scheme: "bearer", type: "http" }],
2269
2283
  url: "/admin/crm/contacts/{id}",
@@ -2419,25 +2433,6 @@ var patchAdminSocialAccountsByIdEnablePosting = (options) => (options.client ??
2419
2433
  ...options.headers
2420
2434
  }
2421
2435
  });
2422
- var deleteAdminIsvCrmFieldDefinitionsById = (options) => (options.client ?? client).delete({
2423
- security: [{ scheme: "bearer", type: "http" }],
2424
- url: "/admin/isv/crm/field-definitions/{id}",
2425
- ...options
2426
- });
2427
- var getAdminIsvCrmFieldDefinitionsById = (options) => (options.client ?? client).get({
2428
- security: [{ scheme: "bearer", type: "http" }],
2429
- url: "/admin/isv/crm/field-definitions/{id}",
2430
- ...options
2431
- });
2432
- var patchAdminIsvCrmFieldDefinitionsById = (options) => (options.client ?? client).patch({
2433
- security: [{ scheme: "bearer", type: "http" }],
2434
- url: "/admin/isv/crm/field-definitions/{id}",
2435
- ...options,
2436
- headers: {
2437
- "Content-Type": "application/vnd.api+json",
2438
- ...options.headers
2439
- }
2440
- });
2441
2436
  var postAdminEmailMarketingCampaigns = (options) => (options.client ?? client).post({
2442
2437
  security: [{ scheme: "bearer", type: "http" }],
2443
2438
  url: "/admin/email-marketing/campaigns",
@@ -2734,6 +2729,11 @@ var getAdminCrmDealsWorkspaceByWorkspaceId = (options) => (options.client ?? cli
2734
2729
  url: "/admin/crm/deals/workspace/{workspace_id}",
2735
2730
  ...options
2736
2731
  });
2732
+ var getAdminCrmFieldDefinitionsEntityTypeByEntityType = (options) => (options.client ?? client).get({
2733
+ security: [{ scheme: "bearer", type: "http" }],
2734
+ url: "/admin/crm/field-definitions/entity-type/{entity_type}",
2735
+ ...options
2736
+ });
2737
2737
  var getAdminSchedulingEventTypesById = (options) => (options.client ?? client).get({
2738
2738
  security: [{ scheme: "bearer", type: "http" }],
2739
2739
  url: "/admin/scheduling/event-types/{id}",
@@ -2852,15 +2852,6 @@ var getAdminExtractionDocumentsWorkspaceByWorkspaceIdByStatusByStatus = (options
2852
2852
  url: "/admin/extraction/documents/workspace/{workspace_id}/by-status/{status}",
2853
2853
  ...options
2854
2854
  });
2855
- var postAdminIsvCrmSyncConfigs = (options) => (options.client ?? client).post({
2856
- security: [{ scheme: "bearer", type: "http" }],
2857
- url: "/admin/isv/crm/sync-configs",
2858
- ...options,
2859
- headers: {
2860
- "Content-Type": "application/vnd.api+json",
2861
- ...options.headers
2862
- }
2863
- });
2864
2855
  var getAdminIsvCrmEntityTypesApplicationByApplicationId = (options) => (options.client ?? client).get({
2865
2856
  security: [{ scheme: "bearer", type: "http" }],
2866
2857
  url: "/admin/isv/crm/entity-types/application/{application_id}",
@@ -3072,6 +3063,11 @@ var getAdminSocialMetricsPostBySocialPostIdLatest = (options) => (options.client
3072
3063
  url: "/admin/social/metrics/post/{social_post_id}/latest",
3073
3064
  ...options
3074
3065
  });
3066
+ var getAdminCrmSyncConfigsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
3067
+ security: [{ scheme: "bearer", type: "http" }],
3068
+ url: "/admin/crm/sync-configs/workspace/{workspace_id}",
3069
+ ...options
3070
+ });
3075
3071
  var postAdminEmailOutboundEmails = (options) => (options.client ?? client).post({
3076
3072
  security: [{ scheme: "bearer", type: "http" }],
3077
3073
  url: "/admin/email/outbound-emails",
@@ -3326,11 +3322,6 @@ var getAdminSupportTicketAttachmentsMessageByTicketMessageId = (options) => (opt
3326
3322
  url: "/admin/support/ticket-attachments/message/{ticket_message_id}",
3327
3323
  ...options
3328
3324
  });
3329
- var getAdminIsvCrmSyncConfigsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
3330
- security: [{ scheme: "bearer", type: "http" }],
3331
- url: "/admin/isv/crm/sync-configs/workspace/{workspace_id}",
3332
- ...options
3333
- });
3334
3325
  var getAdminWebhookConfigs = (options) => (options.client ?? client).get({
3335
3326
  security: [{ scheme: "bearer", type: "http" }],
3336
3327
  url: "/admin/webhook-configs",
@@ -3618,15 +3609,6 @@ var patchAdminExtractionDocumentsByIdRestore = (options) => (options.client ?? c
3618
3609
  ...options.headers
3619
3610
  }
3620
3611
  });
3621
- var postAdminIsvCrmFieldDefinitions = (options) => (options.client ?? client).post({
3622
- security: [{ scheme: "bearer", type: "http" }],
3623
- url: "/admin/isv/crm/field-definitions",
3624
- ...options,
3625
- headers: {
3626
- "Content-Type": "application/vnd.api+json",
3627
- ...options.headers
3628
- }
3629
- });
3630
3612
  var postAdminExtractionDocumentsUpload = (options) => (options.client ?? client).post({
3631
3613
  security: [{ scheme: "bearer", type: "http" }],
3632
3614
  url: "/admin/extraction/documents/upload",
@@ -3768,6 +3750,15 @@ var postAdminAgentVersionsByIdRemoveSystemField = (options) => (options.client ?
3768
3750
  ...options.headers
3769
3751
  }
3770
3752
  });
3753
+ var postAdminCrmFieldDefinitions = (options) => (options.client ?? client).post({
3754
+ security: [{ scheme: "bearer", type: "http" }],
3755
+ url: "/admin/crm/field-definitions",
3756
+ ...options,
3757
+ headers: {
3758
+ "Content-Type": "application/vnd.api+json",
3759
+ ...options.headers
3760
+ }
3761
+ });
3771
3762
  var getAdminApiKeysStats = (options) => (options.client ?? client).get({
3772
3763
  security: [{ scheme: "bearer", type: "http" }],
3773
3764
  url: "/admin/api-keys/stats",
@@ -3796,11 +3787,6 @@ var postAdminSupportRoutingRules = (options) => (options.client ?? client).post(
3796
3787
  ...options.headers
3797
3788
  }
3798
3789
  });
3799
- var getAdminIsvCrmFieldDefinitionsEntityTypeByEntityType = (options) => (options.client ?? client).get({
3800
- security: [{ scheme: "bearer", type: "http" }],
3801
- url: "/admin/isv/crm/field-definitions/entity-type/{entity_type}",
3802
- ...options
3803
- });
3804
3790
  var getAdminSocialPostsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
3805
3791
  security: [{ scheme: "bearer", type: "http" }],
3806
3792
  url: "/admin/social/posts/workspace/{workspace_id}",
@@ -3927,20 +3913,6 @@ var patchAdminCrmPipelineStagesById = (options) => (options.client ?? client).pa
3927
3913
  ...options.headers
3928
3914
  }
3929
3915
  });
3930
- var deleteAdminIsvCrmSyncConfigsById = (options) => (options.client ?? client).delete({
3931
- security: [{ scheme: "bearer", type: "http" }],
3932
- url: "/admin/isv/crm/sync-configs/{id}",
3933
- ...options
3934
- });
3935
- var patchAdminIsvCrmSyncConfigsById = (options) => (options.client ?? client).patch({
3936
- security: [{ scheme: "bearer", type: "http" }],
3937
- url: "/admin/isv/crm/sync-configs/{id}",
3938
- ...options,
3939
- headers: {
3940
- "Content-Type": "application/vnd.api+json",
3941
- ...options.headers
3942
- }
3943
- });
3944
3916
  var postAdminSupportAiConfigs = (options) => (options.client ?? client).post({
3945
3917
  security: [{ scheme: "bearer", type: "http" }],
3946
3918
  url: "/admin/support/ai-configs",
@@ -4242,6 +4214,25 @@ var getAdminSocialMetricsAccountBySocialAccountId = (options) => (options.client
4242
4214
  url: "/admin/social/metrics/account/{social_account_id}",
4243
4215
  ...options
4244
4216
  });
4217
+ var deleteAdminCrmFieldDefinitionsById = (options) => (options.client ?? client).delete({
4218
+ security: [{ scheme: "bearer", type: "http" }],
4219
+ url: "/admin/crm/field-definitions/{id}",
4220
+ ...options
4221
+ });
4222
+ var getAdminCrmFieldDefinitionsById = (options) => (options.client ?? client).get({
4223
+ security: [{ scheme: "bearer", type: "http" }],
4224
+ url: "/admin/crm/field-definitions/{id}",
4225
+ ...options
4226
+ });
4227
+ var patchAdminCrmFieldDefinitionsById = (options) => (options.client ?? client).patch({
4228
+ security: [{ scheme: "bearer", type: "http" }],
4229
+ url: "/admin/crm/field-definitions/{id}",
4230
+ ...options,
4231
+ headers: {
4232
+ "Content-Type": "application/vnd.api+json",
4233
+ ...options.headers
4234
+ }
4235
+ });
4245
4236
  var getAdminCrmCompaniesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
4246
4237
  security: [{ scheme: "bearer", type: "http" }],
4247
4238
  url: "/admin/crm/companies/workspace/{workspace_id}",
@@ -4616,6 +4607,25 @@ var postAdminAgentsByIdValidate = (options) => (options.client ?? client).post({
4616
4607
  ...options.headers
4617
4608
  }
4618
4609
  });
4610
+ var deleteAdminPipelinesById = (options) => (options.client ?? client).delete({
4611
+ security: [{ scheme: "bearer", type: "http" }],
4612
+ url: "/admin/pipelines/{id}",
4613
+ ...options
4614
+ });
4615
+ var getAdminPipelinesById = (options) => (options.client ?? client).get({
4616
+ security: [{ scheme: "bearer", type: "http" }],
4617
+ url: "/admin/pipelines/{id}",
4618
+ ...options
4619
+ });
4620
+ var patchAdminPipelinesById = (options) => (options.client ?? client).patch({
4621
+ security: [{ scheme: "bearer", type: "http" }],
4622
+ url: "/admin/pipelines/{id}",
4623
+ ...options,
4624
+ headers: {
4625
+ "Content-Type": "application/vnd.api+json",
4626
+ ...options.headers
4627
+ }
4628
+ });
4619
4629
  var deleteAdminSocialPostsById = (options) => (options.client ?? client).delete({
4620
4630
  security: [{ scheme: "bearer", type: "http" }],
4621
4631
  url: "/admin/social/posts/{id}",
@@ -4667,6 +4677,20 @@ var getAdminExtractionBatchesByIdUploadUrls = (options) => (options.client ?? cl
4667
4677
  url: "/admin/extraction/batches/{id}/upload-urls",
4668
4678
  ...options
4669
4679
  });
4680
+ var deleteAdminCrmSyncConfigsById = (options) => (options.client ?? client).delete({
4681
+ security: [{ scheme: "bearer", type: "http" }],
4682
+ url: "/admin/crm/sync-configs/{id}",
4683
+ ...options
4684
+ });
4685
+ var patchAdminCrmSyncConfigsById = (options) => (options.client ?? client).patch({
4686
+ security: [{ scheme: "bearer", type: "http" }],
4687
+ url: "/admin/crm/sync-configs/{id}",
4688
+ ...options,
4689
+ headers: {
4690
+ "Content-Type": "application/vnd.api+json",
4691
+ ...options.headers
4692
+ }
4693
+ });
4670
4694
  var getAdminLlmAnalyticsCosts = (options) => (options.client ?? client).get({
4671
4695
  security: [{ scheme: "bearer", type: "http" }],
4672
4696
  url: "/admin/llm-analytics/costs",
@@ -4837,31 +4861,6 @@ function createAgentsNamespace(rb) {
4837
4861
  options
4838
4862
  );
4839
4863
  },
4840
- /**
4841
- * Runs prediction/inference on an agent.
4842
- *
4843
- * @param agentId - The UUID of the agent.
4844
- * @param input - Input data for prediction.
4845
- * @param options - Optional request options.
4846
- * @returns Prediction result.
4847
- *
4848
- * @example
4849
- * const result = await admin.agents.predict('agt_01...', { text: 'Classify this' });
4850
- */
4851
- predict: async (agentId, input, options) => {
4852
- return rb.execute(
4853
- postAdminAgentsPredict,
4854
- {
4855
- body: {
4856
- data: {
4857
- type: "agent",
4858
- attributes: { agent_id: agentId, ...input }
4859
- }
4860
- }
4861
- },
4862
- options
4863
- );
4864
- },
4865
4864
  /**
4866
4865
  * Runs an agent against a test input and returns the result.
4867
4866
  *
@@ -10850,7 +10849,7 @@ function createCrmNamespace(rb) {
10850
10849
  /** Get a field definition by ID. */
10851
10850
  get: async (id, options) => {
10852
10851
  return rb.execute(
10853
- getAdminIsvCrmFieldDefinitionsById,
10852
+ getAdminCrmFieldDefinitionsById,
10854
10853
  { path: { id } },
10855
10854
  options
10856
10855
  );
@@ -10858,7 +10857,7 @@ function createCrmNamespace(rb) {
10858
10857
  /** List field definitions by entity type. */
10859
10858
  listByEntityType: async (entityType, options) => {
10860
10859
  return rb.execute(
10861
- getAdminIsvCrmFieldDefinitionsEntityTypeByEntityType,
10860
+ getAdminCrmFieldDefinitionsEntityTypeByEntityType,
10862
10861
  { path: { entity_type: entityType } },
10863
10862
  options
10864
10863
  );
@@ -10866,7 +10865,7 @@ function createCrmNamespace(rb) {
10866
10865
  /** Create a field definition. */
10867
10866
  create: async (attributes, options) => {
10868
10867
  return rb.execute(
10869
- postAdminIsvCrmFieldDefinitions,
10868
+ postAdminCrmFieldDefinitions,
10870
10869
  {
10871
10870
  body: { data: { type: "crm_custom_field_definition", attributes } }
10872
10871
  },
@@ -10876,7 +10875,7 @@ function createCrmNamespace(rb) {
10876
10875
  /** Update a field definition. */
10877
10876
  update: async (id, attributes, options) => {
10878
10877
  return rb.execute(
10879
- patchAdminIsvCrmFieldDefinitionsById,
10878
+ patchAdminCrmFieldDefinitionsById,
10880
10879
  {
10881
10880
  path: { id },
10882
10881
  body: {
@@ -10889,7 +10888,7 @@ function createCrmNamespace(rb) {
10889
10888
  /** Delete a field definition. */
10890
10889
  delete: async (id, options) => {
10891
10890
  return rb.execute(
10892
- deleteAdminIsvCrmFieldDefinitionsById,
10891
+ deleteAdminCrmFieldDefinitionsById,
10893
10892
  { path: { id } },
10894
10893
  options
10895
10894
  );
@@ -10934,7 +10933,7 @@ function createCrmNamespace(rb) {
10934
10933
  /** List sync configs by workspace. */
10935
10934
  listByWorkspace: async (workspaceId, options) => {
10936
10935
  return rb.execute(
10937
- getAdminIsvCrmSyncConfigsWorkspaceByWorkspaceId,
10936
+ getAdminCrmSyncConfigsWorkspaceByWorkspaceId,
10938
10937
  { path: { workspace_id: workspaceId } },
10939
10938
  options
10940
10939
  );
@@ -10942,7 +10941,7 @@ function createCrmNamespace(rb) {
10942
10941
  /** Create a sync config. */
10943
10942
  create: async (attributes, options) => {
10944
10943
  return rb.execute(
10945
- postAdminIsvCrmSyncConfigs,
10944
+ postAdminCrmSyncConfigs,
10946
10945
  { body: { data: { type: "crm_sync_config", attributes } } },
10947
10946
  options
10948
10947
  );
@@ -10950,7 +10949,7 @@ function createCrmNamespace(rb) {
10950
10949
  /** Update a sync config. */
10951
10950
  update: async (id, attributes, options) => {
10952
10951
  return rb.execute(
10953
- patchAdminIsvCrmSyncConfigsById,
10952
+ patchAdminCrmSyncConfigsById,
10954
10953
  {
10955
10954
  path: { id },
10956
10955
  body: { data: { type: "crm_sync_config", id, attributes } }
@@ -10961,7 +10960,7 @@ function createCrmNamespace(rb) {
10961
10960
  /** Delete a sync config. */
10962
10961
  delete: async (id, options) => {
10963
10962
  return rb.execute(
10964
- deleteAdminIsvCrmSyncConfigsById,
10963
+ deleteAdminCrmSyncConfigsById,
10965
10964
  { path: { id } },
10966
10965
  options
10967
10966
  );
@@ -11818,6 +11817,100 @@ function createComplianceNamespace(rb) {
11818
11817
  };
11819
11818
  }
11820
11819
 
11820
+ // src/namespaces/pipelines.ts
11821
+ var postAdminPipelinesByIdTrigger = (options) => (options.client ?? null).post({
11822
+ url: "/admin/pipelines/{id}/trigger",
11823
+ ...options,
11824
+ headers: { "Content-Type": "application/vnd.api+json", ...options.headers }
11825
+ });
11826
+ function createPipelinesNamespace(rb) {
11827
+ return {
11828
+ /**
11829
+ * List all pipelines.
11830
+ *
11831
+ * @param options - Optional request options.
11832
+ * @returns Array of pipelines.
11833
+ */
11834
+ async list(options) {
11835
+ return rb.execute(getAdminPipelines, {}, options);
11836
+ },
11837
+ /**
11838
+ * Get a pipeline by ID.
11839
+ *
11840
+ * @param id - Pipeline UUID.
11841
+ * @param options - Optional request options.
11842
+ * @returns Pipeline resource.
11843
+ */
11844
+ async get(id, options) {
11845
+ return rb.execute(getAdminPipelinesById, { path: { id } }, options);
11846
+ },
11847
+ /**
11848
+ * Create a new pipeline.
11849
+ *
11850
+ * @param attributes - Pipeline configuration including node DAG.
11851
+ * @param options - Optional request options.
11852
+ * @returns Created pipeline resource.
11853
+ */
11854
+ async create(attributes, options) {
11855
+ return rb.execute(
11856
+ postAdminPipelines,
11857
+ { body: { data: { type: "pipeline", attributes } } },
11858
+ options
11859
+ );
11860
+ },
11861
+ /**
11862
+ * Update an existing pipeline.
11863
+ *
11864
+ * @param id - Pipeline UUID.
11865
+ * @param attributes - Fields to update.
11866
+ * @param options - Optional request options.
11867
+ * @returns Updated pipeline resource.
11868
+ */
11869
+ async update(id, attributes, options) {
11870
+ return rb.execute(
11871
+ patchAdminPipelinesById,
11872
+ { path: { id }, body: { data: { type: "pipeline", id, attributes } } },
11873
+ options
11874
+ );
11875
+ },
11876
+ /**
11877
+ * Delete a pipeline.
11878
+ *
11879
+ * @param id - Pipeline UUID.
11880
+ * @param options - Optional request options.
11881
+ */
11882
+ async delete(id, options) {
11883
+ return rb.execute(deleteAdminPipelinesById, { path: { id } }, options);
11884
+ },
11885
+ /**
11886
+ * Trigger pipeline execution.
11887
+ *
11888
+ * @param id - Pipeline UUID.
11889
+ * @param attributes - Execution parameters including workspace_id and input.
11890
+ * @param options - Optional request options.
11891
+ * @returns Pipeline execution result map.
11892
+ */
11893
+ async trigger(id, attributes, options) {
11894
+ return rb.execute(
11895
+ postAdminPipelinesByIdTrigger,
11896
+ {
11897
+ path: { id },
11898
+ body: {
11899
+ data: {
11900
+ type: "pipeline",
11901
+ attributes: {
11902
+ pipeline_id: id,
11903
+ ...attributes
11904
+ }
11905
+ }
11906
+ }
11907
+ },
11908
+ options
11909
+ );
11910
+ }
11911
+ };
11912
+ }
11913
+
11821
11914
  // src/namespaces/tenants.ts
11822
11915
  function createTenantsNamespace(rb) {
11823
11916
  return {
@@ -11893,6 +11986,7 @@ var GptAdmin = class extends BaseClient {
11893
11986
  this.ai = createAiNamespace(rb);
11894
11987
  this.crmClusters = createCrmClustersNamespace(rb);
11895
11988
  this.compliance = createComplianceNamespace(rb);
11989
+ this.pipelines = createPipelinesNamespace(rb);
11896
11990
  this.tenants = createTenantsNamespace(rb);
11897
11991
  }
11898
11992
  };