@arcgis/languages-sdk-spec 5.2.0-next.110 → 5.2.0-next.112
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 +6 -5
- package/dist/profile-types/arcade-profiles-types.d.ts +8 -9
- package/dist/profile-types/base.d.ts +29 -50
- package/dist/profile-types/index.d.ts +12 -9
- package/dist/profile-types/sql-profile-types.d.ts +8 -9
- package/dist/runtimes/arcade.d.ts +120 -7
- package/dist/schema-types/arcade.d.ts +14 -17
- package/dist/schema-types/base.d.ts +94 -145
- package/dist/schema-types/common.d.ts +14 -10
- package/dist/schema-types/index.d.ts +13 -19
- package/dist/schema-types/sql.d.ts +34 -49
- package/dist/schemas/api-item.schema.json +3 -3
- package/dist/schemas/arcade-api-item.schema.json +2 -2
- package/dist/schemas/profiles.schema.json +2 -1
- package/dist/schemas/sql-api-item.schema.json +1 -1
- package/dist/scripting/index.d.ts +2 -1
- package/dist/scripting/utilities.d.ts +125 -39
- package/dist/t9n-types.d.ts +23 -14
- package/dist/types.d.ts +55 -80
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export type * from
|
|
2
|
-
export type * from
|
|
3
|
-
export type * from
|
|
4
|
-
export type * from
|
|
5
|
-
export type * from
|
|
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
|
|
2
|
-
import { BaseSdkPredefinedProfile } from
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
9
|
-
*/
|
|
6
|
+
|
|
7
|
+
/** The predefined profiles for the Arcade language */
|
|
10
8
|
export type ArcadeSdkPredefinedProfile = BaseSdkPredefinedProfile<ArcadeProfileId, ArcadeBundleType>;
|
|
11
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
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
|
-
|
|
28
|
-
*/
|
|
15
|
+
|
|
16
|
+
/** Describes variables */
|
|
29
17
|
export interface SdkVariableBase {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
45
|
-
*/
|
|
25
|
+
|
|
26
|
+
/** A variable that represents a simple type (boolean, number, feature, etc.) */
|
|
46
27
|
export interface SdkValueVariable extends SdkVariableBase {
|
|
47
|
-
|
|
28
|
+
type: Exclude<SdkVariableType, "dictionary">;
|
|
48
29
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
*/
|
|
30
|
+
|
|
31
|
+
/** A dictionary variable */
|
|
52
32
|
export interface SdkDictionaryVariable extends SdkVariableBase {
|
|
53
|
-
|
|
54
|
-
|
|
33
|
+
type: "dictionary";
|
|
34
|
+
properties: SdkVariable[];
|
|
55
35
|
}
|
|
56
|
-
|
|
57
|
-
|
|
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
|
|
2
|
-
import { SqlSdkPredefinedProfile, SqlProfileId } from
|
|
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
|
-
|
|
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
|
|
2
|
-
import { BaseSdkPredefinedProfile } from
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
9
|
-
*/
|
|
6
|
+
|
|
7
|
+
/** The predefined profiles for the SQL language */
|
|
10
8
|
export type SqlSdkPredefinedProfile = BaseSdkPredefinedProfile<SqlProfileId, SqlBundleType>;
|
|
11
|
-
|
|
9
|
+
|
|
10
|
+
export type SqlSdkPredefinedProfiles = BaseSdkPredefinedProfile<SqlProfileId, SqlBundleType>[];
|
|
@@ -1,7 +1,120 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
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
|
-
|
|
14
|
-
*/
|
|
12
|
+
|
|
13
|
+
/** Definition for Arcade Api function */
|
|
15
14
|
export type ArcadeApiFunction = BaseSchemaApiFunction<ArcadeBundleType, ArcadeProfileType, ArcadeValueType>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*/
|
|
15
|
+
|
|
16
|
+
/** Definition for Arcade Api constant */
|
|
19
17
|
export type ArcadeApiConstant = BaseSchemaApiConstant<ArcadeBundleType, ArcadeProfileType>;
|
|
20
|
-
|
|
21
|
-
|
|
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,167 +1,116 @@
|
|
|
1
|
-
import { ArcadeApiConstant,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
*/
|
|
80
|
-
parameters?: SchemaProperty<ValueType>[];
|
|
81
|
-
/**
|
|
82
|
-
* The type of data returned by the function.
|
|
83
|
-
*/
|
|
84
|
-
returnValue?: SchemaReturnValue<ValueType>;
|
|
85
|
-
/**
|
|
86
|
-
* Indicates if the function consumes credits when called.
|
|
87
|
-
*/
|
|
88
|
-
consumesCredits?: boolean;
|
|
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>;
|
|
89
63
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
*/
|
|
64
|
+
|
|
65
|
+
/** Describes the properties for the type Property */
|
|
93
66
|
export interface SchemaProperty<ValueType extends SchemaValueType = SchemaValueType> {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
* Indicates if the property is optional.
|
|
109
|
-
*/
|
|
110
|
-
optional?: boolean;
|
|
111
|
-
/**
|
|
112
|
-
* The properties if the type is Dictionary.
|
|
113
|
-
*/
|
|
114
|
-
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>[];
|
|
115
81
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
*/
|
|
82
|
+
|
|
83
|
+
/** Describes the type fo data returned by a function. */
|
|
119
84
|
export interface SchemaReturnDefinition<T extends SchemaValueType = SchemaValueType> {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
*/
|
|
127
|
-
description?: string[] | string;
|
|
128
|
-
/**
|
|
129
|
-
* The properties if the type returned is a Dictionary
|
|
130
|
-
*/
|
|
131
|
-
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>[];
|
|
132
91
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
*/
|
|
92
|
+
|
|
93
|
+
/** Describes an example */
|
|
136
94
|
export interface SchemaExample {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Either a single line string or an array of strings.
|
|
143
|
-
*/
|
|
144
|
-
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;
|
|
145
99
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
*/
|
|
100
|
+
|
|
101
|
+
/** Describes a link to additional resources */
|
|
149
102
|
export interface SchemaResourceLink {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* The url to the resource.
|
|
156
|
-
*/
|
|
157
|
-
url: string;
|
|
103
|
+
/** The text used to describe the resource link. */
|
|
104
|
+
linkText: string;
|
|
105
|
+
/** The url to the resource. */
|
|
106
|
+
url: string;
|
|
158
107
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
*/
|
|
108
|
+
|
|
109
|
+
/** Definition for simple item */
|
|
162
110
|
export type SingularApiItem = ArcadeApiConstant | ArcadeApiFunction | SqlApiFunction;
|
|
111
|
+
|
|
163
112
|
/**
|
|
164
113
|
* Definition for a constant or a function.
|
|
165
114
|
* An Api Item can be either a constant, a function, or an array of functions
|
|
166
115
|
*/
|
|
167
|
-
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
|
-
*
|
|
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
|
-
|
|
9
|
-
*/
|
|
13
|
+
|
|
14
|
+
/** Union of profile types that can be used in any sdk schema */
|
|
10
15
|
export type ProfileType = ArcadeProfileType | SqlProfileType;
|
|
11
|
-
|
|
12
|
-
|
|
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
|
|
2
|
-
import { SqlApiFunction, SqlApiItem, SqlSchemaItemBase } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export type
|
|
7
|
-
|
|
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
|
-
|
|
14
|
-
*/
|
|
10
|
+
|
|
11
|
+
/** Union of API functions that can be used in any sdk schema */
|
|
15
12
|
export type SchemaApiFunction = ArcadeApiFunction | SqlApiFunction;
|
|
16
|
-
|
|
17
|
-
|
|
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
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
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
|
-
|
|
13
|
-
*/
|
|
10
|
+
|
|
11
|
+
/** Narrowed schema item type for sql */
|
|
14
12
|
export type SqlSchemaItemBase = GenericSchemaItemBase<SqlBundleType, SqlProfileType>;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
|
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": {
|
|
@@ -425,7 +425,7 @@
|
|
|
425
425
|
},
|
|
426
426
|
"snippet": {
|
|
427
427
|
"type": "string",
|
|
428
|
-
"description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the
|
|
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.",
|
|
429
429
|
"pattern": "^[A-Z]+.*$"
|
|
430
430
|
},
|
|
431
431
|
"examples": {
|
|
@@ -556,7 +556,7 @@
|
|
|
556
556
|
},
|
|
557
557
|
"snippet": {
|
|
558
558
|
"type": "string",
|
|
559
|
-
"description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the
|
|
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.",
|
|
560
560
|
"pattern": "^[A-Z]+.*$"
|
|
561
561
|
},
|
|
562
562
|
"examples": {
|
|
@@ -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
|
|
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": {
|
|
@@ -414,7 +414,7 @@
|
|
|
414
414
|
},
|
|
415
415
|
"snippet": {
|
|
416
416
|
"type": "string",
|
|
417
|
-
"description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the
|
|
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.",
|
|
418
418
|
"pattern": "^[A-Z]+.*$"
|
|
419
419
|
},
|
|
420
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
|
|
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": {
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./utilities.js";
|
|
2
|
+
|
|
@@ -1,58 +1,144 @@
|
|
|
1
|
-
import { ArcadeApiConstant
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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
|
-
|
|
6
|
-
|
|
8
|
+
relativePath: string;
|
|
9
|
+
absolutePath: string;
|
|
7
10
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
16
|
-
|
|
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
|
-
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export
|
|
28
|
-
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
export
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
export
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
export
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
export
|
|
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
|
|
58
|
-
|
|
141
|
+
export function interlaceArrays(array1: string[], array2: string[], positions?: number[]): string;
|
|
142
|
+
|
|
143
|
+
/** @param apiItem */
|
|
144
|
+
export function isSqlApiFunction(apiItem: SchemaApiItem): apiItem is SqlApiFunction;
|
package/dist/t9n-types.d.ts
CHANGED
|
@@ -1,28 +1,37 @@
|
|
|
1
1
|
export interface T9NApiRoot {
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
15
|
-
|
|
19
|
+
description?: Record<string, string>;
|
|
20
|
+
properties?: Record<string, T9NProperty>;
|
|
16
21
|
}
|
|
22
|
+
|
|
17
23
|
export interface T9NApiItem {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
35
|
+
description?: string;
|
|
36
|
+
properties?: T9NProfileVariables;
|
|
37
|
+
}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,84 +1,59 @@
|
|
|
1
|
-
import { BundleType } from
|
|
2
|
-
import { CompletionItem } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
interface SdkCategory {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
consumesCredits?: boolean;
|
|
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;
|
|
79
56
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
type SdkItem = SdkConstant | SdkFunction | SdkFunction[];
|
|
84
|
-
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.
|
|
3
|
+
"version": "5.2.0-next.112",
|
|
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",
|