@kizlo/woocommerce 0.2.1 → 0.2.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.
- package/README.md +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -17
- package/dist/test.js +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as kizlo0 from "kizlo";
|
|
2
2
|
|
|
3
3
|
//#region src/index.d.ts
|
|
4
|
-
declare function woocommerce(): kizlo0.
|
|
4
|
+
declare function woocommerce(): kizlo0.Integration<"woocommerce", {
|
|
5
5
|
cart: {
|
|
6
6
|
get: kizlo0.Procedure<"api", {}, {
|
|
7
7
|
totalItems: number;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CurrencyFormat, IdentifierInput, KizloError, ListMetadata, Seo,
|
|
1
|
+
import { CurrencyFormat, IdentifierInput, KizloError, ListMetadata, Seo, createIntegration, createMiddleware, createProcedure, defineErrorMap, deserializeCurrencyFormat, deserializeListMetadata } from "kizlo";
|
|
2
2
|
import { BooleanLike, Media, Metadata, NumberLike, arrayable, normalizeArrayableValue, random, seconds, timestampSec, toPublicMetadata, tryCatch } from "@kizlo/shared";
|
|
3
3
|
import { SignJWT, jwtVerify } from "jose";
|
|
4
4
|
import z$1, { z } from "zod/v4";
|
|
@@ -740,7 +740,7 @@ function calculateLineItemTotals(input) {
|
|
|
740
740
|
|
|
741
741
|
//#endregion
|
|
742
742
|
//#region src/cart/index.ts
|
|
743
|
-
const
|
|
743
|
+
const CART_PROCEDURES = {
|
|
744
744
|
get: createProcedure({
|
|
745
745
|
scope: "api",
|
|
746
746
|
method: "GET",
|
|
@@ -1260,7 +1260,7 @@ function paymentStatus(status) {
|
|
|
1260
1260
|
|
|
1261
1261
|
//#endregion
|
|
1262
1262
|
//#region src/checkout/index.ts
|
|
1263
|
-
const
|
|
1263
|
+
const CHECKOUT_PROCEDURES = {
|
|
1264
1264
|
get: createProcedure({
|
|
1265
1265
|
scope: "api",
|
|
1266
1266
|
method: "GET",
|
|
@@ -1458,7 +1458,7 @@ function deserializeCustomer(data) {
|
|
|
1458
1458
|
|
|
1459
1459
|
//#endregion
|
|
1460
1460
|
//#region src/customer/index.ts
|
|
1461
|
-
const
|
|
1461
|
+
const CUSTOMER_PROCEDURES = { get: createProcedure({
|
|
1462
1462
|
scope: "api",
|
|
1463
1463
|
method: "GET",
|
|
1464
1464
|
path: "/customers",
|
|
@@ -1706,7 +1706,7 @@ function toTimestamp(date) {
|
|
|
1706
1706
|
|
|
1707
1707
|
//#endregion
|
|
1708
1708
|
//#region src/product/index.ts
|
|
1709
|
-
const
|
|
1709
|
+
const PRODUCT_PROCEDURES = {
|
|
1710
1710
|
get: createProcedure({
|
|
1711
1711
|
scope: "api",
|
|
1712
1712
|
method: "GET",
|
|
@@ -1800,14 +1800,13 @@ const PRODUCT_ROUTER = {
|
|
|
1800
1800
|
//#endregion
|
|
1801
1801
|
//#region src/index.ts
|
|
1802
1802
|
function woocommerce() {
|
|
1803
|
-
return
|
|
1803
|
+
return createIntegration({
|
|
1804
1804
|
id: "woocommerce",
|
|
1805
1805
|
requires: {
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
name: "Kizlo WooCommerce",
|
|
1806
|
+
plugins: [{
|
|
1807
|
+
name: "kizlo-woocommerce",
|
|
1809
1808
|
version: "0.2.0"
|
|
1810
|
-
},
|
|
1809
|
+
}],
|
|
1811
1810
|
endpoints: [
|
|
1812
1811
|
"woocommerce.customers",
|
|
1813
1812
|
"woocommerce.products",
|
|
@@ -1817,13 +1816,11 @@ function woocommerce() {
|
|
|
1817
1816
|
"woocommerce.store.products"
|
|
1818
1817
|
]
|
|
1819
1818
|
},
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
customers: CUSTOMER_ROUTER
|
|
1826
|
-
} };
|
|
1819
|
+
procedures: {
|
|
1820
|
+
cart: CART_PROCEDURES,
|
|
1821
|
+
products: PRODUCT_PROCEDURES,
|
|
1822
|
+
checkout: CHECKOUT_PROCEDURES,
|
|
1823
|
+
customers: CUSTOMER_PROCEDURES
|
|
1827
1824
|
}
|
|
1828
1825
|
});
|
|
1829
1826
|
}
|
package/dist/test.js
CHANGED
|
@@ -3,7 +3,7 @@ import { defineFixture, kizloRelease } from "kizlo/test";
|
|
|
3
3
|
//#region src/constants.ts
|
|
4
4
|
/**
|
|
5
5
|
* Base paths for the two WooCommerce APIs, used only where this package seeds or inspects a store
|
|
6
|
-
* directly. Everything a
|
|
6
|
+
* directly. Everything a procedure or service reaches goes through a generated endpoint, which derives
|
|
7
7
|
* its own prefix from the namespace the plugin declares.
|
|
8
8
|
*/
|
|
9
9
|
const WC_CORE_BASE = "/wp-json/wc/v3";
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kizlo/woocommerce",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
|
-
"description": "WooCommerce
|
|
6
|
+
"description": "WooCommerce integration for Kizlo.",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"wordpress",
|
|
9
9
|
"headless",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@kizlo/shared": "0.
|
|
52
|
+
"@kizlo/shared": "0.8.0",
|
|
53
53
|
"jose": "6.1.0",
|
|
54
54
|
"zod": "^4.3.6"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"kizlo": ">=0.
|
|
57
|
+
"kizlo": ">=0.16.0"
|
|
58
58
|
}
|
|
59
59
|
}
|