@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.
Files changed (61) hide show
  1. package/README.md +36 -2
  2. package/connect.d.ts +1 -0
  3. package/connect.js +2 -0
  4. package/connect.js.map +1 -0
  5. package/dist/connect.cjs +41 -0
  6. package/dist/connect.cjs.map +1 -0
  7. package/dist/connect.d.cts +56 -0
  8. package/dist/index.cjs +8 -0
  9. package/dist/index.cjs.map +1 -0
  10. package/dist/index.d.cts +3 -0
  11. package/index.d.ts +2 -2
  12. package/index.js +1 -2
  13. package/index.js.map +1 -1
  14. package/lib/seam/connect/index.d.ts +5 -1
  15. package/lib/seam/connect/index.js +6 -1
  16. package/lib/seam/connect/index.js.map +1 -1
  17. package/lib/seam/connect/model-types.d.ts +1 -0
  18. package/lib/seam/connect/model-types.js +2 -0
  19. package/lib/seam/connect/model-types.js.map +1 -0
  20. package/lib/seam/connect/models/connect-webview.d.ts +42 -0
  21. package/lib/seam/connect/models/connect-webview.js +16 -0
  22. package/lib/seam/connect/models/connect-webview.js.map +1 -0
  23. package/lib/seam/connect/models/index.d.ts +1 -0
  24. package/lib/seam/connect/models/index.js +2 -0
  25. package/lib/seam/connect/models/index.js.map +1 -0
  26. package/lib/seam/connect/openapi.d.ts +2 -0
  27. package/lib/seam/connect/openapi.js +2 -0
  28. package/lib/seam/connect/openapi.js.map +1 -0
  29. package/lib/seam/connect/route-types.d.ts +1694 -0
  30. package/lib/seam/connect/route-types.js +2 -0
  31. package/lib/seam/connect/route-types.js.map +1 -0
  32. package/lib/seam/connect/schemas.d.ts +1 -0
  33. package/lib/seam/connect/schemas.js +2 -0
  34. package/lib/seam/connect/schemas.js.map +1 -0
  35. package/package.json +25 -24
  36. package/src/connect.ts +1 -0
  37. package/src/index.ts +1 -2
  38. package/src/lib/seam/.prettierrc.json +5 -0
  39. package/src/lib/seam/connect/index.ts +8 -1
  40. package/src/lib/seam/connect/model-types.ts +1 -0
  41. package/src/lib/seam/connect/models/connect-webview.ts +18 -0
  42. package/src/lib/seam/connect/models/index.ts +1 -0
  43. package/src/lib/seam/connect/openapi.ts +1 -0
  44. package/src/lib/seam/connect/route-types.ts +2321 -0
  45. package/src/lib/seam/connect/schemas.ts +1 -0
  46. package/lib/index.d.ts +0 -3
  47. package/lib/index.js +0 -4
  48. package/lib/index.js.map +0 -1
  49. package/lib/seam/connect/workspace.d.ts +0 -9
  50. package/lib/seam/connect/workspace.js +0 -5
  51. package/lib/seam/connect/workspace.js.map +0 -1
  52. package/lib/seam/index.d.ts +0 -1
  53. package/lib/seam/index.js +0 -2
  54. package/lib/seam/index.js.map +0 -1
  55. package/lib/todo.d.ts +0 -1
  56. package/lib/todo.js +0 -2
  57. package/lib/todo.js.map +0 -1
  58. package/src/lib/index.ts +0 -3
  59. package/src/lib/seam/connect/workspace.ts +0 -6
  60. package/src/lib/seam/index.ts +0 -1
  61. package/src/lib/todo.ts +0 -1
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=route-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route-types.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/route-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export { connect_webview } from "./models/index.js";
@@ -0,0 +1,2 @@
1
+ export { connect_webview } from "./models/index.js";
2
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "0.0.5",
3
+ "version": "0.1.0",
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:ts",
37
- "postbuild": "node ./index.js",
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
- "example": "tsx examples",
51
- "example:inspect": "tsx --inspect examples",
52
- "format": "eslint --ignore-path .gitignore --fix .",
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
- "ava": "^5.0.1",
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
- "landlubber": "^1.0.0",
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 { default } from 'lib/index.js'
2
- export * from 'lib/index.js'
1
+ export default null
@@ -0,0 +1,5 @@
1
+ {
2
+ "semi": false,
3
+ "trailingComma": "es5",
4
+ "endOfLine": "lf"
5
+ }
@@ -1 +1,8 @@
1
- export * from './workspace.js'
1
+ import * as schemas from "./schemas.js"
2
+
3
+ export { schemas }
4
+
5
+ export * from "./model-types.js"
6
+ export { default as openapi } from "./openapi.js"
7
+ // UPSTREAM: Reserve this named export until nextlove is able to generate this.
8
+ export const routes = {}
@@ -0,0 +1 @@
1
+ export type { ConnectWebview } from "./models/index.js"
@@ -0,0 +1,18 @@
1
+ import { z } from "zod"
2
+
3
+ export const connect_webview = z.object({
4
+ connect_webview_id: z.string().uuid(),
5
+ connected_account_id: z.string().uuid().optional(),
6
+ url: z.string().url(),
7
+ workspace_id: z.string().uuid(),
8
+ device_selection_mode: z.enum(["none", "single", "multiple"]),
9
+ accepted_providers: z.array(z.string()),
10
+ accepted_devices: z.array(z.string()),
11
+ any_provider_allowed: z.boolean(),
12
+ any_device_allowed: z.boolean(),
13
+ created_at: z.string().datetime(),
14
+ login_successful: z.boolean(),
15
+ status: z.enum(["pending", "failed", "authorized"]),
16
+ })
17
+
18
+ export type ConnectWebview = z.infer<typeof connect_webview>
@@ -0,0 +1 @@
1
+ export * from "./connect-webview.js"
@@ -0,0 +1 @@
1
+ export default {}