@constructive-io/sdk 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/admin/orm/index.d.ts +19 -6
  2. package/admin/orm/index.js +14 -6
  3. package/admin/orm/input-types.d.ts +879 -363
  4. package/admin/orm/models/index.d.ts +7 -3
  5. package/admin/orm/models/index.js +15 -7
  6. package/admin/orm/models/orgChartEdge.d.ts +56 -0
  7. package/{public/orm/models/limitFunction.js → admin/orm/models/orgChartEdge.js} +25 -25
  8. package/admin/orm/models/orgChartEdgeGrant.d.ts +56 -0
  9. package/admin/orm/models/orgChartEdgeGrant.js +98 -0
  10. package/admin/orm/models/orgGetManagersRecord.d.ts +32 -0
  11. package/admin/orm/models/orgGetManagersRecord.js +55 -0
  12. package/admin/orm/models/orgGetSubordinatesRecord.d.ts +32 -0
  13. package/admin/orm/models/orgGetSubordinatesRecord.js +55 -0
  14. package/admin/orm/query/index.d.ts +11 -0
  15. package/admin/orm/query/index.js +24 -0
  16. package/auth/orm/index.d.ts +2 -2
  17. package/auth/orm/index.js +2 -2
  18. package/auth/orm/input-types.d.ts +163 -128
  19. package/auth/orm/models/index.d.ts +1 -1
  20. package/auth/orm/models/index.js +3 -3
  21. package/esm/admin/orm/index.d.ts +19 -6
  22. package/esm/admin/orm/index.js +14 -6
  23. package/esm/admin/orm/input-types.d.ts +879 -363
  24. package/esm/admin/orm/models/index.d.ts +7 -3
  25. package/esm/admin/orm/models/index.js +7 -3
  26. package/esm/admin/orm/models/orgChartEdge.d.ts +56 -0
  27. package/esm/{public/orm/models/procedure.js → admin/orm/models/orgChartEdge.js} +23 -23
  28. package/esm/admin/orm/models/orgChartEdgeGrant.d.ts +56 -0
  29. package/esm/admin/orm/models/orgChartEdgeGrant.js +94 -0
  30. package/esm/admin/orm/models/orgGetManagersRecord.d.ts +32 -0
  31. package/esm/admin/orm/models/orgGetManagersRecord.js +51 -0
  32. package/esm/admin/orm/models/orgGetSubordinatesRecord.d.ts +32 -0
  33. package/esm/admin/orm/models/orgGetSubordinatesRecord.js +51 -0
  34. package/esm/admin/orm/query/index.d.ts +11 -0
  35. package/esm/admin/orm/query/index.js +24 -0
  36. package/esm/auth/orm/index.d.ts +2 -2
  37. package/esm/auth/orm/index.js +2 -2
  38. package/esm/auth/orm/input-types.d.ts +163 -128
  39. package/esm/auth/orm/models/index.d.ts +1 -1
  40. package/esm/auth/orm/models/index.js +1 -1
  41. package/esm/public/orm/index.d.ts +31 -16
  42. package/esm/public/orm/index.js +26 -16
  43. package/esm/public/orm/input-types.d.ts +2255 -1110
  44. package/esm/public/orm/input-types.js +14 -3
  45. package/esm/public/orm/models/defaultPrivilege.d.ts +56 -0
  46. package/esm/public/orm/models/defaultPrivilege.js +94 -0
  47. package/esm/public/orm/models/index.d.ts +13 -8
  48. package/esm/public/orm/models/index.js +13 -8
  49. package/esm/public/orm/models/orgChartEdge.d.ts +56 -0
  50. package/esm/public/orm/models/{limitFunction.js → orgChartEdge.js} +23 -23
  51. package/esm/public/orm/models/orgChartEdgeGrant.d.ts +56 -0
  52. package/esm/public/orm/models/orgChartEdgeGrant.js +94 -0
  53. package/esm/public/orm/models/orgGetManagersRecord.d.ts +32 -0
  54. package/esm/public/orm/models/orgGetManagersRecord.js +51 -0
  55. package/esm/public/orm/models/orgGetSubordinatesRecord.d.ts +32 -0
  56. package/esm/public/orm/models/orgGetSubordinatesRecord.js +51 -0
  57. package/esm/public/orm/models/relationProvision.d.ts +56 -0
  58. package/esm/public/orm/models/relationProvision.js +94 -0
  59. package/esm/public/orm/models/secureTableProvision.d.ts +56 -0
  60. package/esm/public/orm/models/secureTableProvision.js +94 -0
  61. package/esm/public/orm/query/index.d.ts +11 -0
  62. package/esm/public/orm/query/index.js +24 -0
  63. package/package.json +6 -6
  64. package/public/orm/index.d.ts +31 -16
  65. package/public/orm/index.js +26 -16
  66. package/public/orm/input-types.d.ts +2255 -1110
  67. package/public/orm/input-types.js +14 -3
  68. package/public/orm/models/defaultPrivilege.d.ts +56 -0
  69. package/public/orm/models/defaultPrivilege.js +98 -0
  70. package/public/orm/models/index.d.ts +13 -8
  71. package/public/orm/models/index.js +29 -18
  72. package/public/orm/models/orgChartEdge.d.ts +56 -0
  73. package/public/orm/models/{procedure.js → orgChartEdge.js} +25 -25
  74. package/public/orm/models/orgChartEdgeGrant.d.ts +56 -0
  75. package/public/orm/models/orgChartEdgeGrant.js +98 -0
  76. package/public/orm/models/orgGetManagersRecord.d.ts +32 -0
  77. package/public/orm/models/orgGetManagersRecord.js +55 -0
  78. package/public/orm/models/orgGetSubordinatesRecord.d.ts +32 -0
  79. package/public/orm/models/orgGetSubordinatesRecord.js +55 -0
  80. package/public/orm/models/relationProvision.d.ts +56 -0
  81. package/public/orm/models/relationProvision.js +98 -0
  82. package/public/orm/models/secureTableProvision.d.ts +56 -0
  83. package/public/orm/models/secureTableProvision.js +98 -0
  84. package/public/orm/query/index.d.ts +11 -0
  85. package/public/orm/query/index.js +24 -0
  86. package/esm/public/orm/models/limitFunction.d.ts +0 -56
  87. package/esm/public/orm/models/procedure.d.ts +0 -56
  88. package/public/orm/models/limitFunction.d.ts +0 -56
  89. package/public/orm/models/procedure.d.ts +0 -56
@@ -8,8 +8,8 @@ import { RoleTypeModel } from './models/roleType';
8
8
  import { CryptoAddressModel } from './models/cryptoAddress';
9
9
  import { PhoneNumberModel } from './models/phoneNumber';
10
10
  import { ConnectedAccountModel } from './models/connectedAccount';
11
- import { EmailModel } from './models/email';
12
11
  import { AuditLogModel } from './models/auditLog';
12
+ import { EmailModel } from './models/email';
13
13
  import { UserModel } from './models/user';
14
14
  import { createQueryOperations } from './query';
15
15
  import { createMutationOperations } from './mutation';
@@ -49,8 +49,8 @@ export function createClient(config) {
49
49
  cryptoAddress: new CryptoAddressModel(client),
50
50
  phoneNumber: new PhoneNumberModel(client),
51
51
  connectedAccount: new ConnectedAccountModel(client),
52
- email: new EmailModel(client),
53
52
  auditLog: new AuditLogModel(client),
53
+ email: new EmailModel(client),
54
54
  user: new UserModel(client),
55
55
  query: createQueryOperations(client),
56
56
  mutation: createMutationOperations(client),
@@ -229,25 +229,35 @@ export interface RoleType {
229
229
  id: number;
230
230
  name?: string | null;
231
231
  }
232
+ /** Cryptocurrency wallet addresses owned by users, with network-specific validation and verification */
232
233
  export interface CryptoAddress {
233
234
  id: string;
234
235
  ownerId?: string | null;
236
+ /** The cryptocurrency wallet address, validated against network-specific patterns */
235
237
  address?: string | null;
238
+ /** Whether ownership of this address has been cryptographically verified */
236
239
  isVerified?: boolean | null;
240
+ /** Whether this is the user's primary cryptocurrency address */
237
241
  isPrimary?: boolean | null;
238
242
  createdAt?: string | null;
239
243
  updatedAt?: string | null;
240
244
  }
245
+ /** User phone numbers with country code, verification, and primary-number management */
241
246
  export interface PhoneNumber {
242
247
  id: string;
243
248
  ownerId?: string | null;
249
+ /** Country calling code (e.g. +1, +44) */
244
250
  cc?: string | null;
251
+ /** The phone number without country code */
245
252
  number?: string | null;
253
+ /** Whether the phone number has been verified via SMS code */
246
254
  isVerified?: boolean | null;
255
+ /** Whether this is the user's primary phone number */
247
256
  isPrimary?: boolean | null;
248
257
  createdAt?: string | null;
249
258
  updatedAt?: string | null;
250
259
  }
260
+ /** OAuth and social login connections linking external service accounts to users */
251
261
  export interface ConnectedAccount {
252
262
  id: string;
253
263
  ownerId?: string | null;
@@ -257,28 +267,41 @@ export interface ConnectedAccount {
257
267
  identifier?: string | null;
258
268
  /** Additional profile details extracted from this login method */
259
269
  details?: Record<string, unknown> | null;
270
+ /** Whether this connected account has been verified */
260
271
  isVerified?: boolean | null;
261
272
  createdAt?: string | null;
262
273
  updatedAt?: string | null;
263
274
  }
264
- export interface Email {
265
- id: string;
266
- ownerId?: string | null;
267
- email?: ConstructiveInternalTypeEmail | null;
268
- isVerified?: boolean | null;
269
- isPrimary?: boolean | null;
270
- createdAt?: string | null;
271
- updatedAt?: string | null;
272
- }
275
+ /** Append-only audit log of authentication events (sign-in, sign-up, password changes, etc.) */
273
276
  export interface AuditLog {
274
277
  id: string;
278
+ /** Type of authentication event (e.g. sign_in, sign_up, password_change, verify_email) */
275
279
  event?: string | null;
280
+ /** User who performed the authentication action */
276
281
  actorId?: string | null;
282
+ /** Request origin (domain) where the auth event occurred */
277
283
  origin?: ConstructiveInternalTypeOrigin | null;
284
+ /** Browser or client user-agent string from the request */
278
285
  userAgent?: string | null;
286
+ /** IP address of the client that initiated the auth event */
279
287
  ipAddress?: string | null;
288
+ /** Whether the authentication attempt succeeded */
280
289
  success?: boolean | null;
290
+ /** Timestamp when the audit event was recorded */
291
+ createdAt?: string | null;
292
+ }
293
+ /** User email addresses with verification and primary-email management */
294
+ export interface Email {
295
+ id: string;
296
+ ownerId?: string | null;
297
+ /** The email address */
298
+ email?: ConstructiveInternalTypeEmail | null;
299
+ /** Whether the email address has been verified via confirmation link */
300
+ isVerified?: boolean | null;
301
+ /** Whether this is the user's primary email address */
302
+ isPrimary?: boolean | null;
281
303
  createdAt?: string | null;
304
+ updatedAt?: string | null;
282
305
  }
283
306
  export interface User {
284
307
  id: string;
@@ -314,12 +337,12 @@ export interface PhoneNumberRelations {
314
337
  export interface ConnectedAccountRelations {
315
338
  owner?: User | null;
316
339
  }
317
- export interface EmailRelations {
318
- owner?: User | null;
319
- }
320
340
  export interface AuditLogRelations {
321
341
  actor?: User | null;
322
342
  }
343
+ export interface EmailRelations {
344
+ owner?: User | null;
345
+ }
323
346
  export interface UserRelations {
324
347
  roleType?: RoleType | null;
325
348
  }
@@ -327,8 +350,8 @@ export type RoleTypeWithRelations = RoleType & RoleTypeRelations;
327
350
  export type CryptoAddressWithRelations = CryptoAddress & CryptoAddressRelations;
328
351
  export type PhoneNumberWithRelations = PhoneNumber & PhoneNumberRelations;
329
352
  export type ConnectedAccountWithRelations = ConnectedAccount & ConnectedAccountRelations;
330
- export type EmailWithRelations = Email & EmailRelations;
331
353
  export type AuditLogWithRelations = AuditLog & AuditLogRelations;
354
+ export type EmailWithRelations = Email & EmailRelations;
332
355
  export type UserWithRelations = User & UserRelations;
333
356
  export type RoleTypeSelect = {
334
357
  id?: boolean;
@@ -372,18 +395,6 @@ export type ConnectedAccountSelect = {
372
395
  select: UserSelect;
373
396
  };
374
397
  };
375
- export type EmailSelect = {
376
- id?: boolean;
377
- ownerId?: boolean;
378
- email?: boolean;
379
- isVerified?: boolean;
380
- isPrimary?: boolean;
381
- createdAt?: boolean;
382
- updatedAt?: boolean;
383
- owner?: {
384
- select: UserSelect;
385
- };
386
- };
387
398
  export type AuditLogSelect = {
388
399
  id?: boolean;
389
400
  event?: boolean;
@@ -397,6 +408,18 @@ export type AuditLogSelect = {
397
408
  select: UserSelect;
398
409
  };
399
410
  };
411
+ export type EmailSelect = {
412
+ id?: boolean;
413
+ ownerId?: boolean;
414
+ email?: boolean;
415
+ isVerified?: boolean;
416
+ isPrimary?: boolean;
417
+ createdAt?: boolean;
418
+ updatedAt?: boolean;
419
+ owner?: {
420
+ select: UserSelect;
421
+ };
422
+ };
400
423
  export type UserSelect = {
401
424
  id?: boolean;
402
425
  username?: boolean;
@@ -456,18 +479,6 @@ export interface ConnectedAccountFilter {
456
479
  or?: ConnectedAccountFilter[];
457
480
  not?: ConnectedAccountFilter;
458
481
  }
459
- export interface EmailFilter {
460
- id?: UUIDFilter;
461
- ownerId?: UUIDFilter;
462
- email?: StringFilter;
463
- isVerified?: BooleanFilter;
464
- isPrimary?: BooleanFilter;
465
- createdAt?: DatetimeFilter;
466
- updatedAt?: DatetimeFilter;
467
- and?: EmailFilter[];
468
- or?: EmailFilter[];
469
- not?: EmailFilter;
470
- }
471
482
  export interface AuditLogFilter {
472
483
  id?: UUIDFilter;
473
484
  event?: StringFilter;
@@ -481,6 +492,18 @@ export interface AuditLogFilter {
481
492
  or?: AuditLogFilter[];
482
493
  not?: AuditLogFilter;
483
494
  }
495
+ export interface EmailFilter {
496
+ id?: UUIDFilter;
497
+ ownerId?: UUIDFilter;
498
+ email?: StringFilter;
499
+ isVerified?: BooleanFilter;
500
+ isPrimary?: BooleanFilter;
501
+ createdAt?: DatetimeFilter;
502
+ updatedAt?: DatetimeFilter;
503
+ and?: EmailFilter[];
504
+ or?: EmailFilter[];
505
+ not?: EmailFilter;
506
+ }
484
507
  export interface UserFilter {
485
508
  id?: UUIDFilter;
486
509
  username?: StringFilter;
@@ -528,15 +551,6 @@ export interface ConnectedAccountCondition {
528
551
  createdAt?: string | null;
529
552
  updatedAt?: string | null;
530
553
  }
531
- export interface EmailCondition {
532
- id?: string | null;
533
- ownerId?: string | null;
534
- email?: unknown | null;
535
- isVerified?: boolean | null;
536
- isPrimary?: boolean | null;
537
- createdAt?: string | null;
538
- updatedAt?: string | null;
539
- }
540
554
  export interface AuditLogCondition {
541
555
  id?: string | null;
542
556
  event?: string | null;
@@ -547,6 +561,15 @@ export interface AuditLogCondition {
547
561
  success?: boolean | null;
548
562
  createdAt?: string | null;
549
563
  }
564
+ export interface EmailCondition {
565
+ id?: string | null;
566
+ ownerId?: string | null;
567
+ email?: unknown | null;
568
+ isVerified?: boolean | null;
569
+ isPrimary?: boolean | null;
570
+ createdAt?: string | null;
571
+ updatedAt?: string | null;
572
+ }
550
573
  export interface UserCondition {
551
574
  id?: string | null;
552
575
  username?: string | null;
@@ -562,8 +585,8 @@ export type RoleTypeOrderBy = 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'NATURAL'
562
585
  export type CryptoAddressOrderBy = 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'NATURAL' | 'ID_ASC' | 'ID_DESC' | 'OWNER_ID_ASC' | 'OWNER_ID_DESC' | 'ADDRESS_ASC' | 'ADDRESS_DESC' | 'IS_VERIFIED_ASC' | 'IS_VERIFIED_DESC' | 'IS_PRIMARY_ASC' | 'IS_PRIMARY_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC';
563
586
  export type PhoneNumberOrderBy = 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'NATURAL' | 'ID_ASC' | 'ID_DESC' | 'OWNER_ID_ASC' | 'OWNER_ID_DESC' | 'CC_ASC' | 'CC_DESC' | 'NUMBER_ASC' | 'NUMBER_DESC' | 'IS_VERIFIED_ASC' | 'IS_VERIFIED_DESC' | 'IS_PRIMARY_ASC' | 'IS_PRIMARY_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC';
564
587
  export type ConnectedAccountOrderBy = 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'NATURAL' | 'ID_ASC' | 'ID_DESC' | 'OWNER_ID_ASC' | 'OWNER_ID_DESC' | 'SERVICE_ASC' | 'SERVICE_DESC' | 'IDENTIFIER_ASC' | 'IDENTIFIER_DESC' | 'DETAILS_ASC' | 'DETAILS_DESC' | 'IS_VERIFIED_ASC' | 'IS_VERIFIED_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC';
565
- export type EmailOrderBy = 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'NATURAL' | 'ID_ASC' | 'ID_DESC' | 'OWNER_ID_ASC' | 'OWNER_ID_DESC' | 'EMAIL_ASC' | 'EMAIL_DESC' | 'IS_VERIFIED_ASC' | 'IS_VERIFIED_DESC' | 'IS_PRIMARY_ASC' | 'IS_PRIMARY_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC';
566
588
  export type AuditLogOrderBy = 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'NATURAL' | 'ID_ASC' | 'ID_DESC' | 'EVENT_ASC' | 'EVENT_DESC' | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' | 'ORIGIN_ASC' | 'ORIGIN_DESC' | 'USER_AGENT_ASC' | 'USER_AGENT_DESC' | 'IP_ADDRESS_ASC' | 'IP_ADDRESS_DESC' | 'SUCCESS_ASC' | 'SUCCESS_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC';
589
+ export type EmailOrderBy = 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'NATURAL' | 'ID_ASC' | 'ID_DESC' | 'OWNER_ID_ASC' | 'OWNER_ID_DESC' | 'EMAIL_ASC' | 'EMAIL_DESC' | 'IS_VERIFIED_ASC' | 'IS_VERIFIED_DESC' | 'IS_PRIMARY_ASC' | 'IS_PRIMARY_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC';
567
590
  export type UserOrderBy = 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'NATURAL' | 'ID_ASC' | 'ID_DESC' | 'USERNAME_ASC' | 'USERNAME_DESC' | 'DISPLAY_NAME_ASC' | 'DISPLAY_NAME_DESC' | 'PROFILE_PICTURE_ASC' | 'PROFILE_PICTURE_DESC' | 'SEARCH_TSV_ASC' | 'SEARCH_TSV_DESC' | 'TYPE_ASC' | 'TYPE_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC' | 'SEARCH_TSV_RANK_ASC' | 'SEARCH_TSV_RANK_DESC';
568
591
  export interface CreateRoleTypeInput {
569
592
  clientMutationId?: string;
@@ -659,30 +682,6 @@ export interface DeleteConnectedAccountInput {
659
682
  clientMutationId?: string;
660
683
  id: string;
661
684
  }
662
- export interface CreateEmailInput {
663
- clientMutationId?: string;
664
- email: {
665
- ownerId?: string;
666
- email: ConstructiveInternalTypeEmail;
667
- isVerified?: boolean;
668
- isPrimary?: boolean;
669
- };
670
- }
671
- export interface EmailPatch {
672
- ownerId?: string | null;
673
- email?: ConstructiveInternalTypeEmail | null;
674
- isVerified?: boolean | null;
675
- isPrimary?: boolean | null;
676
- }
677
- export interface UpdateEmailInput {
678
- clientMutationId?: string;
679
- id: string;
680
- emailPatch: EmailPatch;
681
- }
682
- export interface DeleteEmailInput {
683
- clientMutationId?: string;
684
- id: string;
685
- }
686
685
  export interface CreateAuditLogInput {
687
686
  clientMutationId?: string;
688
687
  auditLog: {
@@ -711,6 +710,30 @@ export interface DeleteAuditLogInput {
711
710
  clientMutationId?: string;
712
711
  id: string;
713
712
  }
713
+ export interface CreateEmailInput {
714
+ clientMutationId?: string;
715
+ email: {
716
+ ownerId?: string;
717
+ email: ConstructiveInternalTypeEmail;
718
+ isVerified?: boolean;
719
+ isPrimary?: boolean;
720
+ };
721
+ }
722
+ export interface EmailPatch {
723
+ ownerId?: string | null;
724
+ email?: ConstructiveInternalTypeEmail | null;
725
+ isVerified?: boolean | null;
726
+ isPrimary?: boolean | null;
727
+ }
728
+ export interface UpdateEmailInput {
729
+ clientMutationId?: string;
730
+ id: string;
731
+ emailPatch: EmailPatch;
732
+ }
733
+ export interface DeleteEmailInput {
734
+ clientMutationId?: string;
735
+ id: string;
736
+ }
714
737
  export interface CreateUserInput {
715
738
  clientMutationId?: string;
716
739
  user: {
@@ -1151,51 +1174,6 @@ export type DeleteConnectedAccountPayloadSelect = {
1151
1174
  select: ConnectedAccountEdgeSelect;
1152
1175
  };
1153
1176
  };
1154
- export interface CreateEmailPayload {
1155
- clientMutationId?: string | null;
1156
- /** The `Email` that was created by this mutation. */
1157
- email?: Email | null;
1158
- emailEdge?: EmailEdge | null;
1159
- }
1160
- export type CreateEmailPayloadSelect = {
1161
- clientMutationId?: boolean;
1162
- email?: {
1163
- select: EmailSelect;
1164
- };
1165
- emailEdge?: {
1166
- select: EmailEdgeSelect;
1167
- };
1168
- };
1169
- export interface UpdateEmailPayload {
1170
- clientMutationId?: string | null;
1171
- /** The `Email` that was updated by this mutation. */
1172
- email?: Email | null;
1173
- emailEdge?: EmailEdge | null;
1174
- }
1175
- export type UpdateEmailPayloadSelect = {
1176
- clientMutationId?: boolean;
1177
- email?: {
1178
- select: EmailSelect;
1179
- };
1180
- emailEdge?: {
1181
- select: EmailEdgeSelect;
1182
- };
1183
- };
1184
- export interface DeleteEmailPayload {
1185
- clientMutationId?: string | null;
1186
- /** The `Email` that was deleted by this mutation. */
1187
- email?: Email | null;
1188
- emailEdge?: EmailEdge | null;
1189
- }
1190
- export type DeleteEmailPayloadSelect = {
1191
- clientMutationId?: boolean;
1192
- email?: {
1193
- select: EmailSelect;
1194
- };
1195
- emailEdge?: {
1196
- select: EmailEdgeSelect;
1197
- };
1198
- };
1199
1177
  export interface CreateAuditLogPayload {
1200
1178
  clientMutationId?: string | null;
1201
1179
  /** The `AuditLog` that was created by this mutation. */
@@ -1241,6 +1219,51 @@ export type DeleteAuditLogPayloadSelect = {
1241
1219
  select: AuditLogEdgeSelect;
1242
1220
  };
1243
1221
  };
1222
+ export interface CreateEmailPayload {
1223
+ clientMutationId?: string | null;
1224
+ /** The `Email` that was created by this mutation. */
1225
+ email?: Email | null;
1226
+ emailEdge?: EmailEdge | null;
1227
+ }
1228
+ export type CreateEmailPayloadSelect = {
1229
+ clientMutationId?: boolean;
1230
+ email?: {
1231
+ select: EmailSelect;
1232
+ };
1233
+ emailEdge?: {
1234
+ select: EmailEdgeSelect;
1235
+ };
1236
+ };
1237
+ export interface UpdateEmailPayload {
1238
+ clientMutationId?: string | null;
1239
+ /** The `Email` that was updated by this mutation. */
1240
+ email?: Email | null;
1241
+ emailEdge?: EmailEdge | null;
1242
+ }
1243
+ export type UpdateEmailPayloadSelect = {
1244
+ clientMutationId?: boolean;
1245
+ email?: {
1246
+ select: EmailSelect;
1247
+ };
1248
+ emailEdge?: {
1249
+ select: EmailEdgeSelect;
1250
+ };
1251
+ };
1252
+ export interface DeleteEmailPayload {
1253
+ clientMutationId?: string | null;
1254
+ /** The `Email` that was deleted by this mutation. */
1255
+ email?: Email | null;
1256
+ emailEdge?: EmailEdge | null;
1257
+ }
1258
+ export type DeleteEmailPayloadSelect = {
1259
+ clientMutationId?: boolean;
1260
+ email?: {
1261
+ select: EmailSelect;
1262
+ };
1263
+ emailEdge?: {
1264
+ select: EmailEdgeSelect;
1265
+ };
1266
+ };
1244
1267
  export interface CreateUserPayload {
1245
1268
  clientMutationId?: string | null;
1246
1269
  /** The `User` that was created by this mutation. */
@@ -1344,18 +1367,30 @@ export type ExtendTokenExpiresRecordSelect = {
1344
1367
  sessionId?: boolean;
1345
1368
  expiresAt?: boolean;
1346
1369
  };
1370
+ /** Tracks user authentication sessions with expiration, fingerprinting, and step-up verification state */
1347
1371
  export interface Session {
1348
1372
  id: string;
1373
+ /** References the authenticated user; NULL for anonymous sessions */
1349
1374
  userId?: string | null;
1375
+ /** Whether this is an anonymous session (no authenticated user) */
1350
1376
  isAnonymous: boolean;
1377
+ /** When this session expires and can no longer be used for authentication */
1351
1378
  expiresAt: string;
1379
+ /** When this session was explicitly revoked (soft delete); NULL means active */
1352
1380
  revokedAt?: string | null;
1381
+ /** The origin (protocol + host) from which the session was created, used for fingerprint validation */
1353
1382
  origin?: ConstructiveInternalTypeOrigin | null;
1383
+ /** IP address from which the session was created, used for strict fingerprint validation */
1354
1384
  ip?: string | null;
1385
+ /** User-Agent string from the client, used for strict fingerprint validation */
1355
1386
  uagent?: string | null;
1387
+ /** Session validation mode: strict (origin+ip+uagent), lax (origin only), or none (no validation) */
1356
1388
  fingerprintMode: string;
1389
+ /** Timestamp of last password re-verification for step-up authentication */
1357
1390
  lastPasswordVerified?: string | null;
1391
+ /** Timestamp of last MFA verification for step-up authentication */
1358
1392
  lastMfaVerified?: string | null;
1393
+ /** Secret used to generate and validate CSRF tokens for cookie-based sessions */
1359
1394
  csrfSecret?: string | null;
1360
1395
  createdAt?: string | null;
1361
1396
  updatedAt?: string | null;
@@ -1424,18 +1459,6 @@ export type ConnectedAccountEdgeSelect = {
1424
1459
  select: ConnectedAccountSelect;
1425
1460
  };
1426
1461
  };
1427
- /** A `Email` edge in the connection. */
1428
- export interface EmailEdge {
1429
- cursor?: string | null;
1430
- /** The `Email` at the end of the edge. */
1431
- node?: Email | null;
1432
- }
1433
- export type EmailEdgeSelect = {
1434
- cursor?: boolean;
1435
- node?: {
1436
- select: EmailSelect;
1437
- };
1438
- };
1439
1462
  /** A `AuditLog` edge in the connection. */
1440
1463
  export interface AuditLogEdge {
1441
1464
  cursor?: string | null;
@@ -1448,6 +1471,18 @@ export type AuditLogEdgeSelect = {
1448
1471
  select: AuditLogSelect;
1449
1472
  };
1450
1473
  };
1474
+ /** A `Email` edge in the connection. */
1475
+ export interface EmailEdge {
1476
+ cursor?: string | null;
1477
+ /** The `Email` at the end of the edge. */
1478
+ node?: Email | null;
1479
+ }
1480
+ export type EmailEdgeSelect = {
1481
+ cursor?: boolean;
1482
+ node?: {
1483
+ select: EmailSelect;
1484
+ };
1485
+ };
1451
1486
  /** A `User` edge in the connection. */
1452
1487
  export interface UserEdge {
1453
1488
  cursor?: string | null;
@@ -7,6 +7,6 @@ export { RoleTypeModel } from './roleType';
7
7
  export { CryptoAddressModel } from './cryptoAddress';
8
8
  export { PhoneNumberModel } from './phoneNumber';
9
9
  export { ConnectedAccountModel } from './connectedAccount';
10
- export { EmailModel } from './email';
11
10
  export { AuditLogModel } from './auditLog';
11
+ export { EmailModel } from './email';
12
12
  export { UserModel } from './user';
@@ -7,6 +7,6 @@ export { RoleTypeModel } from './roleType';
7
7
  export { CryptoAddressModel } from './cryptoAddress';
8
8
  export { PhoneNumberModel } from './phoneNumber';
9
9
  export { ConnectedAccountModel } from './connectedAccount';
10
- export { EmailModel } from './email';
11
10
  export { AuditLogModel } from './auditLog';
11
+ export { EmailModel } from './email';
12
12
  export { UserModel } from './user';
@@ -1,4 +1,6 @@
1
1
  import type { OrmClientConfig } from './client';
2
+ import { OrgGetManagersRecordModel } from './models/orgGetManagersRecord';
3
+ import { OrgGetSubordinatesRecordModel } from './models/orgGetSubordinatesRecord';
2
4
  import { GetAllRecordModel } from './models/getAllRecord';
3
5
  import { AppPermissionModel } from './models/appPermission';
4
6
  import { OrgPermissionModel } from './models/orgPermission';
@@ -12,7 +14,6 @@ import { FieldModel } from './models/field';
12
14
  import { ForeignKeyConstraintModel } from './models/foreignKeyConstraint';
13
15
  import { FullTextSearchModel } from './models/fullTextSearch';
14
16
  import { IndexModel } from './models/index';
15
- import { LimitFunctionModel } from './models/limitFunction';
16
17
  import { PolicyModel } from './models/policy';
17
18
  import { PrimaryKeyConstraintModel } from './models/primaryKeyConstraint';
18
19
  import { TableGrantModel } from './models/tableGrant';
@@ -24,14 +25,16 @@ import { ViewGrantModel } from './models/viewGrant';
24
25
  import { ViewRuleModel } from './models/viewRule';
25
26
  import { TableModuleModel } from './models/tableModule';
26
27
  import { TableTemplateModuleModel } from './models/tableTemplateModule';
28
+ import { SecureTableProvisionModel } from './models/secureTableProvision';
29
+ import { RelationProvisionModel } from './models/relationProvision';
27
30
  import { SchemaGrantModel } from './models/schemaGrant';
31
+ import { DefaultPrivilegeModel } from './models/defaultPrivilege';
28
32
  import { ApiSchemaModel } from './models/apiSchema';
29
33
  import { ApiModuleModel } from './models/apiModule';
30
34
  import { DomainModel } from './models/domain';
31
35
  import { SiteMetadatumModel } from './models/siteMetadatum';
32
36
  import { SiteModuleModel } from './models/siteModule';
33
37
  import { SiteThemeModel } from './models/siteTheme';
34
- import { ProcedureModel } from './models/procedure';
35
38
  import { TriggerFunctionModel } from './models/triggerFunction';
36
39
  import { ApiModel } from './models/api';
37
40
  import { SiteModel } from './models/site';
@@ -67,6 +70,8 @@ import { OrgMemberModel } from './models/orgMember';
67
70
  import { OrgAdminGrantModel } from './models/orgAdminGrant';
68
71
  import { OrgOwnerGrantModel } from './models/orgOwnerGrant';
69
72
  import { OrgGrantModel } from './models/orgGrant';
73
+ import { OrgChartEdgeModel } from './models/orgChartEdge';
74
+ import { OrgChartEdgeGrantModel } from './models/orgChartEdgeGrant';
70
75
  import { AppLimitModel } from './models/appLimit';
71
76
  import { OrgLimitModel } from './models/orgLimit';
72
77
  import { AppStepModel } from './models/appStep';
@@ -75,28 +80,28 @@ import { InviteModel } from './models/invite';
75
80
  import { ClaimedInviteModel } from './models/claimedInvite';
76
81
  import { OrgInviteModel } from './models/orgInvite';
77
82
  import { OrgClaimedInviteModel } from './models/orgClaimedInvite';
78
- import { AppPermissionDefaultModel } from './models/appPermissionDefault';
79
83
  import { RefModel } from './models/ref';
80
84
  import { StoreModel } from './models/store';
85
+ import { AppPermissionDefaultModel } from './models/appPermissionDefault';
81
86
  import { RoleTypeModel } from './models/roleType';
82
87
  import { OrgPermissionDefaultModel } from './models/orgPermissionDefault';
88
+ import { CryptoAddressModel } from './models/cryptoAddress';
83
89
  import { AppLimitDefaultModel } from './models/appLimitDefault';
84
90
  import { OrgLimitDefaultModel } from './models/orgLimitDefault';
85
- import { CryptoAddressModel } from './models/cryptoAddress';
86
- import { MembershipTypeModel } from './models/membershipType';
87
91
  import { ConnectedAccountModel } from './models/connectedAccount';
88
92
  import { PhoneNumberModel } from './models/phoneNumber';
89
- import { AppMembershipDefaultModel } from './models/appMembershipDefault';
93
+ import { MembershipTypeModel } from './models/membershipType';
90
94
  import { NodeTypeRegistryModel } from './models/nodeTypeRegistry';
95
+ import { AppMembershipDefaultModel } from './models/appMembershipDefault';
91
96
  import { CommitModel } from './models/commit';
92
97
  import { OrgMembershipDefaultModel } from './models/orgMembershipDefault';
93
- import { EmailModel } from './models/email';
94
98
  import { AuditLogModel } from './models/auditLog';
95
99
  import { AppLevelModel } from './models/appLevel';
100
+ import { EmailModel } from './models/email';
96
101
  import { SqlMigrationModel } from './models/sqlMigration';
97
102
  import { AstMigrationModel } from './models/astMigration';
98
- import { AppMembershipModel } from './models/appMembership';
99
103
  import { UserModel } from './models/user';
104
+ import { AppMembershipModel } from './models/appMembership';
100
105
  import { HierarchyModuleModel } from './models/hierarchyModule';
101
106
  export type { OrmClientConfig, QueryResult, GraphQLError, GraphQLAdapter } from './client';
102
107
  export { GraphQLRequestError } from './client';
@@ -129,6 +134,8 @@ export { createMutationOperations } from './mutation';
129
134
  * ```
130
135
  */
131
136
  export declare function createClient(config: OrmClientConfig): {
137
+ orgGetManagersRecord: OrgGetManagersRecordModel;
138
+ orgGetSubordinatesRecord: OrgGetSubordinatesRecordModel;
132
139
  getAllRecord: GetAllRecordModel;
133
140
  appPermission: AppPermissionModel;
134
141
  orgPermission: OrgPermissionModel;
@@ -142,7 +149,6 @@ export declare function createClient(config: OrmClientConfig): {
142
149
  foreignKeyConstraint: ForeignKeyConstraintModel;
143
150
  fullTextSearch: FullTextSearchModel;
144
151
  index: IndexModel;
145
- limitFunction: LimitFunctionModel;
146
152
  policy: PolicyModel;
147
153
  primaryKeyConstraint: PrimaryKeyConstraintModel;
148
154
  tableGrant: TableGrantModel;
@@ -154,14 +160,16 @@ export declare function createClient(config: OrmClientConfig): {
154
160
  viewRule: ViewRuleModel;
155
161
  tableModule: TableModuleModel;
156
162
  tableTemplateModule: TableTemplateModuleModel;
163
+ secureTableProvision: SecureTableProvisionModel;
164
+ relationProvision: RelationProvisionModel;
157
165
  schemaGrant: SchemaGrantModel;
166
+ defaultPrivilege: DefaultPrivilegeModel;
158
167
  apiSchema: ApiSchemaModel;
159
168
  apiModule: ApiModuleModel;
160
169
  domain: DomainModel;
161
170
  siteMetadatum: SiteMetadatumModel;
162
171
  siteModule: SiteModuleModel;
163
172
  siteTheme: SiteThemeModel;
164
- procedure: ProcedureModel;
165
173
  triggerFunction: TriggerFunctionModel;
166
174
  api: ApiModel;
167
175
  site: SiteModel;
@@ -197,6 +205,8 @@ export declare function createClient(config: OrmClientConfig): {
197
205
  orgAdminGrant: OrgAdminGrantModel;
198
206
  orgOwnerGrant: OrgOwnerGrantModel;
199
207
  orgGrant: OrgGrantModel;
208
+ orgChartEdge: OrgChartEdgeModel;
209
+ orgChartEdgeGrant: OrgChartEdgeGrantModel;
200
210
  appLimit: AppLimitModel;
201
211
  orgLimit: OrgLimitModel;
202
212
  appStep: AppStepModel;
@@ -205,28 +215,28 @@ export declare function createClient(config: OrmClientConfig): {
205
215
  claimedInvite: ClaimedInviteModel;
206
216
  orgInvite: OrgInviteModel;
207
217
  orgClaimedInvite: OrgClaimedInviteModel;
208
- appPermissionDefault: AppPermissionDefaultModel;
209
218
  ref: RefModel;
210
219
  store: StoreModel;
220
+ appPermissionDefault: AppPermissionDefaultModel;
211
221
  roleType: RoleTypeModel;
212
222
  orgPermissionDefault: OrgPermissionDefaultModel;
223
+ cryptoAddress: CryptoAddressModel;
213
224
  appLimitDefault: AppLimitDefaultModel;
214
225
  orgLimitDefault: OrgLimitDefaultModel;
215
- cryptoAddress: CryptoAddressModel;
216
- membershipType: MembershipTypeModel;
217
226
  connectedAccount: ConnectedAccountModel;
218
227
  phoneNumber: PhoneNumberModel;
219
- appMembershipDefault: AppMembershipDefaultModel;
228
+ membershipType: MembershipTypeModel;
220
229
  nodeTypeRegistry: NodeTypeRegistryModel;
230
+ appMembershipDefault: AppMembershipDefaultModel;
221
231
  commit: CommitModel;
222
232
  orgMembershipDefault: OrgMembershipDefaultModel;
223
- email: EmailModel;
224
233
  auditLog: AuditLogModel;
225
234
  appLevel: AppLevelModel;
235
+ email: EmailModel;
226
236
  sqlMigration: SqlMigrationModel;
227
237
  astMigration: AstMigrationModel;
228
- appMembership: AppMembershipModel;
229
238
  user: UserModel;
239
+ appMembership: AppMembershipModel;
230
240
  hierarchyModule: HierarchyModuleModel;
231
241
  query: {
232
242
  currentUserId: (options?: {
@@ -264,6 +274,11 @@ export declare function createClient(config: OrmClientConfig): {
264
274
  }) => import("./query-builder").QueryBuilder<{
265
275
  revParse: string | null;
266
276
  }>;
277
+ orgIsManagerOf: (args: import("./query").OrgIsManagerOfVariables, options?: {
278
+ select?: Record<string, unknown>;
279
+ }) => import("./query-builder").QueryBuilder<{
280
+ orgIsManagerOf: boolean | null;
281
+ }>;
267
282
  appPermissionsGetMask: (args: import("./query").AppPermissionsGetMaskVariables, options?: {
268
283
  select?: Record<string, unknown>;
269
284
  }) => import("./query-builder").QueryBuilder<{