@anvilco/types 0.1.0 → 0.2.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@anvilco/types",
3
- "version": "0.1.0",
4
- "description": "TypeScript types generated from the Anvil OpenAPI spec",
3
+ "version": "0.2.0",
4
+ "description": "TypeScript types generated from the Anvil OpenAPI spec and GraphQL schema",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -10,25 +10,29 @@
10
10
  ".": {
11
11
  "import": "./dist/index.js",
12
12
  "require": "./dist/index.cjs"
13
- }
13
+ },
14
+ "./schema.graphql": "./schema/anvil-schema.graphql"
14
15
  },
15
16
  "files": [
16
17
  "dist",
18
+ "schema/anvil-schema.graphql",
17
19
  "README.md"
18
20
  ],
19
21
  "scripts": {
20
- "prepack": "yarn build",
21
22
  "build": "tsup",
23
+ "fetch:schema": "node scripts/fetch-schema.js",
24
+ "generate:graphql": "node scripts/generate-graphql.js && prettier --write src/graphql/generated",
22
25
  "generate:rest": "openapi-typescript https://app.useanvil.com/api/v1/openapi.json -o src/rest.ts && prettier --write src/rest.ts",
23
- "test": "echo 'No tests for types package'",
24
- "typecheck": "tsc --noEmit",
26
+ "test": "vitest run",
27
+ "typecheck": "tsc --noEmit && tsc -p test/types",
25
28
  "lint": "eslint src"
26
29
  },
27
30
  "keywords": [
28
31
  "anvil",
29
32
  "pdf",
30
33
  "typescript",
31
- "openapi"
34
+ "openapi",
35
+ "graphql"
32
36
  ],
33
37
  "license": "MIT",
34
38
  "homepage": "https://github.com/anvilco/anvil-js/tree/main/packages/types#readme",
@@ -45,8 +49,12 @@
45
49
  "access": "public"
46
50
  },
47
51
  "devDependencies": {
52
+ "@gql.tada/cli-utils": "^1.9.4",
53
+ "gql.tada": "^1.11.4",
54
+ "graphql": "^16.14.2",
48
55
  "openapi-typescript": "^7.13.0",
49
56
  "prettier": "^3.8.3",
50
- "tsup": "^8.0.0"
57
+ "tsup": "^8.0.0",
58
+ "vitest": "^4.1.5"
51
59
  }
52
60
  }