@picked/admin-api-client 0.0.1-dev.1786601464574

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.
@@ -0,0 +1,19 @@
1
+ /** @file Schema-bound gql.tada document builder for the Picked admin GraphQL API. */
2
+ import { initGraphQLTada } from 'gql.tada';
3
+ import type { introspection } from './graphql-env';
4
+ /**
5
+ * Typed GraphQL document builder. Author documents with this so results and variables are inferred
6
+ * from the admin API schema; supports fragment composition via `graphql(doc, [fragments])`.
7
+ *
8
+ * @example
9
+ * const MeQuery = graphql(`query Me { user { id } }`)
10
+ */
11
+ export declare const graphql: initGraphQLTada<{
12
+ introspection: introspection;
13
+ scalars: {
14
+ DateTime: string;
15
+ IsoDate: string;
16
+ JSON: unknown;
17
+ };
18
+ }>;
19
+ //# sourceMappingURL=graphql.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../src/graphql.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD;;;;;;GAMG;AACH,eAAO,MAAM,OAAO;mBACH,aAAa;aACnB;QACP,QAAQ,EAAE,MAAM,CAAA;QAChB,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,EAAE,OAAO,CAAA;KACd;EACC,CAAA"}
@@ -0,0 +1,7 @@
1
+ /** @file Public exports for `\@picked/admin-api-client`. */
2
+ export { createClient } from './client';
3
+ export type { AdminApiClient, CreateClientOptions } from './client';
4
+ export { graphql } from './graphql';
5
+ export { readFragment } from 'gql.tada';
6
+ export type { FragmentOf, ResultOf, TadaDocumentNode, VariablesOf } from 'gql.tada';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA"}
package/package.json ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "@picked/admin-api-client",
3
+ "description": "Typed gql.tada client for the Picked admin (management) GraphQL API",
4
+ "version": "0.0.1-dev.1786601464574",
5
+ "dependencies": {
6
+ "@0no-co/graphql.web": "^1.2.0",
7
+ "gql.tada": "^1.11.3",
8
+ "graphql": "^16.14.2",
9
+ "graphql-request": "^6.1.0"
10
+ },
11
+ "devDependencies": {
12
+ "@repo/eslint-config": "workspace:*",
13
+ "@repo/typescript-config": "workspace:*",
14
+ "@rollup/plugin-replace": "^6.0.3",
15
+ "@types/node": "^24",
16
+ "@vitest/coverage-v8": "^4.1.10",
17
+ "tsx": "^4.23.1",
18
+ "vite": "^8.2.0",
19
+ "vitest": "^4.1.10"
20
+ },
21
+ "exports": {
22
+ ".": {
23
+ "types": "./dist/types/index.d.ts",
24
+ "import": "./dist/esm/index.js",
25
+ "require": "./dist/cjs/index.js",
26
+ "default": "./dist/esm/index.js"
27
+ }
28
+ },
29
+ "files": [
30
+ "dist"
31
+ ],
32
+ "knip": {
33
+ "ignoreBinaries": [
34
+ "knip",
35
+ "jscpd",
36
+ "eslint",
37
+ "tsgo",
38
+ "attw",
39
+ "gql.tada"
40
+ ],
41
+ "ignoreDependencies": [
42
+ "@repo/eslint-config",
43
+ "@repo/typescript-config",
44
+ "@vitest/coverage-v8",
45
+ "graphql"
46
+ ],
47
+ "ignore": [
48
+ "eslint.config.js",
49
+ "src/graphql-env.d.ts"
50
+ ]
51
+ },
52
+ "main": "./dist/cjs/index.js",
53
+ "module": "./dist/esm/index.js",
54
+ "private": false,
55
+ "scripts": {
56
+ "build": "vite build && tsgo -p tsconfig.build.json && cp src/graphql-env.d.ts dist/types/graphql-env.d.ts",
57
+ "check": "pnpm type-check && pnpm lint && pnpm knip && pnpm jscpd",
58
+ "codegen": "gql.tada generate output",
59
+ "dev": "node ../../scripts/sdk-watch-build.mjs",
60
+ "jscpd": "jscpd src --ignore \"**/graphql-env.d.ts\"",
61
+ "knip": "knip",
62
+ "lint": "if [ \"$AGENT\" = \"true\" ]; then echo \"[AGENT HINT] Prefer running lint on specific files from the repo root: node scripts/lint-files.js <files>\"; fi && eslint .",
63
+ "lint-files": "eslint",
64
+ "lint:format": "eslint . --fix",
65
+ "lint:report": "eslint . -o './.reports/eslint.json' -f json || true",
66
+ "test": "vitest run",
67
+ "test:coverage": "../../scripts/vitest-coverage.sh",
68
+ "test:packaged-types": "attw --pack",
69
+ "test:watch": "vitest",
70
+ "type-check": "tsgo -p . --noEmit"
71
+ },
72
+ "type": "module",
73
+ "types": "./dist/types/index.d.ts"
74
+ }