@spotto/contract 1.0.70-alpha.5 → 1.0.70-alpha.7
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/ai/expression/index.d.ts +2 -0
- package/dist/ai/expression/index.js +19 -0
- package/dist/ai/expression/index.js.map +1 -0
- package/dist/ai/expression/request.d.ts +27 -0
- package/dist/ai/expression/request.js +3 -0
- package/dist/ai/expression/request.js.map +1 -0
- package/dist/ai/expression/response.d.ts +23 -0
- package/dist/ai/expression/response.js +3 -0
- package/dist/ai/expression/response.js.map +1 -0
- package/dist/ai/index.d.ts +1 -0
- package/dist/ai/index.js +18 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./request"), exports);
|
|
18
|
+
__exportStar(require("./response"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ai/expression/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,6CAA0B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FieldDataType, FieldInputType, FieldSource } from '../../fields';
|
|
2
|
+
export declare type AiExpressionMode = 'readinessRule' | 'computedField';
|
|
3
|
+
export declare type AiExpressionProvider = 'openai' | 'anthropic';
|
|
4
|
+
/**
|
|
5
|
+
* A field the AI may reference, supplied inline by the client (which already
|
|
6
|
+
* holds the type's resolved fields). A trimmed view of `GetFieldResponse` — the
|
|
7
|
+
* server builds the preamble + validates against this, so the client never has
|
|
8
|
+
* to round-trip the schema.
|
|
9
|
+
*/
|
|
10
|
+
export interface AiExpressionField {
|
|
11
|
+
name: string;
|
|
12
|
+
dataType: FieldDataType;
|
|
13
|
+
inputType?: FieldInputType;
|
|
14
|
+
options?: string[];
|
|
15
|
+
label?: string;
|
|
16
|
+
source?: FieldSource;
|
|
17
|
+
}
|
|
18
|
+
export interface PostAiExpressionRequest {
|
|
19
|
+
/** Plain-language description of the rule / calculation. */
|
|
20
|
+
prompt: string;
|
|
21
|
+
/** Which kind of expression to produce. */
|
|
22
|
+
mode: AiExpressionMode;
|
|
23
|
+
/** The fields the expression may reference (the type's resolved fields). */
|
|
24
|
+
fields: AiExpressionField[];
|
|
25
|
+
/** Required for `computedField`: the field being computed (excluded from refs). */
|
|
26
|
+
fieldName?: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/ai/expression/request.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface PostAiExpressionResponse {
|
|
2
|
+
/** true when a usable expression was produced (and validated, for readiness). */
|
|
3
|
+
ok: boolean;
|
|
4
|
+
/** The generated excelexp expression, or null when declined / unbuildable. */
|
|
5
|
+
expression: string | null;
|
|
6
|
+
/**
|
|
7
|
+
* readinessRule: the display text shown when the rule fires — house-style, with
|
|
8
|
+
* `{FieldName}` placeholders. null for computedField, and null on a decline.
|
|
9
|
+
*/
|
|
10
|
+
message: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* readinessRule severity, set ONLY from explicit severity words in the prompt:
|
|
13
|
+
* 1 = amber, 2 = red. null when the prompt stated no severity (the author picks)
|
|
14
|
+
* or for computedField.
|
|
15
|
+
*/
|
|
16
|
+
level: 1 | 2 | null;
|
|
17
|
+
/** Author-facing explanation/caveat: why it declined, or a one-line caveat. */
|
|
18
|
+
note: string | null;
|
|
19
|
+
/** Server-side compiler findings (empty when the expression compiles cleanly). */
|
|
20
|
+
warnings: string[];
|
|
21
|
+
/** The model that answered. */
|
|
22
|
+
model: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/ai/expression/response.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './expression';
|
package/dist/ai/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./expression"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./shared"), exports);
|
|
18
|
+
__exportStar(require("./ai"), exports);
|
|
18
19
|
__exportStar(require("./events"), exports);
|
|
19
20
|
__exportStar(require("./integrations"), exports);
|
|
20
21
|
__exportStar(require("./labels"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,2CAAwB;AACxB,iDAA8B;AAC9B,2CAAwB;AACxB,2CAAwB;AACxB,8CAA2B;AAC3B,6CAA0B;AAC1B,kDAA+B;AAC/B,4CAAyB;AACzB,0CAAuB;AACvB,yCAAsB;AACtB,8CAA2B;AAC3B,0CAAuB;AACvB,8CAA2B;AAC3B,0CAAuB;AACvB,2CAAwB;AACxB,8CAA2B;AAC3B,2CAAwB;AACxB,8CAA2B;AAC3B,2CAAwB;AACxB,4CAAyB;AACzB,wCAAqB;AACrB,0CAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,uCAAoB;AACpB,2CAAwB;AACxB,iDAA8B;AAC9B,2CAAwB;AACxB,2CAAwB;AACxB,8CAA2B;AAC3B,6CAA0B;AAC1B,kDAA+B;AAC/B,4CAAyB;AACzB,0CAAuB;AACvB,yCAAsB;AACtB,8CAA2B;AAC3B,0CAAuB;AACvB,8CAA2B;AAC3B,0CAAuB;AACvB,2CAAwB;AACxB,8CAA2B;AAC3B,2CAAwB;AACxB,8CAA2B;AAC3B,2CAAwB;AACxB,4CAAyB;AACzB,wCAAqB;AACrB,0CAAuB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spotto/contract",
|
|
3
3
|
"license": "ISC",
|
|
4
|
-
"version": "1.0.70-alpha.
|
|
4
|
+
"version": "1.0.70-alpha.7",
|
|
5
5
|
"description": "Spotto's API Contract type definitions",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"files": [
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
"@types/geojson": "^7946.0.11",
|
|
19
19
|
"shx": "^0.3.4"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "0aea12e3fb0ac4b03042419430b59629caeb272a"
|
|
22
22
|
}
|