@epcc-sdk/sdks-shopper 0.0.2

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,2 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ export {};
@@ -0,0 +1,6 @@
1
+ export * from "./client";
2
+ export * from "./client/@tanstack/react-query.gen";
3
+ import { Client, createClient } from "@hey-api/client-fetch";
4
+ export { createClient, Client };
5
+ export { client } from "./client/sdk.gen";
6
+ export { extractProductImage } from "./utils";
package/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ export * from "./client";
2
+ export * from "./client/@tanstack/react-query.gen";
3
+ import { createClient } from "@hey-api/client-fetch";
4
+ export { createClient };
5
+ export { client } from "./client/sdk.gen";
6
+ export { extractProductImage } from "./utils";
@@ -0,0 +1,2 @@
1
+ import { Included, Product } from "../client";
2
+ export declare const extractProductImage: (product: Product, images: Included["main_images"]) => import("../client").ElasticPathFile | undefined;
@@ -0,0 +1,8 @@
1
+ export var extractProductImage = function (product, images) {
2
+ return images === null || images === void 0 ? void 0 : images.find(function (file) {
3
+ var _a, _b, _c;
4
+ if (file.id === ((_c = (_b = (_a = product.relationships) === null || _a === void 0 ? void 0 : _a.main_image) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.id)) {
5
+ return file;
6
+ }
7
+ });
8
+ };
@@ -0,0 +1 @@
1
+ export { extractProductImage } from "./extract-product-image";
@@ -0,0 +1 @@
1
+ export { extractProductImage } from "./extract-product-image";
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@epcc-sdk/sdks-shopper",
3
+ "version": "0.0.2",
4
+ "description": "",
5
+ "main": "dist/index.js",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./dist/index.d.ts",
9
+ "node": {
10
+ "import": "./dist/index.js",
11
+ "require": "./dist/index.js"
12
+ },
13
+ "default": "./dist/index.js"
14
+ },
15
+ "./package.json": "./package.json"
16
+ },
17
+ "files": [
18
+ "dist/**"
19
+ ],
20
+ "keywords": [],
21
+ "devDependencies": {
22
+ "@hey-api/openapi-ts": "0.61.1",
23
+ "@redocly/cli": "^1.21.0",
24
+ "@redocly/openapi-core": "^1.21.0",
25
+ "@tanstack/react-query": "^5.52.1",
26
+ "lodash": "^4.17.21",
27
+ "typescript": "^5.5.3"
28
+ },
29
+ "dependencies": {
30
+ "@hey-api/client-fetch": "0.6.0"
31
+ },
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "peerDependencies": {
36
+ "@tanstack/react-query": "^5.52.1"
37
+ },
38
+ "peerDependenciesMeta": {
39
+ "@tanstack/react-query": {
40
+ "optional": true
41
+ }
42
+ },
43
+ "scripts": {
44
+ "build": "pnpm oas:build && pnpm oas:openapi-ts && pnpm tsc:build",
45
+ "tsc:build": "tsc -p tsconfig.node.json",
46
+ "oas:build": "pnpm oas:redocly:bundle && pnpm oas:openapi-format:convert && pnpm oas:redocly:join:shopper",
47
+ "oas:openapi-ts": "openapi-ts",
48
+ "oas:redocly": "redocly --config ./redocly.json",
49
+ "oas:redocly:lint": "redocly lint --config ../specs/config/redocly.yaml",
50
+ "oas:redocly:join:shopper": "redocly join --config ../specs/config/redocly.yaml --output ../specs/shopper.yaml ../specs/bundled/catalog_view_3.1.yaml ../specs/bundled/cart_checkout.yaml",
51
+ "oas:redocly:bundle": "redocly bundle --config ../specs/config/redocly.yaml",
52
+ "oas:openapi-format:convert": "pnpm dlx openapi-format ../specs/bundled/catalog_view.yaml -o ../specs/bundled/catalog_view_3.1.yaml --convertTo \"3.1\""
53
+ }
54
+ }