@gpt-platform/client 0.7.1 → 0.7.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.mjs CHANGED
@@ -1269,7 +1269,7 @@ function buildUserAgent(sdkVersion, appInfo) {
1269
1269
  }
1270
1270
 
1271
1271
  // src/version.ts
1272
- var SDK_VERSION = "0.7.1";
1272
+ var SDK_VERSION = "0.7.2";
1273
1273
  var DEFAULT_API_VERSION = "2026-03-11";
1274
1274
 
1275
1275
  // src/base-client.ts
@@ -2159,6 +2159,15 @@ var postAgentsImport = (options) => (options.client ?? client).post({
2159
2159
  ...options.headers
2160
2160
  }
2161
2161
  });
2162
+ var postUsersAuthPasswordResetRequest = (options) => (options.client ?? client).post({
2163
+ security: [{ scheme: "bearer", type: "http" }],
2164
+ url: "/users/auth/password-reset/request",
2165
+ ...options,
2166
+ headers: {
2167
+ "Content-Type": "application/vnd.api+json",
2168
+ ...options.headers
2169
+ }
2170
+ });
2162
2171
  var getExtractionBatchesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
2163
2172
  security: [{ scheme: "bearer", type: "http" }],
2164
2173
  url: "/extraction/batches/workspace/{workspace_id}",
@@ -3563,6 +3572,11 @@ var postInvitations = (options) => (options.client ?? client).post({
3563
3572
  ...options.headers
3564
3573
  }
3565
3574
  });
3575
+ var getCrmPipelineStagesPipelineByPipelineId = (options) => (options.client ?? client).get({
3576
+ security: [{ scheme: "bearer", type: "http" }],
3577
+ url: "/crm/pipeline-stages/pipeline/{pipeline_id}",
3578
+ ...options
3579
+ });
3566
3580
  var patchThreadsByIdArchive = (options) => (options.client ?? client).patch({
3567
3581
  security: [{ scheme: "bearer", type: "http" }],
3568
3582
  url: "/threads/{id}/archive",
@@ -4474,6 +4488,15 @@ var getCrmActivitiesById = (options) => (options.client ?? client).get({
4474
4488
  url: "/crm/activities/{id}",
4475
4489
  ...options
4476
4490
  });
4491
+ var patchCrmActivitiesById = (options) => (options.client ?? client).patch({
4492
+ security: [{ scheme: "bearer", type: "http" }],
4493
+ url: "/crm/activities/{id}",
4494
+ ...options,
4495
+ headers: {
4496
+ "Content-Type": "application/vnd.api+json",
4497
+ ...options.headers
4498
+ }
4499
+ });
4477
4500
  var postTrainingExamplesSearch = (options) => (options.client ?? client).post({
4478
4501
  security: [{ scheme: "bearer", type: "http" }],
4479
4502
  url: "/training-examples/search",
@@ -5799,6 +5822,15 @@ var patchStorageFilesByIdTag = (options) => (options.client ?? client).patch({
5799
5822
  ...options.headers
5800
5823
  }
5801
5824
  });
5825
+ var patchCrmDealsByIdMoveStage = (options) => (options.client ?? client).patch({
5826
+ security: [{ scheme: "bearer", type: "http" }],
5827
+ url: "/crm/deals/{id}/move-stage",
5828
+ ...options,
5829
+ headers: {
5830
+ "Content-Type": "application/vnd.api+json",
5831
+ ...options.headers
5832
+ }
5833
+ });
5802
5834
  var getApiKeys = (options) => (options.client ?? client).get({
5803
5835
  security: [{ scheme: "bearer", type: "http" }],
5804
5836
  url: "/api-keys",
@@ -14228,6 +14260,7 @@ function createCrmNamespace(rb) {
14228
14260
  {
14229
14261
  path: { workspace_id: workspaceId },
14230
14262
  query: {
14263
+ ...options?.name ? { name: options.name } : {},
14231
14264
  ...options?.status ? { status: options.status } : {},
14232
14265
  ...options?.filters ? { filters: options.filters } : {},
14233
14266
  ...options?.tags ? { tags: options.tags } : {},
@@ -14558,6 +14591,33 @@ function createCrmNamespace(rb) {
14558
14591
  options
14559
14592
  );
14560
14593
  },
14594
+ /**
14595
+ * Move a deal to a different pipeline stage.
14596
+ *
14597
+ * @param id - The unique identifier of the deal to move.
14598
+ * @param attributes - Must include `stage_id` (the target stage).
14599
+ * @param options - Optional request-level overrides.
14600
+ * @returns A promise that resolves to the updated {@link CrmDeal}.
14601
+ *
14602
+ * @example
14603
+ * ```typescript
14604
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
14605
+ *
14606
+ * const deal = await client.crm.deals.moveStage('deal_abc123', {
14607
+ * stage_id: 'stage_closed_won',
14608
+ * });
14609
+ * ```
14610
+ */
14611
+ moveStage: async (id, attributes, options) => {
14612
+ return rb.execute(
14613
+ patchCrmDealsByIdMoveStage,
14614
+ {
14615
+ path: { id },
14616
+ body: { data: { type: "crm_deal", id, attributes } }
14617
+ },
14618
+ options
14619
+ );
14620
+ },
14561
14621
  /**
14562
14622
  * Permanently delete a deal.
14563
14623
  *
@@ -14668,6 +14728,33 @@ function createCrmNamespace(rb) {
14668
14728
  options
14669
14729
  );
14670
14730
  },
14731
+ /**
14732
+ * Update an existing activity's attributes.
14733
+ *
14734
+ * @param id - The unique identifier of the activity to update.
14735
+ * @param attributes - Key/value map of attributes to change.
14736
+ * @param options - Optional request-level overrides.
14737
+ * @returns A promise that resolves to the updated {@link CrmActivity}.
14738
+ *
14739
+ * @example
14740
+ * ```typescript
14741
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
14742
+ *
14743
+ * const activity = await client.crm.activities.update('act_abc123', {
14744
+ * note: 'Updated notes from follow-up call.',
14745
+ * });
14746
+ * ```
14747
+ */
14748
+ update: async (id, attributes, options) => {
14749
+ return rb.execute(
14750
+ patchCrmActivitiesById,
14751
+ {
14752
+ path: { id },
14753
+ body: { data: { id, type: "crm_activity", attributes } }
14754
+ },
14755
+ options
14756
+ );
14757
+ },
14671
14758
  /**
14672
14759
  * Permanently delete an activity.
14673
14760
  *
@@ -14954,6 +15041,28 @@ function createCrmNamespace(rb) {
14954
15041
  { path: { id } },
14955
15042
  options
14956
15043
  );
15044
+ },
15045
+ /**
15046
+ * List all stages belonging to a specific pipeline.
15047
+ *
15048
+ * @param pipelineId - The ID of the pipeline whose stages to list.
15049
+ * @param options - Optional request-level overrides.
15050
+ * @returns A promise that resolves to an array of {@link CrmPipelineStage} records.
15051
+ *
15052
+ * @example
15053
+ * ```typescript
15054
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
15055
+ *
15056
+ * const stages = await client.crm.pipelineStages.listByPipeline('pipe_abc123');
15057
+ * stages.forEach((s) => console.log(s.attributes.name, s.attributes.order));
15058
+ * ```
15059
+ */
15060
+ listByPipeline: async (pipelineId, options) => {
15061
+ return rb.execute(
15062
+ getCrmPipelineStagesPipelineByPipelineId,
15063
+ { path: { pipeline_id: pipelineId } },
15064
+ options
15065
+ );
14957
15066
  }
14958
15067
  },
14959
15068
  /**
@@ -19216,7 +19325,7 @@ function createIdentityNamespace(rb, baseUrl) {
19216
19325
  requestPasswordReset: async (email, options) => {
19217
19326
  RequestPasswordResetSchema.parse({ email });
19218
19327
  return rb.execute(
19219
- patchUsersAuthResetPassword,
19328
+ postUsersAuthPasswordResetRequest,
19220
19329
  {
19221
19330
  body: {
19222
19331
  data: { type: "user", attributes: { email } }