@newgameplusinc/odyssey-organization-sdk 1.0.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.
package/README.md ADDED
File without changes
@@ -0,0 +1,341 @@
1
+ /**
2
+ * Shared primitive types and SDK config used across all modules.
3
+ */
4
+ type OrganizationSDKConfig = {
5
+ apiKey: string;
6
+ timeout?: number;
7
+ };
8
+ type PaginationQuery = {
9
+ page?: number;
10
+ limit?: number;
11
+ };
12
+ type PaginationMeta = {
13
+ total: number;
14
+ page: number;
15
+ limit: number;
16
+ totalPages: number;
17
+ };
18
+ type InviteStatus = "PENDING" | "ACCEPTED" | "REJECTED" | "EXPIRES";
19
+ type InviteType = "EMAIL" | "LINK";
20
+ type OdysseyMobileControls = "ON" | "OFF" | "JOYSTICK_ONLY";
21
+ type AvatarType = "STANDARD" | "AEC";
22
+ type AvatarControlSystem = "EVENT_MODE" | "GAME_MODE" | "FLIGHT_MODE";
23
+ type HealthResponse = {
24
+ status: string;
25
+ timestamp: string;
26
+ };
27
+ type RedisHealthResponse = {
28
+ status: string;
29
+ latencyMs?: number;
30
+ };
31
+
32
+ type Organization = {
33
+ id: string;
34
+ name: string;
35
+ domain: string;
36
+ logoSmallUrl: string | null;
37
+ createdAt: string;
38
+ updatedAt: string;
39
+ };
40
+ type OrganizationUser = {
41
+ id: string;
42
+ orgId: string;
43
+ email: string;
44
+ roleId: string;
45
+ avatarReadyPlayerMeImg: string | null;
46
+ createdAt: string;
47
+ updatedAt: string;
48
+ organization?: Organization;
49
+ };
50
+ type OrganizationConfiguration = {
51
+ id: string;
52
+ orgId: string;
53
+ unrealImageId: string;
54
+ unrealImageRepo: string;
55
+ workloadClusterProvider: string;
56
+ createdAt: string;
57
+ updatedAt: string;
58
+ organization?: Organization;
59
+ };
60
+ type CreateOrganizationInput = {
61
+ name: string;
62
+ };
63
+ type UpdateOrganizationInput = {
64
+ name?: string | null;
65
+ domain?: string | null;
66
+ logoSmallUrl?: string | null;
67
+ };
68
+ type OrganizationListResult = {
69
+ data: Organization[];
70
+ meta: PaginationMeta;
71
+ };
72
+
73
+ type OrganizationByUserResult = {
74
+ organization: Organization;
75
+ };
76
+ type UpdateOrganizationUserInput = {
77
+ roleId?: string;
78
+ avatarReadyPlayerMeImg?: string;
79
+ };
80
+
81
+ type OrganizationInvite = {
82
+ id: string;
83
+ orgId: string;
84
+ email: string;
85
+ roleId: string;
86
+ inviteLinkId: string;
87
+ avatarReadyPlayerMeImg: string | null;
88
+ actionAt: string | null;
89
+ status: InviteStatus;
90
+ type: InviteType;
91
+ createdAt: string;
92
+ updatedAt: string;
93
+ organization?: Organization;
94
+ };
95
+ type CreateOrganizationInviteInput = {
96
+ orgId: string;
97
+ email: string;
98
+ roleId: string;
99
+ };
100
+
101
+ type Project = {
102
+ id: string;
103
+ orgId: string;
104
+ name: string;
105
+ description: string | null;
106
+ isActive: boolean;
107
+ createdAt: string;
108
+ updatedAt: string;
109
+ organization?: Organization;
110
+ };
111
+ type CreateProjectInput = {
112
+ orgId: string;
113
+ name: string;
114
+ description?: string | null;
115
+ };
116
+ type UpdateProjectInput = {
117
+ name?: string;
118
+ description?: string | null;
119
+ isActive?: boolean;
120
+ };
121
+ type ProjectListResult = {
122
+ data: Project[];
123
+ meta: PaginationMeta;
124
+ };
125
+
126
+ type UnrealProject = {
127
+ unrealProjectId: string;
128
+ unrealProjectVersionId: string;
129
+ };
130
+ type Space = {
131
+ id: string;
132
+ orgId: string;
133
+ projectId: string;
134
+ name: string;
135
+ description: string | null;
136
+ unrealProject: UnrealProject | Record<string, unknown>;
137
+ currentParticipantSum: number;
138
+ spaceTemplateId: string;
139
+ thumb: string | null;
140
+ spaceItemSum: number;
141
+ createdAt: string;
142
+ updatedAt: string;
143
+ organization?: Organization;
144
+ spaceSetting?: SpaceSetting | null;
145
+ };
146
+ type SpaceSetting = {
147
+ id: string;
148
+ spaceId: string;
149
+ isPublic: boolean;
150
+ afkTimer: number;
151
+ maxSessionLength: number;
152
+ allowAnonymousUsers: boolean;
153
+ allowEmbed: boolean;
154
+ allowConfigurationToolbarForAllUsers: boolean;
155
+ disableChat: boolean;
156
+ disableComms: boolean;
157
+ enableSharding: boolean;
158
+ isLiveStreamActive: boolean;
159
+ showHelpMenu: boolean;
160
+ showLoadingBackground: boolean;
161
+ showLoadingBackgroundBlur: boolean;
162
+ showOdysseyEditorMenu: boolean;
163
+ showSpaceInformation: boolean;
164
+ notViewerBuddle: boolean;
165
+ maximumResolution?: unknown;
166
+ odysseyMobileControls: OdysseyMobileControls;
167
+ avatarType: AvatarType;
168
+ avatarControlSystem: AvatarControlSystem;
169
+ createdAt: string;
170
+ updatedAt: string;
171
+ space?: Space;
172
+ };
173
+ type SpaceUser = {
174
+ id: string;
175
+ spaceId: string;
176
+ email: string;
177
+ roleId: string;
178
+ isPending: boolean;
179
+ avatarUrl: string | null;
180
+ createdAt: string;
181
+ updatedAt: string;
182
+ space?: Space;
183
+ };
184
+ type SpaceInvite = {
185
+ id: string;
186
+ spaceId: string;
187
+ email: string;
188
+ roleId: string;
189
+ inviteLinkId: string;
190
+ avatarReadyPlayerMeImg: string | null;
191
+ actionAt: string | null;
192
+ status: InviteStatus;
193
+ type: InviteType;
194
+ createdAt: string;
195
+ updatedAt: string;
196
+ space?: Space;
197
+ };
198
+ type CreateSpaceInput = {
199
+ orgId: string;
200
+ name: string;
201
+ spaceTemplateId: string;
202
+ unrealProject: UnrealProject;
203
+ };
204
+ type UpdateSpaceInput = {
205
+ name?: string;
206
+ description?: string | null;
207
+ thumb?: string | null;
208
+ };
209
+ type UpdateSpaceSettingInput = {
210
+ isPublic?: boolean;
211
+ afkTimer?: number;
212
+ maxSessionLength?: number;
213
+ allowAnonymousUsers?: boolean;
214
+ allowEmbed?: boolean;
215
+ allowConfigurationToolbarForAllUsers?: boolean;
216
+ disableChat?: boolean;
217
+ disableComms?: boolean;
218
+ enableSharding?: boolean;
219
+ isLiveStreamActive?: boolean;
220
+ showHelpMenu?: boolean;
221
+ showLoadingBackground?: boolean;
222
+ showLoadingBackgroundBlur?: boolean;
223
+ showOdysseyEditorMenu?: boolean;
224
+ showSpaceInformation?: boolean;
225
+ notViewerBuddle?: boolean;
226
+ maximumResolution?: unknown;
227
+ odysseyMobileControls?: OdysseyMobileControls;
228
+ avatarType?: AvatarType;
229
+ avatarControlSystem?: AvatarControlSystem;
230
+ };
231
+ type UpdateSpaceUserInput = {
232
+ roleId?: string;
233
+ avatarUrl?: string;
234
+ };
235
+ type CreateSpaceInviteInput = {
236
+ spaceId: string;
237
+ email: string;
238
+ roleId: string;
239
+ };
240
+
241
+ /**
242
+ * Health module — server and Redis health checks.
243
+ */
244
+
245
+ interface HealthHandle {
246
+ getHealth(): Promise<HealthResponse>;
247
+ getRedisHealth(): Promise<RedisHealthResponse>;
248
+ testRedis(): Promise<void>;
249
+ }
250
+
251
+ /**
252
+ * Organization invites module — operations for managing organization invitations.
253
+ */
254
+
255
+ interface OrganizationInvitesHandle {
256
+ create(data: CreateOrganizationInviteInput): Promise<OrganizationInvite>;
257
+ accept(inviteId: string): Promise<OrganizationInvite>;
258
+ reject(inviteId: string): Promise<OrganizationInvite>;
259
+ getPendingUsers(orgId: string): Promise<OrganizationInvite[]>;
260
+ getPendingUserByInviteId(inviteId: string): Promise<OrganizationInvite | null>;
261
+ }
262
+
263
+ /**
264
+ * Organization module — CRUD operations for organizations and organization users.
265
+ */
266
+
267
+ interface OrganizationHandle {
268
+ create(data: CreateOrganizationInput): Promise<Organization>;
269
+ getAll(query?: PaginationQuery): Promise<OrganizationListResult>;
270
+ getById(id: string): Promise<Organization>;
271
+ getByUser(): Promise<OrganizationByUserResult[]>;
272
+ getUsers(orgId: string): Promise<OrganizationUser[]>;
273
+ update(id: string, data: UpdateOrganizationInput): Promise<Organization>;
274
+ updateUser(userId: string, data: UpdateOrganizationUserInput): Promise<OrganizationUser>;
275
+ delete(id: string): Promise<Organization>;
276
+ deleteUser(userId: string): Promise<OrganizationUser>;
277
+ }
278
+
279
+ /**
280
+ * Projects module — CRUD operations for projects.
281
+ */
282
+
283
+ interface ProjectsHandle {
284
+ create(data: CreateProjectInput): Promise<Project>;
285
+ getByOrg(orgId: string, query?: PaginationQuery): Promise<ProjectListResult>;
286
+ getById(projectId: string): Promise<Project>;
287
+ update(projectId: string, data: UpdateProjectInput): Promise<Project>;
288
+ delete(projectId: string): Promise<Project>;
289
+ }
290
+
291
+ /**
292
+ * Space invites module — operations for managing space invitations.
293
+ */
294
+
295
+ interface SpaceInvitesHandle {
296
+ create(data: CreateSpaceInviteInput): Promise<SpaceInvite>;
297
+ accept(inviteId: string): Promise<SpaceInvite>;
298
+ reject(inviteId: string): Promise<SpaceInvite>;
299
+ getPendingUsers(spaceId: string): Promise<SpaceInvite[]>;
300
+ getPendingUserByInviteId(inviteId: string): Promise<SpaceInvite | null>;
301
+ }
302
+
303
+ /**
304
+ * Spaces module — CRUD operations for spaces, settings, and space users.
305
+ */
306
+
307
+ interface SpacesHandle {
308
+ create(data: CreateSpaceInput): Promise<Space>;
309
+ getByOrg(orgId: string): Promise<Space[]>;
310
+ getByProject(projectId: string): Promise<Space[]>;
311
+ getUsers(spaceId: string): Promise<SpaceUser[]>;
312
+ update(spaceId: string, data: UpdateSpaceInput): Promise<Space>;
313
+ updateSetting(spaceId: string, data: UpdateSpaceSettingInput): Promise<SpaceSetting>;
314
+ updateUser(userId: string, data: UpdateSpaceUserInput): Promise<SpaceUser>;
315
+ delete(spaceId: string): Promise<Space>;
316
+ deleteUser(userId: string): Promise<SpaceUser>;
317
+ }
318
+
319
+ /**
320
+ * SDK Error factories.
321
+ */
322
+ interface OdysseyError extends Error {
323
+ readonly code: string;
324
+ }
325
+ /** Type guard — works for all Odyssey error factories */
326
+ declare function isOdysseyError(err: unknown): err is OdysseyError;
327
+
328
+ interface OrganizationSDKHandle {
329
+ health: HealthHandle;
330
+ organization: OrganizationHandle;
331
+ organizationInvites: OrganizationInvitesHandle;
332
+ projects: ProjectsHandle;
333
+ spaces: SpacesHandle;
334
+ spaceInvites: SpaceInvitesHandle;
335
+ }
336
+ declare function createOrganizationSDK(config: OrganizationSDKConfig): OrganizationSDKHandle;
337
+ declare const OrganizationSDK: {
338
+ readonly create: (config: OrganizationSDKConfig) => OrganizationSDKHandle;
339
+ };
340
+
341
+ export { type AvatarControlSystem, type AvatarType, type CreateOrganizationInput, type CreateOrganizationInviteInput, type CreateProjectInput, type CreateSpaceInput, type CreateSpaceInviteInput, type HealthResponse, type InviteStatus, type InviteType, type OdysseyError, type OdysseyMobileControls, type Organization, type OrganizationByUserResult, type OrganizationConfiguration, type OrganizationInvite, type OrganizationListResult, type OrganizationSDKConfig, type OrganizationSDKHandle, type OrganizationUser, type PaginationMeta, type PaginationQuery, type Project, type ProjectListResult, type RedisHealthResponse, type Space, type SpaceInvite, type SpaceSetting, type SpaceUser, type UpdateOrganizationInput, type UpdateOrganizationUserInput, type UpdateProjectInput, type UpdateSpaceInput, type UpdateSpaceSettingInput, type UpdateSpaceUserInput, createOrganizationSDK, OrganizationSDK as default, isOdysseyError };
@@ -0,0 +1,341 @@
1
+ /**
2
+ * Shared primitive types and SDK config used across all modules.
3
+ */
4
+ type OrganizationSDKConfig = {
5
+ apiKey: string;
6
+ timeout?: number;
7
+ };
8
+ type PaginationQuery = {
9
+ page?: number;
10
+ limit?: number;
11
+ };
12
+ type PaginationMeta = {
13
+ total: number;
14
+ page: number;
15
+ limit: number;
16
+ totalPages: number;
17
+ };
18
+ type InviteStatus = "PENDING" | "ACCEPTED" | "REJECTED" | "EXPIRES";
19
+ type InviteType = "EMAIL" | "LINK";
20
+ type OdysseyMobileControls = "ON" | "OFF" | "JOYSTICK_ONLY";
21
+ type AvatarType = "STANDARD" | "AEC";
22
+ type AvatarControlSystem = "EVENT_MODE" | "GAME_MODE" | "FLIGHT_MODE";
23
+ type HealthResponse = {
24
+ status: string;
25
+ timestamp: string;
26
+ };
27
+ type RedisHealthResponse = {
28
+ status: string;
29
+ latencyMs?: number;
30
+ };
31
+
32
+ type Organization = {
33
+ id: string;
34
+ name: string;
35
+ domain: string;
36
+ logoSmallUrl: string | null;
37
+ createdAt: string;
38
+ updatedAt: string;
39
+ };
40
+ type OrganizationUser = {
41
+ id: string;
42
+ orgId: string;
43
+ email: string;
44
+ roleId: string;
45
+ avatarReadyPlayerMeImg: string | null;
46
+ createdAt: string;
47
+ updatedAt: string;
48
+ organization?: Organization;
49
+ };
50
+ type OrganizationConfiguration = {
51
+ id: string;
52
+ orgId: string;
53
+ unrealImageId: string;
54
+ unrealImageRepo: string;
55
+ workloadClusterProvider: string;
56
+ createdAt: string;
57
+ updatedAt: string;
58
+ organization?: Organization;
59
+ };
60
+ type CreateOrganizationInput = {
61
+ name: string;
62
+ };
63
+ type UpdateOrganizationInput = {
64
+ name?: string | null;
65
+ domain?: string | null;
66
+ logoSmallUrl?: string | null;
67
+ };
68
+ type OrganizationListResult = {
69
+ data: Organization[];
70
+ meta: PaginationMeta;
71
+ };
72
+
73
+ type OrganizationByUserResult = {
74
+ organization: Organization;
75
+ };
76
+ type UpdateOrganizationUserInput = {
77
+ roleId?: string;
78
+ avatarReadyPlayerMeImg?: string;
79
+ };
80
+
81
+ type OrganizationInvite = {
82
+ id: string;
83
+ orgId: string;
84
+ email: string;
85
+ roleId: string;
86
+ inviteLinkId: string;
87
+ avatarReadyPlayerMeImg: string | null;
88
+ actionAt: string | null;
89
+ status: InviteStatus;
90
+ type: InviteType;
91
+ createdAt: string;
92
+ updatedAt: string;
93
+ organization?: Organization;
94
+ };
95
+ type CreateOrganizationInviteInput = {
96
+ orgId: string;
97
+ email: string;
98
+ roleId: string;
99
+ };
100
+
101
+ type Project = {
102
+ id: string;
103
+ orgId: string;
104
+ name: string;
105
+ description: string | null;
106
+ isActive: boolean;
107
+ createdAt: string;
108
+ updatedAt: string;
109
+ organization?: Organization;
110
+ };
111
+ type CreateProjectInput = {
112
+ orgId: string;
113
+ name: string;
114
+ description?: string | null;
115
+ };
116
+ type UpdateProjectInput = {
117
+ name?: string;
118
+ description?: string | null;
119
+ isActive?: boolean;
120
+ };
121
+ type ProjectListResult = {
122
+ data: Project[];
123
+ meta: PaginationMeta;
124
+ };
125
+
126
+ type UnrealProject = {
127
+ unrealProjectId: string;
128
+ unrealProjectVersionId: string;
129
+ };
130
+ type Space = {
131
+ id: string;
132
+ orgId: string;
133
+ projectId: string;
134
+ name: string;
135
+ description: string | null;
136
+ unrealProject: UnrealProject | Record<string, unknown>;
137
+ currentParticipantSum: number;
138
+ spaceTemplateId: string;
139
+ thumb: string | null;
140
+ spaceItemSum: number;
141
+ createdAt: string;
142
+ updatedAt: string;
143
+ organization?: Organization;
144
+ spaceSetting?: SpaceSetting | null;
145
+ };
146
+ type SpaceSetting = {
147
+ id: string;
148
+ spaceId: string;
149
+ isPublic: boolean;
150
+ afkTimer: number;
151
+ maxSessionLength: number;
152
+ allowAnonymousUsers: boolean;
153
+ allowEmbed: boolean;
154
+ allowConfigurationToolbarForAllUsers: boolean;
155
+ disableChat: boolean;
156
+ disableComms: boolean;
157
+ enableSharding: boolean;
158
+ isLiveStreamActive: boolean;
159
+ showHelpMenu: boolean;
160
+ showLoadingBackground: boolean;
161
+ showLoadingBackgroundBlur: boolean;
162
+ showOdysseyEditorMenu: boolean;
163
+ showSpaceInformation: boolean;
164
+ notViewerBuddle: boolean;
165
+ maximumResolution?: unknown;
166
+ odysseyMobileControls: OdysseyMobileControls;
167
+ avatarType: AvatarType;
168
+ avatarControlSystem: AvatarControlSystem;
169
+ createdAt: string;
170
+ updatedAt: string;
171
+ space?: Space;
172
+ };
173
+ type SpaceUser = {
174
+ id: string;
175
+ spaceId: string;
176
+ email: string;
177
+ roleId: string;
178
+ isPending: boolean;
179
+ avatarUrl: string | null;
180
+ createdAt: string;
181
+ updatedAt: string;
182
+ space?: Space;
183
+ };
184
+ type SpaceInvite = {
185
+ id: string;
186
+ spaceId: string;
187
+ email: string;
188
+ roleId: string;
189
+ inviteLinkId: string;
190
+ avatarReadyPlayerMeImg: string | null;
191
+ actionAt: string | null;
192
+ status: InviteStatus;
193
+ type: InviteType;
194
+ createdAt: string;
195
+ updatedAt: string;
196
+ space?: Space;
197
+ };
198
+ type CreateSpaceInput = {
199
+ orgId: string;
200
+ name: string;
201
+ spaceTemplateId: string;
202
+ unrealProject: UnrealProject;
203
+ };
204
+ type UpdateSpaceInput = {
205
+ name?: string;
206
+ description?: string | null;
207
+ thumb?: string | null;
208
+ };
209
+ type UpdateSpaceSettingInput = {
210
+ isPublic?: boolean;
211
+ afkTimer?: number;
212
+ maxSessionLength?: number;
213
+ allowAnonymousUsers?: boolean;
214
+ allowEmbed?: boolean;
215
+ allowConfigurationToolbarForAllUsers?: boolean;
216
+ disableChat?: boolean;
217
+ disableComms?: boolean;
218
+ enableSharding?: boolean;
219
+ isLiveStreamActive?: boolean;
220
+ showHelpMenu?: boolean;
221
+ showLoadingBackground?: boolean;
222
+ showLoadingBackgroundBlur?: boolean;
223
+ showOdysseyEditorMenu?: boolean;
224
+ showSpaceInformation?: boolean;
225
+ notViewerBuddle?: boolean;
226
+ maximumResolution?: unknown;
227
+ odysseyMobileControls?: OdysseyMobileControls;
228
+ avatarType?: AvatarType;
229
+ avatarControlSystem?: AvatarControlSystem;
230
+ };
231
+ type UpdateSpaceUserInput = {
232
+ roleId?: string;
233
+ avatarUrl?: string;
234
+ };
235
+ type CreateSpaceInviteInput = {
236
+ spaceId: string;
237
+ email: string;
238
+ roleId: string;
239
+ };
240
+
241
+ /**
242
+ * Health module — server and Redis health checks.
243
+ */
244
+
245
+ interface HealthHandle {
246
+ getHealth(): Promise<HealthResponse>;
247
+ getRedisHealth(): Promise<RedisHealthResponse>;
248
+ testRedis(): Promise<void>;
249
+ }
250
+
251
+ /**
252
+ * Organization invites module — operations for managing organization invitations.
253
+ */
254
+
255
+ interface OrganizationInvitesHandle {
256
+ create(data: CreateOrganizationInviteInput): Promise<OrganizationInvite>;
257
+ accept(inviteId: string): Promise<OrganizationInvite>;
258
+ reject(inviteId: string): Promise<OrganizationInvite>;
259
+ getPendingUsers(orgId: string): Promise<OrganizationInvite[]>;
260
+ getPendingUserByInviteId(inviteId: string): Promise<OrganizationInvite | null>;
261
+ }
262
+
263
+ /**
264
+ * Organization module — CRUD operations for organizations and organization users.
265
+ */
266
+
267
+ interface OrganizationHandle {
268
+ create(data: CreateOrganizationInput): Promise<Organization>;
269
+ getAll(query?: PaginationQuery): Promise<OrganizationListResult>;
270
+ getById(id: string): Promise<Organization>;
271
+ getByUser(): Promise<OrganizationByUserResult[]>;
272
+ getUsers(orgId: string): Promise<OrganizationUser[]>;
273
+ update(id: string, data: UpdateOrganizationInput): Promise<Organization>;
274
+ updateUser(userId: string, data: UpdateOrganizationUserInput): Promise<OrganizationUser>;
275
+ delete(id: string): Promise<Organization>;
276
+ deleteUser(userId: string): Promise<OrganizationUser>;
277
+ }
278
+
279
+ /**
280
+ * Projects module — CRUD operations for projects.
281
+ */
282
+
283
+ interface ProjectsHandle {
284
+ create(data: CreateProjectInput): Promise<Project>;
285
+ getByOrg(orgId: string, query?: PaginationQuery): Promise<ProjectListResult>;
286
+ getById(projectId: string): Promise<Project>;
287
+ update(projectId: string, data: UpdateProjectInput): Promise<Project>;
288
+ delete(projectId: string): Promise<Project>;
289
+ }
290
+
291
+ /**
292
+ * Space invites module — operations for managing space invitations.
293
+ */
294
+
295
+ interface SpaceInvitesHandle {
296
+ create(data: CreateSpaceInviteInput): Promise<SpaceInvite>;
297
+ accept(inviteId: string): Promise<SpaceInvite>;
298
+ reject(inviteId: string): Promise<SpaceInvite>;
299
+ getPendingUsers(spaceId: string): Promise<SpaceInvite[]>;
300
+ getPendingUserByInviteId(inviteId: string): Promise<SpaceInvite | null>;
301
+ }
302
+
303
+ /**
304
+ * Spaces module — CRUD operations for spaces, settings, and space users.
305
+ */
306
+
307
+ interface SpacesHandle {
308
+ create(data: CreateSpaceInput): Promise<Space>;
309
+ getByOrg(orgId: string): Promise<Space[]>;
310
+ getByProject(projectId: string): Promise<Space[]>;
311
+ getUsers(spaceId: string): Promise<SpaceUser[]>;
312
+ update(spaceId: string, data: UpdateSpaceInput): Promise<Space>;
313
+ updateSetting(spaceId: string, data: UpdateSpaceSettingInput): Promise<SpaceSetting>;
314
+ updateUser(userId: string, data: UpdateSpaceUserInput): Promise<SpaceUser>;
315
+ delete(spaceId: string): Promise<Space>;
316
+ deleteUser(userId: string): Promise<SpaceUser>;
317
+ }
318
+
319
+ /**
320
+ * SDK Error factories.
321
+ */
322
+ interface OdysseyError extends Error {
323
+ readonly code: string;
324
+ }
325
+ /** Type guard — works for all Odyssey error factories */
326
+ declare function isOdysseyError(err: unknown): err is OdysseyError;
327
+
328
+ interface OrganizationSDKHandle {
329
+ health: HealthHandle;
330
+ organization: OrganizationHandle;
331
+ organizationInvites: OrganizationInvitesHandle;
332
+ projects: ProjectsHandle;
333
+ spaces: SpacesHandle;
334
+ spaceInvites: SpaceInvitesHandle;
335
+ }
336
+ declare function createOrganizationSDK(config: OrganizationSDKConfig): OrganizationSDKHandle;
337
+ declare const OrganizationSDK: {
338
+ readonly create: (config: OrganizationSDKConfig) => OrganizationSDKHandle;
339
+ };
340
+
341
+ export { type AvatarControlSystem, type AvatarType, type CreateOrganizationInput, type CreateOrganizationInviteInput, type CreateProjectInput, type CreateSpaceInput, type CreateSpaceInviteInput, type HealthResponse, type InviteStatus, type InviteType, type OdysseyError, type OdysseyMobileControls, type Organization, type OrganizationByUserResult, type OrganizationConfiguration, type OrganizationInvite, type OrganizationListResult, type OrganizationSDKConfig, type OrganizationSDKHandle, type OrganizationUser, type PaginationMeta, type PaginationQuery, type Project, type ProjectListResult, type RedisHealthResponse, type Space, type SpaceInvite, type SpaceSetting, type SpaceUser, type UpdateOrganizationInput, type UpdateOrganizationUserInput, type UpdateProjectInput, type UpdateSpaceInput, type UpdateSpaceSettingInput, type UpdateSpaceUserInput, createOrganizationSDK, OrganizationSDK as default, isOdysseyError };