@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.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +111 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +111 -2
- package/dist/index.mjs.map +1 -1
- package/llms.txt +98 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -606,7 +606,7 @@ declare class BrowserApiKeyError extends Error {
|
|
|
606
606
|
}
|
|
607
607
|
|
|
608
608
|
/** SDK version — updated automatically by mix update.sdks */
|
|
609
|
-
declare const SDK_VERSION = "0.7.
|
|
609
|
+
declare const SDK_VERSION = "0.7.2";
|
|
610
610
|
/** Default API version sent in every request — updated automatically by mix update.sdks */
|
|
611
611
|
declare const DEFAULT_API_VERSION = "2026-03-11";
|
|
612
612
|
|
|
@@ -20970,6 +20970,7 @@ declare class GptClient extends BaseClient {
|
|
|
20970
20970
|
update: (id: string, attributes: UpdateCrmContactAttributes, options?: RequestOptions) => Promise<CrmContact>;
|
|
20971
20971
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
20972
20972
|
listByWorkspace: (workspaceId: string, options?: {
|
|
20973
|
+
name?: string;
|
|
20973
20974
|
status?: "lead" | "marketing_qualified" | "sales_qualified" | "opportunity" | "customer" | "evangelist" | "churned";
|
|
20974
20975
|
filters?: AttributeFilter[];
|
|
20975
20976
|
tags?: string[];
|
|
@@ -20997,6 +20998,7 @@ declare class GptClient extends BaseClient {
|
|
|
20997
20998
|
get: (id: string, options?: RequestOptions) => Promise<CrmDeal>;
|
|
20998
20999
|
create: (attributes: CreateCrmDealAttributes, options?: RequestOptions) => Promise<CrmDeal>;
|
|
20999
21000
|
update: (id: string, attributes: UpdateCrmDealAttributes, options?: RequestOptions) => Promise<CrmDeal>;
|
|
21001
|
+
moveStage: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CrmDeal>;
|
|
21000
21002
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
21001
21003
|
listByWorkspace: (workspaceId: string, options?: {
|
|
21002
21004
|
page?: number;
|
|
@@ -21006,6 +21008,7 @@ declare class GptClient extends BaseClient {
|
|
|
21006
21008
|
activities: {
|
|
21007
21009
|
get: (id: string, options?: RequestOptions) => Promise<CrmActivity>;
|
|
21008
21010
|
create: (attributes: CreateCrmActivityAttributes, options?: RequestOptions) => Promise<CrmActivity>;
|
|
21011
|
+
update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CrmActivity>;
|
|
21009
21012
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
21010
21013
|
listByWorkspace: (workspaceId: string, options?: {
|
|
21011
21014
|
page?: number;
|
|
@@ -21024,6 +21027,7 @@ declare class GptClient extends BaseClient {
|
|
|
21024
21027
|
create: (attributes: CreateCrmPipelineStageAttributes, options?: RequestOptions) => Promise<CrmPipelineStage>;
|
|
21025
21028
|
update: (id: string, attributes: UpdateCrmPipelineStageAttributes, options?: RequestOptions) => Promise<CrmPipelineStage>;
|
|
21026
21029
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
21030
|
+
listByPipeline: (pipelineId: string, options?: RequestOptions) => Promise<CrmPipelineStage[]>;
|
|
21027
21031
|
};
|
|
21028
21032
|
relationshipTypes: {
|
|
21029
21033
|
get: (id: string, options?: RequestOptions) => Promise<CrmRelationshipType>;
|
package/dist/index.d.ts
CHANGED
|
@@ -606,7 +606,7 @@ declare class BrowserApiKeyError extends Error {
|
|
|
606
606
|
}
|
|
607
607
|
|
|
608
608
|
/** SDK version — updated automatically by mix update.sdks */
|
|
609
|
-
declare const SDK_VERSION = "0.7.
|
|
609
|
+
declare const SDK_VERSION = "0.7.2";
|
|
610
610
|
/** Default API version sent in every request — updated automatically by mix update.sdks */
|
|
611
611
|
declare const DEFAULT_API_VERSION = "2026-03-11";
|
|
612
612
|
|
|
@@ -20970,6 +20970,7 @@ declare class GptClient extends BaseClient {
|
|
|
20970
20970
|
update: (id: string, attributes: UpdateCrmContactAttributes, options?: RequestOptions) => Promise<CrmContact>;
|
|
20971
20971
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
20972
20972
|
listByWorkspace: (workspaceId: string, options?: {
|
|
20973
|
+
name?: string;
|
|
20973
20974
|
status?: "lead" | "marketing_qualified" | "sales_qualified" | "opportunity" | "customer" | "evangelist" | "churned";
|
|
20974
20975
|
filters?: AttributeFilter[];
|
|
20975
20976
|
tags?: string[];
|
|
@@ -20997,6 +20998,7 @@ declare class GptClient extends BaseClient {
|
|
|
20997
20998
|
get: (id: string, options?: RequestOptions) => Promise<CrmDeal>;
|
|
20998
20999
|
create: (attributes: CreateCrmDealAttributes, options?: RequestOptions) => Promise<CrmDeal>;
|
|
20999
21000
|
update: (id: string, attributes: UpdateCrmDealAttributes, options?: RequestOptions) => Promise<CrmDeal>;
|
|
21001
|
+
moveStage: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CrmDeal>;
|
|
21000
21002
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
21001
21003
|
listByWorkspace: (workspaceId: string, options?: {
|
|
21002
21004
|
page?: number;
|
|
@@ -21006,6 +21008,7 @@ declare class GptClient extends BaseClient {
|
|
|
21006
21008
|
activities: {
|
|
21007
21009
|
get: (id: string, options?: RequestOptions) => Promise<CrmActivity>;
|
|
21008
21010
|
create: (attributes: CreateCrmActivityAttributes, options?: RequestOptions) => Promise<CrmActivity>;
|
|
21011
|
+
update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CrmActivity>;
|
|
21009
21012
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
21010
21013
|
listByWorkspace: (workspaceId: string, options?: {
|
|
21011
21014
|
page?: number;
|
|
@@ -21024,6 +21027,7 @@ declare class GptClient extends BaseClient {
|
|
|
21024
21027
|
create: (attributes: CreateCrmPipelineStageAttributes, options?: RequestOptions) => Promise<CrmPipelineStage>;
|
|
21025
21028
|
update: (id: string, attributes: UpdateCrmPipelineStageAttributes, options?: RequestOptions) => Promise<CrmPipelineStage>;
|
|
21026
21029
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
21030
|
+
listByPipeline: (pipelineId: string, options?: RequestOptions) => Promise<CrmPipelineStage[]>;
|
|
21027
21031
|
};
|
|
21028
21032
|
relationshipTypes: {
|
|
21029
21033
|
get: (id: string, options?: RequestOptions) => Promise<CrmRelationshipType>;
|
package/dist/index.js
CHANGED
|
@@ -1333,7 +1333,7 @@ function buildUserAgent(sdkVersion, appInfo) {
|
|
|
1333
1333
|
}
|
|
1334
1334
|
|
|
1335
1335
|
// src/version.ts
|
|
1336
|
-
var SDK_VERSION = "0.7.
|
|
1336
|
+
var SDK_VERSION = "0.7.2";
|
|
1337
1337
|
var DEFAULT_API_VERSION = "2026-03-11";
|
|
1338
1338
|
|
|
1339
1339
|
// src/base-client.ts
|
|
@@ -2223,6 +2223,15 @@ var postAgentsImport = (options) => (options.client ?? client).post({
|
|
|
2223
2223
|
...options.headers
|
|
2224
2224
|
}
|
|
2225
2225
|
});
|
|
2226
|
+
var postUsersAuthPasswordResetRequest = (options) => (options.client ?? client).post({
|
|
2227
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2228
|
+
url: "/users/auth/password-reset/request",
|
|
2229
|
+
...options,
|
|
2230
|
+
headers: {
|
|
2231
|
+
"Content-Type": "application/vnd.api+json",
|
|
2232
|
+
...options.headers
|
|
2233
|
+
}
|
|
2234
|
+
});
|
|
2226
2235
|
var getExtractionBatchesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
2227
2236
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2228
2237
|
url: "/extraction/batches/workspace/{workspace_id}",
|
|
@@ -3627,6 +3636,11 @@ var postInvitations = (options) => (options.client ?? client).post({
|
|
|
3627
3636
|
...options.headers
|
|
3628
3637
|
}
|
|
3629
3638
|
});
|
|
3639
|
+
var getCrmPipelineStagesPipelineByPipelineId = (options) => (options.client ?? client).get({
|
|
3640
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3641
|
+
url: "/crm/pipeline-stages/pipeline/{pipeline_id}",
|
|
3642
|
+
...options
|
|
3643
|
+
});
|
|
3630
3644
|
var patchThreadsByIdArchive = (options) => (options.client ?? client).patch({
|
|
3631
3645
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3632
3646
|
url: "/threads/{id}/archive",
|
|
@@ -4538,6 +4552,15 @@ var getCrmActivitiesById = (options) => (options.client ?? client).get({
|
|
|
4538
4552
|
url: "/crm/activities/{id}",
|
|
4539
4553
|
...options
|
|
4540
4554
|
});
|
|
4555
|
+
var patchCrmActivitiesById = (options) => (options.client ?? client).patch({
|
|
4556
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4557
|
+
url: "/crm/activities/{id}",
|
|
4558
|
+
...options,
|
|
4559
|
+
headers: {
|
|
4560
|
+
"Content-Type": "application/vnd.api+json",
|
|
4561
|
+
...options.headers
|
|
4562
|
+
}
|
|
4563
|
+
});
|
|
4541
4564
|
var postTrainingExamplesSearch = (options) => (options.client ?? client).post({
|
|
4542
4565
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4543
4566
|
url: "/training-examples/search",
|
|
@@ -5863,6 +5886,15 @@ var patchStorageFilesByIdTag = (options) => (options.client ?? client).patch({
|
|
|
5863
5886
|
...options.headers
|
|
5864
5887
|
}
|
|
5865
5888
|
});
|
|
5889
|
+
var patchCrmDealsByIdMoveStage = (options) => (options.client ?? client).patch({
|
|
5890
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5891
|
+
url: "/crm/deals/{id}/move-stage",
|
|
5892
|
+
...options,
|
|
5893
|
+
headers: {
|
|
5894
|
+
"Content-Type": "application/vnd.api+json",
|
|
5895
|
+
...options.headers
|
|
5896
|
+
}
|
|
5897
|
+
});
|
|
5866
5898
|
var getApiKeys = (options) => (options.client ?? client).get({
|
|
5867
5899
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5868
5900
|
url: "/api-keys",
|
|
@@ -14292,6 +14324,7 @@ function createCrmNamespace(rb) {
|
|
|
14292
14324
|
{
|
|
14293
14325
|
path: { workspace_id: workspaceId },
|
|
14294
14326
|
query: {
|
|
14327
|
+
...options?.name ? { name: options.name } : {},
|
|
14295
14328
|
...options?.status ? { status: options.status } : {},
|
|
14296
14329
|
...options?.filters ? { filters: options.filters } : {},
|
|
14297
14330
|
...options?.tags ? { tags: options.tags } : {},
|
|
@@ -14622,6 +14655,33 @@ function createCrmNamespace(rb) {
|
|
|
14622
14655
|
options
|
|
14623
14656
|
);
|
|
14624
14657
|
},
|
|
14658
|
+
/**
|
|
14659
|
+
* Move a deal to a different pipeline stage.
|
|
14660
|
+
*
|
|
14661
|
+
* @param id - The unique identifier of the deal to move.
|
|
14662
|
+
* @param attributes - Must include `stage_id` (the target stage).
|
|
14663
|
+
* @param options - Optional request-level overrides.
|
|
14664
|
+
* @returns A promise that resolves to the updated {@link CrmDeal}.
|
|
14665
|
+
*
|
|
14666
|
+
* @example
|
|
14667
|
+
* ```typescript
|
|
14668
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
14669
|
+
*
|
|
14670
|
+
* const deal = await client.crm.deals.moveStage('deal_abc123', {
|
|
14671
|
+
* stage_id: 'stage_closed_won',
|
|
14672
|
+
* });
|
|
14673
|
+
* ```
|
|
14674
|
+
*/
|
|
14675
|
+
moveStage: async (id, attributes, options) => {
|
|
14676
|
+
return rb.execute(
|
|
14677
|
+
patchCrmDealsByIdMoveStage,
|
|
14678
|
+
{
|
|
14679
|
+
path: { id },
|
|
14680
|
+
body: { data: { type: "crm_deal", id, attributes } }
|
|
14681
|
+
},
|
|
14682
|
+
options
|
|
14683
|
+
);
|
|
14684
|
+
},
|
|
14625
14685
|
/**
|
|
14626
14686
|
* Permanently delete a deal.
|
|
14627
14687
|
*
|
|
@@ -14732,6 +14792,33 @@ function createCrmNamespace(rb) {
|
|
|
14732
14792
|
options
|
|
14733
14793
|
);
|
|
14734
14794
|
},
|
|
14795
|
+
/**
|
|
14796
|
+
* Update an existing activity's attributes.
|
|
14797
|
+
*
|
|
14798
|
+
* @param id - The unique identifier of the activity to update.
|
|
14799
|
+
* @param attributes - Key/value map of attributes to change.
|
|
14800
|
+
* @param options - Optional request-level overrides.
|
|
14801
|
+
* @returns A promise that resolves to the updated {@link CrmActivity}.
|
|
14802
|
+
*
|
|
14803
|
+
* @example
|
|
14804
|
+
* ```typescript
|
|
14805
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
14806
|
+
*
|
|
14807
|
+
* const activity = await client.crm.activities.update('act_abc123', {
|
|
14808
|
+
* note: 'Updated notes from follow-up call.',
|
|
14809
|
+
* });
|
|
14810
|
+
* ```
|
|
14811
|
+
*/
|
|
14812
|
+
update: async (id, attributes, options) => {
|
|
14813
|
+
return rb.execute(
|
|
14814
|
+
patchCrmActivitiesById,
|
|
14815
|
+
{
|
|
14816
|
+
path: { id },
|
|
14817
|
+
body: { data: { id, type: "crm_activity", attributes } }
|
|
14818
|
+
},
|
|
14819
|
+
options
|
|
14820
|
+
);
|
|
14821
|
+
},
|
|
14735
14822
|
/**
|
|
14736
14823
|
* Permanently delete an activity.
|
|
14737
14824
|
*
|
|
@@ -15018,6 +15105,28 @@ function createCrmNamespace(rb) {
|
|
|
15018
15105
|
{ path: { id } },
|
|
15019
15106
|
options
|
|
15020
15107
|
);
|
|
15108
|
+
},
|
|
15109
|
+
/**
|
|
15110
|
+
* List all stages belonging to a specific pipeline.
|
|
15111
|
+
*
|
|
15112
|
+
* @param pipelineId - The ID of the pipeline whose stages to list.
|
|
15113
|
+
* @param options - Optional request-level overrides.
|
|
15114
|
+
* @returns A promise that resolves to an array of {@link CrmPipelineStage} records.
|
|
15115
|
+
*
|
|
15116
|
+
* @example
|
|
15117
|
+
* ```typescript
|
|
15118
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
15119
|
+
*
|
|
15120
|
+
* const stages = await client.crm.pipelineStages.listByPipeline('pipe_abc123');
|
|
15121
|
+
* stages.forEach((s) => console.log(s.attributes.name, s.attributes.order));
|
|
15122
|
+
* ```
|
|
15123
|
+
*/
|
|
15124
|
+
listByPipeline: async (pipelineId, options) => {
|
|
15125
|
+
return rb.execute(
|
|
15126
|
+
getCrmPipelineStagesPipelineByPipelineId,
|
|
15127
|
+
{ path: { pipeline_id: pipelineId } },
|
|
15128
|
+
options
|
|
15129
|
+
);
|
|
15021
15130
|
}
|
|
15022
15131
|
},
|
|
15023
15132
|
/**
|
|
@@ -19280,7 +19389,7 @@ function createIdentityNamespace(rb, baseUrl) {
|
|
|
19280
19389
|
requestPasswordReset: async (email, options) => {
|
|
19281
19390
|
RequestPasswordResetSchema.parse({ email });
|
|
19282
19391
|
return rb.execute(
|
|
19283
|
-
|
|
19392
|
+
postUsersAuthPasswordResetRequest,
|
|
19284
19393
|
{
|
|
19285
19394
|
body: {
|
|
19286
19395
|
data: { type: "user", attributes: { email } }
|