@ai-matrx/api 0.1.30 → 0.1.32
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 +43 -1
- package/dist/account.d.cts +8 -8
- package/dist/account.d.ts +8 -8
- package/dist/agents.cjs +160 -12
- package/dist/agents.d.cts +821 -15
- package/dist/agents.d.ts +821 -15
- package/dist/agents.js +127 -4
- package/dist/ai.cjs +26 -2
- package/dist/ai.d.cts +76 -3
- package/dist/ai.d.ts +76 -3
- package/dist/ai.js +22 -2
- package/dist/apps.cjs +5 -11
- package/dist/apps.d.cts +3 -49
- package/dist/apps.d.ts +3 -49
- package/dist/apps.js +2 -7
- package/dist/architecture.cjs +96 -42
- package/dist/architecture.d.cts +269 -43
- package/dist/architecture.d.ts +269 -43
- package/dist/architecture.js +73 -28
- package/dist/audio.cjs +39 -39
- package/dist/audio.d.cts +15 -3
- package/dist/audio.d.ts +15 -3
- package/dist/audio.js +2 -2
- package/dist/chat.cjs +11 -11
- package/dist/chat.d.cts +7 -2
- package/dist/chat.d.ts +7 -2
- package/dist/chat.js +1 -1
- package/dist/{chunk-ILAZVNEL.cjs → chunk-27ZEEIXM.cjs} +1 -1
- package/dist/{chunk-35BH3TJW.js → chunk-5TRUQNVW.js} +1 -1
- package/dist/{chunk-RIIIDGZJ.js → chunk-DKJGWA5L.js} +1 -1
- package/dist/{chunk-I4AWZ7GN.js → chunk-LYHAZQX5.js} +1 -1
- package/dist/{chunk-FFXB3EDM.cjs → chunk-LYRANVIS.cjs} +3 -3
- package/dist/{chunk-VU3BK4NY.cjs → chunk-TMEGWPWE.cjs} +37 -37
- package/dist/{chunk-NH7VE36B.cjs → chunk-VK5BH6FK.cjs} +4 -4
- package/dist/{chunk-KZD6TVJ4.js → chunk-X75SKCDS.js} +1 -1
- package/dist/code.cjs +6 -6
- package/dist/code.d.cts +4 -2
- package/dist/code.d.ts +4 -2
- package/dist/code.js +1 -1
- package/dist/commerce.d.cts +2 -2
- package/dist/commerce.d.ts +2 -2
- package/dist/communications.cjs +4 -4
- package/dist/communications.d.cts +2 -2
- package/dist/communications.d.ts +2 -2
- package/dist/communications.js +1 -1
- package/dist/computer.cjs +4 -4
- package/dist/computer.d.cts +2 -2
- package/dist/computer.d.ts +2 -2
- package/dist/computer.js +1 -1
- package/dist/content.cjs +4 -4
- package/dist/content.d.cts +2 -2
- package/dist/content.d.ts +2 -2
- package/dist/content.js +1 -1
- package/dist/crm.cjs +8 -2
- package/dist/crm.d.cts +26 -3
- package/dist/crm.d.ts +26 -3
- package/dist/crm.js +7 -2
- package/dist/data.cjs +22 -4
- package/dist/data.d.cts +185 -3
- package/dist/data.d.ts +185 -3
- package/dist/data.js +17 -2
- package/dist/education.cjs +4 -4
- package/dist/education.d.cts +2 -2
- package/dist/education.d.ts +2 -2
- package/dist/education.js +1 -1
- package/dist/files.cjs +228 -228
- package/dist/files.d.cts +8 -8
- package/dist/files.d.ts +8 -8
- package/dist/files.js +2 -2
- package/dist/human-resources.d.cts +2 -2
- package/dist/human-resources.d.ts +2 -2
- package/dist/{index-B6p8TJkh.d.cts → index-A1nOdg4F.d.cts} +2 -2
- package/dist/{index-B6p8TJkh.d.ts → index-A1nOdg4F.d.ts} +2 -2
- package/dist/index.cjs +69 -59
- package/dist/index.d.cts +9 -4
- package/dist/index.d.ts +9 -4
- package/dist/index.js +13 -3
- package/dist/integrations.cjs +35 -5
- package/dist/integrations.d.cts +97 -3
- package/dist/integrations.d.ts +97 -3
- package/dist/integrations.js +27 -2
- package/dist/intelligence.cjs +19 -8
- package/dist/intelligence.d.cts +98 -28
- package/dist/intelligence.d.ts +98 -28
- package/dist/intelligence.js +13 -4
- package/dist/knowledge.cjs +42 -42
- package/dist/knowledge.d.cts +11 -11
- package/dist/knowledge.d.ts +11 -11
- package/dist/knowledge.js +1 -1
- package/dist/legal.cjs +6 -6
- package/dist/legal.d.cts +2 -2
- package/dist/legal.d.ts +2 -2
- package/dist/legal.js +1 -1
- package/dist/marketing.cjs +194 -78
- package/dist/marketing.d.cts +601 -7
- package/dist/marketing.d.ts +601 -7
- package/dist/marketing.js +98 -2
- package/dist/masterwork.cjs +32 -32
- package/dist/masterwork.d.cts +2 -2
- package/dist/masterwork.d.ts +2 -2
- package/dist/masterwork.js +1 -1
- package/dist/media.cjs +34 -11
- package/dist/media.d.cts +61 -3
- package/dist/media.d.ts +61 -3
- package/dist/media.js +21 -2
- package/dist/platform.cjs +27 -27
- package/dist/platform.d.cts +2 -2
- package/dist/platform.d.ts +2 -2
- package/dist/platform.js +2 -2
- package/dist/publish.cjs +7 -7
- package/dist/publish.d.cts +2 -2
- package/dist/publish.d.ts +2 -2
- package/dist/publish.js +1 -1
- package/dist/recording.cjs +17 -17
- package/dist/recording.js +4 -4
- package/dist/schemas.d.cts +45 -3
- package/dist/schemas.d.ts +45 -3
- package/dist/stream.cjs +10 -10
- package/dist/stream.d.cts +1 -1
- package/dist/stream.d.ts +1 -1
- package/dist/stream.js +1 -1
- package/dist/types.d.cts +1958 -75
- package/dist/types.d.ts +1958 -75
- package/dist/web.cjs +61 -26
- package/dist/web.d.cts +111 -3
- package/dist/web.d.ts +111 -3
- package/dist/web.js +31 -2
- package/dist/workflows.cjs +13 -13
- package/dist/workflows.d.cts +32 -2
- package/dist/workflows.d.ts +32 -2
- package/dist/workflows.js +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkFNIYADWI_cjs = require('./chunk-FNIYADWI.cjs');
|
|
4
4
|
var chunkMVXD6WI6_cjs = require('./chunk-MVXD6WI6.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunk27ZEEIXM_cjs = require('./chunk-27ZEEIXM.cjs');
|
|
6
6
|
var chunk2SXAAKGV_cjs = require('./chunk-2SXAAKGV.cjs');
|
|
7
7
|
var format = require('@ai-matrx/kit/format');
|
|
8
8
|
|
|
@@ -44,7 +44,7 @@ function buildMatrxRequestBody(body, scope) {
|
|
|
44
44
|
}
|
|
45
45
|
const bodyOrganizationId = base.organization_id;
|
|
46
46
|
if (scope.organization_id !== void 0 && bodyOrganizationId !== void 0 && (typeof bodyOrganizationId !== "string" || bodyOrganizationId.trim() !== scope.organization_id)) {
|
|
47
|
-
throw new
|
|
47
|
+
throw new chunk27ZEEIXM_cjs.OrganizationContextError(
|
|
48
48
|
"organization_context_mismatch",
|
|
49
49
|
"Request body organization_id must match the request context organization."
|
|
50
50
|
);
|
|
@@ -116,14 +116,14 @@ function parseMatrxNdjsonResponse(response, signal, hooks = {}) {
|
|
|
116
116
|
};
|
|
117
117
|
async function* events() {
|
|
118
118
|
if (!response.body) {
|
|
119
|
-
throw new
|
|
119
|
+
throw new chunk27ZEEIXM_cjs.BackendApiError({
|
|
120
120
|
code: "internal_error",
|
|
121
121
|
detail: "Response has no body",
|
|
122
122
|
userMessage: "No response received from server"
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
125
|
try {
|
|
126
|
-
for await (const envelope of
|
|
126
|
+
for await (const envelope of chunk27ZEEIXM_cjs.readMatrxNdjsonStream(response.body, {
|
|
127
127
|
...signal ? { signal } : {},
|
|
128
128
|
...hooks.onMalformedLine ? { onMalformedLine: hooks.onMalformedLine } : {},
|
|
129
129
|
...hooks.onUnknownEnvelope ? { onUnknownEnvelope: hooks.onUnknownEnvelope } : {}
|
|
@@ -135,7 +135,7 @@ function parseMatrxNdjsonResponse(response, signal, hooks = {}) {
|
|
|
135
135
|
if (signal?.aborted || error instanceof Error && error.name === "AbortError") {
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
|
-
const transportError = error instanceof
|
|
138
|
+
const transportError = error instanceof chunk27ZEEIXM_cjs.BackendApiError ? error : new chunk27ZEEIXM_cjs.StreamTransportError({
|
|
139
139
|
detail: error instanceof Error ? error.message : "The response stream ended unexpectedly.",
|
|
140
140
|
details: error,
|
|
141
141
|
...ids.requestId ? { requestId: ids.requestId } : {}
|
|
@@ -152,7 +152,7 @@ async function httpErrorFrom(response) {
|
|
|
152
152
|
const serverDetail = await response.json().catch(() => void 0);
|
|
153
153
|
return {
|
|
154
154
|
type: response.status >= 400 && response.status < 500 ? "validation_error" : "http_error",
|
|
155
|
-
message:
|
|
155
|
+
message: chunk27ZEEIXM_cjs.extractMatrxErrorMessage(serverDetail) ?? bareStatusSentence(response.status),
|
|
156
156
|
status: response.status,
|
|
157
157
|
serverDetail
|
|
158
158
|
};
|
|
@@ -160,7 +160,7 @@ async function httpErrorFrom(response) {
|
|
|
160
160
|
async function executeMatrxCall(request, hooks = {}) {
|
|
161
161
|
const upper = request.method.toUpperCase();
|
|
162
162
|
const sendsBody = request.stream || upper !== "GET" && upper !== "HEAD";
|
|
163
|
-
const { response } = await
|
|
163
|
+
const { response } = await chunk27ZEEIXM_cjs.sendOnWire({
|
|
164
164
|
url: request.url,
|
|
165
165
|
method: request.method,
|
|
166
166
|
headers: request.headers,
|
|
@@ -210,11 +210,11 @@ async function sendMatrxRequest(url, init = {}, options = {}) {
|
|
|
210
210
|
headers[name] = value;
|
|
211
211
|
});
|
|
212
212
|
const fetchOptions = {};
|
|
213
|
-
for (const key of
|
|
213
|
+
for (const key of chunk27ZEEIXM_cjs.WIRE_FETCH_OPTION_KEYS) {
|
|
214
214
|
if (init[key] !== void 0) fetchOptions[key] = init[key];
|
|
215
215
|
}
|
|
216
216
|
try {
|
|
217
|
-
const { response, controller } = await
|
|
217
|
+
const { response, controller } = await chunk27ZEEIXM_cjs.sendOnWire({
|
|
218
218
|
url,
|
|
219
219
|
method: init.method ?? "GET",
|
|
220
220
|
fetchOptions,
|
|
@@ -237,7 +237,7 @@ async function sendMatrxRequest(url, init = {}, options = {}) {
|
|
|
237
237
|
throw callerSignal?.reason instanceof Error ? callerSignal.reason : new DOMException("The request was cancelled.", "AbortError");
|
|
238
238
|
}
|
|
239
239
|
if (options.timeoutMs !== void 0 && chunk2SXAAKGV_cjs.isNetError(error) && (error.code === "connect-timeout" || error.code === "total-timeout")) {
|
|
240
|
-
throw new
|
|
240
|
+
throw new chunk27ZEEIXM_cjs.BackendApiError({
|
|
241
241
|
code: "request_timeout",
|
|
242
242
|
detail: `${init.method ?? "GET"} ${url} exceeded ${options.timeoutMs}ms`,
|
|
243
243
|
userMessage: "The request timed out \u2014 please retry.",
|
|
@@ -251,7 +251,7 @@ async function sendMatrxRequest(url, init = {}, options = {}) {
|
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
async function readMatrxJsonResponse(response) {
|
|
254
|
-
if (!response.ok) throw await
|
|
254
|
+
if (!response.ok) throw await chunk27ZEEIXM_cjs.parseHttpError(response);
|
|
255
255
|
if (response.status === 204) return null;
|
|
256
256
|
return await response.json();
|
|
257
257
|
}
|
|
@@ -261,7 +261,7 @@ function classifyStatus(status) {
|
|
|
261
261
|
return status >= 400 && status < 500 ? "validation_error" : "http_error";
|
|
262
262
|
}
|
|
263
263
|
function normalizeMatrxError(err) {
|
|
264
|
-
if (err instanceof
|
|
264
|
+
if (err instanceof chunk27ZEEIXM_cjs.OrganizationContextError) {
|
|
265
265
|
return {
|
|
266
266
|
type: "validation_error",
|
|
267
267
|
message: err.message,
|
|
@@ -273,7 +273,7 @@ function normalizeMatrxError(err) {
|
|
|
273
273
|
if (err instanceof DOMException && err.name === "AbortError") {
|
|
274
274
|
return { type: "abort_error", message: "Request was cancelled." };
|
|
275
275
|
}
|
|
276
|
-
if (err instanceof
|
|
276
|
+
if (err instanceof chunk27ZEEIXM_cjs.MatrxApiError) {
|
|
277
277
|
return {
|
|
278
278
|
type: classifyStatus(err.status),
|
|
279
279
|
message: honestTransportMessage(err.message, err.status),
|
|
@@ -283,7 +283,7 @@ function normalizeMatrxError(err) {
|
|
|
283
283
|
name: err.name
|
|
284
284
|
};
|
|
285
285
|
}
|
|
286
|
-
if (err instanceof
|
|
286
|
+
if (err instanceof chunk27ZEEIXM_cjs.BackendApiError) {
|
|
287
287
|
return {
|
|
288
288
|
type: "network_error",
|
|
289
289
|
message: honestTransportMessage(
|
|
@@ -379,9 +379,9 @@ function createMatrxTransport(options) {
|
|
|
379
379
|
const resolve = resolveTarget ?? (() => ({ baseUrl }));
|
|
380
380
|
const resolveOrganizationId = (callOrganizationId) => {
|
|
381
381
|
if (organizationId === void 0) return null;
|
|
382
|
-
if (callOrganizationId !== null) return
|
|
382
|
+
if (callOrganizationId !== null) return chunk27ZEEIXM_cjs.requireOrganizationContext(callOrganizationId);
|
|
383
383
|
const candidate = typeof organizationId === "function" ? organizationId() : organizationId;
|
|
384
|
-
return
|
|
384
|
+
return chunk27ZEEIXM_cjs.requireOrganizationContext(candidate);
|
|
385
385
|
};
|
|
386
386
|
return {
|
|
387
387
|
async fetch(path, init) {
|
|
@@ -392,7 +392,7 @@ function createMatrxTransport(options) {
|
|
|
392
392
|
let overHeaders = callOrganizationId === null ? policyHeaders : stripOrganizationHeader(policyHeaders);
|
|
393
393
|
const orgId = resolveOrganizationId(callOrganizationId);
|
|
394
394
|
if (orgId !== null) {
|
|
395
|
-
overHeaders =
|
|
395
|
+
overHeaders = chunk27ZEEIXM_cjs.applyOrganizationContextHeader(overHeaders, orgId);
|
|
396
396
|
}
|
|
397
397
|
const wireHeaders = callOrganizationId === null ? { ...init.headers } : stripOrganizationHeader({ ...init.headers });
|
|
398
398
|
const info = {
|
|
@@ -405,7 +405,7 @@ function createMatrxTransport(options) {
|
|
|
405
405
|
diagnostics?.onRequest?.(info);
|
|
406
406
|
let response;
|
|
407
407
|
try {
|
|
408
|
-
({ response } = await
|
|
408
|
+
({ response } = await chunk27ZEEIXM_cjs.sendOnWire(
|
|
409
409
|
{
|
|
410
410
|
url,
|
|
411
411
|
method: init.method,
|
|
@@ -429,11 +429,11 @@ function createMatrxTransport(options) {
|
|
|
429
429
|
}
|
|
430
430
|
if (!response.ok && !expectedErrorStatuses?.includes(response.status)) {
|
|
431
431
|
const serverDetail = await response.clone().json().catch(() => void 0);
|
|
432
|
-
const code =
|
|
432
|
+
const code = chunk27ZEEIXM_cjs.extractMatrxErrorCode(serverDetail);
|
|
433
433
|
diagnostics?.onError?.(
|
|
434
434
|
{
|
|
435
435
|
type: classifyStatus(response.status),
|
|
436
|
-
message:
|
|
436
|
+
message: chunk27ZEEIXM_cjs.extractMatrxErrorMessage(serverDetail) ?? `HTTP ${response.status}`,
|
|
437
437
|
status: response.status,
|
|
438
438
|
serverDetail,
|
|
439
439
|
...code ? { code } : {}
|
|
@@ -734,7 +734,7 @@ async function readServerDetail(response) {
|
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
736
|
async function throwApiError(path, response) {
|
|
737
|
-
throw new
|
|
737
|
+
throw new chunk27ZEEIXM_cjs.MatrxApiError({
|
|
738
738
|
status: response.status,
|
|
739
739
|
path,
|
|
740
740
|
serverDetail: await readServerDetail(response)
|
|
@@ -755,7 +755,7 @@ function toRunHandle(response, options) {
|
|
|
755
755
|
return {
|
|
756
756
|
requestId: response.headers.get("X-Request-ID"),
|
|
757
757
|
conversationId: response.headers.get("X-Conversation-ID"),
|
|
758
|
-
events:
|
|
758
|
+
events: chunk27ZEEIXM_cjs.readMatrxNdjsonStream(response.body, {
|
|
759
759
|
...options.signal ? { signal: options.signal } : {},
|
|
760
760
|
...options.maxReadAhead !== void 0 ? { maxReadAhead: options.maxReadAhead } : {},
|
|
761
761
|
...options.onMalformedLine ? { onMalformedLine: options.onMalformedLine } : {},
|
|
@@ -778,7 +778,7 @@ async function requestStream(transport, path, options) {
|
|
|
778
778
|
});
|
|
779
779
|
if (!response.ok) return throwApiError(path, response);
|
|
780
780
|
if (!response.body) {
|
|
781
|
-
throw new
|
|
781
|
+
throw new chunk27ZEEIXM_cjs.MatrxApiError({
|
|
782
782
|
status: response.status,
|
|
783
783
|
path,
|
|
784
784
|
serverDetail: { code: "missing_response_body" },
|
|
@@ -838,7 +838,7 @@ async function getRuntimeOperationStatus(transport, requestId, options = {}) {
|
|
|
838
838
|
{ method: "GET", ...options.signal ? { signal: options.signal } : {} }
|
|
839
839
|
);
|
|
840
840
|
} catch (error) {
|
|
841
|
-
if (error instanceof
|
|
841
|
+
if (error instanceof chunk27ZEEIXM_cjs.MatrxApiError && error.status === 404) return null;
|
|
842
842
|
throw error;
|
|
843
843
|
}
|
|
844
844
|
}
|
|
@@ -853,7 +853,7 @@ async function getRuntimeOperationsByLink(transport, linkKind, linkId, options =
|
|
|
853
853
|
{ method: "GET", ...options.signal ? { signal: options.signal } : {} }
|
|
854
854
|
);
|
|
855
855
|
} catch (error) {
|
|
856
|
-
if (error instanceof
|
|
856
|
+
if (error instanceof chunk27ZEEIXM_cjs.MatrxApiError && error.status === 404) return null;
|
|
857
857
|
throw error;
|
|
858
858
|
}
|
|
859
859
|
}
|
|
@@ -894,7 +894,7 @@ async function* followRuntimeOperationEvents(transport, executionId, options = {
|
|
|
894
894
|
...options.signal ? { signal: options.signal } : {}
|
|
895
895
|
}
|
|
896
896
|
);
|
|
897
|
-
const frames =
|
|
897
|
+
const frames = chunk27ZEEIXM_cjs.readMatrxSseStream(
|
|
898
898
|
response.body,
|
|
899
899
|
options.onIncomplete ? { onIncomplete: options.onIncomplete } : {}
|
|
900
900
|
);
|
|
@@ -1097,7 +1097,7 @@ async function openMatrxStream(transport, path, options = {}) {
|
|
|
1097
1097
|
return toRunHandle(response, options);
|
|
1098
1098
|
}
|
|
1099
1099
|
function withRunOrganization(transport, organizationId) {
|
|
1100
|
-
const orgId =
|
|
1100
|
+
const orgId = chunk27ZEEIXM_cjs.requireOrganizationContext(organizationId);
|
|
1101
1101
|
return {
|
|
1102
1102
|
fetch: (path, init) => transport.fetch(path, {
|
|
1103
1103
|
...init,
|
|
@@ -1124,7 +1124,7 @@ async function followWorkflowRunEvents(transport, runId, options) {
|
|
|
1124
1124
|
throw error;
|
|
1125
1125
|
}
|
|
1126
1126
|
try {
|
|
1127
|
-
for await (const frame of
|
|
1127
|
+
for await (const frame of chunk27ZEEIXM_cjs.readMatrxSseStream(
|
|
1128
1128
|
response.body
|
|
1129
1129
|
)) {
|
|
1130
1130
|
if (frame.event === "end") return { ended: true };
|
|
@@ -1170,7 +1170,7 @@ async function resumeOrRejoin(transport, resumeCall, options) {
|
|
|
1170
1170
|
} catch (error) {
|
|
1171
1171
|
const target = readLiveRunRejoin(error);
|
|
1172
1172
|
if (!target) {
|
|
1173
|
-
if (error instanceof
|
|
1173
|
+
if (error instanceof chunk27ZEEIXM_cjs.MatrxApiError && isResumeConflict(error)) {
|
|
1174
1174
|
return { kind: "resume_conflict", error };
|
|
1175
1175
|
}
|
|
1176
1176
|
throw error;
|
|
@@ -1571,9 +1571,19 @@ function providerSessionUsageBody(usage) {
|
|
|
1571
1571
|
output_tokens: count(usage.output_tokens),
|
|
1572
1572
|
cached_input_tokens: count(usage.cached_input_tokens),
|
|
1573
1573
|
characters: count(usage.characters),
|
|
1574
|
-
seconds
|
|
1574
|
+
seconds,
|
|
1575
|
+
...componentsBody(usage.components)
|
|
1575
1576
|
};
|
|
1576
1577
|
}
|
|
1578
|
+
var COMPONENT_KEY = /^(input|cached_input|output)\.[a-z_]{1,32}$/;
|
|
1579
|
+
function componentsBody(components) {
|
|
1580
|
+
if (!components) return {};
|
|
1581
|
+
const out = {};
|
|
1582
|
+
for (const [key, value] of Object.entries(components)) {
|
|
1583
|
+
if (COMPONENT_KEY.test(key) && count(value) > 0) out[key] = count(value);
|
|
1584
|
+
}
|
|
1585
|
+
return Object.keys(out).length > 0 ? { components: out } : {};
|
|
1586
|
+
}
|
|
1577
1587
|
function isEmptyProviderUsage(usage) {
|
|
1578
1588
|
return !usage.usage_id?.trim() || !usage.model?.trim() || count(usage.input_tokens) === 0 && count(usage.output_tokens) === 0 && count(usage.cached_input_tokens) === 0 && count(usage.characters) === 0 && !(typeof usage.seconds === "number" && usage.seconds > 0);
|
|
1579
1589
|
}
|
|
@@ -1586,7 +1596,7 @@ async function reportProviderSessionUsage(transport, usage, options = {}) {
|
|
|
1586
1596
|
});
|
|
1587
1597
|
return "ok";
|
|
1588
1598
|
} catch (error) {
|
|
1589
|
-
if (error instanceof
|
|
1599
|
+
if (error instanceof chunk27ZEEIXM_cjs.MatrxApiError) {
|
|
1590
1600
|
const status = error.status;
|
|
1591
1601
|
if (status >= 400 && status < 500 && status !== 401 && status !== 408 && status !== 425 && status !== 429) {
|
|
1592
1602
|
console.warn(`[provider-usage] server refused ${usage.provider} usage ${usage.usage_id} (${status})`);
|
|
@@ -2282,115 +2292,115 @@ Object.defineProperty(exports, "toCredentialsPort", {
|
|
|
2282
2292
|
});
|
|
2283
2293
|
Object.defineProperty(exports, "BackendApiError", {
|
|
2284
2294
|
enumerable: true,
|
|
2285
|
-
get: function () { return
|
|
2295
|
+
get: function () { return chunk27ZEEIXM_cjs.BackendApiError; }
|
|
2286
2296
|
});
|
|
2287
2297
|
Object.defineProperty(exports, "CONTRACT_SHA256", {
|
|
2288
2298
|
enumerable: true,
|
|
2289
|
-
get: function () { return
|
|
2299
|
+
get: function () { return chunk27ZEEIXM_cjs.CONTRACT_SHA256; }
|
|
2290
2300
|
});
|
|
2291
2301
|
Object.defineProperty(exports, "DEPLOYMENTS", {
|
|
2292
2302
|
enumerable: true,
|
|
2293
|
-
get: function () { return
|
|
2303
|
+
get: function () { return chunk27ZEEIXM_cjs.DEPLOYMENTS; }
|
|
2294
2304
|
});
|
|
2295
2305
|
Object.defineProperty(exports, "DOMAINS", {
|
|
2296
2306
|
enumerable: true,
|
|
2297
|
-
get: function () { return
|
|
2307
|
+
get: function () { return chunk27ZEEIXM_cjs.DOMAINS; }
|
|
2298
2308
|
});
|
|
2299
2309
|
Object.defineProperty(exports, "MatrxApiError", {
|
|
2300
2310
|
enumerable: true,
|
|
2301
|
-
get: function () { return
|
|
2311
|
+
get: function () { return chunk27ZEEIXM_cjs.MatrxApiError; }
|
|
2302
2312
|
});
|
|
2303
2313
|
Object.defineProperty(exports, "OrganizationContextError", {
|
|
2304
2314
|
enumerable: true,
|
|
2305
|
-
get: function () { return
|
|
2315
|
+
get: function () { return chunk27ZEEIXM_cjs.OrganizationContextError; }
|
|
2306
2316
|
});
|
|
2307
2317
|
Object.defineProperty(exports, "StreamTransportError", {
|
|
2308
2318
|
enumerable: true,
|
|
2309
|
-
get: function () { return
|
|
2319
|
+
get: function () { return chunk27ZEEIXM_cjs.StreamTransportError; }
|
|
2310
2320
|
});
|
|
2311
2321
|
Object.defineProperty(exports, "applyOrganizationContextHeader", {
|
|
2312
2322
|
enumerable: true,
|
|
2313
|
-
get: function () { return
|
|
2323
|
+
get: function () { return chunk27ZEEIXM_cjs.applyOrganizationContextHeader; }
|
|
2314
2324
|
});
|
|
2315
2325
|
Object.defineProperty(exports, "assertOrganizationMatchesOperation", {
|
|
2316
2326
|
enumerable: true,
|
|
2317
|
-
get: function () { return
|
|
2327
|
+
get: function () { return chunk27ZEEIXM_cjs.assertOrganizationMatchesOperation; }
|
|
2318
2328
|
});
|
|
2319
2329
|
Object.defineProperty(exports, "assertQueryOrganizationMatchesContext", {
|
|
2320
2330
|
enumerable: true,
|
|
2321
|
-
get: function () { return
|
|
2331
|
+
get: function () { return chunk27ZEEIXM_cjs.assertQueryOrganizationMatchesContext; }
|
|
2322
2332
|
});
|
|
2323
2333
|
Object.defineProperty(exports, "createApi", {
|
|
2324
2334
|
enumerable: true,
|
|
2325
|
-
get: function () { return
|
|
2335
|
+
get: function () { return chunk27ZEEIXM_cjs.createApi; }
|
|
2326
2336
|
});
|
|
2327
2337
|
Object.defineProperty(exports, "createOrganizationOperation", {
|
|
2328
2338
|
enumerable: true,
|
|
2329
|
-
get: function () { return
|
|
2339
|
+
get: function () { return chunk27ZEEIXM_cjs.createOrganizationOperation; }
|
|
2330
2340
|
});
|
|
2331
2341
|
Object.defineProperty(exports, "describeBackendFailure", {
|
|
2332
2342
|
enumerable: true,
|
|
2333
|
-
get: function () { return
|
|
2343
|
+
get: function () { return chunk27ZEEIXM_cjs.describeBackendFailure; }
|
|
2334
2344
|
});
|
|
2335
2345
|
Object.defineProperty(exports, "extractMatrxErrorCode", {
|
|
2336
2346
|
enumerable: true,
|
|
2337
|
-
get: function () { return
|
|
2347
|
+
get: function () { return chunk27ZEEIXM_cjs.extractMatrxErrorCode; }
|
|
2338
2348
|
});
|
|
2339
2349
|
Object.defineProperty(exports, "extractMatrxErrorMessage", {
|
|
2340
2350
|
enumerable: true,
|
|
2341
|
-
get: function () { return
|
|
2351
|
+
get: function () { return chunk27ZEEIXM_cjs.extractMatrxErrorMessage; }
|
|
2342
2352
|
});
|
|
2343
2353
|
Object.defineProperty(exports, "getUserMessage", {
|
|
2344
2354
|
enumerable: true,
|
|
2345
|
-
get: function () { return
|
|
2355
|
+
get: function () { return chunk27ZEEIXM_cjs.getUserMessage; }
|
|
2346
2356
|
});
|
|
2347
2357
|
Object.defineProperty(exports, "isBinaryType", {
|
|
2348
2358
|
enumerable: true,
|
|
2349
|
-
get: function () { return
|
|
2359
|
+
get: function () { return chunk27ZEEIXM_cjs.isBinaryType; }
|
|
2350
2360
|
});
|
|
2351
2361
|
Object.defineProperty(exports, "isGenericUserMessage", {
|
|
2352
2362
|
enumerable: true,
|
|
2353
|
-
get: function () { return
|
|
2363
|
+
get: function () { return chunk27ZEEIXM_cjs.isGenericUserMessage; }
|
|
2354
2364
|
});
|
|
2355
2365
|
Object.defineProperty(exports, "isStreamTransportLost", {
|
|
2356
2366
|
enumerable: true,
|
|
2357
|
-
get: function () { return
|
|
2367
|
+
get: function () { return chunk27ZEEIXM_cjs.isStreamTransportLost; }
|
|
2358
2368
|
});
|
|
2359
2369
|
Object.defineProperty(exports, "openJsonOrStream", {
|
|
2360
2370
|
enumerable: true,
|
|
2361
|
-
get: function () { return
|
|
2371
|
+
get: function () { return chunk27ZEEIXM_cjs.openJsonOrStream; }
|
|
2362
2372
|
});
|
|
2363
2373
|
Object.defineProperty(exports, "openStream", {
|
|
2364
2374
|
enumerable: true,
|
|
2365
|
-
get: function () { return
|
|
2375
|
+
get: function () { return chunk27ZEEIXM_cjs.openStream; }
|
|
2366
2376
|
});
|
|
2367
2377
|
Object.defineProperty(exports, "parseCallApiError", {
|
|
2368
2378
|
enumerable: true,
|
|
2369
|
-
get: function () { return
|
|
2379
|
+
get: function () { return chunk27ZEEIXM_cjs.parseCallApiError; }
|
|
2370
2380
|
});
|
|
2371
2381
|
Object.defineProperty(exports, "parseHttpError", {
|
|
2372
2382
|
enumerable: true,
|
|
2373
|
-
get: function () { return
|
|
2383
|
+
get: function () { return chunk27ZEEIXM_cjs.parseHttpError; }
|
|
2374
2384
|
});
|
|
2375
2385
|
Object.defineProperty(exports, "parseHttpErrorBody", {
|
|
2376
2386
|
enumerable: true,
|
|
2377
|
-
get: function () { return
|
|
2387
|
+
get: function () { return chunk27ZEEIXM_cjs.parseHttpErrorBody; }
|
|
2378
2388
|
});
|
|
2379
2389
|
Object.defineProperty(exports, "parsePersistedBackendError", {
|
|
2380
2390
|
enumerable: true,
|
|
2381
|
-
get: function () { return
|
|
2391
|
+
get: function () { return chunk27ZEEIXM_cjs.parsePersistedBackendError; }
|
|
2382
2392
|
});
|
|
2383
2393
|
Object.defineProperty(exports, "parseStreamError", {
|
|
2384
2394
|
enumerable: true,
|
|
2385
|
-
get: function () { return
|
|
2395
|
+
get: function () { return chunk27ZEEIXM_cjs.parseStreamError; }
|
|
2386
2396
|
});
|
|
2387
2397
|
Object.defineProperty(exports, "requireOrganizationContext", {
|
|
2388
2398
|
enumerable: true,
|
|
2389
|
-
get: function () { return
|
|
2399
|
+
get: function () { return chunk27ZEEIXM_cjs.requireOrganizationContext; }
|
|
2390
2400
|
});
|
|
2391
2401
|
Object.defineProperty(exports, "unwrapUpstreamError", {
|
|
2392
2402
|
enumerable: true,
|
|
2393
|
-
get: function () { return
|
|
2403
|
+
get: function () { return chunk27ZEEIXM_cjs.unwrapUpstreamError; }
|
|
2394
2404
|
});
|
|
2395
2405
|
Object.defineProperty(exports, "AbortedError", {
|
|
2396
2406
|
enumerable: true,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as MatrxStreamEnvelope, b as MatrxNdjsonIssue, U as UploadProgress, c as MatrxStreamEnvelopeObservation, d as MatrxSseFrame } from './index-
|
|
2
|
-
export { A as Api, e as ApiRequestInfo, a as ApiStream, f as AuthTier, g as CONTRACT_SHA256, C as CallOptions, h as CreateApiOptions, D as DEPLOYMENTS, i as DOMAINS, j as DeploymentName, E as Environment, H as HttpMethod, J as JsonOrStream, N as NdjsonEvent, O as OperationArgs, k as OperationDescriptor, l as OrgRule, S as SseEvent, m as StreamKind, n as createApi, o as isBinaryType, p as openJsonOrStream, q as openStream } from './index-
|
|
1
|
+
import { M as MatrxStreamEnvelope, b as MatrxNdjsonIssue, U as UploadProgress, c as MatrxStreamEnvelopeObservation, d as MatrxSseFrame } from './index-A1nOdg4F.cjs';
|
|
2
|
+
export { A as Api, e as ApiRequestInfo, a as ApiStream, f as AuthTier, g as CONTRACT_SHA256, C as CallOptions, h as CreateApiOptions, D as DEPLOYMENTS, i as DOMAINS, j as DeploymentName, E as Environment, H as HttpMethod, J as JsonOrStream, N as NdjsonEvent, O as OperationArgs, k as OperationDescriptor, l as OrgRule, S as SseEvent, m as StreamKind, n as createApi, o as isBinaryType, p as openJsonOrStream, q as openStream } from './index-A1nOdg4F.cjs';
|
|
3
3
|
import { CredentialsPort } from '@ai-matrx/auth/credentials';
|
|
4
4
|
export { API_KEY_PREFIX, CredentialsPort, CredentialsSetting, MATRX_HEADERS, MatrxCredential, MatrxCredentialKind, credentialToHeaders, toCredentialsPort } from '@ai-matrx/auth/credentials';
|
|
5
5
|
export { AbortedError, ConnectTimeoutError, HeartbeatTimeoutError, HttpError, NetError, NetErrorCode, NetworkError, OfflineError, ResilientFetchOptions, ResilientFetchResult, RetryOptions, StreamMonitorOptions, TotalTimeoutError, extractErrorMessage, isNetError, isTransportFailure, monitorStream, resilientFetch, toNetError, withRetry } from './net.cjs';
|
|
@@ -1819,7 +1819,7 @@ declare function followServerJob(transport: MatrxTransport, options: FollowServe
|
|
|
1819
1819
|
*/
|
|
1820
1820
|
|
|
1821
1821
|
/** The providers whose sessions a browser holds directly (server allow-list). */
|
|
1822
|
-
type MatrxClientSessionProvider = "openai" | "xai" | "cartesia";
|
|
1822
|
+
type MatrxClientSessionProvider = "openai" | "xai" | "google" | "cartesia";
|
|
1823
1823
|
interface ProviderSessionFailure {
|
|
1824
1824
|
provider: MatrxClientSessionProvider;
|
|
1825
1825
|
model?: string | null;
|
|
@@ -1879,6 +1879,11 @@ interface ProviderSessionUsage {
|
|
|
1879
1879
|
cached_input_tokens?: number;
|
|
1880
1880
|
characters?: number;
|
|
1881
1881
|
seconds?: number;
|
|
1882
|
+
/**
|
|
1883
|
+
* Per-modality token counts (`input.audio`, `cached_input.audio`, `output.audio`, `input.image`…),
|
|
1884
|
+
* each a subset of its flat count, priced at the catalog's `component_prices`.
|
|
1885
|
+
*/
|
|
1886
|
+
components?: Record<string, number>;
|
|
1882
1887
|
}
|
|
1883
1888
|
interface ProviderSessionUsageReceipt {
|
|
1884
1889
|
billed: boolean;
|
|
@@ -1888,7 +1893,7 @@ interface ProviderSessionUsageReceipt {
|
|
|
1888
1893
|
/** `ok` = the server has it (billed or already had it). `retry` = transient. `drop` = refused for good. */
|
|
1889
1894
|
type ProviderUsageSendResult = "ok" | "retry" | "drop";
|
|
1890
1895
|
/** The body the server accepts — bounded exactly as its model bounds it. */
|
|
1891
|
-
declare function providerSessionUsageBody(usage: ProviderSessionUsage): Record<string, string | number
|
|
1896
|
+
declare function providerSessionUsageBody(usage: ProviderSessionUsage): Record<string, string | number | Record<string, number>>;
|
|
1892
1897
|
/** True when the unit carries nothing the server could price. */
|
|
1893
1898
|
declare function isEmptyProviderUsage(usage: ProviderSessionUsage): boolean;
|
|
1894
1899
|
/** One attempt over the transport. Never throws; the result says whether to try again. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as MatrxStreamEnvelope, b as MatrxNdjsonIssue, U as UploadProgress, c as MatrxStreamEnvelopeObservation, d as MatrxSseFrame } from './index-
|
|
2
|
-
export { A as Api, e as ApiRequestInfo, a as ApiStream, f as AuthTier, g as CONTRACT_SHA256, C as CallOptions, h as CreateApiOptions, D as DEPLOYMENTS, i as DOMAINS, j as DeploymentName, E as Environment, H as HttpMethod, J as JsonOrStream, N as NdjsonEvent, O as OperationArgs, k as OperationDescriptor, l as OrgRule, S as SseEvent, m as StreamKind, n as createApi, o as isBinaryType, p as openJsonOrStream, q as openStream } from './index-
|
|
1
|
+
import { M as MatrxStreamEnvelope, b as MatrxNdjsonIssue, U as UploadProgress, c as MatrxStreamEnvelopeObservation, d as MatrxSseFrame } from './index-A1nOdg4F.js';
|
|
2
|
+
export { A as Api, e as ApiRequestInfo, a as ApiStream, f as AuthTier, g as CONTRACT_SHA256, C as CallOptions, h as CreateApiOptions, D as DEPLOYMENTS, i as DOMAINS, j as DeploymentName, E as Environment, H as HttpMethod, J as JsonOrStream, N as NdjsonEvent, O as OperationArgs, k as OperationDescriptor, l as OrgRule, S as SseEvent, m as StreamKind, n as createApi, o as isBinaryType, p as openJsonOrStream, q as openStream } from './index-A1nOdg4F.js';
|
|
3
3
|
import { CredentialsPort } from '@ai-matrx/auth/credentials';
|
|
4
4
|
export { API_KEY_PREFIX, CredentialsPort, CredentialsSetting, MATRX_HEADERS, MatrxCredential, MatrxCredentialKind, credentialToHeaders, toCredentialsPort } from '@ai-matrx/auth/credentials';
|
|
5
5
|
export { AbortedError, ConnectTimeoutError, HeartbeatTimeoutError, HttpError, NetError, NetErrorCode, NetworkError, OfflineError, ResilientFetchOptions, ResilientFetchResult, RetryOptions, StreamMonitorOptions, TotalTimeoutError, extractErrorMessage, isNetError, isTransportFailure, monitorStream, resilientFetch, toNetError, withRetry } from './net.js';
|
|
@@ -1819,7 +1819,7 @@ declare function followServerJob(transport: MatrxTransport, options: FollowServe
|
|
|
1819
1819
|
*/
|
|
1820
1820
|
|
|
1821
1821
|
/** The providers whose sessions a browser holds directly (server allow-list). */
|
|
1822
|
-
type MatrxClientSessionProvider = "openai" | "xai" | "cartesia";
|
|
1822
|
+
type MatrxClientSessionProvider = "openai" | "xai" | "google" | "cartesia";
|
|
1823
1823
|
interface ProviderSessionFailure {
|
|
1824
1824
|
provider: MatrxClientSessionProvider;
|
|
1825
1825
|
model?: string | null;
|
|
@@ -1879,6 +1879,11 @@ interface ProviderSessionUsage {
|
|
|
1879
1879
|
cached_input_tokens?: number;
|
|
1880
1880
|
characters?: number;
|
|
1881
1881
|
seconds?: number;
|
|
1882
|
+
/**
|
|
1883
|
+
* Per-modality token counts (`input.audio`, `cached_input.audio`, `output.audio`, `input.image`…),
|
|
1884
|
+
* each a subset of its flat count, priced at the catalog's `component_prices`.
|
|
1885
|
+
*/
|
|
1886
|
+
components?: Record<string, number>;
|
|
1882
1887
|
}
|
|
1883
1888
|
interface ProviderSessionUsageReceipt {
|
|
1884
1889
|
billed: boolean;
|
|
@@ -1888,7 +1893,7 @@ interface ProviderSessionUsageReceipt {
|
|
|
1888
1893
|
/** `ok` = the server has it (billed or already had it). `retry` = transient. `drop` = refused for good. */
|
|
1889
1894
|
type ProviderUsageSendResult = "ok" | "retry" | "drop";
|
|
1890
1895
|
/** The body the server accepts — bounded exactly as its model bounds it. */
|
|
1891
|
-
declare function providerSessionUsageBody(usage: ProviderSessionUsage): Record<string, string | number
|
|
1896
|
+
declare function providerSessionUsageBody(usage: ProviderSessionUsage): Record<string, string | number | Record<string, number>>;
|
|
1892
1897
|
/** True when the unit carries nothing the server could price. */
|
|
1893
1898
|
declare function isEmptyProviderUsage(usage: ProviderSessionUsage): boolean;
|
|
1894
1899
|
/** One attempt over the transport. Never throws; the result says whether to try again. */
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { monitorStream } from './chunk-YTEOFGFC.js';
|
|
2
2
|
export { API_KEY_PREFIX, MATRX_HEADERS, credentialToHeaders, toCredentialsPort } from './chunk-7MZPBCFV.js';
|
|
3
|
-
import { OrganizationContextError, sendOnWire, WIRE_FETCH_OPTION_KEYS, BackendApiError, parseHttpError, MatrxApiError, applyOrganizationContextHeader, extractMatrxErrorCode, extractMatrxErrorMessage, readMatrxNdjsonStream, readMatrxSseStream, requireOrganizationContext, StreamTransportError } from './chunk-
|
|
4
|
-
export { BackendApiError, CONTRACT_SHA256, DEPLOYMENTS, DOMAINS, MatrxApiError, OrganizationContextError, StreamTransportError, applyOrganizationContextHeader, assertOrganizationMatchesOperation, assertQueryOrganizationMatchesContext, createApi, createOrganizationOperation, describeBackendFailure, extractMatrxErrorCode, extractMatrxErrorMessage, getUserMessage, isBinaryType, isGenericUserMessage, isStreamTransportLost, openJsonOrStream, openStream, parseCallApiError, parseHttpError, parseHttpErrorBody, parsePersistedBackendError, parseStreamError, requireOrganizationContext, unwrapUpstreamError } from './chunk-
|
|
3
|
+
import { OrganizationContextError, sendOnWire, WIRE_FETCH_OPTION_KEYS, BackendApiError, parseHttpError, MatrxApiError, applyOrganizationContextHeader, extractMatrxErrorCode, extractMatrxErrorMessage, readMatrxNdjsonStream, readMatrxSseStream, requireOrganizationContext, StreamTransportError } from './chunk-X75SKCDS.js';
|
|
4
|
+
export { BackendApiError, CONTRACT_SHA256, DEPLOYMENTS, DOMAINS, MatrxApiError, OrganizationContextError, StreamTransportError, applyOrganizationContextHeader, assertOrganizationMatchesOperation, assertQueryOrganizationMatchesContext, createApi, createOrganizationOperation, describeBackendFailure, extractMatrxErrorCode, extractMatrxErrorMessage, getUserMessage, isBinaryType, isGenericUserMessage, isStreamTransportLost, openJsonOrStream, openStream, parseCallApiError, parseHttpError, parseHttpErrorBody, parsePersistedBackendError, parseStreamError, requireOrganizationContext, unwrapUpstreamError } from './chunk-X75SKCDS.js';
|
|
5
5
|
import { isNetError, extractErrorMessage } from './chunk-KIEAFMKB.js';
|
|
6
6
|
export { AbortedError, ConnectTimeoutError, HeartbeatTimeoutError, HttpError, NetError, NetworkError, OfflineError, TotalTimeoutError, extractErrorMessage, isNetError, isTransportFailure, resilientFetch, toNetError, withRetry } from './chunk-KIEAFMKB.js';
|
|
7
7
|
import { formatDurationSeconds } from '@ai-matrx/kit/format';
|
|
@@ -1571,9 +1571,19 @@ function providerSessionUsageBody(usage) {
|
|
|
1571
1571
|
output_tokens: count(usage.output_tokens),
|
|
1572
1572
|
cached_input_tokens: count(usage.cached_input_tokens),
|
|
1573
1573
|
characters: count(usage.characters),
|
|
1574
|
-
seconds
|
|
1574
|
+
seconds,
|
|
1575
|
+
...componentsBody(usage.components)
|
|
1575
1576
|
};
|
|
1576
1577
|
}
|
|
1578
|
+
var COMPONENT_KEY = /^(input|cached_input|output)\.[a-z_]{1,32}$/;
|
|
1579
|
+
function componentsBody(components) {
|
|
1580
|
+
if (!components) return {};
|
|
1581
|
+
const out = {};
|
|
1582
|
+
for (const [key, value] of Object.entries(components)) {
|
|
1583
|
+
if (COMPONENT_KEY.test(key) && count(value) > 0) out[key] = count(value);
|
|
1584
|
+
}
|
|
1585
|
+
return Object.keys(out).length > 0 ? { components: out } : {};
|
|
1586
|
+
}
|
|
1577
1587
|
function isEmptyProviderUsage(usage) {
|
|
1578
1588
|
return !usage.usage_id?.trim() || !usage.model?.trim() || count(usage.input_tokens) === 0 && count(usage.output_tokens) === 0 && count(usage.cached_input_tokens) === 0 && count(usage.characters) === 0 && !(typeof usage.seconds === "number" && usage.seconds > 0);
|
|
1579
1589
|
}
|
package/dist/integrations.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk27ZEEIXM_cjs = require('./chunk-27ZEEIXM.cjs');
|
|
4
4
|
require('./chunk-2SXAAKGV.cjs');
|
|
5
5
|
|
|
6
6
|
// src/generated/integrations.ts
|
|
@@ -3240,6 +3240,26 @@ var $publicModel = { m: "GET", p: "/hugging-face/public/model", d: "aidream", a:
|
|
|
3240
3240
|
function publicModel(api, args, options) {
|
|
3241
3241
|
return api.call($publicModel, args, options);
|
|
3242
3242
|
}
|
|
3243
|
+
var $hfConnectionStatus = { m: "GET", p: "/hugging-face/connection", d: "aidream", a: "guest", o: "required", n: "integrations.hf_connection_status" };
|
|
3244
|
+
function hfConnectionStatus(api, args, options) {
|
|
3245
|
+
return api.call($hfConnectionStatus, args, options);
|
|
3246
|
+
}
|
|
3247
|
+
var $hfDisconnect = { m: "DELETE", p: "/hugging-face/connection", d: "aidream", a: "guest", o: "required", n: "integrations.hf_disconnect" };
|
|
3248
|
+
function hfDisconnect(api, args, options) {
|
|
3249
|
+
return api.call($hfDisconnect, args, options);
|
|
3250
|
+
}
|
|
3251
|
+
var $hfPasteToken = { m: "POST", p: "/hugging-face/connection/token", d: "aidream", a: "guest", o: "required", n: "integrations.hf_paste_token" };
|
|
3252
|
+
function hfPasteToken(api, args, options) {
|
|
3253
|
+
return api.call($hfPasteToken, args, options);
|
|
3254
|
+
}
|
|
3255
|
+
var $hfAuthorize = { m: "POST", p: "/hugging-face/oauth/authorize", d: "aidream", a: "guest", o: "required", n: "integrations.hf_authorize" };
|
|
3256
|
+
function hfAuthorize(api, args, options) {
|
|
3257
|
+
return api.call($hfAuthorize, args, options);
|
|
3258
|
+
}
|
|
3259
|
+
var $hfComplete = { m: "POST", p: "/hugging-face/oauth/complete", d: "aidream", a: "guest", o: "required", n: "integrations.hf_complete" };
|
|
3260
|
+
function hfComplete(api, args, options) {
|
|
3261
|
+
return api.call($hfComplete, args, options);
|
|
3262
|
+
}
|
|
3243
3263
|
var $publicOaStatus = { m: "GET", p: "/unpaywall/public/oa-status", d: "aidream", a: "guest", o: "optional", n: "integrations.public_oa_status" };
|
|
3244
3264
|
function publicOaStatus(api, args, options) {
|
|
3245
3265
|
return api.call($publicOaStatus, args, options);
|
|
@@ -3654,15 +3674,15 @@ function bingIntegrationsDisconnect(api, args, options) {
|
|
|
3654
3674
|
}
|
|
3655
3675
|
var $importNotionZip = { m: "POST", p: "/notion-import/zip", d: "aidream", a: "guest", o: "required", s: "ndjson", n: "integrations.import_notion_zip" };
|
|
3656
3676
|
function importNotionZip(api, args, options) {
|
|
3657
|
-
return
|
|
3677
|
+
return chunk27ZEEIXM_cjs.openStream(api, $importNotionZip, args, options);
|
|
3658
3678
|
}
|
|
3659
3679
|
var $importNotionConnected = { m: "POST", p: "/notion-import/connected", d: "aidream", a: "guest", o: "required", s: "ndjson", n: "integrations.import_notion_connected" };
|
|
3660
3680
|
function importNotionConnected(api, args, options) {
|
|
3661
|
-
return
|
|
3681
|
+
return chunk27ZEEIXM_cjs.openStream(api, $importNotionConnected, args, options);
|
|
3662
3682
|
}
|
|
3663
3683
|
var $importNotionConnection = { m: "POST", p: "/notion-import/connection", d: "aidream", a: "guest", o: "required", s: "ndjson", n: "integrations.import_notion_connection" };
|
|
3664
3684
|
function importNotionConnection(api, args, options) {
|
|
3665
|
-
return
|
|
3685
|
+
return chunk27ZEEIXM_cjs.openStream(api, $importNotionConnection, args, options);
|
|
3666
3686
|
}
|
|
3667
3687
|
var $syncState = { m: "GET", p: "/notion-import/sync", d: "aidream", a: "guest", o: "required", n: "integrations.sync_state" };
|
|
3668
3688
|
function syncState(api, args, options) {
|
|
@@ -3678,7 +3698,7 @@ function listBases(api, args, options) {
|
|
|
3678
3698
|
}
|
|
3679
3699
|
var $importBases = { m: "POST", p: "/airtable-import/import", d: "aidream", a: "guest", o: "required", s: "ndjson", n: "integrations.import_bases" };
|
|
3680
3700
|
function importBases(api, args, options) {
|
|
3681
|
-
return
|
|
3701
|
+
return chunk27ZEEIXM_cjs.openStream(api, $importBases, args, options);
|
|
3682
3702
|
}
|
|
3683
3703
|
var $airtableImportSyncNow = { m: "POST", p: "/airtable-import/sync", d: "aidream", a: "guest", o: "required", n: "integrations.airtable_import_sync_now" };
|
|
3684
3704
|
function airtableImportSyncNow(api, args, options) {
|
|
@@ -4496,6 +4516,11 @@ var TABLE = {
|
|
|
4496
4516
|
"GET /openalex/public/work": $openalexIntegrationsPublicWork,
|
|
4497
4517
|
"GET /figshare/public/item": $figshareIntegrationsPublicItem,
|
|
4498
4518
|
"GET /hugging-face/public/model": $publicModel,
|
|
4519
|
+
"GET /hugging-face/connection": $hfConnectionStatus,
|
|
4520
|
+
"DELETE /hugging-face/connection": $hfDisconnect,
|
|
4521
|
+
"POST /hugging-face/connection/token": $hfPasteToken,
|
|
4522
|
+
"POST /hugging-face/oauth/authorize": $hfAuthorize,
|
|
4523
|
+
"POST /hugging-face/oauth/complete": $hfComplete,
|
|
4499
4524
|
"GET /unpaywall/public/oa-status": $publicOaStatus,
|
|
4500
4525
|
"GET /artic/public/artwork": $articIntegrationsPublicArtwork,
|
|
4501
4526
|
"GET /arxiv/public/publication": $arxivIntegrationsPublicPublication,
|
|
@@ -4946,6 +4971,11 @@ exports.helpshiftStatusIntegrationsPublicStatus = helpshiftStatusIntegrationsPub
|
|
|
4946
4971
|
exports.helpwiseStatusIntegrationsPublicStatus = helpwiseStatusIntegrationsPublicStatus;
|
|
4947
4972
|
exports.hepdataIntegrationsPublicRecord = hepdataIntegrationsPublicRecord;
|
|
4948
4973
|
exports.hexPmIntegrationsPublicPackage = hexPmIntegrationsPublicPackage;
|
|
4974
|
+
exports.hfAuthorize = hfAuthorize;
|
|
4975
|
+
exports.hfComplete = hfComplete;
|
|
4976
|
+
exports.hfConnectionStatus = hfConnectionStatus;
|
|
4977
|
+
exports.hfDisconnect = hfDisconnect;
|
|
4978
|
+
exports.hfPasteToken = hfPasteToken;
|
|
4949
4979
|
exports.higherLogicStatusIntegrationsPublicStatus = higherLogicStatusIntegrationsPublicStatus;
|
|
4950
4980
|
exports.highspotStatusIntegrationsPublicStatus = highspotStatusIntegrationsPublicStatus;
|
|
4951
4981
|
exports.hireezStatusIntegrationsPublicStatus = hireezStatusIntegrationsPublicStatus;
|