@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 CHANGED
@@ -11,7 +11,7 @@
11
11
  </a>
12
12
  </p>
13
13
 
14
- <h3 align="center">WooCommerce Extension</h3>
14
+ <h3 align="center">WooCommerce Integration</h3>
15
15
 
16
16
  <p align="center">
17
17
  Type-safe storefront using the WooCommerce WordPress plugin
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.Extension<"woocommerce", {
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, createExtension, createMiddleware, createProcedure, defineErrorMap, deserializeCurrencyFormat, deserializeListMetadata } from "kizlo";
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 CART_ROUTER = {
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 CHECKOUT_ROUTER = {
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 CUSTOMER_ROUTER = { get: createProcedure({
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 PRODUCT_ROUTER = {
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 createExtension({
1803
+ return createIntegration({
1804
1804
  id: "woocommerce",
1805
1805
  requires: {
1806
- plugin: {
1807
- slug: "kizlo-woocommerce",
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
- init: () => {
1821
- return { router: {
1822
- cart: CART_ROUTER,
1823
- products: PRODUCT_ROUTER,
1824
- checkout: CHECKOUT_ROUTER,
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 router or service reaches goes through a generated endpoint, which derives
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.1",
3
+ "version": "0.2.2",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
- "description": "WooCommerce extension for Kizlo.",
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.7.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.15.0"
57
+ "kizlo": ">=0.16.0"
58
58
  }
59
59
  }