@gpt-platform/client 0.3.0 → 0.3.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.d.ts CHANGED
@@ -1544,6 +1544,32 @@ type CrmRelationship = {
1544
1544
  };
1545
1545
  type: string;
1546
1546
  };
1547
+ /**
1548
+ * A "Resource object" representing a support_tag
1549
+ */
1550
+ type SupportTag = {
1551
+ /**
1552
+ * An attributes object for a support_tag
1553
+ */
1554
+ attributes?: {
1555
+ /**
1556
+ * Field included by default.
1557
+ */
1558
+ color?: string | null | unknown;
1559
+ /**
1560
+ * Field included by default.
1561
+ */
1562
+ name: string;
1563
+ };
1564
+ id: string;
1565
+ /**
1566
+ * A relationships object for a support_tag
1567
+ */
1568
+ relationships?: {
1569
+ [key: string]: never;
1570
+ };
1571
+ type: string;
1572
+ };
1547
1573
  /**
1548
1574
  * A "Resource object" representing a plan
1549
1575
  */
@@ -2470,6 +2496,126 @@ type CatalogTaxonomy = {
2470
2496
  };
2471
2497
  type: string;
2472
2498
  };
2499
+ /**
2500
+ * A "Resource object" representing a support_ticket
2501
+ */
2502
+ type SupportTicket = {
2503
+ /**
2504
+ * An attributes object for a support_ticket
2505
+ */
2506
+ attributes?: {
2507
+ /**
2508
+ * Field included by default.
2509
+ */
2510
+ ai_classification?: string | null | unknown;
2511
+ /**
2512
+ * Field included by default.
2513
+ */
2514
+ ai_confidence?: number | null | unknown;
2515
+ /**
2516
+ * Field included by default.
2517
+ */
2518
+ ai_sentiment?: string | null | unknown;
2519
+ /**
2520
+ * Field included by default.
2521
+ */
2522
+ assigned_agent_id?: string | null | unknown;
2523
+ /**
2524
+ * Field included by default.
2525
+ */
2526
+ crm_contact_id?: string | null | unknown;
2527
+ /**
2528
+ * Field included by default.
2529
+ */
2530
+ custom_fields?: {
2531
+ [key: string]: unknown;
2532
+ } | null | unknown;
2533
+ /**
2534
+ * Field included by default.
2535
+ */
2536
+ customer_email?: string | null | unknown;
2537
+ /**
2538
+ * Field included by default.
2539
+ */
2540
+ customer_name?: string | null | unknown;
2541
+ /**
2542
+ * Field included by default.
2543
+ */
2544
+ description?: string | null | unknown;
2545
+ /**
2546
+ * Field included by default.
2547
+ */
2548
+ external_id?: string | null | unknown;
2549
+ /**
2550
+ * Field included by default.
2551
+ */
2552
+ first_response_at?: unknown;
2553
+ /**
2554
+ * Field included by default.
2555
+ */
2556
+ invoice_id?: string | null | unknown;
2557
+ /**
2558
+ * Field included by default.
2559
+ */
2560
+ priority: "low" | "normal" | "high" | "urgent";
2561
+ /**
2562
+ * Field included by default.
2563
+ */
2564
+ product_id?: string | null | unknown;
2565
+ /**
2566
+ * Field included by default.
2567
+ */
2568
+ resolved_at?: unknown;
2569
+ /**
2570
+ * Field included by default.
2571
+ */
2572
+ sla_breached: boolean;
2573
+ /**
2574
+ * Field included by default.
2575
+ */
2576
+ sla_due_at?: unknown;
2577
+ /**
2578
+ * Field included by default.
2579
+ */
2580
+ sla_policy_id?: string | null | unknown;
2581
+ /**
2582
+ * Field included by default.
2583
+ */
2584
+ source: "email" | "chat" | "phone" | "web_form" | "api" | "internal" | "connector_sync";
2585
+ /**
2586
+ * Field included by default.
2587
+ */
2588
+ status: "new" | "open" | "pending" | "on_hold" | "resolved" | "closed";
2589
+ /**
2590
+ * Field included by default.
2591
+ */
2592
+ subject: string;
2593
+ /**
2594
+ * Field included by default.
2595
+ */
2596
+ synced_at?: unknown;
2597
+ /**
2598
+ * Field included by default.
2599
+ */
2600
+ tags?: Array<string> | null | unknown;
2601
+ /**
2602
+ * Field included by default.
2603
+ */
2604
+ ticket_number?: string | null | unknown;
2605
+ /**
2606
+ * Field included by default.
2607
+ */
2608
+ type: "external" | "internal";
2609
+ };
2610
+ id: string;
2611
+ /**
2612
+ * A relationships object for a support_ticket
2613
+ */
2614
+ relationships?: {
2615
+ [key: string]: never;
2616
+ };
2617
+ type: string;
2618
+ };
2473
2619
  /**
2474
2620
  * A "Resource object" representing a credential
2475
2621
  */
@@ -3647,6 +3793,52 @@ type CrawlerSchedule = {
3647
3793
  };
3648
3794
  type: string;
3649
3795
  };
3796
+ /**
3797
+ * A "Resource object" representing a support_ticket_message
3798
+ */
3799
+ type SupportTicketMessage = {
3800
+ /**
3801
+ * An attributes object for a support_ticket_message
3802
+ */
3803
+ attributes?: {
3804
+ /**
3805
+ * Field included by default.
3806
+ */
3807
+ ai_draft: boolean;
3808
+ /**
3809
+ * Field included by default.
3810
+ */
3811
+ body: string;
3812
+ /**
3813
+ * Field included by default.
3814
+ */
3815
+ channel?: string | null | unknown;
3816
+ /**
3817
+ * Field included by default.
3818
+ */
3819
+ channel_message_id?: string | null | unknown;
3820
+ /**
3821
+ * Field included by default.
3822
+ */
3823
+ is_internal_note: boolean;
3824
+ /**
3825
+ * Field included by default.
3826
+ */
3827
+ sender_id?: string | null | unknown;
3828
+ /**
3829
+ * Field included by default.
3830
+ */
3831
+ sender_type: "customer" | "agent" | "ai" | "system";
3832
+ };
3833
+ id: string;
3834
+ /**
3835
+ * A relationships object for a support_ticket_message
3836
+ */
3837
+ relationships?: {
3838
+ [key: string]: never;
3839
+ };
3840
+ type: string;
3841
+ };
3650
3842
  /**
3651
3843
  * A "Resource object" representing a crm_company
3652
3844
  */
@@ -5025,7 +5217,7 @@ declare class BrowserApiKeyError extends Error {
5025
5217
  }
5026
5218
 
5027
5219
  /** SDK version — updated automatically by mix update.sdks */
5028
- declare const SDK_VERSION = "0.3.0";
5220
+ declare const SDK_VERSION = "0.3.1";
5029
5221
  /** Default API version sent in every request — updated automatically by mix update.sdks */
5030
5222
  declare const DEFAULT_API_VERSION = "2026-02-25";
5031
5223
 
@@ -5779,24 +5971,6 @@ declare function createExtractionNamespace(rb: RequestBuilder): {
5779
5971
  };
5780
5972
  };
5781
5973
 
5782
- interface Ticket {
5783
- id: string;
5784
- [key: string]: unknown;
5785
- }
5786
- interface TicketMessage {
5787
- id: string;
5788
- [key: string]: unknown;
5789
- }
5790
-
5791
- interface DataStoreRecord {
5792
- id: string;
5793
- namespace: string;
5794
- key: string;
5795
- value: unknown;
5796
- version: number;
5797
- [key: string]: unknown;
5798
- }
5799
-
5800
5974
  type CrmEntityType = "contact" | "custom_entity" | "activity";
5801
5975
  type CrmExportFormat = "json" | "csv";
5802
5976
  type CrmExportStatus = "pending" | "processing" | "complete" | "failed";
@@ -5870,20 +6044,6 @@ interface FullscriptSessionGrant {
5870
6044
  patient_id: string;
5871
6045
  }
5872
6046
 
5873
- interface ChannelConfig {
5874
- id: string;
5875
- channel_type: string;
5876
- [key: string]: unknown;
5877
- }
5878
- interface InboundMessage {
5879
- id: string;
5880
- [key: string]: unknown;
5881
- }
5882
- interface OutboundMessage {
5883
- id: string;
5884
- [key: string]: unknown;
5885
- }
5886
-
5887
6047
  /**
5888
6048
  * GPT Core Client SDK
5889
6049
  *
@@ -5970,7 +6130,7 @@ declare class GptClient extends BaseClient {
5970
6130
  messages: {
5971
6131
  list: (options?: RequestOptions) => Promise<Record<string, unknown>[]>;
5972
6132
  stream: (conversationId: string, body: Record<string, unknown>, options?: RequestOptions, streamOptions?: StreamOptions) => Promise<AsyncIterableIterator<StreamMessageChunk>>;
5973
- send: (_conversationId: string, body: Record<string, unknown>, options?: RequestOptions) => Promise<Record<string, unknown>>;
6133
+ send: (conversationId: string, body: Record<string, unknown>, options?: RequestOptions) => Promise<Record<string, unknown>>;
5974
6134
  };
5975
6135
  };
5976
6136
  /** Wallet, plans, transactions, and payment methods */
@@ -6017,34 +6177,35 @@ declare class GptClient extends BaseClient {
6017
6177
  /** Product catalog, inventory, pricing, and taxonomy */
6018
6178
  readonly catalog: {
6019
6179
  products: {
6020
- list: (_options?: {
6180
+ list: (workspaceId: string, options?: {
6021
6181
  page?: number;
6022
6182
  pageSize?: number;
6023
6183
  } & RequestOptions) => Promise<CatalogProduct[]>;
6024
- get: (_id: string, _options?: RequestOptions) => Promise<CatalogProduct>;
6025
- create: (_attributes: Record<string, unknown>, _options?: RequestOptions) => Promise<CatalogProduct>;
6026
- update: (_id: string, _attributes: Record<string, unknown>, _options?: RequestOptions) => Promise<CatalogProduct>;
6184
+ get: (id: string, options?: RequestOptions) => Promise<CatalogProduct>;
6185
+ create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CatalogProduct>;
6186
+ update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CatalogProduct>;
6187
+ delete: (id: string, options?: RequestOptions) => Promise<true>;
6027
6188
  };
6028
6189
  variants: {
6029
- listByProduct: (_productId: string, _options?: RequestOptions) => Promise<CatalogProductVariant[]>;
6190
+ get: (id: string, options?: RequestOptions) => Promise<CatalogProductVariant>;
6191
+ listByProduct: (productId: string, options?: RequestOptions) => Promise<CatalogProductVariant[]>;
6192
+ create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CatalogProductVariant>;
6193
+ update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CatalogProductVariant>;
6194
+ delete: (id: string, options?: RequestOptions) => Promise<true>;
6030
6195
  };
6031
6196
  taxonomies: {
6032
- list: (_options?: RequestOptions) => Promise<CatalogTaxonomy[]>;
6033
- getNodes: (_taxonomyId: string, _options?: RequestOptions) => Promise<CatalogTaxonomyNode[]>;
6034
- };
6035
- };
6036
- /** Multi-channel messaging (WhatsApp, Slack, Email) */
6037
- readonly channels: {
6038
- configs: {
6039
- list: (_options?: RequestOptions) => Promise<ChannelConfig[]>;
6040
- get: (_id: string, _options?: RequestOptions) => Promise<ChannelConfig>;
6197
+ listByApplication: (applicationId: string, options?: RequestOptions) => Promise<CatalogTaxonomy[]>;
6198
+ get: (id: string, options?: RequestOptions) => Promise<CatalogTaxonomy>;
6199
+ create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CatalogTaxonomy>;
6200
+ update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CatalogTaxonomy>;
6201
+ delete: (id: string, options?: RequestOptions) => Promise<true>;
6041
6202
  };
6042
- messages: {
6043
- send: (_attributes: Record<string, unknown>, _options?: RequestOptions) => Promise<OutboundMessage>;
6044
- listInbound: (_options?: {
6045
- page?: number;
6046
- pageSize?: number;
6047
- } & RequestOptions) => Promise<InboundMessage[]>;
6203
+ taxonomyNodes: {
6204
+ listByTaxonomy: (taxonomyId: string, options?: RequestOptions) => Promise<CatalogTaxonomyNode[]>;
6205
+ get: (id: string, options?: RequestOptions) => Promise<CatalogTaxonomyNode>;
6206
+ create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CatalogTaxonomyNode>;
6207
+ update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CatalogTaxonomyNode>;
6208
+ delete: (id: string, options?: RequestOptions) => Promise<true>;
6048
6209
  };
6049
6210
  };
6050
6211
  /** Notification logs, methods, and preferences */
@@ -6182,7 +6343,6 @@ declare class GptClient extends BaseClient {
6182
6343
  activities: {
6183
6344
  get: (id: string, options?: RequestOptions) => Promise<CrmActivity>;
6184
6345
  create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CrmActivity>;
6185
- update: (_id: string, _attributes: Record<string, unknown>, _options?: RequestOptions) => Promise<CrmActivity>;
6186
6346
  delete: (id: string, options?: RequestOptions) => Promise<true>;
6187
6347
  listByWorkspace: (workspaceId: string, options?: {
6188
6348
  page?: number;
@@ -6251,21 +6411,6 @@ declare class GptClient extends BaseClient {
6251
6411
  list: (workspaceId: string, options?: RequestOptions) => Promise<CrmDataExportJob[]>;
6252
6412
  };
6253
6413
  };
6254
- /** Key-value data store with namespaces and TTL */
6255
- readonly dataStore: {
6256
- records: {
6257
- get: (_namespace: string, _key: string, _options?: RequestOptions) => Promise<DataStoreRecord | null>;
6258
- set: (_namespace: string, _key: string, _value: unknown, _options?: RequestOptions) => Promise<DataStoreRecord>;
6259
- delete: (_namespace: string, _key: string, _options?: RequestOptions) => Promise<true>;
6260
- listKeys: (_namespace: string, _options?: RequestOptions) => Promise<string[]>;
6261
- list: (_namespace: string, _options?: RequestOptions) => Promise<DataStoreRecord[]>;
6262
- };
6263
- namespaces: {
6264
- getPolicy: (_namespace: string, _options?: RequestOptions) => Promise<unknown>;
6265
- createPolicy: (_attributes: Record<string, unknown>, _options?: RequestOptions) => Promise<unknown>;
6266
- getStats: (_namespace: string, _options?: RequestOptions) => Promise<unknown>;
6267
- };
6268
- };
6269
6414
  /** Email campaigns, recipients, and sequences */
6270
6415
  readonly emailMarketing: {
6271
6416
  campaigns: {
@@ -6308,20 +6453,25 @@ declare class GptClient extends BaseClient {
6308
6453
  resume: (id: string, options?: RequestOptions) => Promise<unknown>;
6309
6454
  };
6310
6455
  };
6311
- /** Support tickets, queues, SLA, and agent presence */
6456
+ /** Support tickets, tags, and SLA tracking */
6312
6457
  readonly support: {
6313
6458
  tickets: {
6314
- list: (_options?: {
6459
+ list: (workspaceId: string, options?: {
6315
6460
  page?: number;
6316
6461
  pageSize?: number;
6317
- } & RequestOptions) => Promise<Ticket[]>;
6318
- get: (_id: string, _options?: RequestOptions) => Promise<Ticket>;
6319
- create: (_attributes: Record<string, unknown>, _options?: RequestOptions) => Promise<Ticket>;
6320
- update: (_id: string, _attributes: Record<string, unknown>, _options?: RequestOptions) => Promise<Ticket>;
6321
- addMessage: (_ticketId: string, _attributes: Record<string, unknown>, _options?: RequestOptions) => Promise<TicketMessage>;
6462
+ } & RequestOptions) => Promise<SupportTicket[]>;
6463
+ get: (id: string, options?: RequestOptions) => Promise<SupportTicket>;
6464
+ create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<SupportTicket>;
6465
+ update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<SupportTicket>;
6466
+ delete: (id: string, options?: RequestOptions) => Promise<true>;
6467
+ addMessage: (ticketId: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<SupportTicketMessage>;
6468
+ listMessages: (ticketId: string, options?: RequestOptions) => Promise<SupportTicketMessage[]>;
6469
+ rate: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
6322
6470
  };
6323
- queues: {
6324
- list: (_options?: RequestOptions) => Promise<unknown[]>;
6471
+ tags: {
6472
+ list: (workspaceId: string, options?: RequestOptions) => Promise<SupportTag[]>;
6473
+ create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<SupportTag>;
6474
+ delete: (id: string, options?: RequestOptions) => Promise<true>;
6325
6475
  };
6326
6476
  };
6327
6477
  /** Document upload, processing, results, and exports */
@@ -6469,7 +6619,9 @@ declare class GptClient extends BaseClient {
6469
6619
  get: (id: string, options?: RequestOptions) => Promise<Workspace>;
6470
6620
  create: (name: string, slug?: string, options?: RequestOptions) => Promise<Workspace>;
6471
6621
  listExtractionExportsByWorkspace: (workspaceId: string, options?: {
6472
- page?: number;
6622
+ page
6623
+ /** Support tickets, tags, and SLA tracking */
6624
+ ? /** Support tickets, tags, and SLA tracking */: number;
6473
6625
  pageSize?: number;
6474
6626
  } & RequestOptions) => Promise<Workspace[]>;
6475
6627
  listAllExtractionExportsByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<Workspace[]>;
@@ -6669,9 +6821,7 @@ declare class GptClient extends BaseClient {
6669
6821
  transcribe: (audio: File | Blob, params?: {
6670
6822
  language?: string;
6671
6823
  modelSize?: "tiny" | "base" | "small" | "medium" | "large";
6672
- phiMode
6673
- /** Contacts, companies, deals, activities, pipelines, relationships, and custom entities */
6674
- ?: "none" | "tokenize" | "tokenize_encrypt";
6824
+ phiMode?: "none" | "tokenize" | "tokenize_encrypt";
6675
6825
  phiKey?: string;
6676
6826
  }, options?: RequestOptions) => Promise<VoiceTranscribeResult>;
6677
6827
  sessions: {
@@ -7095,7 +7245,7 @@ declare function createAiNamespace(rb: RequestBuilder): {
7095
7245
  /** Stream a message to an AI conversation via SSE */
7096
7246
  stream: (conversationId: string, body: Record<string, unknown>, options?: RequestOptions, streamOptions?: StreamOptions) => Promise<AsyncIterableIterator<StreamMessageChunk>>;
7097
7247
  /** Send a message to an AI conversation (non-streaming) */
7098
- send: (_conversationId: string, body: Record<string, unknown>, options?: RequestOptions) => Promise<Record<string, unknown>>;
7248
+ send: (conversationId: string, body: Record<string, unknown>, options?: RequestOptions) => Promise<Record<string, unknown>>;
7099
7249
  };
7100
7250
  };
7101
7251