@gpt-platform/client 0.7.0 → 0.7.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.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.0";
1272
+ var SDK_VERSION = "0.7.1";
1273
1273
  var DEFAULT_API_VERSION = "2026-03-11";
1274
1274
 
1275
1275
  // src/base-client.ts
@@ -2377,6 +2377,11 @@ var postCrmContacts = (options) => (options.client ?? client).post({
2377
2377
  ...options.headers
2378
2378
  }
2379
2379
  });
2380
+ var getMemoryDocumentSections = (options) => (options.client ?? client).get({
2381
+ security: [{ scheme: "bearer", type: "http" }],
2382
+ url: "/memory/document-sections",
2383
+ ...options
2384
+ });
2380
2385
  var deleteWebhookConfigsById = (options) => (options.client ?? client).delete({
2381
2386
  security: [{ scheme: "bearer", type: "http" }],
2382
2387
  url: "/webhook-configs/{id}",
@@ -2595,6 +2600,11 @@ var patchSupportTicketsByIdMerge = (options) => (options.client ?? client).patch
2595
2600
  ...options.headers
2596
2601
  }
2597
2602
  });
2603
+ var getMemorySectionDocumentsById = (options) => (options.client ?? client).get({
2604
+ security: [{ scheme: "bearer", type: "http" }],
2605
+ url: "/memory/section-documents/{id}",
2606
+ ...options
2607
+ });
2598
2608
  var deleteApiKeysById = (options) => (options.client ?? client).delete({
2599
2609
  security: [{ scheme: "bearer", type: "http" }],
2600
2610
  url: "/api-keys/{id}",
@@ -2788,6 +2798,11 @@ var getEmailRecipientsEmailByOutboundEmailId = (options) => (options.client ?? c
2788
2798
  url: "/email/recipients/email/{outbound_email_id}",
2789
2799
  ...options
2790
2800
  });
2801
+ var getMemorySectionDocuments = (options) => (options.client ?? client).get({
2802
+ security: [{ scheme: "bearer", type: "http" }],
2803
+ url: "/memory/section-documents",
2804
+ ...options
2805
+ });
2791
2806
  var patchStorageFilesByIdRestore = (options) => (options.client ?? client).patch({
2792
2807
  security: [{ scheme: "bearer", type: "http" }],
2793
2808
  url: "/storage-files/{id}/restore",
@@ -5345,6 +5360,11 @@ var getExtractionDocumentsWorkspaceByWorkspaceId = (options) => (options.client
5345
5360
  url: "/extraction/documents/workspace/{workspace_id}",
5346
5361
  ...options
5347
5362
  });
5363
+ var getMemoryDocumentSectionsById = (options) => (options.client ?? client).get({
5364
+ security: [{ scheme: "bearer", type: "http" }],
5365
+ url: "/memory/document-sections/{id}",
5366
+ ...options
5367
+ });
5348
5368
  var getClinicalDeliveriesById = (options) => (options.client ?? client).get({
5349
5369
  security: [{ scheme: "bearer", type: "http" }],
5350
5370
  url: "/clinical/deliveries/{id}",
@@ -26418,6 +26438,115 @@ function createRolesNamespace(rb) {
26418
26438
  };
26419
26439
  }
26420
26440
 
26441
+ // src/namespaces/memory.ts
26442
+ function createMemoryNamespace(rb) {
26443
+ return {
26444
+ /**
26445
+ * Sub-namespace for section document operations.
26446
+ *
26447
+ * A section document represents an indexed source (extraction document,
26448
+ * crawler page, knowledge file, or direct upload). Each section document
26449
+ * contains metadata about the source and links to its document sections.
26450
+ */
26451
+ sectionDocuments: {
26452
+ /**
26453
+ * Lists section documents in the current workspace.
26454
+ *
26455
+ * Returns paginated results sorted by creation date (newest first).
26456
+ *
26457
+ * @param params - Optional pagination parameters (`page[offset]`, `page[limit]`).
26458
+ * @param options - Optional request options such as custom headers or abort signal.
26459
+ * @returns A promise resolving to an array of section document records.
26460
+ *
26461
+ * @example
26462
+ * ```typescript
26463
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
26464
+ * const docs = await client.memory.sectionDocuments.list();
26465
+ * docs.forEach(d => console.log(d.attributes?.doc_path));
26466
+ * ```
26467
+ */
26468
+ list: async (params, options) => {
26469
+ return rb.execute(
26470
+ getMemorySectionDocuments,
26471
+ buildPageQuery(params?.page, params?.pageSize),
26472
+ options
26473
+ );
26474
+ },
26475
+ /**
26476
+ * Retrieves a single section document by its unique identifier.
26477
+ *
26478
+ * @param id - The UUID of the section document.
26479
+ * @param options - Optional request options.
26480
+ * @returns A promise resolving to the section document record.
26481
+ *
26482
+ * @example
26483
+ * ```typescript
26484
+ * const doc = await client.memory.sectionDocuments.get('sd_01HXYZ...');
26485
+ * console.log(doc.attributes?.source_type, doc.attributes?.section_count);
26486
+ * ```
26487
+ */
26488
+ get: async (id, options) => {
26489
+ return rb.execute(
26490
+ getMemorySectionDocumentsById,
26491
+ { path: { id } },
26492
+ options
26493
+ );
26494
+ }
26495
+ },
26496
+ /**
26497
+ * Sub-namespace for document section operations.
26498
+ *
26499
+ * A document section represents one heading-delimited portion of an
26500
+ * indexed document. Sections have stable IDs that survive re-indexing,
26501
+ * enabling persistent cross-document references.
26502
+ */
26503
+ documentSections: {
26504
+ /**
26505
+ * Lists document sections in the current workspace.
26506
+ *
26507
+ * Returns paginated results sorted by position within their documents.
26508
+ *
26509
+ * @param params - Optional pagination parameters.
26510
+ * @param options - Optional request options.
26511
+ * @returns A promise resolving to an array of document section records.
26512
+ *
26513
+ * @example
26514
+ * ```typescript
26515
+ * const sections = await client.memory.documentSections.list();
26516
+ * sections.forEach(s => console.log(s.attributes?.title, s.attributes?.level));
26517
+ * ```
26518
+ */
26519
+ list: async (params, options) => {
26520
+ return rb.execute(
26521
+ getMemoryDocumentSections,
26522
+ buildPageQuery(params?.page, params?.pageSize),
26523
+ options
26524
+ );
26525
+ },
26526
+ /**
26527
+ * Retrieves a single document section by its unique identifier.
26528
+ *
26529
+ * @param id - The UUID of the document section.
26530
+ * @param options - Optional request options.
26531
+ * @returns A promise resolving to the document section record.
26532
+ *
26533
+ * @example
26534
+ * ```typescript
26535
+ * const section = await client.memory.documentSections.get('ds_01HXYZ...');
26536
+ * console.log(section.attributes?.title, section.attributes?.content_preview);
26537
+ * ```
26538
+ */
26539
+ get: async (id, options) => {
26540
+ return rb.execute(
26541
+ getMemoryDocumentSectionsById,
26542
+ { path: { id } },
26543
+ options
26544
+ );
26545
+ }
26546
+ }
26547
+ };
26548
+ }
26549
+
26421
26550
  // src/namespaces/permissions.ts
26422
26551
  function createPermissionsNamespace(rb) {
26423
26552
  return {
@@ -26936,6 +27065,7 @@ var GptClient = class extends BaseClient {
26936
27065
  this.accessGrants = createAccessGrantsNamespace(rb);
26937
27066
  this.roles = createRolesNamespace(rb);
26938
27067
  this.permissions = createPermissionsNamespace(rb);
27068
+ this.memory = createMemoryNamespace(rb);
26939
27069
  }
26940
27070
  /**
26941
27071
  * Subscribe to SDK lifecycle events.