@23blocks/block-authentication 7.0.0 → 7.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,467 @@
1
+ ## 7.1.0 (2026-02-24)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **@23blocks/block-authentication:** add service tokens, oauthMode, and CI simplification ([3cea02d](https://github.com/23blocks-OS/frontend-sdk/commit/3cea02d))
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - Claude Opus 4.6
10
+ - Juan Pelaez
11
+
12
+ # 7.0.0 (2026-02-20)
13
+
14
+ ### 🩹 Fixes
15
+
16
+ - align mapper tests with implementation and fix user mapper fallbacks ([1ac0b6e](https://github.com/23blocks-OS/frontend-sdk/commit/1ac0b6e))
17
+ - ⚠️ replace appId with apiKey across all block configs to align with BlockConfig contract ([f81626d](https://github.com/23blocks-OS/frontend-sdk/commit/f81626d))
18
+ - resolve typecheck errors across all block packages ([6089324](https://github.com/23blocks-OS/frontend-sdk/commit/6089324))
19
+
20
+ ### ⚠️ Breaking Changes
21
+
22
+ - replace appId with apiKey across all block configs to align with BlockConfig contract ([f81626d](https://github.com/23blocks-OS/frontend-sdk/commit/f81626d))
23
+ Block config no longer accepts appId. Use apiKey instead.
24
+ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
25
+
26
+ ### 🧱 Updated Dependencies
27
+
28
+ - Updated @23blocks/jsonapi-codec to 3.3.1
29
+ - Updated @23blocks/contracts to 2.3.1
30
+
31
+ ### ❤️ Thank You
32
+
33
+ - Claude Opus 4.6
34
+ - Juan Pelaez
35
+
36
+ ## 6.5.0 (2026-02-17)
37
+
38
+ ### 🚀 Features
39
+
40
+ - add health() method to all 18 blocks for service connectivity checks ([73514a3](https://github.com/23blocks-OS/frontend-sdk/commit/73514a3))
41
+
42
+ ### 🧱 Updated Dependencies
43
+
44
+ - Updated @23blocks/jsonapi-codec to 3.3.0
45
+ - Updated @23blocks/contracts to 2.3.0
46
+
47
+ ### ❤️ Thank You
48
+
49
+ - Claude Opus 4.6
50
+ - Juan Pelaez
51
+
52
+ ## 6.4.0 (2026-02-08)
53
+
54
+ ### 🚀 Features
55
+
56
+ - add comprehensive JSDoc documentation and llms.txt for AI agent consumption ([fd97df2](https://github.com/23blocks-OS/frontend-sdk/commit/fd97df2))
57
+
58
+ ### 🧱 Updated Dependencies
59
+
60
+ - Updated @23blocks/jsonapi-codec to 3.2.0
61
+ - Updated @23blocks/contracts to 2.2.0
62
+
63
+ ### ❤️ Thank You
64
+
65
+ - Claude Opus 4.6
66
+ - Juan Pelaez
67
+
68
+ ## 6.3.6 (2026-02-07)
69
+
70
+ ### 🩹 Fixes
71
+
72
+ - replace misleading `id` params with `uniqueId` across SDK ([6dfc65b](https://github.com/23blocks-OS/frontend-sdk/commit/6dfc65b))
73
+
74
+ ### ❤️ Thank You
75
+
76
+ - Claude Opus 4.6
77
+ - Juan Pelaez
78
+
79
+ ## 6.3.5 (2026-02-07)
80
+
81
+ ### 🧱 Updated Dependencies
82
+
83
+ - Updated @23blocks/jsonapi-codec to 3.1.3
84
+ - Updated @23blocks/contracts to 2.1.3
85
+
86
+ ## 6.3.4 (2026-02-06)
87
+
88
+ ### 🧱 Updated Dependencies
89
+
90
+ - Updated @23blocks/jsonapi-codec to 3.1.2
91
+ - Updated @23blocks/contracts to 2.1.2
92
+
93
+ ## 6.3.3 (2026-01-28)
94
+
95
+ ### 🩹 Fixes
96
+
97
+ - **auth,search:** use simple pagination params instead of JSON:API style ([52ac9bd](https://github.com/23blocks-OS/frontend-sdk/commit/52ac9bd))
98
+
99
+ ### ❤️ Thank You
100
+
101
+ - Claude Opus 4.5
102
+ - Juan Pelaez
103
+
104
+ ## 6.3.2 (2026-01-20)
105
+
106
+ ### 🧱 Updated Dependencies
107
+
108
+ - Updated @23blocks/jsonapi-codec to 3.1.1
109
+ - Updated @23blocks/contracts to 2.1.1
110
+
111
+ ## 6.3.1 (2026-01-05)
112
+
113
+ ### 🚀 Features
114
+
115
+ - ⚠️ **angular:** complete all Angular services with full block coverage ([e806bfc](https://github.com/23blocks-OS/frontend-sdk/commit/e806bfc))
116
+
117
+ ### ⚠️ Breaking Changes
118
+
119
+ - **angular:** complete all Angular services with full block coverage ([e806bfc](https://github.com/23blocks-OS/frontend-sdk/commit/e806bfc))
120
+ rawBlock renamed to {serviceName}Block across all services
121
+ Changes:
122
+ - Rename rawBlock to proper names (authenticationBlock, searchBlock, etc.) in all 17 Angular services
123
+ - Complete AuthenticationService with all 25 block services (permissions, apps, subscriptions, geography, guests, magic links, etc.)
124
+ - Complete CrmService with all 22 block services (contact events, lead follows, meeting participants, zoom, calendar, etc.)
125
+ - Complete GeolocationService with all 19 block services (premise events, route tracker, location hours/images/slots/taxes/groups, identities)
126
+ - Complete ConversationsService with all 14 block services (draft messages, group invites, websocket tokens, contexts, availabilities, meetings, web notifications)
127
+ - Complete FilesService with all 9 block services (user files, file categories, file tags, delegations, file access, file access requests)
128
+ - Complete AssetsService with all 12 block services (events with images/reports, audits, operations, alerts, users)
129
+ - Complete CampaignsService with all 12 block services (campaign media, landing pages, audiences, templates, media results)
130
+ - Complete CompanyService with positions and employee assignments
131
+ - Complete RewardsService with fixed method signatures for loyalty rules
132
+ - Complete SalesService with Stripe and MercadoPago payment services
133
+ - Complete JarvisService with AI models, entities, clusters, workflows, agent runtime
134
+ - Complete OnboardingService with onboard flow, mail templates, remarketing
135
+ - Complete UniversityService with placements, calendars, matches, attendance, notes
136
+ - Export missing types from block packages
137
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
138
+ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
139
+
140
+ ### ❤️ Thank You
141
+
142
+ - Claude Opus 4.5
143
+ - Juan Pelaez
144
+
145
+ ## 6.3.0 (2026-01-04)
146
+
147
+ ### 🚀 Features
148
+
149
+ - implement LOW priority services across SDK blocks ([9296d12](https://github.com/23blocks-OS/frontend-sdk/commit/9296d12))
150
+
151
+ ### ❤️ Thank You
152
+
153
+ - Claude Opus 4.5
154
+ - Juan Pelaez
155
+
156
+ ## 6.2.0 (2026-01-04)
157
+
158
+ ### 🚀 Features
159
+
160
+ - implement HIGH priority missing services ([ab6141f](https://github.com/23blocks-OS/frontend-sdk/commit/ab6141f))
161
+
162
+ ### ❤️ Thank You
163
+
164
+ - Claude Opus 4.5
165
+ - Juan Pelaez
166
+
167
+ ## 6.1.0 (2026-01-01)
168
+
169
+ ### 🧱 Updated Dependencies
170
+
171
+ - Updated @23blocks/jsonapi-codec to 3.1.0
172
+ - Updated @23blocks/contracts to 2.1.0
173
+
174
+ ## 6.0.2 (2026-01-01)
175
+
176
+ ### 🩹 Fixes
177
+
178
+ - add missing fields to update request types ([2d54e25](https://github.com/23blocks-OS/frontend-sdk/commit/2d54e25))
179
+
180
+ ### ❤️ Thank You
181
+
182
+ - Claude Opus 4.5
183
+ - Juan Pelaez
184
+
185
+ ## 6.0.1 (2025-12-31)
186
+
187
+ ### 🩹 Fixes
188
+
189
+ - replace PATCH with PUT across all services ([6339334](https://github.com/23blocks-OS/frontend-sdk/commit/6339334))
190
+
191
+ ### ❤️ Thank You
192
+
193
+ - Claude Opus 4.5
194
+ - Juan Pelaez
195
+
196
+ # 6.0.0 (2025-12-17)
197
+
198
+ ### 🩹 Fixes
199
+
200
+ - ⚠️ use x-api-key header for API standards compliance ([8206652](https://github.com/23blocks-OS/frontend-sdk/commit/8206652))
201
+
202
+ ### ⚠️ Breaking Changes
203
+
204
+ - use x-api-key header for API standards compliance ([8206652](https://github.com/23blocks-OS/frontend-sdk/commit/8206652))
205
+ The HTTP header sent with API requests changed from
206
+ 'api-key' to 'x-api-key'. Backend services need to accept 'x-api-key' header.
207
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
208
+ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
209
+
210
+ ### ❤️ Thank You
211
+
212
+ - Claude Opus 4.5
213
+ - Juan Pelaez
214
+
215
+ ## 5.0.1 (2025-12-17)
216
+
217
+ ### 🧱 Updated Dependencies
218
+
219
+ - Updated @23blocks/jsonapi-codec to 3.0.1
220
+ - Updated @23blocks/contracts to 2.0.1
221
+
222
+ # 5.0.0 (2025-12-17)
223
+
224
+ ### 🚀 Features
225
+
226
+ - ⚠️ rename appId to apiKey and add test infrastructure ([fb02c62](https://github.com/23blocks-OS/frontend-sdk/commit/fb02c62))
227
+
228
+ ### ⚠️ Breaking Changes
229
+
230
+ - rename appId to apiKey and add test infrastructure ([fb02c62](https://github.com/23blocks-OS/frontend-sdk/commit/fb02c62))
231
+ The configuration property 'appId' has been renamed to 'apiKey' across all packages. The HTTP header sent to the API changed from 'appid' to 'api-key'.
232
+ - Rename appId to apiKey in BlockConfig interface
233
+ - Update SDK client, Angular providers, and React context
234
+ - Update all documentation with new apiKey examples
235
+ - Add comprehensive test infrastructure:
236
+ - Vitest workspace configuration (unit/integration/workflows)
237
+ - Docker compose for API testing
238
+ - Unit tests for mappers (32 tests passing)
239
+ - Integration test templates for Auth and Search blocks
240
+ - CI workflows for tiered testing (pr-checks, merge-tests, full-tests)
241
+ - Add BACKLOG.md tracking test prerequisites and pending work
242
+ - Add TEST_SUITE_STRATEGY.md documenting tiered testing approach
243
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
244
+ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
245
+
246
+ ### 🧱 Updated Dependencies
247
+
248
+ - Updated @23blocks/jsonapi-codec to 3.0.0
249
+ - Updated @23blocks/contracts to 2.0.0
250
+
251
+ ### ❤️ Thank You
252
+
253
+ - Claude Opus 4.5
254
+ - Juan Pelaez
255
+
256
+ # 4.0.0 (2025-12-15)
257
+
258
+ ### 🩹 Fixes
259
+
260
+ - ⚠️ make confirmSuccessUrl required in SignUpRequest and ResendConfirmationRequest ([1b5fb44](https://github.com/23blocks-OS/frontend-sdk/commit/1b5fb44))
261
+
262
+ ### ⚠️ Breaking Changes
263
+
264
+ - make confirmSuccessUrl required in SignUpRequest and ResendConfirmationRequest ([1b5fb44](https://github.com/23blocks-OS/frontend-sdk/commit/1b5fb44))
265
+ confirmSuccessUrl is now a required field.
266
+ This field is needed for the email confirmation flow to work correctly.
267
+ Applications must provide a redirect URL for users after they confirm their email.
268
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
269
+ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
270
+
271
+ ### ❤️ Thank You
272
+
273
+ - Claude Opus 4.5
274
+ - Juan Pelaez
275
+
276
+ ## 3.1.1 (2025-12-15)
277
+
278
+ ### 🩹 Fixes
279
+
280
+ - add mfa, oauth, avatars, tenants services to AuthenticationBlock ([281f5d6](https://github.com/23blocks-OS/frontend-sdk/commit/281f5d6))
281
+
282
+ ### ❤️ Thank You
283
+
284
+ - Claude Opus 4.5
285
+ - Juan Pelaez
286
+
287
+ ## 3.1.0 (2025-12-15)
288
+
289
+ ### 🚀 Features
290
+
291
+ - add validateEmail, MFA, OAuth, Avatars, Tenants to Auth block and expand CRM block ([48b980f](https://github.com/23blocks-OS/frontend-sdk/commit/48b980f))
292
+
293
+ ### ❤️ Thank You
294
+
295
+ - Claude Opus 4.5
296
+ - Juan Pelaez
297
+
298
+ ## 3.0.3 (2025-12-15)
299
+
300
+ ### 🩹 Fixes
301
+
302
+ - add subscription field for plan assignment on registration ([b3b14b8](https://github.com/23blocks-OS/frontend-sdk/commit/b3b14b8))
303
+
304
+ ### ❤️ Thank You
305
+
306
+ - Claude Opus 4.5
307
+ - Juan Pelaez
308
+
309
+ ## 3.0.2 (2025-12-15)
310
+
311
+ ### 🩹 Fixes
312
+
313
+ - add all missing registration parameters to SignUpRequest ([e1c514c](https://github.com/23blocks-OS/frontend-sdk/commit/e1c514c))
314
+
315
+ ### ❤️ Thank You
316
+
317
+ - Claude Opus 4.5
318
+ - Juan Pelaez
319
+
320
+ ## 3.0.1 (2025-12-15)
321
+
322
+ ### 🩹 Fixes
323
+
324
+ - add confirmSuccessUrl to SignUpRequest and improve error handling ([bf1ad46](https://github.com/23blocks-OS/frontend-sdk/commit/bf1ad46))
325
+
326
+ ### ❤️ Thank You
327
+
328
+ - Claude Opus 4.5
329
+ - Juan Pelaez
330
+
331
+ # 3.0.0 (2025-12-15)
332
+
333
+ ### 🩹 Fixes
334
+
335
+ - ⚠️ wrap all API request parameters with correct Rails object keys ([192ad70](https://github.com/23blocks-OS/frontend-sdk/commit/192ad70))
336
+
337
+ ### ⚠️ Breaking Changes
338
+
339
+ - wrap all API request parameters with correct Rails object keys ([192ad70](https://github.com/23blocks-OS/frontend-sdk/commit/192ad70))
340
+ All service methods now correctly wrap request bodies
341
+ with Rails-expected parameter keys (e.g., `user:`, `contact:`, `order:`).
342
+ This fixes the critical issue where API requests were failing validation
343
+ because parameters were sent flat instead of wrapped.
344
+ Affected blocks:
345
+ - block-authentication: auth, users, guests, apps, subscriptions, api-keys, roles
346
+ - block-crm: contacts, accounts, leads, opportunities, meetings, quotes
347
+ - block-company: companies, departments, teams, team-members, quarters
348
+ - block-content: posts, comments, categories, tags
349
+ - block-products: products, cart, catalog
350
+ - block-sales: orders, order-details, payments, subscriptions
351
+ - block-conversations: messages, groups, draft-messages, notifications
352
+ - block-wallet: wallets, authorization-codes
353
+ - block-files: storage-files, entity-files, file-schemas
354
+ - block-forms: forms, form-schemas, form-sets, form-instances
355
+ - block-assets: assets, asset-events, asset-audits
356
+ - block-campaigns: campaigns, campaign-media, audiences, landing-pages
357
+ - block-geolocation: locations, addresses, areas, regions, routes, bookings, premises
358
+ - block-rewards: rewards, coupons, loyalty, badges
359
+ - block-onboarding: onboardings, flows, user-journeys, user-identities
360
+ - block-university: courses, lessons, enrollments, assignments, submissions
361
+ - block-jarvis: agents, prompts, workflows, conversations
362
+ Consumer API remains unchanged - this is an internal fix.
363
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
364
+ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
365
+
366
+ ### 🧱 Updated Dependencies
367
+
368
+ - Updated @23blocks/jsonapi-codec to 2.0.0
369
+
370
+ ### ❤️ Thank You
371
+
372
+ - Claude Opus 4.5
373
+ - Juan Pelaez
374
+
375
+ # 2.0.0 (2025-12-14)
376
+
377
+ ### 🚀 Features
378
+
379
+ - ⚠️ change appid header to x-api-key for API standards compliance ([bcaf889](https://github.com/23blocks-OS/frontend-sdk/commit/bcaf889))
380
+
381
+ ### ⚠️ Breaking Changes
382
+
383
+ - change appid header to x-api-key for API standards compliance ([bcaf889](https://github.com/23blocks-OS/frontend-sdk/commit/bcaf889))
384
+ The header sent with requests changed from 'appid' to 'x-api-key'. Backend services need to accept 'x-api-key' header.
385
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
386
+ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
387
+
388
+ ### ❤️ Thank You
389
+
390
+ - Claude Opus 4.5
391
+ - Juan Pelaez
392
+
393
+ ## 1.0.5 (2025-12-14)
394
+
395
+ ### 🧱 Updated Dependencies
396
+
397
+ - Updated @23blocks/jsonapi-codec to 1.0.4
398
+ - Updated @23blocks/contracts to 1.0.4
399
+
400
+ ## 1.0.4 (2025-12-14)
401
+
402
+ ### 🧱 Updated Dependencies
403
+
404
+ - Updated @23blocks/jsonapi-codec to 1.0.3
405
+ - Updated @23blocks/contracts to 1.0.3
406
+
407
+ ## 1.0.3 (2025-12-14)
408
+
409
+ ### 🧱 Updated Dependencies
410
+
411
+ - Updated @23blocks/jsonapi-codec to 1.0.2
412
+ - Updated @23blocks/contracts to 1.0.2
413
+
414
+ ## 1.0.2 (2025-12-14)
415
+
416
+ ### 🧱 Updated Dependencies
417
+
418
+ - Updated @23blocks/jsonapi-codec to 1.0.1
419
+ - Updated @23blocks/contracts to 1.0.1
420
+
421
+ ## 1.0.1 (2025-12-13)
422
+
423
+ ### 🩹 Fixes
424
+
425
+ - **block-authentication:** remove getFullName utility from public exports ([6576861](https://github.com/23blocks-OS/frontend-sdk/commit/6576861))
426
+
427
+ ### ❤️ Thank You
428
+
429
+ - Claude Opus 4.5
430
+ - Juan Pelaez
431
+
432
+ # 1.0.0 (2025-12-13)
433
+
434
+ ### 🧱 Updated Dependencies
435
+
436
+ - Updated @23blocks/jsonapi-codec to 1.0.0
437
+ - Updated @23blocks/contracts to 1.0.0
438
+
439
+ ## 0.1.2 (2025-12-13)
440
+
441
+ ### 🧱 Updated Dependencies
442
+
443
+ - Updated @23blocks/jsonapi-codec to 0.1.2
444
+ - Updated @23blocks/contracts to 0.1.2
445
+
446
+ ## 0.1.1 (2025-12-13)
447
+
448
+ ### 🧱 Updated Dependencies
449
+
450
+ - Updated @23blocks/jsonapi-codec to 0.1.1
451
+ - Updated @23blocks/contracts to 0.1.1
452
+
453
+ ## 0.1.0 (2025-12-13)
454
+
455
+ ### 🚀 Features
456
+
457
+ - 23blocks SDK initial release ([ab53789](https://github.com/23blocks-OS/frontend-sdk/commit/ab53789))
458
+
459
+ ### 🧱 Updated Dependencies
460
+
461
+ - Updated @23blocks/jsonapi-codec to 0.1.0
462
+ - Updated @23blocks/contracts to 0.1.0
463
+
464
+ ### ❤️ Thank You
465
+
466
+ - Claude Opus 4.5
467
+ - Juan Pelaez
package/dist/index.esm.js CHANGED
@@ -922,6 +922,48 @@ import { _ } from '@swc/helpers/_/_extends';
922
922
  }
923
923
  };
924
924
 
925
+ /**
926
+ * Service Token mapper
927
+ */ const serviceTokenMapper = {
928
+ type: 'ServiceToken',
929
+ map (resource, _included) {
930
+ var _resource_attributes;
931
+ const attrs = (_resource_attributes = resource.attributes) != null ? _resource_attributes : {};
932
+ var _parseString, _parseString1, _attrs_token_category, _parseString2, _parseDate, _parseDate1;
933
+ return {
934
+ id: resource.id,
935
+ uniqueId: (_parseString = parseString(attrs.unique_id)) != null ? _parseString : resource.id,
936
+ name: (_parseString1 = parseString(attrs.name)) != null ? _parseString1 : '',
937
+ tokenCategory: (_attrs_token_category = attrs.token_category) != null ? _attrs_token_category : 'service',
938
+ scopes: parseStringArray(attrs.scopes),
939
+ status: (_parseString2 = parseString(attrs.status)) != null ? _parseString2 : 'active',
940
+ expiresAt: attrs.expires_at ? parseDate(attrs.expires_at) : null,
941
+ useCount: parseNumber(attrs.use_count),
942
+ lastUsedAt: attrs.last_used_at ? parseDate(attrs.last_used_at) : null,
943
+ createdAt: (_parseDate = parseDate(attrs.created_at)) != null ? _parseDate : new Date(),
944
+ updatedAt: (_parseDate1 = parseDate(attrs.updated_at)) != null ? _parseDate1 : new Date(),
945
+ // Computed attributes
946
+ expired: parseBoolean(attrs.expired),
947
+ active: parseBoolean(attrs.active),
948
+ expiresInSeconds: attrs.expires_in_seconds != null ? parseNumber(attrs.expires_in_seconds) : null
949
+ };
950
+ }
951
+ };
952
+ /**
953
+ * Service Token with JWT mapper (only used on create/regenerate)
954
+ */ const serviceTokenWithJwtMapper = {
955
+ type: 'ServiceToken',
956
+ map (resource, included) {
957
+ var _resource_attributes;
958
+ const attrs = (_resource_attributes = resource.attributes) != null ? _resource_attributes : {};
959
+ const baseToken = serviceTokenMapper.map(resource, included);
960
+ var _parseString;
961
+ return _({}, baseToken, {
962
+ jwt: (_parseString = parseString(attrs.jwt)) != null ? _parseString : ''
963
+ });
964
+ }
965
+ };
966
+
925
967
  /**
926
968
  * Create the auth service
927
969
  */ function createAuthService(transport, _config) {
@@ -1722,6 +1764,49 @@ const subscriptionMapper = {
1722
1764
  };
1723
1765
  }
1724
1766
 
1767
+ /**
1768
+ * Create the service tokens service
1769
+ */ function createServiceTokensService(transport, _config) {
1770
+ return {
1771
+ async list (params) {
1772
+ const queryParams = {};
1773
+ if (params == null ? void 0 : params.page) queryParams['page'] = params.page;
1774
+ if (params == null ? void 0 : params.perPage) queryParams['records'] = params.perPage;
1775
+ if (params == null ? void 0 : params.filter) {
1776
+ for (const [key, value] of Object.entries(params.filter)){
1777
+ queryParams[`filter[${key}]`] = value;
1778
+ }
1779
+ }
1780
+ const response = await transport.get('/service_tokens', {
1781
+ params: queryParams
1782
+ });
1783
+ return decodePageResult(response, serviceTokenMapper);
1784
+ },
1785
+ async get (uniqueId) {
1786
+ const response = await transport.get(`/service_tokens/${uniqueId}`);
1787
+ return decodeOne(response, serviceTokenMapper);
1788
+ },
1789
+ async create (request) {
1790
+ const response = await transport.post('/service_tokens', {
1791
+ service_token: {
1792
+ name: request.name,
1793
+ token_category: request.tokenCategory,
1794
+ scopes: request.scopes,
1795
+ expires_in_days: request.expiresInDays
1796
+ }
1797
+ });
1798
+ return decodeOne(response, serviceTokenWithJwtMapper);
1799
+ },
1800
+ async revoke (uniqueId) {
1801
+ await transport.delete(`/service_tokens/${uniqueId}`);
1802
+ },
1803
+ async regenerate (uniqueId) {
1804
+ const response = await transport.post(`/service_tokens/${uniqueId}/regenerate`);
1805
+ return decodeOne(response, serviceTokenWithJwtMapper);
1806
+ }
1807
+ };
1808
+ }
1809
+
1725
1810
  /**
1726
1811
  * Build filter params for list operations
1727
1812
  */ function buildListParams$3(params) {
@@ -2444,7 +2529,11 @@ const subscriptionMapper = {
2444
2529
  token: request.token,
2445
2530
  subscription: request.subscription,
2446
2531
  role_id: request.roleId
2447
- });
2532
+ }, request.oauthMode ? {
2533
+ headers: {
2534
+ 'X-OAuth-Mode': 'true'
2535
+ }
2536
+ } : undefined);
2448
2537
  const user = decodeOne(response, userMapper);
2449
2538
  var _response_meta_auth_access_token;
2450
2539
  return {
@@ -2461,7 +2550,11 @@ const subscriptionMapper = {
2461
2550
  token: request.token,
2462
2551
  subscription: request.subscription,
2463
2552
  role_id: request.roleId
2464
- });
2553
+ }, request.oauthMode ? {
2554
+ headers: {
2555
+ 'X-OAuth-Mode': 'true'
2556
+ }
2557
+ } : undefined);
2465
2558
  const user = decodeOne(response, userMapper);
2466
2559
  var _response_meta_auth_access_token;
2467
2560
  return {
@@ -3117,6 +3210,7 @@ const tenantUserMapper = {
3117
3210
  roles: createRolesService(transport),
3118
3211
  permissions: createPermissionsService(transport),
3119
3212
  apiKeys: createApiKeysService(transport),
3213
+ serviceTokens: createServiceTokensService(transport),
3120
3214
  mfa: createMfaService(transport),
3121
3215
  oauth: createOAuthService(transport),
3122
3216
  avatars: createAvatarsService(transport),
@@ -3162,6 +3256,7 @@ const tenantUserMapper = {
3162
3256
  'CompanyKey',
3163
3257
  'Tenant',
3164
3258
  'ApiKey',
3259
+ 'ServiceToken',
3165
3260
  'App',
3166
3261
  'Block',
3167
3262
  'Service',
@@ -3184,4 +3279,4 @@ const tenantUserMapper = {
3184
3279
  ]
3185
3280
  };
3186
3281
 
3187
- export { apiKeyMapper, apiKeyWithSecretMapper, authenticationBlockMetadata, companyBlockMapper, companyDetailMapper, companyKeyMapper, companyMapper, createAuthenticationBlock, permissionMapper, roleMapper, tenantMapper, userAvatarMapper, userMapper, userProfileMapper };
3282
+ export { apiKeyMapper, apiKeyWithSecretMapper, authenticationBlockMetadata, companyBlockMapper, companyDetailMapper, companyKeyMapper, companyMapper, createAuthenticationBlock, permissionMapper, roleMapper, serviceTokenMapper, serviceTokenWithJwtMapper, tenantMapper, userAvatarMapper, userMapper, userProfileMapper };
@@ -1,5 +1,5 @@
1
1
  export { createAuthenticationBlock, type AuthenticationBlock, type AuthenticationBlockConfig, authenticationBlockMetadata, } from './lib/authentication.block.js';
2
- export { type User, type Role, type Permission, type UserAvatar, type UserProfile, type Company, type CompanyDetail, type CompanyBlock, type CompanyKey, type Tenant, type SignInRequest, type SignInResponse, type SignUpRequest, type SignUpResponse, type PasswordResetRequest, type PasswordUpdateRequest, type TokenValidationResponse, type RefreshTokenRequest, type RefreshTokenResponse, type OAuthSignInRequest, type MagicLinkRequest, type MagicLinkVerifyRequest, type MfaSetupResponse, type MfaVerifyRequest, type InvitationRequest, type AcceptInvitationRequest, type ResendConfirmationRequest, type ValidateEmailRequest, type ValidateEmailResponse, type ValidateDocumentRequest, type ValidateDocumentResponse, type AuthHeaders, type ApiKey, type ApiKeyWithSecret, type CreateApiKeyRequest, type UpdateApiKeyRequest, type RevokeApiKeyRequest, type MfaSetupResponseFull, type MfaEnableRequest, type MfaDisableRequest, type MfaVerifyRequestFull, type MfaStatusResponse, type MfaVerificationResponse, type MfaOperationResponse, type OAuthSocialLoginRequest, type TenantLoginRequest, type TokenIntrospectionResponse, type TokenRevokeRequest, type TokenRevokeAllRequest, type TokenRevokeResponse, type TenantContextCreateRequest, type TenantInfo, type TenantContextResponse, type TenantContextRevokeRequest, type TenantContextAuditEntry, type UserProfileFull, type ProfileRequest, type UpdateEmailRequest, type UserDeviceFull, type AddDeviceRequest, type UserSearchRequest, type AddUserSubscriptionRequest, type AccountRecoveryRequest, type AccountRecoveryResponse, type CompleteRecoveryRequest, type UserAvatarFull, type CreateAvatarRequest, type AvatarPresignResponse, type MultipartPresignRequest, type MultipartPresignResponse, type MultipartCompleteRequest, type MultipartCompleteResponse, type TenantUserFull, type CreateTenantUserRequest, type ValidateTenantCodeRequest, type ValidateTenantCodeResponse, type SearchTenantRequest, type UpdateTenantUserOnboardingRequest, type UpdateTenantUserSalesRequest, type ResendInvitationRequest, type App, type Block, type Service, type CreateAppRequest, type UpdateAppRequest, type SubscriptionModel, type UserSubscription, type CompanySubscription, type Country, type State, type County, type City, type Currency, type Guest, type MagicLink, type RefreshToken, type UserDevice, type TenantUser, type MailTemplate, type CreateMagicLinkRequest, type RegisterDeviceRequest, type JsonWebKey, type JwksResponse, type RsaKey, type CreateRsaKeyRequest, type RotateRsaKeyRequest, type OidcDiscovery, type OidcAuthorizeRequest, type OidcTokenRequest, type OidcTokenResponse, type OidcUserInfo, } from './lib/types/index.js';
3
- export { type AuthService, type UsersService, type RolesService, type ApiKeysService, type UpdateUserRequest, type UpdateProfileRequest, type CreateRoleRequest, type UpdateRoleRequest, type ApiKeyUsageStats, type MfaService, type OAuthService, type AvatarsService, type TenantsService, type PermissionsService, type CreatePermissionRequest, type UpdatePermissionRequest, type AppsService, type BlocksService, type ServicesRegistryService, type SubscriptionModelsService, type UserSubscriptionsService, type CompanySubscriptionsService, type SubscribeRequest, type CountriesService, type StatesService, type CountiesService, type CitiesService, type CurrenciesService, type GuestsService, type MagicLinksService, type RefreshTokensService, type UserDevicesService, type TenantUsersService, type MailTemplatesService, type JwksService, type AdminRsaKeysService, type OidcService, } from './lib/services/index.js';
4
- export { userMapper, roleMapper, permissionMapper, userAvatarMapper, userProfileMapper, companyMapper, companyDetailMapper, companyBlockMapper, companyKeyMapper, tenantMapper, apiKeyMapper, apiKeyWithSecretMapper, } from './lib/mappers/index.js';
2
+ export { type User, type Role, type Permission, type UserAvatar, type UserProfile, type Company, type CompanyDetail, type CompanyBlock, type CompanyKey, type Tenant, type SignInRequest, type SignInResponse, type SignUpRequest, type SignUpResponse, type PasswordResetRequest, type PasswordUpdateRequest, type TokenValidationResponse, type RefreshTokenRequest, type RefreshTokenResponse, type OAuthSignInRequest, type MagicLinkRequest, type MagicLinkVerifyRequest, type MfaSetupResponse, type MfaVerifyRequest, type InvitationRequest, type AcceptInvitationRequest, type ResendConfirmationRequest, type ValidateEmailRequest, type ValidateEmailResponse, type ValidateDocumentRequest, type ValidateDocumentResponse, type AuthHeaders, type ApiKey, type ApiKeyWithSecret, type CreateApiKeyRequest, type UpdateApiKeyRequest, type RevokeApiKeyRequest, type ServiceToken, type ServiceTokenWithJwt, type ServiceTokenCategory, type CreateServiceTokenRequest, type MfaSetupResponseFull, type MfaEnableRequest, type MfaDisableRequest, type MfaVerifyRequestFull, type MfaStatusResponse, type MfaVerificationResponse, type MfaOperationResponse, type OAuthSocialLoginRequest, type TenantLoginRequest, type TokenIntrospectionResponse, type TokenRevokeRequest, type TokenRevokeAllRequest, type TokenRevokeResponse, type TenantContextCreateRequest, type TenantInfo, type TenantContextResponse, type TenantContextRevokeRequest, type TenantContextAuditEntry, type UserProfileFull, type ProfileRequest, type UpdateEmailRequest, type UserDeviceFull, type AddDeviceRequest, type UserSearchRequest, type AddUserSubscriptionRequest, type AccountRecoveryRequest, type AccountRecoveryResponse, type CompleteRecoveryRequest, type UserAvatarFull, type CreateAvatarRequest, type AvatarPresignResponse, type MultipartPresignRequest, type MultipartPresignResponse, type MultipartCompleteRequest, type MultipartCompleteResponse, type TenantUserFull, type CreateTenantUserRequest, type ValidateTenantCodeRequest, type ValidateTenantCodeResponse, type SearchTenantRequest, type UpdateTenantUserOnboardingRequest, type UpdateTenantUserSalesRequest, type ResendInvitationRequest, type App, type Block, type Service, type CreateAppRequest, type UpdateAppRequest, type SubscriptionModel, type UserSubscription, type CompanySubscription, type Country, type State, type County, type City, type Currency, type Guest, type MagicLink, type RefreshToken, type UserDevice, type TenantUser, type MailTemplate, type CreateMagicLinkRequest, type RegisterDeviceRequest, type JsonWebKey, type JwksResponse, type RsaKey, type CreateRsaKeyRequest, type RotateRsaKeyRequest, type OidcDiscovery, type OidcAuthorizeRequest, type OidcTokenRequest, type OidcTokenResponse, type OidcUserInfo, } from './lib/types/index.js';
3
+ export { type AuthService, type UsersService, type RolesService, type ApiKeysService, type UpdateUserRequest, type UpdateProfileRequest, type CreateRoleRequest, type UpdateRoleRequest, type ApiKeyUsageStats, type ServiceTokensService, type MfaService, type OAuthService, type AvatarsService, type TenantsService, type PermissionsService, type CreatePermissionRequest, type UpdatePermissionRequest, type AppsService, type BlocksService, type ServicesRegistryService, type SubscriptionModelsService, type UserSubscriptionsService, type CompanySubscriptionsService, type SubscribeRequest, type CountriesService, type StatesService, type CountiesService, type CitiesService, type CurrenciesService, type GuestsService, type MagicLinksService, type RefreshTokensService, type UserDevicesService, type TenantUsersService, type MailTemplatesService, type JwksService, type AdminRsaKeysService, type OidcService, } from './lib/services/index.js';
4
+ export { userMapper, roleMapper, permissionMapper, userAvatarMapper, userProfileMapper, companyMapper, companyDetailMapper, companyBlockMapper, companyKeyMapper, tenantMapper, apiKeyMapper, apiKeyWithSecretMapper, serviceTokenMapper, serviceTokenWithJwtMapper, } from './lib/mappers/index.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EACzB,KAAK,mBAAmB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5B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EAErB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EAEtB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAEzB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EAExB,KAAK,WAAW,GACjB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,sBAAsB,EACtB,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC"}
@@ -4,6 +4,7 @@ import { type UsersService } from './services/users.service.js';
4
4
  import { type RolesService } from './services/roles.service.js';
5
5
  import { type PermissionsService } from './services/permissions.service.js';
6
6
  import { type ApiKeysService } from './services/api-keys.service.js';
7
+ import { type ServiceTokensService } from './services/service-tokens.service.js';
7
8
  import { type AppsService, type BlocksService, type ServicesRegistryService } from './services/apps.service.js';
8
9
  import { type SubscriptionModelsService, type UserSubscriptionsService, type CompanySubscriptionsService } from './services/subscriptions.service.js';
9
10
  import { type CountriesService, type StatesService, type CountiesService, type CitiesService, type CurrenciesService } from './services/geography.service.js';
@@ -43,6 +44,10 @@ export interface AuthenticationBlock {
43
44
  * API key management
44
45
  */
45
46
  apiKeys: ApiKeysService;
47
+ /**
48
+ * Service token management for machine-to-machine authentication
49
+ */
50
+ serviceTokens: ServiceTokensService;
46
51
  /**
47
52
  * Multi-factor authentication
48
53
  */
@@ -1 +1 @@
1
- {"version":3,"file":"authentication.block.d.ts","sourceRoot":"","sources":["../../../src/lib/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CAAC;IAEhC;;OAEG;IACH,aAAa,EAAE,oBAAoB,CAAC;IAEpC;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;IAElB;;OAEG;IACH,YAAY,EAAE,mBAAmB,CAAC;IAElC;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;IAElB,uCAAuC;IACvC,MAAM,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACxC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,yBAAyB,GAChC,mBAAmB,CAiCrB;AAED;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;CAavC,CAAC"}
1
+ {"version":3,"file":"authentication.block.d.ts","sourceRoot":"","sources":["../../../src/lib/authentication.block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAA4B,KAAK,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACtG,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAC3F,OAAO,EAA8B,KAAK,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC7G,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAIL,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EACjC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAML,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,eA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,QAAQ,EAAE,uBAAuB,CAAC;IAElC;;OAEG;IACH,kBAAkB,EAAE,yBAAyB,CAAC;IAE9C;;OAEG;IACH,iBAAiB,EAAE,wBAAwB,CAAC;IAE5C;;OAEG;IACH,oBAAoB,EAAE,2BAA2B,CAAC;IAElD;;OAEG;IACH,SAAS,EAAE,gBAAgB,CAAC;IAE5B;;OAEG;IACH,MAAM,EAAE,aAAa,CAAC;IAEtB;;OAEG;IACH,QAAQ,EAAE,eAAe,CAAC;IAE1B;;OAEG;IACH,MAAM,EAAE,aAAa,CAAC;IAEtB;;OAEG;IACH,UAAU,EAAE,iBAAiB,CAAC;IAE9B;;OAEG;IACH,MAAM,EAAE,aAAa,CAAC;IAEtB;;OAEG;IACH,UAAU,EAAE,iBAAiB,CAAC;IAE9B;;OAEG;IACH,aAAa,EAAE,oBAAoB,CAAC;IAEpC;;OAEG;IACH,WAAW,EAAE,kBAAkB,CAAC;IAEhC;;OAEG;IACH,WAAW,EAAE,kBAAkB,CAAC;IAEhC;;OAEG;IACH,aAAa,EAAE,oBAAoB,CAAC;IAEpC;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;IAElB;;OAEG;IACH,YAAY,EAAE,mBAAmB,CAAC;IAElC;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;IAElB,uCAAuC;IACvC,MAAM,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACxC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,yBAAyB,GAChC,mBAAmB,CAkCrB;AAED;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;CAavC,CAAC"}
@@ -5,5 +5,6 @@ export { appMapper, blockMapper, serviceMapper } from './app.mapper.js';
5
5
  export { subscriptionModelMapper, userSubscriptionMapper, companySubscriptionMapper } from './subscription.mapper.js';
6
6
  export { countryMapper, stateMapper, countyMapper, cityMapper, currencyMapper } from './geography.mapper.js';
7
7
  export { guestMapper, magicLinkMapper, refreshTokenMapper, userDeviceMapper, tenantUserMapper, mailTemplateMapper, } from './guest.mapper.js';
8
+ export { serviceTokenMapper, serviceTokenWithJwtMapper } from './service-token.mapper.js';
8
9
  export { parseString, parseDate, parseBoolean, parseNumber, parseStringArray } from './utils.js';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGjH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAG7H,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAG3E,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGxE,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAGtH,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG7G,OAAO,EACL,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGjH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAG7H,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAG3E,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGxE,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAGtH,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG7G,OAAO,EACL,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAG1F,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ResourceMapper } from '@23blocks/jsonapi-codec';
2
+ import type { ServiceToken, ServiceTokenWithJwt } from '../types/index.js';
3
+ /**
4
+ * Service Token mapper
5
+ */
6
+ export declare const serviceTokenMapper: ResourceMapper<ServiceToken>;
7
+ /**
8
+ * Service Token with JWT mapper (only used on create/regenerate)
9
+ */
10
+ export declare const serviceTokenWithJwtMapper: ResourceMapper<ServiceTokenWithJwt>;
11
+ //# sourceMappingURL=service-token.mapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-token.mapper.d.ts","sourceRoot":"","sources":["../../../../src/lib/mappers/service-token.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAgC,MAAM,yBAAyB,CAAC;AAC5F,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG3E;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,YAAY,CAyB3D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,cAAc,CAAC,mBAAmB,CAYzE,CAAC"}
@@ -7,6 +7,7 @@ export { createAppsService, createBlocksService, createServicesRegistryService,
7
7
  export { createSubscriptionModelsService, createUserSubscriptionsService, createCompanySubscriptionsService, type SubscriptionModelsService, type UserSubscriptionsService, type CompanySubscriptionsService, type SubscribeRequest, } from './subscriptions.service.js';
8
8
  export { createCountriesService, createStatesService, createCountiesService, createCitiesService, createCurrenciesService, type CountriesService, type StatesService, type CountiesService, type CitiesService, type CurrenciesService, } from './geography.service.js';
9
9
  export { createGuestsService, createMagicLinksService, createRefreshTokensService, createUserDevicesService, createTenantUsersService, createMailTemplatesService, type GuestsService, type MagicLinksService, type RefreshTokensService, type UserDevicesService, type TenantUsersService, type MailTemplatesService, } from './guests.service.js';
10
+ export { createServiceTokensService, type ServiceTokensService } from './service-tokens.service.js';
10
11
  export { createMfaService, type MfaService } from './mfa.service.js';
11
12
  export { createOAuthService, type OAuthService } from './oauth.service.js';
12
13
  export { createAvatarsService, type AvatarsService } from './avatars.service.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC9H,OAAO,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC3H,OAAO,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AAK,aAAa,EAClB,KAAK,iBAAiB,GACvB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,GAC1B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,0BAA0B,EAAE,KAAK,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGpG,OAAO,EAAE,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGrE,OAAO,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAG3E,OAAO,EAAE,oBAAoB,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGjF,OAAO,EAAE,oBAAoB,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGjF,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,KAAK,WAAW,EAChB,KAAK,mBAAmB,GACzB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"oauth.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/oauth.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EACV,uBAAuB,EACvB,kBAAkB,EAClB,0BAA0B,EAC1B,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,EACvB,cAAc,EACf,MAAM,mBAAmB,CAAC;AAG3B;;GAEG;AACH,MAAM,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,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAEvF;;;;OAIG;IACH,qBAAqB,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAAC;CAC7D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,YAAY,CAuQxF"}
@@ -0,0 +1,40 @@
1
+ import type { Transport, PageResult, ListParams } from '@23blocks/contracts';
2
+ import type { ServiceToken, ServiceTokenWithJwt, CreateServiceTokenRequest } from '../types/index.js';
3
+ import type { AuthenticationBlockConfig } from '../authentication.block.js';
4
+ /**
5
+ * Service Tokens service - create and manage machine-to-machine authentication tokens.
6
+ *
7
+ * Supports two token categories:
8
+ * - `agent` — Short-lived tokens (1-24h) for AI agents
9
+ * - `service` — Long-lived tokens (30-365 days) for block-to-block communication
10
+ *
11
+ * @note `create()` and `regenerate()` return `ServiceTokenWithJwt` which includes the JWT.
12
+ * The JWT is only available at creation/regeneration time and cannot be retrieved later.
13
+ */
14
+ export interface ServiceTokensService {
15
+ /**
16
+ * List all service tokens
17
+ */
18
+ list(params?: ListParams): Promise<PageResult<ServiceToken>>;
19
+ /**
20
+ * Get a service token by unique ID
21
+ */
22
+ get(uniqueId: string): Promise<ServiceToken>;
23
+ /**
24
+ * Create a new service token (returns JWT only once)
25
+ */
26
+ create(request: CreateServiceTokenRequest): Promise<ServiceTokenWithJwt>;
27
+ /**
28
+ * Revoke (soft delete) a service token
29
+ */
30
+ revoke(uniqueId: string): Promise<void>;
31
+ /**
32
+ * Regenerate a service token's JWT (returns new JWT only once)
33
+ */
34
+ regenerate(uniqueId: string): Promise<ServiceTokenWithJwt>;
35
+ }
36
+ /**
37
+ * Create the service tokens service
38
+ */
39
+ export declare function createServiceTokensService(transport: Transport, _config: AuthenticationBlockConfig): ServiceTokensService;
40
+ //# sourceMappingURL=service-tokens.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-tokens.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/service-tokens.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE7E,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAE5E;;;;;;;;;GASG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IAE7D;;OAEG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAE7C;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEzE;;OAEG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;OAEG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;CAC5D;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,yBAAyB,GACjC,oBAAoB,CAqDtB"}
@@ -2,6 +2,7 @@ export { type User, type Role, type Permission, type UserAvatar, type UserProfil
2
2
  export { type Company, type CompanyDetail, type CompanyBlock, type CompanyKey, type Tenant, } from './company.js';
3
3
  export { type SignInRequest, type SignInResponse, type SignUpRequest, type SignUpResponse, type PasswordResetRequest, type PasswordUpdateRequest, type TokenValidationResponse, type RefreshTokenRequest, type RefreshTokenResponse, type OAuthSignInRequest, type MagicLinkRequest, type MagicLinkVerifyRequest, type MfaSetupResponse, type MfaVerifyRequest, type InvitationRequest, type AcceptInvitationRequest, type ResendConfirmationRequest, type ValidateEmailRequest, type ValidateEmailResponse, type ValidateDocumentRequest, type ValidateDocumentResponse, type AuthHeaders, } from './auth.js';
4
4
  export { type ApiKey, type ApiKeyWithSecret, type CreateApiKeyRequest, type UpdateApiKeyRequest, type RevokeApiKeyRequest, } from './api-key.js';
5
+ export { type ServiceToken, type ServiceTokenWithJwt, type ServiceTokenCategory, type CreateServiceTokenRequest, } from './service-token.js';
5
6
  export { type App, type Block, type Service, type CreateAppRequest, type UpdateAppRequest, } from './app.js';
6
7
  export { type SubscriptionModel, type UserSubscription, type CompanySubscription, } from './subscription.js';
7
8
  export { type Country, type State, type County, type City, type Currency, } from './geography.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,IAAI,EACT,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,WAAW,GACZ,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,MAAM,GACZ,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,E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,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,YAAY,GAClB,MAAM,WAAW,CAAC"}
@@ -5,6 +5,8 @@ export interface OAuthSocialLoginRequest {
5
5
  token: string;
6
6
  subscription?: string;
7
7
  roleId?: string;
8
+ /** When true, sends X-OAuth-Mode header to return an OAuth 2.0 token pair (access + refresh tokens). */
9
+ oauthMode?: boolean;
8
10
  }
9
11
  /**
10
12
  * Tenant Login Request
@@ -1 +1 @@
1
- {"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/oauth.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,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AE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;CACjB"}
@@ -0,0 +1,39 @@
1
+ import type { IdentityCore } from '@23blocks/contracts';
2
+ /**
3
+ * Token category for service tokens
4
+ */
5
+ export type ServiceTokenCategory = 'agent' | 'service';
6
+ /**
7
+ * Service Token entity for machine-to-machine authentication.
8
+ *
9
+ * - `agent` tokens are short-lived (1-24h) for AI agents
10
+ * - `service` tokens are long-lived (30-365 days) for block-to-block communication
11
+ */
12
+ export interface ServiceToken extends IdentityCore {
13
+ name: string;
14
+ tokenCategory: ServiceTokenCategory;
15
+ scopes: string[];
16
+ status: string;
17
+ expiresAt: Date | null;
18
+ useCount: number;
19
+ lastUsedAt: Date | null;
20
+ expired: boolean;
21
+ active: boolean;
22
+ expiresInSeconds: number | null;
23
+ }
24
+ /**
25
+ * Service Token with JWT (only returned on create and regenerate)
26
+ */
27
+ export interface ServiceTokenWithJwt extends ServiceToken {
28
+ jwt: string;
29
+ }
30
+ /**
31
+ * Create service token request
32
+ */
33
+ export interface CreateServiceTokenRequest {
34
+ name: string;
35
+ tokenCategory: ServiceTokenCategory;
36
+ scopes?: string[];
37
+ expiresInDays?: number;
38
+ }
39
+ //# sourceMappingURL=service-token.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-token.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/service-token.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,SAAS,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,WAAW,YAAa,SAAQ,YAAY;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,oBAAoB,CAAC;IACpC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IAGxB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACvD,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,oBAAoB,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@23blocks/block-authentication",
3
- "version": "7.0.0",
3
+ "version": "7.1.0",
4
4
  "description": "Authentication block for 23blocks SDK - users, roles, API keys, subscriptions",
5
5
  "license": "MIT",
6
6
  "author": "23blocks <hello@23blocks.com>",
@@ -46,6 +46,8 @@
46
46
  },
47
47
  "files": [
48
48
  "dist",
49
+ "CHANGELOG.md",
50
+ "README.md",
49
51
  "!**/*.tsbuildinfo"
50
52
  ],
51
53
  "nx": {