@reminix/sdk 0.12.0 → 0.13.0

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.
Files changed (114) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/client.d.mts +8 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +8 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agents.d.mts +92 -4
  12. package/resources/agents.d.mts.map +1 -1
  13. package/resources/agents.d.ts +92 -4
  14. package/resources/agents.d.ts.map +1 -1
  15. package/resources/execution-logs.d.mts +3 -3
  16. package/resources/execution-logs.d.mts.map +1 -1
  17. package/resources/execution-logs.d.ts +3 -3
  18. package/resources/execution-logs.d.ts.map +1 -1
  19. package/resources/execution-logs.js +1 -1
  20. package/resources/execution-logs.mjs +1 -1
  21. package/resources/index.d.mts +3 -1
  22. package/resources/index.d.mts.map +1 -1
  23. package/resources/index.d.ts +3 -1
  24. package/resources/index.d.ts.map +1 -1
  25. package/resources/index.js +5 -1
  26. package/resources/index.js.map +1 -1
  27. package/resources/index.mjs +2 -0
  28. package/resources/index.mjs.map +1 -1
  29. package/resources/knowledge/collections/collections.d.mts +89 -0
  30. package/resources/knowledge/collections/collections.d.mts.map +1 -0
  31. package/resources/knowledge/collections/collections.d.ts +89 -0
  32. package/resources/knowledge/collections/collections.d.ts.map +1 -0
  33. package/resources/knowledge/collections/collections.js +56 -0
  34. package/resources/knowledge/collections/collections.js.map +1 -0
  35. package/resources/knowledge/collections/collections.mjs +51 -0
  36. package/resources/knowledge/collections/collections.mjs.map +1 -0
  37. package/resources/knowledge/collections/documents.d.mts +121 -0
  38. package/resources/knowledge/collections/documents.d.mts.map +1 -0
  39. package/resources/knowledge/collections/documents.d.ts +121 -0
  40. package/resources/knowledge/collections/documents.d.ts.map +1 -0
  41. package/resources/knowledge/collections/documents.js +62 -0
  42. package/resources/knowledge/collections/documents.js.map +1 -0
  43. package/resources/knowledge/collections/documents.mjs +58 -0
  44. package/resources/knowledge/collections/documents.mjs.map +1 -0
  45. package/resources/knowledge/collections/index.d.mts +3 -0
  46. package/resources/knowledge/collections/index.d.mts.map +1 -0
  47. package/resources/knowledge/collections/index.d.ts +3 -0
  48. package/resources/knowledge/collections/index.d.ts.map +1 -0
  49. package/resources/knowledge/collections/index.js +9 -0
  50. package/resources/knowledge/collections/index.js.map +1 -0
  51. package/resources/knowledge/collections/index.mjs +4 -0
  52. package/resources/knowledge/collections/index.mjs.map +1 -0
  53. package/resources/knowledge/collections.d.mts +2 -0
  54. package/resources/knowledge/collections.d.mts.map +1 -0
  55. package/resources/knowledge/collections.d.ts +2 -0
  56. package/resources/knowledge/collections.d.ts.map +1 -0
  57. package/resources/knowledge/collections.js +6 -0
  58. package/resources/knowledge/collections.js.map +1 -0
  59. package/resources/knowledge/collections.mjs +3 -0
  60. package/resources/knowledge/collections.mjs.map +1 -0
  61. package/resources/knowledge/index.d.mts +3 -0
  62. package/resources/knowledge/index.d.mts.map +1 -0
  63. package/resources/knowledge/index.d.ts +3 -0
  64. package/resources/knowledge/index.d.ts.map +1 -0
  65. package/resources/knowledge/index.js +9 -0
  66. package/resources/knowledge/index.js.map +1 -0
  67. package/resources/knowledge/index.mjs +4 -0
  68. package/resources/knowledge/index.mjs.map +1 -0
  69. package/resources/knowledge/knowledge.d.mts +65 -0
  70. package/resources/knowledge/knowledge.d.mts.map +1 -0
  71. package/resources/knowledge/knowledge.d.ts +65 -0
  72. package/resources/knowledge/knowledge.d.ts.map +1 -0
  73. package/resources/knowledge/knowledge.js +26 -0
  74. package/resources/knowledge/knowledge.js.map +1 -0
  75. package/resources/knowledge/knowledge.mjs +21 -0
  76. package/resources/knowledge/knowledge.mjs.map +1 -0
  77. package/resources/knowledge.d.mts +2 -0
  78. package/resources/knowledge.d.mts.map +1 -0
  79. package/resources/knowledge.d.ts +2 -0
  80. package/resources/knowledge.d.ts.map +1 -0
  81. package/resources/knowledge.js +6 -0
  82. package/resources/knowledge.js.map +1 -0
  83. package/resources/knowledge.mjs +3 -0
  84. package/resources/knowledge.mjs.map +1 -0
  85. package/resources/memory.d.mts +148 -0
  86. package/resources/memory.d.mts.map +1 -0
  87. package/resources/memory.d.ts +148 -0
  88. package/resources/memory.d.ts.map +1 -0
  89. package/resources/memory.js +82 -0
  90. package/resources/memory.js.map +1 -0
  91. package/resources/memory.mjs +78 -0
  92. package/resources/memory.mjs.map +1 -0
  93. package/resources/tools.d.mts +60 -2
  94. package/resources/tools.d.mts.map +1 -1
  95. package/resources/tools.d.ts +60 -2
  96. package/resources/tools.d.ts.map +1 -1
  97. package/src/client.ts +30 -0
  98. package/src/resources/agents.ts +108 -3
  99. package/src/resources/execution-logs.ts +3 -3
  100. package/src/resources/index.ts +10 -0
  101. package/src/resources/knowledge/collections/collections.ts +167 -0
  102. package/src/resources/knowledge/collections/documents.ts +200 -0
  103. package/src/resources/knowledge/collections/index.ts +22 -0
  104. package/src/resources/knowledge/collections.ts +3 -0
  105. package/src/resources/knowledge/index.ts +11 -0
  106. package/src/resources/knowledge/knowledge.ts +101 -0
  107. package/src/resources/knowledge.ts +3 -0
  108. package/src/resources/memory.ts +188 -0
  109. package/src/resources/tools.ts +70 -2
  110. package/src/version.ts +1 -1
  111. package/version.d.mts +1 -1
  112. package/version.d.ts +1 -1
  113. package/version.js +1 -1
  114. package/version.mjs +1 -1
@@ -0,0 +1,51 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../../core/resource.mjs";
3
+ import * as DocumentsAPI from "./documents.mjs";
4
+ import { Documents, } from "./documents.mjs";
5
+ import { Cursor } from "../../../core/pagination.mjs";
6
+ import { buildHeaders } from "../../../internal/headers.mjs";
7
+ import { path } from "../../../internal/utils/path.mjs";
8
+ export class Collections extends APIResource {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.documents = new DocumentsAPI.Documents(this._client);
12
+ }
13
+ /**
14
+ * Create a new knowledge collection for storing documents.
15
+ */
16
+ create(body, options) {
17
+ return this._client.post('/knowledge/collections', { body, ...options });
18
+ }
19
+ /**
20
+ * Get details of a knowledge collection including document stats.
21
+ */
22
+ retrieve(id, options) {
23
+ return this._client.get(path `/knowledge/collections/${id}`, options);
24
+ }
25
+ /**
26
+ * Update a knowledge collection name or description.
27
+ */
28
+ update(id, body = {}, options) {
29
+ return this._client.patch(path `/knowledge/collections/${id}`, { body, ...options });
30
+ }
31
+ /**
32
+ * List all knowledge collections for the project.
33
+ */
34
+ list(query = {}, options) {
35
+ return this._client.getAPIList('/knowledge/collections', (Cursor), {
36
+ query,
37
+ ...options,
38
+ });
39
+ }
40
+ /**
41
+ * Delete a knowledge collection and all its documents.
42
+ */
43
+ delete(id, options) {
44
+ return this._client.delete(path `/knowledge/collections/${id}`, {
45
+ ...options,
46
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
47
+ });
48
+ }
49
+ }
50
+ Collections.Documents = Documents;
51
+ //# sourceMappingURL=collections.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collections.mjs","sourceRoot":"","sources":["../../../src/resources/knowledge/collections/collections.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,EAQL,SAAS,GAGV;OAEM,EAAE,MAAM,EAAkC;OAC1C,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAA5C;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiD/E,CAAC;IA/CC;;OAEG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,0BAA0B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,OAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,0BAA0B,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,wBAAwB,EAAE,CAAA,MAA2B,CAAA,EAAE;YACpF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,0BAA0B,EAAE,EAAE,EAAE;YAC7D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAuED,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC"}
@@ -0,0 +1,121 @@
1
+ import { APIResource } from "../../../core/resource.mjs";
2
+ import { APIPromise } from "../../../core/api-promise.mjs";
3
+ import { Cursor, type CursorParams, PagePromise } from "../../../core/pagination.mjs";
4
+ import { RequestOptions } from "../../../internal/request-options.mjs";
5
+ export declare class Documents extends APIResource {
6
+ /**
7
+ * Get details of a document.
8
+ */
9
+ retrieve(documentID: string, params: DocumentRetrieveParams, options?: RequestOptions): APIPromise<KnowledgeDocument>;
10
+ /**
11
+ * List all documents in a knowledge collection.
12
+ */
13
+ list(id: string, query?: DocumentListParams | null | undefined, options?: RequestOptions): PagePromise<KnowledgeDocumentsCursor, KnowledgeDocument>;
14
+ /**
15
+ * Delete a document and its associated data.
16
+ */
17
+ delete(documentID: string, params: DocumentDeleteParams, options?: RequestOptions): APIPromise<void>;
18
+ /**
19
+ * Trigger processing for a document after upload.
20
+ *
21
+ * This extracts text from the document, splits it into chunks, generates
22
+ * embeddings, and stores them for search.
23
+ *
24
+ * The document status will transition: pending → processing → ready (or failed).
25
+ */
26
+ process(documentID: string, params: DocumentProcessParams, options?: RequestOptions): APIPromise<DocumentProcessResponse>;
27
+ /**
28
+ * Create a document record and get a presigned URL for upload.
29
+ *
30
+ * After receiving the response, upload the file to the presigned URL using a PUT
31
+ * request. The document will be processed automatically after upload.
32
+ */
33
+ upload(id: string, body: DocumentUploadParams, options?: RequestOptions): APIPromise<DocumentUploadResponse>;
34
+ }
35
+ export type KnowledgeDocumentsCursor = Cursor<KnowledgeDocument>;
36
+ export interface KnowledgeDocument {
37
+ /**
38
+ * Unique document ID
39
+ */
40
+ id: string;
41
+ /**
42
+ * Collection ID
43
+ */
44
+ collectionId: string;
45
+ /**
46
+ * When the document was created
47
+ */
48
+ createdAt: string;
49
+ /**
50
+ * MIME type
51
+ */
52
+ mimeType: string;
53
+ /**
54
+ * Document name
55
+ */
56
+ name: string;
57
+ /**
58
+ * S3 URL of the document
59
+ */
60
+ sourceUrl: string;
61
+ /**
62
+ * Processing status
63
+ */
64
+ status: 'pending' | 'processing' | 'ready' | 'failed';
65
+ /**
66
+ * When the document was last updated
67
+ */
68
+ updatedAt: string;
69
+ /**
70
+ * Document metadata
71
+ */
72
+ metadata?: unknown;
73
+ }
74
+ export interface DocumentProcessResponse {
75
+ document: KnowledgeDocument;
76
+ message: string;
77
+ }
78
+ export interface DocumentUploadResponse {
79
+ document: KnowledgeDocument;
80
+ /**
81
+ * Presigned URL for uploading the file
82
+ */
83
+ uploadUrl: string;
84
+ }
85
+ export interface DocumentRetrieveParams {
86
+ collectionId: string;
87
+ }
88
+ export interface DocumentListParams extends CursorParams {
89
+ status?: 'pending' | 'processing' | 'ready' | 'failed';
90
+ }
91
+ export interface DocumentDeleteParams {
92
+ collectionId: string;
93
+ }
94
+ export interface DocumentProcessParams {
95
+ /**
96
+ * Path param
97
+ */
98
+ collectionId: string;
99
+ /**
100
+ * Body param: Use Unstructured.io for extraction if available
101
+ */
102
+ preferUnstructured?: boolean;
103
+ }
104
+ export interface DocumentUploadParams {
105
+ /**
106
+ * MIME type of the document
107
+ */
108
+ mimeType: string;
109
+ /**
110
+ * Document name (filename)
111
+ */
112
+ name: string;
113
+ /**
114
+ * File size in bytes
115
+ */
116
+ size?: number;
117
+ }
118
+ export declare namespace Documents {
119
+ export { type KnowledgeDocument as KnowledgeDocument, type DocumentProcessResponse as DocumentProcessResponse, type DocumentUploadResponse as DocumentUploadResponse, type KnowledgeDocumentsCursor as KnowledgeDocumentsCursor, type DocumentRetrieveParams as DocumentRetrieveParams, type DocumentListParams as DocumentListParams, type DocumentDeleteParams as DocumentDeleteParams, type DocumentProcessParams as DocumentProcessParams, type DocumentUploadParams as DocumentUploadParams, };
120
+ }
121
+ //# sourceMappingURL=documents.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documents.d.mts","sourceRoot":"","sources":["../../../src/resources/knowledge/collections/documents.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAE1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,QAAQ,CACN,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iBAAiB,CAAC;IAKhC;;OAEG;IACH,IAAI,CACF,EAAE,EAAE,MA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,CAAC;IAE5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,MAAM,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;CACxD;AAED,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
@@ -0,0 +1,121 @@
1
+ import { APIResource } from "../../../core/resource.js";
2
+ import { APIPromise } from "../../../core/api-promise.js";
3
+ import { Cursor, type CursorParams, PagePromise } from "../../../core/pagination.js";
4
+ import { RequestOptions } from "../../../internal/request-options.js";
5
+ export declare class Documents extends APIResource {
6
+ /**
7
+ * Get details of a document.
8
+ */
9
+ retrieve(documentID: string, params: DocumentRetrieveParams, options?: RequestOptions): APIPromise<KnowledgeDocument>;
10
+ /**
11
+ * List all documents in a knowledge collection.
12
+ */
13
+ list(id: string, query?: DocumentListParams | null | undefined, options?: RequestOptions): PagePromise<KnowledgeDocumentsCursor, KnowledgeDocument>;
14
+ /**
15
+ * Delete a document and its associated data.
16
+ */
17
+ delete(documentID: string, params: DocumentDeleteParams, options?: RequestOptions): APIPromise<void>;
18
+ /**
19
+ * Trigger processing for a document after upload.
20
+ *
21
+ * This extracts text from the document, splits it into chunks, generates
22
+ * embeddings, and stores them for search.
23
+ *
24
+ * The document status will transition: pending → processing → ready (or failed).
25
+ */
26
+ process(documentID: string, params: DocumentProcessParams, options?: RequestOptions): APIPromise<DocumentProcessResponse>;
27
+ /**
28
+ * Create a document record and get a presigned URL for upload.
29
+ *
30
+ * After receiving the response, upload the file to the presigned URL using a PUT
31
+ * request. The document will be processed automatically after upload.
32
+ */
33
+ upload(id: string, body: DocumentUploadParams, options?: RequestOptions): APIPromise<DocumentUploadResponse>;
34
+ }
35
+ export type KnowledgeDocumentsCursor = Cursor<KnowledgeDocument>;
36
+ export interface KnowledgeDocument {
37
+ /**
38
+ * Unique document ID
39
+ */
40
+ id: string;
41
+ /**
42
+ * Collection ID
43
+ */
44
+ collectionId: string;
45
+ /**
46
+ * When the document was created
47
+ */
48
+ createdAt: string;
49
+ /**
50
+ * MIME type
51
+ */
52
+ mimeType: string;
53
+ /**
54
+ * Document name
55
+ */
56
+ name: string;
57
+ /**
58
+ * S3 URL of the document
59
+ */
60
+ sourceUrl: string;
61
+ /**
62
+ * Processing status
63
+ */
64
+ status: 'pending' | 'processing' | 'ready' | 'failed';
65
+ /**
66
+ * When the document was last updated
67
+ */
68
+ updatedAt: string;
69
+ /**
70
+ * Document metadata
71
+ */
72
+ metadata?: unknown;
73
+ }
74
+ export interface DocumentProcessResponse {
75
+ document: KnowledgeDocument;
76
+ message: string;
77
+ }
78
+ export interface DocumentUploadResponse {
79
+ document: KnowledgeDocument;
80
+ /**
81
+ * Presigned URL for uploading the file
82
+ */
83
+ uploadUrl: string;
84
+ }
85
+ export interface DocumentRetrieveParams {
86
+ collectionId: string;
87
+ }
88
+ export interface DocumentListParams extends CursorParams {
89
+ status?: 'pending' | 'processing' | 'ready' | 'failed';
90
+ }
91
+ export interface DocumentDeleteParams {
92
+ collectionId: string;
93
+ }
94
+ export interface DocumentProcessParams {
95
+ /**
96
+ * Path param
97
+ */
98
+ collectionId: string;
99
+ /**
100
+ * Body param: Use Unstructured.io for extraction if available
101
+ */
102
+ preferUnstructured?: boolean;
103
+ }
104
+ export interface DocumentUploadParams {
105
+ /**
106
+ * MIME type of the document
107
+ */
108
+ mimeType: string;
109
+ /**
110
+ * Document name (filename)
111
+ */
112
+ name: string;
113
+ /**
114
+ * File size in bytes
115
+ */
116
+ size?: number;
117
+ }
118
+ export declare namespace Documents {
119
+ export { type KnowledgeDocument as KnowledgeDocument, type DocumentProcessResponse as DocumentProcessResponse, type DocumentUploadResponse as DocumentUploadResponse, type KnowledgeDocumentsCursor as KnowledgeDocumentsCursor, type DocumentRetrieveParams as DocumentRetrieveParams, type DocumentListParams as DocumentListParams, type DocumentDeleteParams as DocumentDeleteParams, type DocumentProcessParams as DocumentProcessParams, type DocumentUploadParams as DocumentUploadParams, };
120
+ }
121
+ //# sourceMappingURL=documents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../../src/resources/knowledge/collections/documents.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAE1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,QAAQ,CACN,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iBAAiB,CAAC;IAKhC;;OAEG;IACH,IAAI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QAAQ,EAAE,iBAAiB,CAAC;IAE5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,MAAM,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;CACxD;AAED,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Documents = void 0;
5
+ const resource_1 = require("../../../core/resource.js");
6
+ const pagination_1 = require("../../../core/pagination.js");
7
+ const headers_1 = require("../../../internal/headers.js");
8
+ const path_1 = require("../../../internal/utils/path.js");
9
+ class Documents extends resource_1.APIResource {
10
+ /**
11
+ * Get details of a document.
12
+ */
13
+ retrieve(documentID, params, options) {
14
+ const { collectionId } = params;
15
+ return this._client.get((0, path_1.path) `/knowledge/collections/${collectionId}/documents/${documentID}`, options);
16
+ }
17
+ /**
18
+ * List all documents in a knowledge collection.
19
+ */
20
+ list(id, query = {}, options) {
21
+ return this._client.getAPIList((0, path_1.path) `/knowledge/collections/${id}/documents`, (pagination_1.Cursor), {
22
+ query,
23
+ ...options,
24
+ });
25
+ }
26
+ /**
27
+ * Delete a document and its associated data.
28
+ */
29
+ delete(documentID, params, options) {
30
+ const { collectionId } = params;
31
+ return this._client.delete((0, path_1.path) `/knowledge/collections/${collectionId}/documents/${documentID}`, {
32
+ ...options,
33
+ headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
34
+ });
35
+ }
36
+ /**
37
+ * Trigger processing for a document after upload.
38
+ *
39
+ * This extracts text from the document, splits it into chunks, generates
40
+ * embeddings, and stores them for search.
41
+ *
42
+ * The document status will transition: pending → processing → ready (or failed).
43
+ */
44
+ process(documentID, params, options) {
45
+ const { collectionId, ...body } = params;
46
+ return this._client.post((0, path_1.path) `/knowledge/collections/${collectionId}/documents/${documentID}/process`, {
47
+ body,
48
+ ...options,
49
+ });
50
+ }
51
+ /**
52
+ * Create a document record and get a presigned URL for upload.
53
+ *
54
+ * After receiving the response, upload the file to the presigned URL using a PUT
55
+ * request. The document will be processed automatically after upload.
56
+ */
57
+ upload(id, body, options) {
58
+ return this._client.post((0, path_1.path) `/knowledge/collections/${id}/documents`, { body, ...options });
59
+ }
60
+ }
61
+ exports.Documents = Documents;
62
+ //# sourceMappingURL=documents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documents.js","sourceRoot":"","sources":["../../../src/resources/knowledge/collections/documents.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,4DAAkF;AAClF,0DAAyD;AAEzD,0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,EAAU,EACV,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,0BAA0B,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;CACF;AAvED,8BAuEC"}
@@ -0,0 +1,58 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../../core/resource.mjs";
3
+ import { Cursor } from "../../../core/pagination.mjs";
4
+ import { buildHeaders } from "../../../internal/headers.mjs";
5
+ import { path } from "../../../internal/utils/path.mjs";
6
+ export class Documents extends APIResource {
7
+ /**
8
+ * Get details of a document.
9
+ */
10
+ retrieve(documentID, params, options) {
11
+ const { collectionId } = params;
12
+ return this._client.get(path `/knowledge/collections/${collectionId}/documents/${documentID}`, options);
13
+ }
14
+ /**
15
+ * List all documents in a knowledge collection.
16
+ */
17
+ list(id, query = {}, options) {
18
+ return this._client.getAPIList(path `/knowledge/collections/${id}/documents`, (Cursor), {
19
+ query,
20
+ ...options,
21
+ });
22
+ }
23
+ /**
24
+ * Delete a document and its associated data.
25
+ */
26
+ delete(documentID, params, options) {
27
+ const { collectionId } = params;
28
+ return this._client.delete(path `/knowledge/collections/${collectionId}/documents/${documentID}`, {
29
+ ...options,
30
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
31
+ });
32
+ }
33
+ /**
34
+ * Trigger processing for a document after upload.
35
+ *
36
+ * This extracts text from the document, splits it into chunks, generates
37
+ * embeddings, and stores them for search.
38
+ *
39
+ * The document status will transition: pending → processing → ready (or failed).
40
+ */
41
+ process(documentID, params, options) {
42
+ const { collectionId, ...body } = params;
43
+ return this._client.post(path `/knowledge/collections/${collectionId}/documents/${documentID}/process`, {
44
+ body,
45
+ ...options,
46
+ });
47
+ }
48
+ /**
49
+ * Create a document record and get a presigned URL for upload.
50
+ *
51
+ * After receiving the response, upload the file to the presigned URL using a PUT
52
+ * request. The document will be processed automatically after upload.
53
+ */
54
+ upload(id, body, options) {
55
+ return this._client.post(path `/knowledge/collections/${id}/documents`, { body, ...options });
56
+ }
57
+ }
58
+ //# sourceMappingURL=documents.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documents.mjs","sourceRoot":"","sources":["../../../src/resources/knowledge/collections/documents.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,MAAM,EAAkC;OAC1C,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,QAAQ,CACN,UAAkB,EAClB,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,0BAA0B,YAAY,cAAc,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACzG,CAAC;IAED;;OAEG;IACH,IAAI,CACF,EAAU,EACV,QAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAA,0BAA0B,EAAE,YAAY,EAAE,CAAA,MAAyB,CAAA,EAAE;YACtG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,UAAkB,EAAE,MAA4B,EAAE,OAAwB;QAC/E,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,0BAA0B,YAAY,cAAc,UAAU,EAAE,EAAE;YAC/F,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CACL,UAAkB,EAClB,MAA6B,EAC7B,OAAwB;QAExB,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,0BAA0B,YAAY,cAAc,UAAU,UAAU,EAAE;YACrG,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,MAAM,CACJ,EAAU,EACV,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,0BAA0B,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;CACF"}
@@ -0,0 +1,3 @@
1
+ export { Collections, type KnowledgeCollection, type CollectionCreateParams, type CollectionUpdateParams, type CollectionListParams, type KnowledgeCollectionsCursor, } from "./collections.mjs";
2
+ export { Documents, type KnowledgeDocument, type DocumentProcessResponse, type DocumentUploadResponse, type DocumentRetrieveParams, type DocumentListParams, type DocumentDeleteParams, type DocumentProcessParams, type DocumentUploadParams, type KnowledgeDocumentsCursor, } from "./documents.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/knowledge/collections/index.ts"],"names":[],"mappings":"OAEO,EACL,WAAW,EACX,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,GAChC;OACM,EACL,SAAS,EACT,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,GAC9B"}
@@ -0,0 +1,3 @@
1
+ export { Collections, type KnowledgeCollection, type CollectionCreateParams, type CollectionUpdateParams, type CollectionListParams, type KnowledgeCollectionsCursor, } from "./collections.js";
2
+ export { Documents, type KnowledgeDocument, type DocumentProcessResponse, type DocumentUploadResponse, type DocumentRetrieveParams, type DocumentListParams, type DocumentDeleteParams, type DocumentProcessParams, type DocumentUploadParams, type KnowledgeDocumentsCursor, } from "./documents.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/knowledge/collections/index.ts"],"names":[],"mappings":"OAEO,EACL,WAAW,EACX,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,GAChC;OACM,EACL,SAAS,EACT,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,GAC9B"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Documents = exports.Collections = void 0;
5
+ var collections_1 = require("./collections.js");
6
+ Object.defineProperty(exports, "Collections", { enumerable: true, get: function () { return collections_1.Collections; } });
7
+ var documents_1 = require("./documents.js");
8
+ Object.defineProperty(exports, "Documents", { enumerable: true, get: function () { return documents_1.Documents; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/knowledge/collections/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAOuB;AANrB,0GAAA,WAAW,OAAA;AAOb,4CAWqB;AAVnB,sGAAA,SAAS,OAAA"}
@@ -0,0 +1,4 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export { Collections, } from "./collections.mjs";
3
+ export { Documents, } from "./documents.mjs";
4
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/knowledge/collections/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,WAAW,GAMZ;OACM,EACL,SAAS,GAUV"}
@@ -0,0 +1,2 @@
1
+ export * from "./collections/index.mjs";
2
+ //# sourceMappingURL=collections.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collections.d.mts","sourceRoot":"","sources":["../../src/resources/knowledge/collections.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from "./collections/index.js";
2
+ //# sourceMappingURL=collections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../src/resources/knowledge/collections.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const tslib_1 = require("../../internal/tslib.js");
5
+ tslib_1.__exportStar(require("./collections/index.js"), exports);
6
+ //# sourceMappingURL=collections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collections.js","sourceRoot":"","sources":["../../src/resources/knowledge/collections.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,iEAAoC"}
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export * from "./collections/index.mjs";
3
+ //# sourceMappingURL=collections.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collections.mjs","sourceRoot":"","sources":["../../src/resources/knowledge/collections.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
@@ -0,0 +1,3 @@
1
+ export { Collections, type KnowledgeCollection, type CollectionCreateParams, type CollectionUpdateParams, type CollectionListParams, type KnowledgeCollectionsCursor, } from "./collections/index.mjs";
2
+ export { Knowledge, type KnowledgeSearchResponse, type KnowledgeSearchParams } from "./knowledge.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/knowledge/index.ts"],"names":[],"mappings":"OAEO,EACL,WAAW,EACX,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,GAChC;OACM,EAAE,SAAS,EAAE,KAAK,uBAAuB,EAAE,KAAK,qBAAqB,EAAE"}
@@ -0,0 +1,3 @@
1
+ export { Collections, type KnowledgeCollection, type CollectionCreateParams, type CollectionUpdateParams, type CollectionListParams, type KnowledgeCollectionsCursor, } from "./collections/index.js";
2
+ export { Knowledge, type KnowledgeSearchResponse, type KnowledgeSearchParams } from "./knowledge.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/knowledge/index.ts"],"names":[],"mappings":"OAEO,EACL,WAAW,EACX,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,GAChC;OACM,EAAE,SAAS,EAAE,KAAK,uBAAuB,EAAE,KAAK,qBAAqB,EAAE"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Knowledge = exports.Collections = void 0;
5
+ var index_1 = require("./collections/index.js");
6
+ Object.defineProperty(exports, "Collections", { enumerable: true, get: function () { return index_1.Collections; } });
7
+ var knowledge_1 = require("./knowledge.js");
8
+ Object.defineProperty(exports, "Knowledge", { enumerable: true, get: function () { return knowledge_1.Knowledge; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/knowledge/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAO6B;AAN3B,oGAAA,WAAW,OAAA;AAOb,4CAAkG;AAAzF,sGAAA,SAAS,OAAA"}
@@ -0,0 +1,4 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export { Collections, } from "./collections/index.mjs";
3
+ export { Knowledge } from "./knowledge.mjs";
4
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/knowledge/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,WAAW,GAMZ;OACM,EAAE,SAAS,EAA4D"}
@@ -0,0 +1,65 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import * as CollectionsAPI from "./collections/collections.mjs";
3
+ import { CollectionCreateParams, CollectionListParams, CollectionUpdateParams, Collections, KnowledgeCollection, KnowledgeCollectionsCursor } from "./collections/collections.mjs";
4
+ import { APIPromise } from "../../core/api-promise.mjs";
5
+ import { RequestOptions } from "../../internal/request-options.mjs";
6
+ export declare class Knowledge extends APIResource {
7
+ collections: CollectionsAPI.Collections;
8
+ /**
9
+ * Search across one or more knowledge collections using semantic similarity.
10
+ *
11
+ * The search uses vector embeddings to find the most relevant content. Results are
12
+ * ordered by relevance score (0-1, higher is more similar).
13
+ */
14
+ search(body: KnowledgeSearchParams, options?: RequestOptions): APIPromise<KnowledgeSearchResponse>;
15
+ }
16
+ export interface KnowledgeSearchResponse {
17
+ chunks: Array<KnowledgeSearchResponse.Chunk>;
18
+ /**
19
+ * Number of results found
20
+ */
21
+ count: number;
22
+ }
23
+ export declare namespace KnowledgeSearchResponse {
24
+ interface Chunk {
25
+ /**
26
+ * Position in document
27
+ */
28
+ chunkIndex: number;
29
+ /**
30
+ * Chunk text content
31
+ */
32
+ content: string;
33
+ /**
34
+ * Source document ID
35
+ */
36
+ documentId: string;
37
+ /**
38
+ * Similarity score (0-1)
39
+ */
40
+ score: number;
41
+ }
42
+ }
43
+ export interface KnowledgeSearchParams {
44
+ /**
45
+ * Collection IDs to search
46
+ */
47
+ collectionIds: Array<string>;
48
+ /**
49
+ * Natural language search query
50
+ */
51
+ query: string;
52
+ /**
53
+ * Maximum number of results
54
+ */
55
+ limit?: number;
56
+ /**
57
+ * Minimum similarity score (0-1)
58
+ */
59
+ threshold?: number;
60
+ }
61
+ export declare namespace Knowledge {
62
+ export { type KnowledgeSearchResponse as KnowledgeSearchResponse, type KnowledgeSearchParams as KnowledgeSearchParams, };
63
+ export { Collections as Collections, type KnowledgeCollection as KnowledgeCollection, type KnowledgeCollectionsCursor as KnowledgeCollectionsCursor, type CollectionCreateParams as CollectionCreateParams, type CollectionUpdateParams as CollectionUpdateParams, type CollectionListParams as CollectionListParams, };
64
+ }
65
+ //# sourceMappingURL=knowledge.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"knowledge.d.mts","sourceRoot":"","sources":["../../src/resources/knowledge/knowledge.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EACL,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,WAAW,EACX,mBAAmB,EACnB,0BAA0B,EAC3B;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,SAAU,SAAQ,WAAW;IACxC,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;IAEvF;;;;;OAKG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;CAGnG;AAED,MAAM,WAAW,uBAAuB;IACtC,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