@terrascale/sdk 0.0.2 → 0.0.3

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.
@@ -48,7 +48,7 @@ export function verifyTsAuthWebhookWithTolerance(signingSecret: string, timestam
48
48
  */
49
49
  /**
50
50
  * @typedef {{
51
- * readonly id: string;
51
+ * readonly id: import("./ids.js").EntityId;
52
52
  * readonly email: string | null;
53
53
  * readonly email_verified: boolean;
54
54
  * readonly username: string | null;
@@ -63,7 +63,7 @@ export function verifyTsAuthWebhookWithTolerance(signingSecret: string, timestam
63
63
  */
64
64
  /**
65
65
  * @typedef {{
66
- * readonly id: string;
66
+ * readonly id: import("./ids.js").EntityId;
67
67
  * readonly status: string;
68
68
  * readonly created_at: number; // Unix seconds.
69
69
  * readonly expires_at: number; // Unix seconds.
@@ -74,7 +74,7 @@ export function verifyTsAuthWebhookWithTolerance(signingSecret: string, timestam
74
74
  */
75
75
  /**
76
76
  * @typedef {{
77
- * readonly id: string;
77
+ * readonly id: import("./ids.js").EntityId;
78
78
  * readonly type: string;
79
79
  * readonly confirmed: boolean;
80
80
  * readonly createdAt: number; // Unix seconds.
@@ -82,7 +82,7 @@ export function verifyTsAuthWebhookWithTolerance(signingSecret: string, timestam
82
82
  */
83
83
  /**
84
84
  * @typedef {{
85
- * readonly id: string;
85
+ * readonly id: import("./ids.js").EntityId;
86
86
  * readonly nickname: string | null;
87
87
  * readonly algorithm: string;
88
88
  * readonly createdAt: number; // Unix seconds.
@@ -91,7 +91,7 @@ export function verifyTsAuthWebhookWithTolerance(signingSecret: string, timestam
91
91
  */
92
92
  /**
93
93
  * @typedef {{
94
- * readonly id: string;
94
+ * readonly id: import("./ids.js").EntityId;
95
95
  * readonly name: string;
96
96
  * readonly slug: string;
97
97
  * readonly created_at: number; // Unix seconds.
@@ -99,7 +99,7 @@ export function verifyTsAuthWebhookWithTolerance(signingSecret: string, timestam
99
99
  */
100
100
  /**
101
101
  * @typedef {{
102
- * readonly id: string;
102
+ * readonly id: import("./ids.js").EntityId;
103
103
  * readonly role: string;
104
104
  * readonly created_at: number; // Unix seconds.
105
105
  * readonly organization: TsAuthOrganization | null;
@@ -307,7 +307,7 @@ export class TsAuthSessionsClient {
307
307
  }
308
308
  /**
309
309
  * @typedef {{
310
- * readonly id: string;
310
+ * readonly id: import("./ids.js").EntityId;
311
311
  * readonly name: string;
312
312
  * readonly api_key: string; // One-time full sk_ bearer; only the creating call returns it.
313
313
  * readonly scopes: readonly string[];
@@ -315,7 +315,7 @@ export class TsAuthSessionsClient {
315
315
  */
316
316
  /**
317
317
  * @typedef {{
318
- * readonly id: string;
318
+ * readonly id: import("./ids.js").EntityId;
319
319
  * readonly name: string;
320
320
  * readonly scopes: readonly string[];
321
321
  * readonly created_at: number; // Unix seconds.
@@ -352,9 +352,9 @@ export class TsAuthApiKeysClient {
352
352
  }
353
353
  /**
354
354
  * @typedef {{
355
- * readonly id: string;
356
- * readonly organization_id: string;
357
- * readonly user_id: string;
355
+ * readonly id: import("./ids.js").EntityId;
356
+ * readonly organization_id: import("./ids.js").EntityId;
357
+ * readonly user_id: import("./ids.js").EntityId;
358
358
  * readonly role: string;
359
359
  * readonly created_at: number; // Unix seconds.
360
360
  * }} TsAuthMembership
@@ -362,7 +362,7 @@ export class TsAuthApiKeysClient {
362
362
  /**
363
363
  * @typedef {TsAuthMembership & {
364
364
  * readonly user: {
365
- * readonly id: string;
365
+ * readonly id: import("./ids.js").EntityId;
366
366
  * readonly email: string;
367
367
  * readonly name: string;
368
368
  * } | null;
@@ -370,8 +370,8 @@ export class TsAuthApiKeysClient {
370
370
  */
371
371
  /**
372
372
  * @typedef {{
373
- * readonly id: string;
374
- * readonly organization_id: string;
373
+ * readonly id: import("./ids.js").EntityId;
374
+ * readonly organization_id: import("./ids.js").EntityId;
375
375
  * readonly email: string;
376
376
  * readonly role: string;
377
377
  * readonly status: string;
@@ -381,13 +381,13 @@ export class TsAuthApiKeysClient {
381
381
  */
382
382
  /**
383
383
  * @typedef {{
384
- * readonly id: string;
385
- * readonly organization_id: string;
384
+ * readonly id: import("./ids.js").EntityId;
385
+ * readonly organization_id: import("./ids.js").EntityId;
386
386
  * readonly domain: string;
387
387
  * readonly created_at: number; // Unix seconds.
388
388
  * }} TsAuthOrganizationDomain
389
389
  */
390
- /** @typedef {{ readonly org_id: string }} TsAuthDomainEnrollment */
390
+ /** @typedef {{ readonly org_id: import("./ids.js").EntityId }} TsAuthDomainEnrollment */
391
391
  /**
392
392
  * @typedef {{
393
393
  * readonly name: string;
@@ -401,7 +401,7 @@ export class TsAuthApiKeysClient {
401
401
  */
402
402
  /**
403
403
  * @typedef {{
404
- * readonly user_id: string;
404
+ * readonly user_id: import("./ids.js").EntityId;
405
405
  * readonly role: string;
406
406
  * }} TsAuthCreateMembershipRequest
407
407
  */
@@ -418,7 +418,7 @@ export class TsAuthApiKeysClient {
418
418
  */
419
419
  /**
420
420
  * @typedef {{
421
- * readonly user_id: string;
421
+ * readonly user_id: import("./ids.js").EntityId;
422
422
  * }} TsAuthEnrollRequest
423
423
  */
424
424
  export class TsAuthOrganizationsClient {
@@ -552,8 +552,8 @@ export class TsAuthOrganizationsClient {
552
552
  */
553
553
  /**
554
554
  * @typedef {{
555
- * readonly id: string;
556
- * readonly client_id: string;
555
+ * readonly id: import("./ids.js").EntityId;
556
+ * readonly client_id: import("./ids.js").EntityId;
557
557
  * readonly name: string;
558
558
  * readonly redirect_uris: readonly string[];
559
559
  * readonly post_logout_redirect_uris: readonly string[];
@@ -613,7 +613,7 @@ export class TsAuthOauthClientsClient {
613
613
  /**
614
614
  * @typedef {{
615
615
  * readonly audience: string;
616
- * readonly allowed_client_ids: readonly string[];
616
+ * readonly allowed_client_ids: readonly import("./ids.js").EntityId[];
617
617
  * readonly allowed_grant_types: readonly TsAuthOauthGrantType[];
618
618
  * readonly allowed_scopes: readonly string[];
619
619
  * }} TsAuthCreateOauthResourceRequest
@@ -621,7 +621,7 @@ export class TsAuthOauthClientsClient {
621
621
  /**
622
622
  * @typedef {{
623
623
  * readonly expected_auth_epoch: number;
624
- * readonly allowed_client_ids?: readonly string[] | undefined;
624
+ * readonly allowed_client_ids?: readonly import("./ids.js").EntityId[] | undefined;
625
625
  * readonly allowed_grant_types?: readonly TsAuthOauthGrantType[] | undefined;
626
626
  * readonly allowed_scopes?: readonly string[] | undefined;
627
627
  * readonly enabled?: boolean | undefined;
@@ -630,8 +630,8 @@ export class TsAuthOauthClientsClient {
630
630
  */
631
631
  /**
632
632
  * @typedef {TsAuthCreateOauthResourceRequest & {
633
- * readonly id: string;
634
- * readonly introspection_client_id: string;
633
+ * readonly id: import("./ids.js").EntityId;
634
+ * readonly introspection_client_id: import("./ids.js").EntityId;
635
635
  * readonly token_endpoint_auth_method: "client_secret_basic";
636
636
  * readonly auth_epoch: number;
637
637
  * readonly enabled: boolean;
@@ -679,11 +679,11 @@ export class TsAuthOauthResourcesClient {
679
679
  }
680
680
  /**
681
681
  * @typedef {{
682
- * readonly id: string;
682
+ * readonly id: import("./ids.js").EntityId;
683
683
  * readonly type: "oidc" | "saml";
684
684
  * readonly name: string;
685
685
  * readonly enabled: boolean;
686
- * readonly org_id: string | null;
686
+ * readonly org_id: import("./ids.js").EntityId | null;
687
687
  * readonly issuer_url: string | null;
688
688
  * readonly client_id: string | null;
689
689
  * readonly authorization_endpoint: string | null;
@@ -756,15 +756,15 @@ export class TsAuthConnectionsClient {
756
756
  }
757
757
  /**
758
758
  * @typedef {{
759
- * readonly id: string;
760
- * readonly org_id: string | null;
759
+ * readonly id: import("./ids.js").EntityId;
760
+ * readonly org_id: import("./ids.js").EntityId | null;
761
761
  * readonly token: string; // One-time SCIM bearer; only create and rotate return it.
762
762
  * }} TsAuthDirectoryWithToken
763
763
  */
764
764
  /**
765
765
  * @typedef {{
766
- * readonly id: string;
767
- * readonly org_id: string | null;
766
+ * readonly id: import("./ids.js").EntityId;
767
+ * readonly org_id: import("./ids.js").EntityId | null;
768
768
  * readonly created_at: number; // Unix seconds.
769
769
  * }} TsAuthDirectory
770
770
  */
@@ -825,17 +825,17 @@ export class TsAuthJwtTemplatesClient {
825
825
  delete(name: string): Promise<TerraScaleResult<void>>;
826
826
  /**
827
827
  * @param {string} name
828
- * @param {{ readonly user_id: string }} request
828
+ * @param {{ readonly user_id: import("./ids.js").EntityId }} request
829
829
  * @returns {Promise<TerraScaleResult<TsAuthJwtTokenResponse>>}
830
830
  */
831
831
  issueToken(name: string, request: {
832
- readonly user_id: string;
832
+ readonly user_id: import("./ids.js").EntityId;
833
833
  }): Promise<TerraScaleResult<TsAuthJwtTokenResponse>>;
834
834
  #private;
835
835
  }
836
836
  /**
837
837
  * @typedef {{
838
- * readonly id: string;
838
+ * readonly id: import("./ids.js").EntityId;
839
839
  * readonly url: string;
840
840
  * readonly events: readonly string[];
841
841
  * readonly signing_secret: string; // One-time HMAC key for verifying deliveries; only create returns it.
@@ -843,7 +843,7 @@ export class TsAuthJwtTemplatesClient {
843
843
  */
844
844
  /**
845
845
  * @typedef {{
846
- * readonly id: string;
846
+ * readonly id: import("./ids.js").EntityId;
847
847
  * readonly url: string;
848
848
  * readonly events: readonly string[];
849
849
  * readonly enabled: boolean;
@@ -852,9 +852,9 @@ export class TsAuthJwtTemplatesClient {
852
852
  */
853
853
  /**
854
854
  * @typedef {{
855
- * readonly id: string; // endpointId:eventId
856
- * readonly endpoint_id: string;
857
- * readonly event_id: string;
855
+ * readonly id: `${import("./ids.js").EntityId}:${import("./ids.js").EntityId}`; // endpointId:eventId delivery selector.
856
+ * readonly endpoint_id: import("./ids.js").EntityId;
857
+ * readonly event_id: import("./ids.js").EntityId;
858
858
  * readonly attempts: number;
859
859
  * readonly last_error?: string | undefined;
860
860
  * readonly updated_at: number; // Unix seconds.
@@ -901,10 +901,10 @@ export class TsAuthWebhooksClient {
901
901
  }
902
902
  /**
903
903
  * @typedef {{
904
- * readonly id: string;
905
- * readonly instance_id: string;
904
+ * readonly id: import("./ids.js").EntityId;
905
+ * readonly instance_id: import("./ids.js").EntityId;
906
906
  * readonly type: string;
907
- * readonly actor_id?: string | undefined; // Omitted from the wire when null.
907
+ * readonly actor_id?: import("./ids.js").EntityId | undefined; // Omitted from the wire when null.
908
908
  * readonly data: Record<string, unknown>;
909
909
  * readonly created_at: number; // Unix seconds.
910
910
  * readonly integrity_version: number;
@@ -983,7 +983,7 @@ export class TsAuthBillingClient {
983
983
  }
984
984
  /**
985
985
  * @typedef {{
986
- * readonly id: string;
986
+ * readonly id: import("./ids.js").EntityId;
987
987
  * readonly slug: string;
988
988
  * readonly name: string;
989
989
  * readonly logo_url?: string | null | undefined;
@@ -1052,7 +1052,7 @@ export class TsAuthInstanceClient {
1052
1052
  /** @typedef {{ readonly keys: readonly TsAuthOidcJwk[] }} TsAuthOidcJwks */
1053
1053
  /**
1054
1054
  * @typedef {{
1055
- * readonly client_id: string;
1055
+ * readonly client_id: import("./ids.js").EntityId;
1056
1056
  * readonly redirect_uri: string;
1057
1057
  * readonly response_type: "code";
1058
1058
  * readonly scope?: string | undefined;
@@ -1127,20 +1127,20 @@ export class TsAuthInstanceClient {
1127
1127
  * readonly active: true;
1128
1128
  * readonly token_type: "Bearer";
1129
1129
  * readonly iss: string;
1130
- * readonly sub: string;
1130
+ * readonly sub: import("./ids.js").EntityId;
1131
1131
  * readonly aud: string;
1132
- * readonly client_id: string;
1132
+ * readonly client_id: import("./ids.js").EntityId;
1133
1133
  * readonly scope: string;
1134
1134
  * readonly exp: number;
1135
1135
  * readonly iat: number;
1136
- * readonly sid: string | null;
1136
+ * readonly sid: import("./ids.js").EntityId | null;
1137
1137
  * readonly principal_kind: "user" | "service";
1138
1138
  * }} TsAuthOidcAccessIntrospection
1139
1139
  */
1140
1140
  /**
1141
1141
  * @typedef {Omit<TsAuthOidcAccessIntrospection, "token_type" | "principal_kind"> & {
1142
1142
  * readonly token_type: "refresh_token";
1143
- * readonly family_id: string;
1143
+ * readonly family_id: import("./ids.js").EntityId;
1144
1144
  * }} TsAuthOidcRefreshIntrospection
1145
1145
  */
1146
1146
  /**
@@ -1151,7 +1151,7 @@ export class TsAuthInstanceClient {
1151
1151
  /**
1152
1152
  * @typedef {Omit<TsAuthOidcAccessIntrospection, "sid" | "principal_kind"> &
1153
1153
  * (
1154
- * | { readonly principal_kind: "user"; readonly sid: string }
1154
+ * | { readonly principal_kind: "user"; readonly sid: import("./ids.js").EntityId }
1155
1155
  * | { readonly principal_kind: "service"; readonly sid: null }
1156
1156
  * )} TsAuthOidcResourceAccessIntrospection
1157
1157
  */
@@ -1163,13 +1163,13 @@ export class TsAuthInstanceClient {
1163
1163
  * @typedef {{
1164
1164
  * readonly issuer: string; // Configured canonical provider issuer, independently trusted by the caller.
1165
1165
  * readonly audience: string; // Exact registered resource URI; never derived from the response.
1166
- * readonly introspection_client_id: string;
1166
+ * readonly introspection_client_id: import("./ids.js").EntityId;
1167
1167
  * readonly introspection_secret: string;
1168
1168
  * }} TsAuthOidcResourceCredentials
1169
1169
  */
1170
1170
  /**
1171
1171
  * @typedef {{
1172
- * readonly sub: string;
1172
+ * readonly sub: import("./ids.js").EntityId;
1173
1173
  * readonly email?: string | undefined;
1174
1174
  * readonly email_verified?: boolean | undefined;
1175
1175
  * readonly name?: string | undefined;
@@ -1341,7 +1341,7 @@ export type TsAuthRequestOptions = {
1341
1341
  readonly signal?: AbortSignal | undefined;
1342
1342
  };
1343
1343
  export type TsAuthUser = {
1344
- readonly id: string;
1344
+ readonly id: import("./ids.js").EntityId;
1345
1345
  readonly email: string | null;
1346
1346
  readonly email_verified: boolean;
1347
1347
  readonly username: string | null;
@@ -1354,7 +1354,7 @@ export type TsAuthUser = {
1354
1354
  readonly private_metadata?: Record<string, unknown> | undefined;
1355
1355
  };
1356
1356
  export type TsAuthSession = {
1357
- readonly id: string;
1357
+ readonly id: import("./ids.js").EntityId;
1358
1358
  readonly status: string;
1359
1359
  readonly created_at: number;
1360
1360
  readonly expires_at: number;
@@ -1363,26 +1363,26 @@ export type TsAuthSession = {
1363
1363
  readonly ip_address?: string | null | undefined;
1364
1364
  };
1365
1365
  export type TsAuthMfaFactor = {
1366
- readonly id: string;
1366
+ readonly id: import("./ids.js").EntityId;
1367
1367
  readonly type: string;
1368
1368
  readonly confirmed: boolean;
1369
1369
  readonly createdAt: number;
1370
1370
  };
1371
1371
  export type TsAuthPasskey = {
1372
- readonly id: string;
1372
+ readonly id: import("./ids.js").EntityId;
1373
1373
  readonly nickname: string | null;
1374
1374
  readonly algorithm: string;
1375
1375
  readonly createdAt: number;
1376
1376
  readonly lastUsedAt: number | null;
1377
1377
  };
1378
1378
  export type TsAuthOrganization = {
1379
- readonly id: string;
1379
+ readonly id: import("./ids.js").EntityId;
1380
1380
  readonly name: string;
1381
1381
  readonly slug: string;
1382
1382
  readonly created_at: number;
1383
1383
  };
1384
1384
  export type TsAuthUserOrganizationMembership = {
1385
- readonly id: string;
1385
+ readonly id: import("./ids.js").EntityId;
1386
1386
  readonly role: string;
1387
1387
  readonly created_at: number;
1388
1388
  readonly organization: TsAuthOrganization | null;
@@ -1420,13 +1420,13 @@ export type TsAuthCreateUserRequest = {
1420
1420
  readonly name?: string | undefined;
1421
1421
  };
1422
1422
  export type TsAuthApiKeyWithSecret = {
1423
- readonly id: string;
1423
+ readonly id: import("./ids.js").EntityId;
1424
1424
  readonly name: string;
1425
1425
  readonly api_key: string;
1426
1426
  readonly scopes: readonly string[];
1427
1427
  };
1428
1428
  export type TsAuthApiKey = {
1429
- readonly id: string;
1429
+ readonly id: import("./ids.js").EntityId;
1430
1430
  readonly name: string;
1431
1431
  readonly scopes: readonly string[];
1432
1432
  readonly created_at: number;
@@ -1441,22 +1441,22 @@ export type TsAuthCreateApiKeyRequest = {
1441
1441
  readonly scopes?: readonly string[] | undefined;
1442
1442
  };
1443
1443
  export type TsAuthMembership = {
1444
- readonly id: string;
1445
- readonly organization_id: string;
1446
- readonly user_id: string;
1444
+ readonly id: import("./ids.js").EntityId;
1445
+ readonly organization_id: import("./ids.js").EntityId;
1446
+ readonly user_id: import("./ids.js").EntityId;
1447
1447
  readonly role: string;
1448
1448
  readonly created_at: number;
1449
1449
  };
1450
1450
  export type TsAuthMembershipWithUser = TsAuthMembership & {
1451
1451
  readonly user: {
1452
- readonly id: string;
1452
+ readonly id: import("./ids.js").EntityId;
1453
1453
  readonly email: string;
1454
1454
  readonly name: string;
1455
1455
  } | null;
1456
1456
  };
1457
1457
  export type TsAuthInvitation = {
1458
- readonly id: string;
1459
- readonly organization_id: string;
1458
+ readonly id: import("./ids.js").EntityId;
1459
+ readonly organization_id: import("./ids.js").EntityId;
1460
1460
  readonly email: string;
1461
1461
  readonly role: string;
1462
1462
  readonly status: string;
@@ -1464,13 +1464,13 @@ export type TsAuthInvitation = {
1464
1464
  readonly created_at: number;
1465
1465
  };
1466
1466
  export type TsAuthOrganizationDomain = {
1467
- readonly id: string;
1468
- readonly organization_id: string;
1467
+ readonly id: import("./ids.js").EntityId;
1468
+ readonly organization_id: import("./ids.js").EntityId;
1469
1469
  readonly domain: string;
1470
1470
  readonly created_at: number;
1471
1471
  };
1472
1472
  export type TsAuthDomainEnrollment = {
1473
- readonly org_id: string;
1473
+ readonly org_id: import("./ids.js").EntityId;
1474
1474
  };
1475
1475
  export type TsAuthCreateOrganizationRequest = {
1476
1476
  readonly name: string;
@@ -1480,7 +1480,7 @@ export type TsAuthUpdateOrganizationRequest = {
1480
1480
  readonly name: string;
1481
1481
  };
1482
1482
  export type TsAuthCreateMembershipRequest = {
1483
- readonly user_id: string;
1483
+ readonly user_id: import("./ids.js").EntityId;
1484
1484
  readonly role: string;
1485
1485
  };
1486
1486
  export type TsAuthCreateInvitationRequest = {
@@ -1491,7 +1491,7 @@ export type TsAuthAddDomainRequest = {
1491
1491
  readonly domain: string;
1492
1492
  };
1493
1493
  export type TsAuthEnrollRequest = {
1494
- readonly user_id: string;
1494
+ readonly user_id: import("./ids.js").EntityId;
1495
1495
  };
1496
1496
  export type TsAuthOauthGrantType = "authorization_code" | "refresh_token" | "client_credentials" | "urn:ietf:params:oauth:grant-type:device_code";
1497
1497
  export type TsAuthOauthClientAuthMethod = "none" | "client_secret_post" | "client_secret_basic";
@@ -1513,8 +1513,8 @@ export type TsAuthUpdateOauthClientRequest = Omit<TsAuthCreateOauthClientRequest
1513
1513
  readonly rotate_secret?: boolean | undefined;
1514
1514
  };
1515
1515
  export type TsAuthOauthClientView = {
1516
- readonly id: string;
1517
- readonly client_id: string;
1516
+ readonly id: import("./ids.js").EntityId;
1517
+ readonly client_id: import("./ids.js").EntityId;
1518
1518
  readonly name: string;
1519
1519
  readonly redirect_uris: readonly string[];
1520
1520
  readonly post_logout_redirect_uris: readonly string[];
@@ -1539,21 +1539,21 @@ export type TsAuthOauthClientList = {
1539
1539
  export type TsAuthOauthClientUpdate = TsAuthOauthClientView | TsAuthOauthClientWithSecret;
1540
1540
  export type TsAuthCreateOauthResourceRequest = {
1541
1541
  readonly audience: string;
1542
- readonly allowed_client_ids: readonly string[];
1542
+ readonly allowed_client_ids: readonly import("./ids.js").EntityId[];
1543
1543
  readonly allowed_grant_types: readonly TsAuthOauthGrantType[];
1544
1544
  readonly allowed_scopes: readonly string[];
1545
1545
  };
1546
1546
  export type TsAuthUpdateOauthResourceRequest = {
1547
1547
  readonly expected_auth_epoch: number;
1548
- readonly allowed_client_ids?: readonly string[] | undefined;
1548
+ readonly allowed_client_ids?: readonly import("./ids.js").EntityId[] | undefined;
1549
1549
  readonly allowed_grant_types?: readonly TsAuthOauthGrantType[] | undefined;
1550
1550
  readonly allowed_scopes?: readonly string[] | undefined;
1551
1551
  readonly enabled?: boolean | undefined;
1552
1552
  readonly rotate_secret?: boolean | undefined;
1553
1553
  };
1554
1554
  export type TsAuthOauthResourceView = TsAuthCreateOauthResourceRequest & {
1555
- readonly id: string;
1556
- readonly introspection_client_id: string;
1555
+ readonly id: import("./ids.js").EntityId;
1556
+ readonly introspection_client_id: import("./ids.js").EntityId;
1557
1557
  readonly token_endpoint_auth_method: "client_secret_basic";
1558
1558
  readonly auth_epoch: number;
1559
1559
  readonly enabled: boolean;
@@ -1568,11 +1568,11 @@ export type TsAuthOauthResourceList = {
1568
1568
  readonly resources: readonly TsAuthOauthResourceView[];
1569
1569
  };
1570
1570
  export type TsAuthConnectionView = {
1571
- readonly id: string;
1571
+ readonly id: import("./ids.js").EntityId;
1572
1572
  readonly type: "oidc" | "saml";
1573
1573
  readonly name: string;
1574
1574
  readonly enabled: boolean;
1575
- readonly org_id: string | null;
1575
+ readonly org_id: import("./ids.js").EntityId | null;
1576
1576
  readonly issuer_url: string | null;
1577
1577
  readonly client_id: string | null;
1578
1578
  readonly authorization_endpoint: string | null;
@@ -1608,17 +1608,17 @@ export type TsAuthConnectionPatch = {
1608
1608
  readonly client_secret?: string | undefined;
1609
1609
  };
1610
1610
  export type TsAuthDirectoryWithToken = {
1611
- readonly id: string;
1612
- readonly org_id: string | null;
1611
+ readonly id: import("./ids.js").EntityId;
1612
+ readonly org_id: import("./ids.js").EntityId | null;
1613
1613
  readonly token: string;
1614
1614
  };
1615
1615
  export type TsAuthDirectory = {
1616
- readonly id: string;
1617
- readonly org_id: string | null;
1616
+ readonly id: import("./ids.js").EntityId;
1617
+ readonly org_id: import("./ids.js").EntityId | null;
1618
1618
  readonly created_at: number;
1619
1619
  };
1620
1620
  export type TsAuthJwtTemplate = {
1621
- readonly id: string;
1621
+ readonly id: import("./ids.js").EntityId;
1622
1622
  readonly name: string;
1623
1623
  readonly claims: Record<string, string>;
1624
1624
  readonly lifetime_seconds: number;
@@ -1638,31 +1638,31 @@ export type TsAuthUpdateJwtTemplateRequest = {
1638
1638
  readonly lifetime_seconds?: number | undefined;
1639
1639
  };
1640
1640
  export type TsAuthWebhookWithSecret = {
1641
- readonly id: string;
1641
+ readonly id: import("./ids.js").EntityId;
1642
1642
  readonly url: string;
1643
1643
  readonly events: readonly string[];
1644
1644
  readonly signing_secret: string;
1645
1645
  };
1646
1646
  export type TsAuthWebhook = {
1647
- readonly id: string;
1647
+ readonly id: import("./ids.js").EntityId;
1648
1648
  readonly url: string;
1649
1649
  readonly events: readonly string[];
1650
1650
  readonly enabled: boolean;
1651
1651
  readonly created_at: number;
1652
1652
  };
1653
1653
  export type TsAuthDeadLetterEntry = {
1654
- readonly id: string;
1655
- readonly endpoint_id: string;
1656
- readonly event_id: string;
1654
+ readonly id: `${import("./ids.js").EntityId}:${import("./ids.js").EntityId}`;
1655
+ readonly endpoint_id: import("./ids.js").EntityId;
1656
+ readonly event_id: import("./ids.js").EntityId;
1657
1657
  readonly attempts: number;
1658
1658
  readonly last_error?: string | undefined;
1659
1659
  readonly updated_at: number;
1660
1660
  };
1661
1661
  export type TsAuthAuditEvent = {
1662
- readonly id: string;
1663
- readonly instance_id: string;
1662
+ readonly id: import("./ids.js").EntityId;
1663
+ readonly instance_id: import("./ids.js").EntityId;
1664
1664
  readonly type: string;
1665
- readonly actor_id?: string | undefined;
1665
+ readonly actor_id?: import("./ids.js").EntityId | undefined;
1666
1666
  readonly data: Record<string, unknown>;
1667
1667
  readonly created_at: number;
1668
1668
  readonly integrity_version: number;
@@ -1680,7 +1680,7 @@ export type TsAuthBillingOverview = {
1680
1680
  readonly quota: number;
1681
1681
  };
1682
1682
  export type TsAuthInstance = {
1683
- readonly id: string;
1683
+ readonly id: import("./ids.js").EntityId;
1684
1684
  readonly slug: string;
1685
1685
  readonly name: string;
1686
1686
  readonly logo_url?: string | null | undefined;
@@ -1730,7 +1730,7 @@ export type TsAuthOidcJwks = {
1730
1730
  readonly keys: readonly TsAuthOidcJwk[];
1731
1731
  };
1732
1732
  export type TsAuthOidcAuthorizationRequest = {
1733
- readonly client_id: string;
1733
+ readonly client_id: import("./ids.js").EntityId;
1734
1734
  readonly redirect_uri: string;
1735
1735
  readonly response_type: "code";
1736
1736
  readonly scope?: string | undefined;
@@ -1788,23 +1788,23 @@ export type TsAuthOidcAccessIntrospection = {
1788
1788
  readonly active: true;
1789
1789
  readonly token_type: "Bearer";
1790
1790
  readonly iss: string;
1791
- readonly sub: string;
1791
+ readonly sub: import("./ids.js").EntityId;
1792
1792
  readonly aud: string;
1793
- readonly client_id: string;
1793
+ readonly client_id: import("./ids.js").EntityId;
1794
1794
  readonly scope: string;
1795
1795
  readonly exp: number;
1796
1796
  readonly iat: number;
1797
- readonly sid: string | null;
1797
+ readonly sid: import("./ids.js").EntityId | null;
1798
1798
  readonly principal_kind: "user" | "service";
1799
1799
  };
1800
1800
  export type TsAuthOidcRefreshIntrospection = Omit<TsAuthOidcAccessIntrospection, "token_type" | "principal_kind"> & {
1801
1801
  readonly token_type: "refresh_token";
1802
- readonly family_id: string;
1802
+ readonly family_id: import("./ids.js").EntityId;
1803
1803
  };
1804
1804
  export type TsAuthOidcIntrospection = TsAuthOidcInactiveIntrospection | TsAuthOidcAccessIntrospection | TsAuthOidcRefreshIntrospection;
1805
1805
  export type TsAuthOidcResourceAccessIntrospection = Omit<TsAuthOidcAccessIntrospection, "sid" | "principal_kind"> & ({
1806
1806
  readonly principal_kind: "user";
1807
- readonly sid: string;
1807
+ readonly sid: import("./ids.js").EntityId;
1808
1808
  } | {
1809
1809
  readonly principal_kind: "service";
1810
1810
  readonly sid: null;
@@ -1813,11 +1813,11 @@ export type TsAuthOidcResourceIntrospection = TsAuthOidcInactiveIntrospection |
1813
1813
  export type TsAuthOidcResourceCredentials = {
1814
1814
  readonly issuer: string;
1815
1815
  readonly audience: string;
1816
- readonly introspection_client_id: string;
1816
+ readonly introspection_client_id: import("./ids.js").EntityId;
1817
1817
  readonly introspection_secret: string;
1818
1818
  };
1819
1819
  export type TsAuthOidcUserInfo = {
1820
- readonly sub: string;
1820
+ readonly sub: import("./ids.js").EntityId;
1821
1821
  readonly email?: string | undefined;
1822
1822
  readonly email_verified?: boolean | undefined;
1823
1823
  readonly name?: string | undefined;
@@ -4,16 +4,16 @@
4
4
  * `document` is the value, or the LWW winner when a causal read answers `"conflict"` with `siblings`.
5
5
  * Unknown future states pass through.
6
6
  * @typedef {object} V1Document
7
- * @property {string} id
7
+ * @property {import("../ids.js").EntityId} id
8
8
  * @property {string} version
9
9
  * @property {"value" | "conflict" | (string & {})} state
10
10
  * @property {JsonObject} document
11
- * @property {readonly JsonValue[]} [siblings] Every live version, on a causal read with several.
11
+ * @property {readonly JsonValue[]} [siblings] Live versions and tombstones on a causal conflict.
12
12
  */
13
13
  /**
14
14
  * The result of a document write.
15
15
  * @typedef {object} V1WriteResult
16
- * @property {string} id
16
+ * @property {import("../ids.js").EntityId} id
17
17
  * @property {string} version For a delete, the tombstone's version.
18
18
  * @property {string} offset The database commit offset (decimal u64), usable with shape `waitFor`.
19
19
  * @property {V1Durability} durability
@@ -31,6 +31,8 @@ export function malformed(what: string): never;
31
31
  * @returns {JsonObject}
32
32
  */
33
33
  export function object(value: JsonValue | undefined, what: string): JsonObject;
34
+ /** @param {JsonValue | undefined} value @returns {JsonObject} */
35
+ export function documentObject(value: JsonValue | undefined): JsonObject;
34
36
  /**
35
37
  * @param {JsonValue | undefined} value
36
38
  * @param {string} what
@@ -83,12 +85,12 @@ export type V1Durability = "local_durable" | (string & {});
83
85
  * Unknown future states pass through.
84
86
  */
85
87
  export type V1Document = {
86
- id: string;
88
+ id: import("../ids.js").EntityId;
87
89
  version: string;
88
90
  state: "value" | "conflict" | (string & {});
89
91
  document: JsonObject;
90
92
  /**
91
- * Every live version, on a causal read with several.
93
+ * Live versions and tombstones on a causal conflict.
92
94
  */
93
95
  siblings?: readonly JsonValue[];
94
96
  };
@@ -96,7 +98,7 @@ export type V1Document = {
96
98
  * The result of a document write.
97
99
  */
98
100
  export type V1WriteResult = {
99
- id: string;
101
+ id: import("../ids.js").EntityId;
100
102
  /**
101
103
  * For a delete, the tombstone's version.
102
104
  */