dochub-sdk 0.1.121 → 0.1.123

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.
@@ -12,7 +12,16 @@ export enum DataLakeChange {
12
12
  * docs/example
13
13
  * components/dochub.main
14
14
  */
15
- export type DataLakePath = string;
15
+ export class DataLakePath extends String {
16
+ constructor(...args:any) {
17
+ for (const value of args) {
18
+ if (!/^(\/[a-zA-Z0-9_$]{1,}){1,}$/.test(value))
19
+ throw new Error(`Incorrect DataLakePath `, value);
20
+ }
21
+ super(...args);
22
+ return this;
23
+ }
24
+ }
16
25
 
17
26
  // Паттерн изменившихся файлов в DataLake
18
27
  export type DocHubDataLakeChangeItem = RegExp;
@@ -15,6 +15,22 @@ export interface IDocHubObjectMeta {
15
15
  editor?: string; // Идентификатор редактора объектов
16
16
  }
17
17
 
18
+ /**
19
+ * Специальный формат адресации к объектам DocHub
20
+ * Формат: @<ID объекта>/<путь к объекту>[?<параметр=значение>[&<параметр=значение>]][#<ID презентации>]
21
+ * Например: @document/dochub.welcome?username=r.piontik#bio
22
+ */
23
+ export class DocHubObjectURL extends String {
24
+ constructor(...args:any) {
25
+ for (const value of args) {
26
+ if (!/^\@[a-zA-Z0-9_$]{1,}(\/[a-zA-Z0-9_$]{1,}){1,}(\?[^(#|\/)]*){0,1}(\#[^(#|\/|\?)]*){0,1}$/.test(value))
27
+ throw new Error(`Incorrect DocHubObjectSrc `, value);
28
+ }
29
+ super(...args);
30
+ return this;
31
+ }
32
+ }
33
+
18
34
  /**
19
35
  * VUE компонент редактора объекта
20
36
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dochub-sdk",
3
- "version": "0.1.121",
3
+ "version": "0.1.123",
4
4
  "description": "The DocHub System Development Kit.",
5
5
  "private": false,
6
6
  "main": "index.ts",