@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.js CHANGED
@@ -853,8 +853,8 @@ var createClient = (config = {}) => {
853
853
  };
854
854
 
855
855
  // src/version.ts
856
- var SDK_VERSION = "0.5.2";
857
- var DEFAULT_API_VERSION = "2026-02-27";
856
+ var SDK_VERSION = "0.6.1";
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
  *
@@ -10889,7 +10888,7 @@ function createCrmNamespace(rb) {
10889
10888
  /** Get a field definition by ID. */
10890
10889
  get: async (id, options) => {
10891
10890
  return rb.execute(
10892
- getAdminIsvCrmFieldDefinitionsById,
10891
+ getAdminCrmFieldDefinitionsById,
10893
10892
  { path: { id } },
10894
10893
  options
10895
10894
  );
@@ -10897,7 +10896,7 @@ function createCrmNamespace(rb) {
10897
10896
  /** List field definitions by entity type. */
10898
10897
  listByEntityType: async (entityType, options) => {
10899
10898
  return rb.execute(
10900
- getAdminIsvCrmFieldDefinitionsEntityTypeByEntityType,
10899
+ getAdminCrmFieldDefinitionsEntityTypeByEntityType,
10901
10900
  { path: { entity_type: entityType } },
10902
10901
  options
10903
10902
  );
@@ -10905,7 +10904,7 @@ function createCrmNamespace(rb) {
10905
10904
  /** Create a field definition. */
10906
10905
  create: async (attributes, options) => {
10907
10906
  return rb.execute(
10908
- postAdminIsvCrmFieldDefinitions,
10907
+ postAdminCrmFieldDefinitions,
10909
10908
  {
10910
10909
  body: { data: { type: "crm_custom_field_definition", attributes } }
10911
10910
  },
@@ -10915,7 +10914,7 @@ function createCrmNamespace(rb) {
10915
10914
  /** Update a field definition. */
10916
10915
  update: async (id, attributes, options) => {
10917
10916
  return rb.execute(
10918
- patchAdminIsvCrmFieldDefinitionsById,
10917
+ patchAdminCrmFieldDefinitionsById,
10919
10918
  {
10920
10919
  path: { id },
10921
10920
  body: {
@@ -10928,7 +10927,7 @@ function createCrmNamespace(rb) {
10928
10927
  /** Delete a field definition. */
10929
10928
  delete: async (id, options) => {
10930
10929
  return rb.execute(
10931
- deleteAdminIsvCrmFieldDefinitionsById,
10930
+ deleteAdminCrmFieldDefinitionsById,
10932
10931
  { path: { id } },
10933
10932
  options
10934
10933
  );
@@ -10973,7 +10972,7 @@ function createCrmNamespace(rb) {
10973
10972
  /** List sync configs by workspace. */
10974
10973
  listByWorkspace: async (workspaceId, options) => {
10975
10974
  return rb.execute(
10976
- getAdminIsvCrmSyncConfigsWorkspaceByWorkspaceId,
10975
+ getAdminCrmSyncConfigsWorkspaceByWorkspaceId,
10977
10976
  { path: { workspace_id: workspaceId } },
10978
10977
  options
10979
10978
  );
@@ -10981,7 +10980,7 @@ function createCrmNamespace(rb) {
10981
10980
  /** Create a sync config. */
10982
10981
  create: async (attributes, options) => {
10983
10982
  return rb.execute(
10984
- postAdminIsvCrmSyncConfigs,
10983
+ postAdminCrmSyncConfigs,
10985
10984
  { body: { data: { type: "crm_sync_config", attributes } } },
10986
10985
  options
10987
10986
  );
@@ -10989,7 +10988,7 @@ function createCrmNamespace(rb) {
10989
10988
  /** Update a sync config. */
10990
10989
  update: async (id, attributes, options) => {
10991
10990
  return rb.execute(
10992
- patchAdminIsvCrmSyncConfigsById,
10991
+ patchAdminCrmSyncConfigsById,
10993
10992
  {
10994
10993
  path: { id },
10995
10994
  body: { data: { type: "crm_sync_config", id, attributes } }
@@ -11000,7 +10999,7 @@ function createCrmNamespace(rb) {
11000
10999
  /** Delete a sync config. */
11001
11000
  delete: async (id, options) => {
11002
11001
  return rb.execute(
11003
- deleteAdminIsvCrmSyncConfigsById,
11002
+ deleteAdminCrmSyncConfigsById,
11004
11003
  { path: { id } },
11005
11004
  options
11006
11005
  );
@@ -11857,6 +11856,100 @@ function createComplianceNamespace(rb) {
11857
11856
  };
11858
11857
  }
11859
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
+
11860
11953
  // src/namespaces/tenants.ts
11861
11954
  function createTenantsNamespace(rb) {
11862
11955
  return {
@@ -11932,6 +12025,7 @@ var GptAdmin = class extends BaseClient {
11932
12025
  this.ai = createAiNamespace(rb);
11933
12026
  this.crmClusters = createCrmClustersNamespace(rb);
11934
12027
  this.compliance = createComplianceNamespace(rb);
12028
+ this.pipelines = createPipelinesNamespace(rb);
11935
12029
  this.tenants = createTenantsNamespace(rb);
11936
12030
  }
11937
12031
  };