@oxyhq/core 2.4.1 → 3.1.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.
@@ -82,7 +82,7 @@ import { composeOxyServices } from './mixins';
82
82
  * - **Payment**: Payment processing
83
83
  * - **Karma**: Karma system
84
84
  * - **Assets**: File upload and asset management
85
- * - **Developer**: Developer API management
85
+ * - **Applications**: Application, membership, and credential management
86
86
  * - **Location**: Location-based features
87
87
  * - **Analytics**: Analytics tracking
88
88
  * - **Devices**: Device management
@@ -33,6 +33,7 @@ export type { ServiceApp, ServiceActingAsVerification } from './mixins/OxyServic
33
33
  export type { CreateManagedAccountInput, ManagedAccountManager, ManagedAccount, } from './mixins/OxyServices.managedAccounts';
34
34
  export type { ContactDiscoveryMatch, ContactDiscoveryResponse, } from './mixins/OxyServices.contacts';
35
35
  export { OxyAppDataIdentifierError } from './mixins/OxyServices.appData';
36
+ export type { Application, ApplicationMember, ApplicationCredential, ApplicationRole, ApplicationType, ApplicationStatus, ApplicationMemberStatus, ApplicationCredentialType, ApplicationCredentialStatus, ApplicationEnvironment, CreateApplicationInput, UpdateApplicationInput, InviteApplicationMemberInput, UpdateApplicationMemberInput, TransferApplicationOwnershipInput, CreateApplicationCredentialInput, ApplicationCredentialWithSecret, RotateApplicationCredentialResult, ApplicationUsagePeriod, ApplicationUsageSummary, ApplicationUsageByDay, ApplicationUsageByEndpoint, ApplicationUsageStats, ApplicationSuccessResult, } from './mixins/OxyServices.applications';
36
37
  export { SessionSyncRequiredError, AuthenticationFailedError, ensureValidToken, isAuthenticationError, withAuthErrorHandling, authenticatedApiCall, } from './utils/authHelpers';
37
38
  export type { HandleApiErrorOptions } from './utils/authHelpers';
38
39
  export { mergeSessions, normalizeAndSortSessions, sessionsArraysEqual, } from './utils/sessionUtils';
@@ -0,0 +1,341 @@
1
+ /**
2
+ * Applications Methods Mixin
3
+ *
4
+ * Provides methods for managing Oxy applications, their members, and their
5
+ * credentials via the `/applications` API. An application is a multi-user
6
+ * entity: membership (with a role) grants permissions; credentials
7
+ * (public/confidential/service) carry OAuth client identifiers and the
8
+ * service-token API key material.
9
+ *
10
+ * Reference applications by their Mongo `_id` (`applicationId`) and credentials
11
+ * by their `credentialId`. Never by name.
12
+ */
13
+ import type { OxyServicesBase } from '../OxyServices.base';
14
+ /**
15
+ * Application classification. Set only by Oxy platform staff — never editable
16
+ * through the normal member-facing update path.
17
+ */
18
+ export type ApplicationType = 'first_party' | 'third_party' | 'internal' | 'system';
19
+ /** Lifecycle status of an application. */
20
+ export type ApplicationStatus = 'active' | 'suspended' | 'deleted' | 'pending_review';
21
+ /** Role a member holds within an application. */
22
+ export type ApplicationRole = 'owner' | 'admin' | 'developer' | 'viewer' | 'billing';
23
+ /** Membership lifecycle status. */
24
+ export type ApplicationMemberStatus = 'active' | 'invited' | 'removed';
25
+ /** Credential kind. `service` credentials mint service tokens. */
26
+ export type ApplicationCredentialType = 'public' | 'confidential' | 'service';
27
+ /** Deployment environment a credential is scoped to. */
28
+ export type ApplicationEnvironment = 'development' | 'staging' | 'production';
29
+ /** Credential lifecycle status. */
30
+ export type ApplicationCredentialStatus = 'active' | 'deprecated' | 'revoked';
31
+ /**
32
+ * Client-facing Application shape returned by the `/applications` API.
33
+ * Mirrors the server `Application` model with `_id` as a string and dates
34
+ * serialized to ISO strings.
35
+ */
36
+ export interface Application {
37
+ _id: string;
38
+ name: string;
39
+ description?: string;
40
+ websiteUrl?: string;
41
+ icon?: string;
42
+ type: ApplicationType;
43
+ status: ApplicationStatus;
44
+ isOfficial: boolean;
45
+ isInternal: boolean;
46
+ capabilities: string[];
47
+ redirectUris: string[];
48
+ scopes: string[];
49
+ webhookUrl?: string;
50
+ devWebhookUrl?: string;
51
+ createdByUserId: string;
52
+ createdAt: string;
53
+ updatedAt: string;
54
+ /**
55
+ * The calling user's own membership in this application, embedded by the API
56
+ * on list (`GET /applications`) and detail (`GET /applications/:appId`)
57
+ * responses. Use `callerMembership.permissions` to gate UI affordances.
58
+ */
59
+ callerMembership?: ApplicationMember;
60
+ }
61
+ /**
62
+ * Client-facing ApplicationMember shape. `permissions` is derived from `role`
63
+ * on the server at write time.
64
+ */
65
+ export interface ApplicationMember {
66
+ _id: string;
67
+ applicationId: string;
68
+ userId: string;
69
+ role: ApplicationRole;
70
+ permissions: string[];
71
+ invitedByUserId?: string;
72
+ joinedAt?: string;
73
+ status: ApplicationMemberStatus;
74
+ createdAt: string;
75
+ updatedAt: string;
76
+ }
77
+ /**
78
+ * Client-facing ApplicationCredential shape. The raw secret is NEVER part of
79
+ * this shape — it is returned exactly once, separately, at creation/rotation.
80
+ */
81
+ export interface ApplicationCredential {
82
+ _id: string;
83
+ applicationId: string;
84
+ name: string;
85
+ publicKey: string;
86
+ type: ApplicationCredentialType;
87
+ environment: ApplicationEnvironment;
88
+ scopes: string[];
89
+ status: ApplicationCredentialStatus;
90
+ lastUsedAt?: string;
91
+ expiresAt?: string;
92
+ /**
93
+ * Audit link to the credential this one was rotated FROM. Populated by the
94
+ * API on credentials created via rotation; absent on original credentials.
95
+ */
96
+ rotatedFromCredentialId?: string;
97
+ createdByUserId: string;
98
+ createdAt: string;
99
+ updatedAt: string;
100
+ }
101
+ /** Input accepted by `createApplication`. Staff-only fields are not settable here. */
102
+ export interface CreateApplicationInput {
103
+ name: string;
104
+ description?: string;
105
+ websiteUrl?: string;
106
+ icon?: string;
107
+ redirectUris?: string[];
108
+ scopes?: string[];
109
+ }
110
+ /** Input accepted by `updateApplication`. Staff-only fields are not settable here. */
111
+ export interface UpdateApplicationInput {
112
+ name?: string;
113
+ description?: string;
114
+ websiteUrl?: string;
115
+ icon?: string;
116
+ redirectUris?: string[];
117
+ scopes?: string[];
118
+ webhookUrl?: string;
119
+ devWebhookUrl?: string;
120
+ status?: ApplicationStatus;
121
+ }
122
+ /** Input accepted by `inviteApplicationMember`. The owner role cannot be invited. */
123
+ export interface InviteApplicationMemberInput {
124
+ userId: string;
125
+ role: Exclude<ApplicationRole, 'owner'>;
126
+ }
127
+ /** Input accepted by `updateApplicationMember`. */
128
+ export interface UpdateApplicationMemberInput {
129
+ role: ApplicationRole;
130
+ }
131
+ /** Input accepted by `transferApplicationOwnership`. */
132
+ export interface TransferApplicationOwnershipInput {
133
+ userId: string;
134
+ }
135
+ /** Input accepted by `createApplicationCredential`. */
136
+ export interface CreateApplicationCredentialInput {
137
+ name: string;
138
+ type: ApplicationCredentialType;
139
+ environment: ApplicationEnvironment;
140
+ scopes?: string[];
141
+ }
142
+ /** Result of creating a credential — `secret` is returned ONCE. */
143
+ export interface ApplicationCredentialWithSecret {
144
+ credential: ApplicationCredential;
145
+ secret: string;
146
+ }
147
+ /**
148
+ * Result of rotating a credential. Extends the create result with audit fields:
149
+ * the new plaintext `secret` is returned ONCE, plus `rotatedFrom` (the previous
150
+ * credential's `credentialId`) and `graceExpiresAt` (ISO string marking when the
151
+ * old credential stops being honoured during the rotation grace window).
152
+ */
153
+ export interface RotateApplicationCredentialResult extends ApplicationCredentialWithSecret {
154
+ /** The previous credential's `credentialId` that this rotation supersedes. */
155
+ rotatedFrom: string;
156
+ /** ISO timestamp at which the rotated-from credential's grace window ends. */
157
+ graceExpiresAt: string;
158
+ }
159
+ /** Time window for application usage statistics. */
160
+ export type ApplicationUsagePeriod = '24h' | '7d' | '30d' | '90d';
161
+ /** Aggregate totals for an application over the requested period. */
162
+ export interface ApplicationUsageSummary {
163
+ totalRequests: number;
164
+ totalTokens: number;
165
+ totalCredits: number;
166
+ avgResponseTime: number;
167
+ successfulRequests: number;
168
+ errorRequests: number;
169
+ }
170
+ /** Per-day usage bucket. `_id` is the day key (e.g. `YYYY-MM-DD`). */
171
+ export interface ApplicationUsageByDay {
172
+ _id: string;
173
+ requests: number;
174
+ tokens: number;
175
+ credits: number;
176
+ }
177
+ /** Per-endpoint usage bucket. `_id` is the endpoint identifier. */
178
+ export interface ApplicationUsageByEndpoint {
179
+ _id: string;
180
+ requests: number;
181
+ tokens: number;
182
+ }
183
+ /** Usage statistics for an application over a period. */
184
+ export interface ApplicationUsageStats {
185
+ summary: ApplicationUsageSummary;
186
+ byDay: ApplicationUsageByDay[];
187
+ byEndpoint: ApplicationUsageByEndpoint[];
188
+ }
189
+ /** Result of a delete/remove/revoke/transfer operation. */
190
+ export interface ApplicationSuccessResult {
191
+ success: boolean;
192
+ }
193
+ export declare function OxyServicesApplicationsMixin<T extends typeof OxyServicesBase>(Base: T): {
194
+ new (...args: any[]): {
195
+ /**
196
+ * List applications the current user is an active member of.
197
+ */
198
+ getApplications(): Promise<Application[]>;
199
+ /**
200
+ * Create a new application. The caller becomes its `owner`.
201
+ * @param data - Application configuration. Staff-only fields are ignored.
202
+ */
203
+ createApplication(data: CreateApplicationInput): Promise<Application>;
204
+ /**
205
+ * Fetch a single application by id.
206
+ * @param applicationId - The application's Mongo `_id`.
207
+ */
208
+ getApplication(applicationId: string): Promise<Application>;
209
+ /**
210
+ * Update an application's mutable fields.
211
+ * @param applicationId - The application's Mongo `_id`.
212
+ * @param data - Subset of updatable fields. Staff-only fields are ignored.
213
+ */
214
+ updateApplication(applicationId: string, data: UpdateApplicationInput): Promise<Application>;
215
+ /**
216
+ * Soft-delete an application (owner only).
217
+ * @param applicationId - The application's Mongo `_id`.
218
+ */
219
+ deleteApplication(applicationId: string): Promise<ApplicationSuccessResult>;
220
+ /**
221
+ * List members of an application.
222
+ * @param applicationId - The application's Mongo `_id`.
223
+ */
224
+ getApplicationMembers(applicationId: string): Promise<ApplicationMember[]>;
225
+ /**
226
+ * Add a member to an application.
227
+ * @param applicationId - The application's Mongo `_id`.
228
+ * @param data - Target user id and role (never `owner`).
229
+ */
230
+ inviteApplicationMember(applicationId: string, data: InviteApplicationMemberInput): Promise<ApplicationMember>;
231
+ /**
232
+ * Change a member's role.
233
+ * @param applicationId - The application's Mongo `_id`.
234
+ * @param memberId - The member's Mongo `_id`.
235
+ * @param data - New role.
236
+ */
237
+ updateApplicationMember(applicationId: string, memberId: string, data: UpdateApplicationMemberInput): Promise<ApplicationMember>;
238
+ /**
239
+ * Remove a member from an application.
240
+ * @param applicationId - The application's Mongo `_id`.
241
+ * @param memberId - The member's Mongo `_id`.
242
+ */
243
+ removeApplicationMember(applicationId: string, memberId: string): Promise<ApplicationSuccessResult>;
244
+ /**
245
+ * Transfer ownership of an application to another member (owner only).
246
+ * Demotes the current owner to `admin` and promotes the target to `owner`.
247
+ * @param applicationId - The application's Mongo `_id`.
248
+ * @param data - Target user id.
249
+ */
250
+ transferApplicationOwnership(applicationId: string, data: TransferApplicationOwnershipInput): Promise<ApplicationSuccessResult>;
251
+ /**
252
+ * List an application's credentials. The response NEVER includes secrets.
253
+ * @param applicationId - The application's Mongo `_id`.
254
+ */
255
+ getApplicationCredentials(applicationId: string): Promise<ApplicationCredential[]>;
256
+ /**
257
+ * Create a credential. The plaintext `secret` is returned exactly ONCE;
258
+ * the server stores only a hash and will never return it again.
259
+ * @param applicationId - The application's Mongo `_id`.
260
+ * @param data - Credential configuration.
261
+ */
262
+ createApplicationCredential(applicationId: string, data: CreateApplicationCredentialInput): Promise<ApplicationCredentialWithSecret>;
263
+ /**
264
+ * Rotate a credential's secret. The new plaintext `secret` is returned
265
+ * exactly ONCE, along with audit fields: `rotatedFrom` (the previous
266
+ * credentialId) and `graceExpiresAt` (ISO string for the grace window during
267
+ * which the old credential is still honoured).
268
+ * @param applicationId - The application's Mongo `_id`.
269
+ * @param credentialId - The credential's Mongo `_id`.
270
+ */
271
+ rotateApplicationCredential(applicationId: string, credentialId: string): Promise<RotateApplicationCredentialResult>;
272
+ /**
273
+ * Revoke a credential (`status='revoked'`). Revoked credentials can no
274
+ * longer authenticate.
275
+ * @param applicationId - The application's Mongo `_id`.
276
+ * @param credentialId - The credential's Mongo `_id`.
277
+ */
278
+ revokeApplicationCredential(applicationId: string, credentialId: string): Promise<ApplicationSuccessResult>;
279
+ /**
280
+ * Fetch usage statistics for an application.
281
+ * @param applicationId - The application's Mongo `_id`.
282
+ * @param period - Time window (defaults to the server default).
283
+ */
284
+ getApplicationUsage(applicationId: string, period?: ApplicationUsagePeriod): Promise<ApplicationUsageStats>;
285
+ httpService: import("../HttpService").HttpService;
286
+ cloudURL: string;
287
+ config: import("../OxyServices.base").OxyConfig;
288
+ __resetTokensForTests(): void;
289
+ makeRequest<T_1>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T_1>;
290
+ getBaseURL(): string;
291
+ getSessionBaseUrl(): string;
292
+ getClient(): import("../HttpService").HttpService;
293
+ getMetrics(): {
294
+ totalRequests: number;
295
+ successfulRequests: number;
296
+ failedRequests: number;
297
+ cacheHits: number;
298
+ cacheMisses: number;
299
+ averageResponseTime: number;
300
+ };
301
+ clearCache(): void;
302
+ clearCacheEntry(key: string): void;
303
+ clearCacheByPrefix(prefix: string): number;
304
+ getCacheStats(): {
305
+ size: number;
306
+ hits: number;
307
+ misses: number;
308
+ hitRate: number;
309
+ };
310
+ getCloudURL(): string;
311
+ setTokens(accessToken: string, refreshToken?: string): void;
312
+ clearTokens(): void;
313
+ onTokensChanged(listener: (accessToken: string | null) => void): () => void;
314
+ _cachedUserId: string | null | undefined;
315
+ _cachedAccessToken: string | null;
316
+ getCurrentUserId(): string | null;
317
+ hasValidToken(): boolean;
318
+ getAccessToken(): string | null;
319
+ setActingAs(userId: string | null): void;
320
+ getActingAs(): string | null;
321
+ waitForAuth(timeoutMs?: number): Promise<boolean>;
322
+ withAuthRetry<T_1>(operation: () => Promise<T_1>, operationName: string, options?: {
323
+ maxRetries?: number;
324
+ retryDelay?: number;
325
+ authTimeoutMs?: number;
326
+ }): Promise<T_1>;
327
+ validate(): Promise<boolean>;
328
+ handleError(error: unknown): Error;
329
+ healthCheck(): Promise<{
330
+ status: string;
331
+ users?: number;
332
+ timestamp? /**
333
+ * Create a credential. The plaintext `secret` is returned exactly ONCE;
334
+ * the server stores only a hash and will never return it again.
335
+ * @param applicationId - The application's Mongo `_id`.
336
+ * @param data - Credential configuration.
337
+ */: string;
338
+ [key: string]: any;
339
+ }>;
340
+ };
341
+ } & T;
@@ -127,8 +127,8 @@ export declare function OxyServicesAuthMixin<T extends typeof OxyServicesBase>(B
127
127
  * legitimate multi-tenant hosts that need to switch credentials cannot leak
128
128
  * one tenant's token to another tenant on the same instance.
129
129
  *
130
- * @param apiKey - DeveloperApp API key (oxy_dk_*)
131
- * @param apiSecret - DeveloperApp API secret
130
+ * @param apiKey - Application credential public key (oxy_dk_*)
131
+ * @param apiSecret - Application credential secret
132
132
  */
133
133
  configureServiceAuth(apiKey: string, apiSecret: string): void;
134
134
  /**
@@ -147,8 +147,8 @@ export declare function OxyServicesAuthMixin<T extends typeof OxyServicesBase>(B
147
147
  * This prevents an attacker who learned a peer's apiKey from extracting
148
148
  * their service token by polling with a wrong secret.
149
149
  *
150
- * @param apiKey - DeveloperApp API key (optional if configureServiceAuth was called)
151
- * @param apiSecret - DeveloperApp API secret (optional if configureServiceAuth was called)
150
+ * @param apiKey - Application credential public key (optional if configureServiceAuth was called)
151
+ * @param apiSecret - Application credential secret (optional if configureServiceAuth was called)
152
152
  */
153
153
  getServiceToken(apiKey?: string, apiSecret?: string): Promise<string>;
154
154
  /**
@@ -27,13 +27,20 @@ export interface ServiceActingAsVerification {
27
27
  /**
28
28
  * Service app metadata attached to requests authenticated with service tokens.
29
29
  * `scopes` reflects the scopes granted to the app at signup time (from the
30
- * `DeveloperApp.scopes` field); route-level checks can require additional
30
+ * `Application.scopes` field); route-level checks can require additional
31
31
  * scope-narrowing via `requireScope()`.
32
32
  */
33
33
  export interface ServiceApp {
34
34
  appId: string;
35
35
  appName: string;
36
36
  scopes: string[];
37
+ /**
38
+ * The credentialId of the specific service credential that minted this token.
39
+ * Carried by newer service-token JWTs alongside `appId`; absent on tokens
40
+ * issued before credential-level audit linking. Use for per-credential audit
41
+ * trails and rotation alignment (GitHub #215).
42
+ */
43
+ credentialId?: string;
37
44
  }
38
45
  /**
39
46
  * Options for oxyClient.auth() middleware
@@ -16,7 +16,7 @@ import { OxyServicesLanguageMixin } from './OxyServices.language';
16
16
  import { OxyServicesPaymentMixin } from './OxyServices.payment';
17
17
  import { OxyServicesKarmaMixin } from './OxyServices.karma';
18
18
  import { OxyServicesAssetsMixin } from './OxyServices.assets';
19
- import { OxyServicesDeveloperMixin } from './OxyServices.developer';
19
+ import { OxyServicesApplicationsMixin } from './OxyServices.applications';
20
20
  import { OxyServicesLocationMixin } from './OxyServices.location';
21
21
  import { OxyServicesAnalyticsMixin } from './OxyServices.analytics';
22
22
  import { OxyServicesDevicesMixin } from './OxyServices.devices';
@@ -36,7 +36,7 @@ import { OxyServicesAppDataMixin } from './OxyServices.appData';
36
36
  * If you add a new mixin to `MIXIN_PIPELINE`, add it here too so its methods
37
37
  * are visible without a cast.
38
38
  */
39
- type AllMixinInstances = InstanceType<ReturnType<typeof OxyServicesAuthMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesFedCMMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesPopupAuthMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesRedirectAuthMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesSsoMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesUserMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesPrivacyMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesLanguageMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesPaymentMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesKarmaMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesAssetsMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesDeveloperMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesLocationMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesAnalyticsMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesDevicesMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesSecurityMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesFeaturesMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesTopicsMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesManagedAccountsMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesContactsMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesAppDataMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesUtilityMixin<typeof OxyServicesBase>>>;
39
+ type AllMixinInstances = InstanceType<ReturnType<typeof OxyServicesAuthMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesFedCMMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesPopupAuthMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesRedirectAuthMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesSsoMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesUserMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesPrivacyMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesLanguageMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesPaymentMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesKarmaMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesAssetsMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesApplicationsMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesLocationMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesAnalyticsMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesDevicesMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesSecurityMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesFeaturesMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesTopicsMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesManagedAccountsMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesContactsMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesAppDataMixin<typeof OxyServicesBase>>> & InstanceType<ReturnType<typeof OxyServicesUtilityMixin<typeof OxyServicesBase>>>;
40
40
  /**
41
41
  * Constructor type for the fully composed mixin pipeline. Each mixin returns
42
42
  * a new constructor that augments its input; reducing across the pipeline
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyhq/core",
3
- "version": "2.4.1",
3
+ "version": "3.1.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,7 +85,7 @@ import { composeOxyServices } from './mixins';
85
85
  * - **Payment**: Payment processing
86
86
  * - **Karma**: Karma system
87
87
  * - **Assets**: File upload and asset management
88
- * - **Developer**: Developer API management
88
+ * - **Applications**: Application, membership, and credential management
89
89
  * - **Location**: Location-based features
90
90
  * - **Analytics**: Analytics tracking
91
91
  * - **Devices**: Device management
package/src/index.ts CHANGED
@@ -62,6 +62,36 @@ export type {
62
62
  } from './mixins/OxyServices.contacts';
63
63
  export { OxyAppDataIdentifierError } from './mixins/OxyServices.appData';
64
64
 
65
+ // ---------------------------------------------------------------------------
66
+ // Applications (multi-user apps: membership, roles, credentials)
67
+ // ---------------------------------------------------------------------------
68
+ export type {
69
+ Application,
70
+ ApplicationMember,
71
+ ApplicationCredential,
72
+ ApplicationRole,
73
+ ApplicationType,
74
+ ApplicationStatus,
75
+ ApplicationMemberStatus,
76
+ ApplicationCredentialType,
77
+ ApplicationCredentialStatus,
78
+ ApplicationEnvironment,
79
+ CreateApplicationInput,
80
+ UpdateApplicationInput,
81
+ InviteApplicationMemberInput,
82
+ UpdateApplicationMemberInput,
83
+ TransferApplicationOwnershipInput,
84
+ CreateApplicationCredentialInput,
85
+ ApplicationCredentialWithSecret,
86
+ RotateApplicationCredentialResult,
87
+ ApplicationUsagePeriod,
88
+ ApplicationUsageSummary,
89
+ ApplicationUsageByDay,
90
+ ApplicationUsageByEndpoint,
91
+ ApplicationUsageStats,
92
+ ApplicationSuccessResult,
93
+ } from './mixins/OxyServices.applications';
94
+
65
95
  // ---------------------------------------------------------------------------
66
96
  // Auth helpers (token refresh, error normalisation, retry policies)
67
97
  // ---------------------------------------------------------------------------