@oxy.so/core 4.5.0 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { type AgentKeyOperation, type AgentKeyOperationProof } from '@oxy.so/contracts';
|
|
21
21
|
import type { User } from '../models/interfaces';
|
|
22
|
-
import type { AccountCategoryId, AccountKind, ChildAccountKind } from '@oxy.so/contracts';
|
|
22
|
+
import type { AccountCategoryId, AccountKind, AvatarCharacter, ChildAccountKind } from '@oxy.so/contracts';
|
|
23
23
|
import type { SessionLoginResponse } from '../models/session';
|
|
24
24
|
import type { OxyContext } from '../client/context';
|
|
25
25
|
/**
|
|
@@ -32,7 +32,7 @@ import type { OxyContext } from '../client/context';
|
|
|
32
32
|
*
|
|
33
33
|
* Single source of truth is `@oxy.so/contracts`.
|
|
34
34
|
*/
|
|
35
|
-
export type { AccountCategoryId, AccountKind } from '@oxy.so/contracts';
|
|
35
|
+
export type { AccountCategoryId, AccountKind, AvatarCharacter } from '@oxy.so/contracts';
|
|
36
36
|
export { ACCOUNT_CATEGORY_IDS, ACCOUNT_KINDS, MAX_ACCOUNT_CATEGORIES, SELECTABLE_ACCOUNT_CATEGORY_IDS, isDelegatedActAsEligibleKind, isOperatorSwitchTargetKind, isSelectableAccountCategoryId, kindAcceptsAccountCategories, } from '@oxy.so/contracts';
|
|
37
37
|
/**
|
|
38
38
|
* The calling user's relationship to an account node, as resolved by the API:
|
|
@@ -209,6 +209,13 @@ export interface CreateAccountInput {
|
|
|
209
209
|
* discoverable at all, rather than discoverable until a second call lands.
|
|
210
210
|
*/
|
|
211
211
|
isPrivateAccount?: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* The 3D avatar character, for `kind: 'bot'` ONLY (any other kind is a 400).
|
|
214
|
+
* Optional: a bot created without one is given a look seeded from its
|
|
215
|
+
* handle, so every bot has a character from birth and its owner changes it
|
|
216
|
+
* afterwards with `accounts.update`.
|
|
217
|
+
*/
|
|
218
|
+
character?: AvatarCharacter;
|
|
212
219
|
}
|
|
213
220
|
/** Input accepted by `accounts.update`. Tree placement changes go through `/move`. */
|
|
214
221
|
export interface UpdateAccountInput {
|
|
@@ -248,6 +255,12 @@ export interface UpdateAccountInput {
|
|
|
248
255
|
* always allowed.
|
|
249
256
|
*/
|
|
250
257
|
accountCategories?: AccountCategoryId[];
|
|
258
|
+
/**
|
|
259
|
+
* Replaces the WHOLE character of a `bot` account. Rejected (400) for any
|
|
260
|
+
* other kind, and not nullable: a bot always has one. Same authorization as
|
|
261
|
+
* every other field here (`account:update`).
|
|
262
|
+
*/
|
|
263
|
+
character?: AvatarCharacter;
|
|
251
264
|
}
|
|
252
265
|
/** Input accepted by `accounts.members.invite`. The owner role cannot be invited. */
|
|
253
266
|
export interface InviteAccountMemberInput {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AccountKind, AccountCategoryId, UserNameResponse, UserRelationship, ThemePreference, OxyNotificationEntityType, OxyNotificationType } from '@oxy.so/contracts';
|
|
1
|
+
import type { AccountKind, AccountCategoryId, AvatarCharacter, UserNameResponse, UserRelationship, ThemePreference, OxyNotificationEntityType, OxyNotificationType } from '@oxy.so/contracts';
|
|
2
2
|
export interface OxyConfig {
|
|
3
3
|
baseURL: string;
|
|
4
4
|
cloudURL?: string;
|
|
@@ -160,7 +160,15 @@ export interface User {
|
|
|
160
160
|
isFederated?: boolean;
|
|
161
161
|
/** Allow sharing this user's content on the fediverse. Defaults to true. */
|
|
162
162
|
fediverseSharing?: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* Derived from `kind === 'bot'` (the SOLE definition), NOT from `type`.
|
|
165
|
+
*/
|
|
163
166
|
isAgent?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* The 3D avatar character of a `kind: 'bot'` account, drawn by Bloom's
|
|
169
|
+
* `Avatar`. Present ONLY on a bot; absent for every other kind.
|
|
170
|
+
*/
|
|
171
|
+
character?: AvatarCharacter;
|
|
164
172
|
isAutomated?: boolean;
|
|
165
173
|
instance?: string;
|
|
166
174
|
federation?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "OxyHQ SDK Foundation — API client, authentication, cryptographic identity, and shared utilities",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
"@oxy.so/telemetry": "^1.2.0",
|
|
180
180
|
"@noble/ciphers": "^1.3.0",
|
|
181
181
|
"@noble/hashes": "^1.8.0",
|
|
182
|
-
"@oxy.so/contracts": "4.
|
|
182
|
+
"@oxy.so/contracts": "4.13.0",
|
|
183
183
|
"@oxy.so/protocol": "^1.2.2",
|
|
184
184
|
"@scure/bip39": "^1.6.0",
|
|
185
185
|
"buffer": "^6.0.3",
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
"@types/invariant": "^2.2.34",
|
|
218
218
|
"@types/node": "^20.19.43",
|
|
219
219
|
"expo-crypto": "~56.0.3",
|
|
220
|
-
"expo-secure-store": "~
|
|
220
|
+
"expo-secure-store": "~57.0.4",
|
|
221
221
|
"express": "^4.22.2",
|
|
222
222
|
"express-rate-limit": "^8.6.0",
|
|
223
223
|
"jest": "^30.5.1",
|
package/src/api/accounts.ts
CHANGED
|
@@ -27,7 +27,12 @@ import {
|
|
|
27
27
|
type AgentKeyOperationProof,
|
|
28
28
|
} from '@oxy.so/contracts';
|
|
29
29
|
import type { User } from '../models/interfaces';
|
|
30
|
-
import type {
|
|
30
|
+
import type {
|
|
31
|
+
AccountCategoryId,
|
|
32
|
+
AccountKind,
|
|
33
|
+
AvatarCharacter,
|
|
34
|
+
ChildAccountKind,
|
|
35
|
+
} from '@oxy.so/contracts';
|
|
31
36
|
import type { SessionLoginResponse } from '../models/session';
|
|
32
37
|
import type { OxyContext } from '../client/context';
|
|
33
38
|
import { normalizeUserIdentity } from '../utils/userIdentity';
|
|
@@ -57,7 +62,7 @@ const enc = encodeURIComponent;
|
|
|
57
62
|
*
|
|
58
63
|
* Single source of truth is `@oxy.so/contracts`.
|
|
59
64
|
*/
|
|
60
|
-
export type { AccountCategoryId, AccountKind } from '@oxy.so/contracts';
|
|
65
|
+
export type { AccountCategoryId, AccountKind, AvatarCharacter } from '@oxy.so/contracts';
|
|
61
66
|
export {
|
|
62
67
|
ACCOUNT_CATEGORY_IDS,
|
|
63
68
|
ACCOUNT_KINDS,
|
|
@@ -247,6 +252,13 @@ export interface CreateAccountInput {
|
|
|
247
252
|
* discoverable at all, rather than discoverable until a second call lands.
|
|
248
253
|
*/
|
|
249
254
|
isPrivateAccount?: boolean;
|
|
255
|
+
/**
|
|
256
|
+
* The 3D avatar character, for `kind: 'bot'` ONLY (any other kind is a 400).
|
|
257
|
+
* Optional: a bot created without one is given a look seeded from its
|
|
258
|
+
* handle, so every bot has a character from birth and its owner changes it
|
|
259
|
+
* afterwards with `accounts.update`.
|
|
260
|
+
*/
|
|
261
|
+
character?: AvatarCharacter;
|
|
250
262
|
}
|
|
251
263
|
|
|
252
264
|
/** Input accepted by `accounts.update`. Tree placement changes go through `/move`. */
|
|
@@ -283,6 +295,12 @@ export interface UpdateAccountInput {
|
|
|
283
295
|
* always allowed.
|
|
284
296
|
*/
|
|
285
297
|
accountCategories?: AccountCategoryId[];
|
|
298
|
+
/**
|
|
299
|
+
* Replaces the WHOLE character of a `bot` account. Rejected (400) for any
|
|
300
|
+
* other kind, and not nullable: a bot always has one. Same authorization as
|
|
301
|
+
* every other field here (`account:update`).
|
|
302
|
+
*/
|
|
303
|
+
character?: AvatarCharacter;
|
|
286
304
|
}
|
|
287
305
|
|
|
288
306
|
/** Input accepted by `accounts.members.invite`. The owner role cannot be invited. */
|
package/src/models/interfaces.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
AccountKind,
|
|
3
3
|
AccountCategoryId,
|
|
4
|
+
AvatarCharacter,
|
|
4
5
|
UserNameResponse,
|
|
5
6
|
UserRelationship,
|
|
6
7
|
ThemePreference,
|
|
@@ -180,7 +181,15 @@ export interface User {
|
|
|
180
181
|
isFederated?: boolean;
|
|
181
182
|
/** Allow sharing this user's content on the fediverse. Defaults to true. */
|
|
182
183
|
fediverseSharing?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Derived from `kind === 'bot'` (the SOLE definition), NOT from `type`.
|
|
186
|
+
*/
|
|
183
187
|
isAgent?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* The 3D avatar character of a `kind: 'bot'` account, drawn by Bloom's
|
|
190
|
+
* `Avatar`. Present ONLY on a bot; absent for every other kind.
|
|
191
|
+
*/
|
|
192
|
+
character?: AvatarCharacter;
|
|
184
193
|
isAutomated?: boolean;
|
|
185
194
|
instance?: string;
|
|
186
195
|
federation?: {
|