@ankhorage/templates 6.1.0 → 7.0.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/CHANGELOG.md +6 -0
- package/dist/commands.d.ts +6 -2
- package/dist/commands.d.ts.map +1 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/api.d.ts +3 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/api.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/api.js +18 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/api.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiEndpoints.d.ts +165 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiEndpoints.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiEndpoints.js +138 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiEndpoints.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiSchemas.d.ts +33 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiSchemas.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiSchemas.js +80 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiSchemas.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/bindings.d.ts.map +1 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/bindings.js +32 -125
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/bindings.js.map +1 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/catalogScreenBody.d.ts +3 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/catalogScreenBody.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/catalogScreenBody.js +44 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/catalogScreenBody.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/contentScreen.d.ts +29 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/contentScreen.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/contentScreen.js +32 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/contentScreen.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/productCreateScreenBody.d.ts +3 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/productCreateScreenBody.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/productCreateScreenBody.js +88 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/productCreateScreenBody.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/productDetailScreenBody.d.ts +8 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/productDetailScreenBody.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/productDetailScreenBody.js +96 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/productDetailScreenBody.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/scanScreenBody.d.ts +3 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/scanScreenBody.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/scanScreenBody.js +20 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/scanScreenBody.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/screens.d.ts.map +1 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/screens.js +24 -385
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/screens.js.map +1 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/settingsScreen.d.ts +8 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/settingsScreen.d.ts.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/settingsScreen.js +44 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/settingsScreen.js.map +1 -0
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/template.d.ts.map +1 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/template.js +2 -5
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/template.js.map +1 -1
- package/package.json +3 -4
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/dataSources.d.ts +0 -3
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/dataSources.d.ts.map +0 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/dataSources.js +0 -14
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/dataSources.js.map +0 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/externalDataSource.d.ts +0 -3
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/externalDataSource.d.ts.map +0 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/externalDataSource.js +0 -46
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/externalDataSource.js.map +0 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/generatedApi.d.ts +0 -3
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/generatedApi.d.ts.map +0 -1
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/generatedApi.js +0 -43
- package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/generatedApi.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @ankhorage/templates
|
|
2
2
|
|
|
3
|
+
## 7.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 51b41dd: Migrate template manifests to Contracts 8 canonical APIs and make the Nutrition catalog scanner use the shared external Nutrition HTTP API through `infra.apis[]` instead of generated API database projection or API data sources.
|
|
8
|
+
|
|
3
9
|
## 6.1.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/commands.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AppCategory } from '@ankhorage/contracts';
|
|
2
|
-
import type { AnkhCapabilityId
|
|
2
|
+
import type { AnkhCapabilityId } from '@ankhorage/contracts/cli';
|
|
3
3
|
import { createManifestForSelector, resolveTemplateCatalogEntry, type TemplateCatalogEntry } from './catalog.js';
|
|
4
4
|
import type { TemplatesCommandContext, TemplatesCommandRunResult } from './commandContext.js';
|
|
5
5
|
import { type CreateProjectSeedRequest, type ProjectSeedDependencies } from './projectSeed.js';
|
|
@@ -53,7 +53,11 @@ export declare const TEMPLATES_COMMANDS: readonly [{
|
|
|
53
53
|
readonly run: typeof runCreateCommand;
|
|
54
54
|
}];
|
|
55
55
|
export declare function runTemplatesCommand(request: TemplatesCommandInvocation, options?: RunTemplatesCommandOptions): Promise<TemplatesCommandRunResult>;
|
|
56
|
-
export declare function createProviderCommandDescriptors():
|
|
56
|
+
export declare function createProviderCommandDescriptors(): {
|
|
57
|
+
capability: "templates.list" | "templates.inspect" | "templates.create";
|
|
58
|
+
path: readonly ["list"] | readonly ["inspect"] | readonly ["create"];
|
|
59
|
+
summary: "List canonical template selectors from the published template catalog." | "Inspect one canonical template selector and print its manifest metadata." | "Create a manifest-first project seed from one canonical template selector.";
|
|
60
|
+
}[];
|
|
57
61
|
export declare function findTemplatesCommandByStandaloneName(value: string): TemplatesCommandDefinition | null;
|
|
58
62
|
export declare function renderRootHelp(version: string): string;
|
|
59
63
|
export declare function renderUnknownCommand(value: string): string;
|
package/dist/commands.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAe,MAA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AAE,SAAS,MAAM,EAAE,GACtB,OAAO,CAAC,yBAAyB,CAAC,CAMpC;AAED,iBAAS,iBAAiB,CACxB,OAAO,EAAE,0BAA0B,EACnC,QAAQ,EAAE,wBAAwB,EAClC,IAAI,EAAE,SAAS,MAAM,EAAE,GACtB,OAAO,CAAC,yBAAyB,CAAC,CAWpC;AAED,iBAAe,gBAAgB,CAC7B,OAAO,EAAE,0BAA0B,EACnC,QAAQ,EAAE,wBAAwB,EAClC,IAAI,EAAE,SAAS,MAAM,EAAE,GACtB,OAAO,CAAC,yBAAyB,CAAC,CAiCpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAK3E,wBAAgB,6BAA6B,IAAI,yBAAyB,CAczE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { nutritionApiEndpoints } from './apiEndpoints';
|
|
2
|
+
import { nutritionApiSchemas } from './apiSchemas';
|
|
3
|
+
export function createNutritionCatalogScanApi() {
|
|
4
|
+
return {
|
|
5
|
+
id: 'nutrition',
|
|
6
|
+
origin: 'external',
|
|
7
|
+
protocol: 'rest',
|
|
8
|
+
name: 'Nutrition API',
|
|
9
|
+
description: 'Shared Nutrition catalog served by the Ankhorage API gateway.',
|
|
10
|
+
baseUrl: 'https://api.ankhorage.com/v1/nutrition',
|
|
11
|
+
openApi: {
|
|
12
|
+
url: 'https://api.ankhorage.com/openapi.json',
|
|
13
|
+
},
|
|
14
|
+
schemas: nutritionApiSchemas,
|
|
15
|
+
endpoints: nutritionApiEndpoints,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,UAAU,6BAA6B;IAC3C,OAAO;QACL,EAAE,EAAE,WAAW;QACf,MAAM,EAAE,UAAU;QAClB,QAAQ,EAAE,MAAM;QAChB,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,+DAA+D;QAC5E,OAAO,EAAE,wCAAwC;QACjD,OAAO,EAAE;YACP,GAAG,EAAE,wCAAwC;SAC9C;QACD,OAAO,EAAE,mBAAmB;QAC5B,SAAS,EAAE,qBAAqB;KACjC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import type { DataOperationParameter } from '@ankhorage/contracts/data';
|
|
2
|
+
export declare const nutritionApiEndpoints: {
|
|
3
|
+
readonly health: {
|
|
4
|
+
readonly id: "health";
|
|
5
|
+
readonly kind: "http";
|
|
6
|
+
readonly path: "/health";
|
|
7
|
+
readonly operations: {
|
|
8
|
+
readonly 'health.get': {
|
|
9
|
+
readonly id: "health.get";
|
|
10
|
+
readonly endpointId: "health";
|
|
11
|
+
readonly protocol: "http";
|
|
12
|
+
readonly intent: "read";
|
|
13
|
+
readonly method: "GET";
|
|
14
|
+
readonly path: "/health";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
readonly products: {
|
|
19
|
+
readonly id: "products";
|
|
20
|
+
readonly kind: "http";
|
|
21
|
+
readonly path: "/products";
|
|
22
|
+
readonly operations: {
|
|
23
|
+
readonly 'products.list': {
|
|
24
|
+
readonly id: "products.list";
|
|
25
|
+
readonly endpointId: "products";
|
|
26
|
+
readonly name: "List nutrition products";
|
|
27
|
+
readonly protocol: "http";
|
|
28
|
+
readonly intent: "read";
|
|
29
|
+
readonly method: "GET";
|
|
30
|
+
readonly path: "/products";
|
|
31
|
+
readonly request: {
|
|
32
|
+
readonly parameters: readonly [{
|
|
33
|
+
readonly name: "limit";
|
|
34
|
+
readonly location: "query";
|
|
35
|
+
readonly schema: {
|
|
36
|
+
readonly type: "integer";
|
|
37
|
+
};
|
|
38
|
+
readonly default: 50;
|
|
39
|
+
}, {
|
|
40
|
+
readonly name: "offset";
|
|
41
|
+
readonly location: "query";
|
|
42
|
+
readonly schema: {
|
|
43
|
+
readonly type: "integer";
|
|
44
|
+
};
|
|
45
|
+
readonly default: 0;
|
|
46
|
+
}];
|
|
47
|
+
};
|
|
48
|
+
readonly response: {
|
|
49
|
+
readonly schemaRef: {
|
|
50
|
+
readonly id: "NutritionProductListResponse";
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
readonly pagination: {
|
|
54
|
+
readonly kind: "limit-offset";
|
|
55
|
+
readonly limitParameter: "limit";
|
|
56
|
+
readonly offsetParameter: "offset";
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
readonly 'products.read': {
|
|
60
|
+
readonly id: "products.read";
|
|
61
|
+
readonly endpointId: "products";
|
|
62
|
+
readonly name: "Get nutrition product by ID";
|
|
63
|
+
readonly protocol: "http";
|
|
64
|
+
readonly intent: "read";
|
|
65
|
+
readonly method: "GET";
|
|
66
|
+
readonly path: "/products/:id";
|
|
67
|
+
readonly request: {
|
|
68
|
+
readonly parameters: readonly [DataOperationParameter];
|
|
69
|
+
};
|
|
70
|
+
readonly response: {
|
|
71
|
+
readonly schemaRef: {
|
|
72
|
+
readonly id: "NutritionProductResponse";
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
readonly 'products.getByBarcode': {
|
|
77
|
+
readonly id: "products.getByBarcode";
|
|
78
|
+
readonly endpointId: "products";
|
|
79
|
+
readonly name: "Get nutrition product by barcode";
|
|
80
|
+
readonly protocol: "http";
|
|
81
|
+
readonly intent: "read";
|
|
82
|
+
readonly method: "GET";
|
|
83
|
+
readonly path: "/products/by-barcode/:barcode";
|
|
84
|
+
readonly request: {
|
|
85
|
+
readonly parameters: readonly [{
|
|
86
|
+
readonly name: "barcode";
|
|
87
|
+
readonly location: "path";
|
|
88
|
+
readonly required: true;
|
|
89
|
+
readonly schema: {
|
|
90
|
+
readonly type: "string";
|
|
91
|
+
};
|
|
92
|
+
}];
|
|
93
|
+
};
|
|
94
|
+
readonly response: {
|
|
95
|
+
readonly schemaRef: {
|
|
96
|
+
readonly id: "NutritionProductResponse";
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
readonly 'products.create': {
|
|
101
|
+
readonly id: "products.create";
|
|
102
|
+
readonly endpointId: "products";
|
|
103
|
+
readonly name: "Create nutrition product";
|
|
104
|
+
readonly protocol: "http";
|
|
105
|
+
readonly intent: "create";
|
|
106
|
+
readonly method: "POST";
|
|
107
|
+
readonly path: "/products";
|
|
108
|
+
readonly request: {
|
|
109
|
+
readonly parameters: readonly DataOperationParameter[];
|
|
110
|
+
readonly contentType: "application/json";
|
|
111
|
+
};
|
|
112
|
+
readonly response: {
|
|
113
|
+
readonly status: 201;
|
|
114
|
+
readonly schemaRef: {
|
|
115
|
+
readonly id: "NutritionProductResponse";
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
readonly 'products.update': {
|
|
120
|
+
readonly id: "products.update";
|
|
121
|
+
readonly endpointId: "products";
|
|
122
|
+
readonly name: "Update nutrition product";
|
|
123
|
+
readonly protocol: "http";
|
|
124
|
+
readonly intent: "update";
|
|
125
|
+
readonly method: "PATCH";
|
|
126
|
+
readonly path: "/products/:id";
|
|
127
|
+
readonly request: {
|
|
128
|
+
readonly parameters: readonly [DataOperationParameter, ...{
|
|
129
|
+
required: boolean;
|
|
130
|
+
name: string;
|
|
131
|
+
location: import("@ankhorage/contracts").DataOperationParameterLocation;
|
|
132
|
+
description?: string;
|
|
133
|
+
default?: import("@ankhorage/contracts").DataContractValue;
|
|
134
|
+
schema?: import("@ankhorage/contracts").DataSchema;
|
|
135
|
+
schemaRef?: import("@ankhorage/contracts").DataSchemaRef;
|
|
136
|
+
}[]];
|
|
137
|
+
readonly contentType: "application/json";
|
|
138
|
+
};
|
|
139
|
+
readonly response: {
|
|
140
|
+
readonly schemaRef: {
|
|
141
|
+
readonly id: "NutritionProductResponse";
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
readonly 'products.delete': {
|
|
146
|
+
readonly id: "products.delete";
|
|
147
|
+
readonly endpointId: "products";
|
|
148
|
+
readonly name: "Delete nutrition product";
|
|
149
|
+
readonly protocol: "http";
|
|
150
|
+
readonly intent: "delete";
|
|
151
|
+
readonly method: "DELETE";
|
|
152
|
+
readonly path: "/products/:id";
|
|
153
|
+
readonly request: {
|
|
154
|
+
readonly parameters: readonly [DataOperationParameter];
|
|
155
|
+
};
|
|
156
|
+
readonly response: {
|
|
157
|
+
readonly schemaRef: {
|
|
158
|
+
readonly id: "NutritionProductResponse";
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
//# sourceMappingURL=apiEndpoints.d.ts.map
|
package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiEndpoints.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiEndpoints.d.ts","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/apiEndpoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAwB,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AA8B9F,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8GO,CAAC"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
const productBodyParameters = [
|
|
2
|
+
{ name: 'barcode', location: 'body', required: true, schema: { type: 'string' } },
|
|
3
|
+
{
|
|
4
|
+
name: 'barcodeType',
|
|
5
|
+
location: 'body',
|
|
6
|
+
schema: {
|
|
7
|
+
type: 'string',
|
|
8
|
+
enum: ['ean_8', 'ean_13', 'upc_a', 'upc_e', 'gtin_14', 'unknown'],
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
{ name: 'name', location: 'body', required: true, schema: { type: 'string' } },
|
|
12
|
+
{ name: 'brand', location: 'body', schema: { type: 'string', nullable: true } },
|
|
13
|
+
{ name: 'packageLabel', location: 'body', schema: { type: 'string', nullable: true } },
|
|
14
|
+
{ name: 'nutritionFacts', location: 'body', schemaRef: { id: 'NutritionFacts' } },
|
|
15
|
+
{
|
|
16
|
+
name: 'imageRefs',
|
|
17
|
+
location: 'body',
|
|
18
|
+
schema: { type: 'array', items: { ref: { id: 'NutritionProductImageInput' } } },
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
const productIdParameter = {
|
|
22
|
+
name: 'id',
|
|
23
|
+
location: 'path',
|
|
24
|
+
required: true,
|
|
25
|
+
schema: { type: 'string' },
|
|
26
|
+
};
|
|
27
|
+
export const nutritionApiEndpoints = {
|
|
28
|
+
health: {
|
|
29
|
+
id: 'health',
|
|
30
|
+
kind: 'http',
|
|
31
|
+
path: '/health',
|
|
32
|
+
operations: {
|
|
33
|
+
'health.get': {
|
|
34
|
+
id: 'health.get',
|
|
35
|
+
endpointId: 'health',
|
|
36
|
+
protocol: 'http',
|
|
37
|
+
intent: 'read',
|
|
38
|
+
method: 'GET',
|
|
39
|
+
path: '/health',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
products: {
|
|
44
|
+
id: 'products',
|
|
45
|
+
kind: 'http',
|
|
46
|
+
path: '/products',
|
|
47
|
+
operations: {
|
|
48
|
+
'products.list': {
|
|
49
|
+
id: 'products.list',
|
|
50
|
+
endpointId: 'products',
|
|
51
|
+
name: 'List nutrition products',
|
|
52
|
+
protocol: 'http',
|
|
53
|
+
intent: 'read',
|
|
54
|
+
method: 'GET',
|
|
55
|
+
path: '/products',
|
|
56
|
+
request: {
|
|
57
|
+
parameters: [
|
|
58
|
+
{ name: 'limit', location: 'query', schema: { type: 'integer' }, default: 50 },
|
|
59
|
+
{ name: 'offset', location: 'query', schema: { type: 'integer' }, default: 0 },
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
response: { schemaRef: { id: 'NutritionProductListResponse' } },
|
|
63
|
+
pagination: { kind: 'limit-offset', limitParameter: 'limit', offsetParameter: 'offset' },
|
|
64
|
+
},
|
|
65
|
+
'products.read': {
|
|
66
|
+
id: 'products.read',
|
|
67
|
+
endpointId: 'products',
|
|
68
|
+
name: 'Get nutrition product by ID',
|
|
69
|
+
protocol: 'http',
|
|
70
|
+
intent: 'read',
|
|
71
|
+
method: 'GET',
|
|
72
|
+
path: '/products/:id',
|
|
73
|
+
request: { parameters: [productIdParameter] },
|
|
74
|
+
response: { schemaRef: { id: 'NutritionProductResponse' } },
|
|
75
|
+
},
|
|
76
|
+
'products.getByBarcode': {
|
|
77
|
+
id: 'products.getByBarcode',
|
|
78
|
+
endpointId: 'products',
|
|
79
|
+
name: 'Get nutrition product by barcode',
|
|
80
|
+
protocol: 'http',
|
|
81
|
+
intent: 'read',
|
|
82
|
+
method: 'GET',
|
|
83
|
+
path: '/products/by-barcode/:barcode',
|
|
84
|
+
request: {
|
|
85
|
+
parameters: [
|
|
86
|
+
{
|
|
87
|
+
name: 'barcode',
|
|
88
|
+
location: 'path',
|
|
89
|
+
required: true,
|
|
90
|
+
schema: { type: 'string' },
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
response: { schemaRef: { id: 'NutritionProductResponse' } },
|
|
95
|
+
},
|
|
96
|
+
'products.create': {
|
|
97
|
+
id: 'products.create',
|
|
98
|
+
endpointId: 'products',
|
|
99
|
+
name: 'Create nutrition product',
|
|
100
|
+
protocol: 'http',
|
|
101
|
+
intent: 'create',
|
|
102
|
+
method: 'POST',
|
|
103
|
+
path: '/products',
|
|
104
|
+
request: { parameters: productBodyParameters, contentType: 'application/json' },
|
|
105
|
+
response: { status: 201, schemaRef: { id: 'NutritionProductResponse' } },
|
|
106
|
+
},
|
|
107
|
+
'products.update': {
|
|
108
|
+
id: 'products.update',
|
|
109
|
+
endpointId: 'products',
|
|
110
|
+
name: 'Update nutrition product',
|
|
111
|
+
protocol: 'http',
|
|
112
|
+
intent: 'update',
|
|
113
|
+
method: 'PATCH',
|
|
114
|
+
path: '/products/:id',
|
|
115
|
+
request: {
|
|
116
|
+
parameters: [
|
|
117
|
+
productIdParameter,
|
|
118
|
+
...productBodyParameters.map((parameter) => ({ ...parameter, required: false })),
|
|
119
|
+
],
|
|
120
|
+
contentType: 'application/json',
|
|
121
|
+
},
|
|
122
|
+
response: { schemaRef: { id: 'NutritionProductResponse' } },
|
|
123
|
+
},
|
|
124
|
+
'products.delete': {
|
|
125
|
+
id: 'products.delete',
|
|
126
|
+
endpointId: 'products',
|
|
127
|
+
name: 'Delete nutrition product',
|
|
128
|
+
protocol: 'http',
|
|
129
|
+
intent: 'delete',
|
|
130
|
+
method: 'DELETE',
|
|
131
|
+
path: '/products/:id',
|
|
132
|
+
request: { parameters: [productIdParameter] },
|
|
133
|
+
response: { schemaRef: { id: 'NutritionProductResponse' } },
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
//# sourceMappingURL=apiEndpoints.js.map
|
package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiEndpoints.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiEndpoints.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/apiEndpoints.ts"],"names":[],"m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AChC,QAAQ,EAAE,MAAM;gBAChB,MAAM,EAAE,QAAQ;gBAChB,MAAM,EAAE,OAAO;gBACf,IAAI,EAAE,eAAe;gBACrB,OAAO,EAAE;oBACP,UAAU,EAAE;wBACV,kBAAkB;wBAClB,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;qBACjF;oBACD,WAAW,EAAE,kBAAkB;iBAChC;gBACD,QAAQ,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,0BAA0B,EAAE,EAAE;aAC5D;YACD,iBAAiB,EAAE;gBACjB,EAAE,EAAE,iBAAiB;gBACrB,UAAU,EAAE,UAAU;gBACtB,IAAI,EAAE,0BAA0B;gBAChC,QAAQ,EAAE,MAAM;gBAChB,MAAM,EAAE,QAAQ;gBAChB,MAAM,EAAE,QAAQ;gBAChB,IAAI,EAAE,eAAe;gBACrB,OAAO,EAAE,EAAE,UAAU,EAAE,CAAC,kBAAkB,CAAC,EAAE;gBAC7C,QAAQ,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,0BAA0B,EAAE,EAAE;aAC5D;SACF;KACF;CACsC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { DataSchema } from '@ankhorage/contracts/data';
|
|
2
|
+
export declare const nutritionApiSchemas: {
|
|
3
|
+
readonly NutritionFacts: DataSchema;
|
|
4
|
+
readonly NutritionProductImageInput: DataSchema;
|
|
5
|
+
readonly StorageImageRef: DataSchema;
|
|
6
|
+
readonly NutritionProduct: DataSchema;
|
|
7
|
+
readonly NutritionProductListResponse: {
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly required: readonly ["products"];
|
|
10
|
+
readonly properties: {
|
|
11
|
+
readonly products: {
|
|
12
|
+
readonly type: "array";
|
|
13
|
+
readonly items: {
|
|
14
|
+
readonly ref: {
|
|
15
|
+
readonly id: "NutritionProduct";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
readonly NutritionProductResponse: {
|
|
22
|
+
readonly type: "object";
|
|
23
|
+
readonly required: readonly ["product"];
|
|
24
|
+
readonly properties: {
|
|
25
|
+
readonly product: {
|
|
26
|
+
readonly ref: {
|
|
27
|
+
readonly id: "NutritionProduct";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=apiSchemas.d.ts.map
|
package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/apiSchemas.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiSchemas.d.ts","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/apiSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAsB,MAAM,2BAA2B,CAAC;AAoEhF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiBO,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
const nutritionFactsSchema = {
|
|
2
|
+
type: 'object',
|
|
3
|
+
required: ['basis'],
|
|
4
|
+
properties: {
|
|
5
|
+
basis: { type: 'string', enum: ['per_100g', 'per_100ml', 'per_serving'] },
|
|
6
|
+
energyKj: { type: 'number', nullable: true },
|
|
7
|
+
energyKcal: { type: 'number', nullable: true },
|
|
8
|
+
fatG: { type: 'number', nullable: true },
|
|
9
|
+
saturatedFatG: { type: 'number', nullable: true },
|
|
10
|
+
carbohydratesG: { type: 'number', nullable: true },
|
|
11
|
+
sugarsG: { type: 'number', nullable: true },
|
|
12
|
+
fiberG: { type: 'number', nullable: true },
|
|
13
|
+
proteinG: { type: 'number', nullable: true },
|
|
14
|
+
saltG: { type: 'number', nullable: true },
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
const imageProperties = {
|
|
18
|
+
bucket: { type: 'string' },
|
|
19
|
+
path: { type: 'string' },
|
|
20
|
+
kind: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
enum: ['front', 'nutrition_label', 'ingredients', 'barcode', 'other'],
|
|
23
|
+
},
|
|
24
|
+
publicUrl: { type: 'string', format: 'uri', nullable: true },
|
|
25
|
+
width: { type: 'number', nullable: true },
|
|
26
|
+
height: { type: 'number', nullable: true },
|
|
27
|
+
uploadedAt: { type: 'string', format: 'date-time' },
|
|
28
|
+
uploadedByUserId: { type: 'string', nullable: true },
|
|
29
|
+
};
|
|
30
|
+
const imageRefSchema = {
|
|
31
|
+
type: 'object',
|
|
32
|
+
required: ['id', 'bucket', 'path'],
|
|
33
|
+
properties: { id: { type: 'string' }, ...imageProperties },
|
|
34
|
+
};
|
|
35
|
+
const imageInputSchema = {
|
|
36
|
+
type: 'object',
|
|
37
|
+
required: ['bucket', 'path'],
|
|
38
|
+
properties: imageProperties,
|
|
39
|
+
};
|
|
40
|
+
const productSchema = {
|
|
41
|
+
type: 'object',
|
|
42
|
+
required: ['id', 'barcode', 'normalizedBarcode', 'name', 'createdAt', 'updatedAt'],
|
|
43
|
+
properties: {
|
|
44
|
+
id: { type: 'string' },
|
|
45
|
+
barcode: { type: 'string' },
|
|
46
|
+
normalizedBarcode: { type: 'string' },
|
|
47
|
+
barcodeType: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
enum: ['ean_8', 'ean_13', 'upc_a', 'upc_e', 'gtin_14', 'unknown'],
|
|
50
|
+
},
|
|
51
|
+
name: { type: 'string' },
|
|
52
|
+
brand: { type: 'string', nullable: true },
|
|
53
|
+
packageLabel: { type: 'string', nullable: true },
|
|
54
|
+
nutritionFacts: { ref: { id: 'NutritionFacts' }, nullable: true },
|
|
55
|
+
imageRefs: { type: 'array', items: { ref: { id: 'StorageImageRef' } } },
|
|
56
|
+
createdByUserId: { type: 'string', nullable: true },
|
|
57
|
+
createdAt: { type: 'string', format: 'date-time' },
|
|
58
|
+
updatedAt: { type: 'string', format: 'date-time' },
|
|
59
|
+
deletedAt: { type: 'string', format: 'date-time', nullable: true },
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
export const nutritionApiSchemas = {
|
|
63
|
+
NutritionFacts: nutritionFactsSchema,
|
|
64
|
+
NutritionProductImageInput: imageInputSchema,
|
|
65
|
+
StorageImageRef: imageRefSchema,
|
|
66
|
+
NutritionProduct: productSchema,
|
|
67
|
+
NutritionProductListResponse: {
|
|
68
|
+
type: 'object',
|
|
69
|
+
required: ['products'],
|
|
70
|
+
properties: {
|
|
71
|
+
products: { type: 'array', items: { ref: { id: 'NutritionProduct' } } },
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
NutritionProductResponse: {
|
|
75
|
+
type: 'object',
|
|
76
|
+
required: ['product'],
|
|
77
|
+
properties: { product: { ref: { id: 'NutritionProduct' } } },
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=apiSchemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiSchemas.js","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/apiSchemas.ts"],"names":[],"mappings":"AAEA,MAAM,oBAAoB,GAAe;IACvC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,UAAU,EAAE;QACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,aAAa,CAAC,EAAE;QACzE,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC5C,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC9C,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAA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D,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE;QAClD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE;QAClD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE;KACnE;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,cAAc,EAAE,oBAAoB;IACpC,0BAA0B,EAAE,gBAAgB;IAC5C,eAAe,EAAE,cAAc;IAC/B,gBAAgB,EAAE,aAAa;IAC/B,4BAA4B,EAAE;QAC5B,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,CAAC,UAAU,CAAC;QACtB,UAAU,EAAE;YACV,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE;SACxE;KACF;IACD,wBAAwB,EAAE;QACxB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,CAAC,SAAS,CAAC;QACrB,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE;KAC7D;CACoC,CAAC"}
|
package/dist/templates/starter/categories/food-drink/nutrition-catalog-scan/bindings.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAqC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../../../../../../src/templates/starter/categories/food-drink/nutrition-catalog-scan/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAqC,MAAM,sBAAsB,CAAC;AAqO3F,wBAAgB,kCAAkC,CAChD,QAAQ,EAAE,MAAM,GACf,WAAW,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAqG1C"}
|