@oxyhq/core 1.9.0 → 1.11.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.
@@ -14,6 +14,12 @@ export declare function OxyServicesUserMixin<T extends typeof OxyServicesBase>(B
14
14
  * Search user profiles
15
15
  */
16
16
  searchProfiles(query: string, pagination?: PaginationParams): Promise<SearchProfilesResponse>;
17
+ /**
18
+ * Resolve a fediverse handle to an Oxy user profile.
19
+ * Performs WebFinger discovery and returns the user, or null if not found.
20
+ * @param handle - Fediverse handle (e.g. "@user@mastodon.social" or "user@domain")
21
+ */
22
+ resolveProfile(handle: string): Promise<User | null>;
17
23
  /**
18
24
  * Get profile recommendations
19
25
  */
@@ -27,12 +33,17 @@ export declare function OxyServicesUserMixin<T extends typeof OxyServicesBase>(B
27
33
  };
28
34
  description?: string;
29
35
  isFederated?: boolean;
36
+ isAgent?: boolean;
37
+ isAutomated?: boolean;
30
38
  instance?: string;
31
39
  federation?: {
32
40
  actorUri?: string;
33
41
  domain?: string;
34
42
  actorId?: string;
35
43
  };
44
+ automation?: {
45
+ ownerId?: string;
46
+ };
36
47
  _count?: {
37
48
  followers: number;
38
49
  following: number;
@@ -51,14 +51,19 @@ export interface User {
51
51
  following?: number;
52
52
  };
53
53
  accountExpiresAfterInactivityDays?: number | null;
54
- type?: 'local' | 'federated';
54
+ type?: 'local' | 'federated' | 'agent' | 'automated';
55
55
  isFederated?: boolean;
56
+ isAgent?: boolean;
57
+ isAutomated?: boolean;
56
58
  instance?: string;
57
59
  federation?: {
58
60
  actorUri?: string;
59
61
  domain?: string;
60
62
  actorId?: string;
61
63
  };
64
+ automation?: {
65
+ ownerId?: string;
66
+ };
62
67
  [key: string]: unknown;
63
68
  }
64
69
  export interface LoginResponse {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyhq/core",
3
- "version": "1.9.0",
3
+ "version": "1.11.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",
@@ -85,6 +85,25 @@ export function OxyServicesUserMixin<T extends typeof OxyServicesBase>(Base: T)
85
85
  }
86
86
  }
87
87
 
88
+ /**
89
+ * Resolve a fediverse handle to an Oxy user profile.
90
+ * Performs WebFinger discovery and returns the user, or null if not found.
91
+ * @param handle - Fediverse handle (e.g. "@user@mastodon.social" or "user@domain")
92
+ */
93
+ async resolveProfile(handle: string): Promise<User | null> {
94
+ try {
95
+ const result = await this.makeRequest<{ data: User | null }>('GET', '/profiles/resolve', {
96
+ handle,
97
+ }, {
98
+ cache: true,
99
+ cacheTTL: 24 * 60 * 60 * 1000, // 24h cache — matches server-side staleness window
100
+ });
101
+ return result.data ?? null;
102
+ } catch {
103
+ return null;
104
+ }
105
+ }
106
+
88
107
  /**
89
108
  * Get profile recommendations
90
109
  */
@@ -94,8 +113,11 @@ export function OxyServicesUserMixin<T extends typeof OxyServicesBase>(Base: T)
94
113
  name?: { first?: string; last?: string; full?: string };
95
114
  description?: string;
96
115
  isFederated?: boolean;
116
+ isAgent?: boolean;
117
+ isAutomated?: boolean;
97
118
  instance?: string;
98
119
  federation?: { actorUri?: string; domain?: string; actorId?: string };
120
+ automation?: { ownerId?: string };
99
121
  _count?: { followers: number; following: number };
100
122
  [key: string]: unknown;
101
123
  }>> {
@@ -60,15 +60,20 @@ export interface User {
60
60
  following?: number;
61
61
  };
62
62
  accountExpiresAfterInactivityDays?: number | null; // Days of inactivity before account expires (null = never expire)
63
- // Fediverse / ActivityPub support
64
- type?: 'local' | 'federated';
63
+ // User type and external account support
64
+ type?: 'local' | 'federated' | 'agent' | 'automated';
65
65
  isFederated?: boolean;
66
+ isAgent?: boolean;
67
+ isAutomated?: boolean;
66
68
  instance?: string;
67
69
  federation?: {
68
70
  actorUri?: string;
69
71
  domain?: string;
70
72
  actorId?: string;
71
73
  };
74
+ automation?: {
75
+ ownerId?: string;
76
+ };
72
77
  [key: string]: unknown;
73
78
  }
74
79