@ehrenkind/shopify-lib 0.0.2 → 0.0.5
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/README.md +18 -0
- package/dist/index.d.cts +2 -24
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -155,6 +155,24 @@ Each module includes a corresponding test file (e.g., `getLeanProductVariants.ts
|
|
|
155
155
|
|
|
156
156
|
## Development
|
|
157
157
|
|
|
158
|
+
### Setup for Contributors
|
|
159
|
+
|
|
160
|
+
If you're contributing to this project, follow these steps to set up your development environment:
|
|
161
|
+
|
|
162
|
+
1. **Install dependencies:**
|
|
163
|
+
```bash
|
|
164
|
+
pnpm install
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
2. **Set up Git hooks (lefthook):**
|
|
168
|
+
```bash
|
|
169
|
+
pnpm exec lefthook install
|
|
170
|
+
```
|
|
171
|
+
This sets up pre-commit hooks for code formatting, type checking, and testing.
|
|
172
|
+
|
|
173
|
+
3. **Create environment file:**
|
|
174
|
+
Copy `.env.example` to `.env` and fill in your Shopify API credentials.
|
|
175
|
+
|
|
158
176
|
### Available Scripts
|
|
159
177
|
|
|
160
178
|
In the `package.json` file, you will find several scripts for development:
|
package/dist/index.d.cts
CHANGED
|
@@ -18245,36 +18245,14 @@ declare module '@shopify/admin-api-client' {
|
|
|
18245
18245
|
}
|
|
18246
18246
|
}
|
|
18247
18247
|
|
|
18248
|
-
declare const GetLeanOrderByNameReturn: z.ZodNullable<z.ZodObject<{
|
|
18249
|
-
id: z.ZodString;
|
|
18250
|
-
name: z.ZodString;
|
|
18251
|
-
createdAt: z.ZodString;
|
|
18252
|
-
updatedAt: z.ZodString;
|
|
18253
|
-
totalPrice: z.ZodObject<{
|
|
18254
|
-
amount: z.ZodString;
|
|
18255
|
-
currencyCode: z.ZodString;
|
|
18256
|
-
}, {}, {}>;
|
|
18257
|
-
customer: z.ZodNullable<z.ZodObject<{
|
|
18258
|
-
id: z.ZodString;
|
|
18259
|
-
displayName: z.ZodString;
|
|
18260
|
-
emailAddress: z.ZodNullable<z.ZodString>;
|
|
18261
|
-
}, {}, {}>>;
|
|
18262
|
-
financialStatus: z.ZodNullable<z.ZodString>;
|
|
18263
|
-
fulfillmentStatus: z.ZodNullable<z.ZodString>;
|
|
18264
|
-
}, {}, {}>>;
|
|
18248
|
+
declare const GetLeanOrderByNameReturn: z.ZodNullable<z.ZodObject<any, {}, {}>>;
|
|
18265
18249
|
type GetLeanOrderByNameReturnType = z.infer<typeof GetLeanOrderByNameReturn>;
|
|
18266
18250
|
type GetFullOrderByNameReturnType = NonNullable<NonNullable<OrdersByNameFullQuery['orders']>['edges'][number]['node']> | null;
|
|
18267
18251
|
declare function getOrderByName(orderName: string, detailLevel: 'lean'): Promise<GetLeanOrderByNameReturnType>;
|
|
18268
18252
|
declare function getOrderByName(orderName: string, detailLevel: 'full'): Promise<GetFullOrderByNameReturnType>;
|
|
18269
18253
|
declare function getOrderByName(orderName: string): Promise<GetLeanOrderByNameReturnType>;
|
|
18270
18254
|
|
|
18271
|
-
declare const GetLeanProductVariantsReturn: z.ZodArray<z.ZodObject<{
|
|
18272
|
-
productId: z.ZodString;
|
|
18273
|
-
productTitle: z.ZodString;
|
|
18274
|
-
variantId: z.ZodString;
|
|
18275
|
-
variantTitle: z.ZodString;
|
|
18276
|
-
sku: z.ZodString;
|
|
18277
|
-
}, {}, {}>>;
|
|
18255
|
+
declare const GetLeanProductVariantsReturn: z.ZodArray<z.ZodObject<any, {}, {}>>;
|
|
18278
18256
|
type GetLeanProductVariantsReturnType = z.infer<typeof GetLeanProductVariantsReturn>;
|
|
18279
18257
|
/**
|
|
18280
18258
|
* Retrieves a lean list of product variants from Shopify, optionally filtered by SKUs.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ehrenkind/shopify-lib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"main": "dist/index.cjs",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -69,7 +69,6 @@
|
|
|
69
69
|
"typecheck": "tsc",
|
|
70
70
|
"knip": "knip --max-issues 10",
|
|
71
71
|
"knip:fix": "knip --fix",
|
|
72
|
-
"postinstall": "lefthook install",
|
|
73
72
|
"codegen": "graphql-codegen-esm"
|
|
74
73
|
}
|
|
75
74
|
}
|