@api-client/core 0.14.2 → 0.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/build/src/browser.d.ts +1 -1
  2. package/build/src/browser.d.ts.map +1 -1
  3. package/build/src/browser.js +1 -0
  4. package/build/src/browser.js.map +1 -1
  5. package/build/src/events/BaseEvents.d.ts +4 -0
  6. package/build/src/events/BaseEvents.d.ts.map +1 -1
  7. package/build/src/events/BaseEvents.js.map +1 -1
  8. package/build/src/index.d.ts +2 -1
  9. package/build/src/index.d.ts.map +1 -1
  10. package/build/src/index.js +2 -0
  11. package/build/src/index.js.map +1 -1
  12. package/build/src/modeling/ApiFile.d.ts +23 -0
  13. package/build/src/modeling/ApiFile.d.ts.map +1 -0
  14. package/build/src/modeling/ApiFile.js +44 -0
  15. package/build/src/modeling/ApiFile.js.map +1 -0
  16. package/build/src/modeling/ApiModel.d.ts +159 -0
  17. package/build/src/modeling/ApiModel.d.ts.map +1 -0
  18. package/build/src/modeling/ApiModel.js +237 -0
  19. package/build/src/modeling/ApiModel.js.map +1 -0
  20. package/build/src/modeling/DataDomain.d.ts +1 -1
  21. package/build/src/modeling/DataDomain.d.ts.map +1 -1
  22. package/build/src/modeling/DataDomain.js +1 -3
  23. package/build/src/modeling/DataDomain.js.map +1 -1
  24. package/build/src/modeling/DomainEntity.js +1 -1
  25. package/build/src/modeling/DomainEntity.js.map +1 -1
  26. package/build/src/modeling/DomainFile.d.ts +1 -2
  27. package/build/src/modeling/DomainFile.d.ts.map +1 -1
  28. package/build/src/modeling/DomainFile.js +3 -41
  29. package/build/src/modeling/DomainFile.js.map +1 -1
  30. package/build/src/modeling/Semantics.d.ts +55 -8
  31. package/build/src/modeling/Semantics.d.ts.map +1 -1
  32. package/build/src/modeling/Semantics.js +62 -8
  33. package/build/src/modeling/Semantics.js.map +1 -1
  34. package/build/src/modeling/amf/ShapeGenerator.d.ts.map +1 -1
  35. package/build/src/modeling/amf/ShapeGenerator.js.map +1 -1
  36. package/build/src/modeling/types.d.ts +491 -0
  37. package/build/src/modeling/types.d.ts.map +1 -1
  38. package/build/src/modeling/types.js.map +1 -1
  39. package/build/src/models/kinds.d.ts +3 -0
  40. package/build/src/models/kinds.d.ts.map +1 -1
  41. package/build/src/models/kinds.js +3 -0
  42. package/build/src/models/kinds.js.map +1 -1
  43. package/build/src/models/store/File.d.ts +19 -2
  44. package/build/src/models/store/File.d.ts.map +1 -1
  45. package/build/src/models/store/File.js +100 -13
  46. package/build/src/models/store/File.js.map +1 -1
  47. package/build/src/models/store/Group.d.ts +76 -2
  48. package/build/src/models/store/Group.d.ts.map +1 -1
  49. package/build/src/models/store/Group.js +84 -1
  50. package/build/src/models/store/Group.js.map +1 -1
  51. package/build/src/sdk/GroupsSdk.d.ts +41 -0
  52. package/build/src/sdk/GroupsSdk.d.ts.map +1 -0
  53. package/build/src/sdk/GroupsSdk.js +135 -0
  54. package/build/src/sdk/GroupsSdk.js.map +1 -0
  55. package/build/src/sdk/RouteBuilder.d.ts +2 -0
  56. package/build/src/sdk/RouteBuilder.d.ts.map +1 -1
  57. package/build/src/sdk/RouteBuilder.js +6 -0
  58. package/build/src/sdk/RouteBuilder.js.map +1 -1
  59. package/build/src/sdk/Sdk.d.ts +2 -0
  60. package/build/src/sdk/Sdk.d.ts.map +1 -1
  61. package/build/src/sdk/Sdk.js +5 -0
  62. package/build/src/sdk/Sdk.js.map +1 -1
  63. package/build/tsconfig.tsbuildinfo +1 -1
  64. package/package.json +2 -3
  65. package/src/events/BaseEvents.ts +4 -0
  66. package/src/modeling/ApiFile.ts +53 -0
  67. package/src/modeling/ApiModel.ts +327 -0
  68. package/src/modeling/DataDomain.ts +1 -1
  69. package/src/modeling/DomainEntity.ts +1 -1
  70. package/src/modeling/DomainFile.ts +3 -40
  71. package/src/modeling/Semantics.ts +63 -8
  72. package/src/modeling/amf/ShapeGenerator.ts +1 -1
  73. package/src/modeling/types.ts +545 -0
  74. package/src/models/kinds.ts +3 -0
  75. package/src/models/store/File.ts +100 -13
  76. package/src/models/store/Group.ts +148 -2
  77. package/src/sdk/GroupsSdk.ts +150 -0
  78. package/src/sdk/RouteBuilder.ts +8 -0
  79. package/src/sdk/Sdk.ts +6 -0
  80. package/tests/unit/modeling/api_model.spec.ts +291 -0
  81. package/tests/unit/modeling/domain_entity.spec.ts +15 -15
  82. package/tests/unit/modeling/domain_file.spec.ts +1 -11
  83. package/tests/unit/modeling/domain_model_entities.spec.ts +2 -2
  84. package/tests/unit/modeling/semantics.spec.ts +8 -11
  85. package/tests/unit/models/File/constructor.spec.ts +3 -2
  86. package/tests/unit/models/File/shortcutTo.spec.ts +1 -1
@@ -176,4 +176,495 @@ export type DataDomainGraph = Graph<unknown, DomainGraphNodeType, DomainGraphEdg
176
176
  * The serialized version of the data domain graph.
177
177
  */
178
178
  export type SerializedGraph = GraphJson<unknown, object, DomainGraphEdge>;
179
+ /**
180
+ * Represents a standardized, machine-readable error response body
181
+ * as defined by RFC 7807 for HTTP APIs.
182
+ */
183
+ export interface ProblemDetails {
184
+ /**
185
+ * A URI that identifies the specific problem type. Should resolve to human-readable docs.
186
+ * e.g., "https://docs.apinow.app/errors/validation-failed"
187
+ */
188
+ type: string;
189
+ /**
190
+ * A short, human-readable summary of the problem type.
191
+ * e.g., "Validation Error"
192
+ */
193
+ title: string;
194
+ /**
195
+ * The HTTP status code generated by the origin server for this problem.
196
+ */
197
+ status?: number;
198
+ /**
199
+ * A human-readable explanation specific to this occurrence of the problem.
200
+ */
201
+ detail?: string;
202
+ /**
203
+ * A URI that identifies the specific occurrence of the problem.
204
+ * Can be the API request path that caused the error.
205
+ */
206
+ instance: string;
207
+ }
208
+ /**
209
+ * The set of supported filter operators for the List action.
210
+ * These are used in query parameters, e.g., ?price[gte]=100
211
+ *
212
+ * - eq: Equal
213
+ * - nq: Not Equal
214
+ * - lt: Less Than
215
+ * - lte: Less Than or Equal
216
+ * - gt: Greater Than
217
+ * - gte: Greater Than or Equal
218
+ * - ex: Checks if the field exists
219
+ * - re: Regular expression match
220
+ * - bf: Date before a specific value
221
+ * - af: Date after a specific value
222
+ * - cn: String contains substring / Array contains element
223
+ * - st: String starts with
224
+ * - end: String ends with
225
+ * - in: Value is one of the elements in the provided array
226
+ * - nin: Value is not one of the elements in the provided array
227
+ */
228
+ export type ResourceFilterOperator = 'eq' | 'nq' | 'lt' | 'lte' | 'gt' | 'gte' | 'ex' | 're' | 'bf' | 'af' | 'cn' | 'st' | 'end' | 'in' | 'nin';
229
+ /**
230
+ * The session transport configuration interface.
231
+ * This defines the properties that are common to all session transports.
232
+ */
233
+ interface SessionTransport {
234
+ /**
235
+ * Whether the session transport is enabled.
236
+ */
237
+ enabled: boolean;
238
+ /**
239
+ * The kind of session transport. Each interface defines its own kind.
240
+ */
241
+ kind: string;
242
+ }
243
+ /**
244
+ * Configuration for cookie-based session transport.
245
+ */
246
+ export interface CookieConfiguration extends SessionTransport {
247
+ kind: 'cookie';
248
+ /**
249
+ * The lifetime of the cookie session.
250
+ * This is a string representing the duration, e.g., "7d" for 7 days or "24h" for 24 hours.
251
+ *
252
+ * @default "7d"
253
+ */
254
+ lifetime: string;
255
+ /**
256
+ * Whether the cookie can only be accessed by the server.
257
+ * This is a security feature to prevent client-side scripts from accessing the cookie.
258
+ * If set to false, the cookie can be accessed by client-side scripts.
259
+ * @default true
260
+ */
261
+ httpOnly: boolean;
262
+ /**
263
+ * Whether the cookie should only be sent over secure connections (HTTPS).
264
+ * This is a security feature to prevent the cookie from being sent over unencrypted connections.
265
+ * @default true
266
+ */
267
+ secure: boolean;
268
+ /**
269
+ * The SameSite attribute of the cookie.
270
+ * This attribute controls whether the cookie is sent with cross-site requests.
271
+ * - 'none' means the cookie is sent with cross-site requests.
272
+ * - 'lax' means the cookie is sent with top-level navigations and will be sent along with GET
273
+ * requests initiated by third-party websites.
274
+ * @default 'none'
275
+ */
276
+ sameSite: 'none' | 'lax';
277
+ /**
278
+ * The name of the cookie.
279
+ * This is the key under which the session data will be stored in the cookie.
280
+ * @default 'as' - 'as' stands for "api session"
281
+ */
282
+ name: string;
283
+ }
284
+ /**
285
+ * Configuration for JWT-based session transport.
286
+ */
287
+ export interface JwtConfiguration extends SessionTransport {
288
+ kind: 'jwt';
289
+ /**
290
+ * The lifetime of the JWT token.
291
+ * This is a string representing the duration, e.g., "7d" for 7 days or "15m" for 15 minutes.
292
+ *
293
+ * @default "7d"
294
+ */
295
+ lifetime: string;
296
+ }
297
+ export interface SessionConfiguration {
298
+ /**
299
+ * The secret used to sign the JWT and cookies. Should be handled securely.
300
+ * Not visible in the UI after being set.
301
+ */
302
+ secret: string;
303
+ /**
304
+ * The properties from the `User` entity to be encoded into the session payload (JWT/cookie).
305
+ * These properties become available in the `request.auth` object at runtime.
306
+ */
307
+ properties: string[];
308
+ /**
309
+ * The cookie-based session transport configuration.
310
+ */
311
+ cookie?: CookieConfiguration;
312
+ /**
313
+ * The JWT-based session transport configuration.
314
+ */
315
+ jwt?: JwtConfiguration;
316
+ }
317
+ /**
318
+ * Defines the authorization strategy for the API.
319
+ * It is a base interface that can be extended for different strategies.
320
+ * For MVP, we will start with Roles-Based Access Control (RBAC).
321
+ */
322
+ export interface AuthorizationConfiguration {
323
+ /**
324
+ * The authorization strategy. For MVP, we will start with RBAC.
325
+ * Post-MVP will include Permission-Based Access Control (PBAC).
326
+ * The strategy determines how users are granted access to resources.
327
+ *
328
+ * - RBAC (Roles-Based Access Control): Users are assigned roles, and permissions are granted to those roles.
329
+ * - PBAC (Permission-Based Access Control): Users are granted permissions directly, allowing for more
330
+ * granular control.
331
+ */
332
+ strategy: string;
333
+ }
334
+ export interface RolesBasedAccessControl extends AuthorizationConfiguration {
335
+ strategy: 'RBAC';
336
+ /**
337
+ * The property within the designated "User" entity that defines the user's role.
338
+ * This field is used in access rules to grant permissions.
339
+ *
340
+ * This property must be marked with the "Role" data semantic in the Data Modeler.
341
+ * It is required to publish the API.
342
+ */
343
+ roleKey: string;
344
+ }
345
+ /**
346
+ * Configures the strategy for authenticating end-users.
347
+ * An API can only support one authentication strategy at a time.
348
+ * This is a base interface that can be extended for different strategies.
349
+ */
350
+ export interface AuthenticationConfiguration {
351
+ /**
352
+ * The authentication method. For MVP, this is focused on username/password.
353
+ * This can be extended in the future to include 'SSO'.
354
+ */
355
+ strategy: string;
356
+ }
357
+ /**
358
+ * Configuration for username/password authentication.
359
+ * This is the primary authentication method for the API (MVP).
360
+ */
361
+ export interface UsernamePasswordConfiguration extends AuthenticationConfiguration {
362
+ strategy: 'UsernamePassword';
363
+ /**
364
+ * The specific property within the User entity that holds the password.
365
+ * This property must be marked with the "Password" data semantic in the Data Modeler.
366
+ *
367
+ * This property is required to publish the API.
368
+ */
369
+ passwordKey?: string;
370
+ }
371
+ /**
372
+ * Represents a Data Entity from the Data Domain that the API will expose and operate upon.
373
+ */
374
+ export interface ExposedEntity {
375
+ /**
376
+ * The key of the Data Entity from the Data Domain.
377
+ */
378
+ key: string;
379
+ /**
380
+ * Optional configuration for resource-wide rate limiting and throttling.
381
+ * Defines rules to protect the resource from overuse.
382
+ */
383
+ rateLimiting?: RateLimitingConfiguration;
384
+ /**
385
+ * Access control rules defining who can perform actions on this resource or collection.
386
+ * It override the top-level access rules defined in the API model.
387
+ */
388
+ accessRule?: AccessRule[];
389
+ /**
390
+ * The collection of API actions (e.g., List, Read, Create) enabled for this entity.
391
+ */
392
+ actions: ApiAction[];
393
+ }
394
+ /**
395
+ * Represents a specific, configurable API operation applied to a Data Entity.
396
+ * Corresponds to common RESTful interactions.
397
+ */
398
+ export type ApiAction = ListAction | ReadAction | CreateAction | UpdateAction | DeleteAction | SearchAction;
399
+ /**
400
+ * A base interface for common properties across all actions.
401
+ */
402
+ interface Action {
403
+ /**
404
+ * The specific kind of action (e.g., 'List', 'Read', etc.)
405
+ */
406
+ kind: string;
407
+ /**
408
+ * Access control rules defining who can perform this action. It is only applied if the
409
+ * authorization strategy is set to 'RBAC'.
410
+ * If no rules grant access, it's denied by default making it essentially private.
411
+ *
412
+ * Note, the API can defined top level access rules that apply to all actions. If this property is set,
413
+ * it overrides the top level access rules for this specific action.
414
+ *
415
+ * It is an ordered list, meaning the first rule that matches the user will be applied.
416
+ * If multiple rules match, the first one in the list takes precedence.
417
+ * If no rules match, the action is denied.
418
+ */
419
+ accessRule?: AccessRule[];
420
+ /**
421
+ * Optional configuration for action-wide rate limiting and throttling.
422
+ * Defines rules to protect the action from overuse.
423
+ */
424
+ rateLimiting?: RateLimitingConfiguration;
425
+ }
426
+ /**
427
+ * Represents a pagination strategy for API actions that return collections of resources.
428
+ * This is a base interface that can be extended for different pagination strategies.
429
+ */
430
+ export interface PaginationStrategy {
431
+ /**
432
+ * The kind of pagination strategy. This is used to identify the specific pagination method.
433
+ * For example, 'cursor' for cursor-based pagination or 'offset' for offset-based pagination.
434
+ */
435
+ kind: string;
436
+ /**
437
+ * The default page size for the pagination strategy.
438
+ * This is the number of items returned per page when no specific page size is requested.
439
+ */
440
+ pageSize?: number;
441
+ }
442
+ /**
443
+ * Represents the cursor-based pagination strategy.
444
+ */
445
+ export interface CursorPaginationStrategy extends PaginationStrategy {
446
+ kind: 'cursor';
447
+ }
448
+ /**
449
+ * Represents the offset-based pagination strategy.
450
+ */
451
+ export interface OffsetPaginationStrategy extends PaginationStrategy {
452
+ kind: 'offset';
453
+ }
454
+ /**
455
+ * Enables retrieving a collection of resources.
456
+ * Endpoint: GET /[entity-collection-name]
457
+ */
458
+ export interface ListAction extends Action {
459
+ kind: 'list';
460
+ /**
461
+ * The pagination strategy used for this action.
462
+ * This defines how the results are paginated when retrieving a collection of resources.
463
+ * It can be either 'cursor' or 'offset'.
464
+ */
465
+ pagination: PaginationStrategy;
466
+ /**
467
+ * Fields from the entity that can be used for filtering.
468
+ * Must be marked as "indexable" in the Data Model.
469
+ */
470
+ filterableFields: string[];
471
+ /**
472
+ * Fields from the entity that can be used for sorting.
473
+ */
474
+ sortableFields: string[];
475
+ }
476
+ /**
477
+ * Enables retrieving a single resource by its ID.
478
+ * Endpoint: GET /[entity-collection-name]/{id}
479
+ */
480
+ export interface ReadAction extends Action {
481
+ kind: 'read';
482
+ }
483
+ /**
484
+ * Enables adding a new resource to a collection.
485
+ * Endpoint: POST /[entity-collection-name]
486
+ */
487
+ export interface CreateAction extends Action {
488
+ kind: 'create';
489
+ }
490
+ /**
491
+ * Enables modifying an existing resource.
492
+ * Endpoints: PUT or PATCH /[entity-collection-name]/{id}
493
+ */
494
+ export interface UpdateAction extends Action {
495
+ kind: 'update';
496
+ /**
497
+ * The allowed HTTP methods for updates. Default: PATCH only.
498
+ *
499
+ * These two methods represent the two common ways to update a resource:
500
+ * - PUT: Replaces the entire resource with the provided data.
501
+ * - PATCH: Applies a partial update to the resource, allowing for specific fields to be modified.
502
+ */
503
+ allowedMethods: ('PUT' | 'PATCH')[];
504
+ }
505
+ /**
506
+ * Enables removing an existing resource.
507
+ * Endpoint: DELETE /[entity-collection-name]/{id}
508
+ */
509
+ export interface DeleteAction extends Action {
510
+ kind: 'delete';
511
+ /**
512
+ * The strategy for deletion. Default: Soft Delete.
513
+ *
514
+ * @default 'soft'
515
+ */
516
+ strategy?: 'soft' | 'hard';
517
+ }
518
+ /**
519
+ * Enables keyword-based search across specified fields.
520
+ * Endpoint: GET /[entity-collection-name]/search
521
+ */
522
+ export interface SearchAction extends Action {
523
+ kind: 'search';
524
+ /**
525
+ * The fields within the entity to be included in the search scope.
526
+ * Must be "indexable" and typically text-based.
527
+ */
528
+ fields: string[];
529
+ }
530
+ /**
531
+ * Defines the access control policy for a specific API action.
532
+ * Based on the predefined rule types for session-based authentication.
533
+ */
534
+ export type AccessRule = AllowPublicAccessRule | AllowAuthenticatedAccessRule | MatchResourceOwnerAccessRule | MatchUserRoleAccessRule | MatchUserPropertyAccessRule | MatchEmailDomainAccessRule;
535
+ export interface BaseAccessRule {
536
+ /**
537
+ * The unique identifier for the access rule.
538
+ * This is used to reference the rule in the API configuration.
539
+ */
540
+ type: string;
541
+ }
542
+ /**
543
+ * The action is allowed for all users, including unauthenticated ones.
544
+ * This is typically used for public APIs or resources that do not require authentication.
545
+ * It is the most permissive rule and should be used with caution.
546
+ */
547
+ export interface AllowPublicAccessRule extends BaseAccessRule {
548
+ type: 'public';
549
+ }
550
+ /**
551
+ * The action is allowed for any authenticated user.
552
+ * This rule does not impose any additional restrictions based on user properties or resource ownership.
553
+ * It is used for resources that should be accessible to all logged-in users.
554
+ */
555
+ export interface AllowAuthenticatedAccessRule extends BaseAccessRule {
556
+ type: 'authenticated';
557
+ }
558
+ /**
559
+ * The action is allowed if the authenticated user's ID matches a specific property on the resource.
560
+ * This is typically used to restrict access to resources owned by the user.
561
+ * For example, a user can only access their own profile or documents.
562
+ */
563
+ export interface MatchResourceOwnerAccessRule extends BaseAccessRule {
564
+ type: 'resourceOwner';
565
+ /**
566
+ * The property on the resource that should match the authenticated user's ID.
567
+ * This is typically the ID of the user who owns the resource.
568
+ *
569
+ * The domain model should annotate this property with the "ResourceOwnerIdentifier" semantic
570
+ * to indicate that it is used for ownership checks.
571
+ */
572
+ property: string;
573
+ }
574
+ /**
575
+ * The action is allowed if the authenticated user has a specific role.
576
+ * This is used to enforce role-based access control (RBAC).
577
+ * For example, only users with the "admin" role can perform certain actions.
578
+ */
579
+ export interface MatchUserRoleAccessRule extends BaseAccessRule {
580
+ type: 'matchUserRole';
581
+ /**
582
+ * The role that the authenticated user must have to access the resource.
583
+ * This is typically a property on the user entity that defines their role.
584
+ *
585
+ * The domain model should annotate this property with the "UserRole" semantic
586
+ * to indicate that it is used for role-based access control.
587
+ */
588
+ role: string;
589
+ }
590
+ /**
591
+ * The action is allowed if a specific property on the authenticated user matches an expected value.
592
+ * This is used to enforce other user-specific restrictions.
593
+ */
594
+ export interface MatchUserPropertyAccessRule extends BaseAccessRule {
595
+ type: 'matchUserProperty';
596
+ /**
597
+ * The property on the authenticated user that should match the expected value.
598
+ */
599
+ property: string;
600
+ /**
601
+ * The expected value for the user property.
602
+ */
603
+ value: string;
604
+ }
605
+ /**
606
+ * The action is allowed if the authenticated user's email domain matches a specific domain.
607
+ * This is used to restrict access based on the user's email address.
608
+ * For example, only users with an email address from "mycompany.com" can access certain resources.
609
+ */
610
+ export interface MatchEmailDomainAccessRule extends BaseAccessRule {
611
+ type: 'matchEmailDomain';
612
+ /**
613
+ * The email domain that the authenticated user's email must match.
614
+ */
615
+ domain: string;
616
+ }
617
+ /**
618
+ * Defines the rate limiting and throttling policies for the entire API.
619
+ */
620
+ export interface RateLimitingConfiguration {
621
+ /**
622
+ * An ordered list of rules. The first rule that matches an incoming
623
+ * request will be applied.
624
+ */
625
+ rules: RateLimitRule[];
626
+ }
627
+ /**
628
+ * Represents a single rate limiting rule that applies to a specific
629
+ * type of client, using a token bucket algorithm.
630
+ */
631
+ export interface RateLimitRule {
632
+ /**
633
+ * A human-readable description of what this rule is for.
634
+ * e.g., "Limit anonymous users to 60 requests per hour."
635
+ */
636
+ description?: string;
637
+ /**
638
+ * Defines how to group requests for rate limiting. This determines
639
+ * who the limit applies to.
640
+ *
641
+ * - 'ip': Keys on the client's IP address. Best for anonymous traffic.
642
+ * - 'userId': Keys on the authenticated user's ID. Best for logged-in users.
643
+ * - 'role': Applies a shared limit to all users of a specific role.
644
+ */
645
+ key: {
646
+ type: 'ip';
647
+ } | {
648
+ type: 'userId';
649
+ } | {
650
+ type: 'role';
651
+ value: string;
652
+ };
653
+ /**
654
+ * The number of requests allowed over the defined interval.
655
+ * This is the rate at which tokens are added to the bucket.
656
+ */
657
+ rate: number;
658
+ /**
659
+ * The time interval for the rate.
660
+ */
661
+ interval: 'second' | 'minute' | 'hour' | 'day';
662
+ /**
663
+ * The maximum number of requests that can be made in a burst.
664
+ * This represents the "bucket size." A larger burst allows for
665
+ * more requests to be made in a short period before throttling begins.
666
+ */
667
+ burst: number;
668
+ }
669
+ export {};
179
670
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modeling/types.ts"],"names":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AE,aAAa,EAAE,CAAA;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;;;;;;OAOG;IACH,GAAG,EAAE;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,QAAQ,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAE1E;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,QAAQ,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAA;IAE9C;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAA;CACd"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modeling/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { GraphJson } from '@api-client/graph/graph/types.js'\nimport type { Graph } from '@api-client/graph/graph/Graph.js'\nimport type { DomainAssociation } from './DomainAssociation.js'\nimport type { DomainEntity } from './DomainEntity.js'\nimport type { DomainModel } from './DomainModel.js'\nimport type { DomainNamespace } from './DomainNamespace.js'\nimport type { DomainProperty } from './DomainProperty.js'\n\nexport interface DataDomainRemoveOptions {\n /**\n * When true, the object will be forcibly removed.\n * The resolution defined in the `ImpactResolution` class will be applied.\n *\n * For example, when removing an entity that is a parent to another entity, it will\n * removed itself as a parent from the child entity.\n *\n * Note, this option should only be used when the DomainImpactAnalysis has been performed\n * and the user was informed of the impact.\n */\n force?: boolean\n}\n\nexport interface AssociationAddOptions {\n /**\n * When set, it is the the association target's origin data domain.\n * The key of the target data domain where this target entity is defined.\n * Only used when `key` is specified.\n */\n domain?: string\n /**\n * The key of the association target, if known.\n * If the target of the association is not specified, and the association has no other targets,\n * the association is ignored in the namespace while processing.\n */\n key?: string\n}\n\nexport interface DomainGraphEdge {\n /**\n * Indicates that the edge is to or from a foreign domain.\n */\n foreign?: boolean\n /**\n * The key of the foreign domain. Always set with the `foreign` property.\n */\n domain?: string\n /**\n * The type of the edge.\n * - `association` The edge is to an association object.\n * - When coming **from** an entiry (the `v` property), that entity owns the association.\n * - When coming **to** an entity (the `w` property), that entity is the target of the association.\n * An association can have multiple targets.\n * - `property` The edge is to a property object. Can only be created between an entity and a property.\n * - The **from** (`v`) is the entity.\n * - The **to** (`w`) is the property.\n * - `parent` The edge is to a parent object.\n * - The **from** (`v`) is the child entity.\n * - The **to** (`w`) is the parent entity.\n */\n type: 'association' | 'property' | 'parent'\n}\n\nexport type DomainGraphNodeType = DomainNamespace | DomainModel | DomainEntity | DomainProperty | DomainAssociation\n\n/**\n * An interface that describes the data domain dependency.\n */\nexport interface ForeignDomainDependency {\n /**\n * The system registered key of the foreign domain.\n */\n key: string\n /**\n * The version of the foreign domain used in this domain.\n */\n version: string\n}\n\nexport interface AssociationTarget {\n /**\n * The key of the target entity.\n */\n key: string\n /**\n * The key of the target data domain.\n * This is only set when the target is in a different data domain.\n */\n domain?: string\n}\n\n/**\n * Describes the default value set on a property schema.\n */\nexport interface SchemaDefaultValue {\n /**\n * The type of the default value.\n *\n * - `literal` The `value` should be used as-is.\n * - `function` The value represents the name of the function to be used.\n */\n type: 'literal' | 'function'\n /**\n * The actual value type depends on the `type`.\n * It is always a string and it has to be casted to the property's data type.\n */\n value: string\n}\n\n/**\n * A general schema definition for a property.\n * This is propagated to all bindings (when they support these properties).\n */\nexport interface PropertySchema {\n /**\n * The minimum value of the property.\n *\n * By default it is inclusive value. Use the `exclusiveMinimum` property to make it exclusive.\n *\n * Used with:\n * - string\n * - number\n * - date\n * - time\n * - datetime\n */\n minimum?: number\n /**\n * The maximum value of the property.\n *\n * By default it is inclusive value. Use the `exclusiveMaximum` property to make it exclusive.\n *\n * Used with:\n * - string\n * - number\n * - date\n * - time\n * - datetime\n */\n maximum?: number\n /**\n * When set, the minimum value is exclusive.\n *\n * - When `false`: value ≥ minimum.\n * - When `true`: value > minimum.\n */\n exclusiveMinimum?: boolean\n /**\n * When set, the exclusiveMaximum value is exclusive.\n *\n * - When `false`: value ≤ maximum.\n * - When `true`: value < minimum.\n */\n exclusiveMaximum?: boolean\n /**\n * The multiplier value for a number scalar.\n *\n * Examples:\n * - if `1` then every integer is allowed\n * - if `2` than every even number is allowed\n * - if `0.5` than every number dividable by `0.5` is allowed\n */\n multipleOf?: number\n /**\n * The enum values for the property.\n * They are always encoded as strings. The actual type is defined in the `dataType` property.\n */\n enum?: string[]\n /**\n * The default value for the property.\n * This is always encoded as a string. The actual type is defined in the `dataType` property.\n */\n defaultValue?: SchemaDefaultValue\n /**\n * The example values for the property.\n * They are always encoded as strings. The actual type is defined in the `dataType` property.\n */\n examples?: string[]\n}\n\n/**\n * The shortcut type for the data domain graph.\n */\nexport type DataDomainGraph = Graph<unknown, DomainGraphNodeType, DomainGraphEdge>\n/**\n * The serialized version of the data domain graph.\n */\nexport type SerializedGraph = GraphJson<unknown, object, DomainGraphEdge>\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modeling/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { GraphJson } from '@api-client/graph/graph/types.js'\nimport type { Graph } from '@api-client/graph/graph/Graph.js'\nimport type { DomainAssociation } from './DomainAssociation.js'\nimport type { DomainEntity } from './DomainEntity.js'\nimport type { DomainModel } from './DomainModel.js'\nimport type { DomainNamespace } from './DomainNamespace.js'\nimport type { DomainProperty } from './DomainProperty.js'\n\nexport interface DataDomainRemoveOptions {\n /**\n * When true, the object will be forcibly removed.\n * The resolution defined in the `ImpactResolution` class will be applied.\n *\n * For example, when removing an entity that is a parent to another entity, it will\n * removed itself as a parent from the child entity.\n *\n * Note, this option should only be used when the DomainImpactAnalysis has been performed\n * and the user was informed of the impact.\n */\n force?: boolean\n}\n\nexport interface AssociationAddOptions {\n /**\n * When set, it is the the association target's origin data domain.\n * The key of the target data domain where this target entity is defined.\n * Only used when `key` is specified.\n */\n domain?: string\n /**\n * The key of the association target, if known.\n * If the target of the association is not specified, and the association has no other targets,\n * the association is ignored in the namespace while processing.\n */\n key?: string\n}\n\nexport interface DomainGraphEdge {\n /**\n * Indicates that the edge is to or from a foreign domain.\n */\n foreign?: boolean\n /**\n * The key of the foreign domain. Always set with the `foreign` property.\n */\n domain?: string\n /**\n * The type of the edge.\n * - `association` The edge is to an association object.\n * - When coming **from** an entiry (the `v` property), that entity owns the association.\n * - When coming **to** an entity (the `w` property), that entity is the target of the association.\n * An association can have multiple targets.\n * - `property` The edge is to a property object. Can only be created between an entity and a property.\n * - The **from** (`v`) is the entity.\n * - The **to** (`w`) is the property.\n * - `parent` The edge is to a parent object.\n * - The **from** (`v`) is the child entity.\n * - The **to** (`w`) is the parent entity.\n */\n type: 'association' | 'property' | 'parent'\n}\n\nexport type DomainGraphNodeType = DomainNamespace | DomainModel | DomainEntity | DomainProperty | DomainAssociation\n\n/**\n * An interface that describes the data domain dependency.\n */\nexport interface ForeignDomainDependency {\n /**\n * The system registered key of the foreign domain.\n */\n key: string\n /**\n * The version of the foreign domain used in this domain.\n */\n version: string\n}\n\nexport interface AssociationTarget {\n /**\n * The key of the target entity.\n */\n key: string\n /**\n * The key of the target data domain.\n * This is only set when the target is in a different data domain.\n */\n domain?: string\n}\n\n/**\n * Describes the default value set on a property schema.\n */\nexport interface SchemaDefaultValue {\n /**\n * The type of the default value.\n *\n * - `literal` The `value` should be used as-is.\n * - `function` The value represents the name of the function to be used.\n */\n type: 'literal' | 'function'\n /**\n * The actual value type depends on the `type`.\n * It is always a string and it has to be casted to the property's data type.\n */\n value: string\n}\n\n/**\n * A general schema definition for a property.\n * This is propagated to all bindings (when they support these properties).\n */\nexport interface PropertySchema {\n /**\n * The minimum value of the property.\n *\n * By default it is inclusive value. Use the `exclusiveMinimum` property to make it exclusive.\n *\n * Used with:\n * - string\n * - number\n * - date\n * - time\n * - datetime\n */\n minimum?: number\n /**\n * The maximum value of the property.\n *\n * By default it is inclusive value. Use the `exclusiveMaximum` property to make it exclusive.\n *\n * Used with:\n * - string\n * - number\n * - date\n * - time\n * - datetime\n */\n maximum?: number\n /**\n * When set, the minimum value is exclusive.\n *\n * - When `false`: value ≥ minimum.\n * - When `true`: value > minimum.\n */\n exclusiveMinimum?: boolean\n /**\n * When set, the exclusiveMaximum value is exclusive.\n *\n * - When `false`: value ≤ maximum.\n * - When `true`: value < minimum.\n */\n exclusiveMaximum?: boolean\n /**\n * The multiplier value for a number scalar.\n *\n * Examples:\n * - if `1` then every integer is allowed\n * - if `2` than every even number is allowed\n * - if `0.5` than every number dividable by `0.5` is allowed\n */\n multipleOf?: number\n /**\n * The enum values for the property.\n * They are always encoded as strings. The actual type is defined in the `dataType` property.\n */\n enum?: string[]\n /**\n * The default value for the property.\n * This is always encoded as a string. The actual type is defined in the `dataType` property.\n */\n defaultValue?: SchemaDefaultValue\n /**\n * The example values for the property.\n * They are always encoded as strings. The actual type is defined in the `dataType` property.\n */\n examples?: string[]\n}\n\n/**\n * The shortcut type for the data domain graph.\n */\nexport type DataDomainGraph = Graph<unknown, DomainGraphNodeType, DomainGraphEdge>\n/**\n * The serialized version of the data domain graph.\n */\nexport type SerializedGraph = GraphJson<unknown, object, DomainGraphEdge>\n\n/**\n * Represents a standardized, machine-readable error response body\n * as defined by RFC 7807 for HTTP APIs.\n */\nexport interface ProblemDetails {\n /**\n * A URI that identifies the specific problem type. Should resolve to human-readable docs.\n * e.g., \"https://docs.apinow.app/errors/validation-failed\"\n */\n type: string\n\n /**\n * A short, human-readable summary of the problem type.\n * e.g., \"Validation Error\"\n */\n title: string\n\n /**\n * The HTTP status code generated by the origin server for this problem.\n */\n status?: number\n\n /**\n * A human-readable explanation specific to this occurrence of the problem.\n */\n detail?: string\n\n /**\n * A URI that identifies the specific occurrence of the problem.\n * Can be the API request path that caused the error.\n */\n instance: string\n}\n\n/**\n * The set of supported filter operators for the List action.\n * These are used in query parameters, e.g., ?price[gte]=100\n *\n * - eq: Equal\n * - nq: Not Equal\n * - lt: Less Than\n * - lte: Less Than or Equal\n * - gt: Greater Than\n * - gte: Greater Than or Equal\n * - ex: Checks if the field exists\n * - re: Regular expression match\n * - bf: Date before a specific value\n * - af: Date after a specific value\n * - cn: String contains substring / Array contains element\n * - st: String starts with\n * - end: String ends with\n * - in: Value is one of the elements in the provided array\n * - nin: Value is not one of the elements in the provided array\n */\nexport type ResourceFilterOperator =\n | 'eq' // Equal\n | 'nq' // Not equal\n | 'lt' // Less than\n | 'lte' // Less than or equal\n | 'gt' // Greater than\n | 'gte' // Greater than or equal\n | 'ex' // Checks if the field exists\n | 're' // Regular expression match\n | 'bf' // Date before a specific value\n | 'af' // Date after a specific value\n | 'cn' // String contains substring / Array contains element\n | 'st' // String starts with\n | 'end' // String ends with\n | 'in' // Value is one of the elements in the provided array\n | 'nin' // Value is not one of the elements in the provided array\n\n/**\n * The session transport configuration interface.\n * This defines the properties that are common to all session transports.\n */\ninterface SessionTransport {\n /**\n * Whether the session transport is enabled.\n */\n enabled: boolean\n /**\n * The kind of session transport. Each interface defines its own kind.\n */\n kind: string\n}\n\n/**\n * Configuration for cookie-based session transport.\n */\nexport interface CookieConfiguration extends SessionTransport {\n kind: 'cookie'\n /**\n * The lifetime of the cookie session.\n * This is a string representing the duration, e.g., \"7d\" for 7 days or \"24h\" for 24 hours.\n *\n * @default \"7d\"\n */\n lifetime: string\n /**\n * Whether the cookie can only be accessed by the server.\n * This is a security feature to prevent client-side scripts from accessing the cookie.\n * If set to false, the cookie can be accessed by client-side scripts.\n * @default true\n */\n httpOnly: boolean // Defaults to true\n /**\n * Whether the cookie should only be sent over secure connections (HTTPS).\n * This is a security feature to prevent the cookie from being sent over unencrypted connections.\n * @default true\n */\n secure: boolean\n /**\n * The SameSite attribute of the cookie.\n * This attribute controls whether the cookie is sent with cross-site requests.\n * - 'none' means the cookie is sent with cross-site requests.\n * - 'lax' means the cookie is sent with top-level navigations and will be sent along with GET\n * requests initiated by third-party websites.\n * @default 'none'\n */\n sameSite: 'none' | 'lax'\n /**\n * The name of the cookie.\n * This is the key under which the session data will be stored in the cookie.\n * @default 'as' - 'as' stands for \"api session\"\n */\n name: string\n}\n\n/**\n * Configuration for JWT-based session transport.\n */\nexport interface JwtConfiguration extends SessionTransport {\n kind: 'jwt'\n /**\n * The lifetime of the JWT token.\n * This is a string representing the duration, e.g., \"7d\" for 7 days or \"15m\" for 15 minutes.\n *\n * @default \"7d\"\n */\n lifetime: string\n}\n\nexport interface SessionConfiguration {\n /**\n * The secret used to sign the JWT and cookies. Should be handled securely.\n * Not visible in the UI after being set.\n */\n secret: string\n /**\n * The properties from the `User` entity to be encoded into the session payload (JWT/cookie).\n * These properties become available in the `request.auth` object at runtime.\n */\n properties: string[]\n /**\n * The cookie-based session transport configuration.\n */\n cookie?: CookieConfiguration\n\n /**\n * The JWT-based session transport configuration.\n */\n jwt?: JwtConfiguration\n}\n\n/**\n * Defines the authorization strategy for the API.\n * It is a base interface that can be extended for different strategies.\n * For MVP, we will start with Roles-Based Access Control (RBAC).\n */\nexport interface AuthorizationConfiguration {\n /**\n * The authorization strategy. For MVP, we will start with RBAC.\n * Post-MVP will include Permission-Based Access Control (PBAC).\n * The strategy determines how users are granted access to resources.\n *\n * - RBAC (Roles-Based Access Control): Users are assigned roles, and permissions are granted to those roles.\n * - PBAC (Permission-Based Access Control): Users are granted permissions directly, allowing for more\n * granular control.\n */\n strategy: string\n}\n\nexport interface RolesBasedAccessControl extends AuthorizationConfiguration {\n strategy: 'RBAC'\n /**\n * The property within the designated \"User\" entity that defines the user's role.\n * This field is used in access rules to grant permissions.\n *\n * This property must be marked with the \"Role\" data semantic in the Data Modeler.\n * It is required to publish the API.\n */\n roleKey: string\n}\n\n/**\n * Configures the strategy for authenticating end-users.\n * An API can only support one authentication strategy at a time.\n * This is a base interface that can be extended for different strategies.\n */\nexport interface AuthenticationConfiguration {\n /**\n * The authentication method. For MVP, this is focused on username/password.\n * This can be extended in the future to include 'SSO'.\n */\n strategy: string\n}\n\n/**\n * Configuration for username/password authentication.\n * This is the primary authentication method for the API (MVP).\n */\nexport interface UsernamePasswordConfiguration extends AuthenticationConfiguration {\n strategy: 'UsernamePassword'\n /**\n * The specific property within the User entity that holds the password.\n * This property must be marked with the \"Password\" data semantic in the Data Modeler.\n *\n * This property is required to publish the API.\n */\n passwordKey?: string\n}\n\n/**\n * Represents a Data Entity from the Data Domain that the API will expose and operate upon.\n */\nexport interface ExposedEntity {\n /**\n * The key of the Data Entity from the Data Domain.\n */\n key: string\n\n /**\n * Optional configuration for resource-wide rate limiting and throttling.\n * Defines rules to protect the resource from overuse.\n */\n rateLimiting?: RateLimitingConfiguration\n /**\n * Access control rules defining who can perform actions on this resource or collection.\n * It override the top-level access rules defined in the API model.\n */\n accessRule?: AccessRule[]\n\n /**\n * The collection of API actions (e.g., List, Read, Create) enabled for this entity.\n */\n actions: ApiAction[]\n}\n\n/**\n * Represents a specific, configurable API operation applied to a Data Entity.\n * Corresponds to common RESTful interactions.\n */\nexport type ApiAction = ListAction | ReadAction | CreateAction | UpdateAction | DeleteAction | SearchAction\n\n/**\n * A base interface for common properties across all actions.\n */\ninterface Action {\n /**\n * The specific kind of action (e.g., 'List', 'Read', etc.)\n */\n kind: string\n /**\n * Access control rules defining who can perform this action. It is only applied if the\n * authorization strategy is set to 'RBAC'.\n * If no rules grant access, it's denied by default making it essentially private.\n *\n * Note, the API can defined top level access rules that apply to all actions. If this property is set,\n * it overrides the top level access rules for this specific action.\n *\n * It is an ordered list, meaning the first rule that matches the user will be applied.\n * If multiple rules match, the first one in the list takes precedence.\n * If no rules match, the action is denied.\n */\n accessRule?: AccessRule[]\n /**\n * Optional configuration for action-wide rate limiting and throttling.\n * Defines rules to protect the action from overuse.\n */\n rateLimiting?: RateLimitingConfiguration\n}\n\n/**\n * Represents a pagination strategy for API actions that return collections of resources.\n * This is a base interface that can be extended for different pagination strategies.\n */\nexport interface PaginationStrategy {\n /**\n * The kind of pagination strategy. This is used to identify the specific pagination method.\n * For example, 'cursor' for cursor-based pagination or 'offset' for offset-based pagination.\n */\n kind: string\n /**\n * The default page size for the pagination strategy.\n * This is the number of items returned per page when no specific page size is requested.\n */\n pageSize?: number\n}\n\n/**\n * Represents the cursor-based pagination strategy.\n */\nexport interface CursorPaginationStrategy extends PaginationStrategy {\n kind: 'cursor'\n}\n\n/**\n * Represents the offset-based pagination strategy.\n */\nexport interface OffsetPaginationStrategy extends PaginationStrategy {\n kind: 'offset'\n}\n\n/**\n * Enables retrieving a collection of resources.\n * Endpoint: GET /[entity-collection-name]\n */\nexport interface ListAction extends Action {\n kind: 'list'\n /**\n * The pagination strategy used for this action.\n * This defines how the results are paginated when retrieving a collection of resources.\n * It can be either 'cursor' or 'offset'.\n */\n pagination: PaginationStrategy\n /**\n * Fields from the entity that can be used for filtering.\n * Must be marked as \"indexable\" in the Data Model.\n */\n filterableFields: string[]\n /**\n * Fields from the entity that can be used for sorting.\n */\n sortableFields: string[]\n}\n\n/**\n * Enables retrieving a single resource by its ID.\n * Endpoint: GET /[entity-collection-name]/{id}\n */\nexport interface ReadAction extends Action {\n kind: 'read'\n // Association handling (Link IDs vs. Embed) is defined on the\n // data association itself in the Data Modeler.\n}\n\n/**\n * Enables adding a new resource to a collection.\n * Endpoint: POST /[entity-collection-name]\n */\nexport interface CreateAction extends Action {\n kind: 'create'\n}\n\n/**\n * Enables modifying an existing resource.\n * Endpoints: PUT or PATCH /[entity-collection-name]/{id}\n */\nexport interface UpdateAction extends Action {\n kind: 'update'\n /**\n * The allowed HTTP methods for updates. Default: PATCH only.\n *\n * These two methods represent the two common ways to update a resource:\n * - PUT: Replaces the entire resource with the provided data.\n * - PATCH: Applies a partial update to the resource, allowing for specific fields to be modified.\n */\n allowedMethods: ('PUT' | 'PATCH')[]\n}\n\n/**\n * Enables removing an existing resource.\n * Endpoint: DELETE /[entity-collection-name]/{id}\n */\nexport interface DeleteAction extends Action {\n kind: 'delete'\n /**\n * The strategy for deletion. Default: Soft Delete.\n *\n * @default 'soft'\n */\n strategy?: 'soft' | 'hard'\n}\n\n/**\n * Enables keyword-based search across specified fields.\n * Endpoint: GET /[entity-collection-name]/search\n */\nexport interface SearchAction extends Action {\n kind: 'search'\n /**\n * The fields within the entity to be included in the search scope.\n * Must be \"indexable\" and typically text-based.\n */\n fields: string[]\n}\n\n/**\n * Defines the access control policy for a specific API action.\n * Based on the predefined rule types for session-based authentication.\n */\nexport type AccessRule =\n | AllowPublicAccessRule\n | AllowAuthenticatedAccessRule\n | MatchResourceOwnerAccessRule\n | MatchUserRoleAccessRule\n | MatchUserPropertyAccessRule\n | MatchEmailDomainAccessRule\n\nexport interface BaseAccessRule {\n /**\n * The unique identifier for the access rule.\n * This is used to reference the rule in the API configuration.\n */\n type: string\n}\n\n/**\n * The action is allowed for all users, including unauthenticated ones.\n * This is typically used for public APIs or resources that do not require authentication.\n * It is the most permissive rule and should be used with caution.\n */\nexport interface AllowPublicAccessRule extends BaseAccessRule {\n type: 'public'\n}\n/**\n * The action is allowed for any authenticated user.\n * This rule does not impose any additional restrictions based on user properties or resource ownership.\n * It is used for resources that should be accessible to all logged-in users.\n */\nexport interface AllowAuthenticatedAccessRule extends BaseAccessRule {\n type: 'authenticated'\n}\n/**\n * The action is allowed if the authenticated user's ID matches a specific property on the resource.\n * This is typically used to restrict access to resources owned by the user.\n * For example, a user can only access their own profile or documents.\n */\nexport interface MatchResourceOwnerAccessRule extends BaseAccessRule {\n type: 'resourceOwner'\n /**\n * The property on the resource that should match the authenticated user's ID.\n * This is typically the ID of the user who owns the resource.\n *\n * The domain model should annotate this property with the \"ResourceOwnerIdentifier\" semantic\n * to indicate that it is used for ownership checks.\n */\n property: string\n}\n\n/**\n * The action is allowed if the authenticated user has a specific role.\n * This is used to enforce role-based access control (RBAC).\n * For example, only users with the \"admin\" role can perform certain actions.\n */\nexport interface MatchUserRoleAccessRule extends BaseAccessRule {\n type: 'matchUserRole'\n /**\n * The role that the authenticated user must have to access the resource.\n * This is typically a property on the user entity that defines their role.\n *\n * The domain model should annotate this property with the \"UserRole\" semantic\n * to indicate that it is used for role-based access control.\n */\n role: string\n}\n/**\n * The action is allowed if a specific property on the authenticated user matches an expected value.\n * This is used to enforce other user-specific restrictions.\n */\nexport interface MatchUserPropertyAccessRule extends BaseAccessRule {\n type: 'matchUserProperty'\n /**\n * The property on the authenticated user that should match the expected value.\n */\n property: string\n /**\n * The expected value for the user property.\n */\n value: string\n}\n/**\n * The action is allowed if the authenticated user's email domain matches a specific domain.\n * This is used to restrict access based on the user's email address.\n * For example, only users with an email address from \"mycompany.com\" can access certain resources.\n */\nexport interface MatchEmailDomainAccessRule extends BaseAccessRule {\n type: 'matchEmailDomain'\n /**\n * The email domain that the authenticated user's email must match.\n */\n domain: string\n}\n\n/**\n * Defines the rate limiting and throttling policies for the entire API.\n */\nexport interface RateLimitingConfiguration {\n /**\n * An ordered list of rules. The first rule that matches an incoming\n * request will be applied.\n */\n rules: RateLimitRule[]\n}\n\n/**\n * Represents a single rate limiting rule that applies to a specific\n * type of client, using a token bucket algorithm.\n */\nexport interface RateLimitRule {\n /**\n * A human-readable description of what this rule is for.\n * e.g., \"Limit anonymous users to 60 requests per hour.\"\n */\n description?: string\n\n /**\n * Defines how to group requests for rate limiting. This determines\n * who the limit applies to.\n *\n * - 'ip': Keys on the client's IP address. Best for anonymous traffic.\n * - 'userId': Keys on the authenticated user's ID. Best for logged-in users.\n * - 'role': Applies a shared limit to all users of a specific role.\n */\n key: { type: 'ip' } | { type: 'userId' } | { type: 'role'; value: string }\n\n /**\n * The number of requests allowed over the defined interval.\n * This is the rate at which tokens are added to the bucket.\n */\n rate: number\n\n /**\n * The time interval for the rate.\n */\n interval: 'second' | 'minute' | 'hour' | 'day'\n\n /**\n * The maximum number of requests that can be made in a burst.\n * This represents the \"bucket size.\" A larger burst allows for\n * more requests to be made in a short period before throttling begins.\n */\n burst: number\n}\n"]}
@@ -20,4 +20,7 @@ export declare const DataCatalogKind = "Core#DataCatalog";
20
20
  export declare const DataCatalogVersionKind = "Core#DataCatalogVersion";
21
21
  export declare const OrganizationKind = "Core#Organization";
22
22
  export declare const InvitationKind = "Core#Invitation";
23
+ export declare const ApiModelKind = "Core#ApiModel";
24
+ export declare const ApiFileKind = "Core#ApiFile";
25
+ export declare const GroupKind = "Core#Group";
23
26
  //# sourceMappingURL=kinds.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"kinds.d.ts","sourceRoot":"","sources":["../../../src/models/kinds.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,uBAAuB,CAAA;AACrD,eAAO,MAAM,YAAY,sBAAsB,CAAA;AAC/C,eAAO,MAAM,gBAAgB,sBAAsB,CAAA;AACnD,eAAO,MAAM,mBAAmB,yBAAyB,CAAA;AACzD,eAAO,MAAM,UAAU,gBAAgB,CAAA;AACvC,eAAO,MAAM,WAAW,iBAAiB,CAAA;AACzC,eAAO,MAAM,SAAS,eAAe,CAAA;AACrC,eAAO,MAAM,YAAY,kBAAkB,CAAA;AAC3C,eAAO,MAAM,YAAY,kBAAkB,CAAA;AAC3C,eAAO,MAAM,wBAAwB,8BAA8B,CAAA;AACnE,eAAO,MAAM,QAAQ,cAAc,CAAA;AACnC,eAAO,MAAM,cAAc,oBAAoB,CAAA;AAC/C,eAAO,MAAM,cAAc,gBAAgB,CAAA;AAC3C,eAAO,MAAM,mBAAmB,qBAAqB,CAAA;AACrD,eAAO,MAAM,eAAe,iBAAiB,CAAA;AAC7C,eAAO,MAAM,gBAAgB,kBAAkB,CAAA;AAC/C,eAAO,MAAM,qBAAqB,uBAAuB,CAAA;AACzD,eAAO,MAAM,kBAAkB,oBAAoB,CAAA;AACnD,eAAO,MAAM,eAAe,qBAAqB,CAAA;AACjD,eAAO,MAAM,sBAAsB,4BAA4B,CAAA;AAC/D,eAAO,MAAM,gBAAgB,sBAAsB,CAAA;AACnD,eAAO,MAAM,cAAc,oBAAoB,CAAA"}
1
+ {"version":3,"file":"kinds.d.ts","sourceRoot":"","sources":["../../../src/models/kinds.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,uBAAuB,CAAA;AACrD,eAAO,MAAM,YAAY,sBAAsB,CAAA;AAC/C,eAAO,MAAM,gBAAgB,sBAAsB,CAAA;AACnD,eAAO,MAAM,mBAAmB,yBAAyB,CAAA;AACzD,eAAO,MAAM,UAAU,gBAAgB,CAAA;AACvC,eAAO,MAAM,WAAW,iBAAiB,CAAA;AACzC,eAAO,MAAM,SAAS,eAAe,CAAA;AACrC,eAAO,MAAM,YAAY,kBAAkB,CAAA;AAC3C,eAAO,MAAM,YAAY,kBAAkB,CAAA;AAC3C,eAAO,MAAM,wBAAwB,8BAA8B,CAAA;AACnE,eAAO,MAAM,QAAQ,cAAc,CAAA;AACnC,eAAO,MAAM,cAAc,oBAAoB,CAAA;AAC/C,eAAO,MAAM,cAAc,gBAAgB,CAAA;AAC3C,eAAO,MAAM,mBAAmB,qBAAqB,CAAA;AACrD,eAAO,MAAM,eAAe,iBAAiB,CAAA;AAC7C,eAAO,MAAM,gBAAgB,kBAAkB,CAAA;AAC/C,eAAO,MAAM,qBAAqB,uBAAuB,CAAA;AACzD,eAAO,MAAM,kBAAkB,oBAAoB,CAAA;AACnD,eAAO,MAAM,eAAe,qBAAqB,CAAA;AACjD,eAAO,MAAM,sBAAsB,4BAA4B,CAAA;AAC/D,eAAO,MAAM,gBAAgB,sBAAsB,CAAA;AACnD,eAAO,MAAM,cAAc,oBAAoB,CAAA;AAC/C,eAAO,MAAM,YAAY,kBAAkB,CAAA;AAC3C,eAAO,MAAM,WAAW,iBAAiB,CAAA;AACzC,eAAO,MAAM,SAAS,eAAe,CAAA"}
@@ -20,4 +20,7 @@ export const DataCatalogKind = 'Core#DataCatalog';
20
20
  export const DataCatalogVersionKind = 'Core#DataCatalogVersion';
21
21
  export const OrganizationKind = 'Core#Organization';
22
22
  export const InvitationKind = 'Core#Invitation';
23
+ export const ApiModelKind = 'Core#ApiModel';
24
+ export const ApiFileKind = 'Core#ApiFile';
25
+ export const GroupKind = 'Core#Group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B,CAAA","sourcesContent":["export const ProjectFolderKind = 'Core#ProjectFolder'\nexport const ResponseKind = 'Core#HttpResponse'\nexport const HttpResponseKind = 'Core#HttpResponse'\nexport const CertificateFileKind = 'Core#CertificateFile'\nexport const FolderKind = 'Core#Folder'\nexport const ProjectKind = 'Core#Project'\nexport const ThingKind = 'Core#Thing'\nexport const DeletionKind = 'Core#Deletion'\nexport const RevisionKind = 'Core#Revision'\nexport const UnresolvedDependencyKind = 'Core#UnresolvedDependency'\nexport const UserKind = 'Core#User'\nexport const DomainFileKind = 'Data#DomainFile'\nexport const DataDomainKind = 'Data#Domain'\nexport const DomainNamespaceKind = 'Domain#Namespace'\nexport const DomainModelKind = 'Domain#Model'\nexport const DomainEntityKind = 'Domain#Entity'\nexport const DomainAssociationKind = 'Domain#Association'\nexport const DomainPropertyKind = 'Domain#Property'\nexport const DataCatalogKind = 'Core#DataCatalog'\nexport const DataCatalogVersionKind = 'Core#DataCatalogVersion'\nexport const OrganizationKind = 'Core#Organization'\nexport const InvitationKind = 'Core#Invitation'\n"]}
1
+ {"version":3,"file":"kinds.js","sourceRoot":"","sources":["../../../src/models/kinds.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAAA;AACrD,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAA;AAC/C,MAAM,CAAC,MAAM,gBAAgB,GAAG,mBAAmB,CAAA;AACnD,MAAM,CAAC,MAAM,mBAAmB,GAAG,sBAAsB,CAAA;AACzD,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAA;AACvC,MAAM,CAAC,MAAM,WAAW,GAAG,cAAc,CAAA;AACzC,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAA;AACrC,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe,CAAA;AAC3C,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe,CAAA;AAC3C,MAAM,CAAC,MAAM,wBAAwB,GAAG,2BAA2B,CAAA;AACnE,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAA;AACnC,MAAM,CAAC,MAAM,cAAc,GAAG,iBAAiB,CAAA;AAC/C,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAA;AAC3C,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CAAA;AACrD,MAAM,CAAC,MAAM,eAAe,GAAG,cAAc,CAAA;AAC7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe,CAAA;AAC/C,MAAM,CAAC,MAAM,qBAAqB,GAAG,oBAAoB,CAAA;AACzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAAA;AACnD,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAA;AACjD,MAAM,CAAC,MAAM,sBAAsB,GAAG,yBAAyB,CAAA;AAC/D,MAAM,CAAC,MAAM,gBAAgB,GAAG,mBAAmB,CAAA;AACnD,MAAM,CAAC,MAAM,cAAc,GAAG,iBAAiB,CAAA;AAC/C,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe,CAAA;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,cAAc,CAAA;AACzC,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAA","sourcesContent":["export const ProjectFolderKind = 'Core#ProjectFolder'\nexport const ResponseKind = 'Core#HttpResponse'\nexport const HttpResponseKind = 'Core#HttpResponse'\nexport const CertificateFileKind = 'Core#CertificateFile'\nexport const FolderKind = 'Core#Folder'\nexport const ProjectKind = 'Core#Project'\nexport const ThingKind = 'Core#Thing'\nexport const DeletionKind = 'Core#Deletion'\nexport const RevisionKind = 'Core#Revision'\nexport const UnresolvedDependencyKind = 'Core#UnresolvedDependency'\nexport const UserKind = 'Core#User'\nexport const DomainFileKind = 'Data#DomainFile'\nexport const DataDomainKind = 'Data#Domain'\nexport const DomainNamespaceKind = 'Domain#Namespace'\nexport const DomainModelKind = 'Domain#Model'\nexport const DomainEntityKind = 'Domain#Entity'\nexport const DomainAssociationKind = 'Domain#Association'\nexport const DomainPropertyKind = 'Domain#Property'\nexport const DataCatalogKind = 'Core#DataCatalog'\nexport const DataCatalogVersionKind = 'Core#DataCatalogVersion'\nexport const OrganizationKind = 'Core#Organization'\nexport const InvitationKind = 'Core#Invitation'\nexport const ApiModelKind = 'Core#ApiModel'\nexport const ApiFileKind = 'Core#ApiFile'\nexport const GroupKind = 'Core#Group'\n"]}
@@ -158,6 +158,18 @@ export declare class StoredFile {
158
158
  */
159
159
  get shortcutTarget(): string | undefined;
160
160
  set shortcutTarget(value: string | undefined);
161
+ /**
162
+ * Creates a file schema object with the given properties.
163
+ * The `key` is generated if not set.
164
+ *
165
+ * @param input The input to create the file schema.
166
+ * @returns The file schema object.
167
+ */
168
+ static createSchema(input?: Partial<IStoredFile>): IStoredFile;
169
+ constructor(state: IStoredFile);
170
+ /**
171
+ * @deprecated Use `createSchema()` and setup values in the constructor instead.
172
+ */
161
173
  new(init: IStoredFile): this;
162
174
  toJSON(): IStoredFile;
163
175
  /**
@@ -251,13 +263,18 @@ export declare class File extends StoredFile {
251
263
  * opaque value.
252
264
  */
253
265
  get permissions(): readonly IPermission[];
266
+ static createSchema(input?: Partial<IFile>): IFile;
267
+ constructor(state?: Partial<IFile>);
268
+ /**
269
+ * @deprecated Use `createSchema()` and setup values in the constructor instead.
270
+ */
254
271
  new(init: IFile): this;
255
272
  toJSON(): IFile;
256
273
  /**
257
274
  * @param name The name to set.
258
- * @param owner The user id that is the owner of the file.
275
+ * @param kind The kind of the file to create.
259
276
  */
260
- static fromName(name: string, kind?: string): File;
277
+ static fromName(name: string, kind: string): File;
261
278
  shortcutTo(fileId: string): this;
262
279
  /**
263
280
  * Updates the "lastModified" value.