@anuma/sdk 3.3.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.cjs +793 -1420
- package/dist/client/index.d.mts +406 -402
- package/dist/client/index.d.ts +406 -402
- package/dist/client/index.mjs +793 -1420
- package/dist/expo/{chunk-NMZMXIUM.mjs → chunk-EIHIZ5L4.mjs} +4 -1
- package/dist/expo/index.cjs +120 -153
- package/dist/expo/index.mjs +118 -154
- package/dist/expo/{recall-7FUJRHOI.mjs → recall-C3LJ5R2E.mjs} +1 -1
- package/dist/index.cjs +453 -783
- package/dist/index.d.mts +491 -487
- package/dist/index.d.ts +491 -487
- package/dist/index.mjs +453 -783
- package/dist/react/{chunk-GZRK43CA.mjs → chunk-PWTWECXY.mjs} +4 -1
- package/dist/react/index.cjs +191 -275
- package/dist/react/index.d.mts +380 -376
- package/dist/react/index.d.ts +380 -376
- package/dist/react/index.mjs +189 -276
- package/dist/react/{recall-YZGWZC5W.mjs → recall-FZVV5XUU.mjs} +1 -1
- package/dist/server/{chunk-NVTMJWFA.mjs → chunk-J5QZOPUI.mjs} +4 -1
- package/dist/server/index.cjs +10 -15
- package/dist/server/index.mjs +8 -16
- package/dist/server/{recall-76WPPKLR.mjs → recall-NNBMWRLB.mjs} +1 -1
- package/dist/tools/selection/index.cjs +3 -0
- package/dist/tools/selection/index.mjs +3 -0
- package/package.json +2 -2
|
@@ -3119,6 +3119,9 @@ async function withEmbeddingRetry(call) {
|
|
|
3119
3119
|
}
|
|
3120
3120
|
}
|
|
3121
3121
|
if (threw) throw lastThrown;
|
|
3122
|
+
if (last?.error instanceof Error && last.response?.status === void 0) {
|
|
3123
|
+
throw last.error;
|
|
3124
|
+
}
|
|
3122
3125
|
return last;
|
|
3123
3126
|
}
|
|
3124
3127
|
var EmbeddingHttpError = class extends Error {
|
|
@@ -4714,7 +4717,7 @@ function createMemoryVaultSearchTool(vaultCtx, embeddingOptions, cache, searchOp
|
|
|
4714
4717
|
legacy.map((r) => ({ id: r.uniqueId, content: r.content, score: r.similarity }))
|
|
4715
4718
|
);
|
|
4716
4719
|
}
|
|
4717
|
-
const { recall: recall2 } = await import("./recall-
|
|
4720
|
+
const { recall: recall2 } = await import("./recall-FZVV5XUU.mjs");
|
|
4718
4721
|
const result = await recall2(
|
|
4719
4722
|
query,
|
|
4720
4723
|
{ vaultCtx, embeddingOptions, vaultCache: cache },
|
package/dist/react/index.cjs
CHANGED
|
@@ -2231,6 +2231,9 @@ async function withEmbeddingRetry(call) {
|
|
|
2231
2231
|
}
|
|
2232
2232
|
}
|
|
2233
2233
|
if (threw) throw lastThrown;
|
|
2234
|
+
if (last?.error instanceof Error && last.response?.status === void 0) {
|
|
2235
|
+
throw last.error;
|
|
2236
|
+
}
|
|
2234
2237
|
return last;
|
|
2235
2238
|
}
|
|
2236
2239
|
function isFatalEmbeddingError(err) {
|
|
@@ -7302,7 +7305,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
7302
7305
|
init_clientConfig();
|
|
7303
7306
|
|
|
7304
7307
|
// src/client/core/serverSentEvents.gen.ts
|
|
7305
|
-
|
|
7308
|
+
function createSseClient({
|
|
7306
7309
|
onRequest,
|
|
7307
7310
|
onSseError,
|
|
7308
7311
|
onSseEvent,
|
|
@@ -7314,7 +7317,7 @@ var createSseClient = ({
|
|
|
7314
7317
|
sseSleepFn,
|
|
7315
7318
|
url,
|
|
7316
7319
|
...options
|
|
7317
|
-
})
|
|
7320
|
+
}) {
|
|
7318
7321
|
let lastEventId;
|
|
7319
7322
|
const sleep4 = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
7320
7323
|
const createStream = async function* () {
|
|
@@ -7342,10 +7345,7 @@ var createSseClient = ({
|
|
|
7342
7345
|
}
|
|
7343
7346
|
const _fetch = options.fetch ?? globalThis.fetch;
|
|
7344
7347
|
const response = await _fetch(request);
|
|
7345
|
-
if (!response.ok)
|
|
7346
|
-
throw new Error(
|
|
7347
|
-
`SSE failed: ${response.status} ${response.statusText}`
|
|
7348
|
-
);
|
|
7348
|
+
if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
|
|
7349
7349
|
if (!response.body) throw new Error("No body in SSE response");
|
|
7350
7350
|
const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
|
|
7351
7351
|
let buffer = "";
|
|
@@ -7361,6 +7361,7 @@ var createSseClient = ({
|
|
|
7361
7361
|
const { done, value } = await reader.read();
|
|
7362
7362
|
if (done) break;
|
|
7363
7363
|
buffer += value;
|
|
7364
|
+
buffer = buffer.replace(/\r\n?/g, "\n");
|
|
7364
7365
|
const chunks = buffer.split("\n\n");
|
|
7365
7366
|
buffer = chunks.pop() ?? "";
|
|
7366
7367
|
for (const chunk of chunks) {
|
|
@@ -7375,10 +7376,7 @@ var createSseClient = ({
|
|
|
7375
7376
|
} else if (line.startsWith("id:")) {
|
|
7376
7377
|
lastEventId = line.replace(/^id:\s*/, "");
|
|
7377
7378
|
} else if (line.startsWith("retry:")) {
|
|
7378
|
-
const parsed = Number.parseInt(
|
|
7379
|
-
line.replace(/^retry:\s*/, ""),
|
|
7380
|
-
10
|
|
7381
|
-
);
|
|
7379
|
+
const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
|
|
7382
7380
|
if (!Number.isNaN(parsed)) {
|
|
7383
7381
|
retryDelay = parsed;
|
|
7384
7382
|
}
|
|
@@ -7424,17 +7422,14 @@ var createSseClient = ({
|
|
|
7424
7422
|
if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
|
|
7425
7423
|
break;
|
|
7426
7424
|
}
|
|
7427
|
-
const backoff = Math.min(
|
|
7428
|
-
retryDelay * 2 ** (attempt - 1),
|
|
7429
|
-
sseMaxRetryDelay ?? 3e4
|
|
7430
|
-
);
|
|
7425
|
+
const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
|
|
7431
7426
|
await sleep4(backoff);
|
|
7432
7427
|
}
|
|
7433
7428
|
}
|
|
7434
7429
|
};
|
|
7435
7430
|
const stream = createStream();
|
|
7436
7431
|
return { stream };
|
|
7437
|
-
}
|
|
7432
|
+
}
|
|
7438
7433
|
|
|
7439
7434
|
// src/lib/chat/toolLoop.ts
|
|
7440
7435
|
init_clientConfig();
|
|
@@ -24619,10 +24614,7 @@ var import_react14 = require("react");
|
|
|
24619
24614
|
|
|
24620
24615
|
// src/client/core/bodySerializer.gen.ts
|
|
24621
24616
|
var jsonBodySerializer = {
|
|
24622
|
-
bodySerializer: (body) => JSON.stringify(
|
|
24623
|
-
body,
|
|
24624
|
-
(_key, value) => typeof value === "bigint" ? value.toString() : value
|
|
24625
|
-
)
|
|
24617
|
+
bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
|
|
24626
24618
|
};
|
|
24627
24619
|
|
|
24628
24620
|
// src/client/core/pathSerializer.gen.ts
|
|
@@ -24724,11 +24716,7 @@ var serializeObjectParam = ({
|
|
|
24724
24716
|
if (style !== "deepObject" && !explode) {
|
|
24725
24717
|
let values = [];
|
|
24726
24718
|
Object.entries(value).forEach(([key, v]) => {
|
|
24727
|
-
values = [
|
|
24728
|
-
...values,
|
|
24729
|
-
key,
|
|
24730
|
-
allowReserved ? v : encodeURIComponent(v)
|
|
24731
|
-
];
|
|
24719
|
+
values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
|
|
24732
24720
|
});
|
|
24733
24721
|
const joinedValues2 = values.join(",");
|
|
24734
24722
|
switch (style) {
|
|
@@ -24811,10 +24799,7 @@ var defaultPathSerializer = ({ path, url: _url }) => {
|
|
|
24811
24799
|
continue;
|
|
24812
24800
|
}
|
|
24813
24801
|
if (Array.isArray(value)) {
|
|
24814
|
-
url = url.replace(
|
|
24815
|
-
match,
|
|
24816
|
-
serializeArrayParam({ explode, name, style, value })
|
|
24817
|
-
);
|
|
24802
|
+
url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
|
|
24818
24803
|
continue;
|
|
24819
24804
|
}
|
|
24820
24805
|
if (typeof value === "object") {
|
|
@@ -24909,9 +24894,7 @@ var getParseAs = (contentType) => {
|
|
|
24909
24894
|
if (cleanContent === "multipart/form-data") {
|
|
24910
24895
|
return "formData";
|
|
24911
24896
|
}
|
|
24912
|
-
if (["application/", "audio/", "image/", "video/"].some(
|
|
24913
|
-
(type) => cleanContent.startsWith(type)
|
|
24914
|
-
)) {
|
|
24897
|
+
if (["application/", "audio/", "image/", "video/"].some((type) => cleanContent.startsWith(type))) {
|
|
24915
24898
|
return "blob";
|
|
24916
24899
|
}
|
|
24917
24900
|
if (cleanContent.startsWith("text/")) {
|
|
@@ -24928,11 +24911,8 @@ var checkForExistence = (options, name) => {
|
|
|
24928
24911
|
}
|
|
24929
24912
|
return false;
|
|
24930
24913
|
};
|
|
24931
|
-
|
|
24932
|
-
security
|
|
24933
|
-
...options
|
|
24934
|
-
}) => {
|
|
24935
|
-
for (const auth of security) {
|
|
24914
|
+
async function setAuthParams(options) {
|
|
24915
|
+
for (const auth of options.security ?? []) {
|
|
24936
24916
|
if (checkForExistence(options, auth.name)) {
|
|
24937
24917
|
continue;
|
|
24938
24918
|
}
|
|
@@ -24957,7 +24937,7 @@ var setAuthParams = async ({
|
|
|
24957
24937
|
break;
|
|
24958
24938
|
}
|
|
24959
24939
|
}
|
|
24960
|
-
}
|
|
24940
|
+
}
|
|
24961
24941
|
var buildUrl = (options) => {
|
|
24962
24942
|
const url = getUrl({
|
|
24963
24943
|
baseUrl: options.baseUrl,
|
|
@@ -25109,10 +25089,7 @@ var createClient = (config = {}) => {
|
|
|
25109
25089
|
serializedBody: void 0
|
|
25110
25090
|
};
|
|
25111
25091
|
if (opts.security) {
|
|
25112
|
-
await setAuthParams(
|
|
25113
|
-
...opts,
|
|
25114
|
-
security: opts.security
|
|
25115
|
-
});
|
|
25092
|
+
await setAuthParams(opts);
|
|
25116
25093
|
}
|
|
25117
25094
|
if (opts.requestValidator) {
|
|
25118
25095
|
await opts.requestValidator(opts);
|
|
@@ -25123,105 +25100,115 @@ var createClient = (config = {}) => {
|
|
|
25123
25100
|
if (opts.body === void 0 || opts.serializedBody === "") {
|
|
25124
25101
|
opts.headers.delete("Content-Type");
|
|
25125
25102
|
}
|
|
25126
|
-
const
|
|
25127
|
-
|
|
25103
|
+
const resolvedOpts = opts;
|
|
25104
|
+
const url = buildUrl(resolvedOpts);
|
|
25105
|
+
return { opts: resolvedOpts, url };
|
|
25128
25106
|
};
|
|
25129
25107
|
const request = async (options) => {
|
|
25130
|
-
const
|
|
25131
|
-
|
|
25132
|
-
|
|
25133
|
-
|
|
25108
|
+
const throwOnError = options.throwOnError ?? _config.throwOnError;
|
|
25109
|
+
let response;
|
|
25110
|
+
try {
|
|
25111
|
+
const { opts, url } = await beforeRequest(options);
|
|
25112
|
+
for (const fn of interceptors.request.fns) {
|
|
25113
|
+
if (fn) {
|
|
25114
|
+
await fn(opts);
|
|
25115
|
+
}
|
|
25134
25116
|
}
|
|
25135
|
-
|
|
25136
|
-
|
|
25137
|
-
|
|
25138
|
-
|
|
25139
|
-
|
|
25140
|
-
|
|
25141
|
-
|
|
25142
|
-
|
|
25143
|
-
|
|
25144
|
-
|
|
25117
|
+
const _fetch = opts.fetch;
|
|
25118
|
+
const requestInit = {
|
|
25119
|
+
...opts,
|
|
25120
|
+
body: getValidRequestBody(opts)
|
|
25121
|
+
};
|
|
25122
|
+
response = await _fetch(url, requestInit);
|
|
25123
|
+
for (const fn of interceptors.response.fns) {
|
|
25124
|
+
if (fn) {
|
|
25125
|
+
response = await fn(response, opts);
|
|
25126
|
+
}
|
|
25145
25127
|
}
|
|
25146
|
-
|
|
25147
|
-
|
|
25148
|
-
|
|
25149
|
-
|
|
25150
|
-
|
|
25151
|
-
|
|
25152
|
-
|
|
25153
|
-
|
|
25128
|
+
const result = {
|
|
25129
|
+
response
|
|
25130
|
+
};
|
|
25131
|
+
if (response.ok) {
|
|
25132
|
+
const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
|
|
25133
|
+
if (response.status === 204 || response.headers.get("Content-Length") === "0") {
|
|
25134
|
+
let emptyData;
|
|
25135
|
+
switch (parseAs) {
|
|
25136
|
+
case "arrayBuffer":
|
|
25137
|
+
case "blob":
|
|
25138
|
+
case "text":
|
|
25139
|
+
emptyData = await response[parseAs]();
|
|
25140
|
+
break;
|
|
25141
|
+
case "formData":
|
|
25142
|
+
emptyData = new FormData();
|
|
25143
|
+
break;
|
|
25144
|
+
case "stream":
|
|
25145
|
+
emptyData = response.body;
|
|
25146
|
+
break;
|
|
25147
|
+
case "json":
|
|
25148
|
+
default:
|
|
25149
|
+
emptyData = {};
|
|
25150
|
+
break;
|
|
25151
|
+
}
|
|
25152
|
+
return {
|
|
25153
|
+
data: emptyData,
|
|
25154
|
+
...result
|
|
25155
|
+
};
|
|
25156
|
+
}
|
|
25157
|
+
let data;
|
|
25154
25158
|
switch (parseAs) {
|
|
25155
25159
|
case "arrayBuffer":
|
|
25156
25160
|
case "blob":
|
|
25161
|
+
case "formData":
|
|
25157
25162
|
case "text":
|
|
25158
|
-
|
|
25163
|
+
data = await response[parseAs]();
|
|
25159
25164
|
break;
|
|
25160
|
-
case "
|
|
25161
|
-
|
|
25165
|
+
case "json": {
|
|
25166
|
+
const text12 = await response.text();
|
|
25167
|
+
data = text12 ? JSON.parse(text12) : {};
|
|
25162
25168
|
break;
|
|
25169
|
+
}
|
|
25163
25170
|
case "stream":
|
|
25164
|
-
|
|
25165
|
-
|
|
25166
|
-
|
|
25167
|
-
|
|
25168
|
-
|
|
25169
|
-
|
|
25171
|
+
return {
|
|
25172
|
+
data: response.body,
|
|
25173
|
+
...result
|
|
25174
|
+
};
|
|
25175
|
+
}
|
|
25176
|
+
if (parseAs === "json") {
|
|
25177
|
+
if (opts.responseValidator) {
|
|
25178
|
+
await opts.responseValidator(data);
|
|
25179
|
+
}
|
|
25180
|
+
if (opts.responseTransformer) {
|
|
25181
|
+
data = await opts.responseTransformer(data);
|
|
25182
|
+
}
|
|
25170
25183
|
}
|
|
25171
25184
|
return {
|
|
25172
|
-
data
|
|
25185
|
+
data,
|
|
25173
25186
|
...result
|
|
25174
25187
|
};
|
|
25175
25188
|
}
|
|
25176
|
-
|
|
25177
|
-
|
|
25178
|
-
|
|
25179
|
-
|
|
25180
|
-
|
|
25181
|
-
case "json":
|
|
25182
|
-
case "text":
|
|
25183
|
-
data = await response[parseAs]();
|
|
25184
|
-
break;
|
|
25185
|
-
case "stream":
|
|
25186
|
-
return {
|
|
25187
|
-
data: response.body,
|
|
25188
|
-
...result
|
|
25189
|
-
};
|
|
25189
|
+
const textError = await response.text();
|
|
25190
|
+
let jsonError;
|
|
25191
|
+
try {
|
|
25192
|
+
jsonError = JSON.parse(textError);
|
|
25193
|
+
} catch {
|
|
25190
25194
|
}
|
|
25191
|
-
|
|
25192
|
-
|
|
25193
|
-
|
|
25194
|
-
|
|
25195
|
-
if (
|
|
25196
|
-
|
|
25195
|
+
throw jsonError ?? textError;
|
|
25196
|
+
} catch (error) {
|
|
25197
|
+
let finalError = error;
|
|
25198
|
+
for (const fn of interceptors.error.fns) {
|
|
25199
|
+
if (fn) {
|
|
25200
|
+
finalError = await fn(finalError, response, options);
|
|
25197
25201
|
}
|
|
25198
25202
|
}
|
|
25203
|
+
finalError = finalError || {};
|
|
25204
|
+
if (throwOnError) {
|
|
25205
|
+
throw finalError;
|
|
25206
|
+
}
|
|
25199
25207
|
return {
|
|
25200
|
-
|
|
25201
|
-
|
|
25208
|
+
error: finalError,
|
|
25209
|
+
response
|
|
25202
25210
|
};
|
|
25203
25211
|
}
|
|
25204
|
-
const textError = await response.text();
|
|
25205
|
-
let jsonError;
|
|
25206
|
-
try {
|
|
25207
|
-
jsonError = JSON.parse(textError);
|
|
25208
|
-
} catch {
|
|
25209
|
-
}
|
|
25210
|
-
const error = jsonError ?? textError;
|
|
25211
|
-
let finalError = error;
|
|
25212
|
-
for (const fn of interceptors.error.fns) {
|
|
25213
|
-
if (fn) {
|
|
25214
|
-
finalError = await fn(error, response, opts);
|
|
25215
|
-
}
|
|
25216
|
-
}
|
|
25217
|
-
finalError = finalError || {};
|
|
25218
|
-
if (opts.throwOnError) {
|
|
25219
|
-
throw finalError;
|
|
25220
|
-
}
|
|
25221
|
-
return {
|
|
25222
|
-
error: finalError,
|
|
25223
|
-
...result
|
|
25224
|
-
};
|
|
25225
25212
|
};
|
|
25226
25213
|
const makeMethodFn = (method) => (options) => request({ ...options, method });
|
|
25227
25214
|
const makeSseFn = (method) => async (options) => {
|
|
@@ -25229,15 +25216,10 @@ var createClient = (config = {}) => {
|
|
|
25229
25216
|
return createSseClient({
|
|
25230
25217
|
...opts,
|
|
25231
25218
|
body: opts.body,
|
|
25232
|
-
headers: opts.headers,
|
|
25233
25219
|
method,
|
|
25234
25220
|
onRequest: async (url2, init) => {
|
|
25235
25221
|
let request2 = new Request(url2, init);
|
|
25236
|
-
const requestInit = {
|
|
25237
|
-
...init,
|
|
25238
|
-
method: init.method,
|
|
25239
|
-
url: url2
|
|
25240
|
-
};
|
|
25222
|
+
const requestInit = { ...init, url: url2 };
|
|
25241
25223
|
for (const fn of interceptors.request.fns) {
|
|
25242
25224
|
if (fn) {
|
|
25243
25225
|
await fn(requestInit);
|
|
@@ -25246,11 +25228,13 @@ var createClient = (config = {}) => {
|
|
|
25246
25228
|
}
|
|
25247
25229
|
return request2;
|
|
25248
25230
|
},
|
|
25231
|
+
serializedBody: getValidRequestBody(opts),
|
|
25249
25232
|
url
|
|
25250
25233
|
});
|
|
25251
25234
|
};
|
|
25235
|
+
const _buildUrl = (options) => buildUrl({ ..._config, ...options });
|
|
25252
25236
|
return {
|
|
25253
|
-
buildUrl,
|
|
25237
|
+
buildUrl: _buildUrl,
|
|
25254
25238
|
connect: makeMethodFn("CONNECT"),
|
|
25255
25239
|
delete: makeMethodFn("DELETE"),
|
|
25256
25240
|
get: makeMethodFn("GET"),
|
|
@@ -25283,156 +25267,88 @@ init_clientConfig();
|
|
|
25283
25267
|
var client = createClient(createClientConfig(createConfig()));
|
|
25284
25268
|
|
|
25285
25269
|
// src/client/sdk.gen.ts
|
|
25286
|
-
var getApiV1Config = (options) => {
|
|
25287
|
-
|
|
25288
|
-
|
|
25289
|
-
|
|
25290
|
-
|
|
25291
|
-
|
|
25292
|
-
|
|
25293
|
-
|
|
25294
|
-
|
|
25295
|
-
|
|
25296
|
-
|
|
25297
|
-
};
|
|
25298
|
-
var
|
|
25299
|
-
|
|
25300
|
-
|
|
25301
|
-
|
|
25302
|
-
|
|
25303
|
-
|
|
25304
|
-
|
|
25305
|
-
|
|
25306
|
-
|
|
25307
|
-
|
|
25308
|
-
|
|
25309
|
-
|
|
25310
|
-
|
|
25311
|
-
|
|
25312
|
-
|
|
25313
|
-
}
|
|
25314
|
-
|
|
25315
|
-
|
|
25316
|
-
|
|
25317
|
-
|
|
25318
|
-
|
|
25319
|
-
|
|
25320
|
-
|
|
25321
|
-
|
|
25322
|
-
|
|
25323
|
-
|
|
25324
|
-
|
|
25325
|
-
|
|
25326
|
-
|
|
25327
|
-
|
|
25328
|
-
|
|
25329
|
-
}
|
|
25330
|
-
|
|
25331
|
-
|
|
25332
|
-
|
|
25333
|
-
|
|
25334
|
-
|
|
25335
|
-
|
|
25336
|
-
|
|
25337
|
-
|
|
25338
|
-
|
|
25339
|
-
...options
|
|
25340
|
-
|
|
25341
|
-
|
|
25342
|
-
|
|
25343
|
-
|
|
25344
|
-
|
|
25345
|
-
}
|
|
25346
|
-
|
|
25347
|
-
|
|
25348
|
-
|
|
25349
|
-
...options
|
|
25350
|
-
|
|
25351
|
-
|
|
25352
|
-
|
|
25353
|
-
|
|
25354
|
-
|
|
25355
|
-
|
|
25356
|
-
|
|
25357
|
-
|
|
25358
|
-
|
|
25359
|
-
|
|
25360
|
-
|
|
25361
|
-
|
|
25362
|
-
|
|
25363
|
-
|
|
25364
|
-
|
|
25365
|
-
|
|
25366
|
-
|
|
25367
|
-
|
|
25368
|
-
url: "/api/v1/subscriptions/renew",
|
|
25369
|
-
...options
|
|
25370
|
-
});
|
|
25371
|
-
};
|
|
25372
|
-
var getApiV1SubscriptionsStatus = (options) => {
|
|
25373
|
-
return (options?.client ?? client).get({
|
|
25374
|
-
url: "/api/v1/subscriptions/status",
|
|
25375
|
-
...options
|
|
25376
|
-
});
|
|
25377
|
-
};
|
|
25378
|
-
var getApiV1WalletsBinding = (options) => {
|
|
25379
|
-
return (options?.client ?? client).get({
|
|
25380
|
-
url: "/api/v1/wallets/binding",
|
|
25381
|
-
...options
|
|
25382
|
-
});
|
|
25383
|
-
};
|
|
25384
|
-
var postApiV1WalletsBinding = (options) => {
|
|
25385
|
-
return (options.client ?? client).post({
|
|
25386
|
-
url: "/api/v1/wallets/binding",
|
|
25387
|
-
...options,
|
|
25388
|
-
headers: {
|
|
25389
|
-
"Content-Type": "application/json",
|
|
25390
|
-
...options.headers
|
|
25391
|
-
}
|
|
25392
|
-
});
|
|
25393
|
-
};
|
|
25394
|
-
var postApiV1WalletsBindingNonce = (options) => {
|
|
25395
|
-
return (options?.client ?? client).post({
|
|
25396
|
-
url: "/api/v1/wallets/binding/nonce",
|
|
25397
|
-
...options
|
|
25398
|
-
});
|
|
25399
|
-
};
|
|
25400
|
-
var deleteApiV1WalletsBindingByAddress = (options) => {
|
|
25401
|
-
return (options.client ?? client).delete({
|
|
25402
|
-
url: "/api/v1/wallets/binding/{address}",
|
|
25403
|
-
...options
|
|
25404
|
-
});
|
|
25405
|
-
};
|
|
25406
|
-
var postAuthOauthByProviderExchange = (options) => {
|
|
25407
|
-
return (options.client ?? client).post({
|
|
25408
|
-
url: "/auth/oauth/{provider}/exchange",
|
|
25409
|
-
...options,
|
|
25410
|
-
headers: {
|
|
25411
|
-
"Content-Type": "application/json",
|
|
25412
|
-
...options.headers
|
|
25413
|
-
}
|
|
25414
|
-
});
|
|
25415
|
-
};
|
|
25416
|
-
var postAuthOauthByProviderRefresh = (options) => {
|
|
25417
|
-
return (options.client ?? client).post({
|
|
25418
|
-
url: "/auth/oauth/{provider}/refresh",
|
|
25419
|
-
...options,
|
|
25420
|
-
headers: {
|
|
25421
|
-
"Content-Type": "application/json",
|
|
25422
|
-
...options.headers
|
|
25423
|
-
}
|
|
25424
|
-
});
|
|
25425
|
-
};
|
|
25426
|
-
var postAuthOauthByProviderRevoke = (options) => {
|
|
25427
|
-
return (options.client ?? client).post({
|
|
25428
|
-
url: "/auth/oauth/{provider}/revoke",
|
|
25429
|
-
...options,
|
|
25430
|
-
headers: {
|
|
25431
|
-
"Content-Type": "application/json",
|
|
25432
|
-
...options.headers
|
|
25433
|
-
}
|
|
25434
|
-
});
|
|
25435
|
-
};
|
|
25270
|
+
var getApiV1Config = (options) => (options?.client ?? client).get({ url: "/api/v1/config", ...options });
|
|
25271
|
+
var getApiV1CreditsBalance = (options) => (options?.client ?? client).get({ url: "/api/v1/credits/balance", ...options });
|
|
25272
|
+
var getApiV1CreditsPacks = (options) => (options?.client ?? client).get({ url: "/api/v1/credits/packs", ...options });
|
|
25273
|
+
var postApiV1CreditsPurchase = (options) => (options.client ?? client).post({
|
|
25274
|
+
url: "/api/v1/credits/purchase",
|
|
25275
|
+
...options,
|
|
25276
|
+
headers: {
|
|
25277
|
+
"Content-Type": "application/json",
|
|
25278
|
+
...options.headers
|
|
25279
|
+
}
|
|
25280
|
+
});
|
|
25281
|
+
var getApiV1Models = (options) => (options?.client ?? client).get({ url: "/api/v1/models", ...options });
|
|
25282
|
+
var postApiV1PhoneCalls = (options) => (options.client ?? client).post({
|
|
25283
|
+
url: "/api/v1/phone-calls",
|
|
25284
|
+
...options,
|
|
25285
|
+
headers: {
|
|
25286
|
+
"Content-Type": "application/json",
|
|
25287
|
+
...options.headers
|
|
25288
|
+
}
|
|
25289
|
+
});
|
|
25290
|
+
var getApiV1PhoneCallsByCallId = (options) => (options.client ?? client).get({ url: "/api/v1/phone-calls/{call_id}", ...options });
|
|
25291
|
+
var postApiV1SubscriptionsCancel = (options) => (options?.client ?? client).post({
|
|
25292
|
+
url: "/api/v1/subscriptions/cancel",
|
|
25293
|
+
...options,
|
|
25294
|
+
headers: {
|
|
25295
|
+
"Content-Type": "application/json",
|
|
25296
|
+
...options?.headers
|
|
25297
|
+
}
|
|
25298
|
+
});
|
|
25299
|
+
var postApiV1SubscriptionsCreateCheckoutSession = (options) => (options.client ?? client).post({
|
|
25300
|
+
url: "/api/v1/subscriptions/create-checkout-session",
|
|
25301
|
+
...options,
|
|
25302
|
+
headers: {
|
|
25303
|
+
"Content-Type": "application/json",
|
|
25304
|
+
...options.headers
|
|
25305
|
+
}
|
|
25306
|
+
});
|
|
25307
|
+
var postApiV1SubscriptionsCustomerPortal = (options) => (options.client ?? client).post({
|
|
25308
|
+
url: "/api/v1/subscriptions/customer-portal",
|
|
25309
|
+
...options,
|
|
25310
|
+
headers: {
|
|
25311
|
+
"Content-Type": "application/json",
|
|
25312
|
+
...options.headers
|
|
25313
|
+
}
|
|
25314
|
+
});
|
|
25315
|
+
var postApiV1SubscriptionsRenew = (options) => (options?.client ?? client).post({ url: "/api/v1/subscriptions/renew", ...options });
|
|
25316
|
+
var getApiV1SubscriptionsStatus = (options) => (options?.client ?? client).get({ url: "/api/v1/subscriptions/status", ...options });
|
|
25317
|
+
var getApiV1WalletsBinding = (options) => (options?.client ?? client).get({ url: "/api/v1/wallets/binding", ...options });
|
|
25318
|
+
var postApiV1WalletsBinding = (options) => (options.client ?? client).post({
|
|
25319
|
+
url: "/api/v1/wallets/binding",
|
|
25320
|
+
...options,
|
|
25321
|
+
headers: {
|
|
25322
|
+
"Content-Type": "application/json",
|
|
25323
|
+
...options.headers
|
|
25324
|
+
}
|
|
25325
|
+
});
|
|
25326
|
+
var postApiV1WalletsBindingNonce = (options) => (options?.client ?? client).post({ url: "/api/v1/wallets/binding/nonce", ...options });
|
|
25327
|
+
var deleteApiV1WalletsBindingByAddress = (options) => (options.client ?? client).delete({ url: "/api/v1/wallets/binding/{address}", ...options });
|
|
25328
|
+
var postAuthOauthByProviderExchange = (options) => (options.client ?? client).post({
|
|
25329
|
+
url: "/auth/oauth/{provider}/exchange",
|
|
25330
|
+
...options,
|
|
25331
|
+
headers: {
|
|
25332
|
+
"Content-Type": "application/json",
|
|
25333
|
+
...options.headers
|
|
25334
|
+
}
|
|
25335
|
+
});
|
|
25336
|
+
var postAuthOauthByProviderRefresh = (options) => (options.client ?? client).post({
|
|
25337
|
+
url: "/auth/oauth/{provider}/refresh",
|
|
25338
|
+
...options,
|
|
25339
|
+
headers: {
|
|
25340
|
+
"Content-Type": "application/json",
|
|
25341
|
+
...options.headers
|
|
25342
|
+
}
|
|
25343
|
+
});
|
|
25344
|
+
var postAuthOauthByProviderRevoke = (options) => (options.client ?? client).post({
|
|
25345
|
+
url: "/auth/oauth/{provider}/revoke",
|
|
25346
|
+
...options,
|
|
25347
|
+
headers: {
|
|
25348
|
+
"Content-Type": "application/json",
|
|
25349
|
+
...options.headers
|
|
25350
|
+
}
|
|
25351
|
+
});
|
|
25436
25352
|
|
|
25437
25353
|
// src/react/useCredits.ts
|
|
25438
25354
|
init_clientConfig();
|