@seamapi/types 1.81.0 → 1.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/connect.cjs +75 -22
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +150 -37
- package/lib/seam/connect/openapi.d.ts +117 -26
- package/lib/seam/connect/openapi.js +74 -18
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +29 -7
- package/lib/seam/connect/stable/models/connect-webview.d.ts +3 -3
- package/lib/seam/connect/stable/models/custom-metadata.d.ts +1 -1
- package/lib/seam/connect/stable/models/custom-metadata.js +1 -1
- package/lib/seam/connect/stable/models/custom-metadata.js.map +1 -1
- package/lib/seam/connect/unstable/models/acs/user.js +1 -9
- package/lib/seam/connect/unstable/models/acs/user.js.map +1 -1
- package/lib/seam/connect/unstable/models/phone-number.d.ts +2 -0
- package/lib/seam/connect/unstable/models/phone-number.js +11 -0
- package/lib/seam/connect/unstable/models/phone-number.js.map +1 -0
- package/lib/seam/connect/unstable/models/user-identity.d.ts +3 -0
- package/lib/seam/connect/unstable/models/user-identity.js +2 -0
- package/lib/seam/connect/unstable/models/user-identity.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/seam/connect/openapi.ts +74 -18
- package/src/lib/seam/connect/route-types.ts +29 -15
- package/src/lib/seam/connect/stable/models/custom-metadata.ts +1 -4
- package/src/lib/seam/connect/unstable/models/acs/user.ts +1 -13
- package/src/lib/seam/connect/unstable/models/phone-number.ts +14 -0
- package/src/lib/seam/connect/unstable/models/user-identity.ts +3 -0
|
@@ -1198,6 +1198,24 @@ export interface Routes {
|
|
|
1198
1198
|
}>;
|
|
1199
1199
|
};
|
|
1200
1200
|
};
|
|
1201
|
+
'/acs/users/list_accessible_entrances': {
|
|
1202
|
+
route: '/acs/users/list_accessible_entrances';
|
|
1203
|
+
method: 'GET' | 'POST';
|
|
1204
|
+
queryParams: {};
|
|
1205
|
+
jsonBody: {};
|
|
1206
|
+
commonParams: {
|
|
1207
|
+
acs_user_id: string;
|
|
1208
|
+
};
|
|
1209
|
+
formData: {};
|
|
1210
|
+
jsonResponse: {
|
|
1211
|
+
acs_entrances: Array<{
|
|
1212
|
+
acs_entrance_id: string;
|
|
1213
|
+
display_name: string;
|
|
1214
|
+
acs_system_id: string;
|
|
1215
|
+
created_at: string;
|
|
1216
|
+
}>;
|
|
1217
|
+
};
|
|
1218
|
+
};
|
|
1201
1219
|
'/acs/users/remove_from_access_group': {
|
|
1202
1220
|
route: '/acs/users/remove_from_access_group';
|
|
1203
1221
|
method: 'DELETE' | 'POST';
|
|
@@ -1475,7 +1493,7 @@ export interface Routes {
|
|
|
1475
1493
|
custom_redirect_failure_url?: string | undefined;
|
|
1476
1494
|
accepted_providers?: Array<'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'schlage' | 'smartthings' | 'yale' | 'genie' | 'doorking' | 'salto' | 'lockly' | 'ttlock' | 'linear' | 'noiseaware' | 'nuki' | 'seam_relay_admin' | 'igloo' | 'kwikset' | 'minut' | 'my_2n' | 'controlbyweb' | 'nest' | 'igloohome' | 'ecobee' | 'hubitat' | 'four_suites' | 'dormakaba_oracode' | 'pti' | 'wyze' | 'seam_passport' | 'visionline' | 'assa_abloy_credential_service' | 'seam_bridge' | 'yale_access' | 'hid_cm'> | undefined;
|
|
1477
1495
|
provider_category?: ('stable' | 'consumer_smartlocks' | 'internal_beta') | undefined;
|
|
1478
|
-
custom_metadata?: Record<string, string |
|
|
1496
|
+
custom_metadata?: Record<string, string | boolean> | undefined;
|
|
1479
1497
|
automatically_manage_new_devices?: boolean | undefined;
|
|
1480
1498
|
wait_for_device_creation?: boolean | undefined;
|
|
1481
1499
|
};
|
|
@@ -1497,7 +1515,7 @@ export interface Routes {
|
|
|
1497
1515
|
status: 'pending' | 'failed' | 'authorized';
|
|
1498
1516
|
custom_redirect_url: string | null;
|
|
1499
1517
|
custom_redirect_failure_url: string | null;
|
|
1500
|
-
custom_metadata: Record<string, string |
|
|
1518
|
+
custom_metadata: Record<string, string | boolean>;
|
|
1501
1519
|
automatically_manage_new_devices: boolean;
|
|
1502
1520
|
wait_for_device_creation: boolean;
|
|
1503
1521
|
authorized_at: string | null;
|
|
@@ -1541,7 +1559,7 @@ export interface Routes {
|
|
|
1541
1559
|
status: 'pending' | 'failed' | 'authorized';
|
|
1542
1560
|
custom_redirect_url: string | null;
|
|
1543
1561
|
custom_redirect_failure_url: string | null;
|
|
1544
|
-
custom_metadata: Record<string, string |
|
|
1562
|
+
custom_metadata: Record<string, string | boolean>;
|
|
1545
1563
|
automatically_manage_new_devices: boolean;
|
|
1546
1564
|
wait_for_device_creation: boolean;
|
|
1547
1565
|
authorized_at: string | null;
|
|
@@ -1574,7 +1592,7 @@ export interface Routes {
|
|
|
1574
1592
|
status: 'pending' | 'failed' | 'authorized';
|
|
1575
1593
|
custom_redirect_url: string | null;
|
|
1576
1594
|
custom_redirect_failure_url: string | null;
|
|
1577
|
-
custom_metadata: Record<string, string |
|
|
1595
|
+
custom_metadata: Record<string, string | boolean>;
|
|
1578
1596
|
automatically_manage_new_devices: boolean;
|
|
1579
1597
|
wait_for_device_creation: boolean;
|
|
1580
1598
|
authorized_at: string | null;
|
|
@@ -1632,7 +1650,7 @@ export interface Routes {
|
|
|
1632
1650
|
account_type_display_name: string;
|
|
1633
1651
|
errors?: any;
|
|
1634
1652
|
warnings?: any;
|
|
1635
|
-
custom_metadata?: Record<string, string |
|
|
1653
|
+
custom_metadata?: Record<string, string | boolean> | undefined;
|
|
1636
1654
|
automatically_manage_new_devices: boolean;
|
|
1637
1655
|
};
|
|
1638
1656
|
};
|
|
@@ -1659,7 +1677,7 @@ export interface Routes {
|
|
|
1659
1677
|
account_type_display_name: string;
|
|
1660
1678
|
errors?: any;
|
|
1661
1679
|
warnings?: any;
|
|
1662
|
-
custom_metadata?: Record<string, string |
|
|
1680
|
+
custom_metadata?: Record<string, string | boolean> | undefined;
|
|
1663
1681
|
automatically_manage_new_devices: boolean;
|
|
1664
1682
|
}>;
|
|
1665
1683
|
};
|
|
@@ -1689,7 +1707,7 @@ export interface Routes {
|
|
|
1689
1707
|
account_type_display_name: string;
|
|
1690
1708
|
errors?: any;
|
|
1691
1709
|
warnings?: any;
|
|
1692
|
-
custom_metadata?: Record<string, string |
|
|
1710
|
+
custom_metadata?: Record<string, string | boolean> | undefined;
|
|
1693
1711
|
automatically_manage_new_devices: boolean;
|
|
1694
1712
|
};
|
|
1695
1713
|
};
|
|
@@ -7251,6 +7269,7 @@ export interface Routes {
|
|
|
7251
7269
|
commonParams: {
|
|
7252
7270
|
user_identity_key?: (string | null) | undefined;
|
|
7253
7271
|
email_address?: (string | null) | undefined;
|
|
7272
|
+
phone_number?: (string | null) | undefined;
|
|
7254
7273
|
full_name?: (string | null) | undefined;
|
|
7255
7274
|
};
|
|
7256
7275
|
formData: {};
|
|
@@ -7259,6 +7278,7 @@ export interface Routes {
|
|
|
7259
7278
|
user_identity_id: string;
|
|
7260
7279
|
user_identity_key: string | null;
|
|
7261
7280
|
email_address: string | null;
|
|
7281
|
+
phone_number: string | null;
|
|
7262
7282
|
display_name: string;
|
|
7263
7283
|
full_name: string | null;
|
|
7264
7284
|
created_at: string;
|
|
@@ -7344,6 +7364,7 @@ export interface Routes {
|
|
|
7344
7364
|
user_identity_id: string;
|
|
7345
7365
|
user_identity_key: string | null;
|
|
7346
7366
|
email_address: string | null;
|
|
7367
|
+
phone_number: string | null;
|
|
7347
7368
|
display_name: string;
|
|
7348
7369
|
full_name: string | null;
|
|
7349
7370
|
created_at: string;
|
|
@@ -7375,6 +7396,7 @@ export interface Routes {
|
|
|
7375
7396
|
user_identity_id: string;
|
|
7376
7397
|
user_identity_key: string | null;
|
|
7377
7398
|
email_address: string | null;
|
|
7399
|
+
phone_number: string | null;
|
|
7378
7400
|
display_name: string;
|
|
7379
7401
|
full_name: string | null;
|
|
7380
7402
|
created_at: string;
|
|
@@ -14,7 +14,7 @@ export declare const connect_webview: z.ZodObject<{
|
|
|
14
14
|
status: z.ZodEnum<["pending", "failed", "authorized"]>;
|
|
15
15
|
custom_redirect_url: z.ZodNullable<z.ZodString>;
|
|
16
16
|
custom_redirect_failure_url: z.ZodNullable<z.ZodString>;
|
|
17
|
-
custom_metadata: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.
|
|
17
|
+
custom_metadata: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean]>>, Record<string, string | boolean>, Record<string, string | boolean>>;
|
|
18
18
|
automatically_manage_new_devices: z.ZodBoolean;
|
|
19
19
|
wait_for_device_creation: z.ZodBoolean;
|
|
20
20
|
authorized_at: z.ZodNullable<z.ZodString>;
|
|
@@ -33,7 +33,7 @@ export declare const connect_webview: z.ZodObject<{
|
|
|
33
33
|
login_successful: boolean;
|
|
34
34
|
custom_redirect_url: string | null;
|
|
35
35
|
custom_redirect_failure_url: string | null;
|
|
36
|
-
custom_metadata: Record<string, string |
|
|
36
|
+
custom_metadata: Record<string, string | boolean>;
|
|
37
37
|
automatically_manage_new_devices: boolean;
|
|
38
38
|
wait_for_device_creation: boolean;
|
|
39
39
|
authorized_at: string | null;
|
|
@@ -53,7 +53,7 @@ export declare const connect_webview: z.ZodObject<{
|
|
|
53
53
|
login_successful: boolean;
|
|
54
54
|
custom_redirect_url: string | null;
|
|
55
55
|
custom_redirect_failure_url: string | null;
|
|
56
|
-
custom_metadata: Record<string, string |
|
|
56
|
+
custom_metadata: Record<string, string | boolean>;
|
|
57
57
|
automatically_manage_new_devices: boolean;
|
|
58
58
|
wait_for_device_creation: boolean;
|
|
59
59
|
authorized_at: string | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const custom_metadata: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.
|
|
2
|
+
export declare const custom_metadata: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean]>>, Record<string, string | boolean>, Record<string, string | boolean>>;
|
|
3
3
|
export type CustomMetadata = z.infer<typeof custom_metadata>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export const custom_metadata = z
|
|
3
|
-
.record(z.string().max(40), z.union([z.string().max(500), z.
|
|
3
|
+
.record(z.string().max(40), z.union([z.string().max(500), z.boolean()]))
|
|
4
4
|
.refine((val) => Object.keys(val).length <= 50, {
|
|
5
5
|
message: 'Custom metadata is limited to a maximum of 50 keys',
|
|
6
6
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-metadata.js","sourceRoot":"","sources":["../../../../../src/lib/seam/connect/stable/models/custom-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,MAAM,
|
|
1
|
+
{"version":3,"file":"custom-metadata.js","sourceRoot":"","sources":["../../../../../src/lib/seam/connect/stable/models/custom-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;KACvE,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,IAAI,EAAE,EAAE;IAC9C,OAAO,EAAE,oDAAoD;CAC9D,CAAC,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { phone_number } from '../phone-number.js';
|
|
2
3
|
import { schedule } from '../schedule.js';
|
|
3
4
|
export const acs_user_external_type = z.enum([
|
|
4
5
|
'pti_user',
|
|
@@ -6,15 +7,6 @@ export const acs_user_external_type = z.enum([
|
|
|
6
7
|
'hid_credential_manager_user',
|
|
7
8
|
'salto_site_user',
|
|
8
9
|
]);
|
|
9
|
-
const phone_number = z.coerce
|
|
10
|
-
.string()
|
|
11
|
-
.trim()
|
|
12
|
-
.refine((val) => {
|
|
13
|
-
// https://www.twilio.com/docs/glossary/what-e164
|
|
14
|
-
return /^\+[1-9]\d{1,14}$/.test(val);
|
|
15
|
-
}, {
|
|
16
|
-
message: 'Phone number must be in E.164 format: +14155552671',
|
|
17
|
-
});
|
|
18
10
|
const user_fields = z.object({
|
|
19
11
|
full_name: z.string().optional(),
|
|
20
12
|
email: z
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../../../../../src/lib/seam/connect/unstable/models/acs/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC3C,UAAU;IACV,YAAY;IACZ,6BAA6B;IAC7B,iBAAiB;CAClB,CAAC,CAAA;AAIF,MAAM,
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../../../../../src/lib/seam/connect/unstable/models/acs/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC3C,UAAU;IACV,YAAY;IACZ,6BAA6B;IAC7B,iBAAiB;CAClB,CAAC,CAAA;AAIF,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,KAAK,EAAE;SACP,QAAQ,EAAE;SACV,QAAQ,CAAC,gCAAgC,CAAC;IAC7C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IAC5C,YAAY,EAAE,YAAY,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC;KACtB,MAAM,CAAC;IACN,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC9B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAChC,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAC/C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC/B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,aAAa,EAAE,sBAAsB,CAAC,QAAQ,EAAE;IAChD,0BAA0B,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjD,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE;IACzB,eAAe,EAAE,QAAQ,CAAC,QAAQ,EAAE;CACrC,CAAC;KACD,KAAK,CAAC,WAAW,CAAC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const phone_number = z.coerce
|
|
3
|
+
.string()
|
|
4
|
+
.trim()
|
|
5
|
+
.refine((val) => {
|
|
6
|
+
// https://www.twilio.com/docs/glossary/what-e164
|
|
7
|
+
return /^\+[1-9]\d{1,14}$/.test(val);
|
|
8
|
+
}, {
|
|
9
|
+
message: 'Phone number must be in E.164 format: +14155552671',
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=phone-number.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-number.js","sourceRoot":"","sources":["../../../../../src/lib/seam/connect/unstable/models/phone-number.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM;KACjC,MAAM,EAAE;KACR,IAAI,EAAE;KACN,MAAM,CACL,CAAC,GAAG,EAAE,EAAE;IACN,iDAAiD;IACjD,OAAO,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACtC,CAAC,EACD;IACE,OAAO,EAAE,oDAAoD;CAC9D,CACF,CAAA"}
|
|
@@ -3,6 +3,7 @@ export declare const user_identity: z.ZodObject<{
|
|
|
3
3
|
user_identity_id: z.ZodString;
|
|
4
4
|
user_identity_key: z.ZodNullable<z.ZodString>;
|
|
5
5
|
email_address: z.ZodNullable<z.ZodString>;
|
|
6
|
+
phone_number: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
|
|
6
7
|
display_name: z.ZodString;
|
|
7
8
|
full_name: z.ZodNullable<z.ZodString>;
|
|
8
9
|
created_at: z.ZodString;
|
|
@@ -14,6 +15,7 @@ export declare const user_identity: z.ZodObject<{
|
|
|
14
15
|
user_identity_id: string;
|
|
15
16
|
user_identity_key: string | null;
|
|
16
17
|
email_address: string | null;
|
|
18
|
+
phone_number: string | null;
|
|
17
19
|
full_name: string | null;
|
|
18
20
|
}, {
|
|
19
21
|
workspace_id: string;
|
|
@@ -22,6 +24,7 @@ export declare const user_identity: z.ZodObject<{
|
|
|
22
24
|
user_identity_id: string;
|
|
23
25
|
user_identity_key: string | null;
|
|
24
26
|
email_address: string | null;
|
|
27
|
+
phone_number: string | null;
|
|
25
28
|
full_name: string | null;
|
|
26
29
|
}>;
|
|
27
30
|
export type UserIdentity = z.output<typeof user_identity>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { phone_number } from './phone-number.js';
|
|
2
3
|
export const user_identity = z.object({
|
|
3
4
|
user_identity_id: z.string().uuid(),
|
|
4
5
|
user_identity_key: z.string().nonempty().nullable(),
|
|
5
6
|
email_address: z.string().email().nullable(),
|
|
7
|
+
phone_number: phone_number.nullable(),
|
|
6
8
|
display_name: z.string().nonempty(),
|
|
7
9
|
full_name: z.string().nonempty().nullable(),
|
|
8
10
|
created_at: z.string().datetime(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-identity.js","sourceRoot":"","sources":["../../../../../src/lib/seam/connect/unstable/models/user-identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACnC,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACnD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IAC5C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC3C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CAChC,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"user-identity.js","sourceRoot":"","sources":["../../../../../src/lib/seam/connect/unstable/models/user-identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACnC,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACnD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IAC5C,YAAY,EAAE,YAAY,CAAC,QAAQ,EAAE;IACrC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC3C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CAChC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -423,13 +423,7 @@ export default {
|
|
|
423
423
|
created_at: { format: 'date-time', type: 'string' },
|
|
424
424
|
custom_metadata: {
|
|
425
425
|
additionalProperties: {
|
|
426
|
-
|
|
427
|
-
oneOf: [
|
|
428
|
-
{ maxLength: 500, type: 'string' },
|
|
429
|
-
{ type: 'number' },
|
|
430
|
-
{ format: 'null', nullable: true, type: 'string' },
|
|
431
|
-
{ type: 'boolean' },
|
|
432
|
-
],
|
|
426
|
+
oneOf: [{ maxLength: 500, type: 'string' }, { type: 'boolean' }],
|
|
433
427
|
},
|
|
434
428
|
type: 'object',
|
|
435
429
|
},
|
|
@@ -485,13 +479,7 @@ export default {
|
|
|
485
479
|
created_at: { format: 'date-time', type: 'string' },
|
|
486
480
|
custom_metadata: {
|
|
487
481
|
additionalProperties: {
|
|
488
|
-
|
|
489
|
-
oneOf: [
|
|
490
|
-
{ type: 'string' },
|
|
491
|
-
{ type: 'number' },
|
|
492
|
-
{ type: 'boolean' },
|
|
493
|
-
{ format: 'null', nullable: true, type: 'string' },
|
|
494
|
-
],
|
|
482
|
+
oneOf: [{ maxLength: 500, type: 'string' }, { type: 'boolean' }],
|
|
495
483
|
},
|
|
496
484
|
type: 'object',
|
|
497
485
|
},
|
|
@@ -6383,6 +6371,68 @@ export default {
|
|
|
6383
6371
|
'x-fern-sdk-method-name': 'list',
|
|
6384
6372
|
},
|
|
6385
6373
|
},
|
|
6374
|
+
'/acs/users/list_accessible_entrances': {
|
|
6375
|
+
post: {
|
|
6376
|
+
operationId: 'acsUsersListAccessibleEntrancesPost',
|
|
6377
|
+
requestBody: {
|
|
6378
|
+
content: {
|
|
6379
|
+
'application/json': {
|
|
6380
|
+
schema: {
|
|
6381
|
+
properties: { acs_user_id: { format: 'uuid', type: 'string' } },
|
|
6382
|
+
required: ['acs_user_id'],
|
|
6383
|
+
type: 'object',
|
|
6384
|
+
},
|
|
6385
|
+
},
|
|
6386
|
+
},
|
|
6387
|
+
},
|
|
6388
|
+
responses: {
|
|
6389
|
+
200: {
|
|
6390
|
+
content: {
|
|
6391
|
+
'application/json': {
|
|
6392
|
+
schema: {
|
|
6393
|
+
properties: {
|
|
6394
|
+
acs_entrances: {
|
|
6395
|
+
items: {
|
|
6396
|
+
properties: {
|
|
6397
|
+
acs_entrance_id: { format: 'uuid', type: 'string' },
|
|
6398
|
+
acs_system_id: { format: 'uuid', type: 'string' },
|
|
6399
|
+
created_at: { format: 'date-time', type: 'string' },
|
|
6400
|
+
display_name: { type: 'string' },
|
|
6401
|
+
},
|
|
6402
|
+
required: [
|
|
6403
|
+
'acs_entrance_id',
|
|
6404
|
+
'display_name',
|
|
6405
|
+
'acs_system_id',
|
|
6406
|
+
'created_at',
|
|
6407
|
+
],
|
|
6408
|
+
type: 'object',
|
|
6409
|
+
},
|
|
6410
|
+
type: 'array',
|
|
6411
|
+
},
|
|
6412
|
+
ok: { type: 'boolean' },
|
|
6413
|
+
},
|
|
6414
|
+
required: ['acs_entrances', 'ok'],
|
|
6415
|
+
type: 'object',
|
|
6416
|
+
},
|
|
6417
|
+
},
|
|
6418
|
+
},
|
|
6419
|
+
description: 'OK',
|
|
6420
|
+
},
|
|
6421
|
+
400: { description: 'Bad Request' },
|
|
6422
|
+
401: { description: 'Unauthorized' },
|
|
6423
|
+
},
|
|
6424
|
+
security: [
|
|
6425
|
+
{ client_session: [] },
|
|
6426
|
+
{ pat_with_workspace: [] },
|
|
6427
|
+
{ console_session: [] },
|
|
6428
|
+
{ api_key: [] },
|
|
6429
|
+
],
|
|
6430
|
+
summary: '/acs/users/list_accessible_entrances',
|
|
6431
|
+
tags: ['/acs'],
|
|
6432
|
+
'x-fern-sdk-group-name': ['acs', 'users'],
|
|
6433
|
+
'x-fern-sdk-method-name': 'list_accessible_entrances',
|
|
6434
|
+
},
|
|
6435
|
+
},
|
|
6386
6436
|
'/acs/users/remove_from_access_group': {
|
|
6387
6437
|
post: {
|
|
6388
6438
|
operationId: 'acsUsersRemoveFromAccessGroupPost',
|
|
@@ -7309,11 +7359,8 @@ export default {
|
|
|
7309
7359
|
automatically_manage_new_devices: { type: 'boolean' },
|
|
7310
7360
|
custom_metadata: {
|
|
7311
7361
|
additionalProperties: {
|
|
7312
|
-
nullable: true,
|
|
7313
7362
|
oneOf: [
|
|
7314
7363
|
{ maxLength: 500, type: 'string' },
|
|
7315
|
-
{ type: 'number' },
|
|
7316
|
-
{ format: 'null', nullable: true, type: 'string' },
|
|
7317
7364
|
{ type: 'boolean' },
|
|
7318
7365
|
],
|
|
7319
7366
|
},
|
|
@@ -11079,6 +11126,7 @@ export default {
|
|
|
11079
11126
|
type: 'string',
|
|
11080
11127
|
},
|
|
11081
11128
|
full_name: { minLength: 1, nullable: true, type: 'string' },
|
|
11129
|
+
phone_number: { nullable: true, type: 'string' },
|
|
11082
11130
|
user_identity_key: {
|
|
11083
11131
|
minLength: 1,
|
|
11084
11132
|
nullable: true,
|
|
@@ -11111,6 +11159,7 @@ export default {
|
|
|
11111
11159
|
nullable: true,
|
|
11112
11160
|
type: 'string',
|
|
11113
11161
|
},
|
|
11162
|
+
phone_number: { nullable: true, type: 'string' },
|
|
11114
11163
|
user_identity_id: { format: 'uuid', type: 'string' },
|
|
11115
11164
|
user_identity_key: {
|
|
11116
11165
|
minLength: 1,
|
|
@@ -11123,6 +11172,7 @@ export default {
|
|
|
11123
11172
|
'user_identity_id',
|
|
11124
11173
|
'user_identity_key',
|
|
11125
11174
|
'email_address',
|
|
11175
|
+
'phone_number',
|
|
11126
11176
|
'display_name',
|
|
11127
11177
|
'full_name',
|
|
11128
11178
|
'created_at',
|
|
@@ -11385,6 +11435,7 @@ export default {
|
|
|
11385
11435
|
nullable: true,
|
|
11386
11436
|
type: 'string',
|
|
11387
11437
|
},
|
|
11438
|
+
phone_number: { nullable: true, type: 'string' },
|
|
11388
11439
|
user_identity_id: { format: 'uuid', type: 'string' },
|
|
11389
11440
|
user_identity_key: {
|
|
11390
11441
|
minLength: 1,
|
|
@@ -11397,6 +11448,7 @@ export default {
|
|
|
11397
11448
|
'user_identity_id',
|
|
11398
11449
|
'user_identity_key',
|
|
11399
11450
|
'email_address',
|
|
11451
|
+
'phone_number',
|
|
11400
11452
|
'display_name',
|
|
11401
11453
|
'full_name',
|
|
11402
11454
|
'created_at',
|
|
@@ -11536,6 +11588,7 @@ export default {
|
|
|
11536
11588
|
nullable: true,
|
|
11537
11589
|
type: 'string',
|
|
11538
11590
|
},
|
|
11591
|
+
phone_number: { nullable: true, type: 'string' },
|
|
11539
11592
|
user_identity_id: { format: 'uuid', type: 'string' },
|
|
11540
11593
|
user_identity_key: {
|
|
11541
11594
|
minLength: 1,
|
|
@@ -11548,6 +11601,7 @@ export default {
|
|
|
11548
11601
|
'user_identity_id',
|
|
11549
11602
|
'user_identity_key',
|
|
11550
11603
|
'email_address',
|
|
11604
|
+
'phone_number',
|
|
11551
11605
|
'display_name',
|
|
11552
11606
|
'full_name',
|
|
11553
11607
|
'created_at',
|
|
@@ -11602,6 +11656,7 @@ export default {
|
|
|
11602
11656
|
nullable: true,
|
|
11603
11657
|
type: 'string',
|
|
11604
11658
|
},
|
|
11659
|
+
phone_number: { nullable: true, type: 'string' },
|
|
11605
11660
|
user_identity_id: { format: 'uuid', type: 'string' },
|
|
11606
11661
|
user_identity_key: {
|
|
11607
11662
|
minLength: 1,
|
|
@@ -11614,6 +11669,7 @@ export default {
|
|
|
11614
11669
|
'user_identity_id',
|
|
11615
11670
|
'user_identity_key',
|
|
11616
11671
|
'email_address',
|
|
11672
|
+
'phone_number',
|
|
11617
11673
|
'display_name',
|
|
11618
11674
|
'full_name',
|
|
11619
11675
|
'created_at',
|
|
@@ -11741,7 +11797,7 @@ export default {
|
|
|
11741
11797
|
{ api_key: [] },
|
|
11742
11798
|
],
|
|
11743
11799
|
summary: '/user_identities/list_acs_systems',
|
|
11744
|
-
tags: [],
|
|
11800
|
+
tags: ['/user_identities'],
|
|
11745
11801
|
'x-fern-sdk-group-name': ['user_identities'],
|
|
11746
11802
|
'x-fern-sdk-method-name': 'list_acs_systems',
|
|
11747
11803
|
},
|
|
@@ -1345,6 +1345,24 @@ export interface Routes {
|
|
|
1345
1345
|
}>
|
|
1346
1346
|
}
|
|
1347
1347
|
}
|
|
1348
|
+
'/acs/users/list_accessible_entrances': {
|
|
1349
|
+
route: '/acs/users/list_accessible_entrances'
|
|
1350
|
+
method: 'GET' | 'POST'
|
|
1351
|
+
queryParams: {}
|
|
1352
|
+
jsonBody: {}
|
|
1353
|
+
commonParams: {
|
|
1354
|
+
acs_user_id: string
|
|
1355
|
+
}
|
|
1356
|
+
formData: {}
|
|
1357
|
+
jsonResponse: {
|
|
1358
|
+
acs_entrances: Array<{
|
|
1359
|
+
acs_entrance_id: string
|
|
1360
|
+
display_name: string
|
|
1361
|
+
acs_system_id: string
|
|
1362
|
+
created_at: string
|
|
1363
|
+
}>
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1348
1366
|
'/acs/users/remove_from_access_group': {
|
|
1349
1367
|
route: '/acs/users/remove_from_access_group'
|
|
1350
1368
|
method: 'DELETE' | 'POST'
|
|
@@ -1672,9 +1690,7 @@ export interface Routes {
|
|
|
1672
1690
|
provider_category?:
|
|
1673
1691
|
| ('stable' | 'consumer_smartlocks' | 'internal_beta')
|
|
1674
1692
|
| undefined
|
|
1675
|
-
custom_metadata?:
|
|
1676
|
-
| Record<string, string | number | null | boolean>
|
|
1677
|
-
| undefined
|
|
1693
|
+
custom_metadata?: Record<string, string | boolean> | undefined
|
|
1678
1694
|
automatically_manage_new_devices?: boolean | undefined
|
|
1679
1695
|
wait_for_device_creation?: boolean | undefined
|
|
1680
1696
|
}
|
|
@@ -1696,7 +1712,7 @@ export interface Routes {
|
|
|
1696
1712
|
status: 'pending' | 'failed' | 'authorized'
|
|
1697
1713
|
custom_redirect_url: string | null
|
|
1698
1714
|
custom_redirect_failure_url: string | null
|
|
1699
|
-
custom_metadata: Record<string, string |
|
|
1715
|
+
custom_metadata: Record<string, string | boolean>
|
|
1700
1716
|
automatically_manage_new_devices: boolean
|
|
1701
1717
|
wait_for_device_creation: boolean
|
|
1702
1718
|
authorized_at: string | null
|
|
@@ -1740,7 +1756,7 @@ export interface Routes {
|
|
|
1740
1756
|
status: 'pending' | 'failed' | 'authorized'
|
|
1741
1757
|
custom_redirect_url: string | null
|
|
1742
1758
|
custom_redirect_failure_url: string | null
|
|
1743
|
-
custom_metadata: Record<string, string |
|
|
1759
|
+
custom_metadata: Record<string, string | boolean>
|
|
1744
1760
|
automatically_manage_new_devices: boolean
|
|
1745
1761
|
wait_for_device_creation: boolean
|
|
1746
1762
|
authorized_at: string | null
|
|
@@ -1773,7 +1789,7 @@ export interface Routes {
|
|
|
1773
1789
|
status: 'pending' | 'failed' | 'authorized'
|
|
1774
1790
|
custom_redirect_url: string | null
|
|
1775
1791
|
custom_redirect_failure_url: string | null
|
|
1776
|
-
custom_metadata: Record<string, string |
|
|
1792
|
+
custom_metadata: Record<string, string | boolean>
|
|
1777
1793
|
automatically_manage_new_devices: boolean
|
|
1778
1794
|
wait_for_device_creation: boolean
|
|
1779
1795
|
authorized_at: string | null
|
|
@@ -1835,9 +1851,7 @@ export interface Routes {
|
|
|
1835
1851
|
account_type_display_name: string
|
|
1836
1852
|
errors?: any
|
|
1837
1853
|
warnings?: any
|
|
1838
|
-
custom_metadata?:
|
|
1839
|
-
| Record<string, string | number | boolean | null>
|
|
1840
|
-
| undefined
|
|
1854
|
+
custom_metadata?: Record<string, string | boolean> | undefined
|
|
1841
1855
|
automatically_manage_new_devices: boolean
|
|
1842
1856
|
}
|
|
1843
1857
|
}
|
|
@@ -1866,9 +1880,7 @@ export interface Routes {
|
|
|
1866
1880
|
account_type_display_name: string
|
|
1867
1881
|
errors?: any
|
|
1868
1882
|
warnings?: any
|
|
1869
|
-
custom_metadata?:
|
|
1870
|
-
| Record<string, string | number | boolean | null>
|
|
1871
|
-
| undefined
|
|
1883
|
+
custom_metadata?: Record<string, string | boolean> | undefined
|
|
1872
1884
|
automatically_manage_new_devices: boolean
|
|
1873
1885
|
}>
|
|
1874
1886
|
}
|
|
@@ -1900,9 +1912,7 @@ export interface Routes {
|
|
|
1900
1912
|
account_type_display_name: string
|
|
1901
1913
|
errors?: any
|
|
1902
1914
|
warnings?: any
|
|
1903
|
-
custom_metadata?:
|
|
1904
|
-
| Record<string, string | number | boolean | null>
|
|
1905
|
-
| undefined
|
|
1915
|
+
custom_metadata?: Record<string, string | boolean> | undefined
|
|
1906
1916
|
automatically_manage_new_devices: boolean
|
|
1907
1917
|
}
|
|
1908
1918
|
}
|
|
@@ -10025,6 +10035,7 @@ export interface Routes {
|
|
|
10025
10035
|
commonParams: {
|
|
10026
10036
|
user_identity_key?: (string | null) | undefined
|
|
10027
10037
|
email_address?: (string | null) | undefined
|
|
10038
|
+
phone_number?: (string | null) | undefined
|
|
10028
10039
|
full_name?: (string | null) | undefined
|
|
10029
10040
|
}
|
|
10030
10041
|
formData: {}
|
|
@@ -10033,6 +10044,7 @@ export interface Routes {
|
|
|
10033
10044
|
user_identity_id: string
|
|
10034
10045
|
user_identity_key: string | null
|
|
10035
10046
|
email_address: string | null
|
|
10047
|
+
phone_number: string | null
|
|
10036
10048
|
display_name: string
|
|
10037
10049
|
full_name: string | null
|
|
10038
10050
|
created_at: string
|
|
@@ -10120,6 +10132,7 @@ export interface Routes {
|
|
|
10120
10132
|
user_identity_id: string
|
|
10121
10133
|
user_identity_key: string | null
|
|
10122
10134
|
email_address: string | null
|
|
10135
|
+
phone_number: string | null
|
|
10123
10136
|
display_name: string
|
|
10124
10137
|
full_name: string | null
|
|
10125
10138
|
created_at: string
|
|
@@ -10151,6 +10164,7 @@ export interface Routes {
|
|
|
10151
10164
|
user_identity_id: string
|
|
10152
10165
|
user_identity_key: string | null
|
|
10153
10166
|
email_address: string | null
|
|
10167
|
+
phone_number: string | null
|
|
10154
10168
|
display_name: string
|
|
10155
10169
|
full_name: string | null
|
|
10156
10170
|
created_at: string
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
3
|
export const custom_metadata = z
|
|
4
|
-
.record(
|
|
5
|
-
z.string().max(40),
|
|
6
|
-
z.union([z.string().max(500), z.number(), z.null(), z.boolean()]),
|
|
7
|
-
)
|
|
4
|
+
.record(z.string().max(40), z.union([z.string().max(500), z.boolean()]))
|
|
8
5
|
.refine((val) => Object.keys(val).length <= 50, {
|
|
9
6
|
message: 'Custom metadata is limited to a maximum of 50 keys',
|
|
10
7
|
})
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
|
+
import { phone_number } from '../phone-number.js'
|
|
3
4
|
import { schedule } from '../schedule.js'
|
|
4
5
|
|
|
5
6
|
export const acs_user_external_type = z.enum([
|
|
@@ -11,19 +12,6 @@ export const acs_user_external_type = z.enum([
|
|
|
11
12
|
|
|
12
13
|
export type AcsUserExternalType = z.infer<typeof acs_user_external_type>
|
|
13
14
|
|
|
14
|
-
const phone_number = z.coerce
|
|
15
|
-
.string()
|
|
16
|
-
.trim()
|
|
17
|
-
.refine(
|
|
18
|
-
(val) => {
|
|
19
|
-
// https://www.twilio.com/docs/glossary/what-e164
|
|
20
|
-
return /^\+[1-9]\d{1,14}$/.test(val)
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
message: 'Phone number must be in E.164 format: +14155552671',
|
|
24
|
-
},
|
|
25
|
-
)
|
|
26
|
-
|
|
27
15
|
const user_fields = z.object({
|
|
28
16
|
full_name: z.string().optional(),
|
|
29
17
|
email: z
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
export const phone_number = z.coerce
|
|
4
|
+
.string()
|
|
5
|
+
.trim()
|
|
6
|
+
.refine(
|
|
7
|
+
(val) => {
|
|
8
|
+
// https://www.twilio.com/docs/glossary/what-e164
|
|
9
|
+
return /^\+[1-9]\d{1,14}$/.test(val)
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
message: 'Phone number must be in E.164 format: +14155552671',
|
|
13
|
+
},
|
|
14
|
+
)
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
|
+
import { phone_number } from './phone-number.js'
|
|
4
|
+
|
|
3
5
|
export const user_identity = z.object({
|
|
4
6
|
user_identity_id: z.string().uuid(),
|
|
5
7
|
user_identity_key: z.string().nonempty().nullable(),
|
|
6
8
|
email_address: z.string().email().nullable(),
|
|
9
|
+
phone_number: phone_number.nullable(),
|
|
7
10
|
display_name: z.string().nonempty(),
|
|
8
11
|
full_name: z.string().nonempty().nullable(),
|
|
9
12
|
created_at: z.string().datetime(),
|