@arcgis/arcade-languageservice 1.22.0-next.10

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.
Files changed (125) hide show
  1. package/LICENSE.md +13 -0
  2. package/README.md +21 -0
  3. package/dist/assets/api/arcade-api.t9n.ar.json +6702 -0
  4. package/dist/assets/api/arcade-api.t9n.bg.json +6702 -0
  5. package/dist/assets/api/arcade-api.t9n.bs.json +6702 -0
  6. package/dist/assets/api/arcade-api.t9n.ca.json +6702 -0
  7. package/dist/assets/api/arcade-api.t9n.cs.json +6702 -0
  8. package/dist/assets/api/arcade-api.t9n.da.json +6702 -0
  9. package/dist/assets/api/arcade-api.t9n.de.json +6702 -0
  10. package/dist/assets/api/arcade-api.t9n.el.json +6702 -0
  11. package/dist/assets/api/arcade-api.t9n.en.json +6702 -0
  12. package/dist/assets/api/arcade-api.t9n.es.json +6702 -0
  13. package/dist/assets/api/arcade-api.t9n.et.json +6702 -0
  14. package/dist/assets/api/arcade-api.t9n.fi.json +6702 -0
  15. package/dist/assets/api/arcade-api.t9n.fr.json +6702 -0
  16. package/dist/assets/api/arcade-api.t9n.he.json +6702 -0
  17. package/dist/assets/api/arcade-api.t9n.hr.json +6702 -0
  18. package/dist/assets/api/arcade-api.t9n.hu.json +6702 -0
  19. package/dist/assets/api/arcade-api.t9n.id.json +6702 -0
  20. package/dist/assets/api/arcade-api.t9n.it.json +6702 -0
  21. package/dist/assets/api/arcade-api.t9n.ja.json +6702 -0
  22. package/dist/assets/api/arcade-api.t9n.ko.json +6702 -0
  23. package/dist/assets/api/arcade-api.t9n.lt.json +6702 -0
  24. package/dist/assets/api/arcade-api.t9n.lv.json +6702 -0
  25. package/dist/assets/api/arcade-api.t9n.nb.json +6702 -0
  26. package/dist/assets/api/arcade-api.t9n.nl.json +6702 -0
  27. package/dist/assets/api/arcade-api.t9n.pl.json +6702 -0
  28. package/dist/assets/api/arcade-api.t9n.pt-BR.json +6702 -0
  29. package/dist/assets/api/arcade-api.t9n.pt-PT.json +6702 -0
  30. package/dist/assets/api/arcade-api.t9n.ro.json +6702 -0
  31. package/dist/assets/api/arcade-api.t9n.ru.json +6702 -0
  32. package/dist/assets/api/arcade-api.t9n.sk.json +6702 -0
  33. package/dist/assets/api/arcade-api.t9n.sl.json +6702 -0
  34. package/dist/assets/api/arcade-api.t9n.sr.json +6702 -0
  35. package/dist/assets/api/arcade-api.t9n.sv.json +6702 -0
  36. package/dist/assets/api/arcade-api.t9n.th.json +6702 -0
  37. package/dist/assets/api/arcade-api.t9n.tr.json +6702 -0
  38. package/dist/assets/api/arcade-api.t9n.uk.json +6702 -0
  39. package/dist/assets/api/arcade-api.t9n.vi.json +6702 -0
  40. package/dist/assets/api/arcade-api.t9n.zh-CN.json +6702 -0
  41. package/dist/assets/api/arcade-api.t9n.zh-HK.json +6702 -0
  42. package/dist/assets/api/arcade-api.t9n.zh-TW.json +6702 -0
  43. package/dist/assets/profiles/arcade-profiles.t9n.ar.json +745 -0
  44. package/dist/assets/profiles/arcade-profiles.t9n.bg.json +745 -0
  45. package/dist/assets/profiles/arcade-profiles.t9n.bs.json +745 -0
  46. package/dist/assets/profiles/arcade-profiles.t9n.ca.json +745 -0
  47. package/dist/assets/profiles/arcade-profiles.t9n.cs.json +745 -0
  48. package/dist/assets/profiles/arcade-profiles.t9n.da.json +745 -0
  49. package/dist/assets/profiles/arcade-profiles.t9n.de.json +745 -0
  50. package/dist/assets/profiles/arcade-profiles.t9n.el.json +745 -0
  51. package/dist/assets/profiles/arcade-profiles.t9n.en.json +738 -0
  52. package/dist/assets/profiles/arcade-profiles.t9n.es.json +745 -0
  53. package/dist/assets/profiles/arcade-profiles.t9n.et.json +745 -0
  54. package/dist/assets/profiles/arcade-profiles.t9n.fi.json +745 -0
  55. package/dist/assets/profiles/arcade-profiles.t9n.fr.json +745 -0
  56. package/dist/assets/profiles/arcade-profiles.t9n.he.json +745 -0
  57. package/dist/assets/profiles/arcade-profiles.t9n.hr.json +745 -0
  58. package/dist/assets/profiles/arcade-profiles.t9n.hu.json +745 -0
  59. package/dist/assets/profiles/arcade-profiles.t9n.id.json +745 -0
  60. package/dist/assets/profiles/arcade-profiles.t9n.it.json +745 -0
  61. package/dist/assets/profiles/arcade-profiles.t9n.ja.json +745 -0
  62. package/dist/assets/profiles/arcade-profiles.t9n.ko.json +745 -0
  63. package/dist/assets/profiles/arcade-profiles.t9n.lt.json +745 -0
  64. package/dist/assets/profiles/arcade-profiles.t9n.lv.json +745 -0
  65. package/dist/assets/profiles/arcade-profiles.t9n.nb.json +745 -0
  66. package/dist/assets/profiles/arcade-profiles.t9n.nl.json +745 -0
  67. package/dist/assets/profiles/arcade-profiles.t9n.pl.json +745 -0
  68. package/dist/assets/profiles/arcade-profiles.t9n.pt-BR.json +745 -0
  69. package/dist/assets/profiles/arcade-profiles.t9n.pt-PT.json +745 -0
  70. package/dist/assets/profiles/arcade-profiles.t9n.ro.json +745 -0
  71. package/dist/assets/profiles/arcade-profiles.t9n.ru.json +745 -0
  72. package/dist/assets/profiles/arcade-profiles.t9n.sk.json +745 -0
  73. package/dist/assets/profiles/arcade-profiles.t9n.sl.json +745 -0
  74. package/dist/assets/profiles/arcade-profiles.t9n.sr.json +745 -0
  75. package/dist/assets/profiles/arcade-profiles.t9n.sv.json +745 -0
  76. package/dist/assets/profiles/arcade-profiles.t9n.th.json +745 -0
  77. package/dist/assets/profiles/arcade-profiles.t9n.tr.json +745 -0
  78. package/dist/assets/profiles/arcade-profiles.t9n.uk.json +745 -0
  79. package/dist/assets/profiles/arcade-profiles.t9n.vi.json +745 -0
  80. package/dist/assets/profiles/arcade-profiles.t9n.zh-CN.json +745 -0
  81. package/dist/assets/profiles/arcade-profiles.t9n.zh-HK.json +745 -0
  82. package/dist/assets/profiles/arcade-profiles.t9n.zh-TW.json +745 -0
  83. package/dist/assets/t9n/profile.t9n.ar.json +33 -0
  84. package/dist/assets/t9n/profile.t9n.bg.json +33 -0
  85. package/dist/assets/t9n/profile.t9n.bs.json +33 -0
  86. package/dist/assets/t9n/profile.t9n.ca.json +33 -0
  87. package/dist/assets/t9n/profile.t9n.cs.json +33 -0
  88. package/dist/assets/t9n/profile.t9n.da.json +33 -0
  89. package/dist/assets/t9n/profile.t9n.de.json +33 -0
  90. package/dist/assets/t9n/profile.t9n.el.json +33 -0
  91. package/dist/assets/t9n/profile.t9n.en.json +33 -0
  92. package/dist/assets/t9n/profile.t9n.es.json +33 -0
  93. package/dist/assets/t9n/profile.t9n.et.json +33 -0
  94. package/dist/assets/t9n/profile.t9n.fi.json +33 -0
  95. package/dist/assets/t9n/profile.t9n.fr.json +33 -0
  96. package/dist/assets/t9n/profile.t9n.he.json +33 -0
  97. package/dist/assets/t9n/profile.t9n.hr.json +33 -0
  98. package/dist/assets/t9n/profile.t9n.hu.json +33 -0
  99. package/dist/assets/t9n/profile.t9n.id.json +33 -0
  100. package/dist/assets/t9n/profile.t9n.it.json +33 -0
  101. package/dist/assets/t9n/profile.t9n.ja.json +33 -0
  102. package/dist/assets/t9n/profile.t9n.ko.json +33 -0
  103. package/dist/assets/t9n/profile.t9n.lt.json +33 -0
  104. package/dist/assets/t9n/profile.t9n.lv.json +33 -0
  105. package/dist/assets/t9n/profile.t9n.nb.json +33 -0
  106. package/dist/assets/t9n/profile.t9n.nl.json +33 -0
  107. package/dist/assets/t9n/profile.t9n.pl.json +33 -0
  108. package/dist/assets/t9n/profile.t9n.pt-BR.json +33 -0
  109. package/dist/assets/t9n/profile.t9n.pt-PT.json +33 -0
  110. package/dist/assets/t9n/profile.t9n.ro.json +33 -0
  111. package/dist/assets/t9n/profile.t9n.ru.json +33 -0
  112. package/dist/assets/t9n/profile.t9n.sk.json +33 -0
  113. package/dist/assets/t9n/profile.t9n.sl.json +33 -0
  114. package/dist/assets/t9n/profile.t9n.sr.json +33 -0
  115. package/dist/assets/t9n/profile.t9n.sv.json +33 -0
  116. package/dist/assets/t9n/profile.t9n.th.json +33 -0
  117. package/dist/assets/t9n/profile.t9n.tr.json +33 -0
  118. package/dist/assets/t9n/profile.t9n.uk.json +33 -0
  119. package/dist/assets/t9n/profile.t9n.vi.json +33 -0
  120. package/dist/assets/t9n/profile.t9n.zh-CN.json +33 -0
  121. package/dist/assets/t9n/profile.t9n.zh-HK.json +33 -0
  122. package/dist/assets/t9n/profile.t9n.zh-TW.json +33 -0
  123. package/dist/esm/index.d.ts +478 -0
  124. package/dist/esm/index.js +34 -0
  125. package/package.json +62 -0
@@ -0,0 +1,33 @@
1
+ {
2
+ "layer": "Đ_Layer___________ớ",
3
+ "featureservice": "Đ_Feature service________________ớ",
4
+ "mapservice": "Đ_Map service____________ớ",
5
+ "webmap": "Đ_Web Map_______________ớ",
6
+ "webmapformat": "Đ_Web map: {webMapTitle}_______________________ớ",
7
+ "item": "Đ_Item_________ớ",
8
+ "invoking": "Đ_Invoking_________________ớ",
9
+ "fields": "Đ_Field names____________ớ",
10
+ "values": "Đ_Values_____________ớ",
11
+ "relationships": "Đ_Related features_________________ớ",
12
+ "layers": "Đ_Layers_____________ớ",
13
+ "tables": "Đ_Tables_____________ớ",
14
+ "geometry": "Đ_Geometry_________________ớ",
15
+ "dictionary": "Đ_Dictionary_____________________ớ",
16
+ "feature": "Đ_Feature_______________ớ",
17
+ "featureset": "Đ_Feature set____________ớ",
18
+ "featuresetcollection": "Đ_Feature set collection_______________________ớ",
19
+ "oid": "Đ_Feature ID_____________________ớ",
20
+ "number": "Đ_Number_____________ớ",
21
+ "string": "Đ_String_____________ớ",
22
+ "date": "Đ_Date_________ớ",
23
+ "blob": "Đ_Binary_____________ớ",
24
+ "raster": "Đ_Raster_____________ớ",
25
+ "guid": "Đ_GUID_________ớ",
26
+ "global-id": "Đ_Global ID___________________ớ",
27
+ "xml": "Đ_XML_______ớ",
28
+ "function": "Đ_Function_________________ớ",
29
+ "domainvalues": "Đ_Domain values______________ớ",
30
+ "subtypes": "Đ_Subtypes_________________ớ",
31
+ "domainvaluesfortypeformat": "Đ_{fieldName} - Domain values for type '{typeName}'__________________________ớ",
32
+ "domainvaluesbysubtypes": "Đ_Domain values by subtypes__________________________ớ"
33
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "layer": "试_Layer___________验",
3
+ "featureservice": "试_Feature service________________验",
4
+ "mapservice": "试_Map service____________验",
5
+ "webmap": "试_Web Map_______________验",
6
+ "webmapformat": "试_Web map: {webMapTitle}_______________________验",
7
+ "item": "试_Item_________验",
8
+ "invoking": "试_Invoking_________________验",
9
+ "fields": "试_Field names____________验",
10
+ "values": "试_Values_____________验",
11
+ "relationships": "试_Related features_________________验",
12
+ "layers": "试_Layers_____________验",
13
+ "tables": "试_Tables_____________验",
14
+ "geometry": "试_Geometry_________________验",
15
+ "dictionary": "试_Dictionary_____________________验",
16
+ "feature": "试_Feature_______________验",
17
+ "featureset": "试_Feature set____________验",
18
+ "featuresetcollection": "试_Feature set collection_______________________验",
19
+ "oid": "试_Feature ID_____________________验",
20
+ "number": "试_Number_____________验",
21
+ "string": "试_String_____________验",
22
+ "date": "试_Date_________验",
23
+ "blob": "试_Binary_____________验",
24
+ "raster": "试_Raster_____________验",
25
+ "guid": "试_GUID_________验",
26
+ "global-id": "试_Global ID___________________验",
27
+ "xml": "试_XML_______验",
28
+ "function": "试_Function_________________验",
29
+ "domainvalues": "试_Domain values______________验",
30
+ "subtypes": "试_Subtypes_________________验",
31
+ "domainvaluesfortypeformat": "试_{fieldName} - Domain values for type '{typeName}'__________________________验",
32
+ "domainvaluesbysubtypes": "试_Domain values by subtypes__________________________验"
33
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "layer": "試_Layer___________驗",
3
+ "featureservice": "試_Feature service________________驗",
4
+ "mapservice": "試_Map service____________驗",
5
+ "webmap": "試_Web Map_______________驗",
6
+ "webmapformat": "試_Web map: {webMapTitle}_______________________驗",
7
+ "item": "試_Item_________驗",
8
+ "invoking": "試_Invoking_________________驗",
9
+ "fields": "試_Field names____________驗",
10
+ "values": "試_Values_____________驗",
11
+ "relationships": "試_Related features_________________驗",
12
+ "layers": "試_Layers_____________驗",
13
+ "tables": "試_Tables_____________驗",
14
+ "geometry": "試_Geometry_________________驗",
15
+ "dictionary": "試_Dictionary_____________________驗",
16
+ "feature": "試_Feature_______________驗",
17
+ "featureset": "試_Feature set____________驗",
18
+ "featuresetcollection": "試_Feature set collection_______________________驗",
19
+ "oid": "試_Feature ID_____________________驗",
20
+ "number": "試_Number_____________驗",
21
+ "string": "試_String_____________驗",
22
+ "date": "試_Date_________驗",
23
+ "blob": "試_Binary_____________驗",
24
+ "raster": "試_Raster_____________驗",
25
+ "guid": "試_GUID_________驗",
26
+ "global-id": "試_Global ID___________________驗",
27
+ "xml": "試_XML_______驗",
28
+ "function": "試_Function_________________驗",
29
+ "domainvalues": "試_Domain values______________驗",
30
+ "subtypes": "試_Subtypes_________________驗",
31
+ "domainvaluesfortypeformat": "試_{fieldName} - Domain values for type '{typeName}'__________________________驗",
32
+ "domainvaluesbysubtypes": "試_Domain values by subtypes__________________________驗"
33
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "layer": "試_Layer___________驗",
3
+ "featureservice": "試_Feature service________________驗",
4
+ "mapservice": "試_Map service____________驗",
5
+ "webmap": "試_Web Map_______________驗",
6
+ "webmapformat": "試_Web map: {webMapTitle}_______________________驗",
7
+ "item": "試_Item_________驗",
8
+ "invoking": "試_Invoking_________________驗",
9
+ "fields": "試_Field names____________驗",
10
+ "values": "試_Values_____________驗",
11
+ "relationships": "試_Related features_________________驗",
12
+ "layers": "試_Layers_____________驗",
13
+ "tables": "試_Tables_____________驗",
14
+ "geometry": "試_Geometry_________________驗",
15
+ "dictionary": "試_Dictionary_____________________驗",
16
+ "feature": "試_Feature_______________驗",
17
+ "featureset": "試_Feature set____________驗",
18
+ "featuresetcollection": "試_Feature set collection_______________________驗",
19
+ "oid": "試_Feature ID_____________________驗",
20
+ "number": "試_Number_____________驗",
21
+ "string": "試_String_____________驗",
22
+ "date": "試_Date_________驗",
23
+ "blob": "試_Binary_____________驗",
24
+ "raster": "試_Raster_____________驗",
25
+ "guid": "試_GUID_________驗",
26
+ "global-id": "試_Global ID___________________驗",
27
+ "xml": "試_XML_______驗",
28
+ "function": "試_Function_________________驗",
29
+ "domainvalues": "試_Domain values______________驗",
30
+ "subtypes": "試_Subtypes_________________驗",
31
+ "domainvaluesfortypeformat": "試_{fieldName} - Domain values for type '{typeName}'__________________________驗",
32
+ "domainvaluesbysubtypes": "試_Domain values by subtypes__________________________驗"
33
+ }
@@ -0,0 +1,478 @@
1
+ import { CompletionItem, Range, DiagnosticSeverity, Position, CompletionList, TextEdit } from 'vscode-languageserver-types';
2
+ export { DiagnosticSeverity } from 'vscode-languageserver-types';
3
+ import { TextDocument } from 'vscode-languageserver-textdocument';
4
+
5
+ /**
6
+ * Supported function bundles
7
+ */
8
+ type BundleType = "core" | "data-access" | "database" | "geometry" | "portal-access" | "track";
9
+
10
+ /**
11
+ * The list of supported profiles
12
+ */
13
+ type ProfileId = "minimalist" | "alias" | "attribute-rule-calculation" | "attribute-rule-constraint" | "attribute-rule-validation" | "dashboard-indicator-formatting" | "dashboard-list-formatting" | "dashboard-table-formatting" | "dashboard-data" | "dictionary-renderer" | "feature-z" | "field-calculation" | "field-mapping" | "form-calculation" | "form-constraint" | "geoanalytics" | "geotrigger-notification" | "labeling" | "layout" | "location-update-constraint" | "measure-visualization" | "popup" | "popup-element" | "popup-feature-reduction" | "popup-element-feature-reduction" | "quick-capture" | "tasks" | "velocity" | "visualization";
14
+ /**
15
+ * Describes a profile
16
+ */
17
+ interface SdkPredefinedProfile {
18
+ /**
19
+ * Profile name for UI
20
+ */
21
+ name: string;
22
+ /**
23
+ * Profile id for docs
24
+ */
25
+ id: ProfileId;
26
+ /**
27
+ * Function bundles enabled for this profile
28
+ */
29
+ bundles: BundleType[];
30
+ /**
31
+ * Variable describing name, type, and providing description
32
+ */
33
+ variables: SdkVariable[];
34
+ }
35
+ /**
36
+ * Supported profile variable types
37
+ */
38
+ type SdkVariableType = "number" | "text" | "date" | "boolean" | "dictionary" | "array" | "geometry" | "feature" | "featureSet" | "featureSetCollection";
39
+ /**
40
+ * Describes variables
41
+ */
42
+ interface SdkVariableBase {
43
+ /**
44
+ * Name of the variable.
45
+ */
46
+ name: string;
47
+ /**
48
+ * Type of the variable.
49
+ */
50
+ type: SdkVariableType;
51
+ /**
52
+ * Description of the variable.
53
+ */
54
+ description?: string;
55
+ }
56
+ /**
57
+ * A variable that represents a simple type (boolean, number, feature, etc.)
58
+ */
59
+ interface SdkValueVariable extends SdkVariableBase {
60
+ type: Exclude<SdkVariableType, "dictionary">;
61
+ }
62
+ /**
63
+ * A dictionary variable
64
+ */
65
+ interface SdkDictionaryVariable extends SdkVariableBase {
66
+ type: "dictionary";
67
+ properties: SdkVariable[];
68
+ }
69
+ /**
70
+ * Profile variable
71
+ */
72
+ type SdkVariable = SdkValueVariable | SdkDictionaryVariable;
73
+
74
+ /**
75
+ * Represents an api category and its items
76
+ */
77
+ interface SdkCategory {
78
+ /**
79
+ * The unique ID for the category
80
+ */
81
+ id: string;
82
+ /**
83
+ * The title for the category
84
+ */
85
+ title: string;
86
+ /**
87
+ * The collection of api items for the category
88
+ */
89
+ items: SdkItem[];
90
+ }
91
+ interface SdkItemBase {
92
+ /**
93
+ * The name of the function or constant.
94
+ */
95
+ name: string;
96
+ /**
97
+ * The version string when the api item was introduced. If undefined then it was from the origin.
98
+ */
99
+ sinceVersion?: string;
100
+ /**
101
+ * The api bundle this item belongs to.
102
+ */
103
+ bundle: BundleType;
104
+ /**
105
+ * Markdown description of the item.
106
+ */
107
+ description: string;
108
+ /**
109
+ * Markdown containing examples.
110
+ */
111
+ examples: string;
112
+ /**
113
+ * Link for additional information about the item.
114
+ */
115
+ link: string;
116
+ /**
117
+ * Completion item directly leveraged by the editor.
118
+ */
119
+ completion: CompletionItem;
120
+ /**
121
+ * Indicates if the documentation for this item should be disabled.
122
+ */
123
+ disableDocumentation?: boolean;
124
+ }
125
+ /**
126
+ * Represents a constant in the arcade api.
127
+ */
128
+ interface SdkConstant extends SdkItemBase {
129
+ type: "constant";
130
+ }
131
+ /**
132
+ * Represents a function in the arcade api
133
+ */
134
+ interface SdkFunction extends SdkItemBase {
135
+ type: "function";
136
+ /**
137
+ * Information leveraged by the editor to validate function call.
138
+ * Indicates the minimum number of expected parameters and the maximum number of parameters expected.
139
+ */
140
+ parametersInfo: {
141
+ min: number;
142
+ max: number;
143
+ };
144
+ }
145
+ /**
146
+ * Represents an item in the arcade api.
147
+ */
148
+ type SdkItem = SdkConstant | SdkFunction | SdkFunction[];
149
+
150
+ /**
151
+ * Describes the formatting options
152
+ */
153
+ interface FormattingOptions {
154
+ /**
155
+ * Number of spaces the formatter should use for indentation.
156
+ * If you do not pass this option explicitly, it will be
157
+ * (quite reliably!) inferred from the original code.
158
+ * @default 2
159
+ */
160
+ indentWidth?: number;
161
+ /**
162
+ * Some of the formatter code (such as that for printing function
163
+ * parameter lists) makes a valiant attempt to prevent really long
164
+ * lines. You can adjust the limit by changing this option; however,
165
+ * there is no guarantee that line length will fit inside this limit.
166
+ * @default 80
167
+ */
168
+ wrapColumn?: number;
169
+ /**
170
+ * If you want to override the quotes used in string literals, specify
171
+ * either "single", "double", or "auto" here ("auto" will select the one
172
+ * which results in the shorter literal) Otherwise, use double quotes.
173
+ * @default null
174
+ */
175
+ quote?: "single" | "double" | "auto" | null;
176
+ }
177
+
178
+ /**
179
+ * The editor can be extended with custom snippets
180
+ */
181
+ interface ApiSnippet {
182
+ /**
183
+ * The label for the snippet. The editor will use it to offer the snippet based on the text typed in the editor.
184
+ * It's recommended to keep it short and as close as possible to what the user may be looking for.
185
+ * For example: 'polyline'
186
+ */
187
+ label: string;
188
+ /**
189
+ * A slightly longer description of what the snippet offers.
190
+ */
191
+ detail: string;
192
+ /**
193
+ * A string that should be inserted into the script when selecting
194
+ * this snippet.
195
+ *
196
+ * The `insertText` is subject to interpretation by the editor.
197
+ * Use this rules: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#snippet_syntax
198
+ */
199
+ insertText: string;
200
+ }
201
+ /**
202
+ * Language service api options
203
+ */
204
+ interface ApiContext {
205
+ /**
206
+ * The profile (variables, additional api items, bundles, etc.)
207
+ */
208
+ profile?: ApiProfile;
209
+ /**
210
+ * The locale for the Api
211
+ */
212
+ locale?: string;
213
+ /**
214
+ * Options to control how the script should be formatted
215
+ */
216
+ formattingOptions?: FormattingOptions;
217
+ /**
218
+ * Allows to augment the arcade snippets with a collection of snippets
219
+ */
220
+ snippets?: ApiSnippet[];
221
+ }
222
+ /**
223
+ * Language service profile
224
+ */
225
+ interface ApiProfile {
226
+ /**
227
+ * The wellknown profile id if applicable
228
+ */
229
+ id?: ProfileId;
230
+ /**
231
+ * The set of profile variables
232
+ */
233
+ variables: ApiVariable[];
234
+ /**
235
+ * The api version to use
236
+ */
237
+ apiVersion?: string;
238
+ /**
239
+ * The api bundles to use
240
+ */
241
+ bundles?: BundleType[];
242
+ /**
243
+ * A collection of api item names to hide.
244
+ */
245
+ hiddenApiItems?: Array<string>;
246
+ }
247
+ /**
248
+ * The type for value variable.
249
+ */
250
+ type ApiValueVariableType = Exclude<SdkVariableType, "dictionary">;
251
+ interface ApiVariableBase {
252
+ /**
253
+ * Name of the variable
254
+ */
255
+ name: string;
256
+ /**
257
+ * Optional short description for the variable
258
+ */
259
+ description?: string;
260
+ /**
261
+ * Completion item for the variable, leveraged bu the editor
262
+ */
263
+ completion?: CompletionItem;
264
+ }
265
+ /**
266
+ * Describes a dictionary type (feature, dictionary)
267
+ */
268
+ interface ApiDictionaryVariable extends ApiVariableBase {
269
+ type: "dictionary";
270
+ /**
271
+ * Dictionary properties
272
+ */
273
+ properties: ApiVariable[];
274
+ }
275
+ /**
276
+ * Describes a simple variable type (number, featureSet, etc.)
277
+ */
278
+ interface ApiValueVariable extends ApiVariableBase {
279
+ type: ApiValueVariableType;
280
+ }
281
+ /**
282
+ * The profile variable type
283
+ */
284
+ type ApiVariable = ApiDictionaryVariable | ApiValueVariable;
285
+ /**
286
+ * Helper function to test if a variable is a value variable
287
+ */
288
+ declare function isValueVariable(variable: ApiVariable | null | undefined): variable is ApiValueVariable;
289
+ /**
290
+ * Helper function to test if a variable is a dictionary variable
291
+ */
292
+ declare function isDictionaryVariable(variable: ApiVariable | null | undefined): variable is ApiDictionaryVariable;
293
+
294
+ declare enum Literals {
295
+ False = "false",
296
+ Null = "null",
297
+ True = "true"
298
+ }
299
+ declare enum Keywords {
300
+ Break = "break",
301
+ Continue = "continue",
302
+ Else = "else",
303
+ For = "for",
304
+ From = "from",
305
+ Function = "function",
306
+ If = "if",
307
+ Import = "import",
308
+ Export = "export",
309
+ In = "in",
310
+ Return = "return",
311
+ Var = "var",
312
+ While = "while"
313
+ }
314
+ declare enum DiagnosticCodes$1 {
315
+ InvalidModuleUri = "InvalidModuleUri",
316
+ ForInOfLoopInitializer = "ForInOfLoopInitializer",
317
+ IdentiferExpected = "IdentiferExpected",
318
+ InvalidEscapedReservedWord = "InvalidEscapedReservedWord",
319
+ InvalidExpression = "InvalidExpression",
320
+ InvalidFunctionIdentifier = "InvalidFunctionIdentifier",
321
+ InvalidHexEscapeSequence = "InvalidHexEscapeSequence",
322
+ InvalidLeftHandSideInAssignment = "InvalidLeftHandSideInAssignment",
323
+ InvalidLeftHandSideInForIn = "InvalidLeftHandSideInForIn",
324
+ InvalidTemplateHead = "InvalidTemplateHead",
325
+ InvalidVariableAssignment = "InvalidVariableAssignment",
326
+ KeyMustBeString = "KeyMustBeString",
327
+ NoFunctionInsideBlock = "NoFunctionInsideBlock",
328
+ NoFunctionInsideFunction = "NoFunctionInsideFunction",
329
+ ModuleExportRootOnly = "ModuleExportRootOnly",
330
+ ModuleImportRootOnly = "ModuleImportRootOnly",
331
+ PunctuatorExpected = "PunctuatorExpected",
332
+ TemplateOctalLiteral = "TemplateOctalLiteral",
333
+ UnexpectedBoolean = "UnexpectedBoolean",
334
+ UnexpectedEndOfScript = "UnexpectedEndOfScript",
335
+ UnexpectedIdentifier = "UnexpectedIdentifier",
336
+ UnexpectedKeyword = "UnexpectedKeyword",
337
+ UnexpectedNull = "UnexpectedNull",
338
+ UnexpectedNumber = "UnexpectedNumber",
339
+ UnexpectedPunctuator = "UnexpectedPunctuator",
340
+ UnexpectedString = "UnexpectedString",
341
+ UnexpectedTemplate = "UnexpectedTemplate",
342
+ UnexpectedToken = "UnexpectedToken"
343
+ }
344
+
345
+ /**
346
+ * Represents the data associated with a diagnostic.
347
+ * For example in case of an error associated to an identifier,
348
+ * the DiagnosticData will contain a key 'identifier' and its value.
349
+ */
350
+ type DiagnosticData = Record<string, number | string>;
351
+ /**
352
+ * The combined diagnostic codes
353
+ */
354
+ type DiagnosticCodes = DiagnosticCodes$1 | ValidationDiagnosticCodes;
355
+ /**
356
+ * Represents a diagnostic, such as a parsing error or warning.
357
+ */
358
+ interface Diagnostic {
359
+ /**
360
+ * The range at which the message applies
361
+ */
362
+ range: Range;
363
+ /**
364
+ * The diagnostic's severity. Can be omitted. If omitted it is up to the
365
+ * client to interpret diagnostics as error, warning, info or hint.
366
+ */
367
+ severity?: DiagnosticSeverity;
368
+ /**
369
+ * The diagnostic's code.
370
+ */
371
+ code: DiagnosticCodes;
372
+ /**
373
+ * The diagnostic's message. It usually appears in the user interface
374
+ */
375
+ message: string;
376
+ /**
377
+ * A data entry field that is preserved between a `textDocument/publishDiagnostics`
378
+ * notification and `textDocument/codeAction` request.
379
+ */
380
+ data?: DiagnosticData | null;
381
+ }
382
+ declare enum ValidationDiagnosticCodes {
383
+ AlreadyDefined = "AlreadyDefined",
384
+ ApiConflict = "ApiConflict",
385
+ AssignedNeverUsed = "AssignedNeverUsed",
386
+ DefinedNeverAssigned = "DefinedNeverAssigned",
387
+ DefinedNeverUsed = "DefinedNeverUsed",
388
+ EmptyBlockStatement = "EmptyBlockStatement",
389
+ ExecutionError = "ExecutionError",
390
+ InvalidApiFunctionUsage = "InvalidApiFunctionUsage",
391
+ InvalidConstantIdentifier = "InvalidConstantIdentifier",
392
+ InvalidPropertyIdentifier = "InvalidPropertyIdentifier",
393
+ NoArgumentExpected = "NoArgumentExpected",
394
+ NotADictionary = "NotADictionary",
395
+ NotDefined = "NotDefined",
396
+ NotEnoughArguments = "NotEnoughArguments",
397
+ ProfileVariablesAreImmutable = "ProfileVariablesAreImmutable",
398
+ ProfileVariablesConflict = "ProfileVariablesConflict",
399
+ ReservedKeyword = "ReservedKeyword",
400
+ TooManyArguments = "TooManyArguments",
401
+ UnexpectedEmptyFunction = "UnexpectedEmptyFunction",
402
+ UnexpectedPropertyIdentifier = "UnexpectedPropertyIdentifier",
403
+ UnknownPropertyIdentifier = "UnknownPropertyIdentifier"
404
+ }
405
+ declare const DiagnosticMessages: {
406
+ [key in ValidationDiagnosticCodes & DiagnosticCodes$1]: string;
407
+ };
408
+
409
+ /**
410
+ * Represent items stored in the library
411
+ */
412
+ type ApiItem = SdkConstant | SdkFunction;
413
+ /**
414
+ * Represent a category of api items in the api library
415
+ */
416
+ interface ApiCategory extends SdkCategory {
417
+ items: ApiItem[];
418
+ }
419
+
420
+ declare const ArcadeKeywords: Keywords[];
421
+ declare const ArcadeLiterals: Literals[];
422
+ declare const ArcadeReservedKeywords: string[];
423
+
424
+ /**
425
+ * Language service settings
426
+ */
427
+ interface ArcadeLanguageServiceSettings {
428
+ /**
429
+ * The path to the assets folder where the arcade api files are stored
430
+ */
431
+ assetsPath?: string;
432
+ }
433
+
434
+ declare class ArcadeLanguageService {
435
+ private languageOptions;
436
+ private apiService;
437
+ configure(languageOptions?: ArcadeLanguageServiceSettings): void;
438
+ doValidation(document: TextDocument, context: ApiContext): Promise<Diagnostic[]>;
439
+ doComplete(document: TextDocument, position: Position, context: ApiContext): Promise<CompletionList>;
440
+ doFormat(document: TextDocument, context: ApiContext): TextEdit[];
441
+ getApiLibrary(context: ApiContext): Promise<ApiCategory[]>;
442
+ }
443
+
444
+ type ProfileStrings = {
445
+ layer: string;
446
+ featureservice: string;
447
+ mapservice: string;
448
+ webmap: string;
449
+ webmapformat: string;
450
+ item: string;
451
+ invoking: string;
452
+ fields: string;
453
+ values: string;
454
+ relationships: string;
455
+ layers: string;
456
+ tables: string;
457
+ geometry: string;
458
+ dictionary: string;
459
+ feature: string;
460
+ featureset: string;
461
+ featuresetcollection: string;
462
+ oid: string;
463
+ number: string;
464
+ string: string;
465
+ date: string;
466
+ blob: string;
467
+ raster: string;
468
+ guid: string;
469
+ "global-id": string;
470
+ xml: string;
471
+ function: string;
472
+ domainvalues: string;
473
+ subtypes: string;
474
+ domainvaluesfortypeformat: string;
475
+ domainvaluesbysubtypes: string;
476
+ };
477
+
478
+ export { type ApiCategory, type SdkConstant as ApiConstant, type ApiContext, type ApiDictionaryVariable, type SdkFunction as ApiFunction, type ApiItem, type ApiProfile, type ApiSnippet, type ApiValueVariable, type ApiValueVariableType, type ApiVariable, type SdkVariableType as ApiVariableType, ArcadeKeywords, ArcadeLanguageService, type ArcadeLanguageServiceSettings, ArcadeLiterals, ArcadeReservedKeywords, type BundleType, type Diagnostic, type DiagnosticCodes, type DiagnosticData, DiagnosticMessages, type FormattingOptions, type ProfileId, type ProfileStrings, type SdkPredefinedProfile, ValidationDiagnosticCodes, isDictionaryVariable, isValueVariable };