@arcgis/languages-sdk-spec 5.2.0-next.15 → 5.2.0-next.151

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
- */
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" | "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
- */
1
+ import type { ArcadeBundleType } from "../schema-types/arcade.js";
2
+ import type { BaseSdkPredefinedProfile } from "./base.js";
3
+
4
+ /** The list of supported profiles */
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" | "form-dynamic-choice" | "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";
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;