@gpt-platform/client 0.3.3 → 0.3.4
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 +29 -10
- package/dist/index.d.ts +29 -10
- package/dist/index.js +75 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +75 -11
- package/dist/index.mjs.map +1 -1
- package/llms.txt +5 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1077,6 +1077,10 @@ type CrmContact = {
|
|
|
1077
1077
|
* Field included by default.
|
|
1078
1078
|
*/
|
|
1079
1079
|
source?: "manual" | "import" | "channel" | "connector" | "ai_extracted" | "api" | unknown;
|
|
1080
|
+
/**
|
|
1081
|
+
* Field included by default.
|
|
1082
|
+
*/
|
|
1083
|
+
tags?: Array<string> | null | unknown;
|
|
1080
1084
|
/**
|
|
1081
1085
|
* Field included by default.
|
|
1082
1086
|
*/
|
|
@@ -2749,7 +2753,7 @@ type Credential = {
|
|
|
2749
2753
|
/**
|
|
2750
2754
|
* Field included by default.
|
|
2751
2755
|
*/
|
|
2752
|
-
connector_type: "salesforce" | "hubspot" | "slack" | "notion" | "sharepoint" | "gmail" | "outlook" | "microsoft_365" | "jira" | "confluence" | "fullscript" | "fhir_r4" | "github" | "gitlab" | "google_calendar" | "google_chat" | "custom";
|
|
2756
|
+
connector_type: "salesforce" | "hubspot" | "slack" | "notion" | "sharepoint" | "gmail" | "outlook" | "microsoft_365" | "jira" | "confluence" | "fullscript" | "fhir_r4" | "github" | "gitlab" | "google_calendar" | "google_chat" | "custom" | "edamam";
|
|
2753
2757
|
/**
|
|
2754
2758
|
* Number of consecutive token refresh failures. Reset to 0 on successful refresh. Field included by default.
|
|
2755
2759
|
*/
|
|
@@ -3306,7 +3310,7 @@ type ConnectorInstance = {
|
|
|
3306
3310
|
/**
|
|
3307
3311
|
* Field included by default.
|
|
3308
3312
|
*/
|
|
3309
|
-
connector_type: "salesforce" | "hubspot" | "slack" | "notion" | "sharepoint" | "gmail" | "outlook" | "microsoft_365" | "jira" | "confluence" | "fullscript" | "fhir_r4" | "github" | "gitlab" | "google_calendar" | "google_chat" | "custom";
|
|
3313
|
+
connector_type: "salesforce" | "hubspot" | "slack" | "notion" | "sharepoint" | "gmail" | "outlook" | "microsoft_365" | "jira" | "confluence" | "fullscript" | "fhir_r4" | "github" | "gitlab" | "google_calendar" | "google_chat" | "custom" | "edamam";
|
|
3310
3314
|
/**
|
|
3311
3315
|
* Field included by default.
|
|
3312
3316
|
*/
|
|
@@ -5712,9 +5716,9 @@ declare class BrowserApiKeyError extends Error {
|
|
|
5712
5716
|
}
|
|
5713
5717
|
|
|
5714
5718
|
/** SDK version — updated automatically by mix update.sdks */
|
|
5715
|
-
declare const SDK_VERSION = "0.3.
|
|
5719
|
+
declare const SDK_VERSION = "0.3.4";
|
|
5716
5720
|
/** Default API version sent in every request — updated automatically by mix update.sdks */
|
|
5717
|
-
declare const DEFAULT_API_VERSION = "2026-02-
|
|
5721
|
+
declare const DEFAULT_API_VERSION = "2026-02-27";
|
|
5718
5722
|
|
|
5719
5723
|
/** Security configuration options */
|
|
5720
5724
|
interface SecurityConfig {
|
|
@@ -6228,10 +6232,16 @@ interface OAuthSignInOptions {
|
|
|
6228
6232
|
redirectUrl?: string;
|
|
6229
6233
|
}
|
|
6230
6234
|
declare function createIdentityNamespace(rb: RequestBuilder, baseUrl?: string): {
|
|
6231
|
-
/**
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
+
/**
|
|
6236
|
+
* Login with email and password — returns the authenticated user.
|
|
6237
|
+
* The session token is available as `result.token` (flattened from `data.attributes.token`).
|
|
6238
|
+
*/
|
|
6239
|
+
login: (email: string, password: string, options?: RequestOptions) => Promise<User>;
|
|
6240
|
+
/**
|
|
6241
|
+
* Register a new user account — returns the newly created user.
|
|
6242
|
+
* The session token is available as `result.token` (flattened from `data.attributes.token`).
|
|
6243
|
+
*/
|
|
6244
|
+
register: (email: string, password: string, passwordConfirmation: string, tenantName: string, options?: RequestOptions) => Promise<User>;
|
|
6235
6245
|
/** Get the currently authenticated user */
|
|
6236
6246
|
me: (options?: RequestOptions) => Promise<User>;
|
|
6237
6247
|
/** Get the current user profile (alias for me()) */
|
|
@@ -6932,6 +6942,15 @@ declare class GptClient extends BaseClient {
|
|
|
6932
6942
|
update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CrmContact>;
|
|
6933
6943
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
6934
6944
|
listByWorkspace: (workspaceId: string, options?: {
|
|
6945
|
+
status?: "lead" | "marketing_qualified" | "sales_qualified" | "opportunity" | "customer" | "evangelist" | "churned";
|
|
6946
|
+
filters?: AttributeFilter[];
|
|
6947
|
+
tags?: string[];
|
|
6948
|
+
page?: number;
|
|
6949
|
+
pageSize?: number;
|
|
6950
|
+
} & RequestOptions) => Promise<CrmContact[]>;
|
|
6951
|
+
archive: (id: string, options?: RequestOptions) => Promise<CrmContact>;
|
|
6952
|
+
unarchive: (id: string, options?: RequestOptions) => Promise<CrmContact>;
|
|
6953
|
+
listArchived: (workspaceId: string, options?: {
|
|
6935
6954
|
page?: number;
|
|
6936
6955
|
pageSize?: number;
|
|
6937
6956
|
} & RequestOptions) => Promise<CrmContact[]>;
|
|
@@ -7174,8 +7193,8 @@ declare class GptClient extends BaseClient {
|
|
|
7174
7193
|
};
|
|
7175
7194
|
/** User authentication, profiles, and API key management */
|
|
7176
7195
|
readonly identity: {
|
|
7177
|
-
login: (email: string, password: string, options?: RequestOptions) => Promise<
|
|
7178
|
-
register: (email: string, password: string, passwordConfirmation: string, options?: RequestOptions) => Promise<
|
|
7196
|
+
login: (email: string, password: string, options?: RequestOptions) => Promise<User>;
|
|
7197
|
+
register: (email: string, password: string, passwordConfirmation: string, tenantName: string, options?: RequestOptions) => Promise<User>;
|
|
7179
7198
|
me: (options?: RequestOptions) => Promise<User>;
|
|
7180
7199
|
profile: (options?: RequestOptions) => Promise<User>;
|
|
7181
7200
|
list: (options?: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1077,6 +1077,10 @@ type CrmContact = {
|
|
|
1077
1077
|
* Field included by default.
|
|
1078
1078
|
*/
|
|
1079
1079
|
source?: "manual" | "import" | "channel" | "connector" | "ai_extracted" | "api" | unknown;
|
|
1080
|
+
/**
|
|
1081
|
+
* Field included by default.
|
|
1082
|
+
*/
|
|
1083
|
+
tags?: Array<string> | null | unknown;
|
|
1080
1084
|
/**
|
|
1081
1085
|
* Field included by default.
|
|
1082
1086
|
*/
|
|
@@ -2749,7 +2753,7 @@ type Credential = {
|
|
|
2749
2753
|
/**
|
|
2750
2754
|
* Field included by default.
|
|
2751
2755
|
*/
|
|
2752
|
-
connector_type: "salesforce" | "hubspot" | "slack" | "notion" | "sharepoint" | "gmail" | "outlook" | "microsoft_365" | "jira" | "confluence" | "fullscript" | "fhir_r4" | "github" | "gitlab" | "google_calendar" | "google_chat" | "custom";
|
|
2756
|
+
connector_type: "salesforce" | "hubspot" | "slack" | "notion" | "sharepoint" | "gmail" | "outlook" | "microsoft_365" | "jira" | "confluence" | "fullscript" | "fhir_r4" | "github" | "gitlab" | "google_calendar" | "google_chat" | "custom" | "edamam";
|
|
2753
2757
|
/**
|
|
2754
2758
|
* Number of consecutive token refresh failures. Reset to 0 on successful refresh. Field included by default.
|
|
2755
2759
|
*/
|
|
@@ -3306,7 +3310,7 @@ type ConnectorInstance = {
|
|
|
3306
3310
|
/**
|
|
3307
3311
|
* Field included by default.
|
|
3308
3312
|
*/
|
|
3309
|
-
connector_type: "salesforce" | "hubspot" | "slack" | "notion" | "sharepoint" | "gmail" | "outlook" | "microsoft_365" | "jira" | "confluence" | "fullscript" | "fhir_r4" | "github" | "gitlab" | "google_calendar" | "google_chat" | "custom";
|
|
3313
|
+
connector_type: "salesforce" | "hubspot" | "slack" | "notion" | "sharepoint" | "gmail" | "outlook" | "microsoft_365" | "jira" | "confluence" | "fullscript" | "fhir_r4" | "github" | "gitlab" | "google_calendar" | "google_chat" | "custom" | "edamam";
|
|
3310
3314
|
/**
|
|
3311
3315
|
* Field included by default.
|
|
3312
3316
|
*/
|
|
@@ -5712,9 +5716,9 @@ declare class BrowserApiKeyError extends Error {
|
|
|
5712
5716
|
}
|
|
5713
5717
|
|
|
5714
5718
|
/** SDK version — updated automatically by mix update.sdks */
|
|
5715
|
-
declare const SDK_VERSION = "0.3.
|
|
5719
|
+
declare const SDK_VERSION = "0.3.4";
|
|
5716
5720
|
/** Default API version sent in every request — updated automatically by mix update.sdks */
|
|
5717
|
-
declare const DEFAULT_API_VERSION = "2026-02-
|
|
5721
|
+
declare const DEFAULT_API_VERSION = "2026-02-27";
|
|
5718
5722
|
|
|
5719
5723
|
/** Security configuration options */
|
|
5720
5724
|
interface SecurityConfig {
|
|
@@ -6228,10 +6232,16 @@ interface OAuthSignInOptions {
|
|
|
6228
6232
|
redirectUrl?: string;
|
|
6229
6233
|
}
|
|
6230
6234
|
declare function createIdentityNamespace(rb: RequestBuilder, baseUrl?: string): {
|
|
6231
|
-
/**
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
+
/**
|
|
6236
|
+
* Login with email and password — returns the authenticated user.
|
|
6237
|
+
* The session token is available as `result.token` (flattened from `data.attributes.token`).
|
|
6238
|
+
*/
|
|
6239
|
+
login: (email: string, password: string, options?: RequestOptions) => Promise<User>;
|
|
6240
|
+
/**
|
|
6241
|
+
* Register a new user account — returns the newly created user.
|
|
6242
|
+
* The session token is available as `result.token` (flattened from `data.attributes.token`).
|
|
6243
|
+
*/
|
|
6244
|
+
register: (email: string, password: string, passwordConfirmation: string, tenantName: string, options?: RequestOptions) => Promise<User>;
|
|
6235
6245
|
/** Get the currently authenticated user */
|
|
6236
6246
|
me: (options?: RequestOptions) => Promise<User>;
|
|
6237
6247
|
/** Get the current user profile (alias for me()) */
|
|
@@ -6932,6 +6942,15 @@ declare class GptClient extends BaseClient {
|
|
|
6932
6942
|
update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CrmContact>;
|
|
6933
6943
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
6934
6944
|
listByWorkspace: (workspaceId: string, options?: {
|
|
6945
|
+
status?: "lead" | "marketing_qualified" | "sales_qualified" | "opportunity" | "customer" | "evangelist" | "churned";
|
|
6946
|
+
filters?: AttributeFilter[];
|
|
6947
|
+
tags?: string[];
|
|
6948
|
+
page?: number;
|
|
6949
|
+
pageSize?: number;
|
|
6950
|
+
} & RequestOptions) => Promise<CrmContact[]>;
|
|
6951
|
+
archive: (id: string, options?: RequestOptions) => Promise<CrmContact>;
|
|
6952
|
+
unarchive: (id: string, options?: RequestOptions) => Promise<CrmContact>;
|
|
6953
|
+
listArchived: (workspaceId: string, options?: {
|
|
6935
6954
|
page?: number;
|
|
6936
6955
|
pageSize?: number;
|
|
6937
6956
|
} & RequestOptions) => Promise<CrmContact[]>;
|
|
@@ -7174,8 +7193,8 @@ declare class GptClient extends BaseClient {
|
|
|
7174
7193
|
};
|
|
7175
7194
|
/** User authentication, profiles, and API key management */
|
|
7176
7195
|
readonly identity: {
|
|
7177
|
-
login: (email: string, password: string, options?: RequestOptions) => Promise<
|
|
7178
|
-
register: (email: string, password: string, passwordConfirmation: string, options?: RequestOptions) => Promise<
|
|
7196
|
+
login: (email: string, password: string, options?: RequestOptions) => Promise<User>;
|
|
7197
|
+
register: (email: string, password: string, passwordConfirmation: string, tenantName: string, options?: RequestOptions) => Promise<User>;
|
|
7179
7198
|
me: (options?: RequestOptions) => Promise<User>;
|
|
7180
7199
|
profile: (options?: RequestOptions) => Promise<User>;
|
|
7181
7200
|
list: (options?: {
|
package/dist/index.js
CHANGED
|
@@ -1285,8 +1285,8 @@ function buildUserAgent(sdkVersion, appInfo) {
|
|
|
1285
1285
|
}
|
|
1286
1286
|
|
|
1287
1287
|
// src/version.ts
|
|
1288
|
-
var SDK_VERSION = "0.3.
|
|
1289
|
-
var DEFAULT_API_VERSION = "2026-02-
|
|
1288
|
+
var SDK_VERSION = "0.3.4";
|
|
1289
|
+
var DEFAULT_API_VERSION = "2026-02-27";
|
|
1290
1290
|
|
|
1291
1291
|
// src/base-client.ts
|
|
1292
1292
|
function generateUUID() {
|
|
@@ -1843,6 +1843,11 @@ var getSearchIndexes = (options) => (options.client ?? client).get({
|
|
|
1843
1843
|
url: "/search/indexes",
|
|
1844
1844
|
...options
|
|
1845
1845
|
});
|
|
1846
|
+
var postCrmContactsByIdUnarchive = (options) => (options.client ?? client).post({
|
|
1847
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1848
|
+
url: "/crm/contacts/{id}/unarchive",
|
|
1849
|
+
...options
|
|
1850
|
+
});
|
|
1846
1851
|
var deleteTrainingSessionsById = (options) => (options.client ?? client).delete({
|
|
1847
1852
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1848
1853
|
url: "/training-sessions/{id}",
|
|
@@ -3191,6 +3196,11 @@ var postDocumentsPresignedUpload = (options) => (options.client ?? client).post(
|
|
|
3191
3196
|
...options.headers
|
|
3192
3197
|
}
|
|
3193
3198
|
});
|
|
3199
|
+
var getCrmContactsWorkspaceByWorkspaceIdArchived = (options) => (options.client ?? client).get({
|
|
3200
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3201
|
+
url: "/crm/contacts/workspace/{workspace_id}/archived",
|
|
3202
|
+
...options
|
|
3203
|
+
});
|
|
3194
3204
|
var postDocumentsBulkDelete = (options) => (options.client ?? client).post({
|
|
3195
3205
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3196
3206
|
url: "/documents/bulk-delete",
|
|
@@ -3280,6 +3290,15 @@ var patchUserProfilesById = (options) => (options.client ?? client).patch({
|
|
|
3280
3290
|
...options.headers
|
|
3281
3291
|
}
|
|
3282
3292
|
});
|
|
3293
|
+
var patchCrmContactsByIdArchive = (options) => (options.client ?? client).patch({
|
|
3294
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3295
|
+
url: "/crm/contacts/{id}/archive",
|
|
3296
|
+
...options,
|
|
3297
|
+
headers: {
|
|
3298
|
+
"Content-Type": "application/vnd.api+json",
|
|
3299
|
+
...options.headers
|
|
3300
|
+
}
|
|
3301
|
+
});
|
|
3283
3302
|
var patchWebhookConfigsByIdRotateSecret = (options) => (options.client ?? client).patch({
|
|
3284
3303
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3285
3304
|
url: "/webhook-configs/{id}/rotate-secret",
|
|
@@ -5972,7 +5991,9 @@ function createConnectorsNamespace(rb) {
|
|
|
5972
5991
|
code,
|
|
5973
5992
|
state,
|
|
5974
5993
|
workspace_id: workspaceId,
|
|
5975
|
-
...redirectUri !== void 0 && {
|
|
5994
|
+
...redirectUri !== void 0 && {
|
|
5995
|
+
redirect_uri: redirectUri
|
|
5996
|
+
}
|
|
5976
5997
|
}
|
|
5977
5998
|
}
|
|
5978
5999
|
}
|
|
@@ -6103,7 +6124,9 @@ function createConnectorsNamespace(rb) {
|
|
|
6103
6124
|
code,
|
|
6104
6125
|
state,
|
|
6105
6126
|
workspace_id: workspaceId,
|
|
6106
|
-
...redirectUri !== void 0 && {
|
|
6127
|
+
...redirectUri !== void 0 && {
|
|
6128
|
+
redirect_uri: redirectUri
|
|
6129
|
+
}
|
|
6107
6130
|
}
|
|
6108
6131
|
}
|
|
6109
6132
|
}
|
|
@@ -6283,6 +6306,38 @@ function createCrmNamespace(rb) {
|
|
|
6283
6306
|
listByWorkspace: async (workspaceId, options) => {
|
|
6284
6307
|
return rb.execute(
|
|
6285
6308
|
getCrmContactsWorkspaceByWorkspaceId,
|
|
6309
|
+
{
|
|
6310
|
+
path: { workspace_id: workspaceId },
|
|
6311
|
+
query: {
|
|
6312
|
+
...options?.status ? { status: options.status } : {},
|
|
6313
|
+
...options?.filters ? { filters: options.filters } : {},
|
|
6314
|
+
...options?.tags ? { tags: options.tags } : {},
|
|
6315
|
+
...buildPageQuery(options?.page, options?.pageSize)?.query
|
|
6316
|
+
}
|
|
6317
|
+
},
|
|
6318
|
+
options
|
|
6319
|
+
);
|
|
6320
|
+
},
|
|
6321
|
+
/** Archive a contact (soft-delete with restore semantics) */
|
|
6322
|
+
archive: async (id, options) => {
|
|
6323
|
+
return rb.execute(
|
|
6324
|
+
patchCrmContactsByIdArchive,
|
|
6325
|
+
{ path: { id } },
|
|
6326
|
+
options
|
|
6327
|
+
);
|
|
6328
|
+
},
|
|
6329
|
+
/** Restore an archived contact */
|
|
6330
|
+
unarchive: async (id, options) => {
|
|
6331
|
+
return rb.execute(
|
|
6332
|
+
postCrmContactsByIdUnarchive,
|
|
6333
|
+
{ path: { id } },
|
|
6334
|
+
options
|
|
6335
|
+
);
|
|
6336
|
+
},
|
|
6337
|
+
/** List archived (soft-deleted) contacts for a workspace */
|
|
6338
|
+
listArchived: async (workspaceId, options) => {
|
|
6339
|
+
return rb.execute(
|
|
6340
|
+
getCrmContactsWorkspaceByWorkspaceIdArchived,
|
|
6286
6341
|
{
|
|
6287
6342
|
path: { workspace_id: workspaceId },
|
|
6288
6343
|
...buildPageQuery(options?.page, options?.pageSize)
|
|
@@ -7567,7 +7622,8 @@ var LoginSchema = import_zod2.z.object({
|
|
|
7567
7622
|
var RegisterSchema = import_zod2.z.object({
|
|
7568
7623
|
email: import_zod2.z.string().email(),
|
|
7569
7624
|
password: import_zod2.z.string().min(8),
|
|
7570
|
-
password_confirmation: import_zod2.z.string().min(8)
|
|
7625
|
+
password_confirmation: import_zod2.z.string().min(8),
|
|
7626
|
+
tenant_name: import_zod2.z.string().min(1)
|
|
7571
7627
|
}).refine((data) => data.password === data.password_confirmation, {
|
|
7572
7628
|
message: "Passwords do not match",
|
|
7573
7629
|
path: ["password_confirmation"]
|
|
@@ -7610,25 +7666,32 @@ var ChangePasswordSchema = import_zod2.z.object({
|
|
|
7610
7666
|
});
|
|
7611
7667
|
function createIdentityNamespace(rb, baseUrl) {
|
|
7612
7668
|
return {
|
|
7613
|
-
/**
|
|
7669
|
+
/**
|
|
7670
|
+
* Login with email and password — returns the authenticated user.
|
|
7671
|
+
* The session token is available as `result.token` (flattened from `data.attributes.token`).
|
|
7672
|
+
*/
|
|
7614
7673
|
login: async (email, password, options) => {
|
|
7615
7674
|
LoginSchema.parse({ email, password });
|
|
7616
7675
|
return rb.execute(
|
|
7617
7676
|
postUsersAuthLogin,
|
|
7618
7677
|
{
|
|
7619
7678
|
body: {
|
|
7620
|
-
data: { type: "
|
|
7679
|
+
data: { type: "user", attributes: { email, password } }
|
|
7621
7680
|
}
|
|
7622
7681
|
},
|
|
7623
7682
|
options
|
|
7624
7683
|
);
|
|
7625
7684
|
},
|
|
7626
|
-
/**
|
|
7627
|
-
|
|
7685
|
+
/**
|
|
7686
|
+
* Register a new user account — returns the newly created user.
|
|
7687
|
+
* The session token is available as `result.token` (flattened from `data.attributes.token`).
|
|
7688
|
+
*/
|
|
7689
|
+
register: async (email, password, passwordConfirmation, tenantName, options) => {
|
|
7628
7690
|
RegisterSchema.parse({
|
|
7629
7691
|
email,
|
|
7630
7692
|
password,
|
|
7631
|
-
password_confirmation: passwordConfirmation
|
|
7693
|
+
password_confirmation: passwordConfirmation,
|
|
7694
|
+
tenant_name: tenantName
|
|
7632
7695
|
});
|
|
7633
7696
|
return rb.execute(
|
|
7634
7697
|
postUsersAuthRegister,
|
|
@@ -7639,7 +7702,8 @@ function createIdentityNamespace(rb, baseUrl) {
|
|
|
7639
7702
|
attributes: {
|
|
7640
7703
|
email,
|
|
7641
7704
|
password,
|
|
7642
|
-
password_confirmation: passwordConfirmation
|
|
7705
|
+
password_confirmation: passwordConfirmation,
|
|
7706
|
+
tenant_name: tenantName
|
|
7643
7707
|
}
|
|
7644
7708
|
}
|
|
7645
7709
|
}
|