@porulle/core 0.10.8 → 0.11.0
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/config/types.d.ts +3 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/interfaces/rest/index.d.ts.map +1 -1
- package/dist/interfaces/rest/index.js +4 -0
- package/dist/interfaces/rest/routes/admin/custom-field-proposals.d.ts +5 -0
- package/dist/interfaces/rest/routes/admin/custom-field-proposals.d.ts.map +1 -0
- package/dist/interfaces/rest/routes/admin/custom-field-proposals.js +22 -0
- package/dist/interfaces/rest/routes/admin/entity-field-definitions.d.ts +5 -0
- package/dist/interfaces/rest/routes/admin/entity-field-definitions.d.ts.map +1 -0
- package/dist/interfaces/rest/routes/admin/entity-field-definitions.js +39 -0
- package/dist/interfaces/rest/routes/catalog.d.ts.map +1 -1
- package/dist/interfaces/rest/routes/catalog.js +37 -2
- package/dist/interfaces/rest/routes/search.d.ts.map +1 -1
- package/dist/interfaces/rest/routes/search.js +12 -0
- package/dist/interfaces/rest/schemas/admin-custom-field-proposals.d.ts +134 -0
- package/dist/interfaces/rest/schemas/admin-custom-field-proposals.d.ts.map +1 -0
- package/dist/interfaces/rest/schemas/admin-custom-field-proposals.js +26 -0
- package/dist/interfaces/rest/schemas/admin-entity-field-definitions.d.ts +592 -0
- package/dist/interfaces/rest/schemas/admin-entity-field-definitions.d.ts.map +1 -0
- package/dist/interfaces/rest/schemas/admin-entity-field-definitions.js +109 -0
- package/dist/interfaces/rest/schemas/catalog.d.ts +1364 -401
- package/dist/interfaces/rest/schemas/catalog.d.ts.map +1 -1
- package/dist/interfaces/rest/schemas/catalog.js +86 -0
- package/dist/interfaces/rest/schemas/pricing.d.ts +1 -0
- package/dist/interfaces/rest/schemas/pricing.d.ts.map +1 -1
- package/dist/interfaces/rest/schemas/search.d.ts +1 -0
- package/dist/interfaces/rest/schemas/search.d.ts.map +1 -1
- package/dist/interfaces/rest/schemas/search.js +1 -0
- package/dist/modules/catalog/entity-service.d.ts +5 -3
- package/dist/modules/catalog/entity-service.d.ts.map +1 -1
- package/dist/modules/catalog/entity-service.js +73 -22
- package/dist/modules/catalog/module.d.ts +6 -1
- package/dist/modules/catalog/module.d.ts.map +1 -1
- package/dist/modules/catalog/module.js +6 -1
- package/dist/modules/catalog/ownership.d.ts +5 -0
- package/dist/modules/catalog/ownership.d.ts.map +1 -0
- package/dist/modules/catalog/ownership.js +11 -0
- package/dist/modules/catalog/repository/index.d.ts +52 -1
- package/dist/modules/catalog/repository/index.d.ts.map +1 -1
- package/dist/modules/catalog/repository/index.js +321 -2
- package/dist/modules/catalog/revision.d.ts +4 -0
- package/dist/modules/catalog/revision.d.ts.map +1 -0
- package/dist/modules/catalog/revision.js +33 -0
- package/dist/modules/catalog/schema.d.ts +979 -110
- package/dist/modules/catalog/schema.d.ts.map +1 -1
- package/dist/modules/catalog/schema.js +112 -2
- package/dist/modules/catalog/schemas.d.ts +2 -0
- package/dist/modules/catalog/schemas.d.ts.map +1 -1
- package/dist/modules/catalog/schemas.js +2 -0
- package/dist/modules/catalog/service.d.ts +66 -3
- package/dist/modules/catalog/service.d.ts.map +1 -1
- package/dist/modules/catalog/service.js +512 -11
- package/dist/modules/channels/adapter.d.ts +85 -0
- package/dist/modules/channels/adapter.d.ts.map +1 -1
- package/dist/modules/channels/adapter.js +9 -1
- package/dist/modules/media/module.d.ts +68 -0
- package/dist/modules/media/module.d.ts.map +1 -1
- package/dist/modules/media/module.js +2 -0
- package/dist/modules/media/schema.d.ts +70 -0
- package/dist/modules/media/schema.d.ts.map +1 -1
- package/dist/modules/media/schema.js +20 -2
- package/dist/modules/media/service.d.ts +8 -1
- package/dist/modules/media/service.d.ts.map +1 -1
- package/dist/modules/media/service.js +66 -18
- package/dist/modules/pricing/schema.d.ts +17 -0
- package/dist/modules/pricing/schema.d.ts.map +1 -1
- package/dist/modules/pricing/schema.js +1 -0
- package/dist/modules/pricing/schemas.d.ts +1 -0
- package/dist/modules/pricing/schemas.d.ts.map +1 -1
- package/dist/modules/pricing/schemas.js +1 -0
- package/dist/modules/pricing/service.d.ts.map +1 -1
- package/dist/modules/pricing/service.js +6 -1
- package/dist/modules/search/adapter.d.ts +2 -0
- package/dist/modules/search/adapter.d.ts.map +1 -1
- package/dist/modules/search/module.d.ts.map +1 -1
- package/dist/modules/search/module.js +2 -0
- package/dist/modules/search/service.d.ts +4 -0
- package/dist/modules/search/service.d.ts.map +1 -1
- package/dist/modules/search/service.js +74 -5
- package/dist/runtime/kernel-modules.d.ts +73 -0
- package/dist/runtime/kernel-modules.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/config/types.ts +3 -0
- package/src/index.ts +14 -0
- package/src/interfaces/rest/index.ts +4 -0
- package/src/interfaces/rest/routes/admin/custom-field-proposals.ts +37 -0
- package/src/interfaces/rest/routes/admin/entity-field-definitions.ts +89 -0
- package/src/interfaces/rest/routes/catalog.ts +85 -0
- package/src/interfaces/rest/routes/search.ts +16 -0
- package/src/interfaces/rest/schemas/admin-custom-field-proposals.ts +29 -0
- package/src/interfaces/rest/schemas/admin-entity-field-definitions.ts +120 -0
- package/src/interfaces/rest/schemas/catalog.ts +92 -0
- package/src/interfaces/rest/schemas/search.ts +2 -0
- package/src/modules/catalog/entity-service.ts +73 -20
- package/src/modules/catalog/module.ts +15 -0
- package/src/modules/catalog/ownership.ts +17 -0
- package/src/modules/catalog/repository/index.ts +547 -1
- package/src/modules/catalog/revision.ts +35 -0
- package/src/modules/catalog/schema.ts +169 -1
- package/src/modules/catalog/schemas.ts +2 -0
- package/src/modules/catalog/service.ts +738 -13
- package/src/modules/channels/adapter.ts +107 -1
- package/src/modules/media/module.ts +2 -0
- package/src/modules/media/schema.ts +23 -2
- package/src/modules/media/service.ts +84 -23
- package/src/modules/pricing/schema.ts +1 -0
- package/src/modules/pricing/schemas.ts +1 -0
- package/src/modules/pricing/service.ts +7 -2
- package/src/modules/search/adapter.ts +2 -0
- package/src/modules/search/module.ts +2 -0
- package/src/modules/search/service.ts +87 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/rest/schemas/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAyDnD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoB5B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAazB,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAc5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAa5B,CAAC"}
|
|
@@ -5,6 +5,17 @@ import { CreateEntityBodySchema, UpdateEntityBodySchema, SetAttributesBodySchema
|
|
|
5
5
|
// ─── Response Schemas ───────────────────────────────────────────────────────
|
|
6
6
|
const DataResponse = CatalogEntityResponse;
|
|
7
7
|
const DataWithPaginationResponse = CatalogEntityListResponse;
|
|
8
|
+
const FieldOwnershipSchema = z.object({
|
|
9
|
+
id: z.string(),
|
|
10
|
+
organizationId: z.string(),
|
|
11
|
+
entityId: z.string(),
|
|
12
|
+
variantId: z.string().nullable(),
|
|
13
|
+
storeId: z.string().nullable(),
|
|
14
|
+
fieldPath: z.string(),
|
|
15
|
+
owner: z.enum(["platform", "store", "shared"]),
|
|
16
|
+
updatedAt: z.string(),
|
|
17
|
+
}).openapi("CatalogFieldOwnership");
|
|
18
|
+
const FieldOwnershipListResponse = z.object({ data: z.array(FieldOwnershipSchema) }).openapi("CatalogFieldOwnershipListResponse");
|
|
8
19
|
// ─── Path Params ────────────────────────────────────────────────────────────
|
|
9
20
|
const EntityIdOrSlugParam = z.object({
|
|
10
21
|
idOrSlug: z.string().min(1).openapi({ example: "my-product" }),
|
|
@@ -16,6 +27,13 @@ const EntityIdLocaleParam = z.object({
|
|
|
16
27
|
id: z.uuid().openapi({ example: "550e8400-e29b-41d4-a716-446655440000" }),
|
|
17
28
|
locale: z.string().min(1).openapi({ example: "en" }),
|
|
18
29
|
});
|
|
30
|
+
const EntityCustomFieldParam = z.object({
|
|
31
|
+
id: z.uuid().openapi({ example: "550e8400-e29b-41d4-a716-446655440000" }),
|
|
32
|
+
fieldName: z.string().min(1).openapi({ example: "warranty" }),
|
|
33
|
+
});
|
|
34
|
+
const CustomFieldReviewQuery = z.object({
|
|
35
|
+
locale: z.string().min(1).optional().openapi({ example: "en" }),
|
|
36
|
+
});
|
|
19
37
|
const CategoryIdParam = z.object({
|
|
20
38
|
categoryId: z.uuid().openapi({ example: "550e8400-e29b-41d4-a716-446655440000" }),
|
|
21
39
|
});
|
|
@@ -77,6 +95,46 @@ export const getEntityAttributesRoute = createRoute({
|
|
|
77
95
|
...errorResponses,
|
|
78
96
|
},
|
|
79
97
|
});
|
|
98
|
+
export const listFieldOwnershipRoute = createRoute({
|
|
99
|
+
method: "get",
|
|
100
|
+
path: "/entities/{id}/field-ownership",
|
|
101
|
+
tags: ["Catalog"],
|
|
102
|
+
summary: "List field ownership for a catalog entity",
|
|
103
|
+
request: {
|
|
104
|
+
params: EntityIdParam,
|
|
105
|
+
query: z.object({ storeId: z.string().optional() }),
|
|
106
|
+
},
|
|
107
|
+
responses: {
|
|
108
|
+
200: { content: { "application/json": { schema: FieldOwnershipListResponse } }, description: "Success" },
|
|
109
|
+
...errorResponses,
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
export const setFieldOwnershipRoute = createRoute({
|
|
113
|
+
method: "put",
|
|
114
|
+
path: "/entities/{id}/field-ownership",
|
|
115
|
+
tags: ["Catalog"],
|
|
116
|
+
summary: "Set field ownership for a catalog entity",
|
|
117
|
+
request: {
|
|
118
|
+
params: EntityIdParam,
|
|
119
|
+
body: {
|
|
120
|
+
content: {
|
|
121
|
+
"application/json": {
|
|
122
|
+
schema: z.object({
|
|
123
|
+
fieldPath: z.string().min(1),
|
|
124
|
+
owner: z.enum(["platform", "store", "shared"]),
|
|
125
|
+
storeId: z.string().min(1).nullable().optional(),
|
|
126
|
+
variantId: z.uuid().nullable().optional(),
|
|
127
|
+
}),
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
required: true,
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
responses: {
|
|
134
|
+
200: { content: { "application/json": { schema: z.object({ data: z.object({ updated: z.literal(true) }) }) } }, description: "Updated" },
|
|
135
|
+
...errorResponses,
|
|
136
|
+
},
|
|
137
|
+
});
|
|
80
138
|
export const listCategoriesRoute = createRoute({
|
|
81
139
|
method: "get",
|
|
82
140
|
path: "/categories",
|
|
@@ -266,6 +324,34 @@ export const setEntityAttributesRoute = createRoute({
|
|
|
266
324
|
...errorResponses,
|
|
267
325
|
},
|
|
268
326
|
});
|
|
327
|
+
export const approveCustomFieldRoute = createRoute({
|
|
328
|
+
method: "post",
|
|
329
|
+
path: "/entities/{id}/custom-fields/{fieldName}/approve",
|
|
330
|
+
tags: ["Catalog"],
|
|
331
|
+
summary: "Approve a proposed custom-field value",
|
|
332
|
+
request: {
|
|
333
|
+
params: EntityCustomFieldParam,
|
|
334
|
+
query: CustomFieldReviewQuery,
|
|
335
|
+
},
|
|
336
|
+
responses: {
|
|
337
|
+
200: { content: { "application/json": { schema: DataResponse } }, description: "Approved" },
|
|
338
|
+
...errorResponses,
|
|
339
|
+
},
|
|
340
|
+
});
|
|
341
|
+
export const rejectCustomFieldRoute = createRoute({
|
|
342
|
+
method: "post",
|
|
343
|
+
path: "/entities/{id}/custom-fields/{fieldName}/reject",
|
|
344
|
+
tags: ["Catalog"],
|
|
345
|
+
summary: "Reject a proposed custom-field value",
|
|
346
|
+
request: {
|
|
347
|
+
params: EntityCustomFieldParam,
|
|
348
|
+
query: CustomFieldReviewQuery,
|
|
349
|
+
},
|
|
350
|
+
responses: {
|
|
351
|
+
200: { content: { "application/json": { schema: DataResponse } }, description: "Rejected" },
|
|
352
|
+
...errorResponses,
|
|
353
|
+
},
|
|
354
|
+
});
|
|
269
355
|
export const createCategoryRoute = createRoute({
|
|
270
356
|
method: "post",
|
|
271
357
|
path: "/categories",
|
|
@@ -46,6 +46,7 @@ export declare const setBasePriceRoute: {
|
|
|
46
46
|
variantId: z.ZodOptional<z.ZodString>;
|
|
47
47
|
currency: z.ZodString;
|
|
48
48
|
amount: z.ZodNumber;
|
|
49
|
+
compareAtAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
49
50
|
customerGroupId: z.ZodOptional<z.ZodString>;
|
|
50
51
|
minQuantity: z.ZodOptional<z.ZodNumber>;
|
|
51
52
|
maxQuantity: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/rest/schemas/pricing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAKnD,O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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmB9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAe9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoB9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/rest/schemas/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAKnD,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/rest/schemas/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAKnD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCtB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBvB,CAAC"}
|
|
@@ -6,6 +6,7 @@ export const searchRoute = createRoute({
|
|
|
6
6
|
path: "/",
|
|
7
7
|
tags: ["Search"],
|
|
8
8
|
summary: "Search catalog entities",
|
|
9
|
+
description: "Attribute filters use repeatable `attr.<name>=<value>` query parameters: repeated values for one name are ORed, distinct names are ANDed. Attribute names must match `^[A-Za-z0-9_-]+$`; anything else returns 422. Request attribute facet counts by naming the attribute in `facets`.",
|
|
9
10
|
request: {
|
|
10
11
|
query: z.object({
|
|
11
12
|
q: z.string().max(500).optional(),
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import type { Actor } from "../../auth/types.js";
|
|
2
2
|
import { type Result } from "../../kernel/result.js";
|
|
3
3
|
import type { TxContext } from "../../kernel/database/tx-context.js";
|
|
4
|
-
import type { CatalogServiceDeps, CatalogEntityHydrated, CatalogListResult, CreateEntityInput, GetOptions, ListParams, SetAttributesInput, UpdateEntityInput, VariantGenerationStrategy, CreateOptionTypeInput, CreateOptionValueInput, CreateVariantInput } from "./service.js";
|
|
4
|
+
import type { CatalogServiceDeps, CatalogEntityHydrated, CatalogListResult, CreateEntityInput, GetOptions, ListParams, SetAttributesInput, UpdateEntityInput, VariantGenerationStrategy, CreateOptionTypeInput, CreateOptionValueInput, CreateVariantInput, EntityFieldDefinitionResolver } from "./service.js";
|
|
5
5
|
import type { SellableAttribute, OptionType, OptionValue, Variant } from "./repository/index.js";
|
|
6
6
|
export declare class EntityService {
|
|
7
7
|
private readonly deps;
|
|
8
|
-
|
|
8
|
+
private readonly resolveEntityFieldDefinitions;
|
|
9
|
+
constructor(deps: CatalogServiceDeps, resolveEntityFieldDefinitions: EntityFieldDefinitionResolver);
|
|
9
10
|
private get repo();
|
|
10
11
|
private assertSameOrg;
|
|
11
12
|
private assertEntityWritable;
|
|
12
|
-
private
|
|
13
|
+
private validateCustomFields;
|
|
14
|
+
private writeCustomFields;
|
|
13
15
|
private hydrateEntity;
|
|
14
16
|
create(input: CreateEntityInput, actor: Actor | null, ctx?: TxContext): Promise<Result<CatalogEntityHydrated>>;
|
|
15
17
|
update(id: string, input: UpdateEntityInput, actor: Actor | null, ctx?: TxContext): Promise<Result<CatalogEntityHydrated>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-service.d.ts","sourceRoot":"","sources":["../../../src/modules/catalog/entity-service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAkBjD,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAI9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"entity-service.d.ts","sourceRoot":"","sources":["../../../src/modules/catalog/entity-service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAkBjD,OAAO,EAAW,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAI9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,6BAA6B,EAC9B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAEV,iBAAiB,EAGjB,UAAU,EACV,WAAW,EACX,OAAO,EACR,MAAM,uBAAuB,CAAC;AA0C/B,qBAAa,aAAa;IAEtB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC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|
19
20
|
return field.textValue;
|
|
20
21
|
case "number":
|
|
21
22
|
return field.numberValue;
|
|
@@ -31,8 +32,10 @@ function getCustomFieldValue(field) {
|
|
|
31
32
|
}
|
|
32
33
|
export class EntityService {
|
|
33
34
|
deps;
|
|
34
|
-
|
|
35
|
+
resolveEntityFieldDefinitions;
|
|
36
|
+
constructor(deps, resolveEntityFieldDefinitions) {
|
|
35
37
|
this.deps = deps;
|
|
38
|
+
this.resolveEntityFieldDefinitions = resolveEntityFieldDefinitions;
|
|
36
39
|
}
|
|
37
40
|
get repo() {
|
|
38
41
|
return this.deps.repository;
|
|
@@ -49,25 +52,42 @@ export class EntityService {
|
|
|
49
52
|
if (entity.sourceStoreId != null)
|
|
50
53
|
assertPermission(actor, "catalog:sync");
|
|
51
54
|
}
|
|
52
|
-
async
|
|
55
|
+
async validateCustomFields(entityType, customFields, actor, ctx) {
|
|
53
56
|
if (!customFields)
|
|
54
|
-
return Ok(
|
|
57
|
+
return Ok([]);
|
|
55
58
|
const entityConfig = this.deps.config.entities?.[entityType];
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
const definitions = await this.resolveEntityFieldDefinitions(entityType, actor ?? ctx?.actor ?? null, ctx);
|
|
60
|
+
if (!entityConfig && definitions.length === 0)
|
|
61
|
+
return Ok([]);
|
|
62
|
+
const definitionMap = new Map(definitions.map((f) => [f.name, f]));
|
|
63
|
+
const validated = [];
|
|
59
64
|
for (const [name, value] of Object.entries(customFields)) {
|
|
60
65
|
const def = definitionMap.get(name);
|
|
61
66
|
if (!def)
|
|
62
67
|
return Err(new CommerceValidationError(`Unknown custom field: ${name}`));
|
|
68
|
+
if (value === null) {
|
|
69
|
+
validated.push({ fieldName: name, locale: "en", data: null });
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
63
72
|
const type = def.type;
|
|
73
|
+
let normalized = value;
|
|
64
74
|
let valid = false;
|
|
65
75
|
switch (type) {
|
|
66
76
|
case "text":
|
|
67
77
|
case "relation":
|
|
68
|
-
case "select":
|
|
69
78
|
valid = typeof value === "string";
|
|
70
79
|
break;
|
|
80
|
+
case "select": {
|
|
81
|
+
if (typeof value !== "string")
|
|
82
|
+
break;
|
|
83
|
+
const trimmed = value.trim();
|
|
84
|
+
if (def.options && !def.options.includes(trimmed)) {
|
|
85
|
+
return Err(new CommerceValidationError(`Value "${trimmed}" is not permitted for field ${name}. Allowed: ${def.options.join(", ")}`));
|
|
86
|
+
}
|
|
87
|
+
normalized = trimmed;
|
|
88
|
+
valid = true;
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
71
91
|
case "number":
|
|
72
92
|
valid = typeof value === "number";
|
|
73
93
|
break;
|
|
@@ -85,29 +105,51 @@ export class EntityService {
|
|
|
85
105
|
}
|
|
86
106
|
if (!valid)
|
|
87
107
|
return Err(new CommerceValidationError(`Custom field ${name} expected type ${type}.`));
|
|
88
|
-
const fieldType =
|
|
89
|
-
const insertData = {
|
|
108
|
+
const fieldType = type;
|
|
109
|
+
const insertData = {
|
|
110
|
+
fieldType,
|
|
111
|
+
source: "merchant",
|
|
112
|
+
status: "approved",
|
|
113
|
+
confidence: null,
|
|
114
|
+
evidence: null,
|
|
115
|
+
approvedAt: null,
|
|
116
|
+
approvedBy: null,
|
|
117
|
+
};
|
|
90
118
|
switch (fieldType) {
|
|
91
119
|
case "text":
|
|
92
120
|
case "relation":
|
|
93
|
-
|
|
121
|
+
case "select":
|
|
122
|
+
insertData.textValue = normalized;
|
|
94
123
|
break;
|
|
95
124
|
case "number":
|
|
96
|
-
insertData.numberValue =
|
|
125
|
+
insertData.numberValue = normalized;
|
|
97
126
|
break;
|
|
98
127
|
case "boolean":
|
|
99
|
-
insertData.booleanValue =
|
|
128
|
+
insertData.booleanValue = normalized;
|
|
100
129
|
break;
|
|
101
130
|
case "date":
|
|
102
|
-
insertData.dateValue =
|
|
131
|
+
insertData.dateValue = normalized instanceof Date ? normalized : new Date(normalized);
|
|
103
132
|
break;
|
|
104
133
|
case "json":
|
|
105
|
-
insertData.jsonValue =
|
|
134
|
+
insertData.jsonValue = normalized;
|
|
106
135
|
break;
|
|
107
136
|
}
|
|
108
|
-
|
|
137
|
+
validated.push({ fieldName: name, locale: "en", data: insertData });
|
|
138
|
+
}
|
|
139
|
+
return Ok(validated);
|
|
140
|
+
}
|
|
141
|
+
async writeCustomFields(entityId, customFields, ctx, upsert = false) {
|
|
142
|
+
for (const customField of customFields) {
|
|
143
|
+
if (customField.data === null) {
|
|
144
|
+
await this.repo.deleteCustomField(entityId, customField.fieldName, customField.locale, ctx);
|
|
145
|
+
}
|
|
146
|
+
else if (upsert) {
|
|
147
|
+
await this.repo.upsertCustomField(entityId, customField.fieldName, customField.locale, customField.data, ctx);
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
await this.repo.createCustomField({ ...customField.data, entityId, fieldName: customField.fieldName, locale: customField.locale }, ctx);
|
|
151
|
+
}
|
|
109
152
|
}
|
|
110
|
-
return Ok(undefined);
|
|
111
153
|
}
|
|
112
154
|
async hydrateEntity(entity, options, ctx) {
|
|
113
155
|
const hydrated = { ...entity };
|
|
@@ -138,9 +180,11 @@ export class EntityService {
|
|
|
138
180
|
hydrated.categories = await this.repo.findEntityCategories(entity.id, ctx);
|
|
139
181
|
if (options?.includeBrands)
|
|
140
182
|
hydrated.brands = await this.repo.findEntityBrands(entity.id, ctx);
|
|
183
|
+
if (options?.includeCustomFields)
|
|
184
|
+
hydrated.customFields = await this.repo.findCustomFieldsByEntityId(entity.id, ctx);
|
|
141
185
|
if (options?.includeMedia) {
|
|
142
186
|
const mediaService = this.deps.services.media;
|
|
143
|
-
const mediaResult = await mediaService?.listEntityMedia?.(entity.id, { orgId: entity.organizationId });
|
|
187
|
+
const mediaResult = await mediaService?.listEntityMedia?.(entity.id, { orgId: entity.organizationId }, ctx);
|
|
144
188
|
hydrated.media = mediaResult?.ok && mediaResult.value ? mediaResult.value : [];
|
|
145
189
|
}
|
|
146
190
|
if (options?.includePricing) {
|
|
@@ -168,13 +212,16 @@ export class EntityService {
|
|
|
168
212
|
const processedInput = await runBeforeHooks(beforeHooks, input, "create", context);
|
|
169
213
|
if (processedInput.sourceStoreId != null)
|
|
170
214
|
assertPermission(actor, "catalog:sync");
|
|
171
|
-
const
|
|
215
|
+
const customFieldsResult = await this.validateCustomFields(processedInput.type, processedInput.customFields, actor, ctx);
|
|
216
|
+
if (!customFieldsResult.ok)
|
|
217
|
+
return customFieldsResult;
|
|
218
|
+
const statuses = ["draft", "active", "archived", "discontinued"];
|
|
219
|
+
const status = statuses.find((value) => value === processedInput.status) ?? "draft";
|
|
220
|
+
const entity = await this.repo.createEntity({ organizationId: orgId, type: processedInput.type, slug: processedInput.slug, status, isVisible: status === "active", ...(processedInput.sourceStoreId !== undefined ? { sourceStoreId: processedInput.sourceStoreId } : {}), ...(processedInput.taxClass !== undefined ? { taxClass: processedInput.taxClass } : {}), metadata: processedInput.metadata ?? {} }, ctx);
|
|
172
221
|
if (processedInput.attributes) {
|
|
173
222
|
await this.repo.createAttribute({ entityId: entity.id, locale: processedInput.attributes.locale ?? "en", title: processedInput.attributes.title, subtitle: processedInput.attributes.subtitle, description: processedInput.attributes.description, richDescription: processedInput.attributes.richDescription, seoTitle: processedInput.attributes.seoTitle, seoDescription: processedInput.attributes.seoDescription }, ctx);
|
|
174
223
|
}
|
|
175
|
-
|
|
176
|
-
if (!customFieldsResult.ok)
|
|
177
|
-
return customFieldsResult;
|
|
224
|
+
await this.writeCustomFields(entity.id, customFieldsResult.value, ctx);
|
|
178
225
|
const hookReport = await runAfterHooks(afterHooks, null, entity, "create", context);
|
|
179
226
|
const hydrated = await this.hydrateEntity(entity, undefined, ctx);
|
|
180
227
|
return Ok(hydrated, hookReport.hasErrors ? { hookErrors: hookReport.errors } : undefined);
|
|
@@ -195,9 +242,13 @@ export class EntityService {
|
|
|
195
242
|
const afterHooks = this.deps.hooks.resolve("catalog.afterUpdate");
|
|
196
243
|
const context = createHookContext({ actor, tx: ctx?.tx ?? null, logger: createLogger("catalog.update"), services: this.deps.services, context: { moduleName: "catalog" }, ...hookDatabaseArg(this.deps.database) });
|
|
197
244
|
const processed = await runBeforeHooks(beforeHooks, input, "update", context);
|
|
245
|
+
const customFieldsResult = await this.validateCustomFields(existing.type, processed.customFields, actor, ctx);
|
|
246
|
+
if (!customFieldsResult.ok)
|
|
247
|
+
return customFieldsResult;
|
|
198
248
|
const updated = await this.repo.updateEntity(id, { ...(processed.slug !== undefined ? { slug: processed.slug } : {}), ...(processed.status !== undefined ? { status: processed.status } : {}), ...(processed.taxClass !== undefined ? { taxClass: processed.taxClass } : {}), ...(processed.metadata !== undefined ? { metadata: processed.metadata } : {}), ...(processed.isVisible !== undefined ? { isVisible: processed.isVisible } : {}) }, ctx);
|
|
199
249
|
if (!updated)
|
|
200
250
|
return Err(new CommerceNotFoundError("Entity not found."));
|
|
251
|
+
await this.writeCustomFields(existing.id, customFieldsResult.value, ctx, true);
|
|
201
252
|
const hookReport = await runAfterHooks(afterHooks, existing, updated, "update", context);
|
|
202
253
|
const hydrated = await this.hydrateEntity(updated, undefined, ctx);
|
|
203
254
|
return Ok(hydrated, hookReport.hasErrors ? { hookErrors: hookReport.errors } : undefined);
|
|
@@ -479,7 +530,7 @@ export class EntityService {
|
|
|
479
530
|
return Err(new CommerceValidationError(`Option value "${optVal}" does not exist for option type "${optName}".`));
|
|
480
531
|
optionValueIds.push(ov.id);
|
|
481
532
|
}
|
|
482
|
-
const variant = await this.repo.createVariant({ entityId: input.entityId, status: "active", sortOrder: 0, metadata: {}, ...(input.sku !== undefined ? { sku: input.sku } : {}), ...(input.taxClass !== undefined ? { taxClass: input.taxClass } : {}) }, ctx);
|
|
533
|
+
const variant = await this.repo.createVariant({ entityId: input.entityId, status: "active", sortOrder: 0, metadata: {}, ...(input.sku !== undefined ? { sku: input.sku } : {}), ...(input.barcode !== undefined ? { barcode: input.barcode } : {}), ...(input.taxClass !== undefined ? { taxClass: input.taxClass } : {}) }, ctx);
|
|
483
534
|
await this.repo.createVariantOptionValues(optionValueIds.map((optionValueId) => ({ variantId: variant.id, optionValueId })), ctx);
|
|
484
535
|
return Ok(variant);
|
|
485
536
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PricingService } from "../pricing/service.js";
|
|
2
|
-
import { brands, categories, entityBrands, entityCategories, optionTypes, optionValues, sellableAttributes, sellableCustomFields, sellableEntities, variantOptionValues, variants } from "./schema.js";
|
|
2
|
+
import { brands, categories, tags, entityTags, entityBrands, entityCategories, optionTypes, optionValues, sellableAttributes, sellableCustomFields, entityFieldDefinitions, sellableEntityRevisions, sellableEntities, variantOptionValues, variants, catalogFieldOwnership } from "./schema.js";
|
|
3
3
|
import { CatalogServiceImpl } from "./service.js";
|
|
4
4
|
type CatalogModuleDeps = {
|
|
5
5
|
pricing: PricingService;
|
|
@@ -8,14 +8,19 @@ export declare const catalogModule: import("../../kernel/module/define.js").AppM
|
|
|
8
8
|
sellableEntities: typeof sellableEntities;
|
|
9
9
|
sellableAttributes: typeof sellableAttributes;
|
|
10
10
|
sellableCustomFields: typeof sellableCustomFields;
|
|
11
|
+
entityFieldDefinitions: typeof entityFieldDefinitions;
|
|
12
|
+
sellableEntityRevisions: typeof sellableEntityRevisions;
|
|
11
13
|
categories: typeof categories;
|
|
12
14
|
entityCategories: typeof entityCategories;
|
|
13
15
|
brands: typeof brands;
|
|
14
16
|
entityBrands: typeof entityBrands;
|
|
17
|
+
tags: typeof tags;
|
|
18
|
+
entityTags: typeof entityTags;
|
|
15
19
|
optionTypes: typeof optionTypes;
|
|
16
20
|
optionValues: typeof optionValues;
|
|
17
21
|
variants: typeof variants;
|
|
18
22
|
variantOptionValues: typeof variantOptionValues;
|
|
23
|
+
catalogFieldOwnership: typeof catalogFieldOwnership;
|
|
19
24
|
}, CatalogServiceImpl, CatalogModuleDeps>;
|
|
20
25
|
export {};
|
|
21
26
|
//# sourceMappingURL=module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/modules/catalog/module.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EACL,MAAM,EACN,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,QAAQ,
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/modules/catalog/module.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EACL,MAAM,EACN,UAAU,EACV,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,QAAQ,EACR,qBAAqB,EACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,cAAc,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,aAAa;sBAEJ,OAAO,gBAAgB;wBACrB,OAAO,kBAAkB;0BACvB,OAAO,oBAAoB;4BACzB,OAAO,sBAAsB;6BAC5B,OAAO,uBAAuB;gBAC3C,OAAO,UAAU;sBACX,OAAO,gBAAgB;YACjC,OAAO,MAAM;kBACP,OAAO,YAAY;UAC3B,OAAO,IAAI;gBACL,OAAO,UAAU;iBAChB,OAAO,WAAW;kBACjB,OAAO,YAAY;cACvB,OAAO,QAAQ;yBACJ,OAAO,mBAAmB;2BACxB,OAAO,qBAAqB;yCAiCrD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineModule } from "../../kernel/module/index.js";
|
|
2
2
|
import { CatalogRepository } from "./repository/index.js";
|
|
3
|
-
import { brands, categories, entityBrands, entityCategories, optionTypes, optionValues, sellableAttributes, sellableCustomFields, sellableEntities, variantOptionValues, variants, } from "./schema.js";
|
|
3
|
+
import { brands, categories, tags, entityTags, entityBrands, entityCategories, optionTypes, optionValues, sellableAttributes, sellableCustomFields, entityFieldDefinitions, sellableEntityRevisions, sellableEntities, variantOptionValues, variants, catalogFieldOwnership, } from "./schema.js";
|
|
4
4
|
import { CatalogServiceImpl } from "./service.js";
|
|
5
5
|
export const catalogModule = defineModule({
|
|
6
6
|
id: "catalog",
|
|
@@ -9,14 +9,19 @@ export const catalogModule = defineModule({
|
|
|
9
9
|
sellableEntities,
|
|
10
10
|
sellableAttributes,
|
|
11
11
|
sellableCustomFields,
|
|
12
|
+
entityFieldDefinitions,
|
|
13
|
+
sellableEntityRevisions,
|
|
12
14
|
categories,
|
|
13
15
|
entityCategories,
|
|
14
16
|
brands,
|
|
15
17
|
entityBrands,
|
|
18
|
+
tags,
|
|
19
|
+
entityTags,
|
|
16
20
|
optionTypes,
|
|
17
21
|
optionValues,
|
|
18
22
|
variants,
|
|
19
23
|
variantOptionValues,
|
|
24
|
+
catalogFieldOwnership,
|
|
20
25
|
}),
|
|
21
26
|
service: (deps) => new CatalogServiceImpl({
|
|
22
27
|
repository: new CatalogRepository(deps.db.db),
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type FieldPath = string;
|
|
2
|
+
export type FieldOwner = "platform" | "store" | "shared";
|
|
3
|
+
export declare function isValidFieldPath(value: string): value is FieldPath;
|
|
4
|
+
export declare function validateFieldPath(value: string): FieldPath;
|
|
5
|
+
//# sourceMappingURL=ownership.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ownership.d.ts","sourceRoot":"","sources":["../../../src/modules/catalog/ownership.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAC/B,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;AAIzD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,SAAS,CAElE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAK1D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CommerceValidationError } from "../../kernel/errors.js";
|
|
2
|
+
const fieldPathPattern = /^[A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)*$/;
|
|
3
|
+
export function isValidFieldPath(value) {
|
|
4
|
+
return fieldPathPattern.test(value);
|
|
5
|
+
}
|
|
6
|
+
export function validateFieldPath(value) {
|
|
7
|
+
if (!isValidFieldPath(value)) {
|
|
8
|
+
throw new CommerceValidationError("Field path must contain dot-separated alphanumeric, underscore, or hyphen segments.");
|
|
9
|
+
}
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { TxContext } from "../../../kernel/database/tx-context.js";
|
|
2
2
|
import type { DrizzleDatabase } from "../../../kernel/database/drizzle-db.js";
|
|
3
|
-
import { sellableEntities, sellableAttributes, sellableCustomFields, categories, entityCategories, brands, entityBrands, optionTypes, optionValues, variants, variantOptionValues } from "../schema.js";
|
|
3
|
+
import { sellableEntities, sellableAttributes, sellableCustomFields, entityFieldDefinitions, categories, entityCategories, brands, entityBrands, entityTags, optionTypes, optionValues, variants, variantOptionValues, sellableEntityRevisions, catalogFieldOwnership, type SellableEntityRevisionSnapshot } from "../schema.js";
|
|
4
|
+
import { entityMedia } from "../../media/schema.js";
|
|
4
5
|
export type SellableEntity = typeof sellableEntities.$inferSelect;
|
|
5
6
|
export type SellableEntityInsert = typeof sellableEntities.$inferInsert;
|
|
6
7
|
export type SellableAttribute = typeof sellableAttributes.$inferSelect;
|
|
7
8
|
export type SellableAttributeInsert = typeof sellableAttributes.$inferInsert;
|
|
8
9
|
export type SellableCustomField = typeof sellableCustomFields.$inferSelect;
|
|
9
10
|
export type SellableCustomFieldInsert = typeof sellableCustomFields.$inferInsert;
|
|
11
|
+
export type EntityFieldDefinitionRecord = typeof entityFieldDefinitions.$inferSelect;
|
|
12
|
+
export type EntityFieldDefinitionInsert = typeof entityFieldDefinitions.$inferInsert;
|
|
10
13
|
export type Category = typeof categories.$inferSelect;
|
|
11
14
|
export type CategoryInsert = typeof categories.$inferInsert;
|
|
12
15
|
export type EntityCategory = typeof entityCategories.$inferSelect;
|
|
@@ -23,6 +26,14 @@ export type Variant = typeof variants.$inferSelect;
|
|
|
23
26
|
export type VariantInsert = typeof variants.$inferInsert;
|
|
24
27
|
export type VariantOptionValue = typeof variantOptionValues.$inferSelect;
|
|
25
28
|
export type VariantOptionValueInsert = typeof variantOptionValues.$inferInsert;
|
|
29
|
+
export type SellableEntityRevision = typeof sellableEntityRevisions.$inferSelect;
|
|
30
|
+
export type SellableEntityRevisionInsert = typeof sellableEntityRevisions.$inferInsert;
|
|
31
|
+
export type CatalogFieldOwnership = typeof catalogFieldOwnership.$inferSelect;
|
|
32
|
+
export type CatalogFieldOwnershipInsert = typeof catalogFieldOwnership.$inferInsert;
|
|
33
|
+
export type ProposedCustomField = SellableCustomField & {
|
|
34
|
+
entitySlug: string;
|
|
35
|
+
entityType: string;
|
|
36
|
+
};
|
|
26
37
|
/**
|
|
27
38
|
* CatalogRepository provides type-safe database operations for catalog entities.
|
|
28
39
|
*
|
|
@@ -50,6 +61,21 @@ export declare class CatalogRepository {
|
|
|
50
61
|
createEntity(data: SellableEntityInsert, ctx?: TxContext): Promise<SellableEntity>;
|
|
51
62
|
updateEntity(id: string, data: Partial<Omit<SellableEntityInsert, "id">>, ctx?: TxContext): Promise<SellableEntity | undefined>;
|
|
52
63
|
deleteEntity(id: string, ctx?: TxContext): Promise<boolean>;
|
|
64
|
+
findFieldOwnership(entityId: string, ctx?: TxContext, storeId?: string): Promise<CatalogFieldOwnership[]>;
|
|
65
|
+
findFieldOwnershipForResolution(entityId: string, storeId: string, variantId: string | null, ctx?: TxContext): Promise<CatalogFieldOwnership[]>;
|
|
66
|
+
upsertFieldOwnership(data: CatalogFieldOwnershipInsert, ctx?: TxContext): Promise<CatalogFieldOwnership>;
|
|
67
|
+
seedFieldOwnership(data: CatalogFieldOwnershipInsert[], ctx?: TxContext): Promise<void>;
|
|
68
|
+
findRevisionsByEntityId(entityId: string, ctx?: TxContext): Promise<SellableEntityRevision[]>;
|
|
69
|
+
findRevisionMarkers(entityId: string, since?: Date, ctx?: TxContext): Promise<Array<Pick<SellableEntityRevision, "createdAt" | "reason">>>;
|
|
70
|
+
findLatestRevision(entityId: string, ctx?: TxContext): Promise<SellableEntityRevision | undefined>;
|
|
71
|
+
findRevisionById(entityId: string, id: string, ctx?: TxContext): Promise<SellableEntityRevision | undefined>;
|
|
72
|
+
createRevision(data: Omit<SellableEntityRevisionInsert, "id" | "revision" | "pinned">, ctx?: TxContext): Promise<SellableEntityRevision>;
|
|
73
|
+
updateRevision(id: string, data: Partial<Pick<SellableEntityRevisionInsert, "createdAt" | "pinned">>, ctx?: TxContext): Promise<SellableEntityRevision | undefined>;
|
|
74
|
+
deleteRevisionsOlderThan(organizationId: string, cutoff: Date, ctx?: TxContext): Promise<number>;
|
|
75
|
+
snapshotEntity(entityId: string, ctx?: TxContext): Promise<SellableEntityRevisionSnapshot>;
|
|
76
|
+
findEntityMedia(entityId: string, ctx?: TxContext): Promise<Array<typeof entityMedia.$inferSelect>>;
|
|
77
|
+
deleteEntityMediaByEntityId(entityId: string, ctx?: TxContext): Promise<void>;
|
|
78
|
+
createEntityMedia(data: typeof entityMedia.$inferInsert, ctx?: TxContext): Promise<typeof entityMedia.$inferSelect>;
|
|
53
79
|
findAttributesByEntityId(entityId: string, ctx?: TxContext): Promise<SellableAttribute[]>;
|
|
54
80
|
findAttributeByLocale(entityId: string, locale: string, ctx?: TxContext): Promise<SellableAttribute | undefined>;
|
|
55
81
|
createAttribute(data: SellableAttributeInsert, ctx?: TxContext): Promise<SellableAttribute>;
|
|
@@ -57,8 +83,30 @@ export declare class CatalogRepository {
|
|
|
57
83
|
upsertAttribute(entityId: string, locale: string, data: Omit<SellableAttributeInsert, "entityId" | "locale">, ctx?: TxContext): Promise<SellableAttribute>;
|
|
58
84
|
deleteAttributesByEntityId(entityId: string, ctx?: TxContext): Promise<void>;
|
|
59
85
|
findCustomFieldsByEntityId(entityId: string, ctx?: TxContext): Promise<SellableCustomField[]>;
|
|
86
|
+
findAllCustomFieldsByEntityId(entityId: string, ctx?: TxContext): Promise<SellableCustomField[]>;
|
|
87
|
+
findProposedCustomField(entityId: string, fieldName: string, locale?: string, ctx?: TxContext): Promise<SellableCustomField | undefined>;
|
|
88
|
+
updateProposedCustomField(id: string, data: Partial<Omit<SellableCustomFieldInsert, "id">>, ctx?: TxContext): Promise<SellableCustomField | undefined>;
|
|
89
|
+
rejectOtherProposedCustomFields(entityId: string, fieldName: string, locale: string, excludeId: string, ctx?: TxContext): Promise<number>;
|
|
90
|
+
listProposedCustomFields(organizationId: string, pagination: {
|
|
91
|
+
page: number;
|
|
92
|
+
limit: number;
|
|
93
|
+
}, filter?: {
|
|
94
|
+
entityType?: string;
|
|
95
|
+
}, ctx?: TxContext): Promise<{
|
|
96
|
+
items: ProposedCustomField[];
|
|
97
|
+
total: number;
|
|
98
|
+
}>;
|
|
99
|
+
findCustomFieldByName(entityId: string, fieldName: string, locale?: string, ctx?: TxContext): Promise<SellableCustomField | undefined>;
|
|
60
100
|
createCustomField(data: SellableCustomFieldInsert, ctx?: TxContext): Promise<SellableCustomField>;
|
|
101
|
+
updateCustomField(id: string, data: Partial<Omit<SellableCustomFieldInsert, "id">>, ctx?: TxContext): Promise<SellableCustomField | undefined>;
|
|
102
|
+
upsertCustomField(entityId: string, fieldName: string, locale: string, data: Omit<SellableCustomFieldInsert, "entityId" | "fieldName">, ctx?: TxContext): Promise<SellableCustomField>;
|
|
103
|
+
deleteCustomField(entityId: string, fieldName: string, locale?: string, ctx?: TxContext): Promise<void>;
|
|
61
104
|
deleteCustomFieldsByEntityId(entityId: string, ctx?: TxContext): Promise<void>;
|
|
105
|
+
findEntityFieldDefinitions(organizationId: string, entityType?: string, ctx?: TxContext): Promise<EntityFieldDefinitionRecord[]>;
|
|
106
|
+
findActiveEntityFieldDefinitions(organizationId: string, entityType: string, ctx?: TxContext): Promise<EntityFieldDefinitionRecord[]>;
|
|
107
|
+
findEntityFieldDefinitionById(organizationId: string, id: string, ctx?: TxContext): Promise<EntityFieldDefinitionRecord | undefined>;
|
|
108
|
+
createEntityFieldDefinition(data: EntityFieldDefinitionInsert, ctx?: TxContext): Promise<EntityFieldDefinitionRecord>;
|
|
109
|
+
updateEntityFieldDefinition(organizationId: string, id: string, data: Partial<Omit<EntityFieldDefinitionInsert, "id" | "organizationId">>, ctx?: TxContext): Promise<EntityFieldDefinitionRecord | undefined>;
|
|
62
110
|
findCategoryById(id: string, ctx?: TxContext): Promise<Category | undefined>;
|
|
63
111
|
findCategoryBySlug(orgId: string, slug: string, ctx?: TxContext): Promise<Category | undefined>;
|
|
64
112
|
findAllCategories(orgId: string, ctx?: TxContext): Promise<Category[]>;
|
|
@@ -78,6 +126,9 @@ export declare class CatalogRepository {
|
|
|
78
126
|
updateBrand(id: string, data: Partial<Omit<BrandInsert, "id">>, ctx?: TxContext): Promise<Brand | undefined>;
|
|
79
127
|
deleteBrand(id: string, ctx?: TxContext): Promise<boolean>;
|
|
80
128
|
findEntityBrands(entityId: string, ctx?: TxContext): Promise<EntityBrand[]>;
|
|
129
|
+
findEntityTags(entityId: string, ctx?: TxContext): Promise<Array<typeof entityTags.$inferSelect>>;
|
|
130
|
+
addEntityTag(entityId: string, tagId: string, ctx?: TxContext): Promise<void>;
|
|
131
|
+
deleteEntityTagsByEntityId(entityId: string, ctx?: TxContext): Promise<void>;
|
|
81
132
|
addEntityToBrand(entityId: string, brandId: string, sortOrder?: number, ctx?: TxContext): Promise<void>;
|
|
82
133
|
removeEntityFromBrand(entityId: string, brandId: string, ctx?: TxContext): Promise<boolean>;
|
|
83
134
|
deleteEntityBrandsByEntityId(entityId: string, ctx?: TxContext): Promise<void>;
|