@23blocks/block-authentication 7.0.0 → 7.1.1

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,474 @@
1
+ ## 7.1.1 (2026-03-03)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated @23blocks/jsonapi-codec to 3.3.2
6
+ - Updated @23blocks/contracts to 2.3.2
7
+
8
+ ## 7.1.0 (2026-02-24)
9
+
10
+ ### 🚀 Features
11
+
12
+ - **@23blocks/block-authentication:** add service tokens, oauthMode, and CI simplification ([3cea02d](https://github.com/23blocks-OS/frontend-sdk/commit/3cea02d))
13
+
14
+ ### ❤️ Thank You
15
+
16
+ - Claude Opus 4.6
17
+ - Juan Pelaez
18
+
19
+ # 7.0.0 (2026-02-20)
20
+
21
+ ### 🩹 Fixes
22
+
23
+ - align mapper tests with implementation and fix user mapper fallbacks ([1ac0b6e](https://github.com/23blocks-OS/frontend-sdk/commit/1ac0b6e))
24
+ - ⚠️ replace appId with apiKey across all block configs to align with BlockConfig contract ([f81626d](https://github.com/23blocks-OS/frontend-sdk/commit/f81626d))
25
+ - resolve typecheck errors across all block packages ([6089324](https://github.com/23blocks-OS/frontend-sdk/commit/6089324))
26
+
27
+ ### ⚠️ Breaking Changes
28
+
29
+ - replace appId with apiKey across all block configs to align with BlockConfig contract ([f81626d](https://github.com/23blocks-OS/frontend-sdk/commit/f81626d))
30
+ Block config no longer accepts appId. Use apiKey instead.
31
+ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
32
+
33
+ ### 🧱 Updated Dependencies
34
+
35
+ - Updated @23blocks/jsonapi-codec to 3.3.1
36
+ - Updated @23blocks/contracts to 2.3.1
37
+
38
+ ### ❤️ Thank You
39
+
40
+ - Claude Opus 4.6
41
+ - Juan Pelaez
42
+
43
+ ## 6.5.0 (2026-02-17)
44
+
45
+ ### 🚀 Features
46
+
47
+ - add health() method to all 18 blocks for service connectivity checks ([73514a3](https://github.com/23blocks-OS/frontend-sdk/commit/73514a3))
48
+
49
+ ### 🧱 Updated Dependencies
50
+
51
+ - Updated @23blocks/jsonapi-codec to 3.3.0
52
+ - Updated @23blocks/contracts to 2.3.0
53
+
54
+ ### ❤️ Thank You
55
+
56
+ - Claude Opus 4.6
57
+ - Juan Pelaez
58
+
59
+ ## 6.4.0 (2026-02-08)
60
+
61
+ ### 🚀 Features
62
+
63
+ - add comprehensive JSDoc documentation and llms.txt for AI agent consumption ([fd97df2](https://github.com/23blocks-OS/frontend-sdk/commit/fd97df2))
64
+
65
+ ### 🧱 Updated Dependencies
66
+
67
+ - Updated @23blocks/jsonapi-codec to 3.2.0
68
+ - Updated @23blocks/contracts to 2.2.0
69
+
70
+ ### ❤️ Thank You
71
+
72
+ - Claude Opus 4.6
73
+ - Juan Pelaez
74
+
75
+ ## 6.3.6 (2026-02-07)
76
+
77
+ ### 🩹 Fixes
78
+
79
+ - replace misleading `id` params with `uniqueId` across SDK ([6dfc65b](https://github.com/23blocks-OS/frontend-sdk/commit/6dfc65b))
80
+
81
+ ### ❤️ Thank You
82
+
83
+ - Claude Opus 4.6
84
+ - Juan Pelaez
85
+
86
+ ## 6.3.5 (2026-02-07)
87
+
88
+ ### 🧱 Updated Dependencies
89
+
90
+ - Updated @23blocks/jsonapi-codec to 3.1.3
91
+ - Updated @23blocks/contracts to 2.1.3
92
+
93
+ ## 6.3.4 (2026-02-06)
94
+
95
+ ### 🧱 Updated Dependencies
96
+
97
+ - Updated @23blocks/jsonapi-codec to 3.1.2
98
+ - Updated @23blocks/contracts to 2.1.2
99
+
100
+ ## 6.3.3 (2026-01-28)
101
+
102
+ ### 🩹 Fixes
103
+
104
+ - **auth,search:** use simple pagination params instead of JSON:API style ([52ac9bd](https://github.com/23blocks-OS/frontend-sdk/commit/52ac9bd))
105
+
106
+ ### ❤️ Thank You
107
+
108
+ - Claude Opus 4.5
109
+ - Juan Pelaez
110
+
111
+ ## 6.3.2 (2026-01-20)
112
+
113
+ ### 🧱 Updated Dependencies
114
+
115
+ - Updated @23blocks/jsonapi-codec to 3.1.1
116
+ - Updated @23blocks/contracts to 2.1.1
117
+
118
+ ## 6.3.1 (2026-01-05)
119
+
120
+ ### 🚀 Features
121
+
122
+ - ⚠️ **angular:** complete all Angular services with full block coverage ([e806bfc](https://github.com/23blocks-OS/frontend-sdk/commit/e806bfc))
123
+
124
+ ### ⚠️ Breaking Changes
125
+
126
+ - **angular:** complete all Angular services with full block coverage ([e806bfc](https://github.com/23blocks-OS/frontend-sdk/commit/e806bfc))
127
+ rawBlock renamed to {serviceName}Block across all services
128
+ Changes:
129
+ - Rename rawBlock to proper names (authenticationBlock, searchBlock, etc.) in all 17 Angular services
130
+ - Complete AuthenticationService with all 25 block services (permissions, apps, subscriptions, geography, guests, magic links, etc.)
131
+ - Complete CrmService with all 22 block services (contact events, lead follows, meeting participants, zoom, calendar, etc.)
132
+ - Complete GeolocationService with all 19 block services (premise events, route tracker, location hours/images/slots/taxes/groups, identities)
133
+ - Complete ConversationsService with all 14 block services (draft messages, group invites, websocket tokens, contexts, availabilities, meetings, web notifications)
134
+ - Complete FilesService with all 9 block services (user files, file categories, file tags, delegations, file access, file access requests)
135
+ - Complete AssetsService with all 12 block services (events with images/reports, audits, operations, alerts, users)
136
+ - Complete CampaignsService with all 12 block services (campaign media, landing pages, audiences, templates, media results)
137
+ - Complete CompanyService with positions and employee assignments
138
+ - Complete RewardsService with fixed method signatures for loyalty rules
139
+ - Complete SalesService with Stripe and MercadoPago payment services
140
+ - Complete JarvisService with AI models, entities, clusters, workflows, agent runtime
141
+ - Complete OnboardingService with onboard flow, mail templates, remarketing
142
+ - Complete UniversityService with placements, calendars, matches, attendance, notes
143
+ - Export missing types from block packages
144
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
145
+ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
146
+
147
+ ### ❤️ Thank You
148
+
149
+ - Claude Opus 4.5
150
+ - Juan Pelaez
151
+
152
+ ## 6.3.0 (2026-01-04)
153
+
154
+ ### 🚀 Features
155
+
156
+ - implement LOW priority services across SDK blocks ([9296d12](https://github.com/23blocks-OS/frontend-sdk/commit/9296d12))
157
+
158
+ ### ❤️ Thank You
159
+
160
+ - Claude Opus 4.5
161
+ - Juan Pelaez
162
+
163
+ ## 6.2.0 (2026-01-04)
164
+
165
+ ### 🚀 Features
166
+
167
+ - implement HIGH priority missing services ([ab6141f](https://github.com/23blocks-OS/frontend-sdk/commit/ab6141f))
168
+
169
+ ### ❤️ Thank You
170
+
171
+ - Claude Opus 4.5
172
+ - Juan Pelaez
173
+
174
+ ## 6.1.0 (2026-01-01)
175
+
176
+ ### 🧱 Updated Dependencies
177
+
178
+ - Updated @23blocks/jsonapi-codec to 3.1.0
179
+ - Updated @23blocks/contracts to 2.1.0
180
+
181
+ ## 6.0.2 (2026-01-01)
182
+
183
+ ### 🩹 Fixes
184
+
185
+ - add missing fields to update request types ([2d54e25](https://github.com/23blocks-OS/frontend-sdk/commit/2d54e25))
186
+
187
+ ### ❤️ Thank You
188
+
189
+ - Claude Opus 4.5
190
+ - Juan Pelaez
191
+
192
+ ## 6.0.1 (2025-12-31)
193
+
194
+ ### 🩹 Fixes
195
+
196
+ - replace PATCH with PUT across all services ([6339334](https://github.com/23blocks-OS/frontend-sdk/commit/6339334))
197
+
198
+ ### ❤️ Thank You
199
+
200
+ - Claude Opus 4.5
201
+ - Juan Pelaez
202
+
203
+ # 6.0.0 (2025-12-17)
204
+
205
+ ### 🩹 Fixes
206
+
207
+ - ⚠️ use x-api-key header for API standards compliance ([8206652](https://github.com/23blocks-OS/frontend-sdk/commit/8206652))
208
+
209
+ ### ⚠️ Breaking Changes
210
+
211
+ - use x-api-key header for API standards compliance ([8206652](https://github.com/23blocks-OS/frontend-sdk/commit/8206652))
212
+ The HTTP header sent with API requests changed from
213
+ 'api-key' to 'x-api-key'. Backend services need to accept 'x-api-key' header.
214
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
215
+ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
216
+
217
+ ### ❤️ Thank You
218
+
219
+ - Claude Opus 4.5
220
+ - Juan Pelaez
221
+
222
+ ## 5.0.1 (2025-12-17)
223
+
224
+ ### 🧱 Updated Dependencies
225
+
226
+ - Updated @23blocks/jsonapi-codec to 3.0.1
227
+ - Updated @23blocks/contracts to 2.0.1
228
+
229
+ # 5.0.0 (2025-12-17)
230
+
231
+ ### 🚀 Features
232
+
233
+ - ⚠️ rename appId to apiKey and add test infrastructure ([fb02c62](https://github.com/23blocks-OS/frontend-sdk/commit/fb02c62))
234
+
235
+ ### ⚠️ Breaking Changes
236
+
237
+ - rename appId to apiKey and add test infrastructure ([fb02c62](https://github.com/23blocks-OS/frontend-sdk/commit/fb02c62))
238
+ 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'.
239
+ - Rename appId to apiKey in BlockConfig interface
240
+ - Update SDK client, Angular providers, and React context
241
+ - Update all documentation with new apiKey examples
242
+ - Add comprehensive test infrastructure:
243
+ - Vitest workspace configuration (unit/integration/workflows)
244
+ - Docker compose for API testing
245
+ - Unit tests for mappers (32 tests passing)
246
+ - Integration test templates for Auth and Search blocks
247
+ - CI workflows for tiered testing (pr-checks, merge-tests, full-tests)
248
+ - Add BACKLOG.md tracking test prerequisites and pending work
249
+ - Add TEST_SUITE_STRATEGY.md documenting tiered testing approach
250
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
251
+ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
252
+
253
+ ### 🧱 Updated Dependencies
254
+
255
+ - Updated @23blocks/jsonapi-codec to 3.0.0
256
+ - Updated @23blocks/contracts to 2.0.0
257
+
258
+ ### ❤️ Thank You
259
+
260
+ - Claude Opus 4.5
261
+ - Juan Pelaez
262
+
263
+ # 4.0.0 (2025-12-15)
264
+
265
+ ### 🩹 Fixes
266
+
267
+ - ⚠️ make confirmSuccessUrl required in SignUpRequest and ResendConfirmationRequest ([1b5fb44](https://github.com/23blocks-OS/frontend-sdk/commit/1b5fb44))
268
+
269
+ ### ⚠️ Breaking Changes
270
+
271
+ - make confirmSuccessUrl required in SignUpRequest and ResendConfirmationRequest ([1b5fb44](https://github.com/23blocks-OS/frontend-sdk/commit/1b5fb44))
272
+ confirmSuccessUrl is now a required field.
273
+ This field is needed for the email confirmation flow to work correctly.
274
+ Applications must provide a redirect URL for users after they confirm their email.
275
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
276
+ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
277
+
278
+ ### ❤️ Thank You
279
+
280
+ - Claude Opus 4.5
281
+ - Juan Pelaez
282
+
283
+ ## 3.1.1 (2025-12-15)
284
+
285
+ ### 🩹 Fixes
286
+
287
+ - add mfa, oauth, avatars, tenants services to AuthenticationBlock ([281f5d6](https://github.com/23blocks-OS/frontend-sdk/commit/281f5d6))
288
+
289
+ ### ❤️ Thank You
290
+
291
+ - Claude Opus 4.5
292
+ - Juan Pelaez
293
+
294
+ ## 3.1.0 (2025-12-15)
295
+
296
+ ### 🚀 Features
297
+
298
+ - add validateEmail, MFA, OAuth, Avatars, Tenants to Auth block and expand CRM block ([48b980f](https://github.com/23blocks-OS/frontend-sdk/commit/48b980f))
299
+
300
+ ### ❤️ Thank You
301
+
302
+ - Claude Opus 4.5
303
+ - Juan Pelaez
304
+
305
+ ## 3.0.3 (2025-12-15)
306
+
307
+ ### 🩹 Fixes
308
+
309
+ - add subscription field for plan assignment on registration ([b3b14b8](https://github.com/23blocks-OS/frontend-sdk/commit/b3b14b8))
310
+
311
+ ### ❤️ Thank You
312
+
313
+ - Claude Opus 4.5
314
+ - Juan Pelaez
315
+
316
+ ## 3.0.2 (2025-12-15)
317
+
318
+ ### 🩹 Fixes
319
+
320
+ - add all missing registration parameters to SignUpRequest ([e1c514c](https://github.com/23blocks-OS/frontend-sdk/commit/e1c514c))
321
+
322
+ ### ❤️ Thank You
323
+
324
+ - Claude Opus 4.5
325
+ - Juan Pelaez
326
+
327
+ ## 3.0.1 (2025-12-15)
328
+
329
+ ### 🩹 Fixes
330
+
331
+ - add confirmSuccessUrl to SignUpRequest and improve error handling ([bf1ad46](https://github.com/23blocks-OS/frontend-sdk/commit/bf1ad46))
332
+
333
+ ### ❤️ Thank You
334
+
335
+ - Claude Opus 4.5
336
+ - Juan Pelaez
337
+
338
+ # 3.0.0 (2025-12-15)
339
+
340
+ ### 🩹 Fixes
341
+
342
+ - ⚠️ wrap all API request parameters with correct Rails object keys ([192ad70](https://github.com/23blocks-OS/frontend-sdk/commit/192ad70))
343
+
344
+ ### ⚠️ Breaking Changes
345
+
346
+ - wrap all API request parameters with correct Rails object keys ([192ad70](https://github.com/23blocks-OS/frontend-sdk/commit/192ad70))
347
+ All service methods now correctly wrap request bodies
348
+ with Rails-expected parameter keys (e.g., `user:`, `contact:`, `order:`).
349
+ This fixes the critical issue where API requests were failing validation
350
+ because parameters were sent flat instead of wrapped.
351
+ Affected blocks:
352
+ - block-authentication: auth, users, guests, apps, subscriptions, api-keys, roles
353
+ - block-crm: contacts, accounts, leads, opportunities, meetings, quotes
354
+ - block-company: companies, departments, teams, team-members, quarters
355
+ - block-content: posts, comments, categories, tags
356
+ - block-products: products, cart, catalog
357
+ - block-sales: orders, order-details, payments, subscriptions
358
+ - block-conversations: messages, groups, draft-messages, notifications
359
+ - block-wallet: wallets, authorization-codes
360
+ - block-files: storage-files, entity-files, file-schemas
361
+ - block-forms: forms, form-schemas, form-sets, form-instances
362
+ - block-assets: assets, asset-events, asset-audits
363
+ - block-campaigns: campaigns, campaign-media, audiences, landing-pages
364
+ - block-geolocation: locations, addresses, areas, regions, routes, bookings, premises
365
+ - block-rewards: rewards, coupons, loyalty, badges
366
+ - block-onboarding: onboardings, flows, user-journeys, user-identities
367
+ - block-university: courses, lessons, enrollments, assignments, submissions
368
+ - block-jarvis: agents, prompts, workflows, conversations
369
+ Consumer API remains unchanged - this is an internal fix.
370
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
371
+ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
372
+
373
+ ### 🧱 Updated Dependencies
374
+
375
+ - Updated @23blocks/jsonapi-codec to 2.0.0
376
+
377
+ ### ❤️ Thank You
378
+
379
+ - Claude Opus 4.5
380
+ - Juan Pelaez
381
+
382
+ # 2.0.0 (2025-12-14)
383
+
384
+ ### 🚀 Features
385
+
386
+ - ⚠️ change appid header to x-api-key for API standards compliance ([bcaf889](https://github.com/23blocks-OS/frontend-sdk/commit/bcaf889))
387
+
388
+ ### ⚠️ Breaking Changes
389
+
390
+ - change appid header to x-api-key for API standards compliance ([bcaf889](https://github.com/23blocks-OS/frontend-sdk/commit/bcaf889))
391
+ The header sent with requests changed from 'appid' to 'x-api-key'. Backend services need to accept 'x-api-key' header.
392
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
393
+ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
394
+
395
+ ### ❤️ Thank You
396
+
397
+ - Claude Opus 4.5
398
+ - Juan Pelaez
399
+
400
+ ## 1.0.5 (2025-12-14)
401
+
402
+ ### 🧱 Updated Dependencies
403
+
404
+ - Updated @23blocks/jsonapi-codec to 1.0.4
405
+ - Updated @23blocks/contracts to 1.0.4
406
+
407
+ ## 1.0.4 (2025-12-14)
408
+
409
+ ### 🧱 Updated Dependencies
410
+
411
+ - Updated @23blocks/jsonapi-codec to 1.0.3
412
+ - Updated @23blocks/contracts to 1.0.3
413
+
414
+ ## 1.0.3 (2025-12-14)
415
+
416
+ ### 🧱 Updated Dependencies
417
+
418
+ - Updated @23blocks/jsonapi-codec to 1.0.2
419
+ - Updated @23blocks/contracts to 1.0.2
420
+
421
+ ## 1.0.2 (2025-12-14)
422
+
423
+ ### 🧱 Updated Dependencies
424
+
425
+ - Updated @23blocks/jsonapi-codec to 1.0.1
426
+ - Updated @23blocks/contracts to 1.0.1
427
+
428
+ ## 1.0.1 (2025-12-13)
429
+
430
+ ### 🩹 Fixes
431
+
432
+ - **block-authentication:** remove getFullName utility from public exports ([6576861](https://github.com/23blocks-OS/frontend-sdk/commit/6576861))
433
+
434
+ ### ❤️ Thank You
435
+
436
+ - Claude Opus 4.5
437
+ - Juan Pelaez
438
+
439
+ # 1.0.0 (2025-12-13)
440
+
441
+ ### 🧱 Updated Dependencies
442
+
443
+ - Updated @23blocks/jsonapi-codec to 1.0.0
444
+ - Updated @23blocks/contracts to 1.0.0
445
+
446
+ ## 0.1.2 (2025-12-13)
447
+
448
+ ### 🧱 Updated Dependencies
449
+
450
+ - Updated @23blocks/jsonapi-codec to 0.1.2
451
+ - Updated @23blocks/contracts to 0.1.2
452
+
453
+ ## 0.1.1 (2025-12-13)
454
+
455
+ ### 🧱 Updated Dependencies
456
+
457
+ - Updated @23blocks/jsonapi-codec to 0.1.1
458
+ - Updated @23blocks/contracts to 0.1.1
459
+
460
+ ## 0.1.0 (2025-12-13)
461
+
462
+ ### 🚀 Features
463
+
464
+ - 23blocks SDK initial release ([ab53789](https://github.com/23blocks-OS/frontend-sdk/commit/ab53789))
465
+
466
+ ### 🧱 Updated Dependencies
467
+
468
+ - Updated @23blocks/jsonapi-codec to 0.1.0
469
+ - Updated @23blocks/contracts to 0.1.0
470
+
471
+ ### ❤️ Thank You
472
+
473
+ - Claude Opus 4.5
474
+ - 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.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cAAc,EAEnB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAE5B,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAE5B,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/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,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,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAOL,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAAwB,KAAK,cAAc,E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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,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,EAC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viceMapper } 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,C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,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,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,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AC,CAAC;IAE9E;;;;OAIG;IACH,mBAAmB,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAEzF;;OAEG;IACH,mBAAmB,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,gBA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C,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,GAC7B,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,MAAM,EACX,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;I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,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.1",
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": {