{"_id":"@digital-retex/flos-pim-graphql-client","_rev":"2-c71a099dc6d557e3b712d81958cbb13a","name":"@digital-retex/flos-pim-graphql-client","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@digital-retex/flos-pim-graphql-client","version":"1.0.0","license":"MIT","_id":"@digital-retex/flos-pim-graphql-client@1.0.0","maintainers":[{"name":"digital-retex","email":"devs@atoms.studio"}],"dist":{"shasum":"9869b07be4ecf557dea7c5ba8fcc1534934a055c","tarball":"https://registry.npmjs.org/@digital-retex/flos-pim-graphql-client/-/flos-pim-graphql-client-1.0.0.tgz","fileCount":6,"integrity":"sha512-Fuj0HVK+gF9FrAv2NEdKuNyzUR5R8pFAwrPqWxkJEmDQ2Bi7CbSx84sfqsxAePGzys6PeqWvYMPIFWinT1pN+A==","signatures":[{"sig":"MEYCIQDfoeNAppOTjIpjs0o/El2gkYt4uC2tRMop8XNHInZXJAIhAPAnCPHz3KUIM7ce70tCjV6Us5AEWoj5u+UjSagtQPO2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":97538},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","gitHead":"db83f19d85ca3ffa5076396a9e73c798b95a2741","scripts":{"build":"bun run generate && tsup src/index.ts --format cjs,esm --dts --clean","check":"tsc --noEmit","generate":"graphql-codegen --config codegen.yml","release:beta":"npm version prerelease --preid=beta","release:major":"npm version major","release:minor":"npm version minor","release:patch":"npm version patch","prepublishOnly":"bun run build && bun run check","publish:public":"npm publish --access public"},"_npmUser":{"name":"digital-retex","email":"devs@atoms.studio"},"_npmVersion":"10.8.2","description":"TypeScript client generated from local GraphQL schema files","directories":{},"_nodeVersion":"20.19.5","dependencies":{"graphql":"^16.11.0","graphql-request":"^7.3.0","@graphql-typed-document-node/core":"^3.2.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"bun@1.1.29","devDependencies":{"tsup":"^8.5.0","typescript":"^5.9.2","@graphql-codegen/cli":"^6.0.0","@graphql-codegen/typescript":"^5.0.0","@graphql-codegen/typed-document-node":"^6.0.0","@graphql-codegen/typescript-operations":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/flos-pim-graphql-client_1.0.0_1773916422647_0.02772494478863896","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@digital-retex/flos-pim-graphql-client","version":"1.0.1","description":"TypeScript client generated from local GraphQL schema files","license":"MIT","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","scripts":{"generate":"graphql-codegen --config codegen.yml","build":"bun run generate && tsup src/index.ts --format cjs,esm --dts --clean","check":"tsc --noEmit","prepublishOnly":"bun run build && bun run check","publish:public":"npm publish --access public","release:patch":"npm version patch && bun run publish:public && git push && git push --tags","release:minor":"npm version minor && bun run publish:public && git push && git push --tags","release:major":"npm version major && bun run publish:public && git push && git push --tags","release:beta":"npm version prerelease --preid=beta && npm publish --tag beta --access public && git push && git push --tags"},"packageManager":"bun@1.1.29","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"dependencies":{"@graphql-typed-document-node/core":"^3.2.0","graphql":"^16.11.0","graphql-request":"^7.3.0"},"devDependencies":{"@graphql-codegen/cli":"^6.0.0","@graphql-codegen/typed-document-node":"^6.0.0","@graphql-codegen/typescript":"^5.0.0","@graphql-codegen/typescript-operations":"^5.0.0","tsup":"^8.5.0","typescript":"^5.9.2"},"_id":"@digital-retex/flos-pim-graphql-client@1.0.1","gitHead":"4e0ab4392920fdb344f5dec23d1c7d75c1735f52","_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-kIi4VMBOtOawjqNX9cUSWASyI7RdiAqAga1a5bFajukw3jflfshbCFiprT3hVxdCj6UXbYEPPohvNppx5ybqdA==","shasum":"8ebb11420f3974ab6e3ca6d98e54a182361df039","tarball":"https://registry.npmjs.org/@digital-retex/flos-pim-graphql-client/-/flos-pim-graphql-client-1.0.1.tgz","fileCount":6,"unpackedSize":97845,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDM9TbvmJifplGzD+VxedDPm5qMD+SMvfkKkYOz8iiPmAiAlwsNYrcbKG3NvF+4L4kWh1Oq4yAU2o2F4+AV9V/lpzw=="}]},"_npmUser":{"name":"digital-retex","email":"devs@atoms.studio"},"directories":{},"maintainers":[{"name":"digital-retex","email":"devs@atoms.studio"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/flos-pim-graphql-client_1.0.1_1773916697672_0.3447441120645862"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-19T10:33:42.584Z","modified":"2026-03-19T10:38:17.964Z","1.0.0":"2026-03-19T10:33:42.804Z","1.0.1":"2026-03-19T10:38:17.818Z"},"license":"MIT","description":"TypeScript client generated from local GraphQL schema files","maintainers":[{"name":"digital-retex","email":"devs@atoms.studio"}],"readme":"# Product GraphQL TypeScript Client\n\nTypeScript library generated from the GraphQL schemas in this repository, designed to execute type-safe calls against a GraphQL endpoint.\n\n## Main features\n\n- Automatic TypeScript type generation from GraphQL schema (`graphql-codegen`).\n- Typed GraphQL documents (`TypedDocumentNode`) for compile-time safety.\n- Ready-to-use client built on `graphql-request` (`ProductGraphqlClient`).\n- Dedicated methods for core queries:\n  - `getProduct(code)`\n  - `searchProducts(filter)`\n- Generic `request(options)` method for custom queries.\n- Included Postman collection for manual testing: `product-graphql.postman_collection.json`.\n\n## Requirements\n\n- Bun 1.1+\n\n## Installation\n\n```bash\nbun install\n```\n\n## Available scripts\n\n- `bun run generate`: generates types from schema + GraphQL operations.\n- `bun run build`: regenerates types and builds outputs in `dist/` (CJS + ESM + d.ts).\n- `bun run check`: runs project type-check.\n- `bun run release:patch`: bumps patch version, publishes to npm, pushes commit and tags.\n- `bun run release:minor`: bumps minor version, publishes to npm, pushes commit and tags.\n- `bun run release:major`: bumps major version, publishes to npm, pushes commit and tags.\n- `bun run release:beta`: bumps beta prerelease version, publishes with `beta` tag, pushes commit and tags.\n- `bun run publish:public`: publishes to npmjs as public package.\n\n## Project structure\n\n- `schemas.graphqls` + `types/**/*.graphqls`: source GraphQL schema.\n- `src/operations/*.graphql`: library GraphQL operations.\n- `src/generated/graphql.ts`: generated types and documents (auto-generated).\n- `src/client.ts`: client implementation.\n- `src/index.ts`: public exports.\n\n## Usage in your application\n\n```ts\nimport { ProductGraphqlClient } from \"@digital-retex/flos-pim-graphql-client\";\n\nconst client = new ProductGraphqlClient(\n  \"https://your-api.example.com/graphql\",\n  {\n    headers: {\n      Authorization: `Bearer ${process.env.API_TOKEN}`,\n    },\n  },\n);\n\nconst product = await client.getProduct(\"ABC123\");\n\nconst page = await client.searchProducts({\n  page: 0,\n  size: 20,\n  onlyWeb: true,\n});\n```\n\n### Typed custom requests\n\nYou can also use the `request(options)` method with a generated document:\n\n```ts\nimport {\n  ProductGraphqlClient,\n  SearchProductsDocument,\n  type SearchProductsQuery,\n  type SearchProductsQueryVariables,\n} from \"@digital-retex/flos-pim-graphql-client\";\n\nconst client = new ProductGraphqlClient(\"https://your-api.example.com/graphql\");\n\nconst data = await client.request<\n  SearchProductsQuery,\n  SearchProductsQueryVariables\n>({\n  document: SearchProductsDocument,\n  variables: {\n    filter: {\n      page: 0,\n      size: 10,\n    },\n  },\n});\n```\n\n## How to add new queries\n\n1. Create a `.graphql` file in `src/operations/`.\n2. Run `bun run generate`.\n3. Import the new `...Document` and related types from the package.\n4. (Optional) Add a dedicated method in `src/client.ts`.\n\n## Testing with Postman\n\n1. Import `product-graphql.postman_collection.json` into Postman.\n2. Set collection variables:\n   - `baseUrl` (GraphQL endpoint)\n   - `authToken` (if required)\n   - `productCode`, `page`, `size`\n3. Run `Get Product` or `Search Products`.\n\n## Release and versioning\n\n### 1) Prepare release\n\nMake sure your working tree is clean and you are authenticated on npm:\n\n```bash\nnpm whoami\n```\n\nIf needed:\n\n```bash\nnpm login\n```\n\nAlso make sure git remote is configured and you have push permissions.\n\n### 2) Run one release command\n\nChoose one of:\n\n```bash\nbun run release:patch\nbun run release:minor\nbun run release:major\n```\n\nFor beta builds:\n\n```bash\nbun run release:beta\n```\n\nEach release command performs all steps automatically:\n\n- runs `npm version ...` (updates `package.json` + creates git tag)\n- publishes to npm (`public` for stable, `--tag beta` for beta)\n- pushes commit and tags to remote (`git push && git push --tags`)\n\n`prepublishOnly` runs automatically before every publish and executes:\n\n- `bun run build`\n- `bun run check`\n\n## Operational notes\n\n- `src/generated/graphql.ts` is auto-generated: do not edit it manually.\n- If you update schema or queries, always regenerate with `bun run generate`.\n","readmeFilename":"README.md"}