@kizlo/woocommerce 1.0.0-alpha.2 → 1.0.0-alpha.3
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/{client-CWtBT_hK.cjs → client-6WCc4I7s.cjs} +107 -117
- package/dist/{client-BJuv_NtE.js → client-DwegaoKJ.js} +97 -119
- package/dist/client-DwegaoKJ.js.map +1 -0
- package/dist/{index-DUK75443.d.ts → index-C7fqYN3y.d.ts} +500 -690
- package/dist/index-C7fqYN3y.d.ts.map +1 -0
- package/dist/{index-D6PQxlBF.d.cts → index-M1U-RzXY.d.cts} +500 -690
- package/dist/index-M1U-RzXY.d.cts.map +1 -0
- package/dist/index.cjs +3 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/package.json +4 -4
- package/dist/client-BJuv_NtE.js.map +0 -1
- package/dist/index-D6PQxlBF.d.cts.map +0 -1
- package/dist/index-DUK75443.d.ts.map +0 -1
|
@@ -22,31 +22,25 @@ var KizloCartItem = class {
|
|
|
22
22
|
this.kizlo = kizlo;
|
|
23
23
|
}
|
|
24
24
|
async add(input) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
headers
|
|
29
|
-
});
|
|
30
|
-
if (response.error) return this.kizlo._.http.error(response.error);
|
|
31
|
-
return this.kizlo._.http.success(response.data);
|
|
25
|
+
const response = await this.kizlo._.http.post("/cart/items", {
|
|
26
|
+
auth: true,
|
|
27
|
+
body: input
|
|
32
28
|
});
|
|
29
|
+
if (response.error) return this.kizlo._.http.error(response.error);
|
|
30
|
+
return this.kizlo._.http.success(response.data);
|
|
33
31
|
}
|
|
34
32
|
async update(input) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
headers
|
|
39
|
-
});
|
|
40
|
-
if (response.error) return this.kizlo._.http.error(response.error);
|
|
41
|
-
return this.kizlo._.http.success(response.data);
|
|
33
|
+
const response = await this.kizlo._.http.put(`/cart/items/${input.key}`, {
|
|
34
|
+
body: input,
|
|
35
|
+
auth: true
|
|
42
36
|
});
|
|
37
|
+
if (response.error) return this.kizlo._.http.error(response.error);
|
|
38
|
+
return this.kizlo._.http.success(response.data);
|
|
43
39
|
}
|
|
44
40
|
async remove(input) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return this.kizlo._.http.success(response.data);
|
|
49
|
-
});
|
|
41
|
+
const response = await this.kizlo._.http.delete(`/cart/items/${input.key}`, { auth: true });
|
|
42
|
+
if (response.error) return this.kizlo._.http.error(response.error);
|
|
43
|
+
return this.kizlo._.http.success(response.data);
|
|
50
44
|
}
|
|
51
45
|
};
|
|
52
46
|
var KizloCoupon = class {
|
|
@@ -54,18 +48,14 @@ var KizloCoupon = class {
|
|
|
54
48
|
this.kizlo = kizlo;
|
|
55
49
|
}
|
|
56
50
|
async apply(input) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return this.kizlo._.http.success(response.data);
|
|
61
|
-
});
|
|
51
|
+
const response = await this.kizlo._.http.post(`/cart/coupons/${input.code}`, { auth: true });
|
|
52
|
+
if (response.error) return this.kizlo._.http.error(response.error);
|
|
53
|
+
return this.kizlo._.http.success(response.data);
|
|
62
54
|
}
|
|
63
55
|
async remove(input) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return this.kizlo._.http.success(response.data);
|
|
68
|
-
});
|
|
56
|
+
const response = await this.kizlo._.http.delete(`/cart/coupons/${input.code}`, { auth: true });
|
|
57
|
+
if (response.error) return this.kizlo._.http.error(response.error);
|
|
58
|
+
return this.kizlo._.http.success(response.data);
|
|
69
59
|
}
|
|
70
60
|
};
|
|
71
61
|
var KizloCart = class {
|
|
@@ -77,21 +67,17 @@ var KizloCart = class {
|
|
|
77
67
|
this.coupons = new KizloCoupon(this.kizlo);
|
|
78
68
|
}
|
|
79
69
|
async retrieve() {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return this.kizlo._.http.success(response.data);
|
|
84
|
-
});
|
|
70
|
+
const response = await this.kizlo._.http.get("/cart", { auth: true });
|
|
71
|
+
if (response.error) return this.kizlo._.http.error(response.error);
|
|
72
|
+
return this.kizlo._.http.success(response.data);
|
|
85
73
|
}
|
|
86
74
|
async update(input) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
headers
|
|
91
|
-
});
|
|
92
|
-
if (response.error) return this.kizlo._.http.error(response.error);
|
|
93
|
-
return this.kizlo._.http.success(response.data);
|
|
75
|
+
const response = await this.kizlo._.http.put("/cart", {
|
|
76
|
+
auth: true,
|
|
77
|
+
body: input
|
|
94
78
|
});
|
|
79
|
+
if (response.error) return this.kizlo._.http.error(response.error);
|
|
80
|
+
return this.kizlo._.http.success(response.data);
|
|
95
81
|
}
|
|
96
82
|
};
|
|
97
83
|
const cart = {
|
|
@@ -124,50 +110,42 @@ const cart = {
|
|
|
124
110
|
|
|
125
111
|
//#endregion
|
|
126
112
|
//#region src/customer/client.ts
|
|
113
|
+
var KizloCustomer = class {
|
|
114
|
+
address;
|
|
115
|
+
constructor(kizlo) {
|
|
116
|
+
this.kizlo = kizlo;
|
|
117
|
+
this.address = new KizloAddress(this.kizlo);
|
|
118
|
+
}
|
|
119
|
+
async retrieve() {
|
|
120
|
+
const response = await this.kizlo._.http.get("/customers", { auth: true });
|
|
121
|
+
if (response.error) return this.kizlo._.http.error(response.error);
|
|
122
|
+
return this.kizlo._.http.success(response.data);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
127
125
|
var KizloAddress = class {
|
|
128
126
|
constructor(kizlo) {
|
|
129
127
|
this.kizlo = kizlo;
|
|
130
128
|
}
|
|
131
129
|
async create(input) {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
body: input
|
|
136
|
-
});
|
|
137
|
-
if (response.error) return this.kizlo._.http.error(response.error);
|
|
138
|
-
return this.kizlo._.http.success(response.data);
|
|
130
|
+
const response = await this.kizlo._.http.post("/customers/addresses", {
|
|
131
|
+
auth: true,
|
|
132
|
+
body: input
|
|
139
133
|
});
|
|
134
|
+
if (response.error) return this.kizlo._.http.error(response.error);
|
|
135
|
+
return this.kizlo._.http.success(response.data);
|
|
140
136
|
}
|
|
141
137
|
async update(input) {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
headers
|
|
146
|
-
});
|
|
147
|
-
if (response.error) return this.kizlo._.http.error(response.error);
|
|
148
|
-
return this.kizlo._.http.success(response.data);
|
|
138
|
+
const response = await this.kizlo._.http.put(`/customers/addresses/${input.id}`, {
|
|
139
|
+
body: input,
|
|
140
|
+
auth: true
|
|
149
141
|
});
|
|
142
|
+
if (response.error) return this.kizlo._.http.error(response.error);
|
|
143
|
+
return this.kizlo._.http.success(response.data);
|
|
150
144
|
}
|
|
151
145
|
async delete(input) {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
return this.kizlo._.http.success(response.data);
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
var KizloCustomer = class {
|
|
160
|
-
address;
|
|
161
|
-
constructor(kizlo) {
|
|
162
|
-
this.kizlo = kizlo;
|
|
163
|
-
this.address = new KizloAddress(this.kizlo);
|
|
164
|
-
}
|
|
165
|
-
async retrieve() {
|
|
166
|
-
return this.kizlo.auth.session.ensure(async ({ headers }) => {
|
|
167
|
-
const response = await this.kizlo._.http.get("/customers", { headers });
|
|
168
|
-
if (response.error) return this.kizlo._.http.error(response.error);
|
|
169
|
-
return this.kizlo._.http.success(response.data);
|
|
170
|
-
});
|
|
146
|
+
const response = await this.kizlo._.http.delete(`/customers/addresses/${input.id}`, { auth: true });
|
|
147
|
+
if (response.error) return this.kizlo._.http.error(response.error);
|
|
148
|
+
return this.kizlo._.http.success(response.data);
|
|
171
149
|
}
|
|
172
150
|
};
|
|
173
151
|
const customer = {
|
|
@@ -194,21 +172,17 @@ var KizloOrder = class {
|
|
|
194
172
|
this.kizlo = kizlo;
|
|
195
173
|
}
|
|
196
174
|
async retrieve(input) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
return this.kizlo._.http.success(response.data);
|
|
201
|
-
});
|
|
175
|
+
const response = await this.kizlo._.http.get(`/orders/${input.id}`, { auth: true });
|
|
176
|
+
if (response.error) return this.kizlo._.http.error(response.error);
|
|
177
|
+
return this.kizlo._.http.success(response.data);
|
|
202
178
|
}
|
|
203
179
|
async list(input) {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
query: input
|
|
208
|
-
});
|
|
209
|
-
if (response.error) return this.kizlo._.http.error(response.error);
|
|
210
|
-
return this.kizlo._.http.success(response.data);
|
|
180
|
+
const response = await this.kizlo._.http.get("/orders", {
|
|
181
|
+
auth: true,
|
|
182
|
+
query: input
|
|
211
183
|
});
|
|
184
|
+
if (response.error) return this.kizlo._.http.error(response.error);
|
|
185
|
+
return this.kizlo._.http.success(response.data);
|
|
212
186
|
}
|
|
213
187
|
};
|
|
214
188
|
const orders = {
|
|
@@ -311,7 +285,7 @@ var contract_server_default = {
|
|
|
311
285
|
"meta": {},
|
|
312
286
|
"route": {}
|
|
313
287
|
} },
|
|
314
|
-
"
|
|
288
|
+
"filters": { "~orpc": {
|
|
315
289
|
"errorMap": {},
|
|
316
290
|
"meta": {},
|
|
317
291
|
"route": {}
|
|
@@ -486,10 +460,8 @@ var KizloPaymentAdmin = class {
|
|
|
486
460
|
async pay(input) {
|
|
487
461
|
const adapter = input.adapters.find((adp) => adp.id === input.payment_method_id);
|
|
488
462
|
if (!adapter) return this.kizlo._.http.error("PAYMENT_ADAPTER_NOT_FOUND");
|
|
489
|
-
const session = await this.kizlo.auth.session.retrieve();
|
|
490
|
-
if (!session) return this.kizlo._.http.error("AUTH_REQUIRED");
|
|
491
463
|
const confirmResult = await this.confirm({
|
|
492
|
-
user_id:
|
|
464
|
+
user_id: {},
|
|
493
465
|
payment_method_id: adapter.id,
|
|
494
466
|
payment_method_name: adapter.name,
|
|
495
467
|
payment_method_type: adapter.type
|
|
@@ -568,7 +540,7 @@ function createPaymentServerRouter(options) {
|
|
|
568
540
|
}
|
|
569
541
|
|
|
570
542
|
//#endregion
|
|
571
|
-
//#region src/product/
|
|
543
|
+
//#region src/product/category.ts
|
|
572
544
|
var KizloProductCategory = class {
|
|
573
545
|
constructor(kizlo) {
|
|
574
546
|
this.kizlo = kizlo;
|
|
@@ -579,6 +551,12 @@ var KizloProductCategory = class {
|
|
|
579
551
|
return this.kizlo._.http.success(response.data);
|
|
580
552
|
}
|
|
581
553
|
};
|
|
554
|
+
const categories = { list: woocommerceProcedure.input(type()).output(type()).errors(procedureErrors()).handler(async ({ input, context }) => {
|
|
555
|
+
return ensureProcedureResult(await context.woocommerce.products.categories.list(input));
|
|
556
|
+
}) };
|
|
557
|
+
|
|
558
|
+
//#endregion
|
|
559
|
+
//#region src/product/review.ts
|
|
582
560
|
var KizloProductReview = class {
|
|
583
561
|
constructor(kizlo) {
|
|
584
562
|
this.kizlo = kizlo;
|
|
@@ -594,16 +572,28 @@ var KizloProductReview = class {
|
|
|
594
572
|
return this.kizlo._.http.success(response.data);
|
|
595
573
|
}
|
|
596
574
|
async create(input) {
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
body: input
|
|
601
|
-
});
|
|
602
|
-
if (response.error) return this.kizlo._.http.error(response.error);
|
|
603
|
-
return this.kizlo._.http.success(response.data);
|
|
575
|
+
const response = await this.kizlo._.http.post("/products/reviews", {
|
|
576
|
+
auth: true,
|
|
577
|
+
body: input
|
|
604
578
|
});
|
|
579
|
+
if (response.error) return this.kizlo._.http.error(response.error);
|
|
580
|
+
return this.kizlo._.http.success(response.data);
|
|
605
581
|
}
|
|
606
582
|
};
|
|
583
|
+
const reviews = {
|
|
584
|
+
retrieve: woocommerceProcedure.input(type()).output(type()).errors(procedureErrors()).handler(async ({ input, context }) => {
|
|
585
|
+
return ensureProcedureResult(await context.woocommerce.products.reviews.retrieve(input));
|
|
586
|
+
}),
|
|
587
|
+
list: woocommerceProcedure.input(type()).output(type()).errors(procedureErrors()).handler(async ({ input, context }) => {
|
|
588
|
+
return ensureProcedureResult(await context.woocommerce.products.reviews.list(input));
|
|
589
|
+
}),
|
|
590
|
+
create: woocommerceProcedure.input(type()).output(type()).errors(procedureErrors()).handler(async ({ input, context }) => {
|
|
591
|
+
return ensureProcedureResult(await context.woocommerce.products.reviews.create(input));
|
|
592
|
+
})
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
//#endregion
|
|
596
|
+
//#region src/product/product.ts
|
|
607
597
|
var KizloProduct = class {
|
|
608
598
|
reviews;
|
|
609
599
|
categories;
|
|
@@ -613,7 +603,7 @@ var KizloProduct = class {
|
|
|
613
603
|
this.categories = new KizloProductCategory(this.kizlo);
|
|
614
604
|
}
|
|
615
605
|
async retrieve(input) {
|
|
616
|
-
const response = await this.kizlo._.http.get(`/products/${input.
|
|
606
|
+
const response = await this.kizlo._.http.get(`/products/${input.identifier}`, { query: { preview_token: input.preview_token } });
|
|
617
607
|
if (response.error) return this.kizlo._.http.error(response.error);
|
|
618
608
|
return this.kizlo._.http.success(response.data);
|
|
619
609
|
}
|
|
@@ -622,8 +612,8 @@ var KizloProduct = class {
|
|
|
622
612
|
if (response.error) return this.kizlo._.http.error(response.error);
|
|
623
613
|
return this.kizlo._.http.success(response.data);
|
|
624
614
|
}
|
|
625
|
-
async
|
|
626
|
-
const response = await this.kizlo._.http.get("/products/
|
|
615
|
+
async filters(input) {
|
|
616
|
+
const response = await this.kizlo._.http.get("/products/filters", { query: input });
|
|
627
617
|
if (response.error) return this.kizlo._.http.error(response.error);
|
|
628
618
|
return this.kizlo._.http.success(response.data);
|
|
629
619
|
}
|
|
@@ -635,23 +625,11 @@ const products = {
|
|
|
635
625
|
list: woocommerceProcedure.input(type()).output(type()).errors(procedureErrors()).handler(async ({ input, context }) => {
|
|
636
626
|
return ensureProcedureResult(await context.woocommerce.products.list(input));
|
|
637
627
|
}),
|
|
638
|
-
|
|
639
|
-
return ensureProcedureResult(await context.woocommerce.products.
|
|
628
|
+
filters: woocommerceProcedure.input(type()).output(type()).errors(procedureErrors()).handler(async ({ input, context }) => {
|
|
629
|
+
return ensureProcedureResult(await context.woocommerce.products.filters(input));
|
|
640
630
|
}),
|
|
641
|
-
categories
|
|
642
|
-
|
|
643
|
-
}) },
|
|
644
|
-
reviews: {
|
|
645
|
-
retrieve: woocommerceProcedure.input(type()).output(type()).errors(procedureErrors()).handler(async ({ input, context }) => {
|
|
646
|
-
return ensureProcedureResult(await context.woocommerce.products.reviews.retrieve(input));
|
|
647
|
-
}),
|
|
648
|
-
list: woocommerceProcedure.input(type()).output(type()).errors(procedureErrors()).handler(async ({ input, context }) => {
|
|
649
|
-
return ensureProcedureResult(await context.woocommerce.products.reviews.list(input));
|
|
650
|
-
}),
|
|
651
|
-
create: woocommerceProcedure.input(type()).output(type()).errors(procedureErrors()).handler(async ({ input, context }) => {
|
|
652
|
-
return ensureProcedureResult(await context.woocommerce.products.reviews.create(input));
|
|
653
|
-
})
|
|
654
|
-
}
|
|
631
|
+
categories,
|
|
632
|
+
reviews
|
|
655
633
|
};
|
|
656
634
|
|
|
657
635
|
//#endregion
|
|
@@ -680,5 +658,5 @@ const woocommerceRouter = {
|
|
|
680
658
|
};
|
|
681
659
|
|
|
682
660
|
//#endregion
|
|
683
|
-
export {
|
|
684
|
-
//# sourceMappingURL=client-
|
|
661
|
+
export { KizloCartItem as C, woocommerceProcedure as D, woocommerce$1 as E, KizloCart as S, cart as T, KizloOrder as _, KizloProductReview as a, KizloCustomer as b, categories as c, createPaymentServerRouter as d, paymentRouter as f, createWoocommerceServerRouter as g, woocommerceRemoteProcedure as h, products as i, KizloPayment as l, woocommerceOpenApiProcedure as m, woocommerceRouter as n, reviews as o, woocommerce as p, KizloProduct as r, KizloProductCategory as s, KizloWoocommerce as t, KizloPaymentAdmin as u, orders as v, KizloCoupon as w, customer as x, KizloAddress as y };
|
|
662
|
+
//# sourceMappingURL=client-DwegaoKJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-DwegaoKJ.js","names":["woocommerce","kizlo: Kizlo","kizlo: Kizlo","kizlo: Kizlo","kizlo: Kizlo","contract","best: PaymentAdapter | null","methods: PaymentMethod[]","selectedAdapters: PaymentAdapter[]","kizlo: Kizlo","kizlo: Kizlo","kizlo: Kizlo","kizlo: Kizlo"],"sources":["../src/client.extension.ts","../src/cart/client.ts","../src/customer/client.ts","../src/order/client.ts","../src/generated/contract.server.json","../src/server.client.ts","../src/server.extension.ts","../src/payment/client.ts","../src/product/category.ts","../src/product/review.ts","../src/product/product.ts","../src/client.ts"],"sourcesContent":["import type { ClientExtension } from \"kizlo\"\nimport { createClientExtension, type ProcedureContext, procedure } from \"kizlo/extensions\"\nimport { KizloWoocommerce, type WooCommerceRouter, woocommerceRouter } from \"./client\"\n\nexport interface WooCommerceProcedureContext extends ProcedureContext {\n\twoocommerce: KizloWoocommerce\n}\n\nexport const woocommerceProcedure = procedure.use(\n\tprocedure.middleware(({ context, next }) => {\n\t\tconst woocommerce = new KizloWoocommerce(context.kizlo)\n\t\treturn next({ context: { woocommerce } })\n\t}),\n)\n\nexport type WooCommerceClientExtension = ClientExtension<\"woocommerce\", WooCommerceRouter>\n\nexport function woocommerce(): WooCommerceClientExtension {\n\treturn createClientExtension({\n\t\ttype: \"router\",\n\t\tname: \"woocommerce\",\n\t\tinit() {\n\t\t\treturn woocommerceRouter\n\t\t},\n\t})\n}\n","import { ensureProcedureResult, type Kizlo, type } from \"kizlo\"\nimport { procedureErrors } from \"kizlo/extensions\"\nimport { woocommerceProcedure } from \"../client.extension\"\nimport type {\n\tAddCartItemErrorCode,\n\tAddCartItemInput,\n\tAddCartItemResult,\n\tApplyCouponErrorCode,\n\tApplyCouponInput,\n\tApplyCouponResult,\n\tCart,\n\tRemoveCartItemErrorCode,\n\tRemoveCartItemInput,\n\tRemoveCartItemResult,\n\tRemoveCouponErrorCode,\n\tRemoveCouponInput,\n\tRemoveCouponResult,\n\tRetrieveCartErrorCode,\n\tRetrieveCartResult,\n\tUpdateCartErrorCode,\n\tUpdateCartInput,\n\tUpdateCartItemErrorCode,\n\tUpdateCartItemInput,\n\tUpdateCartItemResult,\n\tUpdateCartResult,\n} from \"./types\"\n\nexport class KizloCartItem {\n\tconstructor(private readonly kizlo: Kizlo) {}\n\n\tpublic async add(input: AddCartItemInput): Promise<AddCartItemResult> {\n\t\tconst response = await this.kizlo._.http.post<Cart, AddCartItemErrorCode>(\"/cart/items\", {\n\t\t\tauth: true,\n\t\t\tbody: input,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n\n\tpublic async update(input: UpdateCartItemInput): Promise<UpdateCartItemResult> {\n\t\tconst response = await this.kizlo._.http.put<Cart, UpdateCartItemErrorCode>(`/cart/items/${input.key}`, {\n\t\t\tbody: input,\n\t\t\tauth: true,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n\n\tpublic async remove(input: RemoveCartItemInput): Promise<RemoveCartItemResult> {\n\t\tconst response = await this.kizlo._.http.delete<Cart, RemoveCartItemErrorCode>(`/cart/items/${input.key}`, {\n\t\t\tauth: true,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n}\n\nexport class KizloCoupon {\n\tconstructor(private readonly kizlo: Kizlo) {}\n\n\tpublic async apply(input: ApplyCouponInput): Promise<ApplyCouponResult> {\n\t\tconst response = await this.kizlo._.http.post<Cart, ApplyCouponErrorCode>(`/cart/coupons/${input.code}`, {\n\t\t\tauth: true,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n\n\tpublic async remove(input: RemoveCouponInput): Promise<RemoveCouponResult> {\n\t\tconst response = await this.kizlo._.http.delete<Cart, RemoveCouponErrorCode>(`/cart/coupons/${input.code}`, {\n\t\t\tauth: true,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n}\n\nexport class KizloCart {\n\tpublic items: KizloCartItem\n\tpublic coupons: KizloCoupon\n\n\tconstructor(private readonly kizlo: Kizlo) {\n\t\tthis.items = new KizloCartItem(this.kizlo)\n\t\tthis.coupons = new KizloCoupon(this.kizlo)\n\t}\n\n\tpublic async retrieve(): Promise<RetrieveCartResult> {\n\t\tconst response = await this.kizlo._.http.get<Cart | null, RetrieveCartErrorCode>(\"/cart\", {\n\t\t\tauth: true,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n\n\tpublic async update(input: UpdateCartInput): Promise<UpdateCartResult> {\n\t\tconst response = await this.kizlo._.http.put<Cart, UpdateCartErrorCode>(\"/cart\", {\n\t\t\tauth: true,\n\t\t\tbody: input,\n\t\t})\n\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n}\n\nexport const cart = {\n\tretrieve: woocommerceProcedure\n\t\t.output(type<Cart | null>())\n\t\t.errors(procedureErrors<RetrieveCartErrorCode>())\n\t\t.handler(async ({ context }) => {\n\t\t\treturn ensureProcedureResult(await context.woocommerce.cart.retrieve())\n\t\t}),\n\n\tupdate: woocommerceProcedure\n\t\t.input(type<UpdateCartInput>())\n\t\t.output(type<Cart>())\n\t\t.errors(procedureErrors<UpdateCartErrorCode>())\n\t\t.handler(async ({ input, context }) => {\n\t\t\treturn ensureProcedureResult(await context.woocommerce.cart.update(input))\n\t\t}),\n\n\titems: {\n\t\tadd: woocommerceProcedure\n\t\t\t.input(type<AddCartItemInput>())\n\t\t\t.output(type<Cart>())\n\t\t\t.errors(procedureErrors<AddCartItemErrorCode>())\n\t\t\t.handler(async ({ input, context }) => {\n\t\t\t\treturn ensureProcedureResult(await context.woocommerce.cart.items.add(input))\n\t\t\t}),\n\n\t\tupdate: woocommerceProcedure\n\t\t\t.input(type<UpdateCartItemInput>())\n\t\t\t.output(type<Cart>())\n\t\t\t.errors(procedureErrors<UpdateCartItemErrorCode>())\n\t\t\t.handler(async ({ input, context }) => {\n\t\t\t\treturn ensureProcedureResult(await context.woocommerce.cart.items.update(input))\n\t\t\t}),\n\n\t\tremove: woocommerceProcedure\n\t\t\t.input(type<RemoveCartItemInput>())\n\t\t\t.output(type<Cart>())\n\t\t\t.errors(procedureErrors<RemoveCartItemErrorCode>())\n\t\t\t.handler(async ({ input, context }) => {\n\t\t\t\treturn ensureProcedureResult(await context.woocommerce.cart.items.remove(input))\n\t\t\t}),\n\t},\n\n\tcoupons: {\n\t\tapply: woocommerceProcedure\n\t\t\t.input(type<ApplyCouponInput>())\n\t\t\t.output(type<Cart>())\n\t\t\t.errors(procedureErrors<ApplyCouponErrorCode>())\n\t\t\t.handler(async ({ input, context }) => {\n\t\t\t\treturn ensureProcedureResult(await context.woocommerce.cart.coupons.apply(input))\n\t\t\t}),\n\n\t\tremove: woocommerceProcedure\n\t\t\t.input(type<RemoveCouponInput>())\n\t\t\t.output(type<Cart>())\n\t\t\t.errors(procedureErrors<RemoveCouponErrorCode>())\n\t\t\t.handler(async ({ input, context }) => {\n\t\t\t\treturn ensureProcedureResult(await context.woocommerce.cart.coupons.remove(input))\n\t\t\t}),\n\t},\n}\n","import { ensureProcedureResult, type Kizlo, type } from \"kizlo\"\nimport { procedureErrors } from \"kizlo/extensions\"\nimport { woocommerceProcedure } from \"../client.extension\"\nimport type {\n\tCreateAddressErrorCode,\n\tCreateAddressInput,\n\tCreateAddressResult,\n\tCustomer,\n\tDeleteAddressErrorCode,\n\tDeleteAddressInput,\n\tDeleteAddressResult,\n\tRetrieveCustomerErrorCode,\n\tRetrieveCustomerResult,\n\tUpdateAddressErrorCode,\n\tUpdateAddressInput,\n\tUpdateAddressResult,\n} from \"./types\"\n\nexport class KizloCustomer {\n\tpublic readonly address: KizloAddress\n\n\tconstructor(private readonly kizlo: Kizlo) {\n\t\tthis.address = new KizloAddress(this.kizlo)\n\t}\n\n\tpublic async retrieve(): Promise<RetrieveCustomerResult> {\n\t\tconst response = await this.kizlo._.http.get<Customer, RetrieveCustomerErrorCode>(\"/customers\", {\n\t\t\tauth: true,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n}\n\nexport class KizloAddress {\n\tconstructor(private readonly kizlo: Kizlo) {}\n\n\tpublic async create(input: CreateAddressInput): Promise<CreateAddressResult> {\n\t\tconst response = await this.kizlo._.http.post<Customer, CreateAddressErrorCode>(\"/customers/addresses\", {\n\t\t\tauth: true,\n\t\t\tbody: input,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n\n\tpublic async update(input: UpdateAddressInput): Promise<UpdateAddressResult> {\n\t\tconst response = await this.kizlo._.http.put<Customer, UpdateAddressErrorCode>(`/customers/addresses/${input.id}`, {\n\t\t\tbody: input,\n\t\t\tauth: true,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n\n\tpublic async delete(input: DeleteAddressInput): Promise<DeleteAddressResult> {\n\t\tconst response = await this.kizlo._.http.delete<Customer, DeleteAddressErrorCode>(`/customers/addresses/${input.id}`, {\n\t\t\tauth: true,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n}\n\nexport const customer = {\n\tretrieve: woocommerceProcedure\n\t\t.output(type<Customer>())\n\t\t.errors(procedureErrors<RetrieveCustomerErrorCode>())\n\t\t.handler(async ({ context }) => {\n\t\t\treturn ensureProcedureResult(await context.woocommerce.customer.retrieve())\n\t\t}),\n\n\taddress: {\n\t\tcreate: woocommerceProcedure\n\t\t\t.input(type<CreateAddressInput>())\n\t\t\t.output(type<Customer>())\n\t\t\t.errors(procedureErrors<CreateAddressErrorCode>())\n\t\t\t.handler(async ({ input, context }) => {\n\t\t\t\treturn ensureProcedureResult(await context.woocommerce.customer.address.create(input))\n\t\t\t}),\n\n\t\tupdate: woocommerceProcedure\n\t\t\t.input(type<UpdateAddressInput>())\n\t\t\t.output(type<Customer>())\n\t\t\t.errors(procedureErrors<UpdateAddressErrorCode>())\n\t\t\t.handler(async ({ input, context }) => {\n\t\t\t\treturn ensureProcedureResult(await context.woocommerce.customer.address.update(input))\n\t\t\t}),\n\n\t\tdelete: woocommerceProcedure\n\t\t\t.input(type<UpdateAddressInput>())\n\t\t\t.output(type<Customer>())\n\t\t\t.errors(procedureErrors<DeleteAddressErrorCode>())\n\t\t\t.handler(async ({ input, context }) => {\n\t\t\t\treturn ensureProcedureResult(await context.woocommerce.customer.address.delete(input))\n\t\t\t}),\n\t},\n}\n","import { ensureProcedureResult, type Kizlo, type } from \"kizlo\"\nimport { procedureErrors } from \"kizlo/extensions\"\nimport { woocommerceProcedure } from \"../client.extension\"\nimport type {\n\tListOrderErrorCode,\n\tListOrderInput,\n\tListOrderResult,\n\tOrder,\n\tOrderList,\n\tRetrieveOrderErrorCode,\n\tRetrieveOrderInput,\n\tRetrieveOrderResult,\n} from \"./types\"\n\nexport class KizloOrder {\n\tconstructor(private readonly kizlo: Kizlo) {}\n\n\tpublic async retrieve(input: RetrieveOrderInput): Promise<RetrieveOrderResult> {\n\t\tconst response = await this.kizlo._.http.get<Order, RetrieveOrderErrorCode>(`/orders/${input.id}`, {\n\t\t\tauth: true,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n\n\tpublic async list(input: ListOrderInput): Promise<ListOrderResult> {\n\t\tconst response = await this.kizlo._.http.get<OrderList, ListOrderErrorCode>(\"/orders\", {\n\t\t\tauth: true,\n\t\t\tquery: input,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n}\n\nexport const orders = {\n\tretrieve: woocommerceProcedure\n\t\t.input(type<RetrieveOrderInput>())\n\t\t.output(type<Order>())\n\t\t.errors(procedureErrors<RetrieveOrderErrorCode>())\n\t\t.handler(async ({ input, context }) => {\n\t\t\treturn ensureProcedureResult(await context.woocommerce.orders.retrieve(input))\n\t\t}),\n\n\tlist: woocommerceProcedure\n\t\t.input(type<ListOrderInput>())\n\t\t.output(type<OrderList>())\n\t\t.errors(procedureErrors<ListOrderErrorCode>())\n\t\t.handler(async ({ input, context }) => {\n\t\t\treturn ensureProcedureResult(await context.woocommerce.orders.list(input))\n\t\t}),\n}\n","{\"cart\":{\"retrieve\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}},\"update\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}},\"items\":{\"add\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}},\"update\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}},\"remove\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}}},\"coupons\":{\"apply\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}},\"remove\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}}}},\"orders\":{\"retrieve\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}},\"list\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}}},\"customer\":{\"retrieve\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}},\"address\":{\"create\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}},\"update\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}},\"delete\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}}}},\"products\":{\"retrieve\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}},\"list\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}},\"filters\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}},\"categories\":{\"list\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}}},\"reviews\":{\"retrieve\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}},\"list\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}},\"create\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}}}},\"payment\":{\"confirm\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}},\"update\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}},\"methods\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{\"method\":\"GET\"}}},\"pay\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{}}},\"webhooks\":{\"~orpc\":{\"errorMap\":{},\"meta\":{},\"route\":{\"method\":\"POST\",\"path\":\"/payment/webhooks/{id}\",\"inputStructure\":\"detailed\"}}}}}","import { woocommerceRouter } from \"./client\"\nimport { createPaymentServerRouter } from \"./payment/client\"\nimport type { WooCommerceServerExtensionOptions } from \"./server.extension\"\n\nexport function createWoocommerceServerRouter(options?: WooCommerceServerExtensionOptions) {\n\treturn {\n\t\t...woocommerceRouter,\n\n\t\t/**\n\t\t * Omitting methods, pay and webhooks procedure to avoid calling it from rpc.\n\t\t */\n\t\tpayment: createPaymentServerRouter(options),\n\t}\n}\n\nexport type WooCommerceServerRouter = ReturnType<typeof createWoocommerceServerRouter>\n","import type { ServerExtension } from \"kizlo\"\nimport { createServerExtension, openApiProcedure, remoteProcedure } from \"kizlo/extensions\"\nimport { KizloWoocommerce } from \"./client\"\nimport type { PaymentAdapter } from \"./payment/types\"\nimport { createWoocommerceServerRouter, type WooCommerceServerRouter } from \"./server\"\n\nexport const woocommerceRemoteProcedure = remoteProcedure.use(\n\tremoteProcedure.middleware(({ context, next }) => {\n\t\tconst woocommerce = new KizloWoocommerce(context.kizlo)\n\t\treturn next({ context: { woocommerce } })\n\t}),\n)\n\nexport const woocommerceOpenApiProcedure = openApiProcedure.use(\n\topenApiProcedure.middleware(({ context, next }) => {\n\t\tconst woocommerce = new KizloWoocommerce(context.kizlo)\n\t\treturn next({ context: { woocommerce } })\n\t}),\n)\n\nexport type WooCommerceServerExtension = ServerExtension<\"woocommerce\", WooCommerceServerRouter>\n\nexport interface WooCommerceServerExtensionOptions {\n\tpaymentAdapters?: PaymentAdapter[]\n}\n\nexport function woocommerce(options?: WooCommerceServerExtensionOptions): WooCommerceServerExtension {\n\treturn createServerExtension({\n\t\tname: \"woocommerce\",\n\t\tinit() {\n\t\t\treturn createWoocommerceServerRouter(options)\n\t\t},\n\t})\n}\n","import {\n\tcreateRemoteFetchClient,\n\tcreateSafeClient,\n\tensureProcedureResult,\n\ttype Kizlo,\n\ttype RemoteClient,\n\ttype SafeClient,\n\ttype,\n} from \"kizlo\"\nimport { procedureErrors } from \"kizlo/extensions\"\nimport { woocommerceProcedure } from \"../client.extension\"\nimport contract from \"../generated/contract.server.json\"\nimport type { Order } from \"../order/types\"\nimport {\n\ttype WooCommerceServerExtensionOptions,\n\ttype WooCommerceServerRouter,\n\twoocommerceOpenApiProcedure,\n\twoocommerceRemoteProcedure,\n} from \"../server\"\nimport type {\n\tConfirmPaymentErrorCode,\n\tConfirmPaymentInput,\n\tConfirmPaymentResult,\n\tHandlePaymentWebhookInput,\n\tListPaymentMethodAdminInput,\n\tListPaymentMethodErrorCode,\n\tListPaymentMethodResult,\n\tPaymentAdapter,\n\tPaymentMethod,\n\tPayPaymentAdminInput,\n\tPayPaymentData,\n\tPayPaymentErrorCode,\n\tPayPaymentInput,\n\tPayPaymentResult,\n\tUpdatePaymentErrorCode,\n\tUpdatePaymentInput,\n\tUpdatePaymentResult,\n} from \"./types\"\n\nexport class KizloPayment {\n\tpublic readonly admin: KizloPaymentAdmin\n\tprivate readonly rpc: SafeClient<RemoteClient<WooCommerceServerRouter>>\n\n\tconstructor(private readonly kizlo: Kizlo) {\n\t\tthis.admin = new KizloPaymentAdmin(this.kizlo)\n\n\t\tthis.rpc = createSafeClient(\n\t\t\tcreateRemoteFetchClient<WooCommerceServerRouter>(contract as WooCommerceServerRouter, `${this.kizlo._.serverBaseUrl}/woocommerce`),\n\t\t)\n\t}\n\n\tpublic async methods(): Promise<ListPaymentMethodResult> {\n\t\tconst { error, data, isDefined } = await this.rpc.payment.methods()\n\t\tif (error) {\n\t\t\tif (isDefined) {\n\t\t\t\treturn this.kizlo._.http.error({\n\t\t\t\t\tcode: error.code,\n\t\t\t\t\tmessage: error.message,\n\t\t\t\t\tstatus: error.status,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthrow error\n\t\t}\n\t\treturn this.kizlo._.http.success(data)\n\t}\n\n\tpublic async pay(input: PayPaymentInput): Promise<PayPaymentResult> {\n\t\tconst { error, data, isDefined } = await this.rpc.payment.pay(input)\n\t\tif (error) {\n\t\t\tif (isDefined) {\n\t\t\t\treturn this.kizlo._.http.error({\n\t\t\t\t\tcode: error.code,\n\t\t\t\t\tmessage: error.message,\n\t\t\t\t\tstatus: error.status,\n\t\t\t\t})\n\t\t\t}\n\t\t\tthrow error\n\t\t}\n\t\treturn this.kizlo._.http.success(data)\n\t}\n}\n\nexport class KizloPaymentAdmin {\n\tconstructor(private readonly kizlo: Kizlo) {}\n\n\tpublic async confirm(input: ConfirmPaymentInput): Promise<ConfirmPaymentResult> {\n\t\tconst response = await this.kizlo._.http.post<Order, ConfirmPaymentErrorCode>(\"/payment\", {\n\t\t\tbody: input,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n\n\tpublic async update(input: UpdatePaymentInput): Promise<UpdatePaymentResult> {\n\t\tconst response = await this.kizlo._.http.put<Order, UpdatePaymentErrorCode>(`/payment/${input.order_id}`, {\n\t\t\tbody: input,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n\n\tpublic async methods(input: ListPaymentMethodAdminInput): Promise<ListPaymentMethodResult> {\n\t\tconst groups = new Map<string, PaymentAdapter[]>()\n\n\t\tfor (const adapter of input.adapters) {\n\t\t\tconst config = adapter\n\n\t\t\tif (!groups.has(config.type)) groups.set(config.type, [])\n\n\t\t\tgroups.get(config.type)?.push(config)\n\t\t}\n\n\t\tconst getPrioritizedAdapter = (group: PaymentAdapter[]): PaymentAdapter | null => {\n\t\t\tlet best: PaymentAdapter | null = null\n\n\t\t\tfor (const adapter of group) {\n\t\t\t\tif (!best || adapter.priority > best.priority) best = adapter\n\t\t\t}\n\n\t\t\treturn best\n\t\t}\n\n\t\tconst methods: PaymentMethod[] = []\n\n\t\tfor (const [, group] of groups) {\n\t\t\tconst selectedAdapters: PaymentAdapter[] = []\n\n\t\t\tconst combinableAdapters = group.filter((adapter) => adapter.isCombinable)\n\n\t\t\tif (combinableAdapters.length > 1) {\n\t\t\t\tfor (const adapter of combinableAdapters) selectedAdapters.push(adapter)\n\t\t\t} else {\n\t\t\t\tconst bestAdapter = getPrioritizedAdapter(group)\n\n\t\t\t\tif (bestAdapter) selectedAdapters.push(bestAdapter)\n\t\t\t}\n\n\t\t\tfor (const adapter of selectedAdapters) {\n\t\t\t\tconst eligibility = await adapter.eligibility?.(input.context)\n\n\t\t\t\tif (eligibility?.is_hidden) continue\n\n\t\t\t\tmethods.push({\n\t\t\t\t\tid: adapter.id,\n\t\t\t\t\ttype: adapter.type,\n\t\t\t\t\tname: eligibility?.name ?? adapter.name,\n\t\t\t\t\tis_disabled: eligibility?.is_disabled ?? false,\n\t\t\t\t\tdescription: eligibility?.description ?? adapter.description,\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tconst uniqueIds = new Set(methods.map((method) => method.id))\n\t\tif (uniqueIds.size !== methods.length) return this.kizlo._.http.error(\"PAYMENT_DUPLICATE_ADAPTERS\")\n\n\t\treturn this.kizlo._.http.success(methods)\n\t}\n\n\tpublic async pay(input: PayPaymentAdminInput): Promise<PayPaymentResult> {\n\t\tconst adapter = input.adapters.find((adp) => adp.id === input.payment_method_id)\n\t\tif (!adapter) return this.kizlo._.http.error(\"PAYMENT_ADAPTER_NOT_FOUND\")\n\n\t\tconst confirmResult = await this.confirm({\n\t\t\tuser_id: {} as never, // TODO\n\t\t\tpayment_method_id: adapter.id,\n\t\t\tpayment_method_name: adapter.name,\n\t\t\tpayment_method_type: adapter.type,\n\t\t})\n\t\tif (confirmResult.isError) return this.kizlo._.http.error(confirmResult.error)\n\n\t\tif (adapter.type === \"online\") {\n\t\t\tconst intent = await adapter.create({ order: confirmResult.data }, input.context)\n\t\t\tif (!intent || !intent.url) return this.kizlo._.http.error(\"PAYMENT_ADAPTER_NOT_FOUND\")\n\n\t\t\tconst updateResult = await this.update({\n\t\t\t\torder_id: confirmResult.data.id,\n\t\t\t\tpayment_status: intent.status,\n\t\t\t\tpayment_session_id: intent.id,\n\t\t\t\ttransaction_id: intent.transaction_id,\n\t\t\t\tpayment_url: intent.url,\n\t\t\t})\n\t\t\tif (updateResult.isError) return this.kizlo._.http.error(updateResult.error)\n\n\t\t\treturn this.kizlo._.http.success({ redirect_url: intent.url })\n\t\t}\n\n\t\treturn this.kizlo._.http.success({ redirect_url: \"\" })\n\t}\n\n\tpublic async handleWebhook(input: HandlePaymentWebhookInput) {\n\t\tconst adapter = input.adapters.find((a) => a.id === input.payment_method_id)\n\t\tif (!adapter || adapter.type !== \"online\") return this.kizlo._.http.error(\"PAYMENT_ADAPTER_NOT_FOUND\")\n\n\t\tconst data = await adapter.verify(input.context)\n\t\tif (!data) return this.kizlo._.http.error(\"UNAUTHORIZED\")\n\n\t\tconst updateResult = await this.update({ order_id: data.order_id, payment_status: data.status, transaction_id: data.transaction_id })\n\t\tif (updateResult.error) return this.kizlo._.http.error(updateResult.error)\n\n\t\treturn this.kizlo._.http.success({ success: true })\n\t}\n}\n\nexport const paymentRouter = {\n\tmethods: woocommerceProcedure\n\t\t.output(type<PaymentMethod[]>())\n\t\t.errors(procedureErrors<ListPaymentMethodErrorCode>())\n\t\t.handler(async ({ context }) => {\n\t\t\treturn ensureProcedureResult(await context.woocommerce.payment.methods())\n\t\t}),\n\n\tpay: woocommerceProcedure\n\t\t.input(type<PayPaymentInput>())\n\t\t.output(type<PayPaymentData>())\n\t\t.errors(procedureErrors<PayPaymentErrorCode>())\n\t\t.handler(async ({ input, context }) => {\n\t\t\treturn ensureProcedureResult(await context.woocommerce.payment.pay(input))\n\t\t}),\n}\n\nexport function createPaymentServerRouter(options?: WooCommerceServerExtensionOptions) {\n\treturn {\n\t\tconfirm: woocommerceProcedure\n\t\t\t.input(type<ConfirmPaymentInput>())\n\t\t\t.output(type<Order>())\n\t\t\t.errors(procedureErrors<ConfirmPaymentErrorCode>())\n\t\t\t.handler(async ({ input, context }) => {\n\t\t\t\treturn ensureProcedureResult(await context.woocommerce.payment.admin.confirm(input))\n\t\t\t}),\n\n\t\tupdate: woocommerceProcedure\n\t\t\t.input(type<UpdatePaymentInput>())\n\t\t\t.output(type<Order>())\n\t\t\t.errors(procedureErrors<UpdatePaymentErrorCode>())\n\t\t\t.handler(async ({ input, context }) => {\n\t\t\t\treturn ensureProcedureResult(await context.woocommerce.payment.admin.update(input))\n\t\t\t}),\n\n\t\tmethods: woocommerceRemoteProcedure\n\t\t\t.route({ method: \"GET\" })\n\t\t\t.output(type<PaymentMethod[]>())\n\t\t\t.errors(procedureErrors<ListPaymentMethodErrorCode>())\n\t\t\t.handler(async ({ context }) => {\n\t\t\t\treturn ensureProcedureResult(\n\t\t\t\t\tawait context.woocommerce.payment.admin.methods({\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tadapters: options?.paymentAdapters ?? [],\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t}),\n\n\t\tpay: woocommerceRemoteProcedure\n\t\t\t.input(type<PayPaymentInput>())\n\t\t\t.output(type<PayPaymentData>())\n\t\t\t.errors(procedureErrors<PayPaymentErrorCode>())\n\t\t\t.handler(async ({ input, context }) => {\n\t\t\t\treturn ensureProcedureResult(\n\t\t\t\t\tawait context.woocommerce.payment.admin.pay({\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tadapters: options?.paymentAdapters ?? [],\n\t\t\t\t\t\tpayment_method_id: input.payment_method_id,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t}),\n\n\t\twebhooks: woocommerceOpenApiProcedure\n\t\t\t.route({ method: \"POST\", path: \"/payment/webhooks/{id}\", inputStructure: \"detailed\" })\n\t\t\t.input(type<{ params: { id: string } }>())\n\t\t\t.handler(async ({ input, context }) => {\n\t\t\t\treturn ensureProcedureResult(\n\t\t\t\t\tcontext.woocommerce.payment.admin.handleWebhook({\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tpayment_method_id: input.params.id,\n\t\t\t\t\t\tadapters: options?.paymentAdapters ?? [],\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t}),\n\t}\n}\n\nexport type PaymentClientRouter = typeof paymentRouter\n\nexport type PaymentServerRouter = ReturnType<typeof createPaymentServerRouter>\n","import { ensureProcedureResult, type Kizlo, type } from \"kizlo\"\nimport { procedureErrors } from \"kizlo/extensions\"\nimport { woocommerceProcedure } from \"../client.extension\"\nimport type { ListCategoryResult, ListProductCategoryErrorCode, ListProductCategoryInput, ProductCategoryList } from \"./category.types\"\n\nexport class KizloProductCategory {\n\tconstructor(private readonly kizlo: Kizlo) {}\n\n\tpublic async list(input?: ListProductCategoryInput): Promise<ListCategoryResult> {\n\t\tconst response = await this.kizlo._.http.get<ProductCategoryList, ListProductCategoryErrorCode>(\"/products/categories\", {\n\t\t\tquery: input,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n}\n\nexport const categories = {\n\tlist: woocommerceProcedure\n\t\t.input(type<ListProductCategoryInput | undefined>())\n\t\t.output(type<ProductCategoryList>())\n\t\t.errors(procedureErrors<ListProductCategoryErrorCode>())\n\t\t.handler(async ({ input, context }) => {\n\t\t\treturn ensureProcedureResult(await context.woocommerce.products.categories.list(input))\n\t\t}),\n}\n","import type {\n\tCreateProductReviewErrorCode,\n\tCreateProductReviewInput,\n\tListProductReviewErrorCode,\n\tListProductReviewInput,\n\tRetrieveProductReviewErrorCode,\n\tRetrieveProductReviewInput,\n} from \"@kizlo/contract\"\nimport { ensureProcedureResult, type Kizlo, type } from \"kizlo\"\nimport { procedureErrors } from \"kizlo/extensions\"\nimport { woocommerceProcedure } from \"../client.extension\"\nimport type { CreateReviewResult, ListReviewResult, ProductReview, RetrieveReviewResult, ReviewList } from \"./review.types\"\n\nexport class KizloProductReview {\n\tconstructor(private readonly kizlo: Kizlo) {}\n\n\tpublic async retrieve(input: RetrieveProductReviewInput): Promise<RetrieveReviewResult> {\n\t\tconst response = await this.kizlo._.http.get<ProductReview, RetrieveProductReviewErrorCode>(`/products/reviews/${input.id}`, {\n\t\t\tquery: input,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n\n\tpublic async list(input?: ListProductReviewInput): Promise<ListReviewResult> {\n\t\tconst response = await this.kizlo._.http.get<ReviewList, ListProductReviewErrorCode>(\"/products/reviews\", {\n\t\t\tquery: input,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n\n\tpublic async create(input: CreateProductReviewInput): Promise<CreateReviewResult> {\n\t\tconst response = await this.kizlo._.http.post<ProductReview, CreateProductReviewErrorCode>(\"/products/reviews\", {\n\t\t\tauth: true,\n\t\t\tbody: input,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n}\n\nexport const reviews = {\n\tretrieve: woocommerceProcedure\n\t\t.input(type<RetrieveProductReviewInput>())\n\t\t.output(type<ProductReview>())\n\t\t.errors(procedureErrors<RetrieveProductReviewErrorCode>())\n\t\t.handler(async ({ input, context }) => {\n\t\t\treturn ensureProcedureResult(await context.woocommerce.products.reviews.retrieve(input))\n\t\t}),\n\n\tlist: woocommerceProcedure\n\t\t.input(type<ListProductReviewInput | undefined>())\n\t\t.output(type<ReviewList>())\n\t\t.errors(procedureErrors<ListProductReviewErrorCode>())\n\t\t.handler(async ({ input, context }) => {\n\t\t\treturn ensureProcedureResult(await context.woocommerce.products.reviews.list(input))\n\t\t}),\n\n\tcreate: woocommerceProcedure\n\t\t.input(type<CreateProductReviewInput>())\n\t\t.output(type<ProductReview>())\n\t\t.errors(procedureErrors<CreateProductReviewErrorCode>())\n\t\t.handler(async ({ input, context }) => {\n\t\t\treturn ensureProcedureResult(await context.woocommerce.products.reviews.create(input))\n\t\t}),\n}\n","import type { Product } from \"@kizlo/contract\"\nimport { ensureProcedureResult, type Kizlo, type } from \"kizlo\"\nimport { procedureErrors } from \"kizlo/extensions\"\nimport { woocommerceProcedure } from \"../client.extension\"\nimport { categories, KizloProductCategory } from \"./category\"\nimport type {\n\tListProductErrorCode,\n\tListProductInput,\n\tListProductResult,\n\tProductFilters,\n\tProductList,\n\tRetrieveProductErrorCode,\n\tRetrieveProductFiltersErrorCode,\n\tRetrieveProductFiltersInput,\n\tRetrieveProductFiltersResult,\n\tRetrieveProductInput,\n\tRetrieveProductResult,\n} from \"./product.types\"\nimport { KizloProductReview, reviews } from \"./review\"\n\nexport class KizloProduct {\n\tpublic readonly reviews: KizloProductReview\n\tpublic readonly categories: KizloProductCategory\n\n\tconstructor(private readonly kizlo: Kizlo) {\n\t\tthis.reviews = new KizloProductReview(this.kizlo)\n\t\tthis.categories = new KizloProductCategory(this.kizlo)\n\t}\n\n\tpublic async retrieve(input: RetrieveProductInput): Promise<RetrieveProductResult> {\n\t\tconst response = await this.kizlo._.http.get<Product, RetrieveProductErrorCode>(`/products/${input.identifier}`, {\n\t\t\tquery: { preview_token: input.preview_token },\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n\n\tpublic async list(input?: ListProductInput): Promise<ListProductResult> {\n\t\tconst response = await this.kizlo._.http.get<ProductList, ListProductErrorCode>(\"/products\", {\n\t\t\tquery: input,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n\n\tpublic async filters(input?: RetrieveProductFiltersInput): Promise<RetrieveProductFiltersResult> {\n\t\tconst response = await this.kizlo._.http.get<ProductFilters, RetrieveProductFiltersErrorCode>(\"/products/filters\", {\n\t\t\tquery: input,\n\t\t})\n\t\tif (response.error) return this.kizlo._.http.error(response.error)\n\t\treturn this.kizlo._.http.success(response.data)\n\t}\n}\n\nexport const products = {\n\tretrieve: woocommerceProcedure\n\t\t.input(type<RetrieveProductInput>())\n\t\t.output(type<Product>())\n\t\t.errors(procedureErrors<RetrieveProductErrorCode>())\n\t\t.handler(async ({ input, context }) => {\n\t\t\treturn ensureProcedureResult(await context.woocommerce.products.retrieve(input))\n\t\t}),\n\n\tlist: woocommerceProcedure\n\t\t.input(type<ListProductInput | undefined>())\n\t\t.output(type<ProductList>())\n\t\t.errors(procedureErrors<ListProductErrorCode>())\n\t\t.handler(async ({ input, context }) => {\n\t\t\treturn ensureProcedureResult(await context.woocommerce.products.list(input))\n\t\t}),\n\n\tfilters: woocommerceProcedure\n\t\t.input(type<RetrieveProductFiltersInput | undefined>())\n\t\t.output(type<ProductFilters>())\n\t\t.errors(procedureErrors<RetrieveProductFiltersErrorCode>())\n\t\t.handler(async ({ input, context }) => {\n\t\t\treturn ensureProcedureResult(await context.woocommerce.products.filters(input))\n\t\t}),\n\n\tcategories,\n\treviews,\n}\n","import type { Kizlo } from \"kizlo\"\nimport { cart, KizloCart } from \"./cart/client\"\nimport { customer, KizloCustomer } from \"./customer/client\"\nimport { KizloOrder, orders } from \"./order/client\"\nimport { KizloPayment, paymentRouter } from \"./payment/client\"\nimport { KizloProduct, products } from \"./product/product\"\n\nexport class KizloWoocommerce {\n\tpublic readonly cart: KizloCart\n\tpublic readonly orders: KizloOrder\n\tpublic readonly customer: KizloCustomer\n\tpublic readonly products: KizloProduct\n\tpublic readonly payment: KizloPayment\n\n\tconstructor(private readonly kizlo: Kizlo) {\n\t\tthis.cart = new KizloCart(this.kizlo)\n\t\tthis.orders = new KizloOrder(this.kizlo)\n\t\tthis.customer = new KizloCustomer(this.kizlo)\n\t\tthis.products = new KizloProduct(this.kizlo)\n\t\tthis.payment = new KizloPayment(this.kizlo)\n\t}\n}\n\nexport const woocommerceRouter = {\n\tcart,\n\torders,\n\tcustomer,\n\tproducts,\n\tpayment: paymentRouter,\n}\nexport type WooCommerceRouter = typeof woocommerceRouter\n"],"mappings":";;;;AAQA,MAAa,uBAAuB,UAAU,IAC7C,UAAU,YAAY,EAAE,SAAS,WAAW;AAE3C,QAAO,KAAK,EAAE,SAAS,EAAE,aADL,IAAI,iBAAiB,QAAQ,MAAM,EACjB,EAAE,CAAC;EACxC,CACF;AAID,SAAgBA,gBAA0C;AACzD,QAAO,sBAAsB;EAC5B,MAAM;EACN,MAAM;EACN,OAAO;AACN,UAAO;;EAER,CAAC;;;;;ACGH,IAAa,gBAAb,MAA2B;CAC1B,YAAY,AAAiBC,OAAc;EAAd;;CAE7B,MAAa,IAAI,OAAqD;EACrE,MAAM,WAAW,MAAM,KAAK,MAAM,EAAE,KAAK,KAAiC,eAAe;GACxF,MAAM;GACN,MAAM;GACN,CAAC;AACF,MAAI,SAAS,MAAO,QAAO,KAAK,MAAM,EAAE,KAAK,MAAM,SAAS,MAAM;AAClE,SAAO,KAAK,MAAM,EAAE,KAAK,QAAQ,SAAS,KAAK;;CAGhD,MAAa,OAAO,OAA2D;EAC9E,MAAM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