@vencav/shoptet-client 0.1.0 → 0.1.1
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/dist/index.d.cts +8 -1
- package/dist/index.d.ts +8 -1
- package/package.json +11 -11
package/dist/index.d.cts
CHANGED
|
@@ -6,6 +6,13 @@ interface ShoptetWebhookPayload {
|
|
|
6
6
|
readonly eventCreated: string;
|
|
7
7
|
readonly eventInstance: string;
|
|
8
8
|
readonly eshopId: number;
|
|
9
|
+
readonly data?: ShoptetWebhookData;
|
|
10
|
+
}
|
|
11
|
+
interface ShoptetWebhookData {
|
|
12
|
+
readonly code?: string;
|
|
13
|
+
readonly orderCode?: string;
|
|
14
|
+
readonly id?: string | number;
|
|
15
|
+
readonly [key: string]: unknown;
|
|
9
16
|
}
|
|
10
17
|
type ShoptetEventType = "order:create" | "order:update" | "order:delete" | "stock:update" | "product:create" | "product:update";
|
|
11
18
|
interface ShoptetOrder {
|
|
@@ -241,4 +248,4 @@ declare const createShoptetClient: (credentials: ShoptetCredentials, options?: S
|
|
|
241
248
|
createOrder: (order: CreateOrderRequest, orderOptions?: CreateOrderOptions) => Promise<Result<ShoptetOrder>>;
|
|
242
249
|
};
|
|
243
250
|
|
|
244
|
-
export { type BatchUpdateResult, type CreateOrderAddress, type CreateOrderCurrency, type CreateOrderItem, type CreateOrderItemType, type CreateOrderOptions, type CreateOrderRequest, type ItemType, type ShoptetAddress, type ShoptetApiResponse, type ShoptetClient, type ShoptetClientOptions, type ShoptetCredentials, type ShoptetCustomer, type ShoptetError, type ShoptetEventType, type ShoptetOrder, type ShoptetOrderItem, type ShoptetOrderStatus, type ShoptetPaymentMethod, type ShoptetPrice, type ShoptetShippingMethod, type ShoptetStockItem, type ShoptetWebhookPayload, createShoptetClient };
|
|
251
|
+
export { type BatchUpdateResult, type CreateOrderAddress, type CreateOrderCurrency, type CreateOrderItem, type CreateOrderItemType, type CreateOrderOptions, type CreateOrderRequest, type ItemType, type ShoptetAddress, type ShoptetApiResponse, type ShoptetClient, type ShoptetClientOptions, type ShoptetCredentials, type ShoptetCustomer, type ShoptetError, type ShoptetEventType, type ShoptetOrder, type ShoptetOrderItem, type ShoptetOrderStatus, type ShoptetPaymentMethod, type ShoptetPrice, type ShoptetShippingMethod, type ShoptetStockItem, type ShoptetWebhookData, type ShoptetWebhookPayload, createShoptetClient };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,13 @@ interface ShoptetWebhookPayload {
|
|
|
6
6
|
readonly eventCreated: string;
|
|
7
7
|
readonly eventInstance: string;
|
|
8
8
|
readonly eshopId: number;
|
|
9
|
+
readonly data?: ShoptetWebhookData;
|
|
10
|
+
}
|
|
11
|
+
interface ShoptetWebhookData {
|
|
12
|
+
readonly code?: string;
|
|
13
|
+
readonly orderCode?: string;
|
|
14
|
+
readonly id?: string | number;
|
|
15
|
+
readonly [key: string]: unknown;
|
|
9
16
|
}
|
|
10
17
|
type ShoptetEventType = "order:create" | "order:update" | "order:delete" | "stock:update" | "product:create" | "product:update";
|
|
11
18
|
interface ShoptetOrder {
|
|
@@ -241,4 +248,4 @@ declare const createShoptetClient: (credentials: ShoptetCredentials, options?: S
|
|
|
241
248
|
createOrder: (order: CreateOrderRequest, orderOptions?: CreateOrderOptions) => Promise<Result<ShoptetOrder>>;
|
|
242
249
|
};
|
|
243
250
|
|
|
244
|
-
export { type BatchUpdateResult, type CreateOrderAddress, type CreateOrderCurrency, type CreateOrderItem, type CreateOrderItemType, type CreateOrderOptions, type CreateOrderRequest, type ItemType, type ShoptetAddress, type ShoptetApiResponse, type ShoptetClient, type ShoptetClientOptions, type ShoptetCredentials, type ShoptetCustomer, type ShoptetError, type ShoptetEventType, type ShoptetOrder, type ShoptetOrderItem, type ShoptetOrderStatus, type ShoptetPaymentMethod, type ShoptetPrice, type ShoptetShippingMethod, type ShoptetStockItem, type ShoptetWebhookPayload, createShoptetClient };
|
|
251
|
+
export { type BatchUpdateResult, type CreateOrderAddress, type CreateOrderCurrency, type CreateOrderItem, type CreateOrderItemType, type CreateOrderOptions, type CreateOrderRequest, type ItemType, type ShoptetAddress, type ShoptetApiResponse, type ShoptetClient, type ShoptetClientOptions, type ShoptetCredentials, type ShoptetCustomer, type ShoptetError, type ShoptetEventType, type ShoptetOrder, type ShoptetOrderItem, type ShoptetOrderStatus, type ShoptetPaymentMethod, type ShoptetPrice, type ShoptetShippingMethod, type ShoptetStockItem, type ShoptetWebhookData, type ShoptetWebhookPayload, createShoptetClient };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vencav/shoptet-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "TypeScript client for the Shoptet Private API. Covers orders, stock, pricelists, and webhook signature validation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shoptet",
|
|
@@ -42,15 +42,6 @@
|
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=20"
|
|
44
44
|
},
|
|
45
|
-
"scripts": {
|
|
46
|
-
"build": "tsup",
|
|
47
|
-
"test": "vitest run",
|
|
48
|
-
"test:dist": "pnpm build && node ./smoke-dist.mjs",
|
|
49
|
-
"test:coverage": "vitest run --coverage",
|
|
50
|
-
"lint": "eslint src",
|
|
51
|
-
"lint:fix": "eslint src --fix",
|
|
52
|
-
"typecheck": "tsc --noEmit"
|
|
53
|
-
},
|
|
54
45
|
"dependencies": {
|
|
55
46
|
"@vencav/result": "^0.1.0"
|
|
56
47
|
},
|
|
@@ -64,5 +55,14 @@
|
|
|
64
55
|
"tsup": "^8.4.0",
|
|
65
56
|
"typescript": "^5.8.3",
|
|
66
57
|
"vitest": "^3.2.0"
|
|
58
|
+
},
|
|
59
|
+
"scripts": {
|
|
60
|
+
"build": "tsup",
|
|
61
|
+
"test": "vitest run",
|
|
62
|
+
"test:dist": "pnpm build && node ./smoke-dist.mjs",
|
|
63
|
+
"test:coverage": "vitest run --coverage",
|
|
64
|
+
"lint": "eslint src",
|
|
65
|
+
"lint:fix": "eslint src --fix",
|
|
66
|
+
"typecheck": "tsc --noEmit"
|
|
67
67
|
}
|
|
68
|
-
}
|
|
68
|
+
}
|