@arcgis/languages-sdk-spec 4.33.0-next.98 → 4.34.0-next.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/schema-types/arcade.d.ts +13 -3
- package/dist/schema-types/base.d.ts +17 -18
- package/dist/schema-types/common.d.ts +6 -2
- package/dist/schema-types/index.d.ts +5 -0
- package/dist/schema-types/sql.d.ts +39 -5
- package/dist/schemas/api-item.schema.json +158 -101
- package/dist/schemas/arcade-api-item.schema.json +32 -32
- package/dist/schemas/arcade-profiles.schema.json +1 -0
- package/dist/schemas/profiles.schema.json +6 -1
- package/dist/schemas/sql-api-item.schema.json +63 -160
- package/dist/schemas/sql-profiles.schema.json +5 -1
- package/dist/scripting/index.d.ts +1 -0
- package/dist/scripting/index.js +315 -0
- package/dist/scripting/utilities.d.ts +58 -0
- package/dist/types.d.ts +1 -1
- package/package.json +3 -2
|
@@ -2,12 +2,22 @@ import { BaseSchemaApiItem, GenericSchemaItemBase, BaseSchemaApiFunction, BaseSc
|
|
|
2
2
|
/**
|
|
3
3
|
* Supported function bundles
|
|
4
4
|
*/
|
|
5
|
-
export type ArcadeBundleType = "core" | "data-access" | "database" | "geometry" | "knowledge-graph" | "portal-access" | "track";
|
|
5
|
+
export type ArcadeBundleType = "ai" | "core" | "data-access" | "database" | "geometry" | "knowledge-graph" | "portal-access" | "track";
|
|
6
6
|
/**
|
|
7
7
|
* The profile names this definition belongs to
|
|
8
8
|
*/
|
|
9
9
|
export type ArcadeProfileType = "Attribute Rule Calculation" | "Attribute Rules" | "Dashboard Data" | "Field Calculation" | "Form Calculation" | "GeoAnalytics" | "Popups" | "Tasks" | "Velocity";
|
|
10
|
+
export type ArcadeValueType = "Any" | "Array<Any>" | "Array<Attachment>" | "Array<Boolean>" | "Array<Date>" | "Array<DateOnly>" | "Array<Dictionary>" | "Array<Extent>" | "Array<Feature>" | "Array<Geometry>" | "Array<KnowledgeGraph>" | "Array<Multipoint>" | "Array<Number>" | "Array<Number|Text>" | "Array<Point>" | "Array<Polygon>" | "Array<Polyline>" | "Array<Text>" | "Array<Time>" | "Attachment" | "Boolean" | "Date" | "DateOnly" | "Dictionary" | "Extent" | "Feature" | "FeatureSet" | "FeatureSetCollection" | "Function" | "Geometry" | "KnowledgeGraph" | "Multipoint" | "Null" | "Number" | "Point" | "Polygon" | "Polyline" | "Portal" | "Text" | "Time" | "Voxel";
|
|
10
11
|
export type ArcadeSchemaItemBase = GenericSchemaItemBase<ArcadeBundleType, ArcadeProfileType>;
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Definition for Arcade Api function
|
|
14
|
+
*/
|
|
15
|
+
export type ArcadeApiFunction = BaseSchemaApiFunction<ArcadeBundleType, ArcadeProfileType, ArcadeValueType>;
|
|
16
|
+
/**
|
|
17
|
+
* Definition for Arcade Api constant
|
|
18
|
+
*/
|
|
13
19
|
export type ArcadeApiConstant = BaseSchemaApiConstant<ArcadeBundleType, ArcadeProfileType>;
|
|
20
|
+
/**
|
|
21
|
+
* Arcade Api Item can be either a constant, a function, or an array of functions
|
|
22
|
+
*/
|
|
23
|
+
export type ArcadeApiItem = BaseSchemaApiItem<ArcadeApiFunction, ArcadeApiConstant>;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ArcadeApiConstant, SchemaApiFunction } from '.';
|
|
2
|
+
import { BundleType, ProfileType, SchemaValueType } from './common';
|
|
3
|
+
import { SqlApiFunction } from './sql';
|
|
4
|
+
import { ArcadeApiFunction } from './arcade';
|
|
2
5
|
/**
|
|
3
6
|
* Definition for a schema category
|
|
4
7
|
*/
|
|
@@ -8,10 +11,6 @@ export interface SchemaCategory {
|
|
|
8
11
|
page: string;
|
|
9
12
|
hideSummaryList?: boolean;
|
|
10
13
|
}
|
|
11
|
-
/**
|
|
12
|
-
* The collection of supported types.
|
|
13
|
-
*/
|
|
14
|
-
export type SchemaValueType = "Any" | "Array<Any>" | "Array<Attachment>" | "Array<Boolean>" | "Array<Date>" | "Array<DateOnly>" | "Array<Dictionary>" | "Array<Extent>" | "Array<Feature>" | "Array<Geometry>" | "Array<KnowledgeGraph>" | "Array<Multipoint>" | "Array<Number>" | "Array<Number|Text>" | "Array<Point>" | "Array<Polygon>" | "Array<Polyline>" | "Array<Text>" | "Array<Time>" | "Attachment" | "Boolean" | "Date" | "DateOnly" | "Dictionary" | "Extent" | "Feature" | "FeatureSet" | "FeatureSetCollection" | "Function" | "Geometry" | "KnowledgeGraph" | "Multipoint" | "Null" | "Number" | "Point" | "Polygon" | "Polyline" | "Portal" | "Text" | "Time" | "Voxel";
|
|
15
14
|
export interface GenericSchemaItemBase<Bundle extends BundleType, Profile extends ProfileType> {
|
|
16
15
|
/**
|
|
17
16
|
* The name of the function or constant. Must start with a capital letter.
|
|
@@ -66,28 +65,28 @@ export interface BaseSchemaApiConstant<Bundle extends BundleType = BundleType, P
|
|
|
66
65
|
*/
|
|
67
66
|
isConstant: true;
|
|
68
67
|
}
|
|
69
|
-
export type SchemaReturnValue = SchemaReturnDefinition |
|
|
68
|
+
export type SchemaReturnValue<ValueType extends SchemaValueType = SchemaValueType> = SchemaReturnDefinition<ValueType> | ValueType | ValueType[];
|
|
70
69
|
/**
|
|
71
70
|
* Describes an Api Function.
|
|
72
71
|
*/
|
|
73
|
-
export interface BaseSchemaApiFunction<Bundle extends BundleType, Profile extends ProfileType> extends GenericSchemaItemBase<Bundle, Profile> {
|
|
72
|
+
export interface BaseSchemaApiFunction<Bundle extends BundleType, Profile extends ProfileType, ValueType extends SchemaValueType> extends GenericSchemaItemBase<Bundle, Profile> {
|
|
74
73
|
/**
|
|
75
74
|
* For function this property is optional and always false.
|
|
76
75
|
*/
|
|
77
|
-
isConstant?:
|
|
76
|
+
isConstant?: boolean;
|
|
78
77
|
/**
|
|
79
78
|
* The set of function parameters.
|
|
80
79
|
*/
|
|
81
|
-
parameters?: SchemaProperty[];
|
|
80
|
+
parameters?: SchemaProperty<ValueType>[];
|
|
82
81
|
/**
|
|
83
82
|
* The type of data returned by the function.
|
|
84
83
|
*/
|
|
85
|
-
returnValue?: SchemaReturnValue
|
|
84
|
+
returnValue?: SchemaReturnValue<ValueType>;
|
|
86
85
|
}
|
|
87
86
|
/**
|
|
88
87
|
* Describes the properties for the type Property
|
|
89
88
|
*/
|
|
90
|
-
export interface SchemaProperty {
|
|
89
|
+
export interface SchemaProperty<ValueType extends SchemaValueType = SchemaValueType> {
|
|
91
90
|
/**
|
|
92
91
|
* The name of the property.
|
|
93
92
|
* @pattern ^([a-z]+[a-zA-Z0-9_]*|\[.*\])$
|
|
@@ -96,7 +95,7 @@ export interface SchemaProperty {
|
|
|
96
95
|
/**
|
|
97
96
|
* The data type of the property value. If the property supports more than one type then use an array.
|
|
98
97
|
*/
|
|
99
|
-
type:
|
|
98
|
+
type: ValueType | ValueType[];
|
|
100
99
|
/**
|
|
101
100
|
* The description for the property.
|
|
102
101
|
*/
|
|
@@ -108,16 +107,16 @@ export interface SchemaProperty {
|
|
|
108
107
|
/**
|
|
109
108
|
* The properties if the type is Dictionary.
|
|
110
109
|
*/
|
|
111
|
-
properties?: SchemaProperty[];
|
|
110
|
+
properties?: SchemaProperty<ValueType>[];
|
|
112
111
|
}
|
|
113
112
|
/**
|
|
114
113
|
* Describes the type fo data returned by a function.
|
|
115
114
|
*/
|
|
116
|
-
export interface SchemaReturnDefinition {
|
|
115
|
+
export interface SchemaReturnDefinition<T extends SchemaValueType = SchemaValueType> {
|
|
117
116
|
/**
|
|
118
117
|
* The data type of the value returned.
|
|
119
118
|
*/
|
|
120
|
-
type:
|
|
119
|
+
type: T;
|
|
121
120
|
/**
|
|
122
121
|
* A description for for the value returned.
|
|
123
122
|
*/
|
|
@@ -125,7 +124,7 @@ export interface SchemaReturnDefinition {
|
|
|
125
124
|
/**
|
|
126
125
|
* The properties if the type returned is a Dictionary
|
|
127
126
|
*/
|
|
128
|
-
properties?: SchemaProperty[];
|
|
127
|
+
properties?: SchemaProperty<T>[];
|
|
129
128
|
}
|
|
130
129
|
/**
|
|
131
130
|
* Describes an example
|
|
@@ -156,9 +155,9 @@ export interface SchemaResourceLink {
|
|
|
156
155
|
/**
|
|
157
156
|
* Definition for simple item
|
|
158
157
|
*/
|
|
159
|
-
export type
|
|
158
|
+
export type SingularApiItem = ArcadeApiConstant | ArcadeApiFunction | SqlApiFunction;
|
|
160
159
|
/**
|
|
161
160
|
* Definition for a constant or a function.
|
|
162
161
|
* An Api Item can be either a constant, a function, or an array of functions
|
|
163
162
|
*/
|
|
164
|
-
export type BaseSchemaApiItem<
|
|
163
|
+
export type BaseSchemaApiItem<LanguageApiFunction extends SchemaApiFunction, LanguageApiConstant extends BaseSchemaApiConstant | undefined = undefined> = LanguageApiFunction | LanguageApiFunction[] | (LanguageApiConstant extends undefined ? never : LanguageApiConstant);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ArcadeBundleType, ArcadeProfileType } from './arcade';
|
|
2
|
-
import { SqlBundleType, SqlProfileType } from './sql';
|
|
1
|
+
import { ArcadeBundleType, ArcadeProfileType, ArcadeValueType } from './arcade';
|
|
2
|
+
import { SqlBundleType, SqlProfileType, SqlValueType } from './sql';
|
|
3
3
|
/**
|
|
4
4
|
* Union of bundle types that can be used in any sdk schema
|
|
5
5
|
*/
|
|
@@ -8,3 +8,7 @@ export type BundleType = ArcadeBundleType | SqlBundleType;
|
|
|
8
8
|
* Union of profile types that can be used in any sdk schema
|
|
9
9
|
*/
|
|
10
10
|
export type ProfileType = ArcadeProfileType | SqlProfileType;
|
|
11
|
+
/**
|
|
12
|
+
* The collection of supported return types.
|
|
13
|
+
*/
|
|
14
|
+
export type SchemaValueType = ArcadeValueType | SqlValueType;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { ArcadeApiFunction, ArcadeApiItem, ArcadeSchemaItemBase } from './arcade';
|
|
2
2
|
import { SqlApiFunction, SqlApiItem, SqlSchemaItemBase } from './sql';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
export type { ArcadeApiItem, ArcadeApiConstant } from './arcade';
|
|
7
|
+
export type { SqlApiItem } from './sql';
|
|
3
8
|
/**
|
|
4
9
|
* Union of API items that can be used in any sdk schema
|
|
5
10
|
*/
|
|
@@ -2,20 +2,54 @@ import { BaseSchemaApiFunction, BaseSchemaApiItem, GenericSchemaItemBase } from
|
|
|
2
2
|
/**
|
|
3
3
|
* Supported function bundles
|
|
4
4
|
*/
|
|
5
|
-
export type SqlBundleType = "
|
|
5
|
+
export type SqlBundleType = "date" | "numeric" | "string";
|
|
6
6
|
/**
|
|
7
7
|
* Supported sql profile names
|
|
8
8
|
*/
|
|
9
9
|
export type SqlProfileType = "Field Calculation";
|
|
10
|
+
export type SqlValueType = "Datetime" | "Number" | "String";
|
|
10
11
|
/**
|
|
11
12
|
* Narrowed schema item type for sql
|
|
12
13
|
*/
|
|
13
14
|
export type SqlSchemaItemBase = GenericSchemaItemBase<SqlBundleType, SqlProfileType>;
|
|
14
15
|
/**
|
|
15
|
-
* Narrowed api
|
|
16
|
+
* Narrowed api function type for sql
|
|
16
17
|
*/
|
|
17
|
-
export type
|
|
18
|
+
export type SqlApiFunction = BaseSchemaApiFunction<SqlBundleType, SqlProfileType, SqlValueType> & {
|
|
19
|
+
/**
|
|
20
|
+
* The name of the function.
|
|
21
|
+
*/
|
|
22
|
+
name: string;
|
|
23
|
+
/**
|
|
24
|
+
* SQL functions may be "special registers" that are not called like regular functions.
|
|
25
|
+
* For example, CURRENT_DATE is a special register.
|
|
26
|
+
* These functions are not called with parentheses or arguments.
|
|
27
|
+
*/
|
|
28
|
+
isSpecialRegister?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The set of keywords that are used in the function.
|
|
31
|
+
*/
|
|
32
|
+
keywords?: SchemaKeyword[];
|
|
33
|
+
};
|
|
18
34
|
/**
|
|
19
|
-
* Narrowed api
|
|
35
|
+
* Narrowed api item type for sql. Sql does not have constants so all sql items are "functions".
|
|
36
|
+
*/
|
|
37
|
+
export type SqlApiItem = BaseSchemaApiItem<SqlApiFunction>;
|
|
38
|
+
/**
|
|
39
|
+
* Describes a keyword used in a function
|
|
20
40
|
*/
|
|
21
|
-
|
|
41
|
+
interface SchemaKeyword {
|
|
42
|
+
/**
|
|
43
|
+
* The name of the keyword.
|
|
44
|
+
*/
|
|
45
|
+
name: string;
|
|
46
|
+
/**
|
|
47
|
+
* The description for the keyword.
|
|
48
|
+
*/
|
|
49
|
+
description: string;
|
|
50
|
+
/**
|
|
51
|
+
* (optional) position of the keyword in the function signature, default is to interlace with parameters
|
|
52
|
+
*/
|
|
53
|
+
position?: number;
|
|
54
|
+
}
|
|
55
|
+
export {};
|