@arcgis/languages-sdk-spec 4.33.0-next.13 → 4.33.0-next.132

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/index.d.ts CHANGED
@@ -1,415 +1,4 @@
1
- import { CompletionItem } from 'vscode-languageserver-types';
2
- export { CompletionItem } from 'vscode-languageserver-types';
3
-
4
- /**
5
- * Supported function bundles
6
- */
7
- type SqlBundleType = "core";
8
- /**
9
- * Supported sql profile names
10
- */
11
- type SqlProfileType = "Field Calculation";
12
- /**
13
- * Narrowed schema item type for sql
14
- */
15
- type SqlSchemaItemBase = GenericSchemaItemBase<SqlBundleType, SqlProfileType>;
16
- /**
17
- * Narrowed api item type for sql
18
- */
19
- type SqlApiItem = BaseSchemaApiItem<SqlBundleType, SqlProfileType>;
20
- /**
21
- * Narrowed api function type for sql
22
- */
23
- type SqlApiFunction = BaseSchemaApiFunction<SqlBundleType, SqlProfileType>;
24
-
25
- /**
26
- * Union of bundle types that can be used in any sdk schema
27
- */
28
- type BundleType = ArcadeBundleType | SqlBundleType;
29
- /**
30
- * Union of profile types that can be used in any sdk schema
31
- */
32
- type ProfileType = ArcadeProfileType | SqlProfileType;
33
-
34
- /**
35
- * Definition for a schema category
36
- */
37
- interface SchemaCategory {
38
- title: string;
39
- description: string[] | string;
40
- page: string;
41
- hideSummaryList?: boolean;
42
- }
43
- /**
44
- * The collection of supported types.
45
- */
46
- 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";
47
- interface GenericSchemaItemBase<Bundle extends BundleType, Profile extends ProfileType> {
48
- /**
49
- * The name of the function or constant. Must start with a capital letter.
50
- * @pattern ^[A-Z]+[a-zA-Z0-9.]*$
51
- */
52
- name: string;
53
- /**
54
- * A nice description for the constant or function. It can leverage Github Flavored Markdown formatting.
55
- */
56
- description: string[] | string;
57
- /**
58
- * Version string. Format x.y.
59
- * @pattern ^1\.\d+$
60
- */
61
- sinceVersion?: string;
62
- /**
63
- * Indicates if the item should not be documented.
64
- */
65
- disableDocumentation?: boolean;
66
- /**
67
- * The profiles the constant or the function belongs to.
68
- */
69
- profiles?: Profile[];
70
- /**
71
- * The bundle the constant or the function belongs to.
72
- */
73
- bundle: Bundle;
74
- /**
75
- * The relative path to an image to illustate the constant or the function.
76
- */
77
- image?: string;
78
- /**
79
- * The code that will be injected in the classic editor. Must start with a capital letter and match the name of the funtion or constant.
80
- * @pattern ^[A-Z]+.*$
81
- */
82
- snippet: string;
83
- /**
84
- * The collection of examples
85
- */
86
- examples?: SchemaExample[];
87
- /**
88
- * A collection of links to resources
89
- */
90
- resourceLinks?: SchemaResourceLink[];
91
- }
92
- /**
93
- * Describes an Api Constant
94
- */
95
- interface BaseSchemaApiConstant<Bundle extends BundleType = BundleType, Profile extends ProfileType = ProfileType> extends GenericSchemaItemBase<Bundle, Profile> {
96
- /**
97
- * For constant, the property is mandatory and always true
98
- */
99
- isConstant: true;
100
- }
101
- type SchemaReturnValue = SchemaReturnDefinition | SchemaValueType | SchemaValueType[];
102
- /**
103
- * Describes an Api Function.
104
- */
105
- interface BaseSchemaApiFunction<Bundle extends BundleType, Profile extends ProfileType> extends GenericSchemaItemBase<Bundle, Profile> {
106
- /**
107
- * For function this property is optional and always false.
108
- */
109
- isConstant?: false;
110
- /**
111
- * The set of function parameters.
112
- */
113
- parameters?: SchemaProperty[];
114
- /**
115
- * The type of data returned by the function.
116
- */
117
- returnValue?: SchemaReturnValue;
118
- }
119
- /**
120
- * Describes the properties for the type Property
121
- */
122
- interface SchemaProperty {
123
- /**
124
- * The name of the property.
125
- * @pattern ^([a-z]+[a-zA-Z0-9_]*|\[.*\])$
126
- */
127
- name: string;
128
- /**
129
- * The data type of the property value. If the property supports more than one type then use an array.
130
- */
131
- type: SchemaValueType | SchemaValueType[];
132
- /**
133
- * The description for the property.
134
- */
135
- description: string[] | string;
136
- /**
137
- * Indicates if the property is optional.
138
- */
139
- optional?: boolean;
140
- /**
141
- * The properties if the type is Dictionary.
142
- */
143
- properties?: SchemaProperty[];
144
- }
145
- /**
146
- * Describes the type fo data returned by a function.
147
- */
148
- interface SchemaReturnDefinition {
149
- /**
150
- * The data type of the value returned.
151
- */
152
- type: SchemaValueType;
153
- /**
154
- * A description for for the value returned.
155
- */
156
- description?: string[] | string;
157
- /**
158
- * The properties if the type returned is a Dictionary
159
- */
160
- properties?: SchemaProperty[];
161
- }
162
- /**
163
- * Describes an example
164
- */
165
- interface SchemaExample {
166
- /**
167
- * A description for the example.
168
- */
169
- description?: string[] | string;
170
- /**
171
- * Either a single line string or an array of strings.
172
- */
173
- code: string[] | string;
174
- }
175
- /**
176
- * Describes a link to additional resources
177
- */
178
- interface SchemaResourceLink {
179
- /**
180
- * The text used to describe the resource link.
181
- */
182
- linkText: string;
183
- /**
184
- * The url to the resource.
185
- */
186
- url: string;
187
- }
188
- /**
189
- * Definition for simple item
190
- */
191
- type SchemaSimpleApiItem<Bundle extends BundleType = BundleType, Profile extends ProfileType = ProfileType> = BaseSchemaApiConstant<Bundle, Profile> | BaseSchemaApiFunction<Bundle, Profile>;
192
- /**
193
- * Definition for a constant or a function.
194
- * An Api Item can be either a constant, a function, or an array of functions
195
- */
196
- type BaseSchemaApiItem<Bundle extends BundleType, Profile extends ProfileType = ProfileType> = BaseSchemaApiFunction<Bundle, Profile>[] | SchemaSimpleApiItem<Bundle, Profile>;
197
-
198
- /**
199
- * Supported function bundles
200
- */
201
- type ArcadeBundleType = "core" | "data-access" | "database" | "geometry" | "knowledge-graph" | "portal-access" | "track";
202
- /**
203
- * The profile names this definition belongs to
204
- */
205
- type ArcadeProfileType = "Attribute Rule Calculation" | "Attribute Rules" | "Dashboard Data" | "Field Calculation" | "Form Calculation" | "GeoAnalytics" | "Popups" | "Tasks" | "Velocity";
206
- type ArcadeSchemaItemBase = GenericSchemaItemBase<ArcadeBundleType, ArcadeProfileType>;
207
- type ArcadeApiItem = BaseSchemaApiItem<ArcadeBundleType, ArcadeProfileType>;
208
- type ArcadeApiFunction = BaseSchemaApiFunction<ArcadeBundleType, ArcadeProfileType>;
209
-
210
- /**
211
- * Describes a profile
212
- */
213
- interface BaseSdkPredefinedProfile<ProfileId extends string, Bundle extends string> {
214
- /**
215
- * Profile name for UI
216
- */
217
- name: string;
218
- /**
219
- * Profile id for docs
220
- */
221
- id: ProfileId;
222
- /**
223
- * Function bundles enabled for this profile
224
- */
225
- bundles: Bundle[];
226
- /**
227
- * Variable describing name, type, and providing description
228
- */
229
- variables: SdkVariable[];
230
- }
231
- /**
232
- * Supported profile variable types
233
- */
234
- type SdkVariableType = "array" | "boolean" | "date" | "dateOnly" | "dictionary" | "feature" | "featureSet" | "featureSetCollection" | "geometry" | "knowledgeGraph" | "number" | "text" | "time" | "voxel";
235
- /**
236
- * Describes variables
237
- */
238
- interface SdkVariableBase {
239
- /**
240
- * Name of the variable.
241
- */
242
- name: string;
243
- /**
244
- * Type of the variable.
245
- */
246
- type: SdkVariableType;
247
- /**
248
- * Description of the variable.
249
- */
250
- description?: string;
251
- }
252
- /**
253
- * A variable that represents a simple type (boolean, number, feature, etc.)
254
- */
255
- interface SdkValueVariable extends SdkVariableBase {
256
- type: Exclude<SdkVariableType, "dictionary">;
257
- }
258
- /**
259
- * A dictionary variable
260
- */
261
- interface SdkDictionaryVariable extends SdkVariableBase {
262
- type: "dictionary";
263
- properties: SdkVariable[];
264
- }
265
- /**
266
- * Profile variable
267
- */
268
- type SdkVariable = SdkDictionaryVariable | SdkValueVariable;
269
-
270
- /**
271
- * The list of supported profiles
272
- */
273
- type ArcadeProfileId = "aggregate-field" | "alias" | "attribute-rule-calculation" | "attribute-rule-constraint" | "attribute-rule-validation" | "dashboard-data" | "dashboard-indicator-formatting" | "dashboard-list-formatting" | "dashboard-table-formatting" | "data-pipelines" | "dictionary-renderer" | "feature-display-title" | "feature-z" | "field-calculation" | "field-mapping" | "form-calculation" | "form-constraint" | "geoanalytics" | "geotrigger-notification" | "labeling" | "layout" | "location-update-constraint" | "measure-visualization" | "minimalist" | "model-builder" | "popup-element-feature-reduction" | "popup-element-voxel" | "popup-element" | "popup-feature-reduction" | "popup-voxel" | "popup" | "quick-capture" | "tasks" | "velocity" | "visualization";
274
- /**
275
- * The predefined profiles for the Arcade language
276
- */
277
- type ArcadeSdkPredefinedProfile = BaseSdkPredefinedProfile<ArcadeProfileId, ArcadeBundleType>;
278
- type ArcadeSdkPredefinedProfiles = BaseSdkPredefinedProfile<ArcadeProfileId, ArcadeBundleType>[];
279
-
280
- /**
281
- * The list of supported profiles
282
- */
283
- type SqlProfileId = "field-calculation";
284
- /**
285
- * The predefined profiles for the SQL language
286
- */
287
- type SqlSdkPredefinedProfile = BaseSdkPredefinedProfile<SqlProfileId, SqlBundleType>;
288
- type SqlSdkPredefinedProfiles = BaseSdkPredefinedProfile<SqlProfileId, SqlBundleType>[];
289
-
290
- type SdkPredefinedProfile = ArcadeSdkPredefinedProfile | SqlSdkPredefinedProfile;
291
- type SdkPredefinedProfiles = SdkPredefinedProfile[];
292
- /**
293
- * A union of all language profile ids
294
- */
295
- type ProfileId = ArcadeProfileId | SqlProfileId;
296
-
297
- /**
298
- * Union of API items that can be used in any sdk schema
299
- */
300
- type SchemaApiItem = ArcadeApiItem | SqlApiItem;
301
- /**
302
- * Union of API functions that can be used in any sdk schema
303
- */
304
- type SchemaApiFunction = ArcadeApiFunction | SqlApiFunction;
305
- /**
306
- * Union of schema items that can be used in any sdk schema
307
- */
308
- type SchemaItemBase = ArcadeSchemaItemBase | SqlSchemaItemBase;
309
-
310
- /**
311
- * Represents an api category and its items
312
- */
313
- interface SdkCategory {
314
- /**
315
- * The unique ID for the category
316
- */
317
- id: string;
318
- /**
319
- * The title for the category
320
- */
321
- title: string;
322
- /**
323
- * The collection of api items for the category
324
- */
325
- items: SdkItem[];
326
- }
327
- interface SdkItemBase {
328
- /**
329
- * The name of the function or constant.
330
- */
331
- name: string;
332
- /**
333
- * The version string when the api item was introduced. If undefined then it was from the origin.
334
- */
335
- sinceVersion?: string;
336
- /**
337
- * The api bundle this item belongs to.
338
- */
339
- bundle: BundleType;
340
- /**
341
- * Markdown description of the item.
342
- */
343
- description: string;
344
- /**
345
- * Markdown containing examples.
346
- */
347
- examples: string;
348
- /**
349
- * Link for additional information about the item.
350
- */
351
- link: string;
352
- /**
353
- * Completion item directly leveraged by the editor.
354
- */
355
- completion: CompletionItem;
356
- /**
357
- * Indicates if the documentation for this item should be disabled.
358
- */
359
- disableDocumentation?: boolean;
360
- }
361
- /**
362
- * Represents a constant in the arcade api.
363
- */
364
- interface SdkConstant extends SdkItemBase {
365
- type: "constant";
366
- }
367
- /**
368
- * Represents a function in the arcade api
369
- */
370
- interface SdkFunction extends SdkItemBase {
371
- type: "function";
372
- /**
373
- * Information leveraged by the editor to validate function call.
374
- * Indicates the minimum number of expected parameters and the maximum number of parameters expected.
375
- */
376
- parametersInfo: {
377
- min: number;
378
- max: number;
379
- };
380
- }
381
- /**
382
- * Represents an item in the arcade api.
383
- */
384
- type SdkItem = SdkConstant | SdkFunction | SdkFunction[];
385
-
386
- interface T9NApiRoot {
387
- resources: Record<string, string>;
388
- categories: T9NCategories;
389
- }
390
- type T9NCategories = Record<string, T9NCategory>;
391
- interface T9NCategory {
392
- title: string;
393
- description?: Record<string, string>;
394
- items: T9NApiItems;
395
- }
396
- type T9NResource = Record<string, string>;
397
- type T9NApiItems = Record<string, Record<string, T9NApiItem> | T9NApiItem>;
398
- interface T9NProperty {
399
- description?: Record<string, string>;
400
- properties?: Record<string, T9NProperty>;
401
- }
402
- interface T9NApiItem {
403
- description: Record<string, string>;
404
- examples?: Record<string, Record<string, string>>;
405
- parameters?: Record<string, T9NProperty>;
406
- returnValue?: T9NProperty;
407
- }
408
- type T9NProfiles = Record<string, T9NProfileVariables>;
409
- type T9NProfileVariables = Record<string, T9NProfileVariable>;
410
- interface T9NProfileVariable {
411
- description?: string;
412
- properties?: T9NProfileVariables;
413
- }
414
-
415
- export type { ArcadeProfileId, ArcadeSdkPredefinedProfile, ArcadeSdkPredefinedProfiles, BaseSchemaApiConstant, BaseSchemaApiFunction, BaseSchemaApiItem, BaseSdkPredefinedProfile, BundleType, GenericSchemaItemBase, ProfileId, ProfileType, SchemaApiFunction, SchemaApiItem, SchemaCategory, SchemaExample, SchemaItemBase, SchemaProperty, SchemaResourceLink, SchemaReturnDefinition, SchemaReturnValue, SchemaSimpleApiItem, SchemaValueType, SdkCategory, SdkConstant, SdkDictionaryVariable, SdkFunction, SdkItem, SdkItemBase, SdkPredefinedProfile, SdkPredefinedProfiles, SdkValueVariable, SdkVariable, SdkVariableBase, SdkVariableType, SqlProfileId, SqlSdkPredefinedProfile, SqlSdkPredefinedProfiles, T9NApiItem, T9NApiItems, T9NApiRoot, T9NCategories, T9NCategory, T9NProfileVariable, T9NProfileVariables, T9NProfiles, T9NProperty, T9NResource };
1
+ export type * from './profile-types';
2
+ export type * from './schema-types';
3
+ export type * from './types';
4
+ export type * from './t9n-types';
package/dist/index.js CHANGED
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,11 @@
1
+ import { ArcadeBundleType } from '../schema-types/arcade';
2
+ import { BaseSdkPredefinedProfile } from './base';
3
+ /**
4
+ * The list of supported profiles
5
+ */
6
+ export type ArcadeProfileId = "aggregate-field" | "alias" | "attribute-rule-calculation" | "attribute-rule-constraint" | "attribute-rule-validation" | "dashboard-data" | "dashboard-indicator-formatting" | "dashboard-list-formatting" | "dashboard-table-formatting" | "data-pipelines" | "dictionary-renderer" | "feature-display-title" | "feature-z" | "field-calculation" | "field-mapping" | "form-calculation" | "form-constraint" | "geoanalytics" | "geotrigger-notification" | "labeling" | "layout" | "location-update-constraint" | "measure-visualization" | "minimalist" | "model-builder" | "popup-element-feature-reduction" | "popup-element-voxel" | "popup-element" | "popup-feature-reduction" | "popup-voxel" | "popup" | "quick-capture" | "tasks" | "velocity" | "visualization";
7
+ /**
8
+ * The predefined profiles for the Arcade language
9
+ */
10
+ export type ArcadeSdkPredefinedProfile = BaseSdkPredefinedProfile<ArcadeProfileId, ArcadeBundleType>;
11
+ export type ArcadeSdkPredefinedProfiles = BaseSdkPredefinedProfile<ArcadeProfileId, ArcadeBundleType>[];
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Describes a profile
3
+ */
4
+ export interface BaseSdkPredefinedProfile<ProfileId extends string, Bundle extends string> {
5
+ /**
6
+ * Profile name for UI
7
+ */
8
+ name: string;
9
+ /**
10
+ * Profile id for docs
11
+ */
12
+ id: ProfileId;
13
+ /**
14
+ * Function bundles enabled for this profile
15
+ */
16
+ bundles: Bundle[];
17
+ /**
18
+ * Variable describing name, type, and providing description
19
+ */
20
+ variables: SdkVariable[];
21
+ }
22
+ /**
23
+ * Supported profile variable types
24
+ */
25
+ export type SdkVariableType = "array" | "boolean" | "date" | "dateOnly" | "dictionary" | "feature" | "featureSet" | "featureSetCollection" | "geometry" | "knowledgeGraph" | "number" | "text" | "time" | "voxel";
26
+ /**
27
+ * Describes variables
28
+ */
29
+ export interface SdkVariableBase {
30
+ /**
31
+ * Name of the variable.
32
+ */
33
+ name: string;
34
+ /**
35
+ * Type of the variable.
36
+ */
37
+ type: SdkVariableType;
38
+ /**
39
+ * Description of the variable.
40
+ */
41
+ description?: string;
42
+ }
43
+ /**
44
+ * A variable that represents a simple type (boolean, number, feature, etc.)
45
+ */
46
+ export interface SdkValueVariable extends SdkVariableBase {
47
+ type: Exclude<SdkVariableType, "dictionary">;
48
+ }
49
+ /**
50
+ * A dictionary variable
51
+ */
52
+ export interface SdkDictionaryVariable extends SdkVariableBase {
53
+ type: "dictionary";
54
+ properties: SdkVariable[];
55
+ }
56
+ /**
57
+ * Profile variable
58
+ */
59
+ export type SdkVariable = SdkDictionaryVariable | SdkValueVariable;
@@ -0,0 +1,11 @@
1
+ import { ArcadeSdkPredefinedProfile, ArcadeProfileId } from './arcade-profiles-types';
2
+ import { SqlSdkPredefinedProfile, SqlProfileId } from './sql-profile-types';
3
+ export type SdkPredefinedProfile = ArcadeSdkPredefinedProfile | SqlSdkPredefinedProfile;
4
+ export type SdkPredefinedProfiles = SdkPredefinedProfile[];
5
+ /**
6
+ * A union of all language profile ids
7
+ */
8
+ export type ProfileId = ArcadeProfileId | SqlProfileId;
9
+ export type * from './base';
10
+ export type * from './arcade-profiles-types';
11
+ export type * from './sql-profile-types';
@@ -0,0 +1,11 @@
1
+ import { SqlBundleType } from '../schema-types/sql';
2
+ import { BaseSdkPredefinedProfile } from './base';
3
+ /**
4
+ * The list of supported profiles
5
+ */
6
+ export type SqlProfileId = "field-calculation";
7
+ /**
8
+ * The predefined profiles for the SQL language
9
+ */
10
+ export type SqlSdkPredefinedProfile = BaseSdkPredefinedProfile<SqlProfileId, SqlBundleType>;
11
+ export type SqlSdkPredefinedProfiles = BaseSdkPredefinedProfile<SqlProfileId, SqlBundleType>[];
@@ -0,0 +1,23 @@
1
+ import { BaseSchemaApiItem, GenericSchemaItemBase, BaseSchemaApiFunction, BaseSchemaApiConstant } from './base';
2
+ /**
3
+ * Supported function bundles
4
+ */
5
+ export type ArcadeBundleType = "ai" | "core" | "data-access" | "database" | "geometry" | "knowledge-graph" | "portal-access" | "track";
6
+ /**
7
+ * The profile names this definition belongs to
8
+ */
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";
11
+ export type ArcadeSchemaItemBase = GenericSchemaItemBase<ArcadeBundleType, ArcadeProfileType>;
12
+ /**
13
+ * Definition for Arcade Api function
14
+ */
15
+ export type ArcadeApiFunction = BaseSchemaApiFunction<ArcadeBundleType, ArcadeProfileType, ArcadeValueType>;
16
+ /**
17
+ * Definition for Arcade Api constant
18
+ */
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>;