@arcgis/languages-sdk-spec 5.2.0-next.12 → 5.2.0-next.120

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/LICENSE.md CHANGED
@@ -1,12 +1,14 @@
1
1
  # Licensing
2
2
 
3
- COPYRIGHT © Esri
3
+ COPYRIGHT Esri
4
4
 
5
5
  All rights reserved under the copyright laws of the United States and applicable international laws, treaties, and conventions.
6
6
 
7
- This material is licensed for use under the [Esri Master License Agreement (MLA)](https://www.esri.com/content/dam/esrisites/en-us/media/legal/ma-full/ma-full.pdf), and is bound by the terms of that agreement.
7
+ This material is licensed for use under the Esri Master License Agreement (MLA), and is bound by the terms of that agreement.
8
8
  You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
9
9
 
10
+ See use restrictions at https://www.esri.com/content/dam/esrisites/en-us/media/legal/ma-full/ma-full.pdf.
11
+
10
12
  For additional information, contact:
11
13
  Environmental Systems Research Institute, Inc.
12
14
  Attn: Contracts and Legal Services Department
package/README.md CHANGED
@@ -8,5 +8,5 @@ It is not intended to be used directly, but rather used as a dependency by other
8
8
 
9
9
  ## License
10
10
 
11
- This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package, and at https://js.arcgis.com/5.1/LICENSE.txt.
12
- For third party notices, see https://js.arcgis.com/5.1/third-party-notices.txt.
11
+ This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package, and at https://js.arcgis.com/5.2/LICENSE.txt.
12
+ For third party notices, see https://js.arcgis.com/5.2/third-party-notices.txt.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- export type * from './profile-types';
2
- export type * from './schema-types';
3
- export type * from './types';
4
- export type * from './t9n-types';
1
+ export type * from "./profile-types/index.js";
2
+ export type * from "./schema-types/index.js";
3
+ export type * from "./types.js";
4
+ export type * from "./t9n-types.js";
5
+ export type * from "./runtimes/arcade.js";
6
+
@@ -1,11 +1,10 @@
1
- import { ArcadeBundleType } from '../schema-types/arcade';
2
- import { BaseSdkPredefinedProfile } from './base';
3
- /**
4
- * The list of supported profiles
5
- */
1
+ import type { ArcadeBundleType } from "../schema-types/arcade.js";
2
+ import type { BaseSdkPredefinedProfile } from "./base.js";
3
+
4
+ /** The list of supported profiles */
6
5
  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" | "experience-builder-data" | "experience-builder-dynamic-value" | "experience-builder-list-item-widget-formatting" | "experience-builder-widget-formatting" | "feature-display-title" | "feature-z" | "field-calculation" | "field-mapping" | "form-attachment-filename-calculation" | "form-calculation" | "form-constraint" | "geoanalytics" | "geotrigger-notification" | "labeling" | "layout" | "location-update-constraint" | "measure-visualization" | "minimalist" | "model-builder" | "popup-element-feature-reduction" | "popup-element-imagery" | "popup-element-voxel" | "popup-element" | "popup-feature-reduction" | "popup-imagery" | "popup-voxel" | "popup" | "quick-capture" | "tasks" | "velocity" | "visualization";
7
- /**
8
- * The predefined profiles for the Arcade language
9
- */
6
+
7
+ /** The predefined profiles for the Arcade language */
10
8
  export type ArcadeSdkPredefinedProfile = BaseSdkPredefinedProfile<ArcadeProfileId, ArcadeBundleType>;
11
- export type ArcadeSdkPredefinedProfiles = BaseSdkPredefinedProfile<ArcadeProfileId, ArcadeBundleType>[];
9
+
10
+ export type ArcadeSdkPredefinedProfiles = BaseSdkPredefinedProfile<ArcadeProfileId, ArcadeBundleType>[];
@@ -1,59 +1,38 @@
1
- /**
2
- * Describes a profile
3
- */
1
+ /** Describes a profile */
4
2
  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[];
3
+ /** Profile name for UI */
4
+ name: string;
5
+ /** Profile id for docs */
6
+ id: ProfileId;
7
+ /** Function bundles enabled for this profile */
8
+ bundles: Bundle[];
9
+ /** Variable describing name, type, and providing description */
10
+ variables: SdkVariable[];
21
11
  }
22
- /**
23
- * Supported profile variable types
24
- */
12
+
13
+ /** Supported profile variable types */
25
14
  export type SdkVariableType = "array" | "boolean" | "dataCatalogDatastore" | "date" | "dateOnly" | "dictionary" | "feature" | "featureSet" | "featureSetCollection" | "geometry" | "knowledgeGraph" | "number" | "pixel" | "text" | "time" | "voxel";
26
- /**
27
- * Describes variables
28
- */
15
+
16
+ /** Describes variables */
29
17
  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;
18
+ /** Name of the variable. */
19
+ name: string;
20
+ /** Type of the variable. */
21
+ type: SdkVariableType;
22
+ /** Description of the variable. */
23
+ description?: string;
42
24
  }
43
- /**
44
- * A variable that represents a simple type (boolean, number, feature, etc.)
45
- */
25
+
26
+ /** A variable that represents a simple type (boolean, number, feature, etc.) */
46
27
  export interface SdkValueVariable extends SdkVariableBase {
47
- type: Exclude<SdkVariableType, "dictionary">;
28
+ type: Exclude<SdkVariableType, "dictionary">;
48
29
  }
49
- /**
50
- * A dictionary variable
51
- */
30
+
31
+ /** A dictionary variable */
52
32
  export interface SdkDictionaryVariable extends SdkVariableBase {
53
- type: "dictionary";
54
- properties: SdkVariable[];
33
+ type: "dictionary";
34
+ properties: SdkVariable[];
55
35
  }
56
- /**
57
- * Profile variable
58
- */
59
- export type SdkVariable = SdkDictionaryVariable | SdkValueVariable;
36
+
37
+ /** Profile variable */
38
+ export type SdkVariable = SdkDictionaryVariable | SdkValueVariable;
@@ -1,11 +1,14 @@
1
- import { ArcadeSdkPredefinedProfile, ArcadeProfileId } from './arcade-profiles-types';
2
- import { SqlSdkPredefinedProfile, SqlProfileId } from './sql-profile-types';
1
+ import type { ArcadeSdkPredefinedProfile, ArcadeProfileId } from "./arcade-profiles-types.js";
2
+ import type { SqlSdkPredefinedProfile, SqlProfileId } from "./sql-profile-types.js";
3
+
4
+ export type * from "./base.js";
5
+ export type * from "./arcade-profiles-types.js";
6
+ export type * from "./sql-profile-types.js";
7
+
8
+ /** A union of all language predefined profiles */
3
9
  export type SdkPredefinedProfile = ArcadeSdkPredefinedProfile | SqlSdkPredefinedProfile;
10
+
4
11
  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';
12
+
13
+ /** A union of all language profile ids */
14
+ export type ProfileId = ArcadeProfileId | SqlProfileId;
@@ -1,11 +1,10 @@
1
- import { SqlBundleType } from '../schema-types/sql';
2
- import { BaseSdkPredefinedProfile } from './base';
3
- /**
4
- * The list of supported profiles
5
- */
1
+ import type { SqlBundleType } from "../schema-types/sql.js";
2
+ import type { BaseSdkPredefinedProfile } from "./base.js";
3
+
4
+ /** The list of supported profiles */
6
5
  export type SqlProfileId = "field-calculation" | "where-clause";
7
- /**
8
- * The predefined profiles for the SQL language
9
- */
6
+
7
+ /** The predefined profiles for the SQL language */
10
8
  export type SqlSdkPredefinedProfile = BaseSdkPredefinedProfile<SqlProfileId, SqlBundleType>;
11
- export type SqlSdkPredefinedProfiles = BaseSdkPredefinedProfile<SqlProfileId, SqlBundleType>[];
9
+
10
+ export type SqlSdkPredefinedProfiles = BaseSdkPredefinedProfile<SqlProfileId, SqlBundleType>[];
@@ -0,0 +1,120 @@
1
+ export const proRuntimes: readonly [
2
+ "pro_3.8",
3
+ "pro_3.7",
4
+ "pro_3.6",
5
+ "pro_3.5",
6
+ "pro_3.4",
7
+ "pro_3.3",
8
+ "pro_3.2",
9
+ "pro_3.1",
10
+ "pro_3.0",
11
+ "pro_2.9",
12
+ "pro_2.8",
13
+ "pro_2.7",
14
+ "pro_2.6",
15
+ "pro_2.5",
16
+ "pro_2.4",
17
+ "pro_2.3",
18
+ "pro_2.2",
19
+ "pro_2.1",
20
+ "pro_2.0",
21
+ "pro_1.4"
22
+ ];
23
+
24
+ export const jsSdkRuntimes: readonly [
25
+ "jsSdk_5.2",
26
+ "jsSdk_5.1",
27
+ "jsSdk_5.0",
28
+ "jsSdk_4.34",
29
+ "jsSdk_4.33",
30
+ "jsSdk_4.32",
31
+ "jsSdk_4.31",
32
+ "jsSdk_4.30",
33
+ "jsSdk_4.29",
34
+ "jsSdk_4.28",
35
+ "jsSdk_4.27",
36
+ "jsSdk_4.26",
37
+ "jsSdk_4.25",
38
+ "jsSdk_4.24",
39
+ "jsSdk_4.23",
40
+ "jsSdk_4.22",
41
+ "jsSdk_4.21",
42
+ "jsSdk_4.20",
43
+ "jsSdk_4.19",
44
+ "jsSdk_4.18",
45
+ "jsSdk_4.17",
46
+ "jsSdk_4.16",
47
+ "jsSdk_4.15",
48
+ "jsSdk_4.14",
49
+ "jsSdk_4.13",
50
+ "jsSdk_4.12",
51
+ "jsSdk_4.11",
52
+ "jsSdk_4.10",
53
+ "jsSdk_4.9",
54
+ "jsSdk_4.8",
55
+ "jsSdk_4.7",
56
+ "jsSdk_4.6",
57
+ "jsSdk_4.5",
58
+ "jsSdk_4.4",
59
+ "jsSdk_4.3",
60
+ "jsSdk_4.2",
61
+ "jsSdk_4.1",
62
+ "jsSdk_4.0",
63
+ "jsSdk_3.43",
64
+ "jsSdk_3.42",
65
+ "jsSdk_3.41",
66
+ "jsSdk_3.40",
67
+ "jsSdk_3.39",
68
+ "jsSdk_3.38",
69
+ "jsSdk_3.37",
70
+ "jsSdk_3.36",
71
+ "jsSdk_3.35",
72
+ "jsSdk_3.34",
73
+ "jsSdk_3.33",
74
+ "jsSdk_3.32",
75
+ "jsSdk_3.31",
76
+ "jsSdk_3.30",
77
+ "jsSdk_3.29",
78
+ "jsSdk_3.28",
79
+ "jsSdk_3.27",
80
+ "jsSdk_3.26",
81
+ "jsSdk_3.25",
82
+ "jsSdk_3.24",
83
+ "jsSdk_3.23",
84
+ "jsSdk_3.22",
85
+ "jsSdk_3.21",
86
+ "jsSdk_3.20",
87
+ "jsSdk_3.19"
88
+ ];
89
+
90
+ export const nativeAppsRuntimes: readonly [
91
+ "nativeApps_300.1",
92
+ "nativeApps_300.0",
93
+ "nativeApps_200.8",
94
+ "nativeApps_200.7",
95
+ "nativeApps_200.6",
96
+ "nativeApps_200.5",
97
+ "nativeApps_200.4",
98
+ "nativeApps_200.3",
99
+ "nativeApps_200.2",
100
+ "nativeApps_200.1",
101
+ "nativeApps_200",
102
+ "nativeApps_100.15",
103
+ "nativeApps_100.14",
104
+ "nativeApps_100.13",
105
+ "nativeApps_100.12",
106
+ "nativeApps_100.11",
107
+ "nativeApps_100.10",
108
+ "nativeApps_100.9",
109
+ "nativeApps_100.8",
110
+ "nativeApps_100.7",
111
+ "nativeApps_100.6",
112
+ "nativeApps_100.5",
113
+ "nativeApps_100.4",
114
+ "nativeApps_100.3",
115
+ "nativeApps_100.2",
116
+ "nativeApps_100.1",
117
+ "nativeApps_100"
118
+ ];
119
+
120
+ export type ArcadeRuntime = (typeof jsSdkRuntimes)[number] | (typeof nativeAppsRuntimes)[number] | (typeof proRuntimes)[number];
@@ -1,23 +1,20 @@
1
- import { BaseSchemaApiItem, GenericSchemaItemBase, BaseSchemaApiFunction, BaseSchemaApiConstant } from './base';
2
- /**
3
- * Supported function bundles
4
- */
1
+ import type { BaseSchemaApiItem, GenericSchemaItemBase, BaseSchemaApiFunction, BaseSchemaApiConstant } from "./base.js";
2
+
3
+ /** Supported function bundles */
5
4
  export type ArcadeBundleType = "ai" | "core" | "data-access" | "database" | "geometry" | "knowledge-graph" | "portal-access" | "track";
6
- /**
7
- * The profile names this definition belongs to
8
- */
5
+
6
+ /** The profile names this definition belongs to */
9
7
  export type ArcadeProfileType = "Attribute Rule Calculation" | "Attribute Rules" | "Dashboard Data" | "Field Calculation" | "Form Calculation" | "GeoAnalytics" | "Popups" | "Tasks" | "Velocity";
8
+
10
9
  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<Portal>" | "Array<Text>" | "Array<Time>" | "Attachment" | "Boolean" | "Date" | "DateOnly" | "Dictionary" | "Extent" | "Feature" | "FeatureSet" | "FeatureSetCollection" | "Function" | "Geometry" | "KnowledgeGraph" | "Multipoint" | "Null" | "Number" | "Pixel" | "Point" | "Polygon" | "Polyline" | "Portal" | "Text" | "Time" | "Voxel";
10
+
11
11
  export type ArcadeSchemaItemBase = GenericSchemaItemBase<ArcadeBundleType, ArcadeProfileType>;
12
- /**
13
- * Definition for Arcade Api function
14
- */
12
+
13
+ /** Definition for Arcade Api function */
15
14
  export type ArcadeApiFunction = BaseSchemaApiFunction<ArcadeBundleType, ArcadeProfileType, ArcadeValueType>;
16
- /**
17
- * Definition for Arcade Api constant
18
- */
15
+
16
+ /** Definition for Arcade Api constant */
19
17
  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>;
18
+
19
+ /** Arcade Api Item can be either a constant, a function, or an array of functions */
20
+ export type ArcadeApiItem = BaseSchemaApiItem<ArcadeApiFunction, ArcadeApiConstant>;
@@ -1,163 +1,116 @@
1
- import { ArcadeApiConstant, SchemaApiFunction } from '.';
2
- import { BundleType, ProfileType, SchemaValueType } from './common';
3
- import { SqlApiFunction } from './sql';
4
- import { ArcadeApiFunction } from './arcade';
5
- /**
6
- * Definition for a schema category
7
- */
1
+ import type { ArcadeApiConstant, ArcadeApiFunction } from "./arcade.js";
2
+ import type { SchemaApiFunction } from "./index.js";
3
+ import type { BundleType, ProfileType, SchemaValueType } from "./common.js";
4
+ import type { SqlApiFunction } from "./sql.js";
5
+
6
+ /** Definition for a schema category */
8
7
  export interface SchemaCategory {
9
- title: string;
10
- description: string[] | string;
11
- page: string;
12
- hideSummaryList?: boolean;
8
+ title: string;
9
+ description: string[] | string;
10
+ page: string;
11
+ hideSummaryList?: boolean;
13
12
  }
13
+
14
14
  export interface GenericSchemaItemBase<Bundle extends BundleType, Profile extends ProfileType> {
15
- /**
16
- * The name of the function or constant. Must start with a capital letter.
17
- * @pattern ^[A-Z]+[a-zA-Z0-9.]*$
18
- */
19
- name: string;
20
- /**
21
- * A nice description for the constant or function. It can leverage Github Flavored Markdown formatting.
22
- */
23
- description: string[] | string;
24
- /**
25
- * Version string. Format x.y.
26
- * @pattern ^1\.\d+$
27
- */
28
- sinceVersion?: string;
29
- /**
30
- * Indicates if the item should not be documented.
31
- */
32
- disableDocumentation?: boolean;
33
- /**
34
- * The profiles the constant or the function belongs to.
35
- */
36
- profiles?: Profile[];
37
- /**
38
- * The bundle the constant or the function belongs to.
39
- */
40
- bundle: Bundle;
41
- /**
42
- * The relative path to an image to illustate the constant or the function.
43
- */
44
- image?: string;
45
- /**
46
- * 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.
47
- * @pattern ^[A-Z]+.*$
48
- */
49
- snippet: string;
50
- /**
51
- * The collection of examples
52
- */
53
- examples?: SchemaExample[];
54
- /**
55
- * A collection of links to resources
56
- */
57
- resourceLinks?: SchemaResourceLink[];
15
+ /**
16
+ * The name of the function or constant. Must start with a capital letter.
17
+ *
18
+ * @pattern ^[A-Z]+[a-zA-Z0-9.]*$
19
+ */
20
+ name: string;
21
+ /**
22
+ * Version string. Format x.y.
23
+ *
24
+ * @pattern ^1\.\d+$
25
+ */
26
+ sinceVersion?: string;
27
+ /** Indicates if the item should not be documented. */
28
+ disableDocumentation?: boolean;
29
+ /** The profiles the constant or the function belongs to. */
30
+ profiles?: Profile[];
31
+ /** The bundle the constant or the function belongs to. */
32
+ bundle: Bundle;
33
+ /** The relative path to an image to illustate the constant or the function. */
34
+ image?: string;
35
+ /**
36
+ * The code that will be injected in the classic editor. Must start with a capital letter and match the name of the function or constant.
37
+ *
38
+ * @pattern ^[A-Z]+.*$
39
+ */
40
+ snippet: string;
41
+ /** The collection of examples */
42
+ examples?: SchemaExample[];
43
+ /** A collection of links to resources */
44
+ resourceLinks?: SchemaResourceLink[];
58
45
  }
59
- /**
60
- * Describes an Api Constant
61
- */
46
+
47
+ /** Describes an Api Constant */
62
48
  export interface BaseSchemaApiConstant<Bundle extends BundleType = BundleType, Profile extends ProfileType = ProfileType> extends GenericSchemaItemBase<Bundle, Profile> {
63
- /**
64
- * For constant, the property is mandatory and always true
65
- */
66
- isConstant: true;
49
+ /** For constant, the property is mandatory and always true */
50
+ isConstant: true;
67
51
  }
52
+
68
53
  export type SchemaReturnValue<ValueType extends SchemaValueType = SchemaValueType> = SchemaReturnDefinition<ValueType> | ValueType | ValueType[];
69
- /**
70
- * Describes an Api Function.
71
- */
54
+
55
+ /** Describes an Api Function. */
72
56
  export interface BaseSchemaApiFunction<Bundle extends BundleType, Profile extends ProfileType, ValueType extends SchemaValueType> extends GenericSchemaItemBase<Bundle, Profile> {
73
- /**
74
- * For function this property is optional and always false.
75
- */
76
- isConstant?: boolean;
77
- /**
78
- * The set of function parameters.
79
- */
80
- parameters?: SchemaProperty<ValueType>[];
81
- /**
82
- * The type of data returned by the function.
83
- */
84
- returnValue?: SchemaReturnValue<ValueType>;
57
+ /** For function this property is optional and always false. */
58
+ isConstant?: boolean;
59
+ /** The set of function parameters. */
60
+ parameters?: SchemaProperty<ValueType>[];
61
+ /** The type of data returned by the function. */
62
+ returnValue?: SchemaReturnValue<ValueType>;
85
63
  }
86
- /**
87
- * Describes the properties for the type Property
88
- */
64
+
65
+ /** Describes the properties for the type Property */
89
66
  export interface SchemaProperty<ValueType extends SchemaValueType = SchemaValueType> {
90
- /**
91
- * The name of the property.
92
- * @pattern ^([a-z]+[a-zA-Z0-9_]*|\[.*\])$
93
- */
94
- name: string;
95
- /**
96
- * The data type of the property value. If the property supports more than one type then use an array.
97
- */
98
- type: ValueType | ValueType[];
99
- /**
100
- * The description for the property.
101
- */
102
- description: string[] | string;
103
- /**
104
- * Indicates if the property is optional.
105
- */
106
- optional?: boolean;
107
- /**
108
- * The properties if the type is Dictionary.
109
- */
110
- properties?: SchemaProperty<ValueType>[];
67
+ /**
68
+ * The name of the property.
69
+ *
70
+ * @pattern ^([a-z]+[a-zA-Z0-9_]*|\[.*\])$
71
+ */
72
+ name: string;
73
+ /** The data type of the property value. If the property supports more than one type then use an array. */
74
+ type: ValueType | ValueType[];
75
+ /** The description for the property. */
76
+ description: string[] | string;
77
+ /** Indicates if the property is optional. */
78
+ optional?: boolean;
79
+ /** The properties if the type is Dictionary. */
80
+ properties?: SchemaProperty<ValueType>[];
111
81
  }
112
- /**
113
- * Describes the type fo data returned by a function.
114
- */
82
+
83
+ /** Describes the type fo data returned by a function. */
115
84
  export interface SchemaReturnDefinition<T extends SchemaValueType = SchemaValueType> {
116
- /**
117
- * The data type of the value returned.
118
- */
119
- type: T;
120
- /**
121
- * A description for for the value returned.
122
- */
123
- description?: string[] | string;
124
- /**
125
- * The properties if the type returned is a Dictionary
126
- */
127
- properties?: SchemaProperty<T>[];
85
+ /** The data type of the value returned. */
86
+ type: T;
87
+ /** A description for for the value returned. */
88
+ description?: string[] | string;
89
+ /** The properties if the type returned is a Dictionary */
90
+ properties?: SchemaProperty<T>[];
128
91
  }
129
- /**
130
- * Describes an example
131
- */
92
+
93
+ /** Describes an example */
132
94
  export interface SchemaExample {
133
- /**
134
- * A description for the example.
135
- */
136
- description?: string[] | string;
137
- /**
138
- * Either a single line string or an array of strings.
139
- */
140
- code: string[] | string;
95
+ /** A description for the example. */
96
+ description?: string[] | string;
97
+ /** Either a single line string or an array of strings. */
98
+ code: string[] | string;
141
99
  }
142
- /**
143
- * Describes a link to additional resources
144
- */
100
+
101
+ /** Describes a link to additional resources */
145
102
  export interface SchemaResourceLink {
146
- /**
147
- * The text used to describe the resource link.
148
- */
149
- linkText: string;
150
- /**
151
- * The url to the resource.
152
- */
153
- url: string;
103
+ /** The text used to describe the resource link. */
104
+ linkText: string;
105
+ /** The url to the resource. */
106
+ url: string;
154
107
  }
155
- /**
156
- * Definition for simple item
157
- */
108
+
109
+ /** Definition for simple item */
158
110
  export type SingularApiItem = ArcadeApiConstant | ArcadeApiFunction | SqlApiFunction;
111
+
159
112
  /**
160
113
  * Definition for a constant or a function.
161
114
  * An Api Item can be either a constant, a function, or an array of functions
162
115
  */
163
- export type BaseSchemaApiItem<LanguageApiFunction extends SchemaApiFunction, LanguageApiConstant extends BaseSchemaApiConstant | undefined = undefined> = LanguageApiFunction | LanguageApiFunction[] | (LanguageApiConstant extends undefined ? never : LanguageApiConstant);
116
+ export type BaseSchemaApiItem<LanguageApiFunction extends SchemaApiFunction, LanguageApiConstant extends BaseSchemaApiConstant | undefined = undefined> = LanguageApiFunction | LanguageApiFunction[] | (LanguageApiConstant extends undefined ? never : LanguageApiConstant);
@@ -1,14 +1,18 @@
1
- import { ArcadeBundleType, ArcadeProfileType, ArcadeValueType } from './arcade';
2
- import { SqlBundleType, SqlProfileType, SqlValueType } from './sql';
3
1
  /**
4
- * Union of bundle types that can be used in any sdk schema
2
+ * This file contains union types that are used to constrain
3
+ * base schema types. It's a bit of a chicken and egg scenario
4
+ * where fields in the base schema types need a reference
5
+ * to the language specific Bundle and Profile types, creating
6
+ * a bit of circular dependency. This file breaks that cycle.
5
7
  */
8
+ import type { ArcadeBundleType, ArcadeProfileType, ArcadeValueType } from "./arcade.js";
9
+ import type { SqlBundleType, SqlProfileType, SqlValueType } from "./sql.js";
10
+
11
+ /** Union of bundle types that can be used in any sdk schema */
6
12
  export type BundleType = ArcadeBundleType | SqlBundleType;
7
- /**
8
- * Union of profile types that can be used in any sdk schema
9
- */
13
+
14
+ /** Union of profile types that can be used in any sdk schema */
10
15
  export type ProfileType = ArcadeProfileType | SqlProfileType;
11
- /**
12
- * The collection of supported return types.
13
- */
14
- export type SchemaValueType = ArcadeValueType | SqlValueType;
16
+
17
+ /** The collection of supported return types. */
18
+ export type SchemaValueType = ArcadeValueType | SqlValueType;
@@ -1,21 +1,15 @@
1
- import { ArcadeApiFunction, ArcadeApiItem, ArcadeSchemaItemBase } from './arcade';
2
- import { SqlApiFunction, SqlApiItem, SqlSchemaItemBase } from './sql';
3
- /**
4
- *
5
- */
6
- export type { ArcadeApiItem, ArcadeApiConstant } from './arcade';
7
- export type { SqlApiItem } from './sql';
8
- /**
9
- * Union of API items that can be used in any sdk schema
10
- */
1
+ import type { ArcadeApiFunction, ArcadeApiItem, ArcadeSchemaItemBase } from "./arcade.js";
2
+ import type { SqlApiFunction, SqlApiItem, SqlSchemaItemBase } from "./sql.js";
3
+
4
+ export { type ArcadeApiItem, type ArcadeApiConstant } from "./arcade.js";
5
+ export type * from "./base.js";
6
+ export type * from "./common.js";
7
+
8
+ /** Union of API items that can be used in any sdk schema */
11
9
  export type SchemaApiItem = ArcadeApiItem | SqlApiItem;
12
- /**
13
- * Union of API functions that can be used in any sdk schema
14
- */
10
+
11
+ /** Union of API functions that can be used in any sdk schema */
15
12
  export type SchemaApiFunction = ArcadeApiFunction | SqlApiFunction;
16
- /**
17
- * Union of schema items that can be used in any sdk schema
18
- */
19
- export type SchemaItemBase = ArcadeSchemaItemBase | SqlSchemaItemBase;
20
- export type * from './base';
21
- export type * from './common';
13
+
14
+ /** Union of schema items that can be used in any sdk schema */
15
+ export type SchemaItemBase = ArcadeSchemaItemBase | SqlSchemaItemBase;
@@ -1,55 +1,40 @@
1
- import { BaseSchemaApiFunction, BaseSchemaApiItem, GenericSchemaItemBase } from './base';
2
- /**
3
- * Supported function bundles
4
- */
1
+ import type { BaseSchemaApiFunction, BaseSchemaApiItem, GenericSchemaItemBase } from "./base.js";
2
+
3
+ /** Supported function bundles */
5
4
  export type SqlBundleType = "date" | "numeric" | "string";
6
- /**
7
- * Supported sql profile names
8
- */
5
+
6
+ /** Supported sql profile names */
9
7
  export type SqlProfileType = "Field Calculation";
8
+
10
9
  export type SqlValueType = "Datetime" | "Number" | "String";
11
- /**
12
- * Narrowed schema item type for sql
13
- */
10
+
11
+ /** Narrowed schema item type for sql */
14
12
  export type SqlSchemaItemBase = GenericSchemaItemBase<SqlBundleType, SqlProfileType>;
15
- /**
16
- * Narrowed api function type for sql
17
- */
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[];
13
+
14
+ /** Narrowed api function type for sql */
15
+ export type SqlApiFunction = BaseSchemaApiFunction<SqlBundleType, SqlProfileType, SqlValueType>
16
+ & {
17
+ /** The name of the function. */
18
+ name: string;
19
+ /**
20
+ * SQL functions may be "special registers" that are not called like regular functions.
21
+ * For example, CURRENT_DATE is a special register.
22
+ * These functions are not called with parentheses or arguments.
23
+ */
24
+ isSpecialRegister?: boolean;
25
+ /** The set of keywords that are used in the function. */
26
+ keywords?: SchemaKeyword[];
33
27
  };
34
- /**
35
- * Narrowed api item type for sql. Sql does not have constants so all sql items are "functions".
36
- */
28
+
29
+ /** Narrowed api item type for sql. Sql does not have constants so all sql items are "functions". */
37
30
  export type SqlApiItem = BaseSchemaApiItem<SqlApiFunction>;
38
- /**
39
- * Describes a keyword used in a function
40
- */
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 {};
31
+
32
+ /** Describes a keyword used in a function */
33
+ export interface SchemaKeyword {
34
+ /** The name of the keyword. */
35
+ name: string;
36
+ /** The description for the keyword. */
37
+ description: string;
38
+ /** (optional) position of the keyword in the function signature, default is to interlace with parameters */
39
+ position?: number;
40
+ }
@@ -86,7 +86,7 @@
86
86
  },
87
87
  "snippet": {
88
88
  "type": "string",
89
- "description": "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.",
89
+ "description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the function or constant.",
90
90
  "pattern": "^[A-Z]+.*$"
91
91
  },
92
92
  "examples": {
@@ -117,6 +117,10 @@
117
117
  "returnValue": {
118
118
  "$ref": "#/definitions/SchemaReturnValue<ArcadeValueType>",
119
119
  "description": "The type of data returned by the function."
120
+ },
121
+ "consumesCredits": {
122
+ "type": "boolean",
123
+ "description": "Indicates if the function consumes credits when called."
120
124
  }
121
125
  },
122
126
  "additionalProperties": false,
@@ -421,7 +425,7 @@
421
425
  },
422
426
  "snippet": {
423
427
  "type": "string",
424
- "description": "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.",
428
+ "description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the function or constant.",
425
429
  "pattern": "^[A-Z]+.*$"
426
430
  },
427
431
  "examples": {
@@ -552,7 +556,7 @@
552
556
  },
553
557
  "snippet": {
554
558
  "type": "string",
555
- "description": "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.",
559
+ "description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the function or constant.",
556
560
  "pattern": "^[A-Z]+.*$"
557
561
  },
558
562
  "examples": {
@@ -583,6 +587,10 @@
583
587
  "returnValue": {
584
588
  "$ref": "#/definitions/SchemaReturnValue<SqlValueType>",
585
589
  "description": "The type of data returned by the function."
590
+ },
591
+ "consumesCredits": {
592
+ "type": "boolean",
593
+ "description": "Indicates if the function consumes credits when called."
586
594
  }
587
595
  },
588
596
  "required": [
@@ -75,7 +75,7 @@
75
75
  },
76
76
  "snippet": {
77
77
  "type": "string",
78
- "description": "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.",
78
+ "description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the function or constant.",
79
79
  "pattern": "^[A-Z]+.*$"
80
80
  },
81
81
  "examples": {
@@ -106,6 +106,10 @@
106
106
  "returnValue": {
107
107
  "$ref": "#/definitions/SchemaReturnValue<ArcadeValueType>",
108
108
  "description": "The type of data returned by the function."
109
+ },
110
+ "consumesCredits": {
111
+ "type": "boolean",
112
+ "description": "Indicates if the function consumes credits when called."
109
113
  }
110
114
  },
111
115
  "additionalProperties": false,
@@ -410,7 +414,7 @@
410
414
  },
411
415
  "snippet": {
412
416
  "type": "string",
413
- "description": "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.",
417
+ "description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the function or constant.",
414
418
  "pattern": "^[A-Z]+.*$"
415
419
  },
416
420
  "examples": {
@@ -16,7 +16,8 @@
16
16
  {
17
17
  "$ref": "#/definitions/SqlSdkPredefinedProfile"
18
18
  }
19
- ]
19
+ ],
20
+ "description": "A union of all language predefined profiles"
20
21
  },
21
22
  "ArcadeSdkPredefinedProfile": {
22
23
  "$ref": "#/definitions/BaseSdkPredefinedProfile<ArcadeProfileId,ArcadeBundleType>",
@@ -100,7 +100,7 @@
100
100
  },
101
101
  "snippet": {
102
102
  "type": "string",
103
- "description": "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.",
103
+ "description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the function or constant.",
104
104
  "pattern": "^[A-Z]+.*$"
105
105
  },
106
106
  "examples": {
@@ -131,6 +131,10 @@
131
131
  "returnValue": {
132
132
  "$ref": "#/definitions/SchemaReturnValue<SqlValueType>",
133
133
  "description": "The type of data returned by the function."
134
+ },
135
+ "consumesCredits": {
136
+ "type": "boolean",
137
+ "description": "Indicates if the function consumes credits when called."
134
138
  }
135
139
  },
136
140
  "required": [
@@ -1 +1,2 @@
1
- export * from './utilities';
1
+ export * from "./utilities.js";
2
+
@@ -1,58 +1,144 @@
1
- import { ArcadeApiConstant, SchemaApiFunction, SchemaApiItem, SchemaCategory, SchemaExample, SchemaProperty, SchemaResourceLink, SchemaReturnDefinition, SchemaReturnValue, SingularApiItem } from '../schema-types';
2
- import { SqlApiFunction } from '../schema-types/sql';
3
- import { SdkDictionaryVariable, SdkVariable } from '../profile-types';
1
+ import type { ArcadeApiConstant } from "../schema-types/arcade.js";
2
+ import type { SchemaCategory, SchemaExample, SchemaProperty, SchemaResourceLink, SchemaReturnDefinition, SchemaReturnValue, SingularApiItem } from "../schema-types/base.js";
3
+ import type { SchemaApiFunction, SchemaApiItem } from "../schema-types/index.js";
4
+ import type { SqlApiFunction } from "../schema-types/sql.js";
5
+ import type { SdkDictionaryVariable, SdkVariable } from "../profile-types/base.js";
6
+
4
7
  export type Paths = {
5
- relativePath: string;
6
- absolutePath: string;
8
+ relativePath: string;
9
+ absolutePath: string;
7
10
  };
8
- export declare function isSchemaDictionaryVariable(variable: SdkVariable): variable is SdkDictionaryVariable;
9
- export declare function getDirectoryNames(path: string): Promise<string[]>;
10
- export declare function getFileNames(path: string): Promise<string[]>;
11
- /**
12
- * Structure used when reading the API Files
13
- */
11
+
12
+ /** @param variable */
13
+ export function isSchemaDictionaryVariable(variable: SdkVariable): variable is SdkDictionaryVariable;
14
+
15
+ /** @param path */
16
+ export function getDirectoryNames(path: string): Promise<string[]>;
17
+
18
+ /** @param path */
19
+ export function getFileNames(path: string): Promise<string[]>;
20
+
21
+ /** Structure used when reading the API Files */
14
22
  export interface ApiDatabase {
15
- categories: ApiCategories;
16
- resources: ApiResources;
23
+ categories: ApiCategories;
24
+ resources: ApiResources;
17
25
  }
26
+
18
27
  export type ApiCategories = Record<string, {
19
28
  definition: SchemaCategory;
20
29
  items: Map<string, SchemaApiItem>;
21
30
  }>;
31
+
22
32
  export type ApiResources = Record<string, string>;
23
- export declare const DefaultApiResources: ApiResources;
24
- export declare function isSchemaFunction(item: SchemaApiItem): item is SchemaApiFunction;
25
- export declare function isSchemaConstant(item: SchemaApiItem): item is ArcadeApiConstant;
26
- export declare function isSchemaReturnDefinition(item: SchemaReturnValue): item is SchemaReturnDefinition;
27
- export declare function loadApiDatabase(languageFileName: string): Promise<ApiDatabase>;
28
- export declare const toLocalConfig: {
33
+
34
+ export const DefaultApiResources: ApiResources;
35
+
36
+ /** @param item */
37
+ export function isSchemaFunction(item: SchemaApiItem): item is SchemaApiFunction;
38
+
39
+ /** @param item */
40
+ export function isSchemaConstant(item: SchemaApiItem): item is ArcadeApiConstant;
41
+
42
+ /** @param item */
43
+ export function isSchemaReturnDefinition(item: SchemaReturnValue): item is SchemaReturnDefinition;
44
+
45
+ /** @param languageFileName */
46
+ export function loadApiDatabase(languageFileName: string): Promise<ApiDatabase>;
47
+
48
+ export const toLocalConfig: {
29
49
  minimumIntegerDigits: number;
30
50
  useGrouping: boolean;
31
51
  };
32
- export declare function convertStringArrayToObject(array: string[] | string | undefined): Record<string, string>;
33
- export declare function convertObjectToArray<T>(obj: Record<string, T> | undefined): T[] | undefined;
34
- export declare function headingPattern(level: number): string;
35
- export declare function isFunction(apiItem: SingularApiItem): apiItem is SchemaApiFunction;
36
- export declare function assembleMarkdownString(value: string[] | string | undefined): string;
37
- export declare function apiItemName(item: SchemaApiItem): string;
38
- export declare function generateSinceVersionSection(resources: ApiResources, apiItem: SingularApiItem, paths: Paths, relative?: boolean): string[];
39
- export declare function generateSignature(apiItem: SingularApiItem, paths: Paths, { relative, typeLink, needsHtmlEntity }?: {
40
- relative?: boolean | undefined;
41
- typeLink?: boolean | undefined;
42
- needsHtmlEntity?: boolean | undefined;
43
- }): string;
44
- export declare function generateTypeLink(values: string[] | string, paths: Paths, relative?: boolean): string;
45
- export declare function generateParametersSection(resources: ApiResources, parameters: SchemaProperty[] | undefined, paths: Paths, relative?: boolean, useTypeLinks?: boolean): string[];
46
- export declare function generateReturnSection(resources: ApiResources, returnDefinition: SchemaReturnValue, paths: Paths, relative?: boolean, useTypeLinks?: boolean): string[];
47
- export declare function generateExamplesSection(resources: ApiResources, examples: SchemaExample[] | undefined, headingPattern: "**" | "#####", language: string): string[];
48
- export declare function generateAdditionalResourcesSection(resources: ApiResources, resourceLinks: SchemaResourceLink[] | undefined, headingPattern: "**" | "####"): string[];
49
- export declare function fixUrl(description: string, paths: Paths, relative?: boolean): string;
52
+
53
+ /** @param array */
54
+ export function convertStringArrayToObject(array: string[] | string | undefined): Record<string, string>;
55
+
56
+ /** @param object */
57
+ export function convertObjectToArray<T>(object: Record<string, T> | undefined): T[] | undefined;
58
+
59
+ /** @param level */
60
+ export function headingPattern(level: number): string;
61
+
62
+ /** @param apiItem */
63
+ export function isFunction(apiItem: SingularApiItem): apiItem is SchemaApiFunction;
64
+
65
+ /** @param value */
66
+ export function assembleMarkdownString(value: string[] | string | undefined): string;
67
+
68
+ /** @param item */
69
+ export function apiItemName(item: SchemaApiItem): string;
70
+
71
+ /**
72
+ * @param resources
73
+ * @param apiItem
74
+ * @param paths
75
+ * @param relative
76
+ */
77
+ export function generateSinceVersionSection(resources: ApiResources, apiItem: SingularApiItem, paths: Paths, relative?: boolean): string[];
78
+
79
+ /**
80
+ * @param apiItem
81
+ * @param paths
82
+ * @param param2
83
+ */
84
+ export function generateSignature(apiItem: SingularApiItem, paths: Paths, param2?: {}): string;
85
+
86
+ /**
87
+ * @param values
88
+ * @param paths
89
+ * @param relative
90
+ */
91
+ export function generateTypeLink(values: string[] | string, paths: Paths, relative?: boolean): string;
92
+
93
+ /**
94
+ * @param resources
95
+ * @param parameters
96
+ * @param paths
97
+ * @param relative
98
+ * @param useTypeLinks
99
+ */
100
+ export function generateParametersSection(resources: ApiResources, parameters: SchemaProperty[] | undefined, paths: Paths, relative?: boolean, useTypeLinks?: boolean): string[];
101
+
102
+ /**
103
+ * @param resources
104
+ * @param returnDefinition
105
+ * @param paths
106
+ * @param relative
107
+ * @param useTypeLinks
108
+ */
109
+ export function generateReturnSection(resources: ApiResources, returnDefinition: SchemaReturnValue, paths: Paths, relative?: boolean, useTypeLinks?: boolean): string[];
110
+
111
+ /**
112
+ * @param resources
113
+ * @param examples
114
+ * @param headingPattern
115
+ * @param language
116
+ */
117
+ export function generateExamplesSection(resources: ApiResources, examples: SchemaExample[] | undefined, headingPattern: "**" | "#####", language: string): string[];
118
+
119
+ /**
120
+ * @param resources
121
+ * @param resourceLinks
122
+ * @param headingPattern
123
+ */
124
+ export function generateAdditionalResourcesSection(resources: ApiResources, resourceLinks: SchemaResourceLink[] | undefined, headingPattern: "**" | "####"): string[];
125
+
126
+ /**
127
+ * @param description
128
+ * @param paths
129
+ * @param relative
130
+ */
131
+ export function fixUrl(description: string, paths: Paths, relative?: boolean): string;
132
+
50
133
  /**
51
134
  * Interlaces two arrays and joins them into a string with spaces.
135
+ *
52
136
  * @param array1 - The first array.
53
137
  * @param array2 - The second array.
54
138
  * @param positions - Optional positions for the second array elements.
55
139
  * @returns - The interlaced array.
56
140
  */
57
- export declare function interlaceArrays(array1: string[], array2: string[], positions?: number[]): string;
58
- export declare function isSqlApiFunction(apiItem: SchemaApiItem): apiItem is SqlApiFunction;
141
+ export function interlaceArrays(array1: string[], array2: string[], positions?: number[]): string;
142
+
143
+ /** @param apiItem */
144
+ export function isSqlApiFunction(apiItem: SchemaApiItem): apiItem is SqlApiFunction;
@@ -1,28 +1,37 @@
1
1
  export interface T9NApiRoot {
2
- resources: Record<string, string>;
3
- categories: T9NCategories;
2
+ resources: Record<string, string>;
3
+ categories: T9NCategories;
4
4
  }
5
+
5
6
  export type T9NCategories = Record<string, T9NCategory>;
7
+
6
8
  export interface T9NCategory {
7
- title: string;
8
- description?: Record<string, string>;
9
- items: T9NApiItems;
9
+ title: string;
10
+ description?: Record<string, string>;
11
+ items: T9NApiItems;
10
12
  }
13
+
11
14
  export type T9NResource = Record<string, string>;
15
+
12
16
  export type T9NApiItems = Record<string, Record<string, T9NApiItem> | T9NApiItem>;
17
+
13
18
  export interface T9NProperty {
14
- description?: Record<string, string>;
15
- properties?: Record<string, T9NProperty>;
19
+ description?: Record<string, string>;
20
+ properties?: Record<string, T9NProperty>;
16
21
  }
22
+
17
23
  export interface T9NApiItem {
18
- description: Record<string, string>;
19
- examples?: Record<string, Record<string, string>>;
20
- parameters?: Record<string, T9NProperty>;
21
- returnValue?: T9NProperty;
24
+ description: Record<string, string>;
25
+ examples?: Record<string, Record<string, string>>;
26
+ parameters?: Record<string, T9NProperty>;
27
+ returnValue?: T9NProperty;
22
28
  }
29
+
23
30
  export type T9NProfiles = Record<string, T9NProfileVariables>;
31
+
24
32
  export type T9NProfileVariables = Record<string, T9NProfileVariable>;
33
+
25
34
  export interface T9NProfileVariable {
26
- description?: string;
27
- properties?: T9NProfileVariables;
28
- }
35
+ description?: string;
36
+ properties?: T9NProfileVariables;
37
+ }
package/dist/types.d.ts CHANGED
@@ -1,79 +1,59 @@
1
- import { BundleType } from './schema-types';
2
- import { CompletionItem } from 'vscode-languageserver-types';
3
- import { ProfileId, SdkPredefinedProfile, SdkVariable, SdkValueVariable, SdkDictionaryVariable, SdkVariableType } from './profile-types';
4
- /**
5
- * Represents an api category and its items
6
- */
7
- interface SdkCategory {
8
- /**
9
- * The unique ID for the category
10
- */
11
- id: string;
12
- /**
13
- * The title for the category
14
- */
15
- title: string;
16
- /**
17
- * The collection of api items for the category
18
- */
19
- items: SdkItem[];
1
+ import type { BundleType } from "./schema-types/common.js";
2
+ import type { CompletionItem } from "vscode-languageserver-types";
3
+
4
+ export { type CompletionItem } from "vscode-languageserver-types";
5
+
6
+ /** Represents an api category and its items */
7
+ export interface SdkCategory {
8
+ /** The unique ID for the category */
9
+ id: string;
10
+ /** The title for the category */
11
+ title: string;
12
+ /** The collection of api items for the category */
13
+ items: SdkItem[];
20
14
  }
21
- interface SdkItemBase {
22
- /**
23
- * The name of the function or constant.
24
- */
25
- name: string;
26
- /**
27
- * The version string when the api item was introduced. If undefined then it was from the origin.
28
- */
29
- sinceVersion?: string;
30
- /**
31
- * The api bundle this item belongs to.
32
- */
33
- bundle: BundleType;
34
- /**
35
- * Markdown description of the item.
36
- */
37
- description: string;
38
- /**
39
- * Markdown containing examples.
40
- */
41
- examples: string;
42
- /**
43
- * Link for additional information about the item.
44
- */
45
- link?: string;
46
- /**
47
- * Completion item directly leveraged by the editor.
48
- */
49
- completion: CompletionItem;
50
- /**
51
- * Indicates if the documentation for this item should be disabled.
52
- */
53
- disableDocumentation?: boolean;
15
+
16
+ export interface SdkItemBase {
17
+ /** The name of the function or constant. */
18
+ name: string;
19
+ /** The version string when the api item was introduced. If undefined then it was from the origin. */
20
+ sinceVersion?: string;
21
+ /** The api bundle this item belongs to. */
22
+ bundle: BundleType;
23
+ /** Markdown description of the item. */
24
+ description: string;
25
+ /** Markdown containing examples. */
26
+ examples: string;
27
+ /** Link for additional information about the item. */
28
+ link?: string;
29
+ /** Completion item directly leveraged by the editor. */
30
+ completion: CompletionItem;
31
+ /** Indicates if the documentation for this item should be disabled. */
32
+ disableDocumentation?: boolean;
54
33
  }
55
- /**
56
- * Represents a constant in the arcade api.
57
- */
58
- interface SdkConstant extends SdkItemBase {
59
- type: "constant";
34
+
35
+ /** Represents a constant in the arcade api. */
36
+ export interface SdkConstant extends SdkItemBase {
37
+ type: "constant";
60
38
  }
61
- /**
62
- * Represents a function in the arcade api
63
- */
64
- interface SdkFunction extends SdkItemBase {
65
- type: "function";
66
- /**
67
- * Information leveraged by the editor to validate function call.
68
- * Indicates the minimum number of expected parameters and the maximum number of parameters expected.
69
- */
70
- parametersInfo: {
71
- min: number;
72
- max: number;
73
- };
39
+
40
+ /** Represents a function in the arcade api */
41
+ export interface SdkFunction extends SdkItemBase {
42
+ type: "function";
43
+ /**
44
+ * Information leveraged by the editor to validate function call.
45
+ * Indicates the minimum number of expected parameters and the maximum number of parameters expected.
46
+ */
47
+ parametersInfo: {
48
+ min: number;
49
+ max: number;
50
+ };
51
+ /**
52
+ * Indicates whether invoking this function consumes credits.
53
+ * Used by the editor to drive UX.
54
+ */
55
+ consumesCredits?: boolean;
74
56
  }
75
- /**
76
- * Represents an item in the arcade api.
77
- */
78
- type SdkItem = SdkConstant | SdkFunction | SdkFunction[];
79
- export type { CompletionItem, ProfileId, BundleType, SdkPredefinedProfile, SdkVariable, SdkValueVariable, SdkDictionaryVariable, SdkVariableType, SdkCategory, SdkItem, SdkItemBase, SdkConstant, SdkFunction, };
57
+
58
+ /** Represents an item in the arcade api. */
59
+ export type SdkItem = SdkConstant | SdkFunction | SdkFunction[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/languages-sdk-spec",
3
- "version": "5.2.0-next.12",
3
+ "version": "5.2.0-next.120",
4
4
  "description": "ArcGIS languages types and schemas for design a language sdk",
5
5
  "homepage": "https://developers.arcgis.com/javascript/latest/",
6
6
  "type": "module",
@@ -10,7 +10,8 @@
10
10
  "exports": {
11
11
  ".": "./dist/index.js",
12
12
  "./scripting": "./dist/scripting/index.js",
13
- "./dist/schemas/*.schema.json": "./dist/schemas/*.schema.json"
13
+ "./dist/schemas/*.schema.json": "./dist/schemas/*.schema.json",
14
+ "./package.json": "./package.json"
14
15
  },
15
16
  "files": [
16
17
  "dist/"