@oriva/sdk 0.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.
Files changed (56) hide show
  1. package/README.md +98 -0
  2. package/dist/generated/client/client.gen.d.ts +3 -0
  3. package/dist/generated/client/client.gen.d.ts.map +1 -0
  4. package/dist/generated/client/client.gen.js +219 -0
  5. package/dist/generated/client/index.d.ts +9 -0
  6. package/dist/generated/client/index.d.ts.map +1 -0
  7. package/dist/generated/client/index.js +6 -0
  8. package/dist/generated/client/types.gen.d.ts +121 -0
  9. package/dist/generated/client/types.gen.d.ts.map +1 -0
  10. package/dist/generated/client/types.gen.js +2 -0
  11. package/dist/generated/client/utils.gen.d.ts +38 -0
  12. package/dist/generated/client/utils.gen.d.ts.map +1 -0
  13. package/dist/generated/client/utils.gen.js +228 -0
  14. package/dist/generated/client.gen.d.ts +13 -0
  15. package/dist/generated/client.gen.d.ts.map +1 -0
  16. package/dist/generated/client.gen.js +4 -0
  17. package/dist/generated/core/auth.gen.d.ts +19 -0
  18. package/dist/generated/core/auth.gen.d.ts.map +1 -0
  19. package/dist/generated/core/auth.gen.js +14 -0
  20. package/dist/generated/core/bodySerializer.gen.d.ts +26 -0
  21. package/dist/generated/core/bodySerializer.gen.d.ts.map +1 -0
  22. package/dist/generated/core/bodySerializer.gen.js +57 -0
  23. package/dist/generated/core/params.gen.d.ts +44 -0
  24. package/dist/generated/core/params.gen.d.ts.map +1 -0
  25. package/dist/generated/core/params.gen.js +100 -0
  26. package/dist/generated/core/pathSerializer.gen.d.ts +34 -0
  27. package/dist/generated/core/pathSerializer.gen.d.ts.map +1 -0
  28. package/dist/generated/core/pathSerializer.gen.js +106 -0
  29. package/dist/generated/core/queryKeySerializer.gen.d.ts +19 -0
  30. package/dist/generated/core/queryKeySerializer.gen.d.ts.map +1 -0
  31. package/dist/generated/core/queryKeySerializer.gen.js +92 -0
  32. package/dist/generated/core/serverSentEvents.gen.d.ts +72 -0
  33. package/dist/generated/core/serverSentEvents.gen.d.ts.map +1 -0
  34. package/dist/generated/core/serverSentEvents.gen.js +132 -0
  35. package/dist/generated/core/types.gen.d.ts +79 -0
  36. package/dist/generated/core/types.gen.d.ts.map +1 -0
  37. package/dist/generated/core/types.gen.js +2 -0
  38. package/dist/generated/core/utils.gen.d.ts +20 -0
  39. package/dist/generated/core/utils.gen.d.ts.map +1 -0
  40. package/dist/generated/core/utils.gen.js +87 -0
  41. package/dist/generated/index.d.ts +3 -0
  42. package/dist/generated/index.d.ts.map +1 -0
  43. package/dist/generated/index.js +2 -0
  44. package/dist/generated/sdk.gen.d.ts +282 -0
  45. package/dist/generated/sdk.gen.d.ts.map +1 -0
  46. package/dist/generated/sdk.gen.js +488 -0
  47. package/dist/generated/types.gen.d.ts +1652 -0
  48. package/dist/generated/types.gen.d.ts.map +1 -0
  49. package/dist/generated/types.gen.js +2 -0
  50. package/dist/index.d.ts +47 -0
  51. package/dist/index.d.ts.map +1 -0
  52. package/dist/index.js +40 -0
  53. package/dist/runtime-config.d.ts +3 -0
  54. package/dist/runtime-config.d.ts.map +1 -0
  55. package/dist/runtime-config.js +4 -0
  56. package/package.json +53 -0
@@ -0,0 +1,488 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ import { client } from './client.gen.js';
3
+ /**
4
+ * Register a new user
5
+ */
6
+ export const register = (options) => (options?.client ?? client).post({
7
+ url: '/api/v1/auth/register',
8
+ ...options,
9
+ headers: {
10
+ 'Content-Type': 'application/json',
11
+ ...options?.headers
12
+ }
13
+ });
14
+ /**
15
+ * Log in
16
+ */
17
+ export const login = (options) => (options?.client ?? client).post({
18
+ url: '/api/v1/auth/login',
19
+ ...options,
20
+ headers: {
21
+ 'Content-Type': 'application/json',
22
+ ...options?.headers
23
+ }
24
+ });
25
+ /**
26
+ * Log out
27
+ *
28
+ * Invalidates the current session. Requires Authorization header.
29
+ */
30
+ export const logout = (options) => (options?.client ?? client).post({
31
+ security: [{ scheme: 'bearer', type: 'http' }],
32
+ url: '/api/v1/auth/logout',
33
+ ...options
34
+ });
35
+ /**
36
+ * Refresh access token
37
+ */
38
+ export const refreshToken = (options) => (options?.client ?? client).post({
39
+ url: '/api/v1/auth/token/refresh',
40
+ ...options,
41
+ headers: {
42
+ 'Content-Type': 'application/json',
43
+ ...options?.headers
44
+ }
45
+ });
46
+ /**
47
+ * Get auth profile
48
+ *
49
+ * Returns the authenticated user identity and API key metadata.
50
+ */
51
+ export const getAuthProfile = (options) => (options?.client ?? client).get({
52
+ security: [{ scheme: 'bearer', type: 'http' }, { scheme: 'bearer', type: 'http' }],
53
+ url: '/api/v1/auth/profile',
54
+ ...options
55
+ });
56
+ /**
57
+ * Update profile (partial)
58
+ */
59
+ export const patchAuthProfile = (options) => (options?.client ?? client).patch({
60
+ security: [{ scheme: 'bearer', type: 'http' }],
61
+ url: '/api/v1/auth/profile',
62
+ ...options,
63
+ headers: {
64
+ 'Content-Type': 'application/json',
65
+ ...options?.headers
66
+ }
67
+ });
68
+ /**
69
+ * Update profile (full)
70
+ *
71
+ * Superset of PATCH — also accepts preferences and data_retention_days (min 30).
72
+ */
73
+ export const putAuthProfile = (options) => (options?.client ?? client).put({
74
+ security: [{ scheme: 'bearer', type: 'http' }],
75
+ url: '/api/v1/auth/profile',
76
+ ...options,
77
+ headers: {
78
+ 'Content-Type': 'application/json',
79
+ ...options?.headers
80
+ }
81
+ });
82
+ /**
83
+ * Delete account
84
+ */
85
+ export const deleteAccount = (options) => (options?.client ?? client).delete({
86
+ security: [{ scheme: 'bearer', type: 'http' }],
87
+ url: '/api/v1/auth/account',
88
+ ...options
89
+ });
90
+ /**
91
+ * List available profiles
92
+ *
93
+ * Returns all non-anonymous active profiles for the authenticated API key.
94
+ */
95
+ export const listProfiles = (options) => (options?.client ?? client).get({
96
+ security: [{ scheme: 'bearer', type: 'http' }],
97
+ url: '/api/v1/profiles/available',
98
+ ...options
99
+ });
100
+ /**
101
+ * Get active profile
102
+ *
103
+ * Returns the default active (non-anonymous) profile for the authenticated API key.
104
+ */
105
+ export const getActiveProfile = (options) => (options?.client ?? client).get({
106
+ security: [{ scheme: 'bearer', type: 'http' }],
107
+ url: '/api/v1/profiles/active',
108
+ ...options
109
+ });
110
+ /**
111
+ * Update a profile
112
+ */
113
+ export const updateProfile = (options) => (options.client ?? client).put({
114
+ security: [{ scheme: 'bearer', type: 'http' }],
115
+ url: '/api/v1/profiles/{profileId}',
116
+ ...options,
117
+ headers: {
118
+ 'Content-Type': 'application/json',
119
+ ...options.headers
120
+ }
121
+ });
122
+ /**
123
+ * Activate a profile
124
+ *
125
+ * Switches the active profile to the specified profile.
126
+ */
127
+ export const activateProfile = (options) => (options.client ?? client).post({
128
+ security: [{ scheme: 'bearer', type: 'http' }],
129
+ url: '/api/v1/profiles/{profileId}/activate',
130
+ ...options
131
+ });
132
+ /**
133
+ * List groups
134
+ *
135
+ * Returns all groups the authenticated user created or joined.
136
+ */
137
+ export const listGroups = (options) => (options?.client ?? client).get({
138
+ security: [{ scheme: 'bearer', type: 'http' }],
139
+ url: '/api/v1/groups',
140
+ ...options
141
+ });
142
+ /**
143
+ * Get group members
144
+ *
145
+ * Returns members of a group. Requires the caller to be the creator or a member.
146
+ */
147
+ export const listGroupMembers = (options) => (options.client ?? client).get({
148
+ security: [{ scheme: 'bearer', type: 'http' }],
149
+ url: '/api/v1/groups/{groupId}/members',
150
+ ...options
151
+ });
152
+ /**
153
+ * Get current user
154
+ *
155
+ * Returns the authenticated user's active profile and API key metadata.
156
+ */
157
+ export const getCurrentUser = (options) => (options?.client ?? client).get({
158
+ security: [{ scheme: 'bearer', type: 'http' }],
159
+ url: '/api/v1/user/me',
160
+ ...options
161
+ });
162
+ /**
163
+ * Get analytics summary
164
+ *
165
+ * Returns 7-day usage analytics for the authenticated API key.
166
+ */
167
+ export const getAnalyticsSummary = (options) => (options?.client ?? client).get({
168
+ security: [{ scheme: 'bearer', type: 'http' }],
169
+ url: '/api/v1/analytics/summary',
170
+ ...options
171
+ });
172
+ /**
173
+ * List sessions
174
+ *
175
+ * Returns the user's sessions. Sessions feature is not yet implemented — returns empty paginated list.
176
+ */
177
+ export const listSessions = (options) => (options?.client ?? client).get({
178
+ security: [{ scheme: 'bearer', type: 'http' }],
179
+ url: '/api/v1/sessions',
180
+ ...options
181
+ });
182
+ /**
183
+ * List upcoming sessions
184
+ *
185
+ * Returns upcoming sessions. Sessions feature is not yet implemented — returns empty list.
186
+ */
187
+ export const listUpcomingSessions = (options) => (options?.client ?? client).get({
188
+ security: [{ scheme: 'bearer', type: 'http' }],
189
+ url: '/api/v1/sessions/upcoming',
190
+ ...options
191
+ });
192
+ /**
193
+ * List team members
194
+ *
195
+ * Returns group memberships for the authenticated user as a flat list of team members.
196
+ */
197
+ export const listTeamMembers = (options) => (options?.client ?? client).get({
198
+ security: [{ scheme: 'bearer', type: 'http' }],
199
+ url: '/api/v1/team/members',
200
+ ...options
201
+ });
202
+ /**
203
+ * Browse marketplace apps
204
+ *
205
+ * Returns paginated list of approved, active marketplace apps.
206
+ */
207
+ export const listMarketplaceApps = (options) => (options?.client ?? client).get({
208
+ security: [{ scheme: 'bearer', type: 'http' }],
209
+ url: '/api/v1/marketplace/apps',
210
+ ...options
211
+ });
212
+ /**
213
+ * Trending apps
214
+ *
215
+ * Returns approved apps sorted by install count (top 20).
216
+ */
217
+ export const listTrendingApps = (options) => (options?.client ?? client).get({
218
+ security: [{ scheme: 'bearer', type: 'http' }],
219
+ url: '/api/v1/marketplace/trending',
220
+ ...options
221
+ });
222
+ /**
223
+ * Featured apps
224
+ *
225
+ * Returns featured approved apps (curated subset of top apps).
226
+ */
227
+ export const listFeaturedApps = (options) => (options?.client ?? client).get({
228
+ security: [{ scheme: 'bearer', type: 'http' }],
229
+ url: '/api/v1/marketplace/featured',
230
+ ...options
231
+ });
232
+ /**
233
+ * List app categories
234
+ *
235
+ * Returns distinct categories from approved apps with their app counts. Note: a second registration of this path exists (no auth, collections-table version) but is shadowed by this route (Express first-match).
236
+ */
237
+ export const listMarketplaceCategories = (options) => (options?.client ?? client).get({
238
+ security: [{ scheme: 'bearer', type: 'http' }],
239
+ url: '/api/v1/marketplace/categories',
240
+ ...options
241
+ });
242
+ /**
243
+ * Get app details
244
+ */
245
+ export const getMarketplaceApp = (options) => (options.client ?? client).get({
246
+ security: [{ scheme: 'bearer', type: 'http' }],
247
+ url: '/api/v1/marketplace/apps/{appId}',
248
+ ...options
249
+ });
250
+ /**
251
+ * List installed apps
252
+ *
253
+ * Returns all apps installed by the authenticated user.
254
+ */
255
+ export const listInstalledApps = (options) => (options?.client ?? client).get({
256
+ security: [{ scheme: 'bearer', type: 'http' }],
257
+ url: '/api/v1/marketplace/installed',
258
+ ...options
259
+ });
260
+ /**
261
+ * Install app
262
+ */
263
+ export const installMarketplaceApp = (options) => (options.client ?? client).post({
264
+ security: [{ scheme: 'bearer', type: 'http' }],
265
+ url: '/api/v1/marketplace/install/{appId}',
266
+ ...options,
267
+ headers: {
268
+ 'Content-Type': 'application/json',
269
+ ...options.headers
270
+ }
271
+ });
272
+ /**
273
+ * Uninstall app
274
+ */
275
+ export const uninstallMarketplaceApp = (options) => (options.client ?? client).delete({
276
+ security: [{ scheme: 'bearer', type: 'http' }],
277
+ url: '/api/v1/marketplace/uninstall/{appId}',
278
+ ...options
279
+ });
280
+ /**
281
+ * List marketplace items
282
+ *
283
+ * Public listing of published marketplace items (entry-based). No authentication required.
284
+ */
285
+ export const listMarketplaceItems = (options) => (options?.client ?? client).get({ url: '/api/v1/marketplace/items', ...options });
286
+ /**
287
+ * Get marketplace item
288
+ *
289
+ * Returns a single published marketplace item by ID.
290
+ */
291
+ export const getMarketplaceItem = (options) => (options.client ?? client).get({ url: '/api/v1/marketplace/items/{id}', ...options });
292
+ /**
293
+ * Search marketplace
294
+ *
295
+ * Full-text search across marketplace items. No authentication required.
296
+ */
297
+ export const searchMarketplace = (options) => (options?.client ?? client).post({
298
+ url: '/api/v1/marketplace/search',
299
+ ...options,
300
+ headers: {
301
+ 'Content-Type': 'application/json',
302
+ ...options?.headers
303
+ }
304
+ });
305
+ /**
306
+ * Category tree
307
+ *
308
+ * Returns marketplace categories as a hierarchical tree from the collections table. Children are nested category objects of the same shape.
309
+ */
310
+ export const getCategoryTree = (options) => (options?.client ?? client).get({ url: '/api/v1/marketplace/categories/tree', ...options });
311
+ /**
312
+ * Get category
313
+ *
314
+ * Returns a single marketplace category from the collections table.
315
+ */
316
+ export const getMarketplaceCategory = (options) => (options.client ?? client).get({ url: '/api/v1/marketplace/categories/{id}', ...options });
317
+ /**
318
+ * List developer apps
319
+ *
320
+ * Returns all marketplace apps owned by the authenticated developer.
321
+ */
322
+ export const listDeveloperApps = (options) => (options?.client ?? client).get({
323
+ security: [{ scheme: 'bearer', type: 'http' }],
324
+ url: '/api/v1/developer/apps',
325
+ ...options
326
+ });
327
+ /**
328
+ * Create app
329
+ */
330
+ export const createDeveloperApp = (options) => (options?.client ?? client).post({
331
+ security: [{ scheme: 'bearer', type: 'http' }],
332
+ url: '/api/v1/developer/apps',
333
+ ...options,
334
+ headers: {
335
+ 'Content-Type': 'application/json',
336
+ ...options?.headers
337
+ }
338
+ });
339
+ /**
340
+ * Delete app
341
+ *
342
+ * Only draft apps can be deleted. Approved apps must be deactivated first.
343
+ */
344
+ export const deleteDeveloperApp = (options) => (options.client ?? client).delete({
345
+ security: [{ scheme: 'bearer', type: 'http' }],
346
+ url: '/api/v1/developer/apps/{appId}',
347
+ ...options
348
+ });
349
+ /**
350
+ * Get developer app
351
+ */
352
+ export const getDeveloperApp = (options) => (options.client ?? client).get({
353
+ security: [{ scheme: 'bearer', type: 'http' }],
354
+ url: '/api/v1/developer/apps/{appId}',
355
+ ...options
356
+ });
357
+ /**
358
+ * Update app
359
+ */
360
+ export const updateDeveloperApp = (options) => (options.client ?? client).put({
361
+ security: [{ scheme: 'bearer', type: 'http' }],
362
+ url: '/api/v1/developer/apps/{appId}',
363
+ ...options,
364
+ headers: {
365
+ 'Content-Type': 'application/json',
366
+ ...options.headers
367
+ }
368
+ });
369
+ /**
370
+ * Submit app for review
371
+ *
372
+ * Transitions app from draft → pending_review.
373
+ */
374
+ export const submitDeveloperApp = (options) => (options.client ?? client).post({
375
+ security: [{ scheme: 'bearer', type: 'http' }],
376
+ url: '/api/v1/developer/apps/{appId}/submit',
377
+ ...options
378
+ });
379
+ /**
380
+ * Resubmit rejected app
381
+ *
382
+ * Updates fields and resubmits a rejected app for review.
383
+ */
384
+ export const resubmitDeveloperApp = (options) => (options.client ?? client).post({
385
+ security: [{ scheme: 'bearer', type: 'http' }],
386
+ url: '/api/v1/developer/apps/{appId}/resubmit',
387
+ ...options,
388
+ headers: {
389
+ 'Content-Type': 'application/json',
390
+ ...options.headers
391
+ }
392
+ });
393
+ /**
394
+ * List entries
395
+ *
396
+ * Returns paginated entries for the authenticated user's profile.
397
+ */
398
+ export const listEntries = (options) => (options?.client ?? client).get({
399
+ security: [{ scheme: 'bearer', type: 'http' }],
400
+ url: '/api/v1/entries',
401
+ ...options
402
+ });
403
+ /**
404
+ * List templates
405
+ *
406
+ * Returns available entry templates. Not yet implemented — returns empty list.
407
+ */
408
+ export const listTemplates = (options) => (options?.client ?? client).get({
409
+ security: [{ scheme: 'bearer', type: 'http' }],
410
+ url: '/api/v1/templates',
411
+ ...options
412
+ });
413
+ /**
414
+ * Get storage info
415
+ *
416
+ * Returns storage usage for the authenticated user. Not yet implemented — returns empty object.
417
+ */
418
+ export const getStorage = (options) => (options?.client ?? client).get({
419
+ security: [{ scheme: 'bearer', type: 'http' }],
420
+ url: '/api/v1/storage',
421
+ ...options
422
+ });
423
+ /**
424
+ * Create notification
425
+ *
426
+ * Creates a UI notification for the authenticated user.
427
+ */
428
+ export const createUiNotification = (options) => (options?.client ?? client).post({
429
+ security: [{ scheme: 'bearer', type: 'http' }],
430
+ url: '/api/v1/ui/notifications',
431
+ ...options
432
+ });
433
+ /**
434
+ * List events
435
+ *
436
+ * Returns active events with optional filtering by category and date range.
437
+ */
438
+ export const listEvents = (options) => (options?.client ?? client).get({ url: '/api/oriva/events', ...options });
439
+ /**
440
+ * Create event
441
+ */
442
+ export const createEvent = (options) => (options?.client ?? client).post({
443
+ security: [{ scheme: 'bearer', type: 'http' }],
444
+ url: '/api/oriva/events',
445
+ ...options,
446
+ headers: {
447
+ 'Content-Type': 'application/json',
448
+ ...options?.headers
449
+ }
450
+ });
451
+ /**
452
+ * Get event
453
+ */
454
+ export const getEvent = (options) => (options.client ?? client).get({ url: '/api/oriva/events/{eventId}', ...options });
455
+ /**
456
+ * List Personal Access Tokens
457
+ *
458
+ * Returns all PATs belonging to the authenticated account. Full token values and hashes are never returned.
459
+ */
460
+ export const listPersonalAccessTokens = (options) => (options?.client ?? client).get({
461
+ security: [{ scheme: 'bearer', type: 'http' }],
462
+ url: '/api/v1/me/tokens',
463
+ ...options
464
+ });
465
+ /**
466
+ * Create a Personal Access Token
467
+ *
468
+ * Issues a new Personal Access Token (PAT) scoped to the authenticated account. The full token value is returned **once** and cannot be retrieved again. PATs carry broad `["read","write"]` permissions and are intended for personal tooling (e.g. MCP servers).
469
+ */
470
+ export const createPersonalAccessToken = (options) => (options.client ?? client).post({
471
+ security: [{ scheme: 'bearer', type: 'http' }],
472
+ url: '/api/v1/me/tokens',
473
+ ...options,
474
+ headers: {
475
+ 'Content-Type': 'application/json',
476
+ ...options.headers
477
+ }
478
+ });
479
+ /**
480
+ * Revoke a Personal Access Token
481
+ *
482
+ * Sets `is_active = false` on the token (soft-delete). The row is preserved for audit purposes. Returns 404 if the token does not belong to this account.
483
+ */
484
+ export const revokePersonalAccessToken = (options) => (options.client ?? client).delete({
485
+ security: [{ scheme: 'bearer', type: 'http' }],
486
+ url: '/api/v1/me/tokens/{id}',
487
+ ...options
488
+ });