@anuma/sdk 3.8.0 → 3.8.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 +10 -0
- package/dist/client/index.d.mts +98 -3
- package/dist/client/index.d.ts +98 -3
- package/dist/client/index.mjs +9 -0
- package/dist/expo/index.cjs +5 -2
- package/dist/expo/index.d.mts +6 -0
- package/dist/expo/index.d.ts +6 -0
- package/dist/expo/index.mjs +5 -2
- package/dist/index.d.mts +38 -2
- package/dist/index.d.ts +38 -2
- package/dist/react/{chunk-3VPEZDYL.mjs → chunk-3LUACMDC.mjs} +1 -1
- package/dist/react/index.cjs +5 -2
- package/dist/react/index.d.mts +6 -0
- package/dist/react/index.d.ts +6 -0
- package/dist/react/index.mjs +6 -3
- package/dist/react/{recall-Z7BWJ67X.mjs → recall-CCA4VTDK.mjs} +1 -1
- package/dist/server/index.cjs +5 -2
- package/dist/server/index.mjs +5 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1729,6 +1729,12 @@ type HandlersCreditBalanceResponse = {
|
|
|
1729
1729
|
* Total credits ever received (1 credit = $0.01)
|
|
1730
1730
|
*/
|
|
1731
1731
|
lifetime_credits: number;
|
|
1732
|
+
/**
|
|
1733
|
+
* NextResetDate is the next monthly credit refill date (ISO8601), keyed on the
|
|
1734
|
+
* credit_expiry_day anchor — the same anchor the monthly claim uses, NOT the grant
|
|
1735
|
+
* expires_at (which is anchor+1). Display-only; does not affect reset logic.
|
|
1736
|
+
*/
|
|
1737
|
+
next_reset_date?: string;
|
|
1732
1738
|
/**
|
|
1733
1739
|
* "basic" or "pro"
|
|
1734
1740
|
*/
|
|
@@ -2130,13 +2136,22 @@ type HandlersSetSubscriptionTierRequest = {
|
|
|
2130
2136
|
*/
|
|
2131
2137
|
app_id?: number;
|
|
2132
2138
|
/**
|
|
2133
|
-
* "
|
|
2139
|
+
* "month" or "year"; ignored for basic
|
|
2140
|
+
*/
|
|
2141
|
+
interval?: string;
|
|
2142
|
+
/**
|
|
2143
|
+
* "basic", "starter", or "pro"
|
|
2134
2144
|
*/
|
|
2135
2145
|
tier?: string;
|
|
2136
2146
|
user_address?: string;
|
|
2137
2147
|
};
|
|
2138
2148
|
type HandlersSetSubscriptionTierResponse = {
|
|
2149
|
+
changed?: boolean;
|
|
2150
|
+
interval?: string;
|
|
2139
2151
|
message?: string;
|
|
2152
|
+
scheduled_interval?: string;
|
|
2153
|
+
scheduled_tier?: string;
|
|
2154
|
+
status: string;
|
|
2140
2155
|
success: boolean;
|
|
2141
2156
|
tier: string;
|
|
2142
2157
|
user_address: string;
|
|
@@ -2461,8 +2476,10 @@ type HandlersUserLookupEnrollment = {
|
|
|
2461
2476
|
created_at?: string;
|
|
2462
2477
|
id?: number;
|
|
2463
2478
|
lifetime_credits?: number;
|
|
2479
|
+
payment_provider?: string;
|
|
2464
2480
|
pro_activated_at?: string;
|
|
2465
2481
|
starter_activated_at?: string;
|
|
2482
|
+
subscription_source?: string;
|
|
2466
2483
|
subscription_tier?: string;
|
|
2467
2484
|
updated_at?: string;
|
|
2468
2485
|
};
|
|
@@ -2482,7 +2499,10 @@ type HandlersUserLookupResponse = {
|
|
|
2482
2499
|
account?: HandlersUserLookupAccount;
|
|
2483
2500
|
enrollments?: Array<HandlersUserLookupEnrollment>;
|
|
2484
2501
|
portal_account_exists?: boolean;
|
|
2502
|
+
primary_app_id?: number;
|
|
2485
2503
|
privy?: HandlersUserLookupPrivy;
|
|
2504
|
+
subscription?: HandlersSubscriptionStatusResponse;
|
|
2505
|
+
subscription_error?: string;
|
|
2486
2506
|
text_registrations?: Array<HandlersUserLookupTextReg>;
|
|
2487
2507
|
};
|
|
2488
2508
|
type HandlersUserLookupTextReg = {
|
|
@@ -4321,14 +4341,30 @@ type PostApiV1AdminSubscriptionTierErrors = {
|
|
|
4321
4341
|
* Unauthorized
|
|
4322
4342
|
*/
|
|
4323
4343
|
401: ResponseErrorResponse;
|
|
4344
|
+
/**
|
|
4345
|
+
* Payment Required
|
|
4346
|
+
*/
|
|
4347
|
+
402: ResponseErrorResponse;
|
|
4324
4348
|
/**
|
|
4325
4349
|
* Not Found
|
|
4326
4350
|
*/
|
|
4327
4351
|
404: ResponseErrorResponse;
|
|
4352
|
+
/**
|
|
4353
|
+
* Conflict
|
|
4354
|
+
*/
|
|
4355
|
+
409: ResponseErrorResponse;
|
|
4328
4356
|
/**
|
|
4329
4357
|
* Internal Server Error
|
|
4330
4358
|
*/
|
|
4331
4359
|
500: ResponseErrorResponse;
|
|
4360
|
+
/**
|
|
4361
|
+
* Bad Gateway
|
|
4362
|
+
*/
|
|
4363
|
+
502: ResponseErrorResponse;
|
|
4364
|
+
/**
|
|
4365
|
+
* Service Unavailable
|
|
4366
|
+
*/
|
|
4367
|
+
503: ResponseErrorResponse;
|
|
4332
4368
|
};
|
|
4333
4369
|
type PostApiV1AdminSubscriptionTierError = PostApiV1AdminSubscriptionTierErrors[keyof PostApiV1AdminSubscriptionTierErrors];
|
|
4334
4370
|
type PostApiV1AdminSubscriptionTierResponses = {
|
|
@@ -6704,7 +6740,7 @@ declare const postApiV1AdminSeedApps: <ThrowOnError extends boolean = false>(opt
|
|
|
6704
6740
|
/**
|
|
6705
6741
|
* Set user subscription tier
|
|
6706
6742
|
*
|
|
6707
|
-
*
|
|
6743
|
+
* Updates an existing Stripe subscription. Upgrades apply immediately, downgrades and basic-tier cancellations apply at period end. RevenueCat/staking users and users without an active Stripe subscription are rejected. Requires admin API key.
|
|
6708
6744
|
*/
|
|
6709
6745
|
declare const postApiV1AdminSubscriptionTier: <ThrowOnError extends boolean = false>(options: Options<PostApiV1AdminSubscriptionTierData, ThrowOnError>) => RequestResult<PostApiV1AdminSubscriptionTierResponses, PostApiV1AdminSubscriptionTierErrors, ThrowOnError>;
|
|
6710
6746
|
/**
|
|
@@ -5641,7 +5641,7 @@ function createMemoryVaultSearchTool(vaultCtx, embeddingOptions, cache, searchOp
|
|
|
5641
5641
|
legacy.map((r) => ({ id: r.uniqueId, content: r.content, score: r.similarity }))
|
|
5642
5642
|
);
|
|
5643
5643
|
}
|
|
5644
|
-
const { recall: recall2 } = await import("./recall-
|
|
5644
|
+
const { recall: recall2 } = await import("./recall-CCA4VTDK.mjs");
|
|
5645
5645
|
const result = await recall2(
|
|
5646
5646
|
query,
|
|
5647
5647
|
{ vaultCtx, embeddingOptions, vaultCache: cache },
|
package/dist/react/index.cjs
CHANGED
|
@@ -8977,7 +8977,7 @@ var CompletionsStrategy = class {
|
|
|
8977
8977
|
model,
|
|
8978
8978
|
stream,
|
|
8979
8979
|
...temperature !== void 0 && { temperature },
|
|
8980
|
-
...maxOutputTokens !== void 0 && {
|
|
8980
|
+
...maxOutputTokens !== void 0 && { max_completion_tokens: maxOutputTokens },
|
|
8981
8981
|
...tools && { tools },
|
|
8982
8982
|
...toolChoice && { tool_choice: toolChoice },
|
|
8983
8983
|
...portal && { portal }
|
|
@@ -16862,7 +16862,10 @@ ${evidence}`;
|
|
|
16862
16862
|
headers: { ...authHeaders, "Content-Type": "application/json" },
|
|
16863
16863
|
body: JSON.stringify({
|
|
16864
16864
|
model,
|
|
16865
|
-
|
|
16865
|
+
// Modern OpenAI field; the portal reads only `max_completion_tokens`
|
|
16866
|
+
// (the deprecated `max_tokens` is silently ignored → falls back to the
|
|
16867
|
+
// portal's default output cap and truncates the answer).
|
|
16868
|
+
max_completion_tokens: maxTokens,
|
|
16866
16869
|
messages: [
|
|
16867
16870
|
{ role: "system", content: systemPrompt },
|
|
16868
16871
|
{ role: "user", content: userMessage }
|
package/dist/react/index.d.mts
CHANGED
|
@@ -920,6 +920,12 @@ type HandlersCreditBalanceResponse = {
|
|
|
920
920
|
* Total credits ever received (1 credit = $0.01)
|
|
921
921
|
*/
|
|
922
922
|
lifetime_credits: number;
|
|
923
|
+
/**
|
|
924
|
+
* NextResetDate is the next monthly credit refill date (ISO8601), keyed on the
|
|
925
|
+
* credit_expiry_day anchor — the same anchor the monthly claim uses, NOT the grant
|
|
926
|
+
* expires_at (which is anchor+1). Display-only; does not affect reset logic.
|
|
927
|
+
*/
|
|
928
|
+
next_reset_date?: string;
|
|
923
929
|
/**
|
|
924
930
|
* "basic" or "pro"
|
|
925
931
|
*/
|
package/dist/react/index.d.ts
CHANGED
|
@@ -920,6 +920,12 @@ type HandlersCreditBalanceResponse = {
|
|
|
920
920
|
* Total credits ever received (1 credit = $0.01)
|
|
921
921
|
*/
|
|
922
922
|
lifetime_credits: number;
|
|
923
|
+
/**
|
|
924
|
+
* NextResetDate is the next monthly credit refill date (ISO8601), keyed on the
|
|
925
|
+
* credit_expiry_day anchor — the same anchor the monthly claim uses, NOT the grant
|
|
926
|
+
* expires_at (which is anchor+1). Display-only; does not affect reset logic.
|
|
927
|
+
*/
|
|
928
|
+
next_reset_date?: string;
|
|
923
929
|
/**
|
|
924
930
|
* "basic" or "pro"
|
|
925
931
|
*/
|
package/dist/react/index.mjs
CHANGED
|
@@ -149,7 +149,7 @@ import {
|
|
|
149
149
|
updateVaultMemoryOp,
|
|
150
150
|
useEncryption,
|
|
151
151
|
vaultMemoryToStored
|
|
152
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-3LUACMDC.mjs";
|
|
153
153
|
import {
|
|
154
154
|
PiiRedactor,
|
|
155
155
|
createStreamingDeAnonymizer,
|
|
@@ -720,7 +720,7 @@ var CompletionsStrategy = class {
|
|
|
720
720
|
model,
|
|
721
721
|
stream,
|
|
722
722
|
...temperature !== void 0 && { temperature },
|
|
723
|
-
...maxOutputTokens !== void 0 && {
|
|
723
|
+
...maxOutputTokens !== void 0 && { max_completion_tokens: maxOutputTokens },
|
|
724
724
|
...tools && { tools },
|
|
725
725
|
...toolChoice && { tool_choice: toolChoice },
|
|
726
726
|
...portal && { portal }
|
|
@@ -8535,7 +8535,10 @@ ${evidence}`;
|
|
|
8535
8535
|
headers: { ...authHeaders, "Content-Type": "application/json" },
|
|
8536
8536
|
body: JSON.stringify({
|
|
8537
8537
|
model,
|
|
8538
|
-
|
|
8538
|
+
// Modern OpenAI field; the portal reads only `max_completion_tokens`
|
|
8539
|
+
// (the deprecated `max_tokens` is silently ignored → falls back to the
|
|
8540
|
+
// portal's default output cap and truncates the answer).
|
|
8541
|
+
max_completion_tokens: maxTokens,
|
|
8539
8542
|
messages: [
|
|
8540
8543
|
{ role: "system", content: systemPrompt },
|
|
8541
8544
|
{ role: "user", content: userMessage }
|
package/dist/server/index.cjs
CHANGED
|
@@ -28728,7 +28728,10 @@ ${evidence}`;
|
|
|
28728
28728
|
headers: { ...authHeaders, "Content-Type": "application/json" },
|
|
28729
28729
|
body: JSON.stringify({
|
|
28730
28730
|
model,
|
|
28731
|
-
|
|
28731
|
+
// Modern OpenAI field; the portal reads only `max_completion_tokens`
|
|
28732
|
+
// (the deprecated `max_tokens` is silently ignored → falls back to the
|
|
28733
|
+
// portal's default output cap and truncates the answer).
|
|
28734
|
+
max_completion_tokens: maxTokens,
|
|
28732
28735
|
messages: [
|
|
28733
28736
|
{ role: "system", content: systemPrompt },
|
|
28734
28737
|
{ role: "user", content: userMessage }
|
|
@@ -31887,7 +31890,7 @@ var CompletionsStrategy = class {
|
|
|
31887
31890
|
model,
|
|
31888
31891
|
stream,
|
|
31889
31892
|
...temperature !== void 0 && { temperature },
|
|
31890
|
-
...maxOutputTokens !== void 0 && {
|
|
31893
|
+
...maxOutputTokens !== void 0 && { max_completion_tokens: maxOutputTokens },
|
|
31891
31894
|
...tools && { tools },
|
|
31892
31895
|
...toolChoice && { tool_choice: toolChoice },
|
|
31893
31896
|
...portal && { portal }
|
package/dist/server/index.mjs
CHANGED
|
@@ -6623,7 +6623,10 @@ ${evidence}`;
|
|
|
6623
6623
|
headers: { ...authHeaders, "Content-Type": "application/json" },
|
|
6624
6624
|
body: JSON.stringify({
|
|
6625
6625
|
model,
|
|
6626
|
-
|
|
6626
|
+
// Modern OpenAI field; the portal reads only `max_completion_tokens`
|
|
6627
|
+
// (the deprecated `max_tokens` is silently ignored → falls back to the
|
|
6628
|
+
// portal's default output cap and truncates the answer).
|
|
6629
|
+
max_completion_tokens: maxTokens,
|
|
6627
6630
|
messages: [
|
|
6628
6631
|
{ role: "system", content: systemPrompt },
|
|
6629
6632
|
{ role: "user", content: userMessage }
|
|
@@ -9733,7 +9736,7 @@ var CompletionsStrategy = class {
|
|
|
9733
9736
|
model,
|
|
9734
9737
|
stream,
|
|
9735
9738
|
...temperature !== void 0 && { temperature },
|
|
9736
|
-
...maxOutputTokens !== void 0 && {
|
|
9739
|
+
...maxOutputTokens !== void 0 && { max_completion_tokens: maxOutputTokens },
|
|
9737
9740
|
...tools && { tools },
|
|
9738
9741
|
...toolChoice && { tool_choice: toolChoice },
|
|
9739
9742
|
...portal && { portal }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anuma/sdk",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
"homepage": "https://github.com/anuma-ai/sdk#readme",
|
|
156
156
|
"packageManager": "pnpm@10.23.0",
|
|
157
157
|
"dependencies": {
|
|
158
|
-
"@anuma/portal": "1.0.0-next.
|
|
158
|
+
"@anuma/portal": "1.0.0-next.20260724050535",
|
|
159
159
|
"@babel/parser": "^7.29.2",
|
|
160
160
|
"@babel/types": "^7.29.0",
|
|
161
161
|
"ai": "6.0.202",
|