dochub-sdk 0.1.258 → 0.1.260

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.
@@ -9,6 +9,7 @@
9
9
  "datalake",
10
10
  "eventbus",
11
11
  "localstorage",
12
+ "Nata",
12
13
  "PROPFIND"
13
14
  ]
14
15
  }
@@ -257,7 +257,14 @@ export enum DocHubDataLakeDebuggerHandleActions {
257
257
  stop = 'stop' // Прервать выполнение
258
258
  }
259
259
 
260
- export type DocHubDataLakeDebuggerQuery = (expression: DocHubJSONataQuery) => Promise<any>;
260
+ /**
261
+ * Специальный тип запросов в отладчик.
262
+ * Если запрос начинается на $, считается, что запрос должен вернуть значение переменной из контекста выполнения
263
+ */
264
+ export type DocHubDebuggerQuery = `$${string}` | DocHubJSONataQuery;
265
+
266
+ export type DocHubDataLakeDebuggerQuery = (expression: DocHubDebuggerQuery) => Promise<any>;
267
+
261
268
 
262
269
  /**
263
270
  * Элемент стека выполнения запросов в DataLake
@@ -7,13 +7,65 @@ export type DocHubDataSetID = string;
7
7
  */
8
8
  export type DocHubDataSetData = object;
9
9
  /**
10
- * JSONata запрос
10
+ * JSONata запрос с расширенными свойствами
11
11
  */
12
- export type DocHubJSONataQuery = `(${string})` | `jsonata(${string})`;
12
+
13
+ /**
14
+ * Простое, строковое определение JSONata запроса
15
+ */
16
+ export type DocHubJSONataQuerySimple = `(${string})` | `jsonata(${string})`;
17
+
13
18
  /**
14
19
  * Ссылка на JSONata файл
15
20
  */
16
- export type DocHubJSONataFile = `${string}.jsonata`;
21
+ export type DocHubJSONataFile = `${string}.jsonata`;
22
+
23
+ /**
24
+ * Метаинформация JSONata запроса
25
+ */
26
+ export interface DocHubJSONataQueryMeta {
27
+ /**
28
+ * URI ресурса, где декларирован запрос
29
+ */
30
+ source?: string;
31
+ /**
32
+ * Путь к свойству определения
33
+ */
34
+ path?: string;
35
+ }
36
+
37
+ /**
38
+ * Класс, позволяет создавать запросы с расширенной информацией об источнике его происхождения
39
+ * для удобства отладки.
40
+ */
41
+ export class DocHubJSONataQueryObject extends String {
42
+ /**
43
+ * URI ресурса, где определен запрос
44
+ */
45
+ private uri: string | undefined;
46
+ /**
47
+ * Путь к определению запроса
48
+ */
49
+ private path: string | undefined;
50
+ constructor(query: DocHubJSONataQuerySimple, uri?: string, path?: string) {
51
+ super(query);
52
+ this.uri = uri;
53
+ this.path = path;
54
+ return this;
55
+ }
56
+ get __uri__(): string | undefined {
57
+ return this.uri;
58
+ }
59
+ get __path__(): string | undefined {
60
+ return this.path;
61
+ }
62
+ }
63
+
64
+ /**
65
+ * JSONata запрос
66
+ */
67
+ export type DocHubJSONataQuery = DocHubJSONataQuerySimple | DocHubJSONataQueryObject;
68
+
17
69
  /**
18
70
  * Ссылка на файл данных
19
71
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dochub-sdk",
3
- "version": "0.1.258",
3
+ "version": "0.1.260",
4
4
  "description": "The DocHub System Development Kit.",
5
5
  "private": false,
6
6
  "main": "index.ts",