@vazen-ai/toml 0.0.0-development.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.
@@ -0,0 +1,77 @@
1
+ //#region src/psa/psa-definitions.d.ts
2
+ type BaseColumn<T> = {
3
+ defaultValue?: T | undefined;
4
+ name: string;
5
+ processValue: (value: unknown) => string;
6
+ };
7
+ type FixedValueColumn<T extends number | string> = {
8
+ value: T;
9
+ } & BaseColumn<T>;
10
+ type BooleanColumn = BaseColumn<boolean>;
11
+ type RegularColumn<T> = {
12
+ value?: T;
13
+ } & BaseColumn<T>;
14
+ type EnumColumn<T extends number | string> = {
15
+ options: Array<T>;
16
+ value?: T;
17
+ } & BaseColumn<T>;
18
+ type Column = BooleanColumn | EnumColumn<number | string> | FixedValueColumn<number | string> | RegularColumn<number> | RegularColumn<string>;
19
+ type PsaDefinition<T extends Array<Column>> = { [key in T[number]['name'] as Uncapitalize<key>]: number | string; };
20
+ //#endregion
21
+ //#region src/psa/position.d.ts
22
+ declare const positionColumns: Array<Column>;
23
+ type PsaPosition = PsaDefinition<typeof positionColumns>;
24
+ export declare const toPsaPosition: (data: PsaPosition) => string[];
25
+ //#endregion
26
+ //#region src/psa/fixture.d.ts
27
+ declare const fixtureColumns: Array<Column>;
28
+ type PsaFixture = PsaDefinition<typeof fixtureColumns> & {
29
+ positions?: Array<PsaPosition>;
30
+ };
31
+ export declare const toPsaFixture: (data: PsaFixture) => string[];
32
+ //#endregion
33
+ //#region src/psa/segment.d.ts
34
+ declare const segmentColumns: Array<Column>;
35
+ type PsaSegment = PsaDefinition<typeof segmentColumns>;
36
+ export declare const toPsaSegment: (data: PsaSegment) => string[];
37
+ //#endregion
38
+ //#region src/psa/planogram.d.ts
39
+ declare const planogramColumns: Array<Column>;
40
+ type PsaPlanogram = PsaDefinition<typeof planogramColumns> & {
41
+ fixtures?: Array<PsaFixture>;
42
+ segments?: Array<PsaSegment>;
43
+ };
44
+ export declare const toPsaPlanogram: (data: PsaPlanogram) => string[];
45
+ //#endregion
46
+ //#region src/psa/product.d.ts
47
+ declare const productColumns: Array<Column>;
48
+ type PsaProduct = PsaDefinition<typeof productColumns>;
49
+ export declare const toPsaProduct: (data: PsaProduct) => string[];
50
+ //#endregion
51
+ //#region src/psa/project.d.ts
52
+ declare const projectColumns: Array<Column>;
53
+ type PsaProject = PsaDefinition<typeof projectColumns>;
54
+ export declare const toPsaProject: (data: PsaProject) => string[];
55
+ //#endregion
56
+ //#region src/psa/get-psa-file.d.ts
57
+ type Stringify = (input: Array<unknown>) => string;
58
+ export declare const getPsaFile: ({ planograms, products, project, stringify }: Readonly<{
59
+ planograms: Array<{
60
+ fixtures?: Array<PsaFixture>;
61
+ positions?: Array<PsaPosition>;
62
+ segments?: Array<PsaSegment>;
63
+ } & PsaPlanogram>;
64
+ products: Array<PsaProduct>;
65
+ project: PsaProject;
66
+ stringify: Stringify;
67
+ }>) => string;
68
+ //#endregion
69
+ //#region src/psa/psa-stringify.d.ts
70
+ export declare const psaStringify: (input: Array<unknown>) => string;
71
+ //#endregion
72
+ //#region src/psa/performance.d.ts
73
+ declare const performanceColumns: Array<Column>;
74
+ type PsaPerformance = PsaDefinition<typeof performanceColumns>;
75
+ export declare const toPsaPerformance: (data: PsaPerformance) => string[];
76
+ //#endregion
77
+ export type { PsaFixture, PsaPerformance, PsaPlanogram, PsaPosition, PsaProduct, PsaProject, PsaSegment };