@arcgis/languages-sdk-spec 4.33.0-next.113 → 4.33.0-next.117

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.
@@ -7,7 +7,17 @@ export type ArcadeBundleType = "ai" | "core" | "data-access" | "database" | "geo
7
7
  * The profile names this definition belongs to
8
8
  */
9
9
  export type ArcadeProfileType = "Attribute Rule Calculation" | "Attribute Rules" | "Dashboard Data" | "Field Calculation" | "Form Calculation" | "GeoAnalytics" | "Popups" | "Tasks" | "Velocity";
10
+ 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<Text>" | "Array<Time>" | "Attachment" | "Boolean" | "Date" | "DateOnly" | "Dictionary" | "Extent" | "Feature" | "FeatureSet" | "FeatureSetCollection" | "Function" | "Geometry" | "KnowledgeGraph" | "Multipoint" | "Null" | "Number" | "Point" | "Polygon" | "Polyline" | "Portal" | "Text" | "Time" | "Voxel";
10
11
  export type ArcadeSchemaItemBase = GenericSchemaItemBase<ArcadeBundleType, ArcadeProfileType>;
11
- export type ArcadeApiItem = BaseSchemaApiItem<ArcadeBundleType, ArcadeProfileType>;
12
- export type ArcadeApiFunction = BaseSchemaApiFunction<ArcadeBundleType, ArcadeProfileType>;
12
+ /**
13
+ * Definition for Arcade Api function
14
+ */
15
+ export type ArcadeApiFunction = BaseSchemaApiFunction<ArcadeBundleType, ArcadeProfileType, ArcadeValueType>;
16
+ /**
17
+ * Definition for Arcade Api constant
18
+ */
13
19
  export type ArcadeApiConstant = BaseSchemaApiConstant<ArcadeBundleType, ArcadeProfileType>;
20
+ /**
21
+ * Arcade Api Item can be either a constant, a function, or an array of functions
22
+ */
23
+ export type ArcadeApiItem = BaseSchemaApiItem<ArcadeApiFunction, ArcadeApiConstant>;
@@ -1,4 +1,7 @@
1
- import { BundleType, ProfileType } from './common';
1
+ import { ArcadeApiConstant, SchemaApiFunction } from '.';
2
+ import { BundleType, ProfileType, SchemaValueType } from './common';
3
+ import { SqlApiFunction } from './sql';
4
+ import { ArcadeApiFunction } from './arcade';
2
5
  /**
3
6
  * Definition for a schema category
4
7
  */
@@ -8,10 +11,6 @@ export interface SchemaCategory {
8
11
  page: string;
9
12
  hideSummaryList?: boolean;
10
13
  }
11
- /**
12
- * The collection of supported types.
13
- */
14
- export type SchemaValueType = "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<Text>" | "Array<Time>" | "Attachment" | "Boolean" | "Date" | "DateOnly" | "Dictionary" | "Extent" | "Feature" | "FeatureSet" | "FeatureSetCollection" | "Function" | "Geometry" | "KnowledgeGraph" | "Multipoint" | "Null" | "Number" | "Point" | "Polygon" | "Polyline" | "Portal" | "Text" | "Time" | "Voxel";
15
14
  export interface GenericSchemaItemBase<Bundle extends BundleType, Profile extends ProfileType> {
16
15
  /**
17
16
  * The name of the function or constant. Must start with a capital letter.
@@ -66,28 +65,28 @@ export interface BaseSchemaApiConstant<Bundle extends BundleType = BundleType, P
66
65
  */
67
66
  isConstant: true;
68
67
  }
69
- export type SchemaReturnValue = SchemaReturnDefinition | SchemaValueType | SchemaValueType[];
68
+ export type SchemaReturnValue<ValueType extends SchemaValueType = SchemaValueType> = SchemaReturnDefinition<ValueType> | ValueType | ValueType[];
70
69
  /**
71
70
  * Describes an Api Function.
72
71
  */
73
- export interface BaseSchemaApiFunction<Bundle extends BundleType, Profile extends ProfileType> extends GenericSchemaItemBase<Bundle, Profile> {
72
+ export interface BaseSchemaApiFunction<Bundle extends BundleType, Profile extends ProfileType, ValueType extends SchemaValueType> extends GenericSchemaItemBase<Bundle, Profile> {
74
73
  /**
75
74
  * For function this property is optional and always false.
76
75
  */
77
- isConstant?: false;
76
+ isConstant?: boolean;
78
77
  /**
79
78
  * The set of function parameters.
80
79
  */
81
- parameters?: SchemaProperty[];
80
+ parameters?: SchemaProperty<ValueType>[];
82
81
  /**
83
82
  * The type of data returned by the function.
84
83
  */
85
- returnValue?: SchemaReturnValue;
84
+ returnValue?: SchemaReturnValue<ValueType>;
86
85
  }
87
86
  /**
88
87
  * Describes the properties for the type Property
89
88
  */
90
- export interface SchemaProperty {
89
+ export interface SchemaProperty<ValueType extends SchemaValueType = SchemaValueType> {
91
90
  /**
92
91
  * The name of the property.
93
92
  * @pattern ^([a-z]+[a-zA-Z0-9_]*|\[.*\])$
@@ -96,7 +95,7 @@ export interface SchemaProperty {
96
95
  /**
97
96
  * The data type of the property value. If the property supports more than one type then use an array.
98
97
  */
99
- type: SchemaValueType | SchemaValueType[];
98
+ type: ValueType | ValueType[];
100
99
  /**
101
100
  * The description for the property.
102
101
  */
@@ -108,16 +107,16 @@ export interface SchemaProperty {
108
107
  /**
109
108
  * The properties if the type is Dictionary.
110
109
  */
111
- properties?: SchemaProperty[];
110
+ properties?: SchemaProperty<ValueType>[];
112
111
  }
113
112
  /**
114
113
  * Describes the type fo data returned by a function.
115
114
  */
116
- export interface SchemaReturnDefinition {
115
+ export interface SchemaReturnDefinition<T extends SchemaValueType = SchemaValueType> {
117
116
  /**
118
117
  * The data type of the value returned.
119
118
  */
120
- type: SchemaValueType;
119
+ type: T;
121
120
  /**
122
121
  * A description for for the value returned.
123
122
  */
@@ -125,7 +124,7 @@ export interface SchemaReturnDefinition {
125
124
  /**
126
125
  * The properties if the type returned is a Dictionary
127
126
  */
128
- properties?: SchemaProperty[];
127
+ properties?: SchemaProperty<T>[];
129
128
  }
130
129
  /**
131
130
  * Describes an example
@@ -156,9 +155,9 @@ export interface SchemaResourceLink {
156
155
  /**
157
156
  * Definition for simple item
158
157
  */
159
- export type SchemaSimpleApiItem<Bundle extends BundleType = BundleType, Profile extends ProfileType = ProfileType> = BaseSchemaApiConstant<Bundle, Profile> | BaseSchemaApiFunction<Bundle, Profile>;
158
+ export type SingularApiItem = ArcadeApiConstant | ArcadeApiFunction | SqlApiFunction;
160
159
  /**
161
160
  * Definition for a constant or a function.
162
161
  * An Api Item can be either a constant, a function, or an array of functions
163
162
  */
164
- export type BaseSchemaApiItem<Bundle extends BundleType, Profile extends ProfileType = ProfileType> = BaseSchemaApiFunction<Bundle, Profile>[] | SchemaSimpleApiItem<Bundle, Profile>;
163
+ export type BaseSchemaApiItem<LanguageApiFunction extends SchemaApiFunction, LanguageApiConstant extends BaseSchemaApiConstant | undefined = undefined> = LanguageApiFunction | LanguageApiFunction[] | (LanguageApiConstant extends undefined ? never : LanguageApiConstant);
@@ -1,5 +1,5 @@
1
- import { ArcadeBundleType, ArcadeProfileType } from './arcade';
2
- import { SqlBundleType, SqlProfileType } from './sql';
1
+ import { ArcadeBundleType, ArcadeProfileType, ArcadeValueType } from './arcade';
2
+ import { SqlBundleType, SqlProfileType, SqlValueType } from './sql';
3
3
  /**
4
4
  * Union of bundle types that can be used in any sdk schema
5
5
  */
@@ -8,3 +8,7 @@ export type BundleType = ArcadeBundleType | SqlBundleType;
8
8
  * Union of profile types that can be used in any sdk schema
9
9
  */
10
10
  export type ProfileType = ArcadeProfileType | SqlProfileType;
11
+ /**
12
+ * The collection of supported return types.
13
+ */
14
+ export type SchemaValueType = ArcadeValueType | SqlValueType;
@@ -1,5 +1,10 @@
1
1
  import { ArcadeApiFunction, ArcadeApiItem, ArcadeSchemaItemBase } from './arcade';
2
2
  import { SqlApiFunction, SqlApiItem, SqlSchemaItemBase } from './sql';
3
+ /**
4
+ *
5
+ */
6
+ export type { ArcadeApiItem, ArcadeApiConstant } from './arcade';
7
+ export type { SqlApiItem } from './sql';
3
8
  /**
4
9
  * Union of API items that can be used in any sdk schema
5
10
  */
@@ -2,20 +2,54 @@ import { BaseSchemaApiFunction, BaseSchemaApiItem, GenericSchemaItemBase } from
2
2
  /**
3
3
  * Supported function bundles
4
4
  */
5
- export type SqlBundleType = "core";
5
+ export type SqlBundleType = "date" | "numeric" | "string";
6
6
  /**
7
7
  * Supported sql profile names
8
8
  */
9
9
  export type SqlProfileType = "Field Calculation";
10
+ export type SqlValueType = "Datetime" | "Number" | "String";
10
11
  /**
11
12
  * Narrowed schema item type for sql
12
13
  */
13
14
  export type SqlSchemaItemBase = GenericSchemaItemBase<SqlBundleType, SqlProfileType>;
14
15
  /**
15
- * Narrowed api item type for sql
16
+ * Narrowed api function type for sql
16
17
  */
17
- export type SqlApiItem = BaseSchemaApiItem<SqlBundleType, SqlProfileType>;
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[];
33
+ };
18
34
  /**
19
- * Narrowed api function type for sql
35
+ * Narrowed api item type for sql. Sql does not have constants so all sql items are "functions".
36
+ */
37
+ export type SqlApiItem = BaseSchemaApiItem<SqlApiFunction>;
38
+ /**
39
+ * Describes a keyword used in a function
20
40
  */
21
- export type SqlApiFunction = BaseSchemaApiFunction<SqlBundleType, SqlProfileType>;
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 {};
@@ -14,23 +14,31 @@
14
14
  "description": "Union of API items that can be used in any sdk schema"
15
15
  },
16
16
  "ArcadeApiItem": {
17
- "$ref": "#/definitions/BaseSchemaApiItem<ArcadeBundleType,ArcadeProfileType>"
17
+ "$ref": "#/definitions/BaseSchemaApiItem<ArcadeApiFunction,ArcadeApiConstant>",
18
+ "description": "Arcade Api Item can be either a constant, a function, or an array of functions"
18
19
  },
19
- "BaseSchemaApiItem<ArcadeBundleType,ArcadeProfileType>": {
20
+ "BaseSchemaApiItem<ArcadeApiFunction,ArcadeApiConstant>": {
20
21
  "anyOf": [
22
+ {
23
+ "$ref": "#/definitions/ArcadeApiFunction"
24
+ },
21
25
  {
22
26
  "type": "array",
23
27
  "items": {
24
- "$ref": "#/definitions/BaseSchemaApiFunction<ArcadeBundleType,ArcadeProfileType>"
28
+ "$ref": "#/definitions/ArcadeApiFunction"
25
29
  }
26
30
  },
27
31
  {
28
- "$ref": "#/definitions/SchemaSimpleApiItem<ArcadeBundleType,ArcadeProfileType>"
32
+ "$ref": "#/definitions/ArcadeApiConstant"
29
33
  }
30
34
  ],
31
35
  "description": "Definition for a constant or a function. An Api Item can be either a constant, a function, or an array of functions"
32
36
  },
33
- "BaseSchemaApiFunction<ArcadeBundleType,ArcadeProfileType>": {
37
+ "ArcadeApiFunction": {
38
+ "$ref": "#/definitions/BaseSchemaApiFunction<ArcadeBundleType,ArcadeProfileType,ArcadeValueType>",
39
+ "description": "Definition for Arcade Api function"
40
+ },
41
+ "BaseSchemaApiFunction<ArcadeBundleType,ArcadeProfileType,ArcadeValueType>": {
34
42
  "type": "object",
35
43
  "properties": {
36
44
  "name": {
@@ -97,18 +105,17 @@
97
105
  },
98
106
  "isConstant": {
99
107
  "type": "boolean",
100
- "const": false,
101
108
  "description": "For function this property is optional and always false."
102
109
  },
103
110
  "parameters": {
104
111
  "type": "array",
105
112
  "items": {
106
- "$ref": "#/definitions/SchemaProperty"
113
+ "$ref": "#/definitions/SchemaProperty<ArcadeValueType>"
107
114
  },
108
115
  "description": "The set of function parameters."
109
116
  },
110
117
  "returnValue": {
111
- "$ref": "#/definitions/SchemaReturnValue",
118
+ "$ref": "#/definitions/SchemaReturnValue<ArcadeValueType>",
112
119
  "description": "The type of data returned by the function."
113
120
  }
114
121
  },
@@ -207,7 +214,7 @@
207
214
  "additionalProperties": false,
208
215
  "description": "Describes a link to additional resources"
209
216
  },
210
- "SchemaProperty": {
217
+ "SchemaProperty<ArcadeValueType>": {
211
218
  "type": "object",
212
219
  "properties": {
213
220
  "name": {
@@ -218,12 +225,12 @@
218
225
  "type": {
219
226
  "anyOf": [
220
227
  {
221
- "$ref": "#/definitions/SchemaValueType"
228
+ "$ref": "#/definitions/ArcadeValueType"
222
229
  },
223
230
  {
224
231
  "type": "array",
225
232
  "items": {
226
- "$ref": "#/definitions/SchemaValueType"
233
+ "$ref": "#/definitions/ArcadeValueType"
227
234
  }
228
235
  }
229
236
  ],
@@ -250,7 +257,7 @@
250
257
  "properties": {
251
258
  "type": "array",
252
259
  "items": {
253
- "$ref": "#/definitions/SchemaProperty"
260
+ "$ref": "#/definitions/SchemaProperty<ArcadeValueType>"
254
261
  },
255
262
  "description": "The properties if the type is Dictionary."
256
263
  }
@@ -263,7 +270,7 @@
263
270
  "additionalProperties": false,
264
271
  "description": "Describes the properties for the type Property"
265
272
  },
266
- "SchemaValueType": {
273
+ "ArcadeValueType": {
267
274
  "type": "string",
268
275
  "enum": [
269
276
  "Any",
@@ -307,30 +314,29 @@
307
314
  "Text",
308
315
  "Time",
309
316
  "Voxel"
310
- ],
311
- "description": "The collection of supported types."
317
+ ]
312
318
  },
313
- "SchemaReturnValue": {
319
+ "SchemaReturnValue<ArcadeValueType>": {
314
320
  "anyOf": [
315
321
  {
316
- "$ref": "#/definitions/SchemaReturnDefinition"
322
+ "$ref": "#/definitions/SchemaReturnDefinition<ArcadeValueType>"
317
323
  },
318
324
  {
319
- "$ref": "#/definitions/SchemaValueType"
325
+ "$ref": "#/definitions/ArcadeValueType"
320
326
  },
321
327
  {
322
328
  "type": "array",
323
329
  "items": {
324
- "$ref": "#/definitions/SchemaValueType"
330
+ "$ref": "#/definitions/ArcadeValueType"
325
331
  }
326
332
  }
327
333
  ]
328
334
  },
329
- "SchemaReturnDefinition": {
335
+ "SchemaReturnDefinition<ArcadeValueType>": {
330
336
  "type": "object",
331
337
  "properties": {
332
338
  "type": {
333
- "$ref": "#/definitions/SchemaValueType",
339
+ "$ref": "#/definitions/ArcadeValueType",
334
340
  "description": "The data type of the value returned."
335
341
  },
336
342
  "description": {
@@ -350,7 +356,7 @@
350
356
  "properties": {
351
357
  "type": "array",
352
358
  "items": {
353
- "$ref": "#/definitions/SchemaProperty"
359
+ "$ref": "#/definitions/SchemaProperty<ArcadeValueType>"
354
360
  },
355
361
  "description": "The properties if the type returned is a Dictionary"
356
362
  }
@@ -361,16 +367,9 @@
361
367
  "additionalProperties": false,
362
368
  "description": "Describes the type fo data returned by a function."
363
369
  },
364
- "SchemaSimpleApiItem<ArcadeBundleType,ArcadeProfileType>": {
365
- "anyOf": [
366
- {
367
- "$ref": "#/definitions/BaseSchemaApiConstant<ArcadeBundleType,ArcadeProfileType>"
368
- },
369
- {
370
- "$ref": "#/definitions/BaseSchemaApiFunction<ArcadeBundleType,ArcadeProfileType>"
371
- }
372
- ],
373
- "description": "Definition for simple item"
370
+ "ArcadeApiConstant": {
371
+ "$ref": "#/definitions/BaseSchemaApiConstant<ArcadeBundleType,ArcadeProfileType>",
372
+ "description": "Definition for Arcade Api constant"
374
373
  },
375
374
  "BaseSchemaApiConstant<ArcadeBundleType,ArcadeProfileType>": {
376
375
  "type": "object",
@@ -454,31 +453,63 @@
454
453
  "description": "Describes an Api Constant"
455
454
  },
456
455
  "SqlApiItem": {
457
- "$ref": "#/definitions/BaseSchemaApiItem<SqlBundleType,SqlProfileType>",
458
- "description": "Narrowed api item type for sql"
456
+ "$ref": "#/definitions/BaseSchemaApiItem<SqlApiFunction>",
457
+ "description": "Narrowed api item type for sql. Sql does not have constants so all sql items are \"functions\"."
459
458
  },
460
- "BaseSchemaApiItem<SqlBundleType,SqlProfileType>": {
459
+ "BaseSchemaApiItem<SqlApiFunction>": {
461
460
  "anyOf": [
461
+ {
462
+ "$ref": "#/definitions/SqlApiFunction"
463
+ },
462
464
  {
463
465
  "type": "array",
464
466
  "items": {
465
- "$ref": "#/definitions/BaseSchemaApiFunction<SqlBundleType,SqlProfileType>"
467
+ "$ref": "#/definitions/SqlApiFunction"
466
468
  }
467
- },
468
- {
469
- "$ref": "#/definitions/SchemaSimpleApiItem<SqlBundleType,SqlProfileType>"
470
469
  }
471
470
  ],
472
471
  "description": "Definition for a constant or a function. An Api Item can be either a constant, a function, or an array of functions"
473
472
  },
474
- "BaseSchemaApiFunction<SqlBundleType,SqlProfileType>": {
473
+ "SqlApiFunction": {
475
474
  "type": "object",
475
+ "additionalProperties": false,
476
476
  "properties": {
477
477
  "name": {
478
478
  "type": "string",
479
479
  "description": "The name of the function or constant. Must start with a capital letter.",
480
480
  "pattern": "^[A-Z]+[a-zA-Z0-9.]*$"
481
481
  },
482
+ "isSpecialRegister": {
483
+ "type": "boolean",
484
+ "description": "SQL functions may be \"special registers\" that are not called like regular functions. For example, CURRENT_DATE is a special register. These functions are not called with parentheses or arguments."
485
+ },
486
+ "keywords": {
487
+ "type": "array",
488
+ "items": {
489
+ "type": "object",
490
+ "properties": {
491
+ "name": {
492
+ "type": "string",
493
+ "description": "The name of the keyword."
494
+ },
495
+ "description": {
496
+ "type": "string",
497
+ "description": "The description for the keyword."
498
+ },
499
+ "position": {
500
+ "type": "number",
501
+ "description": "(optional) position of the keyword in the function signature, default is to interlace with parameters"
502
+ }
503
+ },
504
+ "required": [
505
+ "name",
506
+ "description"
507
+ ],
508
+ "additionalProperties": false,
509
+ "description": "Describes a keyword used in a function"
510
+ },
511
+ "description": "The set of keywords that are used in the function."
512
+ },
482
513
  "description": {
483
514
  "anyOf": [
484
515
  {
@@ -538,29 +569,27 @@
538
569
  },
539
570
  "isConstant": {
540
571
  "type": "boolean",
541
- "const": false,
542
572
  "description": "For function this property is optional and always false."
543
573
  },
544
574
  "parameters": {
545
575
  "type": "array",
546
576
  "items": {
547
- "$ref": "#/definitions/SchemaProperty"
577
+ "$ref": "#/definitions/SchemaProperty<SqlValueType>"
548
578
  },
549
579
  "description": "The set of function parameters."
550
580
  },
551
581
  "returnValue": {
552
- "$ref": "#/definitions/SchemaReturnValue",
582
+ "$ref": "#/definitions/SchemaReturnValue<SqlValueType>",
553
583
  "description": "The type of data returned by the function."
554
584
  }
555
585
  },
556
- "additionalProperties": false,
557
586
  "required": [
558
587
  "bundle",
559
588
  "description",
560
589
  "name",
561
590
  "snippet"
562
591
  ],
563
- "description": "Describes an Api Function."
592
+ "description": "Narrowed api function type for sql"
564
593
  },
565
594
  "SqlProfileType": {
566
595
  "type": "string",
@@ -569,27 +598,34 @@
569
598
  },
570
599
  "SqlBundleType": {
571
600
  "type": "string",
572
- "const": "core",
573
- "description": "Supported function bundles"
574
- },
575
- "SchemaSimpleApiItem<SqlBundleType,SqlProfileType>": {
576
- "anyOf": [
577
- {
578
- "$ref": "#/definitions/BaseSchemaApiConstant<SqlBundleType,SqlProfileType>"
579
- },
580
- {
581
- "$ref": "#/definitions/BaseSchemaApiFunction<SqlBundleType,SqlProfileType>"
582
- }
601
+ "enum": [
602
+ "date",
603
+ "numeric",
604
+ "string"
583
605
  ],
584
- "description": "Definition for simple item"
606
+ "description": "Supported function bundles"
585
607
  },
586
- "BaseSchemaApiConstant<SqlBundleType,SqlProfileType>": {
608
+ "SchemaProperty<SqlValueType>": {
587
609
  "type": "object",
588
610
  "properties": {
589
611
  "name": {
590
612
  "type": "string",
591
- "description": "The name of the function or constant. Must start with a capital letter.",
592
- "pattern": "^[A-Z]+[a-zA-Z0-9.]*$"
613
+ "description": "The name of the property.",
614
+ "pattern": "^([a-z]+[a-zA-Z0-9_]*|\\[.*\\])$"
615
+ },
616
+ "type": {
617
+ "anyOf": [
618
+ {
619
+ "$ref": "#/definitions/SqlValueType"
620
+ },
621
+ {
622
+ "type": "array",
623
+ "items": {
624
+ "$ref": "#/definitions/SqlValueType"
625
+ }
626
+ }
627
+ ],
628
+ "description": "The data type of the property value. If the property supports more than one type then use an array."
593
629
  },
594
630
  "description": {
595
631
  "anyOf": [
@@ -603,66 +639,86 @@
603
639
  "type": "string"
604
640
  }
605
641
  ],
606
- "description": "A nice description for the constant or function. It can leverage Github Flavored Markdown formatting."
607
- },
608
- "sinceVersion": {
609
- "type": "string",
610
- "description": "Version string. Format x.y.",
611
- "pattern": "^1\\.\\d+$"
642
+ "description": "The description for the property."
612
643
  },
613
- "disableDocumentation": {
644
+ "optional": {
614
645
  "type": "boolean",
615
- "description": "Indicates if the item should not be documented."
646
+ "description": "Indicates if the property is optional."
616
647
  },
617
- "profiles": {
648
+ "properties": {
618
649
  "type": "array",
619
650
  "items": {
620
- "$ref": "#/definitions/SqlProfileType"
651
+ "$ref": "#/definitions/SchemaProperty<SqlValueType>"
621
652
  },
622
- "description": "The profiles the constant or the function belongs to."
623
- },
624
- "bundle": {
625
- "$ref": "#/definitions/SqlBundleType",
626
- "description": "The bundle the constant or the function belongs to."
627
- },
628
- "image": {
629
- "type": "string",
630
- "description": "The relative path to an image to illustate the constant or the function."
653
+ "description": "The properties if the type is Dictionary."
654
+ }
655
+ },
656
+ "required": [
657
+ "name",
658
+ "type",
659
+ "description"
660
+ ],
661
+ "additionalProperties": false,
662
+ "description": "Describes the properties for the type Property"
663
+ },
664
+ "SqlValueType": {
665
+ "type": "string",
666
+ "enum": [
667
+ "Datetime",
668
+ "Number",
669
+ "String"
670
+ ]
671
+ },
672
+ "SchemaReturnValue<SqlValueType>": {
673
+ "anyOf": [
674
+ {
675
+ "$ref": "#/definitions/SchemaReturnDefinition<SqlValueType>"
631
676
  },
632
- "snippet": {
633
- "type": "string",
634
- "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.",
635
- "pattern": "^[A-Z]+.*$"
677
+ {
678
+ "$ref": "#/definitions/SqlValueType"
636
679
  },
637
- "examples": {
680
+ {
638
681
  "type": "array",
639
682
  "items": {
640
- "$ref": "#/definitions/SchemaExample"
641
- },
642
- "description": "The collection of examples"
683
+ "$ref": "#/definitions/SqlValueType"
684
+ }
685
+ }
686
+ ]
687
+ },
688
+ "SchemaReturnDefinition<SqlValueType>": {
689
+ "type": "object",
690
+ "properties": {
691
+ "type": {
692
+ "$ref": "#/definitions/SqlValueType",
693
+ "description": "The data type of the value returned."
643
694
  },
644
- "resourceLinks": {
695
+ "description": {
696
+ "anyOf": [
697
+ {
698
+ "type": "array",
699
+ "items": {
700
+ "type": "string"
701
+ }
702
+ },
703
+ {
704
+ "type": "string"
705
+ }
706
+ ],
707
+ "description": "A description for for the value returned."
708
+ },
709
+ "properties": {
645
710
  "type": "array",
646
711
  "items": {
647
- "$ref": "#/definitions/SchemaResourceLink"
712
+ "$ref": "#/definitions/SchemaProperty<SqlValueType>"
648
713
  },
649
- "description": "A collection of links to resources"
650
- },
651
- "isConstant": {
652
- "type": "boolean",
653
- "const": true,
654
- "description": "For constant, the property is mandatory and always true"
714
+ "description": "The properties if the type returned is a Dictionary"
655
715
  }
656
716
  },
657
717
  "required": [
658
- "bundle",
659
- "description",
660
- "isConstant",
661
- "name",
662
- "snippet"
718
+ "type"
663
719
  ],
664
720
  "additionalProperties": false,
665
- "description": "Describes an Api Constant"
721
+ "description": "Describes the type fo data returned by a function."
666
722
  }
667
723
  }
668
724
  }