@seamapi/types 1.1011.0 → 1.1012.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/lib/seam/connect/models/custom-metadata.d.ts +1 -1
- package/lib/seam/connect/models/custom-metadata.js +8 -2
- package/lib/seam/connect/models/custom-metadata.js.map +1 -1
- package/lib/seam/connect/models/customer/access-grant-resources.d.ts +2 -2
- package/lib/seam/connect/models/customer/customer-data.d.ts +4 -4
- package/lib/seam/connect/models/customer/location-resources.d.ts +2 -2
- package/package.json +1 -1
- package/src/lib/seam/connect/models/custom-metadata.ts +9 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const custom_metadata_input: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>;
|
|
2
|
+
export declare const custom_metadata_input: z.ZodEffects<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>;
|
|
3
3
|
export declare const custom_metadata: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
4
4
|
export type CustomMetadata = z.output<typeof custom_metadata>;
|
|
5
5
|
export type CustomMetadataInput = z.input<typeof custom_metadata_input>;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
const custom_metadata_key = z
|
|
3
|
+
.string()
|
|
4
|
+
.max(40)
|
|
5
|
+
.refine((key) => !key.includes('.'), {
|
|
6
|
+
message: 'Custom metadata key names cannot contain a period (.)',
|
|
7
|
+
});
|
|
2
8
|
export const custom_metadata_input = z
|
|
3
|
-
.record(
|
|
9
|
+
.record(custom_metadata_key, z.union([z.string().max(500), z.boolean(), z.null()]))
|
|
4
10
|
.refine((val) => Object.keys(val).length <= 50, {
|
|
5
11
|
message: 'Custom metadata is limited to a maximum of 50 keys',
|
|
6
12
|
})
|
|
7
|
-
.describe('Set of up to 50 key:value pairs, with key names up to 40 characters long. Accepts string or Boolean values. Strings are limited to 500 characters. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application.');
|
|
13
|
+
.describe('Set of up to 50 key:value pairs, with key names up to 40 characters long that cannot contain a period (.). Accepts string or Boolean values. Strings are limited to 500 characters. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application.');
|
|
8
14
|
export const custom_metadata = z
|
|
9
15
|
.record(z.string(), z.union([z.string(), z.boolean()]))
|
|
10
16
|
.describe('Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application.');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-metadata.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/models/custom-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"custom-metadata.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/models/custom-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,mBAAmB,GAAG,CAAC;KAC1B,MAAM,EAAE;KACR,GAAG,CAAC,EAAE,CAAC;KACP,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;IACnC,OAAO,EAAE,uDAAuD;CACjE,CAAC,CAAA;AAEJ,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC;KACnC,MAAM,CACL,mBAAmB,EACnB,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;KACD,QAAQ,CACP,spBAAspB,CACvpB,CAAA;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;KACtD,QAAQ,CACP,0fAA0f,CAC3f,CAAA"}
|
|
@@ -53,7 +53,7 @@ export declare const reservation_resource: z.ZodObject<{
|
|
|
53
53
|
preferred_code: z.ZodOptional<z.ZodString>;
|
|
54
54
|
} & {
|
|
55
55
|
reservation_key: z.ZodEffects<z.ZodString, string, string>;
|
|
56
|
-
custom_metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>>;
|
|
56
|
+
custom_metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>>;
|
|
57
57
|
} & {
|
|
58
58
|
guest_key: z.ZodOptional<z.ZodString>;
|
|
59
59
|
tenant_key: z.ZodOptional<z.ZodString>;
|
|
@@ -239,7 +239,7 @@ export declare const access_grant_resource_union: z.ZodUnion<[z.ZodObject<{
|
|
|
239
239
|
preferred_code: z.ZodOptional<z.ZodString>;
|
|
240
240
|
} & {
|
|
241
241
|
reservation_key: z.ZodEffects<z.ZodString, string, string>;
|
|
242
|
-
custom_metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>>;
|
|
242
|
+
custom_metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>>;
|
|
243
243
|
} & {
|
|
244
244
|
guest_key: z.ZodOptional<z.ZodString>;
|
|
245
245
|
tenant_key: z.ZodOptional<z.ZodString>;
|
|
@@ -164,7 +164,7 @@ export declare const external_resources: z.ZodObject<{
|
|
|
164
164
|
name: z.ZodString;
|
|
165
165
|
} & {
|
|
166
166
|
property_listing_key: z.ZodEffects<z.ZodString, string, string>;
|
|
167
|
-
custom_metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>>;
|
|
167
|
+
custom_metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>>;
|
|
168
168
|
}, "strip", z.ZodTypeAny, {
|
|
169
169
|
name: string;
|
|
170
170
|
property_listing_key: string;
|
|
@@ -313,7 +313,7 @@ export declare const external_resources: z.ZodObject<{
|
|
|
313
313
|
preferred_code: z.ZodOptional<z.ZodString>;
|
|
314
314
|
} & {
|
|
315
315
|
reservation_key: z.ZodEffects<z.ZodString, string, string>;
|
|
316
|
-
custom_metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>>;
|
|
316
|
+
custom_metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>>;
|
|
317
317
|
} & {
|
|
318
318
|
guest_key: z.ZodOptional<z.ZodString>;
|
|
319
319
|
tenant_key: z.ZodOptional<z.ZodString>;
|
|
@@ -989,7 +989,7 @@ export declare const customer_data: z.ZodObject<{
|
|
|
989
989
|
name: z.ZodString;
|
|
990
990
|
} & {
|
|
991
991
|
property_listing_key: z.ZodEffects<z.ZodString, string, string>;
|
|
992
|
-
custom_metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>>;
|
|
992
|
+
custom_metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>>;
|
|
993
993
|
}, "strip", z.ZodTypeAny, {
|
|
994
994
|
name: string;
|
|
995
995
|
property_listing_key: string;
|
|
@@ -1138,7 +1138,7 @@ export declare const customer_data: z.ZodObject<{
|
|
|
1138
1138
|
preferred_code: z.ZodOptional<z.ZodString>;
|
|
1139
1139
|
} & {
|
|
1140
1140
|
reservation_key: z.ZodEffects<z.ZodString, string, string>;
|
|
1141
|
-
custom_metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>>;
|
|
1141
|
+
custom_metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>>;
|
|
1142
1142
|
} & {
|
|
1143
1143
|
guest_key: z.ZodOptional<z.ZodString>;
|
|
1144
1144
|
tenant_key: z.ZodOptional<z.ZodString>;
|
|
@@ -152,7 +152,7 @@ export declare const property_listing_resource: z.ZodObject<{
|
|
|
152
152
|
name: z.ZodString;
|
|
153
153
|
} & {
|
|
154
154
|
property_listing_key: z.ZodEffects<z.ZodString, string, string>;
|
|
155
|
-
custom_metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>>;
|
|
155
|
+
custom_metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>>;
|
|
156
156
|
}, "strip", z.ZodTypeAny, {
|
|
157
157
|
name: string;
|
|
158
158
|
property_listing_key: string;
|
|
@@ -318,7 +318,7 @@ export declare const location_resource: z.ZodUnion<[z.ZodObject<{
|
|
|
318
318
|
name: z.ZodString;
|
|
319
319
|
} & {
|
|
320
320
|
property_listing_key: z.ZodEffects<z.ZodString, string, string>;
|
|
321
|
-
custom_metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>>;
|
|
321
|
+
custom_metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodUnion<[z.ZodString, z.ZodBoolean, z.ZodNull]>>, Record<string, string | boolean | null>, Record<string, string | boolean | null>>>;
|
|
322
322
|
}, "strip", z.ZodTypeAny, {
|
|
323
323
|
name: string;
|
|
324
324
|
property_listing_key: string;
|
package/package.json
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
|
+
const custom_metadata_key = z
|
|
4
|
+
.string()
|
|
5
|
+
.max(40)
|
|
6
|
+
.refine((key) => !key.includes('.'), {
|
|
7
|
+
message: 'Custom metadata key names cannot contain a period (.)',
|
|
8
|
+
})
|
|
9
|
+
|
|
3
10
|
export const custom_metadata_input = z
|
|
4
11
|
.record(
|
|
5
|
-
|
|
12
|
+
custom_metadata_key,
|
|
6
13
|
z.union([z.string().max(500), z.boolean(), z.null()]),
|
|
7
14
|
)
|
|
8
15
|
.refine((val) => Object.keys(val).length <= 50, {
|
|
9
16
|
message: 'Custom metadata is limited to a maximum of 50 keys',
|
|
10
17
|
})
|
|
11
18
|
.describe(
|
|
12
|
-
'Set of up to 50 key:value pairs, with key names up to 40 characters long. Accepts string or Boolean values. Strings are limited to 500 characters. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application.',
|
|
19
|
+
'Set of up to 50 key:value pairs, with key names up to 40 characters long that cannot contain a period (.). Accepts string or Boolean values. Strings are limited to 500 characters. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application.',
|
|
13
20
|
)
|
|
14
21
|
|
|
15
22
|
export const custom_metadata = z
|