@seamapi/types 0.0.5 → 0.1.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/README.md +36 -2
- package/connect.d.ts +1 -0
- package/connect.js +2 -0
- package/connect.js.map +1 -0
- package/dist/connect.cjs +41 -0
- package/dist/connect.cjs.map +1 -0
- package/dist/connect.d.cts +56 -0
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3 -0
- package/index.d.ts +2 -2
- package/index.js +1 -2
- package/index.js.map +1 -1
- package/lib/seam/connect/index.d.ts +5 -1
- package/lib/seam/connect/index.js +6 -1
- package/lib/seam/connect/index.js.map +1 -1
- package/lib/seam/connect/model-types.d.ts +1 -0
- package/lib/seam/connect/model-types.js +2 -0
- package/lib/seam/connect/model-types.js.map +1 -0
- package/lib/seam/connect/models/connect-webview.d.ts +42 -0
- package/lib/seam/connect/models/connect-webview.js +16 -0
- package/lib/seam/connect/models/connect-webview.js.map +1 -0
- package/lib/seam/connect/models/index.d.ts +1 -0
- package/lib/seam/connect/models/index.js +2 -0
- package/lib/seam/connect/models/index.js.map +1 -0
- package/lib/seam/connect/openapi.d.ts +2 -0
- package/lib/seam/connect/openapi.js +2 -0
- package/lib/seam/connect/openapi.js.map +1 -0
- package/lib/seam/connect/route-types.d.ts +1694 -0
- package/lib/seam/connect/route-types.js +2 -0
- package/lib/seam/connect/route-types.js.map +1 -0
- package/lib/seam/connect/schemas.d.ts +1 -0
- package/lib/seam/connect/schemas.js +2 -0
- package/lib/seam/connect/schemas.js.map +1 -0
- package/package.json +25 -24
- package/src/connect.ts +1 -0
- package/src/index.ts +1 -2
- package/src/lib/seam/.prettierrc.json +5 -0
- package/src/lib/seam/connect/index.ts +8 -1
- package/src/lib/seam/connect/model-types.ts +1 -0
- package/src/lib/seam/connect/models/connect-webview.ts +18 -0
- package/src/lib/seam/connect/models/index.ts +1 -0
- package/src/lib/seam/connect/openapi.ts +1 -0
- package/src/lib/seam/connect/route-types.ts +2321 -0
- package/src/lib/seam/connect/schemas.ts +1 -0
- package/lib/index.d.ts +0 -3
- package/lib/index.js +0 -4
- package/lib/index.js.map +0 -1
- package/lib/seam/connect/workspace.d.ts +0 -9
- package/lib/seam/connect/workspace.js +0 -5
- package/lib/seam/connect/workspace.js.map +0 -1
- package/lib/seam/index.d.ts +0 -1
- package/lib/seam/index.js +0 -2
- package/lib/seam/index.js.map +0 -1
- package/lib/todo.d.ts +0 -1
- package/lib/todo.js +0 -2
- package/lib/todo.js.map +0 -1
- package/src/lib/index.ts +0 -3
- package/src/lib/seam/connect/workspace.ts +0 -6
- package/src/lib/seam/index.ts +0 -1
- package/src/lib/todo.ts +0 -1
package/README.md
CHANGED
|
@@ -7,10 +7,45 @@ TypeScript types for the Seam API.
|
|
|
7
7
|
|
|
8
8
|
## Description
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
This repository aggregates the latest route schemas and type definitions for the Seam API.
|
|
11
|
+
Upstream Seam repositories automatically contribute updates on every deployment
|
|
12
|
+
via a Pull Request opened by Seam Bot.
|
|
13
|
+
This ensures downstream consumers, e.g., the SDK, fakes, documentation generators, etc.,
|
|
14
|
+
have a single source of truth that stays up to date with the API.
|
|
15
|
+
|
|
16
|
+
### Structure
|
|
17
|
+
|
|
18
|
+
The main entrypoint for this module is empty: there is dedicated entrypoint for each Seam API namespace.
|
|
19
|
+
|
|
20
|
+
Each directory under `src/lib/seam/*` is owned by an upstream Seam repository.
|
|
21
|
+
These files should not be edited manually as they will be overridden by automation.
|
|
22
|
+
|
|
23
|
+
Each entrypoint may export one or more of the following:
|
|
24
|
+
|
|
25
|
+
- Zod schemas: collectively exported as a single object named `schemas`.
|
|
26
|
+
- Types: derived directly from the [Zod Schemas][zod] and exported at the top level.
|
|
27
|
+
- A separate collection of Zod schmeas named `routes`.
|
|
28
|
+
- A type named `Routes` that implements the
|
|
29
|
+
[Route Definition interface from typed-axios][typed-axios Route Definition].
|
|
30
|
+
- The OpenAPI schema as a plain object named `openapi`.
|
|
31
|
+
|
|
32
|
+
[nextlove]: https://github.com/seamapi/nextlove
|
|
33
|
+
[typed-axios Route Definition]: https://github.com/seamapi/typed-axios#route-definition
|
|
34
|
+
[OpenAPI]: https://www.openapis.org/
|
|
35
|
+
[zod]: https://zod.dev/
|
|
11
36
|
|
|
12
37
|
## Installation
|
|
13
38
|
|
|
39
|
+
### Types Only
|
|
40
|
+
|
|
41
|
+
Add this as a development dependency to your project using [npm] with
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
$ npm install --save-dev @seamapi/types
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Types and Zod Schemas
|
|
48
|
+
|
|
14
49
|
Add this as a dependency to your project using [npm] with
|
|
15
50
|
|
|
16
51
|
```
|
|
@@ -28,7 +63,6 @@ $ git clone https://github.com/seamapi/types.git
|
|
|
28
63
|
$ cd types
|
|
29
64
|
$ nvm install
|
|
30
65
|
$ npm install
|
|
31
|
-
$ npm run test:watch
|
|
32
66
|
```
|
|
33
67
|
|
|
34
68
|
Primary development tasks are defined under `scripts` in `package.json`
|
package/connect.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/seam/connect/index.js';
|
package/connect.js
ADDED
package/connect.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.js","sourceRoot":"","sources":["src/connect.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA"}
|
package/dist/connect.cjs
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var zod = require('zod');
|
|
4
|
+
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// src/lib/seam/connect/schemas.ts
|
|
12
|
+
var schemas_exports = {};
|
|
13
|
+
__export(schemas_exports, {
|
|
14
|
+
connect_webview: () => connect_webview
|
|
15
|
+
});
|
|
16
|
+
var connect_webview = zod.z.object({
|
|
17
|
+
connect_webview_id: zod.z.string().uuid(),
|
|
18
|
+
connected_account_id: zod.z.string().uuid().optional(),
|
|
19
|
+
url: zod.z.string().url(),
|
|
20
|
+
workspace_id: zod.z.string().uuid(),
|
|
21
|
+
device_selection_mode: zod.z.enum(["none", "single", "multiple"]),
|
|
22
|
+
accepted_providers: zod.z.array(zod.z.string()),
|
|
23
|
+
accepted_devices: zod.z.array(zod.z.string()),
|
|
24
|
+
any_provider_allowed: zod.z.boolean(),
|
|
25
|
+
any_device_allowed: zod.z.boolean(),
|
|
26
|
+
created_at: zod.z.string().datetime(),
|
|
27
|
+
login_successful: zod.z.boolean(),
|
|
28
|
+
status: zod.z.enum(["pending", "failed", "authorized"])
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
// src/lib/seam/connect/openapi.ts
|
|
32
|
+
var openapi_default = {};
|
|
33
|
+
|
|
34
|
+
// src/lib/seam/connect/index.ts
|
|
35
|
+
var routes = {};
|
|
36
|
+
|
|
37
|
+
exports.openapi = openapi_default;
|
|
38
|
+
exports.routes = routes;
|
|
39
|
+
exports.schemas = schemas_exports;
|
|
40
|
+
//# sourceMappingURL=out.js.map
|
|
41
|
+
//# sourceMappingURL=connect.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/seam/connect/schemas.ts","../src/lib/seam/connect/models/connect-webview.ts","../src/lib/seam/connect/openapi.ts","../src/lib/seam/connect/index.ts"],"names":[],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;;;ACAA,SAAS,SAAS;AAEX,IAAM,kBAAkB,EAAE,OAAO;AAAA,EACtC,oBAAoB,EAAE,OAAO,EAAE,KAAK;AAAA,EACpC,sBAAsB,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS;AAAA,EACjD,KAAK,EAAE,OAAO,EAAE,IAAI;AAAA,EACpB,cAAc,EAAE,OAAO,EAAE,KAAK;AAAA,EAC9B,uBAAuB,EAAE,KAAK,CAAC,QAAQ,UAAU,UAAU,CAAC;AAAA,EAC5D,oBAAoB,EAAE,MAAM,EAAE,OAAO,CAAC;AAAA,EACtC,kBAAkB,EAAE,MAAM,EAAE,OAAO,CAAC;AAAA,EACpC,sBAAsB,EAAE,QAAQ;AAAA,EAChC,oBAAoB,EAAE,QAAQ;AAAA,EAC9B,YAAY,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,kBAAkB,EAAE,QAAQ;AAAA,EAC5B,QAAQ,EAAE,KAAK,CAAC,WAAW,UAAU,YAAY,CAAC;AACpD,CAAC;;;ACfD,IAAO,kBAAQ,CAAC;;;ACOT,IAAM,SAAS,CAAC","sourcesContent":["export { connect_webview } from \"./models/index.js\"\n","import { z } from \"zod\"\n\nexport const connect_webview = z.object({\n connect_webview_id: z.string().uuid(),\n connected_account_id: z.string().uuid().optional(),\n url: z.string().url(),\n workspace_id: z.string().uuid(),\n device_selection_mode: z.enum([\"none\", \"single\", \"multiple\"]),\n accepted_providers: z.array(z.string()),\n accepted_devices: z.array(z.string()),\n any_provider_allowed: z.boolean(),\n any_device_allowed: z.boolean(),\n created_at: z.string().datetime(),\n login_successful: z.boolean(),\n status: z.enum([\"pending\", \"failed\", \"authorized\"]),\n})\n\nexport type ConnectWebview = z.infer<typeof connect_webview>\n","export default {}\n","import * as schemas from \"./schemas.js\"\n\nexport { schemas }\n\nexport * from \"./model-types.js\"\nexport { default as openapi } from \"./openapi.js\"\n// UPSTREAM: Reserve this named export until nextlove is able to generate this.\nexport const routes = {}\n"]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const connect_webview: z.ZodObject<{
|
|
4
|
+
connect_webview_id: z.ZodString;
|
|
5
|
+
connected_account_id: z.ZodOptional<z.ZodString>;
|
|
6
|
+
url: z.ZodString;
|
|
7
|
+
workspace_id: z.ZodString;
|
|
8
|
+
device_selection_mode: z.ZodEnum<["none", "single", "multiple"]>;
|
|
9
|
+
accepted_providers: z.ZodArray<z.ZodString, "many">;
|
|
10
|
+
accepted_devices: z.ZodArray<z.ZodString, "many">;
|
|
11
|
+
any_provider_allowed: z.ZodBoolean;
|
|
12
|
+
any_device_allowed: z.ZodBoolean;
|
|
13
|
+
created_at: z.ZodString;
|
|
14
|
+
login_successful: z.ZodBoolean;
|
|
15
|
+
status: z.ZodEnum<["pending", "failed", "authorized"]>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
connect_webview_id: string;
|
|
18
|
+
url: string;
|
|
19
|
+
workspace_id: string;
|
|
20
|
+
device_selection_mode: "none" | "single" | "multiple";
|
|
21
|
+
status: "pending" | "failed" | "authorized";
|
|
22
|
+
accepted_providers: string[];
|
|
23
|
+
accepted_devices: string[];
|
|
24
|
+
any_provider_allowed: boolean;
|
|
25
|
+
any_device_allowed: boolean;
|
|
26
|
+
created_at: string;
|
|
27
|
+
login_successful: boolean;
|
|
28
|
+
connected_account_id?: string | undefined;
|
|
29
|
+
}, {
|
|
30
|
+
connect_webview_id: string;
|
|
31
|
+
url: string;
|
|
32
|
+
workspace_id: string;
|
|
33
|
+
device_selection_mode: "none" | "single" | "multiple";
|
|
34
|
+
status: "pending" | "failed" | "authorized";
|
|
35
|
+
accepted_providers: string[];
|
|
36
|
+
accepted_devices: string[];
|
|
37
|
+
any_provider_allowed: boolean;
|
|
38
|
+
any_device_allowed: boolean;
|
|
39
|
+
created_at: string;
|
|
40
|
+
login_successful: boolean;
|
|
41
|
+
connected_account_id?: string | undefined;
|
|
42
|
+
}>;
|
|
43
|
+
type ConnectWebview = z.infer<typeof connect_webview>;
|
|
44
|
+
|
|
45
|
+
declare const schemas_connect_webview: typeof connect_webview;
|
|
46
|
+
declare namespace schemas {
|
|
47
|
+
export {
|
|
48
|
+
schemas_connect_webview as connect_webview,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare const _default: {};
|
|
53
|
+
|
|
54
|
+
declare const routes: {};
|
|
55
|
+
|
|
56
|
+
export { ConnectWebview, _default as openapi, routes, schemas };
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";AAAA,IAAO,cAAQ","sourcesContent":["export default null\n"]}
|
package/dist/index.d.cts
ADDED
package/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
declare const _default: null;
|
|
2
|
+
export default _default;
|
package/index.js
CHANGED
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,eAAe,IAAI,CAAA"}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import * as schemas from "./schemas.js";
|
|
2
|
+
export { schemas };
|
|
3
|
+
export * from "./model-types.js";
|
|
4
|
+
export { default as openapi } from "./openapi.js";
|
|
5
|
+
// UPSTREAM: Reserve this named export until nextlove is able to generate this.
|
|
6
|
+
export const routes = {};
|
|
2
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC,OAAO,EAAE,OAAO,EAAE,CAAA;AAElB,cAAc,kBAAkB,CAAA;AAChC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAA;AACjD,+EAA+E;AAC/E,MAAM,CAAC,MAAM,MAAM,GAAG,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ConnectWebview } from "./models/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-types.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/model-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const connect_webview: z.ZodObject<{
|
|
3
|
+
connect_webview_id: z.ZodString;
|
|
4
|
+
connected_account_id: z.ZodOptional<z.ZodString>;
|
|
5
|
+
url: z.ZodString;
|
|
6
|
+
workspace_id: z.ZodString;
|
|
7
|
+
device_selection_mode: z.ZodEnum<["none", "single", "multiple"]>;
|
|
8
|
+
accepted_providers: z.ZodArray<z.ZodString, "many">;
|
|
9
|
+
accepted_devices: z.ZodArray<z.ZodString, "many">;
|
|
10
|
+
any_provider_allowed: z.ZodBoolean;
|
|
11
|
+
any_device_allowed: z.ZodBoolean;
|
|
12
|
+
created_at: z.ZodString;
|
|
13
|
+
login_successful: z.ZodBoolean;
|
|
14
|
+
status: z.ZodEnum<["pending", "failed", "authorized"]>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
url: string;
|
|
17
|
+
status: "failed" | "pending" | "authorized";
|
|
18
|
+
connect_webview_id: string;
|
|
19
|
+
workspace_id: string;
|
|
20
|
+
device_selection_mode: "none" | "multiple" | "single";
|
|
21
|
+
accepted_providers: string[];
|
|
22
|
+
accepted_devices: string[];
|
|
23
|
+
any_provider_allowed: boolean;
|
|
24
|
+
any_device_allowed: boolean;
|
|
25
|
+
created_at: string;
|
|
26
|
+
login_successful: boolean;
|
|
27
|
+
connected_account_id?: string | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
url: string;
|
|
30
|
+
status: "failed" | "pending" | "authorized";
|
|
31
|
+
connect_webview_id: string;
|
|
32
|
+
workspace_id: string;
|
|
33
|
+
device_selection_mode: "none" | "multiple" | "single";
|
|
34
|
+
accepted_providers: string[];
|
|
35
|
+
accepted_devices: string[];
|
|
36
|
+
any_provider_allowed: boolean;
|
|
37
|
+
any_device_allowed: boolean;
|
|
38
|
+
created_at: string;
|
|
39
|
+
login_successful: boolean;
|
|
40
|
+
connected_account_id?: string | undefined;
|
|
41
|
+
}>;
|
|
42
|
+
export type ConnectWebview = z.infer<typeof connect_webview>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const connect_webview = z.object({
|
|
3
|
+
connect_webview_id: z.string().uuid(),
|
|
4
|
+
connected_account_id: z.string().uuid().optional(),
|
|
5
|
+
url: z.string().url(),
|
|
6
|
+
workspace_id: z.string().uuid(),
|
|
7
|
+
device_selection_mode: z.enum(["none", "single", "multiple"]),
|
|
8
|
+
accepted_providers: z.array(z.string()),
|
|
9
|
+
accepted_devices: z.array(z.string()),
|
|
10
|
+
any_provider_allowed: z.boolean(),
|
|
11
|
+
any_device_allowed: z.boolean(),
|
|
12
|
+
created_at: z.string().datetime(),
|
|
13
|
+
login_successful: z.boolean(),
|
|
14
|
+
status: z.enum(["pending", "failed", "authorized"]),
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=connect-webview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect-webview.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/models/connect-webview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrC,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAClD,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACrB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC/B,qBAAqB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC7D,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACvC,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACrC,oBAAoB,EAAE,CAAC,CAAC,OAAO,EAAE;IACjC,kBAAkB,EAAE,CAAC,CAAC,OAAO,EAAE;IAC/B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE;IAC7B,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;CACpD,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./connect-webview.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/openapi.ts"],"names":[],"mappings":"AAAA,eAAe,EAAE,CAAA"}
|