@voyantjs/products 0.52.2 → 0.52.4
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/action-ledger-drift.d.ts +29 -0
- package/dist/action-ledger-drift.d.ts.map +1 -0
- package/dist/action-ledger-drift.js +335 -0
- package/dist/action-ledger.d.ts +104 -0
- package/dist/action-ledger.d.ts.map +1 -0
- package/dist/action-ledger.js +100 -0
- package/dist/booking-extension.d.ts +3 -3
- package/dist/events.d.ts +1 -1
- package/dist/events.d.ts.map +1 -1
- package/dist/route-env.d.ts +22 -0
- package/dist/route-env.d.ts.map +1 -0
- package/dist/route-env.js +1 -0
- package/dist/routes-associations.d.ts +164 -0
- package/dist/routes-associations.d.ts.map +1 -0
- package/dist/routes-associations.js +100 -0
- package/dist/routes-catalog.d.ts +436 -0
- package/dist/routes-catalog.d.ts.map +1 -0
- package/dist/routes-catalog.js +104 -0
- package/dist/routes-configuration.d.ts +773 -0
- package/dist/routes-configuration.d.ts.map +1 -0
- package/dist/routes-configuration.js +364 -0
- package/dist/routes-core.d.ts +302 -0
- package/dist/routes-core.d.ts.map +1 -0
- package/dist/routes-core.js +79 -0
- package/dist/routes-itinerary.d.ts +614 -0
- package/dist/routes-itinerary.d.ts.map +1 -0
- package/dist/routes-itinerary.js +309 -0
- package/dist/routes-maintenance.d.ts +32 -0
- package/dist/routes-maintenance.d.ts.map +1 -0
- package/dist/routes-maintenance.js +14 -0
- package/dist/routes-media.d.ts +634 -0
- package/dist/routes-media.d.ts.map +1 -0
- package/dist/routes-media.js +245 -0
- package/dist/routes-merchandising.d.ts +1108 -0
- package/dist/routes-merchandising.d.ts.map +1 -0
- package/dist/routes-merchandising.js +376 -0
- package/dist/routes-options.d.ts +363 -0
- package/dist/routes-options.d.ts.map +1 -0
- package/dist/routes-options.js +173 -0
- package/dist/routes-public.d.ts +4 -4
- package/dist/routes-translations.d.ts +477 -0
- package/dist/routes-translations.d.ts.map +1 -0
- package/dist/routes-translations.js +258 -0
- package/dist/routes.d.ts +417 -355
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +21 -1133
- package/dist/schema-core.d.ts +3 -3
- package/dist/schema-itinerary.d.ts +1 -1
- package/dist/schema-settings.d.ts +4 -4
- package/dist/service-catalog.d.ts +2 -2
- package/dist/service-public.d.ts +4 -4
- package/dist/service.d.ts +225 -97
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +91 -0
- package/dist/tasks/brochures.d.ts +1 -1
- package/dist/validation-catalog.d.ts +10 -10
- package/dist/validation-config.d.ts +17 -17
- package/dist/validation-content.d.ts +26 -26
- package/dist/validation-core.d.ts +21 -21
- package/dist/validation-public.d.ts +25 -25
- package/dist/validation-shared.d.ts +11 -11
- package/package.json +13 -7
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import type { Env } from "./route-env.js";
|
|
2
|
+
export declare const productAssociationRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
3
|
+
"/:id/categories": {
|
|
4
|
+
$get: {
|
|
5
|
+
input: {
|
|
6
|
+
param: {
|
|
7
|
+
id: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
output: {
|
|
11
|
+
data: {
|
|
12
|
+
id: string;
|
|
13
|
+
parentId: string | null;
|
|
14
|
+
name: string;
|
|
15
|
+
slug: string;
|
|
16
|
+
description: string | null;
|
|
17
|
+
sortOrder: number;
|
|
18
|
+
active: boolean;
|
|
19
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
20
|
+
metadata: {
|
|
21
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
22
|
+
} | null;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
}[];
|
|
26
|
+
};
|
|
27
|
+
outputFormat: "json";
|
|
28
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
} & {
|
|
32
|
+
"/:id/categories": {
|
|
33
|
+
$post: {
|
|
34
|
+
input: {
|
|
35
|
+
param: {
|
|
36
|
+
id: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
output: {
|
|
40
|
+
error: string;
|
|
41
|
+
};
|
|
42
|
+
outputFormat: "json";
|
|
43
|
+
status: 409;
|
|
44
|
+
} | {
|
|
45
|
+
input: {
|
|
46
|
+
param: {
|
|
47
|
+
id: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
output: {
|
|
51
|
+
success: true;
|
|
52
|
+
};
|
|
53
|
+
outputFormat: "json";
|
|
54
|
+
status: 201;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
} & {
|
|
58
|
+
"/:id/categories/:categoryId": {
|
|
59
|
+
$delete: {
|
|
60
|
+
input: {
|
|
61
|
+
param: {
|
|
62
|
+
id: string;
|
|
63
|
+
} & {
|
|
64
|
+
categoryId: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
output: {
|
|
68
|
+
error: string;
|
|
69
|
+
};
|
|
70
|
+
outputFormat: "json";
|
|
71
|
+
status: 404;
|
|
72
|
+
} | {
|
|
73
|
+
input: {
|
|
74
|
+
param: {
|
|
75
|
+
id: string;
|
|
76
|
+
} & {
|
|
77
|
+
categoryId: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
output: {
|
|
81
|
+
success: true;
|
|
82
|
+
};
|
|
83
|
+
outputFormat: "json";
|
|
84
|
+
status: 200;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
} & {
|
|
88
|
+
"/:id/tags": {
|
|
89
|
+
$get: {
|
|
90
|
+
input: {
|
|
91
|
+
param: {
|
|
92
|
+
id: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
output: {
|
|
96
|
+
data: {
|
|
97
|
+
id: string;
|
|
98
|
+
name: string;
|
|
99
|
+
createdAt: string;
|
|
100
|
+
updatedAt: string;
|
|
101
|
+
}[];
|
|
102
|
+
};
|
|
103
|
+
outputFormat: "json";
|
|
104
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
} & {
|
|
108
|
+
"/:id/tags": {
|
|
109
|
+
$post: {
|
|
110
|
+
input: {
|
|
111
|
+
param: {
|
|
112
|
+
id: string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
output: {
|
|
116
|
+
error: string;
|
|
117
|
+
};
|
|
118
|
+
outputFormat: "json";
|
|
119
|
+
status: 409;
|
|
120
|
+
} | {
|
|
121
|
+
input: {
|
|
122
|
+
param: {
|
|
123
|
+
id: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
output: {
|
|
127
|
+
success: true;
|
|
128
|
+
};
|
|
129
|
+
outputFormat: "json";
|
|
130
|
+
status: 201;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
} & {
|
|
134
|
+
"/:id/tags/:tagId": {
|
|
135
|
+
$delete: {
|
|
136
|
+
input: {
|
|
137
|
+
param: {
|
|
138
|
+
id: string;
|
|
139
|
+
} & {
|
|
140
|
+
tagId: string;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
output: {
|
|
144
|
+
error: string;
|
|
145
|
+
};
|
|
146
|
+
outputFormat: "json";
|
|
147
|
+
status: 404;
|
|
148
|
+
} | {
|
|
149
|
+
input: {
|
|
150
|
+
param: {
|
|
151
|
+
id: string;
|
|
152
|
+
} & {
|
|
153
|
+
tagId: string;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
output: {
|
|
157
|
+
success: true;
|
|
158
|
+
};
|
|
159
|
+
outputFormat: "json";
|
|
160
|
+
status: 200;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
}, "/", "/:id/tags/:tagId">;
|
|
164
|
+
//# sourceMappingURL=routes-associations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes-associations.d.ts","sourceRoot":"","sources":["../src/routes-associations.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAGzC,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAmHjC,CAAA"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { parseJsonBody } from "@voyantjs/hono";
|
|
2
|
+
import { Hono } from "hono";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { appendProductMutationLedgerEntry, changedMutationFields } from "./action-ledger.js";
|
|
5
|
+
import { emitProductContentChanged } from "./events.js";
|
|
6
|
+
import { productsService } from "./service.js";
|
|
7
|
+
export const productAssociationRoutes = new Hono()
|
|
8
|
+
// ==========================================================================
|
|
9
|
+
// Product <-> Category associations
|
|
10
|
+
// ==========================================================================
|
|
11
|
+
.get("/:id/categories", async (c) => {
|
|
12
|
+
return c.json({
|
|
13
|
+
data: await productsService.listProductCategories_(c.get("db"), c.req.param("id")),
|
|
14
|
+
});
|
|
15
|
+
})
|
|
16
|
+
.post("/:id/categories", async (c) => {
|
|
17
|
+
const productId = c.req.param("id");
|
|
18
|
+
const body = await parseJsonBody(c, z.object({
|
|
19
|
+
categoryId: z.string(),
|
|
20
|
+
sortOrder: z.number().optional(),
|
|
21
|
+
}));
|
|
22
|
+
const { categoryId, sortOrder } = body;
|
|
23
|
+
const row = await productsService.addProductToCategory(c.get("db"), productId, categoryId, sortOrder);
|
|
24
|
+
if (!row) {
|
|
25
|
+
return c.json({ error: "Already assigned or not found" }, 409);
|
|
26
|
+
}
|
|
27
|
+
await appendProductMutationLedgerEntry(c, {
|
|
28
|
+
action: "create",
|
|
29
|
+
productId,
|
|
30
|
+
changedFields: changedMutationFields(body, null, row),
|
|
31
|
+
subject: "product category link",
|
|
32
|
+
actionName: "product.category_link.create",
|
|
33
|
+
routeOrToolName: "products.category_link.create",
|
|
34
|
+
});
|
|
35
|
+
await emitProductContentChanged(c.get("eventBus"), { id: productId, axis: "category" });
|
|
36
|
+
return c.json({ success: true }, 201);
|
|
37
|
+
})
|
|
38
|
+
.delete("/:id/categories/:categoryId", async (c) => {
|
|
39
|
+
const productId = c.req.param("id");
|
|
40
|
+
const row = await productsService.removeProductFromCategory(c.get("db"), productId, c.req.param("categoryId"));
|
|
41
|
+
if (!row) {
|
|
42
|
+
return c.json({ error: "Association not found" }, 404);
|
|
43
|
+
}
|
|
44
|
+
await appendProductMutationLedgerEntry(c, {
|
|
45
|
+
action: "delete",
|
|
46
|
+
productId,
|
|
47
|
+
changedFields: [],
|
|
48
|
+
subject: "product category link",
|
|
49
|
+
actionName: "product.category_link.delete",
|
|
50
|
+
routeOrToolName: "products.category_link.delete",
|
|
51
|
+
});
|
|
52
|
+
await emitProductContentChanged(c.get("eventBus"), { id: productId, axis: "category" });
|
|
53
|
+
return c.json({ success: true }, 200);
|
|
54
|
+
})
|
|
55
|
+
// ==========================================================================
|
|
56
|
+
// Product <-> Tag associations
|
|
57
|
+
// ==========================================================================
|
|
58
|
+
.get("/:id/tags", async (c) => {
|
|
59
|
+
return c.json({
|
|
60
|
+
data: await productsService.listProductTags_(c.get("db"), c.req.param("id")),
|
|
61
|
+
});
|
|
62
|
+
})
|
|
63
|
+
.post("/:id/tags", async (c) => {
|
|
64
|
+
const productId = c.req.param("id");
|
|
65
|
+
const body = await parseJsonBody(c, z.object({
|
|
66
|
+
tagId: z.string(),
|
|
67
|
+
}));
|
|
68
|
+
const { tagId } = body;
|
|
69
|
+
const row = await productsService.addProductTag(c.get("db"), productId, tagId);
|
|
70
|
+
if (!row) {
|
|
71
|
+
return c.json({ error: "Already assigned or not found" }, 409);
|
|
72
|
+
}
|
|
73
|
+
await appendProductMutationLedgerEntry(c, {
|
|
74
|
+
action: "create",
|
|
75
|
+
productId,
|
|
76
|
+
changedFields: changedMutationFields(body, null, row),
|
|
77
|
+
subject: "product tag link",
|
|
78
|
+
actionName: "product.tag_link.create",
|
|
79
|
+
routeOrToolName: "products.tag_link.create",
|
|
80
|
+
});
|
|
81
|
+
await emitProductContentChanged(c.get("eventBus"), { id: productId, axis: "tag" });
|
|
82
|
+
return c.json({ success: true }, 201);
|
|
83
|
+
})
|
|
84
|
+
.delete("/:id/tags/:tagId", async (c) => {
|
|
85
|
+
const productId = c.req.param("id");
|
|
86
|
+
const row = await productsService.removeProductTag(c.get("db"), productId, c.req.param("tagId"));
|
|
87
|
+
if (!row) {
|
|
88
|
+
return c.json({ error: "Association not found" }, 404);
|
|
89
|
+
}
|
|
90
|
+
await appendProductMutationLedgerEntry(c, {
|
|
91
|
+
action: "delete",
|
|
92
|
+
productId,
|
|
93
|
+
changedFields: [],
|
|
94
|
+
subject: "product tag link",
|
|
95
|
+
actionName: "product.tag_link.delete",
|
|
96
|
+
routeOrToolName: "products.tag_link.delete",
|
|
97
|
+
});
|
|
98
|
+
await emitProductContentChanged(c.get("eventBus"), { id: productId, axis: "tag" });
|
|
99
|
+
return c.json({ success: true }, 200);
|
|
100
|
+
});
|
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
import type { Env } from "./route-env.js";
|
|
2
|
+
export declare const productCatalogRoutes: import("hono/hono-base").HonoBase<Env, {
|
|
3
|
+
"/product-types": {
|
|
4
|
+
$get: {
|
|
5
|
+
input: {};
|
|
6
|
+
output: {
|
|
7
|
+
data: {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
code: string;
|
|
11
|
+
description: string | null;
|
|
12
|
+
sortOrder: number;
|
|
13
|
+
active: boolean;
|
|
14
|
+
metadata: {
|
|
15
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
16
|
+
} | null;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
updatedAt: string;
|
|
19
|
+
}[];
|
|
20
|
+
total: number;
|
|
21
|
+
limit: number;
|
|
22
|
+
offset: number;
|
|
23
|
+
};
|
|
24
|
+
outputFormat: "json";
|
|
25
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
} & {
|
|
29
|
+
"/product-types/:typeId": {
|
|
30
|
+
$get: {
|
|
31
|
+
input: {
|
|
32
|
+
param: {
|
|
33
|
+
typeId: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
output: {
|
|
37
|
+
error: string;
|
|
38
|
+
};
|
|
39
|
+
outputFormat: "json";
|
|
40
|
+
status: 404;
|
|
41
|
+
} | {
|
|
42
|
+
input: {
|
|
43
|
+
param: {
|
|
44
|
+
typeId: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
output: {
|
|
48
|
+
data: {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
code: string;
|
|
52
|
+
description: string | null;
|
|
53
|
+
sortOrder: number;
|
|
54
|
+
active: boolean;
|
|
55
|
+
metadata: {
|
|
56
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
57
|
+
} | null;
|
|
58
|
+
createdAt: string;
|
|
59
|
+
updatedAt: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
outputFormat: "json";
|
|
63
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
} & {
|
|
67
|
+
"/product-types": {
|
|
68
|
+
$post: {
|
|
69
|
+
input: {};
|
|
70
|
+
output: {
|
|
71
|
+
data: {
|
|
72
|
+
name: string;
|
|
73
|
+
id: string;
|
|
74
|
+
description: string | null;
|
|
75
|
+
createdAt: string;
|
|
76
|
+
active: boolean;
|
|
77
|
+
updatedAt: string;
|
|
78
|
+
code: string;
|
|
79
|
+
sortOrder: number;
|
|
80
|
+
metadata: {
|
|
81
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
82
|
+
} | null;
|
|
83
|
+
} | undefined;
|
|
84
|
+
};
|
|
85
|
+
outputFormat: "json";
|
|
86
|
+
status: 201;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
} & {
|
|
90
|
+
"/product-types/:typeId": {
|
|
91
|
+
$patch: {
|
|
92
|
+
input: {
|
|
93
|
+
param: {
|
|
94
|
+
typeId: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
output: {
|
|
98
|
+
error: string;
|
|
99
|
+
};
|
|
100
|
+
outputFormat: "json";
|
|
101
|
+
status: 404;
|
|
102
|
+
} | {
|
|
103
|
+
input: {
|
|
104
|
+
param: {
|
|
105
|
+
typeId: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
output: {
|
|
109
|
+
data: {
|
|
110
|
+
id: string;
|
|
111
|
+
name: string;
|
|
112
|
+
code: string;
|
|
113
|
+
description: string | null;
|
|
114
|
+
sortOrder: number;
|
|
115
|
+
active: boolean;
|
|
116
|
+
metadata: {
|
|
117
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
118
|
+
} | null;
|
|
119
|
+
createdAt: string;
|
|
120
|
+
updatedAt: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
outputFormat: "json";
|
|
124
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
} & {
|
|
128
|
+
"/product-types/:typeId": {
|
|
129
|
+
$delete: {
|
|
130
|
+
input: {
|
|
131
|
+
param: {
|
|
132
|
+
typeId: string;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
output: {
|
|
136
|
+
error: string;
|
|
137
|
+
};
|
|
138
|
+
outputFormat: "json";
|
|
139
|
+
status: 404;
|
|
140
|
+
} | {
|
|
141
|
+
input: {
|
|
142
|
+
param: {
|
|
143
|
+
typeId: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
output: {
|
|
147
|
+
success: true;
|
|
148
|
+
};
|
|
149
|
+
outputFormat: "json";
|
|
150
|
+
status: 200;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
} & {
|
|
154
|
+
"/product-categories": {
|
|
155
|
+
$get: {
|
|
156
|
+
input: {};
|
|
157
|
+
output: {
|
|
158
|
+
data: {
|
|
159
|
+
id: string;
|
|
160
|
+
parentId: string | null;
|
|
161
|
+
name: string;
|
|
162
|
+
slug: string;
|
|
163
|
+
description: string | null;
|
|
164
|
+
sortOrder: number;
|
|
165
|
+
active: boolean;
|
|
166
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
167
|
+
metadata: {
|
|
168
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
169
|
+
} | null;
|
|
170
|
+
createdAt: string;
|
|
171
|
+
updatedAt: string;
|
|
172
|
+
}[];
|
|
173
|
+
total: number;
|
|
174
|
+
limit: number;
|
|
175
|
+
offset: number;
|
|
176
|
+
};
|
|
177
|
+
outputFormat: "json";
|
|
178
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
} & {
|
|
182
|
+
"/product-categories/:categoryId": {
|
|
183
|
+
$get: {
|
|
184
|
+
input: {
|
|
185
|
+
param: {
|
|
186
|
+
categoryId: string;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
output: {
|
|
190
|
+
error: string;
|
|
191
|
+
};
|
|
192
|
+
outputFormat: "json";
|
|
193
|
+
status: 404;
|
|
194
|
+
} | {
|
|
195
|
+
input: {
|
|
196
|
+
param: {
|
|
197
|
+
categoryId: string;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
output: {
|
|
201
|
+
data: {
|
|
202
|
+
id: string;
|
|
203
|
+
parentId: string | null;
|
|
204
|
+
name: string;
|
|
205
|
+
slug: string;
|
|
206
|
+
description: string | null;
|
|
207
|
+
sortOrder: number;
|
|
208
|
+
active: boolean;
|
|
209
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
210
|
+
metadata: {
|
|
211
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
212
|
+
} | null;
|
|
213
|
+
createdAt: string;
|
|
214
|
+
updatedAt: string;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
outputFormat: "json";
|
|
218
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
} & {
|
|
222
|
+
"/product-categories": {
|
|
223
|
+
$post: {
|
|
224
|
+
input: {};
|
|
225
|
+
output: {
|
|
226
|
+
data: {
|
|
227
|
+
name: string;
|
|
228
|
+
id: string;
|
|
229
|
+
description: string | null;
|
|
230
|
+
createdAt: string;
|
|
231
|
+
active: boolean;
|
|
232
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
233
|
+
updatedAt: string;
|
|
234
|
+
sortOrder: number;
|
|
235
|
+
slug: string;
|
|
236
|
+
metadata: {
|
|
237
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
238
|
+
} | null;
|
|
239
|
+
parentId: string | null;
|
|
240
|
+
} | undefined;
|
|
241
|
+
};
|
|
242
|
+
outputFormat: "json";
|
|
243
|
+
status: 201;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
} & {
|
|
247
|
+
"/product-categories/:categoryId": {
|
|
248
|
+
$patch: {
|
|
249
|
+
input: {
|
|
250
|
+
param: {
|
|
251
|
+
categoryId: string;
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
output: {
|
|
255
|
+
error: string;
|
|
256
|
+
};
|
|
257
|
+
outputFormat: "json";
|
|
258
|
+
status: 404;
|
|
259
|
+
} | {
|
|
260
|
+
input: {
|
|
261
|
+
param: {
|
|
262
|
+
categoryId: string;
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
output: {
|
|
266
|
+
data: {
|
|
267
|
+
id: string;
|
|
268
|
+
parentId: string | null;
|
|
269
|
+
name: string;
|
|
270
|
+
slug: string;
|
|
271
|
+
description: string | null;
|
|
272
|
+
sortOrder: number;
|
|
273
|
+
active: boolean;
|
|
274
|
+
customerPaymentPolicy: import("hono/utils/types").JSONValue;
|
|
275
|
+
metadata: {
|
|
276
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
277
|
+
} | null;
|
|
278
|
+
createdAt: string;
|
|
279
|
+
updatedAt: string;
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
outputFormat: "json";
|
|
283
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
} & {
|
|
287
|
+
"/product-categories/:categoryId": {
|
|
288
|
+
$delete: {
|
|
289
|
+
input: {
|
|
290
|
+
param: {
|
|
291
|
+
categoryId: string;
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
output: {
|
|
295
|
+
error: string;
|
|
296
|
+
};
|
|
297
|
+
outputFormat: "json";
|
|
298
|
+
status: 404;
|
|
299
|
+
} | {
|
|
300
|
+
input: {
|
|
301
|
+
param: {
|
|
302
|
+
categoryId: string;
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
output: {
|
|
306
|
+
success: true;
|
|
307
|
+
};
|
|
308
|
+
outputFormat: "json";
|
|
309
|
+
status: 200;
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
} & {
|
|
313
|
+
"/product-tags": {
|
|
314
|
+
$get: {
|
|
315
|
+
input: {};
|
|
316
|
+
output: {
|
|
317
|
+
data: {
|
|
318
|
+
id: string;
|
|
319
|
+
name: string;
|
|
320
|
+
createdAt: string;
|
|
321
|
+
updatedAt: string;
|
|
322
|
+
}[];
|
|
323
|
+
total: number;
|
|
324
|
+
limit: number;
|
|
325
|
+
offset: number;
|
|
326
|
+
};
|
|
327
|
+
outputFormat: "json";
|
|
328
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
} & {
|
|
332
|
+
"/product-tags/:tagId": {
|
|
333
|
+
$get: {
|
|
334
|
+
input: {
|
|
335
|
+
param: {
|
|
336
|
+
tagId: string;
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
output: {
|
|
340
|
+
error: string;
|
|
341
|
+
};
|
|
342
|
+
outputFormat: "json";
|
|
343
|
+
status: 404;
|
|
344
|
+
} | {
|
|
345
|
+
input: {
|
|
346
|
+
param: {
|
|
347
|
+
tagId: string;
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
output: {
|
|
351
|
+
data: {
|
|
352
|
+
id: string;
|
|
353
|
+
name: string;
|
|
354
|
+
createdAt: string;
|
|
355
|
+
updatedAt: string;
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
outputFormat: "json";
|
|
359
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
360
|
+
};
|
|
361
|
+
};
|
|
362
|
+
} & {
|
|
363
|
+
"/product-tags": {
|
|
364
|
+
$post: {
|
|
365
|
+
input: {};
|
|
366
|
+
output: {
|
|
367
|
+
data: {
|
|
368
|
+
name: string;
|
|
369
|
+
id: string;
|
|
370
|
+
createdAt: string;
|
|
371
|
+
updatedAt: string;
|
|
372
|
+
} | undefined;
|
|
373
|
+
};
|
|
374
|
+
outputFormat: "json";
|
|
375
|
+
status: 201;
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
} & {
|
|
379
|
+
"/product-tags/:tagId": {
|
|
380
|
+
$patch: {
|
|
381
|
+
input: {
|
|
382
|
+
param: {
|
|
383
|
+
tagId: string;
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
output: {
|
|
387
|
+
error: string;
|
|
388
|
+
};
|
|
389
|
+
outputFormat: "json";
|
|
390
|
+
status: 404;
|
|
391
|
+
} | {
|
|
392
|
+
input: {
|
|
393
|
+
param: {
|
|
394
|
+
tagId: string;
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
output: {
|
|
398
|
+
data: {
|
|
399
|
+
id: string;
|
|
400
|
+
name: string;
|
|
401
|
+
createdAt: string;
|
|
402
|
+
updatedAt: string;
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
outputFormat: "json";
|
|
406
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
} & {
|
|
410
|
+
"/product-tags/:tagId": {
|
|
411
|
+
$delete: {
|
|
412
|
+
input: {
|
|
413
|
+
param: {
|
|
414
|
+
tagId: string;
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
output: {
|
|
418
|
+
error: string;
|
|
419
|
+
};
|
|
420
|
+
outputFormat: "json";
|
|
421
|
+
status: 404;
|
|
422
|
+
} | {
|
|
423
|
+
input: {
|
|
424
|
+
param: {
|
|
425
|
+
tagId: string;
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
output: {
|
|
429
|
+
success: true;
|
|
430
|
+
};
|
|
431
|
+
outputFormat: "json";
|
|
432
|
+
status: 200;
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
}, "/", "/product-tags/:tagId">;
|
|
436
|
+
//# sourceMappingURL=routes-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes-catalog.d.ts","sourceRoot":"","sources":["../src/routes-catalog.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAIzC,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAkJ7B,CAAA"}
|