@seamapi/types 1.1012.0 → 1.1014.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 -0
- package/lib/seam/connect/models/custom-metadata.js +15 -3
- package/lib/seam/connect/models/custom-metadata.js.map +1 -1
- package/lib/seam/connect/models/index.d.ts +1 -0
- package/lib/seam/connect/models/index.js +1 -0
- package/lib/seam/connect/models/index.js.map +1 -1
- package/lib/seam/connect/models/resource-key.d.ts +10 -0
- package/lib/seam/connect/models/resource-key.js +16 -0
- package/lib/seam/connect/models/resource-key.js.map +1 -0
- package/lib/seam/connect/openapi.js +137 -7
- package/lib/seam/connect/openapi.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/seam/connect/internal/schemas.ts +2 -0
- package/src/lib/seam/connect/models/custom-metadata.ts +21 -3
- package/src/lib/seam/connect/models/index.ts +1 -0
- package/src/lib/seam/connect/models/resource-key.ts +16 -0
- package/src/lib/seam/connect/openapi.ts +137 -7
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
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
|
+
export declare const custom_metadata_has: z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
3
4
|
export declare const custom_metadata: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
4
5
|
export type CustomMetadata = z.output<typeof custom_metadata>;
|
|
5
6
|
export type CustomMetadataInput = z.input<typeof custom_metadata_input>;
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
const PERIOD_IN_KEY_ERROR = {
|
|
3
|
+
message: 'Custom metadata key names cannot contain a period (.)',
|
|
4
|
+
};
|
|
5
|
+
const doesNotContainPeriod = (key) => !key.includes('.');
|
|
2
6
|
const custom_metadata_key = z
|
|
3
7
|
.string()
|
|
4
8
|
.max(40)
|
|
5
|
-
.refine(
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
.refine(doesNotContainPeriod, PERIOD_IN_KEY_ERROR);
|
|
10
|
+
// Periods are rejected because a dotted key breaks the pagination query hash
|
|
11
|
+
// serializer. The .max(40) of custom_metadata_key is deliberately not carried
|
|
12
|
+
// over: rows written before that limit can hold longer keys, and a filter that
|
|
13
|
+
// cannot name them would be a regression.
|
|
14
|
+
const custom_metadata_has_key = z
|
|
15
|
+
.string()
|
|
16
|
+
.refine(doesNotContainPeriod, PERIOD_IN_KEY_ERROR);
|
|
8
17
|
export const custom_metadata_input = z
|
|
9
18
|
.record(custom_metadata_key, z.union([z.string().max(500), z.boolean(), z.null()]))
|
|
10
19
|
.refine((val) => Object.keys(val).length <= 50, {
|
|
11
20
|
message: 'Custom metadata is limited to a maximum of 50 keys',
|
|
12
21
|
})
|
|
13
22
|
.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.');
|
|
23
|
+
export const custom_metadata_has = z
|
|
24
|
+
.record(custom_metadata_has_key, z.union([z.string(), z.boolean()]))
|
|
25
|
+
.describe('Set of key:value pairs by which to filter. Key names cannot contain a period (.). Accepts string or Boolean values.');
|
|
14
26
|
export const custom_metadata = z
|
|
15
27
|
.record(z.string(), z.union([z.string(), z.boolean()]))
|
|
16
28
|
.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,mBAAmB,GAAG,CAAC;KAC1B,MAAM,EAAE;KACR,GAAG,CAAC,EAAE,CAAC;KACP,MAAM,CAAC,
|
|
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;IAC1B,OAAO,EAAE,uDAAuD;CACjE,CAAA;AAED,MAAM,oBAAoB,GAAG,CAAC,GAAW,EAAW,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AAEzE,MAAM,mBAAmB,GAAG,CAAC;KAC1B,MAAM,EAAE;KACR,GAAG,CAAC,EAAE,CAAC;KACP,MAAM,CAAC,oBAAoB,EAAE,mBAAmB,CAAC,CAAA;AAEpD,6EAA6E;AAC7E,8EAA8E;AAC9E,+EAA+E;AAC/E,0CAA0C;AAC1C,MAAM,uBAAuB,GAAG,CAAC;KAC9B,MAAM,EAAE;KACR,MAAM,CAAC,oBAAoB,EAAE,mBAAmB,CAAC,CAAA;AAEpD,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,mBAAmB,GAAG,CAAC;KACjC,MAAM,CAAC,uBAAuB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;KACnE,QAAQ,CACP,qHAAqH,CACtH,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"}
|
|
@@ -24,6 +24,7 @@ export * from './partner/index.js';
|
|
|
24
24
|
export * from './phone-number.js';
|
|
25
25
|
export * from './phones/index.js';
|
|
26
26
|
export * from './provider-capability.js';
|
|
27
|
+
export * from './resource-key.js';
|
|
27
28
|
export * from './spaces/index.js';
|
|
28
29
|
export * from './thermostats/index.js';
|
|
29
30
|
export * from './user-identities/index.js';
|
|
@@ -24,6 +24,7 @@ export * from './partner/index.js';
|
|
|
24
24
|
export * from './phone-number.js';
|
|
25
25
|
export * from './phones/index.js';
|
|
26
26
|
export * from './provider-capability.js';
|
|
27
|
+
export * from './resource-key.js';
|
|
27
28
|
export * from './spaces/index.js';
|
|
28
29
|
export * from './thermostats/index.js';
|
|
29
30
|
export * from './user-identities/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,sBAAsB,CAAA;AACpC,cAAc,sCAAsC,CAAA;AACpD,cAAc,oCAAoC,CAAA;AAClD,cAAc,qBAAqB,CAAA;AACnC,cAAc,kCAAkC,CAAA;AAChD,cAAc,uCAAuC,CAAA;AACrD,cAAc,mCAAmC,CAAA;AACjD,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,sBAAsB,CAAA;AACpC,cAAc,sCAAsC,CAAA;AACpD,cAAc,oCAAoC,CAAA;AAClD,cAAc,qBAAqB,CAAA;AACnC,cAAc,kCAAkC,CAAA;AAChD,cAAc,uCAAuC,CAAA;AACrD,cAAc,mCAAmC,CAAA;AACjD,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Shared schema for every customer-supplied `*_key` identifier
|
|
4
|
+
* (`customer_key`, `access_grant_key`, `space_key`, `user_identity_key`, ...).
|
|
5
|
+
*
|
|
6
|
+
* A whitespace-only key is never a usable identifier: it cannot be looked back
|
|
7
|
+
* up, and once stored it silently shadows the "no key set" case that the
|
|
8
|
+
* underlying columns model as NULL.
|
|
9
|
+
*/
|
|
10
|
+
export declare const resource_key: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Shared schema for every customer-supplied `*_key` identifier
|
|
4
|
+
* (`customer_key`, `access_grant_key`, `space_key`, `user_identity_key`, ...).
|
|
5
|
+
*
|
|
6
|
+
* A whitespace-only key is never a usable identifier: it cannot be looked back
|
|
7
|
+
* up, and once stored it silently shadows the "no key set" case that the
|
|
8
|
+
* underlying columns model as NULL.
|
|
9
|
+
*/
|
|
10
|
+
export const resource_key = z
|
|
11
|
+
.string()
|
|
12
|
+
.min(1)
|
|
13
|
+
.refine((value) => value.trim() !== '', {
|
|
14
|
+
message: 'Must not consist only of whitespace',
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=resource-key.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-key.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/models/resource-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC;KAC1B,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;IACtC,OAAO,EAAE,qCAAqC;CAC/C,CAAC,CAAA"}
|