@arcgis/languages-sdk-spec 5.2.0-next.13 → 5.2.0-next.130

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.
@@ -1,21 +1,15 @@
1
- import { ArcadeApiFunction, ArcadeApiItem, ArcadeSchemaItemBase } from './arcade';
2
- import { SqlApiFunction, SqlApiItem, SqlSchemaItemBase } from './sql';
3
- /**
4
- *
5
- */
6
- export type { ArcadeApiItem, ArcadeApiConstant } from './arcade';
7
- export type { SqlApiItem } from './sql';
8
- /**
9
- * Union of API items that can be used in any sdk schema
10
- */
1
+ import type { ArcadeApiFunction, ArcadeApiItem, ArcadeSchemaItemBase } from "./arcade.js";
2
+ import type { SqlApiFunction, SqlApiItem, SqlSchemaItemBase } from "./sql.js";
3
+
4
+ export { type ArcadeApiItem, type ArcadeApiConstant } from "./arcade.js";
5
+ export type * from "./base.js";
6
+ export type * from "./common.js";
7
+
8
+ /** Union of API items that can be used in any sdk schema */
11
9
  export type SchemaApiItem = ArcadeApiItem | SqlApiItem;
12
- /**
13
- * Union of API functions that can be used in any sdk schema
14
- */
10
+
11
+ /** Union of API functions that can be used in any sdk schema */
15
12
  export type SchemaApiFunction = ArcadeApiFunction | SqlApiFunction;
16
- /**
17
- * Union of schema items that can be used in any sdk schema
18
- */
19
- export type SchemaItemBase = ArcadeSchemaItemBase | SqlSchemaItemBase;
20
- export type * from './base';
21
- export type * from './common';
13
+
14
+ /** Union of schema items that can be used in any sdk schema */
15
+ export type SchemaItemBase = ArcadeSchemaItemBase | SqlSchemaItemBase;
@@ -1,55 +1,40 @@
1
- import { BaseSchemaApiFunction, BaseSchemaApiItem, GenericSchemaItemBase } from './base';
2
- /**
3
- * Supported function bundles
4
- */
1
+ import type { BaseSchemaApiFunction, BaseSchemaApiItem, GenericSchemaItemBase } from "./base.js";
2
+
3
+ /** Supported function bundles */
5
4
  export type SqlBundleType = "date" | "numeric" | "string";
6
- /**
7
- * Supported sql profile names
8
- */
5
+
6
+ /** Supported sql profile names */
9
7
  export type SqlProfileType = "Field Calculation";
8
+
10
9
  export type SqlValueType = "Datetime" | "Number" | "String";
11
- /**
12
- * Narrowed schema item type for sql
13
- */
10
+
11
+ /** Narrowed schema item type for sql */
14
12
  export type SqlSchemaItemBase = GenericSchemaItemBase<SqlBundleType, SqlProfileType>;
15
- /**
16
- * Narrowed api function type for sql
17
- */
18
- export type SqlApiFunction = BaseSchemaApiFunction<SqlBundleType, SqlProfileType, SqlValueType> & {
19
- /**
20
- * The name of the function.
21
- */
22
- name: string;
23
- /**
24
- * SQL functions may be "special registers" that are not called like regular functions.
25
- * For example, CURRENT_DATE is a special register.
26
- * These functions are not called with parentheses or arguments.
27
- */
28
- isSpecialRegister?: boolean;
29
- /**
30
- * The set of keywords that are used in the function.
31
- */
32
- keywords?: SchemaKeyword[];
13
+
14
+ /** Narrowed api function type for sql */
15
+ export type SqlApiFunction = BaseSchemaApiFunction<SqlBundleType, SqlProfileType, SqlValueType>
16
+ & {
17
+ /** The name of the function. */
18
+ name: string;
19
+ /**
20
+ * SQL functions may be "special registers" that are not called like regular functions.
21
+ * For example, CURRENT_DATE is a special register.
22
+ * These functions are not called with parentheses or arguments.
23
+ */
24
+ isSpecialRegister?: boolean;
25
+ /** The set of keywords that are used in the function. */
26
+ keywords?: SchemaKeyword[];
33
27
  };
34
- /**
35
- * Narrowed api item type for sql. Sql does not have constants so all sql items are "functions".
36
- */
28
+
29
+ /** Narrowed api item type for sql. Sql does not have constants so all sql items are "functions". */
37
30
  export type SqlApiItem = BaseSchemaApiItem<SqlApiFunction>;
38
- /**
39
- * Describes a keyword used in a function
40
- */
41
- interface SchemaKeyword {
42
- /**
43
- * The name of the keyword.
44
- */
45
- name: string;
46
- /**
47
- * The description for the keyword.
48
- */
49
- description: string;
50
- /**
51
- * (optional) position of the keyword in the function signature, default is to interlace with parameters
52
- */
53
- position?: number;
54
- }
55
- export {};
31
+
32
+ /** Describes a keyword used in a function */
33
+ export interface SchemaKeyword {
34
+ /** The name of the keyword. */
35
+ name: string;
36
+ /** The description for the keyword. */
37
+ description: string;
38
+ /** (optional) position of the keyword in the function signature, default is to interlace with parameters */
39
+ position?: number;
40
+ }
@@ -86,7 +86,7 @@
86
86
  },
87
87
  "snippet": {
88
88
  "type": "string",
89
- "description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the funtion or constant.",
89
+ "description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the function or constant.",
90
90
  "pattern": "^[A-Z]+.*$"
91
91
  },
92
92
  "examples": {
@@ -117,6 +117,10 @@
117
117
  "returnValue": {
118
118
  "$ref": "#/definitions/SchemaReturnValue<ArcadeValueType>",
119
119
  "description": "The type of data returned by the function."
120
+ },
121
+ "consumesCredits": {
122
+ "type": "boolean",
123
+ "description": "Indicates if the function consumes credits when called."
120
124
  }
121
125
  },
122
126
  "additionalProperties": false,
@@ -421,7 +425,7 @@
421
425
  },
422
426
  "snippet": {
423
427
  "type": "string",
424
- "description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the funtion or constant.",
428
+ "description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the function or constant.",
425
429
  "pattern": "^[A-Z]+.*$"
426
430
  },
427
431
  "examples": {
@@ -552,7 +556,7 @@
552
556
  },
553
557
  "snippet": {
554
558
  "type": "string",
555
- "description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the funtion or constant.",
559
+ "description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the function or constant.",
556
560
  "pattern": "^[A-Z]+.*$"
557
561
  },
558
562
  "examples": {
@@ -583,6 +587,10 @@
583
587
  "returnValue": {
584
588
  "$ref": "#/definitions/SchemaReturnValue<SqlValueType>",
585
589
  "description": "The type of data returned by the function."
590
+ },
591
+ "consumesCredits": {
592
+ "type": "boolean",
593
+ "description": "Indicates if the function consumes credits when called."
586
594
  }
587
595
  },
588
596
  "required": [
@@ -75,7 +75,7 @@
75
75
  },
76
76
  "snippet": {
77
77
  "type": "string",
78
- "description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the funtion or constant.",
78
+ "description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the function or constant.",
79
79
  "pattern": "^[A-Z]+.*$"
80
80
  },
81
81
  "examples": {
@@ -106,6 +106,10 @@
106
106
  "returnValue": {
107
107
  "$ref": "#/definitions/SchemaReturnValue<ArcadeValueType>",
108
108
  "description": "The type of data returned by the function."
109
+ },
110
+ "consumesCredits": {
111
+ "type": "boolean",
112
+ "description": "Indicates if the function consumes credits when called."
109
113
  }
110
114
  },
111
115
  "additionalProperties": false,
@@ -410,7 +414,7 @@
410
414
  },
411
415
  "snippet": {
412
416
  "type": "string",
413
- "description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the funtion or constant.",
417
+ "description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the function or constant.",
414
418
  "pattern": "^[A-Z]+.*$"
415
419
  },
416
420
  "examples": {
@@ -68,6 +68,7 @@
68
68
  "form-attachment-filename-calculation",
69
69
  "form-calculation",
70
70
  "form-constraint",
71
+ "form-dynamic-choice",
71
72
  "geoanalytics",
72
73
  "geotrigger-notification",
73
74
  "labeling",
@@ -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>",
@@ -82,6 +83,7 @@
82
83
  "form-attachment-filename-calculation",
83
84
  "form-calculation",
84
85
  "form-constraint",
86
+ "form-dynamic-choice",
85
87
  "geoanalytics",
86
88
  "geotrigger-notification",
87
89
  "labeling",
@@ -100,7 +100,7 @@
100
100
  },
101
101
  "snippet": {
102
102
  "type": "string",
103
- "description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the funtion or constant.",
103
+ "description": "The code that will be injected in the classic editor. Must start with a capital letter and match the name of the function or constant.",
104
104
  "pattern": "^[A-Z]+.*$"
105
105
  },
106
106
  "examples": {
@@ -131,6 +131,10 @@
131
131
  "returnValue": {
132
132
  "$ref": "#/definitions/SchemaReturnValue<SqlValueType>",
133
133
  "description": "The type of data returned by the function."
134
+ },
135
+ "consumesCredits": {
136
+ "type": "boolean",
137
+ "description": "Indicates if the function consumes credits when called."
134
138
  }
135
139
  },
136
140
  "required": [
@@ -1 +1,2 @@
1
- export * from './utilities';
1
+ export * from "./utilities.js";
2
+
@@ -1,58 +1,144 @@
1
- import { ArcadeApiConstant, SchemaApiFunction, SchemaApiItem, SchemaCategory, SchemaExample, SchemaProperty, SchemaResourceLink, SchemaReturnDefinition, SchemaReturnValue, SingularApiItem } from '../schema-types';
2
- import { SqlApiFunction } from '../schema-types/sql';
3
- import { SdkDictionaryVariable, SdkVariable } from '../profile-types';
1
+ import type { ArcadeApiConstant } from "../schema-types/arcade.js";
2
+ import type { SchemaCategory, SchemaExample, SchemaProperty, SchemaResourceLink, SchemaReturnDefinition, SchemaReturnValue, SingularApiItem } from "../schema-types/base.js";
3
+ import type { SchemaApiFunction, SchemaApiItem } from "../schema-types/index.js";
4
+ import type { SqlApiFunction } from "../schema-types/sql.js";
5
+ import type { SdkDictionaryVariable, SdkVariable } from "../profile-types/base.js";
6
+
4
7
  export type Paths = {
5
- relativePath: string;
6
- absolutePath: string;
8
+ relativePath: string;
9
+ absolutePath: string;
7
10
  };
8
- export declare function isSchemaDictionaryVariable(variable: SdkVariable): variable is SdkDictionaryVariable;
9
- export declare function getDirectoryNames(path: string): Promise<string[]>;
10
- export declare function getFileNames(path: string): Promise<string[]>;
11
- /**
12
- * Structure used when reading the API Files
13
- */
11
+
12
+ /** @param variable */
13
+ export function isSchemaDictionaryVariable(variable: SdkVariable): variable is SdkDictionaryVariable;
14
+
15
+ /** @param path */
16
+ export function getDirectoryNames(path: string): Promise<string[]>;
17
+
18
+ /** @param path */
19
+ export function getFileNames(path: string): Promise<string[]>;
20
+
21
+ /** Structure used when reading the API Files */
14
22
  export interface ApiDatabase {
15
- categories: ApiCategories;
16
- resources: ApiResources;
23
+ categories: ApiCategories;
24
+ resources: ApiResources;
17
25
  }
26
+
18
27
  export type ApiCategories = Record<string, {
19
28
  definition: SchemaCategory;
20
29
  items: Map<string, SchemaApiItem>;
21
30
  }>;
31
+
22
32
  export type ApiResources = Record<string, string>;
23
- export declare const DefaultApiResources: ApiResources;
24
- export declare function isSchemaFunction(item: SchemaApiItem): item is SchemaApiFunction;
25
- export declare function isSchemaConstant(item: SchemaApiItem): item is ArcadeApiConstant;
26
- export declare function isSchemaReturnDefinition(item: SchemaReturnValue): item is SchemaReturnDefinition;
27
- export declare function loadApiDatabase(languageFileName: string): Promise<ApiDatabase>;
28
- export declare const toLocalConfig: {
33
+
34
+ export const DefaultApiResources: ApiResources;
35
+
36
+ /** @param item */
37
+ export function isSchemaFunction(item: SchemaApiItem): item is SchemaApiFunction;
38
+
39
+ /** @param item */
40
+ export function isSchemaConstant(item: SchemaApiItem): item is ArcadeApiConstant;
41
+
42
+ /** @param item */
43
+ export function isSchemaReturnDefinition(item: SchemaReturnValue): item is SchemaReturnDefinition;
44
+
45
+ /** @param languageFileName */
46
+ export function loadApiDatabase(languageFileName: string): Promise<ApiDatabase>;
47
+
48
+ export const toLocalConfig: {
29
49
  minimumIntegerDigits: number;
30
50
  useGrouping: boolean;
31
51
  };
32
- export declare function convertStringArrayToObject(array: string[] | string | undefined): Record<string, string>;
33
- export declare function convertObjectToArray<T>(obj: Record<string, T> | undefined): T[] | undefined;
34
- export declare function headingPattern(level: number): string;
35
- export declare function isFunction(apiItem: SingularApiItem): apiItem is SchemaApiFunction;
36
- export declare function assembleMarkdownString(value: string[] | string | undefined): string;
37
- export declare function apiItemName(item: SchemaApiItem): string;
38
- export declare function generateSinceVersionSection(resources: ApiResources, apiItem: SingularApiItem, paths: Paths, relative?: boolean): string[];
39
- export declare function generateSignature(apiItem: SingularApiItem, paths: Paths, { relative, typeLink, needsHtmlEntity }?: {
40
- relative?: boolean | undefined;
41
- typeLink?: boolean | undefined;
42
- needsHtmlEntity?: boolean | undefined;
43
- }): string;
44
- export declare function generateTypeLink(values: string[] | string, paths: Paths, relative?: boolean): string;
45
- export declare function generateParametersSection(resources: ApiResources, parameters: SchemaProperty[] | undefined, paths: Paths, relative?: boolean, useTypeLinks?: boolean): string[];
46
- export declare function generateReturnSection(resources: ApiResources, returnDefinition: SchemaReturnValue, paths: Paths, relative?: boolean, useTypeLinks?: boolean): string[];
47
- export declare function generateExamplesSection(resources: ApiResources, examples: SchemaExample[] | undefined, headingPattern: "**" | "#####", language: string): string[];
48
- export declare function generateAdditionalResourcesSection(resources: ApiResources, resourceLinks: SchemaResourceLink[] | undefined, headingPattern: "**" | "####"): string[];
49
- export declare function fixUrl(description: string, paths: Paths, relative?: boolean): string;
52
+
53
+ /** @param array */
54
+ export function convertStringArrayToObject(array: string[] | string | undefined): Record<string, string>;
55
+
56
+ /** @param object */
57
+ export function convertObjectToArray<T>(object: Record<string, T> | undefined): T[] | undefined;
58
+
59
+ /** @param level */
60
+ export function headingPattern(level: number): string;
61
+
62
+ /** @param apiItem */
63
+ export function isFunction(apiItem: SingularApiItem): apiItem is SchemaApiFunction;
64
+
65
+ /** @param value */
66
+ export function assembleMarkdownString(value: string[] | string | undefined): string;
67
+
68
+ /** @param item */
69
+ export function apiItemName(item: SchemaApiItem): string;
70
+
71
+ /**
72
+ * @param resources
73
+ * @param apiItem
74
+ * @param paths
75
+ * @param relative
76
+ */
77
+ export function generateSinceVersionSection(resources: ApiResources, apiItem: SingularApiItem, paths: Paths, relative?: boolean): string[];
78
+
79
+ /**
80
+ * @param apiItem
81
+ * @param paths
82
+ * @param param2
83
+ */
84
+ export function generateSignature(apiItem: SingularApiItem, paths: Paths, param2?: {}): string;
85
+
86
+ /**
87
+ * @param values
88
+ * @param paths
89
+ * @param relative
90
+ */
91
+ export function generateTypeLink(values: string[] | string, paths: Paths, relative?: boolean): string;
92
+
93
+ /**
94
+ * @param resources
95
+ * @param parameters
96
+ * @param paths
97
+ * @param relative
98
+ * @param useTypeLinks
99
+ */
100
+ export function generateParametersSection(resources: ApiResources, parameters: SchemaProperty[] | undefined, paths: Paths, relative?: boolean, useTypeLinks?: boolean): string[];
101
+
102
+ /**
103
+ * @param resources
104
+ * @param returnDefinition
105
+ * @param paths
106
+ * @param relative
107
+ * @param useTypeLinks
108
+ */
109
+ export function generateReturnSection(resources: ApiResources, returnDefinition: SchemaReturnValue, paths: Paths, relative?: boolean, useTypeLinks?: boolean): string[];
110
+
111
+ /**
112
+ * @param resources
113
+ * @param examples
114
+ * @param headingPattern
115
+ * @param language
116
+ */
117
+ export function generateExamplesSection(resources: ApiResources, examples: SchemaExample[] | undefined, headingPattern: "**" | "#####", language: string): string[];
118
+
119
+ /**
120
+ * @param resources
121
+ * @param resourceLinks
122
+ * @param headingPattern
123
+ */
124
+ export function generateAdditionalResourcesSection(resources: ApiResources, resourceLinks: SchemaResourceLink[] | undefined, headingPattern: "**" | "####"): string[];
125
+
126
+ /**
127
+ * @param description
128
+ * @param paths
129
+ * @param relative
130
+ */
131
+ export function fixUrl(description: string, paths: Paths, relative?: boolean): string;
132
+
50
133
  /**
51
134
  * Interlaces two arrays and joins them into a string with spaces.
135
+ *
52
136
  * @param array1 - The first array.
53
137
  * @param array2 - The second array.
54
138
  * @param positions - Optional positions for the second array elements.
55
139
  * @returns - The interlaced array.
56
140
  */
57
- export declare function interlaceArrays(array1: string[], array2: string[], positions?: number[]): string;
58
- export declare function isSqlApiFunction(apiItem: SchemaApiItem): apiItem is SqlApiFunction;
141
+ export function interlaceArrays(array1: string[], array2: string[], positions?: number[]): string;
142
+
143
+ /** @param apiItem */
144
+ export function isSqlApiFunction(apiItem: SchemaApiItem): apiItem is SqlApiFunction;
@@ -1,28 +1,37 @@
1
1
  export interface T9NApiRoot {
2
- resources: Record<string, string>;
3
- categories: T9NCategories;
2
+ resources: Record<string, string>;
3
+ categories: T9NCategories;
4
4
  }
5
+
5
6
  export type T9NCategories = Record<string, T9NCategory>;
7
+
6
8
  export interface T9NCategory {
7
- title: string;
8
- description?: Record<string, string>;
9
- items: T9NApiItems;
9
+ title: string;
10
+ description?: Record<string, string>;
11
+ items: T9NApiItems;
10
12
  }
13
+
11
14
  export type T9NResource = Record<string, string>;
15
+
12
16
  export type T9NApiItems = Record<string, Record<string, T9NApiItem> | T9NApiItem>;
17
+
13
18
  export interface T9NProperty {
14
- description?: Record<string, string>;
15
- properties?: Record<string, T9NProperty>;
19
+ description?: Record<string, string>;
20
+ properties?: Record<string, T9NProperty>;
16
21
  }
22
+
17
23
  export interface T9NApiItem {
18
- description: Record<string, string>;
19
- examples?: Record<string, Record<string, string>>;
20
- parameters?: Record<string, T9NProperty>;
21
- returnValue?: T9NProperty;
24
+ description: Record<string, string>;
25
+ examples?: Record<string, Record<string, string>>;
26
+ parameters?: Record<string, T9NProperty>;
27
+ returnValue?: T9NProperty;
22
28
  }
29
+
23
30
  export type T9NProfiles = Record<string, T9NProfileVariables>;
31
+
24
32
  export type T9NProfileVariables = Record<string, T9NProfileVariable>;
33
+
25
34
  export interface T9NProfileVariable {
26
- description?: string;
27
- properties?: T9NProfileVariables;
28
- }
35
+ description?: string;
36
+ properties?: T9NProfileVariables;
37
+ }
package/dist/types.d.ts CHANGED
@@ -1,79 +1,59 @@
1
- import { BundleType } from './schema-types';
2
- import { CompletionItem } from 'vscode-languageserver-types';
3
- import { ProfileId, SdkPredefinedProfile, SdkVariable, SdkValueVariable, SdkDictionaryVariable, SdkVariableType } from './profile-types';
4
- /**
5
- * Represents an api category and its items
6
- */
7
- interface SdkCategory {
8
- /**
9
- * The unique ID for the category
10
- */
11
- id: string;
12
- /**
13
- * The title for the category
14
- */
15
- title: string;
16
- /**
17
- * The collection of api items for the category
18
- */
19
- items: SdkItem[];
1
+ import type { BundleType } from "./schema-types/common.js";
2
+ import type { CompletionItem } from "vscode-languageserver-types";
3
+
4
+ export { type CompletionItem } from "vscode-languageserver-types";
5
+
6
+ /** Represents an api category and its items */
7
+ export interface SdkCategory {
8
+ /** The unique ID for the category */
9
+ id: string;
10
+ /** The title for the category */
11
+ title: string;
12
+ /** The collection of api items for the category */
13
+ items: SdkItem[];
20
14
  }
21
- interface SdkItemBase {
22
- /**
23
- * The name of the function or constant.
24
- */
25
- name: string;
26
- /**
27
- * The version string when the api item was introduced. If undefined then it was from the origin.
28
- */
29
- sinceVersion?: string;
30
- /**
31
- * The api bundle this item belongs to.
32
- */
33
- bundle: BundleType;
34
- /**
35
- * Markdown description of the item.
36
- */
37
- description: string;
38
- /**
39
- * Markdown containing examples.
40
- */
41
- examples: string;
42
- /**
43
- * Link for additional information about the item.
44
- */
45
- link?: string;
46
- /**
47
- * Completion item directly leveraged by the editor.
48
- */
49
- completion: CompletionItem;
50
- /**
51
- * Indicates if the documentation for this item should be disabled.
52
- */
53
- disableDocumentation?: boolean;
15
+
16
+ export interface SdkItemBase {
17
+ /** The name of the function or constant. */
18
+ name: string;
19
+ /** The version string when the api item was introduced. If undefined then it was from the origin. */
20
+ sinceVersion?: string;
21
+ /** The api bundle this item belongs to. */
22
+ bundle: BundleType;
23
+ /** Markdown description of the item. */
24
+ description: string;
25
+ /** Markdown containing examples. */
26
+ examples: string;
27
+ /** Link for additional information about the item. */
28
+ link?: string;
29
+ /** Completion item directly leveraged by the editor. */
30
+ completion: CompletionItem;
31
+ /** Indicates if the documentation for this item should be disabled. */
32
+ disableDocumentation?: boolean;
54
33
  }
55
- /**
56
- * Represents a constant in the arcade api.
57
- */
58
- interface SdkConstant extends SdkItemBase {
59
- type: "constant";
34
+
35
+ /** Represents a constant in the arcade api. */
36
+ export interface SdkConstant extends SdkItemBase {
37
+ type: "constant";
60
38
  }
61
- /**
62
- * Represents a function in the arcade api
63
- */
64
- interface SdkFunction extends SdkItemBase {
65
- type: "function";
66
- /**
67
- * Information leveraged by the editor to validate function call.
68
- * Indicates the minimum number of expected parameters and the maximum number of parameters expected.
69
- */
70
- parametersInfo: {
71
- min: number;
72
- max: number;
73
- };
39
+
40
+ /** Represents a function in the arcade api */
41
+ export interface SdkFunction extends SdkItemBase {
42
+ type: "function";
43
+ /**
44
+ * Information leveraged by the editor to validate function call.
45
+ * Indicates the minimum number of expected parameters and the maximum number of parameters expected.
46
+ */
47
+ parametersInfo: {
48
+ min: number;
49
+ max: number;
50
+ };
51
+ /**
52
+ * Indicates whether invoking this function consumes credits.
53
+ * Used by the editor to drive UX.
54
+ */
55
+ consumesCredits?: boolean;
74
56
  }
75
- /**
76
- * Represents an item in the arcade api.
77
- */
78
- type SdkItem = SdkConstant | SdkFunction | SdkFunction[];
79
- export type { CompletionItem, ProfileId, BundleType, SdkPredefinedProfile, SdkVariable, SdkValueVariable, SdkDictionaryVariable, SdkVariableType, SdkCategory, SdkItem, SdkItemBase, SdkConstant, SdkFunction, };
57
+
58
+ /** Represents an item in the arcade api. */
59
+ export type SdkItem = SdkConstant | SdkFunction | SdkFunction[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/languages-sdk-spec",
3
- "version": "5.2.0-next.13",
3
+ "version": "5.2.0-next.130",
4
4
  "description": "ArcGIS languages types and schemas for design a language sdk",
5
5
  "homepage": "https://developers.arcgis.com/javascript/latest/",
6
6
  "type": "module",
@@ -10,7 +10,8 @@
10
10
  "exports": {
11
11
  ".": "./dist/index.js",
12
12
  "./scripting": "./dist/scripting/index.js",
13
- "./dist/schemas/*.schema.json": "./dist/schemas/*.schema.json"
13
+ "./dist/schemas/*.schema.json": "./dist/schemas/*.schema.json",
14
+ "./package.json": "./package.json"
14
15
  },
15
16
  "files": [
16
17
  "dist/"