@ai-matrx/api 0.0.0-stage → 0.1.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/CHANGELOG.md +31 -0
- package/LICENSE +21 -0
- package/README.md +22 -2
- package/dist/account.cjs +670 -0
- package/dist/account.d.cts +3246 -0
- package/dist/account.d.ts +3246 -0
- package/dist/account.js +558 -0
- package/dist/agents.cjs +598 -0
- package/dist/agents.d.cts +3417 -0
- package/dist/agents.d.ts +3417 -0
- package/dist/agents.js +497 -0
- package/dist/ai.cjs +109 -0
- package/dist/ai.d.cts +493 -0
- package/dist/ai.d.ts +493 -0
- package/dist/ai.js +91 -0
- package/dist/apps.cjs +394 -0
- package/dist/apps.d.cts +1094 -0
- package/dist/apps.d.ts +1094 -0
- package/dist/apps.js +328 -0
- package/dist/architecture.cjs +1223 -0
- package/dist/architecture.d.cts +4701 -0
- package/dist/architecture.d.ts +4701 -0
- package/dist/architecture.js +1016 -0
- package/dist/audio.cjs +226 -0
- package/dist/audio.d.cts +723 -0
- package/dist/audio.d.ts +723 -0
- package/dist/audio.js +188 -0
- package/dist/chat.cjs +538 -0
- package/dist/chat.d.cts +2251 -0
- package/dist/chat.d.ts +2251 -0
- package/dist/chat.js +447 -0
- package/dist/chunk-2SXAAKGV.cjs +279 -0
- package/dist/chunk-5WJLKYH6.cjs +48 -0
- package/dist/chunk-FNIYADWI.cjs +59 -0
- package/dist/chunk-HER22VVH.cjs +1047 -0
- package/dist/chunk-KIEAFMKB.js +264 -0
- package/dist/chunk-TSHL7Z53.js +1012 -0
- package/dist/chunk-VTZKJMSY.js +43 -0
- package/dist/chunk-YTEOFGFC.js +57 -0
- package/dist/code.cjs +561 -0
- package/dist/code.d.cts +1976 -0
- package/dist/code.d.ts +1976 -0
- package/dist/code.js +467 -0
- package/dist/commerce.cjs +22 -0
- package/dist/commerce.d.cts +45 -0
- package/dist/commerce.d.ts +45 -0
- package/dist/commerce.js +18 -0
- package/dist/communications.cjs +215 -0
- package/dist/communications.d.cts +948 -0
- package/dist/communications.d.ts +948 -0
- package/dist/communications.js +179 -0
- package/dist/computer.cjs +330 -0
- package/dist/computer.d.cts +733 -0
- package/dist/computer.d.ts +733 -0
- package/dist/computer.js +275 -0
- package/dist/content.cjs +425 -0
- package/dist/content.d.cts +1796 -0
- package/dist/content.d.ts +1796 -0
- package/dist/content.js +354 -0
- package/dist/credentials.cjs +22 -0
- package/dist/credentials.d.cts +82 -0
- package/dist/credentials.d.ts +82 -0
- package/dist/credentials.js +1 -0
- package/dist/crm.cjs +271 -0
- package/dist/crm.d.cts +1731 -0
- package/dist/crm.d.ts +1731 -0
- package/dist/crm.js +226 -0
- package/dist/data.cjs +382 -0
- package/dist/data.d.cts +1860 -0
- package/dist/data.d.ts +1860 -0
- package/dist/data.js +318 -0
- package/dist/education.cjs +28 -0
- package/dist/education.d.cts +73 -0
- package/dist/education.d.ts +73 -0
- package/dist/education.js +23 -0
- package/dist/files.cjs +1330 -0
- package/dist/files.d.cts +4956 -0
- package/dist/files.d.ts +4956 -0
- package/dist/files.js +1104 -0
- package/dist/human-resources.cjs +178 -0
- package/dist/human-resources.d.cts +1208 -0
- package/dist/human-resources.d.ts +1208 -0
- package/dist/human-resources.js +148 -0
- package/dist/index-C2E-Cp19.d.ts +385 -0
- package/dist/index-wC2vtb70.d.cts +385 -0
- package/dist/index.cjs +2016 -0
- package/dist/index.d.cts +2069 -0
- package/dist/index.d.ts +2069 -0
- package/dist/index.js +1746 -0
- package/dist/integrations.cjs +5116 -0
- package/dist/integrations.d.cts +19213 -0
- package/dist/integrations.d.ts +19213 -0
- package/dist/integrations.js +4263 -0
- package/dist/intelligence.cjs +1305 -0
- package/dist/intelligence.d.cts +4658 -0
- package/dist/intelligence.d.ts +4658 -0
- package/dist/intelligence.js +1196 -0
- package/dist/knowledge.cjs +1113 -0
- package/dist/knowledge.d.cts +5427 -0
- package/dist/knowledge.d.ts +5427 -0
- package/dist/knowledge.js +921 -0
- package/dist/legal.cjs +225 -0
- package/dist/legal.d.cts +1038 -0
- package/dist/legal.d.ts +1038 -0
- package/dist/legal.js +187 -0
- package/dist/marketing.cjs +1155 -0
- package/dist/marketing.d.cts +7741 -0
- package/dist/marketing.d.ts +7741 -0
- package/dist/marketing.js +951 -0
- package/dist/masterwork.cjs +283 -0
- package/dist/masterwork.d.cts +1938 -0
- package/dist/masterwork.d.ts +1938 -0
- package/dist/masterwork.js +231 -0
- package/dist/media.cjs +610 -0
- package/dist/media.d.cts +2270 -0
- package/dist/media.d.ts +2270 -0
- package/dist/media.js +507 -0
- package/dist/net.cjs +67 -0
- package/dist/net.d.cts +204 -0
- package/dist/net.d.ts +204 -0
- package/dist/net.js +2 -0
- package/dist/platform.cjs +150 -0
- package/dist/platform.d.cts +572 -0
- package/dist/platform.d.ts +572 -0
- package/dist/platform.js +125 -0
- package/dist/publish.cjs +248 -0
- package/dist/publish.d.cts +1431 -0
- package/dist/publish.d.ts +1431 -0
- package/dist/publish.js +206 -0
- package/dist/schemas.cjs +2 -0
- package/dist/schemas.d.cts +1353 -0
- package/dist/schemas.d.ts +1353 -0
- package/dist/schemas.js +1 -0
- package/dist/stream.cjs +44 -0
- package/dist/stream.d.cts +2 -0
- package/dist/stream.d.ts +2 -0
- package/dist/stream.js +3 -0
- package/dist/web.cjs +1045 -0
- package/dist/web.d.cts +4186 -0
- package/dist/web.d.ts +4186 -0
- package/dist/web.js +867 -0
- package/dist/workflows.cjs +825 -0
- package/dist/workflows.d.cts +4699 -0
- package/dist/workflows.d.ts +4699 -0
- package/dist/workflows.js +686 -0
- package/package.json +419 -4
package/dist/content.js
ADDED
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
import { openStream } from './chunk-TSHL7Z53.js';
|
|
2
|
+
import './chunk-KIEAFMKB.js';
|
|
3
|
+
import './chunk-VTZKJMSY.js';
|
|
4
|
+
|
|
5
|
+
// src/generated/content.ts
|
|
6
|
+
var $esignOutsiderOpen = { m: "POST", p: "/esign/signing/outsider/open", d: "aidream", a: "scoped", o: "exempt", n: "content.esign_outsider_open" };
|
|
7
|
+
function esignOutsiderOpen(api, args, options) {
|
|
8
|
+
return api.call($esignOutsiderOpen, args, options);
|
|
9
|
+
}
|
|
10
|
+
var $esignOutsiderCode = { m: "POST", p: "/esign/signing/outsider/code", d: "aidream", a: "scoped", o: "exempt", n: "content.esign_outsider_code" };
|
|
11
|
+
function esignOutsiderCode(api, args, options) {
|
|
12
|
+
return api.call($esignOutsiderCode, args, options);
|
|
13
|
+
}
|
|
14
|
+
var $esignOutsiderVerify = { m: "POST", p: "/esign/signing/outsider/verify", d: "aidream", a: "scoped", o: "exempt", n: "content.esign_outsider_verify" };
|
|
15
|
+
function esignOutsiderVerify(api, args, options) {
|
|
16
|
+
return api.call($esignOutsiderVerify, args, options);
|
|
17
|
+
}
|
|
18
|
+
var $esignOutsiderAct = { m: "POST", p: "/esign/signing/outsider/act", d: "aidream", a: "public", o: "exempt", n: "content.esign_outsider_act" };
|
|
19
|
+
function esignOutsiderAct(api, args, options) {
|
|
20
|
+
return api.call($esignOutsiderAct, args, options);
|
|
21
|
+
}
|
|
22
|
+
var $esignHandoffOpen = { m: "POST", p: "/esign/signing/handoff/open", d: "aidream", a: "scoped", o: "exempt", n: "content.esign_handoff_open" };
|
|
23
|
+
function esignHandoffOpen(api, args, options) {
|
|
24
|
+
return api.call($esignHandoffOpen, args, options);
|
|
25
|
+
}
|
|
26
|
+
var $esignHandoffSubmit = { m: "POST", p: "/esign/signing/handoff/submit", d: "aidream", a: "scoped", o: "exempt", n: "content.esign_handoff_submit" };
|
|
27
|
+
function esignHandoffSubmit(api, args, options) {
|
|
28
|
+
return api.call($esignHandoffSubmit, args, options);
|
|
29
|
+
}
|
|
30
|
+
var $esignInternalAct = { m: "POST", p: "/esign/signing/envelope/{envelope_id}/act", d: "aidream", a: "guest", o: "exempt", n: "content.esign_internal_act" };
|
|
31
|
+
function esignInternalAct(api, args, options) {
|
|
32
|
+
return api.call($esignInternalAct, args, options);
|
|
33
|
+
}
|
|
34
|
+
var $esignSend = { m: "POST", p: "/esign/envelopes", d: "aidream", a: "user", o: "required", n: "content.esign_send" };
|
|
35
|
+
function esignSend(api, args, options) {
|
|
36
|
+
return api.call($esignSend, args, options);
|
|
37
|
+
}
|
|
38
|
+
var $esignRemind = { m: "POST", p: "/esign/envelopes/{envelope_id}/remind", d: "aidream", a: "user", o: "required", n: "content.esign_remind" };
|
|
39
|
+
function esignRemind(api, args, options) {
|
|
40
|
+
return api.call($esignRemind, args, options);
|
|
41
|
+
}
|
|
42
|
+
var $esignResend = { m: "POST", p: "/esign/envelopes/{envelope_id}/signers/{signer_id}/resend", d: "aidream", a: "user", o: "required", n: "content.esign_resend" };
|
|
43
|
+
function esignResend(api, args, options) {
|
|
44
|
+
return api.call($esignResend, args, options);
|
|
45
|
+
}
|
|
46
|
+
var $esignVoid = { m: "POST", p: "/esign/envelopes/{envelope_id}/void", d: "aidream", a: "user", o: "required", n: "content.esign_void" };
|
|
47
|
+
function esignVoid(api, args, options) {
|
|
48
|
+
return api.call($esignVoid, args, options);
|
|
49
|
+
}
|
|
50
|
+
var $esignVerify = { m: "POST", p: "/esign/envelopes/{envelope_id}/verify", d: "aidream", a: "user", o: "required", n: "content.esign_verify" };
|
|
51
|
+
function esignVerify(api, args, options) {
|
|
52
|
+
return api.call($esignVerify, args, options);
|
|
53
|
+
}
|
|
54
|
+
var $esignSignedCopy = { m: "POST", p: "/esign/envelopes/{envelope_id}/signed-copy", d: "aidream", a: "user", o: "required", n: "content.esign_signed_copy" };
|
|
55
|
+
function esignSignedCopy(api, args, options) {
|
|
56
|
+
return api.call($esignSignedCopy, args, options);
|
|
57
|
+
}
|
|
58
|
+
var $esignDraftSend = { m: "POST", p: "/esign/drafts/{envelope_id}/send", d: "aidream", a: "user", o: "required", n: "content.esign_draft_send" };
|
|
59
|
+
function esignDraftSend(api, args, options) {
|
|
60
|
+
return api.call($esignDraftSend, args, options);
|
|
61
|
+
}
|
|
62
|
+
var $esignDownload = { m: "POST", p: "/esign/envelopes/{envelope_id}/download", d: "aidream", a: "user", o: "required", n: "content.esign_download" };
|
|
63
|
+
function esignDownload(api, args, options) {
|
|
64
|
+
return api.call($esignDownload, args, options);
|
|
65
|
+
}
|
|
66
|
+
var $esignFinalize = { m: "POST", p: "/esign/envelopes/{envelope_id}/finalize", d: "aidream", a: "user", o: "required", n: "content.esign_finalize" };
|
|
67
|
+
function esignFinalize(api, args, options) {
|
|
68
|
+
return api.call($esignFinalize, args, options);
|
|
69
|
+
}
|
|
70
|
+
var $esignDetectFields = { m: "POST", p: "/esign/detect-fields", d: "aidream", a: "user", o: "required", n: "content.esign_detect_fields" };
|
|
71
|
+
function esignDetectFields(api, args, options) {
|
|
72
|
+
return api.call($esignDetectFields, args, options);
|
|
73
|
+
}
|
|
74
|
+
var $getAllContentBlocks = { m: "GET", p: "/content-blocks", d: "aidream", a: "guest", o: "optional", n: "content.get_all_content_blocks" };
|
|
75
|
+
function getAllContentBlocks(api, args, options) {
|
|
76
|
+
return api.call($getAllContentBlocks, args, options);
|
|
77
|
+
}
|
|
78
|
+
var $getContentBlocksByCategory = { m: "GET", p: "/content-blocks/category/{category_id}", d: "aidream", a: "guest", o: "optional", n: "content.get_content_blocks_by_category" };
|
|
79
|
+
function getContentBlocksByCategory(api, args, options) {
|
|
80
|
+
return api.call($getContentBlocksByCategory, args, options);
|
|
81
|
+
}
|
|
82
|
+
var $getContentBlockById = { m: "GET", p: "/content-blocks/{block_id}", d: "aidream", a: "guest", o: "optional", n: "content.get_content_block_by_id" };
|
|
83
|
+
function getContentBlockById(api, args, options) {
|
|
84
|
+
return api.call($getContentBlockById, args, options);
|
|
85
|
+
}
|
|
86
|
+
var $findDocumentByCldFile = { m: "GET", p: "/document/by-cld-file/{cld_file_id}", d: "aidream", a: "guest", o: "optional", n: "content.find_document_by_cld_file" };
|
|
87
|
+
function findDocumentByCldFile(api, args, options) {
|
|
88
|
+
return api.call($findDocumentByCldFile, args, options);
|
|
89
|
+
}
|
|
90
|
+
var $getDocumentOverview = { m: "GET", p: "/document/{doc_id}", d: "aidream", a: "guest", o: "optional", n: "content.get_document_overview" };
|
|
91
|
+
function getDocumentOverview(api, args, options) {
|
|
92
|
+
return api.call($getDocumentOverview, args, options);
|
|
93
|
+
}
|
|
94
|
+
var $getDocumentLineage = { m: "GET", p: "/document/{doc_id}/lineage", d: "aidream", a: "guest", o: "optional", n: "content.get_document_lineage" };
|
|
95
|
+
function getDocumentLineage(api, args, options) {
|
|
96
|
+
return api.call($getDocumentLineage, args, options);
|
|
97
|
+
}
|
|
98
|
+
var $getDocumentPages = { m: "GET", p: "/document/{doc_id}/pages", d: "aidream", a: "guest", o: "optional", n: "content.get_document_pages" };
|
|
99
|
+
function getDocumentPages(api, args, options) {
|
|
100
|
+
return api.call($getDocumentPages, args, options);
|
|
101
|
+
}
|
|
102
|
+
var $getDocumentPage = { m: "GET", p: "/document/{doc_id}/page/{page_index}", d: "aidream", a: "guest", o: "optional", n: "content.get_document_page" };
|
|
103
|
+
function getDocumentPage(api, args, options) {
|
|
104
|
+
return api.call($getDocumentPage, args, options);
|
|
105
|
+
}
|
|
106
|
+
var $getDocumentPageImage = { m: "GET", p: "/document/{doc_id}/page/{page_index}/image", d: "aidream", a: "guest", o: "optional", n: "content.get_document_page_image" };
|
|
107
|
+
function getDocumentPageImage(api, args, options) {
|
|
108
|
+
return api.call($getDocumentPageImage, args, options);
|
|
109
|
+
}
|
|
110
|
+
var $getDocumentChunks = { m: "GET", p: "/document/{doc_id}/chunks", d: "aidream", a: "guest", o: "optional", n: "content.get_document_chunks" };
|
|
111
|
+
function getDocumentChunks(api, args, options) {
|
|
112
|
+
return api.call($getDocumentChunks, args, options);
|
|
113
|
+
}
|
|
114
|
+
var $capture = { m: "POST", p: "/rendered-output/capture", d: "aidream", a: "user", o: "required", n: "content.capture" };
|
|
115
|
+
function capture(api, args, options) {
|
|
116
|
+
return api.call($capture, args, options);
|
|
117
|
+
}
|
|
118
|
+
var $processBlocks = { m: "POST", p: "/utilities/block-processing/process", d: "aidream", a: "guest", o: "exempt", n: "content.process_blocks" };
|
|
119
|
+
function processBlocks(api, args, options) {
|
|
120
|
+
return api.call($processBlocks, args, options);
|
|
121
|
+
}
|
|
122
|
+
var $processBlocksStream = { m: "POST", p: "/utilities/block-processing/process/stream", d: "aidream", a: "guest", o: "exempt", s: "ndjson", n: "content.process_blocks_stream" };
|
|
123
|
+
function processBlocksStream(api, args, options) {
|
|
124
|
+
return openStream(api, $processBlocksStream, args, options);
|
|
125
|
+
}
|
|
126
|
+
var $simulateProviderRetryStream = { m: "POST", p: "/utilities/block-processing/simulate/provider-retry", d: "aidream", a: "guest", o: "required", s: "ndjson", n: "content.simulate_provider_retry_stream" };
|
|
127
|
+
function simulateProviderRetryStream(api, args, options) {
|
|
128
|
+
return openStream(api, $simulateProviderRetryStream, args, options);
|
|
129
|
+
}
|
|
130
|
+
var $processFile = { m: "POST", p: "/content-processing/{cld_file_id}", d: "aidream", a: "guest", o: "required", s: "ndjson", n: "content.process_file" };
|
|
131
|
+
function processFile(api, args, options) {
|
|
132
|
+
return openStream(api, $processFile, args, options);
|
|
133
|
+
}
|
|
134
|
+
var $generateOffice = { m: "POST", p: "/office/generate", d: "aidream", a: "guest", o: "required", n: "content.generate_office" };
|
|
135
|
+
function generateOffice(api, args, options) {
|
|
136
|
+
return api.call($generateOffice, args, options);
|
|
137
|
+
}
|
|
138
|
+
var $extractOfficeMarkdown = { m: "GET", p: "/office/{file_id}/markdown", d: "aidream", a: "guest", o: "optional", n: "content.extract_office_markdown" };
|
|
139
|
+
function extractOfficeMarkdown(api, args, options) {
|
|
140
|
+
return api.call($extractOfficeMarkdown, args, options);
|
|
141
|
+
}
|
|
142
|
+
var $convertOfficeFile = { m: "POST", p: "/office/{file_id}/convert", d: "aidream", a: "guest", o: "required", n: "content.convert_office_file" };
|
|
143
|
+
function convertOfficeFile(api, args, options) {
|
|
144
|
+
return api.call($convertOfficeFile, args, options);
|
|
145
|
+
}
|
|
146
|
+
var $label = { m: "POST", p: "/content-label", d: "aidream", a: "guest", o: "required", n: "content.label" };
|
|
147
|
+
function label(api, args, options) {
|
|
148
|
+
return api.call($label, args, options);
|
|
149
|
+
}
|
|
150
|
+
var $getFolderTree = { m: "GET", p: "/notes/tree", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.get_folder_tree" };
|
|
151
|
+
function getFolderTree(api, args, options) {
|
|
152
|
+
return api.call($getFolderTree, args, options);
|
|
153
|
+
}
|
|
154
|
+
var $createFolder = { m: "POST", p: "/notes/folders", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.create_folder" };
|
|
155
|
+
function createFolder(api, args, options) {
|
|
156
|
+
return api.call($createFolder, args, options);
|
|
157
|
+
}
|
|
158
|
+
var $updateFolder = { m: "PUT", p: "/notes/folders/{folder_id}", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.update_folder" };
|
|
159
|
+
function updateFolder(api, args, options) {
|
|
160
|
+
return api.call($updateFolder, args, options);
|
|
161
|
+
}
|
|
162
|
+
var $deleteFolder = { m: "DELETE", p: "/notes/folders/{folder_id}", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.delete_folder" };
|
|
163
|
+
function deleteFolder(api, args, options) {
|
|
164
|
+
return api.call($deleteFolder, args, options);
|
|
165
|
+
}
|
|
166
|
+
var $listNotes = { m: "GET", p: "/notes/notes", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.list_notes" };
|
|
167
|
+
function listNotes(api, args, options) {
|
|
168
|
+
return api.call($listNotes, args, options);
|
|
169
|
+
}
|
|
170
|
+
var $createNote = { m: "POST", p: "/notes/notes", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.create_note" };
|
|
171
|
+
function createNote(api, args, options) {
|
|
172
|
+
return api.call($createNote, args, options);
|
|
173
|
+
}
|
|
174
|
+
var $getNote = { m: "GET", p: "/notes/notes/{note_id}", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.get_note" };
|
|
175
|
+
function getNote(api, args, options) {
|
|
176
|
+
return api.call($getNote, args, options);
|
|
177
|
+
}
|
|
178
|
+
var $updateNote = { m: "PUT", p: "/notes/notes/{note_id}", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.update_note" };
|
|
179
|
+
function updateNote(api, args, options) {
|
|
180
|
+
return api.call($updateNote, args, options);
|
|
181
|
+
}
|
|
182
|
+
var $deleteNote = { m: "DELETE", p: "/notes/notes/{note_id}", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.delete_note" };
|
|
183
|
+
function deleteNote(api, args, options) {
|
|
184
|
+
return api.call($deleteNote, args, options);
|
|
185
|
+
}
|
|
186
|
+
var $setNoteExcluded = { m: "POST", p: "/notes/notes/{note_id}/exclude", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.set_note_excluded" };
|
|
187
|
+
function setNoteExcluded(api, args, options) {
|
|
188
|
+
return api.call($setNoteExcluded, args, options);
|
|
189
|
+
}
|
|
190
|
+
var $getNoteSyncStatus = { m: "GET", p: "/notes/notes/{note_id}/sync-status", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.get_note_sync_status" };
|
|
191
|
+
function getNoteSyncStatus(api, args, options) {
|
|
192
|
+
return api.call($getNoteSyncStatus, args, options);
|
|
193
|
+
}
|
|
194
|
+
var $listVersions = { m: "GET", p: "/notes/notes/{note_id}/versions", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.list_versions" };
|
|
195
|
+
function listVersions(api, args, options) {
|
|
196
|
+
return api.call($listVersions, args, options);
|
|
197
|
+
}
|
|
198
|
+
var $revertNote = { m: "POST", p: "/notes/notes/{note_id}/revert", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.revert_note" };
|
|
199
|
+
function revertNote(api, args, options) {
|
|
200
|
+
return api.call($revertNote, args, options);
|
|
201
|
+
}
|
|
202
|
+
var $syncStatus = { m: "GET", p: "/notes/sync/status", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.sync_status" };
|
|
203
|
+
function syncStatus(api, args, options) {
|
|
204
|
+
return api.call($syncStatus, args, options);
|
|
205
|
+
}
|
|
206
|
+
var $resetDeleteBreaker = { m: "POST", p: "/notes/sync/delete-breaker/reset", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.reset_delete_breaker" };
|
|
207
|
+
function resetDeleteBreaker(api, args, options) {
|
|
208
|
+
return api.call($resetDeleteBreaker, args, options);
|
|
209
|
+
}
|
|
210
|
+
var $triggerSync = { m: "POST", p: "/notes/sync/trigger", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.trigger_sync" };
|
|
211
|
+
function triggerSync(api, args, options) {
|
|
212
|
+
return api.call($triggerSync, args, options);
|
|
213
|
+
}
|
|
214
|
+
var $pullChanges = { m: "POST", p: "/notes/sync/pull", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.pull_changes" };
|
|
215
|
+
function pullChanges(api, args, options) {
|
|
216
|
+
return api.call($pullChanges, args, options);
|
|
217
|
+
}
|
|
218
|
+
var $pullSingleNote = { m: "POST", p: "/notes/sync/pull-note", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.pull_single_note" };
|
|
219
|
+
function pullSingleNote(api, args, options) {
|
|
220
|
+
return api.call($pullSingleNote, args, options);
|
|
221
|
+
}
|
|
222
|
+
var $registerDevice = { m: "POST", p: "/notes/sync/register-device", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.register_device" };
|
|
223
|
+
function registerDevice(api, args, options) {
|
|
224
|
+
return api.call($registerDevice, args, options);
|
|
225
|
+
}
|
|
226
|
+
var $startWatcher = { m: "POST", p: "/notes/sync/start-watcher", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.start_watcher" };
|
|
227
|
+
function startWatcher(api, args, options) {
|
|
228
|
+
return api.call($startWatcher, args, options);
|
|
229
|
+
}
|
|
230
|
+
var $stopWatcher = { m: "POST", p: "/notes/sync/stop-watcher", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.stop_watcher" };
|
|
231
|
+
function stopWatcher(api, args, options) {
|
|
232
|
+
return api.call($stopWatcher, args, options);
|
|
233
|
+
}
|
|
234
|
+
var $listConflicts = { m: "GET", p: "/notes/conflicts", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.list_conflicts" };
|
|
235
|
+
function listConflicts(api, args, options) {
|
|
236
|
+
return api.call($listConflicts, args, options);
|
|
237
|
+
}
|
|
238
|
+
var $resolveConflict = { m: "POST", p: "/notes/conflicts/{note_id}/resolve", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.resolve_conflict" };
|
|
239
|
+
function resolveConflict(api, args, options) {
|
|
240
|
+
return api.call($resolveConflict, args, options);
|
|
241
|
+
}
|
|
242
|
+
var $listShares = { m: "GET", p: "/notes/shares", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.list_shares" };
|
|
243
|
+
function listShares(api, args, options) {
|
|
244
|
+
return api.call($listShares, args, options);
|
|
245
|
+
}
|
|
246
|
+
var $createShare = { m: "POST", p: "/notes/shares", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.create_share" };
|
|
247
|
+
function createShare(api, args, options) {
|
|
248
|
+
return api.call($createShare, args, options);
|
|
249
|
+
}
|
|
250
|
+
var $updateShare = { m: "PUT", p: "/notes/shares/{share_id}", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.update_share" };
|
|
251
|
+
function updateShare(api, args, options) {
|
|
252
|
+
return api.call($updateShare, args, options);
|
|
253
|
+
}
|
|
254
|
+
var $deleteShare = { m: "DELETE", p: "/notes/shares/{share_id}", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.delete_share" };
|
|
255
|
+
function deleteShare(api, args, options) {
|
|
256
|
+
return api.call($deleteShare, args, options);
|
|
257
|
+
}
|
|
258
|
+
var $listMappings = { m: "GET", p: "/notes/mappings", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.list_mappings" };
|
|
259
|
+
function listMappings(api, args, options) {
|
|
260
|
+
return api.call($listMappings, args, options);
|
|
261
|
+
}
|
|
262
|
+
var $createMapping = { m: "POST", p: "/notes/mappings", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.create_mapping" };
|
|
263
|
+
function createMapping(api, args, options) {
|
|
264
|
+
return api.call($createMapping, args, options);
|
|
265
|
+
}
|
|
266
|
+
var $deleteMapping = { m: "DELETE", p: "/notes/mappings/{mapping_id}", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.delete_mapping" };
|
|
267
|
+
function deleteMapping(api, args, options) {
|
|
268
|
+
return api.call($deleteMapping, args, options);
|
|
269
|
+
}
|
|
270
|
+
var $listLocalFolders = { m: "GET", p: "/notes/local/folders", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.list_local_folders" };
|
|
271
|
+
function listLocalFolders(api, args, options) {
|
|
272
|
+
return api.call($listLocalFolders, args, options);
|
|
273
|
+
}
|
|
274
|
+
var $scanLocalFiles = { m: "GET", p: "/notes/local/files", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.scan_local_files" };
|
|
275
|
+
function scanLocalFiles(api, args, options) {
|
|
276
|
+
return api.call($scanLocalFiles, args, options);
|
|
277
|
+
}
|
|
278
|
+
var $readLocalFile = { m: "GET", p: "/notes/local/files/{file_path}", d: "matrx-local", a: "loopback_token", o: "exempt", n: "content.read_local_file" };
|
|
279
|
+
function readLocalFile(api, args, options) {
|
|
280
|
+
return api.call($readLocalFile, args, options);
|
|
281
|
+
}
|
|
282
|
+
var TABLE = {
|
|
283
|
+
"POST /esign/signing/outsider/open": $esignOutsiderOpen,
|
|
284
|
+
"POST /esign/signing/outsider/code": $esignOutsiderCode,
|
|
285
|
+
"POST /esign/signing/outsider/verify": $esignOutsiderVerify,
|
|
286
|
+
"POST /esign/signing/outsider/act": $esignOutsiderAct,
|
|
287
|
+
"POST /esign/signing/handoff/open": $esignHandoffOpen,
|
|
288
|
+
"POST /esign/signing/handoff/submit": $esignHandoffSubmit,
|
|
289
|
+
"POST /esign/signing/envelope/{envelope_id}/act": $esignInternalAct,
|
|
290
|
+
"POST /esign/envelopes": $esignSend,
|
|
291
|
+
"POST /esign/envelopes/{envelope_id}/remind": $esignRemind,
|
|
292
|
+
"POST /esign/envelopes/{envelope_id}/signers/{signer_id}/resend": $esignResend,
|
|
293
|
+
"POST /esign/envelopes/{envelope_id}/void": $esignVoid,
|
|
294
|
+
"POST /esign/envelopes/{envelope_id}/verify": $esignVerify,
|
|
295
|
+
"POST /esign/envelopes/{envelope_id}/signed-copy": $esignSignedCopy,
|
|
296
|
+
"POST /esign/drafts/{envelope_id}/send": $esignDraftSend,
|
|
297
|
+
"POST /esign/envelopes/{envelope_id}/download": $esignDownload,
|
|
298
|
+
"POST /esign/envelopes/{envelope_id}/finalize": $esignFinalize,
|
|
299
|
+
"POST /esign/detect-fields": $esignDetectFields,
|
|
300
|
+
"GET /content-blocks": $getAllContentBlocks,
|
|
301
|
+
"GET /content-blocks/category/{category_id}": $getContentBlocksByCategory,
|
|
302
|
+
"GET /content-blocks/{block_id}": $getContentBlockById,
|
|
303
|
+
"GET /document/by-cld-file/{cld_file_id}": $findDocumentByCldFile,
|
|
304
|
+
"GET /document/{doc_id}": $getDocumentOverview,
|
|
305
|
+
"GET /document/{doc_id}/lineage": $getDocumentLineage,
|
|
306
|
+
"GET /document/{doc_id}/pages": $getDocumentPages,
|
|
307
|
+
"GET /document/{doc_id}/page/{page_index}": $getDocumentPage,
|
|
308
|
+
"GET /document/{doc_id}/page/{page_index}/image": $getDocumentPageImage,
|
|
309
|
+
"GET /document/{doc_id}/chunks": $getDocumentChunks,
|
|
310
|
+
"POST /rendered-output/capture": $capture,
|
|
311
|
+
"POST /utilities/block-processing/process": $processBlocks,
|
|
312
|
+
"POST /office/generate": $generateOffice,
|
|
313
|
+
"GET /office/{file_id}/markdown": $extractOfficeMarkdown,
|
|
314
|
+
"POST /office/{file_id}/convert": $convertOfficeFile,
|
|
315
|
+
"POST /content-label": $label,
|
|
316
|
+
"GET /notes/tree": $getFolderTree,
|
|
317
|
+
"POST /notes/folders": $createFolder,
|
|
318
|
+
"PUT /notes/folders/{folder_id}": $updateFolder,
|
|
319
|
+
"DELETE /notes/folders/{folder_id}": $deleteFolder,
|
|
320
|
+
"GET /notes/notes": $listNotes,
|
|
321
|
+
"POST /notes/notes": $createNote,
|
|
322
|
+
"GET /notes/notes/{note_id}": $getNote,
|
|
323
|
+
"PUT /notes/notes/{note_id}": $updateNote,
|
|
324
|
+
"DELETE /notes/notes/{note_id}": $deleteNote,
|
|
325
|
+
"POST /notes/notes/{note_id}/exclude": $setNoteExcluded,
|
|
326
|
+
"GET /notes/notes/{note_id}/sync-status": $getNoteSyncStatus,
|
|
327
|
+
"GET /notes/notes/{note_id}/versions": $listVersions,
|
|
328
|
+
"POST /notes/notes/{note_id}/revert": $revertNote,
|
|
329
|
+
"GET /notes/sync/status": $syncStatus,
|
|
330
|
+
"POST /notes/sync/delete-breaker/reset": $resetDeleteBreaker,
|
|
331
|
+
"POST /notes/sync/trigger": $triggerSync,
|
|
332
|
+
"POST /notes/sync/pull": $pullChanges,
|
|
333
|
+
"POST /notes/sync/pull-note": $pullSingleNote,
|
|
334
|
+
"POST /notes/sync/register-device": $registerDevice,
|
|
335
|
+
"POST /notes/sync/start-watcher": $startWatcher,
|
|
336
|
+
"POST /notes/sync/stop-watcher": $stopWatcher,
|
|
337
|
+
"GET /notes/conflicts": $listConflicts,
|
|
338
|
+
"POST /notes/conflicts/{note_id}/resolve": $resolveConflict,
|
|
339
|
+
"GET /notes/shares": $listShares,
|
|
340
|
+
"POST /notes/shares": $createShare,
|
|
341
|
+
"PUT /notes/shares/{share_id}": $updateShare,
|
|
342
|
+
"DELETE /notes/shares/{share_id}": $deleteShare,
|
|
343
|
+
"GET /notes/mappings": $listMappings,
|
|
344
|
+
"POST /notes/mappings": $createMapping,
|
|
345
|
+
"DELETE /notes/mappings/{mapping_id}": $deleteMapping,
|
|
346
|
+
"GET /notes/local/folders": $listLocalFolders,
|
|
347
|
+
"GET /notes/local/files": $scanLocalFiles,
|
|
348
|
+
"GET /notes/local/files/{file_path}": $readLocalFile
|
|
349
|
+
};
|
|
350
|
+
function call(api, key, args, options) {
|
|
351
|
+
return api.call(TABLE[key], args, options);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export { call, capture, convertOfficeFile, createFolder, createMapping, createNote, createShare, deleteFolder, deleteMapping, deleteNote, deleteShare, esignDetectFields, esignDownload, esignDraftSend, esignFinalize, esignHandoffOpen, esignHandoffSubmit, esignInternalAct, esignOutsiderAct, esignOutsiderCode, esignOutsiderOpen, esignOutsiderVerify, esignRemind, esignResend, esignSend, esignSignedCopy, esignVerify, esignVoid, extractOfficeMarkdown, findDocumentByCldFile, generateOffice, getAllContentBlocks, getContentBlockById, getContentBlocksByCategory, getDocumentChunks, getDocumentLineage, getDocumentOverview, getDocumentPage, getDocumentPageImage, getDocumentPages, getFolderTree, getNote, getNoteSyncStatus, label, listConflicts, listLocalFolders, listMappings, listNotes, listShares, listVersions, processBlocks, processBlocksStream, processFile, pullChanges, pullSingleNote, readLocalFile, registerDevice, resetDeleteBreaker, resolveConflict, revertNote, scanLocalFiles, setNoteExcluded, simulateProviderRetryStream, startWatcher, stopWatcher, syncStatus, triggerSync, updateFolder, updateNote, updateShare };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk5WJLKYH6_cjs = require('./chunk-5WJLKYH6.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "API_KEY_PREFIX", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunk5WJLKYH6_cjs.API_KEY_PREFIX; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "MATRX_HEADERS", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunk5WJLKYH6_cjs.MATRX_HEADERS; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "credentialToHeaders", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunk5WJLKYH6_cjs.credentialToHeaders; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "toCredentialsPort", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return chunk5WJLKYH6_cjs.toCredentialsPort; }
|
|
22
|
+
});
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The credentials port — the ONE credential→header mapping for every client
|
|
3
|
+
* of every AI Matrx server (package lines v3 §3.4; API-key lane C16).
|
|
4
|
+
*
|
|
5
|
+
* Five credential kinds, one mapping, in exactly one place. The kind names are
|
|
6
|
+
* the contract's own `x-matrx-auth` tier names, so a generated operation's
|
|
7
|
+
* tier and the credential that satisfies it read the same in every language
|
|
8
|
+
* (TypeScript here; the Python `matrx-api` and future Swift/Kotlin clients
|
|
9
|
+
* share these header names and shapes — see {@link MATRX_HEADERS}):
|
|
10
|
+
*
|
|
11
|
+
* - `user` — a signed-in person: `Authorization: Bearer <Supabase JWT>`.
|
|
12
|
+
* - `guest` — a fingerprint: `X-Fingerprint-ID: <id>`.
|
|
13
|
+
* - `api_key` — an AI Matrx API key: `Authorization: Bearer mx_live_...`.
|
|
14
|
+
* The server's ONE AuthMiddleware disambiguates by shape (`mx_` prefix vs
|
|
15
|
+
* three-dot JWT), so `user` and `api_key` ride the same header.
|
|
16
|
+
* - `service` — one of our servers calling another: the server secret as
|
|
17
|
+
* `Authorization: Bearer <secret>` (or in `secretHeader`), plus the acting
|
|
18
|
+
* person in `X-Matrx-User-Id` when there is one
|
|
19
|
+
* (`matrx_connect.service_auth`).
|
|
20
|
+
* - `scoped` — a short-lived capability token (sandbox, desktop app, broker
|
|
21
|
+
* client): `Authorization: Bearer <token>` (`matrx_connect.scoped_tokens`).
|
|
22
|
+
* Short-lived means the PORT re-reads it per call: hand a `CredentialsPort`
|
|
23
|
+
* whose `get()` returns the current token.
|
|
24
|
+
*
|
|
25
|
+
* No polling, no readiness loop: readiness is the port's promise.
|
|
26
|
+
*/
|
|
27
|
+
/** Header names every AI Matrx client and server shares (TS, Python, native). */
|
|
28
|
+
declare const MATRX_HEADERS: {
|
|
29
|
+
readonly authorization: "Authorization";
|
|
30
|
+
readonly fingerprint: "X-Fingerprint-ID";
|
|
31
|
+
readonly organization: "X-Organization-Id";
|
|
32
|
+
readonly actingUser: "X-Matrx-User-Id";
|
|
33
|
+
readonly requestId: "X-Request-Id";
|
|
34
|
+
};
|
|
35
|
+
/** The credential kinds — identical to the contract's `x-matrx-auth` tiers that carry a credential. */
|
|
36
|
+
type MatrxCredentialKind = MatrxCredential["kind"];
|
|
37
|
+
/** A credential a Matrx client can present. */
|
|
38
|
+
type MatrxCredential = {
|
|
39
|
+
kind: "user";
|
|
40
|
+
accessToken: string;
|
|
41
|
+
} | {
|
|
42
|
+
kind: "guest";
|
|
43
|
+
fingerprintId: string;
|
|
44
|
+
} | {
|
|
45
|
+
kind: "api_key";
|
|
46
|
+
apiKey: string;
|
|
47
|
+
} | {
|
|
48
|
+
kind: "service";
|
|
49
|
+
/** The server secret (an existing env value, e.g. MATRX_AIDREAM_SERVICE_TOKEN). */
|
|
50
|
+
secret: string;
|
|
51
|
+
/** The person the call acts for, when there is one (`X-Matrx-User-Id`). */
|
|
52
|
+
actingUserId?: string;
|
|
53
|
+
/** Where the secret rides. Default `Authorization` (as a Bearer value). */
|
|
54
|
+
secretHeader?: string;
|
|
55
|
+
} | {
|
|
56
|
+
kind: "scoped";
|
|
57
|
+
token: string;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* The async source of the current credential. `get()` resolves when the host
|
|
61
|
+
* knows its auth state (null = anonymous); `onChange` lets transports refresh
|
|
62
|
+
* cached headers when the credential rotates.
|
|
63
|
+
*/
|
|
64
|
+
interface CredentialsPort {
|
|
65
|
+
get(): Promise<MatrxCredential | null>;
|
|
66
|
+
onChange?(cb: () => void): () => void;
|
|
67
|
+
}
|
|
68
|
+
/** Prefix that marks a bearer token as an AI Matrx API key, never a JWT. */
|
|
69
|
+
declare const API_KEY_PREFIX = "mx_";
|
|
70
|
+
/**
|
|
71
|
+
* Map a credential to the exact request headers the AI Matrx platform expects.
|
|
72
|
+
* This is the single place that knowledge lives — transports spread the result
|
|
73
|
+
* into their request headers and add `X-Organization-Id` from the org context
|
|
74
|
+
* binding separately.
|
|
75
|
+
*/
|
|
76
|
+
declare function credentialToHeaders(credential: MatrxCredential | null): Record<string, string>;
|
|
77
|
+
/** What `createApi({ credentials })` accepts: a fixed credential, a getter, or a port. */
|
|
78
|
+
type CredentialsSetting = MatrxCredential | null | (() => MatrxCredential | null | Promise<MatrxCredential | null>) | CredentialsPort;
|
|
79
|
+
/** Normalize the ONE credentials setting into a `CredentialsPort`. */
|
|
80
|
+
declare function toCredentialsPort(setting: CredentialsSetting | undefined): CredentialsPort;
|
|
81
|
+
|
|
82
|
+
export { API_KEY_PREFIX, type CredentialsPort, type CredentialsSetting, MATRX_HEADERS, type MatrxCredential, type MatrxCredentialKind, credentialToHeaders, toCredentialsPort };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The credentials port — the ONE credential→header mapping for every client
|
|
3
|
+
* of every AI Matrx server (package lines v3 §3.4; API-key lane C16).
|
|
4
|
+
*
|
|
5
|
+
* Five credential kinds, one mapping, in exactly one place. The kind names are
|
|
6
|
+
* the contract's own `x-matrx-auth` tier names, so a generated operation's
|
|
7
|
+
* tier and the credential that satisfies it read the same in every language
|
|
8
|
+
* (TypeScript here; the Python `matrx-api` and future Swift/Kotlin clients
|
|
9
|
+
* share these header names and shapes — see {@link MATRX_HEADERS}):
|
|
10
|
+
*
|
|
11
|
+
* - `user` — a signed-in person: `Authorization: Bearer <Supabase JWT>`.
|
|
12
|
+
* - `guest` — a fingerprint: `X-Fingerprint-ID: <id>`.
|
|
13
|
+
* - `api_key` — an AI Matrx API key: `Authorization: Bearer mx_live_...`.
|
|
14
|
+
* The server's ONE AuthMiddleware disambiguates by shape (`mx_` prefix vs
|
|
15
|
+
* three-dot JWT), so `user` and `api_key` ride the same header.
|
|
16
|
+
* - `service` — one of our servers calling another: the server secret as
|
|
17
|
+
* `Authorization: Bearer <secret>` (or in `secretHeader`), plus the acting
|
|
18
|
+
* person in `X-Matrx-User-Id` when there is one
|
|
19
|
+
* (`matrx_connect.service_auth`).
|
|
20
|
+
* - `scoped` — a short-lived capability token (sandbox, desktop app, broker
|
|
21
|
+
* client): `Authorization: Bearer <token>` (`matrx_connect.scoped_tokens`).
|
|
22
|
+
* Short-lived means the PORT re-reads it per call: hand a `CredentialsPort`
|
|
23
|
+
* whose `get()` returns the current token.
|
|
24
|
+
*
|
|
25
|
+
* No polling, no readiness loop: readiness is the port's promise.
|
|
26
|
+
*/
|
|
27
|
+
/** Header names every AI Matrx client and server shares (TS, Python, native). */
|
|
28
|
+
declare const MATRX_HEADERS: {
|
|
29
|
+
readonly authorization: "Authorization";
|
|
30
|
+
readonly fingerprint: "X-Fingerprint-ID";
|
|
31
|
+
readonly organization: "X-Organization-Id";
|
|
32
|
+
readonly actingUser: "X-Matrx-User-Id";
|
|
33
|
+
readonly requestId: "X-Request-Id";
|
|
34
|
+
};
|
|
35
|
+
/** The credential kinds — identical to the contract's `x-matrx-auth` tiers that carry a credential. */
|
|
36
|
+
type MatrxCredentialKind = MatrxCredential["kind"];
|
|
37
|
+
/** A credential a Matrx client can present. */
|
|
38
|
+
type MatrxCredential = {
|
|
39
|
+
kind: "user";
|
|
40
|
+
accessToken: string;
|
|
41
|
+
} | {
|
|
42
|
+
kind: "guest";
|
|
43
|
+
fingerprintId: string;
|
|
44
|
+
} | {
|
|
45
|
+
kind: "api_key";
|
|
46
|
+
apiKey: string;
|
|
47
|
+
} | {
|
|
48
|
+
kind: "service";
|
|
49
|
+
/** The server secret (an existing env value, e.g. MATRX_AIDREAM_SERVICE_TOKEN). */
|
|
50
|
+
secret: string;
|
|
51
|
+
/** The person the call acts for, when there is one (`X-Matrx-User-Id`). */
|
|
52
|
+
actingUserId?: string;
|
|
53
|
+
/** Where the secret rides. Default `Authorization` (as a Bearer value). */
|
|
54
|
+
secretHeader?: string;
|
|
55
|
+
} | {
|
|
56
|
+
kind: "scoped";
|
|
57
|
+
token: string;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* The async source of the current credential. `get()` resolves when the host
|
|
61
|
+
* knows its auth state (null = anonymous); `onChange` lets transports refresh
|
|
62
|
+
* cached headers when the credential rotates.
|
|
63
|
+
*/
|
|
64
|
+
interface CredentialsPort {
|
|
65
|
+
get(): Promise<MatrxCredential | null>;
|
|
66
|
+
onChange?(cb: () => void): () => void;
|
|
67
|
+
}
|
|
68
|
+
/** Prefix that marks a bearer token as an AI Matrx API key, never a JWT. */
|
|
69
|
+
declare const API_KEY_PREFIX = "mx_";
|
|
70
|
+
/**
|
|
71
|
+
* Map a credential to the exact request headers the AI Matrx platform expects.
|
|
72
|
+
* This is the single place that knowledge lives — transports spread the result
|
|
73
|
+
* into their request headers and add `X-Organization-Id` from the org context
|
|
74
|
+
* binding separately.
|
|
75
|
+
*/
|
|
76
|
+
declare function credentialToHeaders(credential: MatrxCredential | null): Record<string, string>;
|
|
77
|
+
/** What `createApi({ credentials })` accepts: a fixed credential, a getter, or a port. */
|
|
78
|
+
type CredentialsSetting = MatrxCredential | null | (() => MatrxCredential | null | Promise<MatrxCredential | null>) | CredentialsPort;
|
|
79
|
+
/** Normalize the ONE credentials setting into a `CredentialsPort`. */
|
|
80
|
+
declare function toCredentialsPort(setting: CredentialsSetting | undefined): CredentialsPort;
|
|
81
|
+
|
|
82
|
+
export { API_KEY_PREFIX, type CredentialsPort, type CredentialsSetting, MATRX_HEADERS, type MatrxCredential, type MatrxCredentialKind, credentialToHeaders, toCredentialsPort };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { API_KEY_PREFIX, MATRX_HEADERS, credentialToHeaders, toCredentialsPort } from './chunk-VTZKJMSY.js';
|