@seamapi/types 0.0.5 → 0.0.6
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 +12 -0
- package/dist/connect.cjs.map +1 -0
- package/dist/connect.d.cts +12 -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 +1 -1
- package/lib/seam/connect/index.js +1 -1
- package/lib/seam/connect/index.js.map +1 -1
- 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/{workspace.d.ts → models/workspace.d.ts} +1 -1
- package/lib/seam/connect/{workspace.js → models/workspace.js} +1 -1
- package/lib/seam/connect/models/workspace.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 +1 -1
- package/src/lib/seam/connect/models/index.ts +1 -0
- package/src/lib/seam/connect/{workspace.ts → models/workspace.ts} +1 -1
- 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.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/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,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var zod = require('zod');
|
|
4
|
+
|
|
5
|
+
// src/lib/seam/connect/models/workspace.ts
|
|
6
|
+
var workspace = zod.z.object({
|
|
7
|
+
workspace_id: zod.z.string().uuid()
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
exports.workspace = workspace;
|
|
11
|
+
//# sourceMappingURL=out.js.map
|
|
12
|
+
//# sourceMappingURL=connect.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/seam/connect/models/workspace.ts"],"names":[],"mappings":";AAAA,SAAS,SAAS;AAEX,IAAM,YAAY,EAAE,OAAO;AAAA,EAChC,cAAc,EAAE,OAAO,EAAE,KAAK;AAChC,CAAC","sourcesContent":["import { z } from \"zod\"\n\nexport const workspace = z.object({\n workspace_id: z.string().uuid(),\n})\nexport type Workspace = z.infer<typeof workspace>\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const workspace: z.ZodObject<{
|
|
4
|
+
workspace_id: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
workspace_id: string;
|
|
7
|
+
}, {
|
|
8
|
+
workspace_id: string;
|
|
9
|
+
}>;
|
|
10
|
+
type Workspace = z.infer<typeof workspace>;
|
|
11
|
+
|
|
12
|
+
export { Workspace, workspace };
|
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 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./models/index.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./models/index.js";
|
|
2
2
|
//# 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,cAAc,mBAAmB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./workspace.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/models/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CAChC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seamapi/types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "TypeScript types for the Seam API.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -8,7 +8,13 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"import": "./index.js",
|
|
11
|
+
"require": "./dist/index.cjs",
|
|
11
12
|
"types": "./index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./connect": {
|
|
15
|
+
"import": "./connect.js",
|
|
16
|
+
"require": "./dist/connect.cjs",
|
|
17
|
+
"types": "./connect.d.ts"
|
|
12
18
|
}
|
|
13
19
|
},
|
|
14
20
|
"module": "index.js",
|
|
@@ -28,30 +34,29 @@
|
|
|
28
34
|
"index.js",
|
|
29
35
|
"index.js.map",
|
|
30
36
|
"index.d.ts",
|
|
37
|
+
"connect.js",
|
|
38
|
+
"connect.js.map",
|
|
39
|
+
"connect.d.ts",
|
|
40
|
+
"dist",
|
|
31
41
|
"lib",
|
|
32
|
-
"src"
|
|
33
|
-
"!**/*.test.ts"
|
|
42
|
+
"src"
|
|
34
43
|
],
|
|
35
44
|
"scripts": {
|
|
36
|
-
"build": "npm run build:
|
|
37
|
-
"
|
|
45
|
+
"build": "npm run build:entrypoints",
|
|
46
|
+
"prebuild": "concurrently --raw --group 'tsx src/index.ts' 'tsx src/connect.ts'",
|
|
47
|
+
"postbuild": "concurrently --raw --group 'node ./index.js' 'node ./connect.js'",
|
|
48
|
+
"build:entrypoints": "npm run build:ts",
|
|
49
|
+
"postbuild:entrypoints": "tsup",
|
|
38
50
|
"build:ts": "tsc --project tsconfig.build.json",
|
|
39
|
-
"prebuild:ts": "del 'index.*' lib",
|
|
51
|
+
"prebuild:ts": "del 'index.*' 'connect.*' 'lib'",
|
|
40
52
|
"postbuild:ts": "tsc-alias --project tsconfig.build.json",
|
|
41
53
|
"typecheck": "tsc",
|
|
42
|
-
"test": "c8 ava",
|
|
43
|
-
"pretest": "tsx src/index.ts",
|
|
44
|
-
"test:update": "ava --update-snapshots",
|
|
45
|
-
"test:watch": "ava --watch",
|
|
46
|
-
"test:debug": "ava debug --break",
|
|
47
54
|
"lint": "eslint --ignore-path .gitignore .",
|
|
48
55
|
"prelint": "prettier --check --ignore-path .gitignore .",
|
|
49
56
|
"postversion": "git push --follow-tags",
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"preformat": "prettier --write --ignore-path .gitignore .",
|
|
54
|
-
"report": "c8 report"
|
|
57
|
+
"format": "prettier --write --ignore-path .gitignore .",
|
|
58
|
+
"preformat": "patch-package",
|
|
59
|
+
"postformat": "eslint --ignore-path .gitignore --fix ."
|
|
55
60
|
},
|
|
56
61
|
"engines": {
|
|
57
62
|
"node": ">=16.13.0",
|
|
@@ -60,25 +65,21 @@
|
|
|
60
65
|
"peerDependencies": {
|
|
61
66
|
"zod": "^3.21.4"
|
|
62
67
|
},
|
|
63
|
-
"peerDependenciesMeta": {
|
|
64
|
-
"zod": {
|
|
65
|
-
"optional": true
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/node": "^18.11.18",
|
|
70
|
-
"
|
|
71
|
-
"c8": "^8.0.0",
|
|
70
|
+
"concurrently": "^8.2.0",
|
|
72
71
|
"del-cli": "^5.0.0",
|
|
73
72
|
"eslint": "^8.9.0",
|
|
74
73
|
"eslint-config-prettier": "^8.4.0",
|
|
75
74
|
"eslint-config-standard": "^17.1.0",
|
|
76
75
|
"eslint-config-standard-with-typescript": "^36.0.0",
|
|
76
|
+
"eslint-plugin-node": "^11.1.0",
|
|
77
77
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
78
78
|
"eslint-plugin-unused-imports": "^2.0.0",
|
|
79
|
-
"
|
|
79
|
+
"patch-package": "^7.0.1",
|
|
80
80
|
"prettier": "^3.0.0",
|
|
81
81
|
"tsc-alias": "^1.8.2",
|
|
82
|
+
"tsup": "^7.1.0",
|
|
82
83
|
"tsx": "^3.12.1",
|
|
83
84
|
"typescript": "^5.0.2",
|
|
84
85
|
"zod": "^3.21.4"
|
package/src/connect.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/seam/connect/index.js'
|
package/src/index.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from 'lib/index.js'
|
|
1
|
+
export default null
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./models/index.js"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./workspace.js"
|
package/lib/index.d.ts
DELETED
package/lib/index.js
DELETED
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CAChC,CAAC,CAAA"}
|
package/lib/seam/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './connect/index.js';
|
package/lib/seam/index.js
DELETED
package/lib/seam/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/seam/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
|
package/lib/todo.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const todo: (x: string) => string;
|
package/lib/todo.js
DELETED
package/lib/todo.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"todo.js","sourceRoot":"","sources":["../src/lib/todo.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,CAAC,CAAA"}
|
package/src/lib/index.ts
DELETED
package/src/lib/seam/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './connect/index.js'
|
package/src/lib/todo.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const todo = (x: string): string => x
|