@seamapi/types 1.84.0 → 1.85.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/connect.cjs +68 -38
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +121 -58
- package/lib/seam/connect/openapi.d.ts +103 -46
- package/lib/seam/connect/openapi.js +58 -31
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +14 -8
- 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/package.json +1 -1
- package/src/lib/seam/connect/openapi.ts +60 -31
- package/src/lib/seam/connect/route-types.ts +14 -8
- package/src/lib/seam/connect/stable/models/custom-metadata.ts +4 -1
|
@@ -1507,7 +1507,7 @@ export interface Routes {
|
|
|
1507
1507
|
custom_redirect_failure_url?: string | undefined;
|
|
1508
1508
|
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' | 'google_nest' | 'igloohome' | 'ecobee' | 'hubitat' | 'four_suites' | 'dormakaba_oracode' | 'pti' | 'wyze' | 'seam_passport' | 'visionline' | 'assa_abloy_credential_service' | 'seam_bridge' | 'yale_access' | 'hid_cm'> | undefined;
|
|
1509
1509
|
provider_category?: ('stable' | 'consumer_smartlocks' | 'internal_beta') | undefined;
|
|
1510
|
-
custom_metadata?: Record<string, string | boolean> | undefined;
|
|
1510
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined;
|
|
1511
1511
|
automatically_manage_new_devices?: boolean | undefined;
|
|
1512
1512
|
wait_for_device_creation?: boolean | undefined;
|
|
1513
1513
|
};
|
|
@@ -1529,7 +1529,7 @@ export interface Routes {
|
|
|
1529
1529
|
status: 'pending' | 'failed' | 'authorized';
|
|
1530
1530
|
custom_redirect_url: string | null;
|
|
1531
1531
|
custom_redirect_failure_url: string | null;
|
|
1532
|
-
custom_metadata: Record<string, string | boolean>;
|
|
1532
|
+
custom_metadata: Record<string, string | boolean | null>;
|
|
1533
1533
|
automatically_manage_new_devices: boolean;
|
|
1534
1534
|
wait_for_device_creation: boolean;
|
|
1535
1535
|
authorized_at: string | null;
|
|
@@ -1573,7 +1573,7 @@ export interface Routes {
|
|
|
1573
1573
|
status: 'pending' | 'failed' | 'authorized';
|
|
1574
1574
|
custom_redirect_url: string | null;
|
|
1575
1575
|
custom_redirect_failure_url: string | null;
|
|
1576
|
-
custom_metadata: Record<string, string | boolean>;
|
|
1576
|
+
custom_metadata: Record<string, string | boolean | null>;
|
|
1577
1577
|
automatically_manage_new_devices: boolean;
|
|
1578
1578
|
wait_for_device_creation: boolean;
|
|
1579
1579
|
authorized_at: string | null;
|
|
@@ -1588,6 +1588,8 @@ export interface Routes {
|
|
|
1588
1588
|
jsonBody: {};
|
|
1589
1589
|
commonParams: {
|
|
1590
1590
|
user_identifier_key?: string | undefined;
|
|
1591
|
+
/** Returns devices where the webview's custom_metadata contains all of the provided key/value pairs. */
|
|
1592
|
+
custom_metadata_has?: Record<string, string | boolean | null> | undefined;
|
|
1591
1593
|
};
|
|
1592
1594
|
formData: {};
|
|
1593
1595
|
jsonResponse: {
|
|
@@ -1606,7 +1608,7 @@ export interface Routes {
|
|
|
1606
1608
|
status: 'pending' | 'failed' | 'authorized';
|
|
1607
1609
|
custom_redirect_url: string | null;
|
|
1608
1610
|
custom_redirect_failure_url: string | null;
|
|
1609
|
-
custom_metadata: Record<string, string | boolean>;
|
|
1611
|
+
custom_metadata: Record<string, string | boolean | null>;
|
|
1610
1612
|
automatically_manage_new_devices: boolean;
|
|
1611
1613
|
wait_for_device_creation: boolean;
|
|
1612
1614
|
authorized_at: string | null;
|
|
@@ -1664,7 +1666,7 @@ export interface Routes {
|
|
|
1664
1666
|
account_type_display_name: string;
|
|
1665
1667
|
errors?: any;
|
|
1666
1668
|
warnings?: any;
|
|
1667
|
-
custom_metadata?: Record<string, string | boolean> | undefined;
|
|
1669
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined;
|
|
1668
1670
|
automatically_manage_new_devices: boolean;
|
|
1669
1671
|
};
|
|
1670
1672
|
};
|
|
@@ -1674,7 +1676,10 @@ export interface Routes {
|
|
|
1674
1676
|
method: 'GET' | 'POST';
|
|
1675
1677
|
queryParams: {};
|
|
1676
1678
|
jsonBody: {};
|
|
1677
|
-
commonParams: {
|
|
1679
|
+
commonParams: {
|
|
1680
|
+
/** Returns devices where the account's custom_metadata contains all of the provided key/value pairs. */
|
|
1681
|
+
custom_metadata_has?: Record<string, string | boolean | null> | undefined;
|
|
1682
|
+
};
|
|
1678
1683
|
formData: {};
|
|
1679
1684
|
jsonResponse: {
|
|
1680
1685
|
connected_accounts: Array<{
|
|
@@ -1691,7 +1696,7 @@ export interface Routes {
|
|
|
1691
1696
|
account_type_display_name: string;
|
|
1692
1697
|
errors?: any;
|
|
1693
1698
|
warnings?: any;
|
|
1694
|
-
custom_metadata?: Record<string, string | boolean> | undefined;
|
|
1699
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined;
|
|
1695
1700
|
automatically_manage_new_devices: boolean;
|
|
1696
1701
|
}>;
|
|
1697
1702
|
};
|
|
@@ -1703,6 +1708,7 @@ export interface Routes {
|
|
|
1703
1708
|
jsonBody: {
|
|
1704
1709
|
connected_account_id: string;
|
|
1705
1710
|
automatically_manage_new_devices?: boolean | undefined;
|
|
1711
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined;
|
|
1706
1712
|
};
|
|
1707
1713
|
commonParams: {};
|
|
1708
1714
|
formData: {};
|
|
@@ -1721,7 +1727,7 @@ export interface Routes {
|
|
|
1721
1727
|
account_type_display_name: string;
|
|
1722
1728
|
errors?: any;
|
|
1723
1729
|
warnings?: any;
|
|
1724
|
-
custom_metadata?: Record<string, string | boolean> | undefined;
|
|
1730
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined;
|
|
1725
1731
|
automatically_manage_new_devices: boolean;
|
|
1726
1732
|
};
|
|
1727
1733
|
};
|
|
@@ -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.ZodBoolean]>>, Record<string, string | boolean>, Record<string, string | boolean>>;
|
|
17
|
+
custom_metadata: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>;
|
|
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 | boolean>;
|
|
36
|
+
custom_metadata: Record<string, string | boolean | null>;
|
|
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 | boolean>;
|
|
56
|
+
custom_metadata: Record<string, string | boolean | null>;
|
|
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.ZodBoolean]>>, Record<string, string | boolean>, Record<string, string | boolean>>;
|
|
2
|
+
export declare const custom_metadata: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>;
|
|
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.boolean()]))
|
|
3
|
+
.record(z.string().max(40), z.union([z.string().max(500), z.boolean(), z.null()]))
|
|
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,CACL,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAClB,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CACtD;KACA,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"}
|
package/package.json
CHANGED
|
@@ -426,7 +426,12 @@ export default {
|
|
|
426
426
|
created_at: { format: 'date-time', type: 'string' },
|
|
427
427
|
custom_metadata: {
|
|
428
428
|
additionalProperties: {
|
|
429
|
-
|
|
429
|
+
nullable: true,
|
|
430
|
+
oneOf: [
|
|
431
|
+
{ maxLength: 500, type: 'string' },
|
|
432
|
+
{ type: 'boolean' },
|
|
433
|
+
{ format: 'null', nullable: true, type: 'string' },
|
|
434
|
+
],
|
|
430
435
|
},
|
|
431
436
|
type: 'object',
|
|
432
437
|
},
|
|
@@ -482,7 +487,12 @@ export default {
|
|
|
482
487
|
created_at: { format: 'date-time', type: 'string' },
|
|
483
488
|
custom_metadata: {
|
|
484
489
|
additionalProperties: {
|
|
485
|
-
|
|
490
|
+
nullable: true,
|
|
491
|
+
oneOf: [
|
|
492
|
+
{ maxLength: 500, type: 'string' },
|
|
493
|
+
{ type: 'boolean' },
|
|
494
|
+
{ format: 'null', nullable: true, type: 'string' },
|
|
495
|
+
],
|
|
486
496
|
},
|
|
487
497
|
type: 'object',
|
|
488
498
|
},
|
|
@@ -7368,9 +7378,11 @@ export default {
|
|
|
7368
7378
|
automatically_manage_new_devices: { type: 'boolean' },
|
|
7369
7379
|
custom_metadata: {
|
|
7370
7380
|
additionalProperties: {
|
|
7381
|
+
nullable: true,
|
|
7371
7382
|
oneOf: [
|
|
7372
7383
|
{ maxLength: 500, type: 'string' },
|
|
7373
7384
|
{ type: 'boolean' },
|
|
7385
|
+
{ format: 'null', nullable: true, type: 'string' },
|
|
7374
7386
|
],
|
|
7375
7387
|
},
|
|
7376
7388
|
type: 'object',
|
|
@@ -7524,7 +7536,22 @@ export default {
|
|
|
7524
7536
|
content: {
|
|
7525
7537
|
'application/json': {
|
|
7526
7538
|
schema: {
|
|
7527
|
-
properties: {
|
|
7539
|
+
properties: {
|
|
7540
|
+
custom_metadata_has: {
|
|
7541
|
+
additionalProperties: {
|
|
7542
|
+
nullable: true,
|
|
7543
|
+
oneOf: [
|
|
7544
|
+
{ maxLength: 500, type: 'string' },
|
|
7545
|
+
{ type: 'boolean' },
|
|
7546
|
+
{ format: 'null', nullable: true, type: 'string' },
|
|
7547
|
+
],
|
|
7548
|
+
},
|
|
7549
|
+
description:
|
|
7550
|
+
"Returns devices where the webview's custom_metadata contains all of the provided key/value pairs.",
|
|
7551
|
+
type: 'object',
|
|
7552
|
+
},
|
|
7553
|
+
user_identifier_key: { type: 'string' },
|
|
7554
|
+
},
|
|
7528
7555
|
type: 'object',
|
|
7529
7556
|
},
|
|
7530
7557
|
},
|
|
@@ -7695,41 +7722,32 @@ export default {
|
|
|
7695
7722
|
},
|
|
7696
7723
|
},
|
|
7697
7724
|
'/connected_accounts/list': {
|
|
7698
|
-
|
|
7699
|
-
operationId: '
|
|
7700
|
-
|
|
7701
|
-
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7725
|
+
post: {
|
|
7726
|
+
operationId: 'connectedAccountsListPost',
|
|
7727
|
+
requestBody: {
|
|
7728
|
+
content: {
|
|
7729
|
+
'application/json': {
|
|
7730
|
+
schema: {
|
|
7731
|
+
properties: {
|
|
7732
|
+
custom_metadata_has: {
|
|
7733
|
+
additionalProperties: {
|
|
7734
|
+
nullable: true,
|
|
7735
|
+
oneOf: [
|
|
7736
|
+
{ maxLength: 500, type: 'string' },
|
|
7737
|
+
{ type: 'boolean' },
|
|
7738
|
+
{ format: 'null', nullable: true, type: 'string' },
|
|
7739
|
+
],
|
|
7709
7740
|
},
|
|
7710
|
-
|
|
7741
|
+
description:
|
|
7742
|
+
"Returns devices where the account's custom_metadata contains all of the provided key/value pairs.",
|
|
7743
|
+
type: 'object',
|
|
7711
7744
|
},
|
|
7712
|
-
required: ['connected_accounts', 'ok'],
|
|
7713
|
-
type: 'object',
|
|
7714
7745
|
},
|
|
7746
|
+
type: 'object',
|
|
7715
7747
|
},
|
|
7716
7748
|
},
|
|
7717
|
-
description: 'OK',
|
|
7718
7749
|
},
|
|
7719
|
-
400: { description: 'Bad Request' },
|
|
7720
|
-
401: { description: 'Unauthorized' },
|
|
7721
7750
|
},
|
|
7722
|
-
security: [
|
|
7723
|
-
{ access_token: [], seam_workspace: [] },
|
|
7724
|
-
{ seam_client_session_token: [] },
|
|
7725
|
-
{ client_session_token: [] },
|
|
7726
|
-
],
|
|
7727
|
-
summary: '/connected_accounts/list',
|
|
7728
|
-
tags: ['/connected_accounts'],
|
|
7729
|
-
'x-fern-ignore': true,
|
|
7730
|
-
},
|
|
7731
|
-
post: {
|
|
7732
|
-
operationId: 'connectedAccountsListPost',
|
|
7733
7751
|
responses: {
|
|
7734
7752
|
200: {
|
|
7735
7753
|
content: {
|
|
@@ -7774,6 +7792,17 @@ export default {
|
|
|
7774
7792
|
properties: {
|
|
7775
7793
|
automatically_manage_new_devices: { type: 'boolean' },
|
|
7776
7794
|
connected_account_id: { format: 'uuid', type: 'string' },
|
|
7795
|
+
custom_metadata: {
|
|
7796
|
+
additionalProperties: {
|
|
7797
|
+
nullable: true,
|
|
7798
|
+
oneOf: [
|
|
7799
|
+
{ maxLength: 500, type: 'string' },
|
|
7800
|
+
{ type: 'boolean' },
|
|
7801
|
+
{ format: 'null', nullable: true, type: 'string' },
|
|
7802
|
+
],
|
|
7803
|
+
},
|
|
7804
|
+
type: 'object',
|
|
7805
|
+
},
|
|
7777
7806
|
},
|
|
7778
7807
|
required: ['connected_account_id'],
|
|
7779
7808
|
type: 'object',
|
|
@@ -1705,7 +1705,7 @@ export interface Routes {
|
|
|
1705
1705
|
provider_category?:
|
|
1706
1706
|
| ('stable' | 'consumer_smartlocks' | 'internal_beta')
|
|
1707
1707
|
| undefined
|
|
1708
|
-
custom_metadata?: Record<string, string | boolean> | undefined
|
|
1708
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined
|
|
1709
1709
|
automatically_manage_new_devices?: boolean | undefined
|
|
1710
1710
|
wait_for_device_creation?: boolean | undefined
|
|
1711
1711
|
}
|
|
@@ -1727,7 +1727,7 @@ export interface Routes {
|
|
|
1727
1727
|
status: 'pending' | 'failed' | 'authorized'
|
|
1728
1728
|
custom_redirect_url: string | null
|
|
1729
1729
|
custom_redirect_failure_url: string | null
|
|
1730
|
-
custom_metadata: Record<string, string | boolean>
|
|
1730
|
+
custom_metadata: Record<string, string | boolean | null>
|
|
1731
1731
|
automatically_manage_new_devices: boolean
|
|
1732
1732
|
wait_for_device_creation: boolean
|
|
1733
1733
|
authorized_at: string | null
|
|
@@ -1771,7 +1771,7 @@ export interface Routes {
|
|
|
1771
1771
|
status: 'pending' | 'failed' | 'authorized'
|
|
1772
1772
|
custom_redirect_url: string | null
|
|
1773
1773
|
custom_redirect_failure_url: string | null
|
|
1774
|
-
custom_metadata: Record<string, string | boolean>
|
|
1774
|
+
custom_metadata: Record<string, string | boolean | null>
|
|
1775
1775
|
automatically_manage_new_devices: boolean
|
|
1776
1776
|
wait_for_device_creation: boolean
|
|
1777
1777
|
authorized_at: string | null
|
|
@@ -1786,6 +1786,8 @@ export interface Routes {
|
|
|
1786
1786
|
jsonBody: {}
|
|
1787
1787
|
commonParams: {
|
|
1788
1788
|
user_identifier_key?: string | undefined
|
|
1789
|
+
/** Returns devices where the webview's custom_metadata contains all of the provided key/value pairs. */
|
|
1790
|
+
custom_metadata_has?: Record<string, string | boolean | null> | undefined
|
|
1789
1791
|
}
|
|
1790
1792
|
formData: {}
|
|
1791
1793
|
jsonResponse: {
|
|
@@ -1804,7 +1806,7 @@ export interface Routes {
|
|
|
1804
1806
|
status: 'pending' | 'failed' | 'authorized'
|
|
1805
1807
|
custom_redirect_url: string | null
|
|
1806
1808
|
custom_redirect_failure_url: string | null
|
|
1807
|
-
custom_metadata: Record<string, string | boolean>
|
|
1809
|
+
custom_metadata: Record<string, string | boolean | null>
|
|
1808
1810
|
automatically_manage_new_devices: boolean
|
|
1809
1811
|
wait_for_device_creation: boolean
|
|
1810
1812
|
authorized_at: string | null
|
|
@@ -1866,7 +1868,7 @@ export interface Routes {
|
|
|
1866
1868
|
account_type_display_name: string
|
|
1867
1869
|
errors?: any
|
|
1868
1870
|
warnings?: any
|
|
1869
|
-
custom_metadata?: Record<string, string | boolean> | undefined
|
|
1871
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined
|
|
1870
1872
|
automatically_manage_new_devices: boolean
|
|
1871
1873
|
}
|
|
1872
1874
|
}
|
|
@@ -1876,7 +1878,10 @@ export interface Routes {
|
|
|
1876
1878
|
method: 'GET' | 'POST'
|
|
1877
1879
|
queryParams: {}
|
|
1878
1880
|
jsonBody: {}
|
|
1879
|
-
commonParams: {
|
|
1881
|
+
commonParams: {
|
|
1882
|
+
/** Returns devices where the account's custom_metadata contains all of the provided key/value pairs. */
|
|
1883
|
+
custom_metadata_has?: Record<string, string | boolean | null> | undefined
|
|
1884
|
+
}
|
|
1880
1885
|
formData: {}
|
|
1881
1886
|
jsonResponse: {
|
|
1882
1887
|
connected_accounts: Array<{
|
|
@@ -1895,7 +1900,7 @@ export interface Routes {
|
|
|
1895
1900
|
account_type_display_name: string
|
|
1896
1901
|
errors?: any
|
|
1897
1902
|
warnings?: any
|
|
1898
|
-
custom_metadata?: Record<string, string | boolean> | undefined
|
|
1903
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined
|
|
1899
1904
|
automatically_manage_new_devices: boolean
|
|
1900
1905
|
}>
|
|
1901
1906
|
}
|
|
@@ -1907,6 +1912,7 @@ export interface Routes {
|
|
|
1907
1912
|
jsonBody: {
|
|
1908
1913
|
connected_account_id: string
|
|
1909
1914
|
automatically_manage_new_devices?: boolean | undefined
|
|
1915
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined
|
|
1910
1916
|
}
|
|
1911
1917
|
commonParams: {}
|
|
1912
1918
|
formData: {}
|
|
@@ -1927,7 +1933,7 @@ export interface Routes {
|
|
|
1927
1933
|
account_type_display_name: string
|
|
1928
1934
|
errors?: any
|
|
1929
1935
|
warnings?: any
|
|
1930
|
-
custom_metadata?: Record<string, string | boolean> | undefined
|
|
1936
|
+
custom_metadata?: Record<string, string | boolean | null> | undefined
|
|
1931
1937
|
automatically_manage_new_devices: boolean
|
|
1932
1938
|
}
|
|
1933
1939
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
3
|
export const custom_metadata = z
|
|
4
|
-
.record(
|
|
4
|
+
.record(
|
|
5
|
+
z.string().max(40),
|
|
6
|
+
z.union([z.string().max(500), z.boolean(), z.null()]),
|
|
7
|
+
)
|
|
5
8
|
.refine((val) => Object.keys(val).length <= 50, {
|
|
6
9
|
message: 'Custom metadata is limited to a maximum of 50 keys',
|
|
7
10
|
})
|