@dxs-ts/eveli-ide 0.0.17 → 0.0.20
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.
- package/build/index.d.ts +183 -388
- package/build/index.js +20677 -20671
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -456,20 +456,20 @@ declare namespace HdesApi {
|
|
|
456
456
|
|
|
457
457
|
export declare const siteTheme: Theme;
|
|
458
458
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
459
|
+
declare namespace StencilApi {
|
|
460
|
+
type PageId = string;
|
|
461
|
+
type LinkId = string;
|
|
462
|
+
type ArticleId = string;
|
|
463
|
+
type WorkflowId = string;
|
|
464
|
+
type LocaleId = string;
|
|
465
|
+
type Locale = string;
|
|
466
|
+
type LocalisedMarkdown = string;
|
|
467
|
+
type LocalisedContent = string;
|
|
468
|
+
type ReleaseId = string;
|
|
469
|
+
type TemplateId = string;
|
|
470
|
+
type LinkType = "internal" | "external" | "phone";
|
|
471
|
+
type TemplateType = "page";
|
|
472
|
+
interface Site {
|
|
473
473
|
name: string;
|
|
474
474
|
contentType: "OK" | "NOT_CREATED" | "EMPTY" | "ERRORS" | "NO_CONNECTION";
|
|
475
475
|
locales: Record<string, SiteLocale>;
|
|
@@ -480,19 +480,19 @@ export declare namespace StencilClient {
|
|
|
480
480
|
releases: Record<ReleaseId, Release>;
|
|
481
481
|
templates: Record<TemplateId, Template>;
|
|
482
482
|
}
|
|
483
|
-
|
|
483
|
+
interface SiteLocale {
|
|
484
484
|
id: LocaleId;
|
|
485
485
|
body: {
|
|
486
486
|
value: Locale;
|
|
487
487
|
enabled: boolean;
|
|
488
488
|
};
|
|
489
489
|
}
|
|
490
|
-
|
|
490
|
+
interface LocaleMutator {
|
|
491
491
|
localeId: LocaleId;
|
|
492
492
|
value: string;
|
|
493
493
|
enabled: boolean;
|
|
494
494
|
}
|
|
495
|
-
|
|
495
|
+
interface Page {
|
|
496
496
|
id: PageId;
|
|
497
497
|
created: string;
|
|
498
498
|
modified: string;
|
|
@@ -503,13 +503,13 @@ export declare namespace StencilClient {
|
|
|
503
503
|
devMode?: boolean;
|
|
504
504
|
};
|
|
505
505
|
}
|
|
506
|
-
|
|
506
|
+
interface PageMutator {
|
|
507
507
|
pageId: PageId;
|
|
508
508
|
locale: Locale;
|
|
509
509
|
content: LocalisedContent;
|
|
510
510
|
devMode: boolean | undefined;
|
|
511
511
|
}
|
|
512
|
-
|
|
512
|
+
interface Template {
|
|
513
513
|
id: TemplateId;
|
|
514
514
|
body: {
|
|
515
515
|
type: TemplateType;
|
|
@@ -518,14 +518,14 @@ export declare namespace StencilClient {
|
|
|
518
518
|
content: string;
|
|
519
519
|
};
|
|
520
520
|
}
|
|
521
|
-
|
|
521
|
+
interface TemplateMutator {
|
|
522
522
|
id: TemplateId;
|
|
523
523
|
type: TemplateType;
|
|
524
524
|
name: string;
|
|
525
525
|
description: string;
|
|
526
526
|
content: string;
|
|
527
527
|
}
|
|
528
|
-
|
|
528
|
+
interface Article {
|
|
529
529
|
id: ArticleId;
|
|
530
530
|
body: {
|
|
531
531
|
parentId?: ArticleId;
|
|
@@ -534,7 +534,7 @@ export declare namespace StencilClient {
|
|
|
534
534
|
devMode?: boolean;
|
|
535
535
|
};
|
|
536
536
|
}
|
|
537
|
-
|
|
537
|
+
interface ArticleMutator {
|
|
538
538
|
articleId: ArticleId;
|
|
539
539
|
parentId?: ArticleId;
|
|
540
540
|
name: string;
|
|
@@ -543,7 +543,7 @@ export declare namespace StencilClient {
|
|
|
543
543
|
workflows: WorkflowId[] | undefined;
|
|
544
544
|
devMode: boolean | undefined;
|
|
545
545
|
}
|
|
546
|
-
|
|
546
|
+
interface Release {
|
|
547
547
|
id: string;
|
|
548
548
|
body: {
|
|
549
549
|
note?: string;
|
|
@@ -556,33 +556,33 @@ export declare namespace StencilClient {
|
|
|
556
556
|
pages: PageReleaseItem[];
|
|
557
557
|
};
|
|
558
558
|
}
|
|
559
|
-
|
|
559
|
+
interface LinkReleaseItem extends ReleaseItem {
|
|
560
560
|
value: string;
|
|
561
561
|
contentType: string;
|
|
562
562
|
articles: string;
|
|
563
563
|
labels: LocaleLabel[];
|
|
564
564
|
}
|
|
565
|
-
|
|
565
|
+
interface WorkflowReleaseItem extends ReleaseItem {
|
|
566
566
|
value: string;
|
|
567
567
|
articles: string[];
|
|
568
568
|
labels: LocaleLabel[];
|
|
569
569
|
}
|
|
570
|
-
|
|
570
|
+
interface LocaleReleaseItem extends ReleaseItem {
|
|
571
571
|
value: string;
|
|
572
572
|
}
|
|
573
|
-
|
|
573
|
+
interface ArticleReleaseItem extends ReleaseItem {
|
|
574
574
|
name: string;
|
|
575
575
|
parentId?: string;
|
|
576
576
|
}
|
|
577
|
-
|
|
577
|
+
interface PageReleaseItem extends ReleaseItem {
|
|
578
578
|
locale: string;
|
|
579
579
|
h1: string;
|
|
580
580
|
}
|
|
581
|
-
|
|
581
|
+
interface ReleaseItem {
|
|
582
582
|
id: string;
|
|
583
583
|
hash: string;
|
|
584
584
|
}
|
|
585
|
-
|
|
585
|
+
interface Link {
|
|
586
586
|
id: LinkId;
|
|
587
587
|
body: {
|
|
588
588
|
articles: ArticleId[];
|
|
@@ -592,11 +592,11 @@ export declare namespace StencilClient {
|
|
|
592
592
|
devMode?: boolean;
|
|
593
593
|
};
|
|
594
594
|
}
|
|
595
|
-
|
|
595
|
+
interface LocaleLabel {
|
|
596
596
|
locale: LocaleId;
|
|
597
597
|
labelValue: LocalisedContent;
|
|
598
598
|
}
|
|
599
|
-
|
|
599
|
+
interface LinkMutator {
|
|
600
600
|
linkId: LinkId;
|
|
601
601
|
type: LinkType;
|
|
602
602
|
value: string;
|
|
@@ -604,7 +604,7 @@ export declare namespace StencilClient {
|
|
|
604
604
|
labels: LocaleLabel[] | undefined;
|
|
605
605
|
devMode: boolean | undefined;
|
|
606
606
|
}
|
|
607
|
-
|
|
607
|
+
interface Workflow {
|
|
608
608
|
id: WorkflowId;
|
|
609
609
|
body: {
|
|
610
610
|
articles: ArticleId[];
|
|
@@ -613,17 +613,17 @@ export declare namespace StencilClient {
|
|
|
613
613
|
devMode?: boolean;
|
|
614
614
|
};
|
|
615
615
|
}
|
|
616
|
-
|
|
616
|
+
interface WorkflowMutator {
|
|
617
617
|
workflowId: WorkflowId;
|
|
618
618
|
value: string;
|
|
619
619
|
articles: ArticleId[] | undefined;
|
|
620
620
|
labels: LocaleLabel[] | undefined;
|
|
621
621
|
devMode: boolean | undefined;
|
|
622
622
|
}
|
|
623
|
-
|
|
623
|
+
interface FetchIntegration {
|
|
624
624
|
fetch<T>(path: string, init?: RequestInit): Promise<T>;
|
|
625
625
|
}
|
|
626
|
-
|
|
626
|
+
interface Service {
|
|
627
627
|
getSite(): Promise<Site>;
|
|
628
628
|
getReleaseContent(releaseId: string): Promise<{}>;
|
|
629
629
|
create(): CreateBuilder;
|
|
@@ -631,50 +631,50 @@ export declare namespace StencilClient {
|
|
|
631
631
|
update(): UpdateBuilder;
|
|
632
632
|
version(): Promise<VersionEntity>;
|
|
633
633
|
}
|
|
634
|
-
|
|
634
|
+
interface VersionEntity {
|
|
635
635
|
version: string;
|
|
636
636
|
built: string;
|
|
637
637
|
}
|
|
638
|
-
|
|
638
|
+
interface CreateArticle {
|
|
639
639
|
parentId?: ArticleId;
|
|
640
640
|
name: string;
|
|
641
641
|
order: number;
|
|
642
642
|
devMode: boolean | undefined;
|
|
643
643
|
}
|
|
644
|
-
|
|
644
|
+
interface CreateLocale {
|
|
645
645
|
locale: Locale;
|
|
646
646
|
}
|
|
647
|
-
|
|
647
|
+
interface CreatePage {
|
|
648
648
|
articleId: ArticleId;
|
|
649
649
|
locale: LocaleId;
|
|
650
650
|
content?: string;
|
|
651
651
|
devMode: boolean | undefined;
|
|
652
652
|
}
|
|
653
|
-
|
|
653
|
+
interface CreateTemplate {
|
|
654
654
|
type: "page" | string;
|
|
655
655
|
name: string;
|
|
656
656
|
description: string;
|
|
657
657
|
content: string;
|
|
658
658
|
}
|
|
659
|
-
|
|
659
|
+
interface CreateLink {
|
|
660
660
|
type: "internal" | "external" | string;
|
|
661
661
|
value: string;
|
|
662
662
|
labels: LocaleLabel[];
|
|
663
663
|
articles: ArticleId[];
|
|
664
664
|
devMode: boolean | undefined;
|
|
665
665
|
}
|
|
666
|
-
|
|
666
|
+
interface CreateWorkflow {
|
|
667
667
|
value: string;
|
|
668
668
|
labels: LocaleLabel[];
|
|
669
669
|
articles: ArticleId[];
|
|
670
670
|
devMode: boolean | undefined;
|
|
671
671
|
}
|
|
672
|
-
|
|
672
|
+
interface CreateRelease {
|
|
673
673
|
name: string;
|
|
674
674
|
note?: string;
|
|
675
675
|
created: string;
|
|
676
676
|
}
|
|
677
|
-
|
|
677
|
+
interface CreateBuilder {
|
|
678
678
|
site(): Promise<Site>;
|
|
679
679
|
importData(init: string): Promise<void>;
|
|
680
680
|
release(init: CreateRelease): Promise<Release>;
|
|
@@ -685,7 +685,7 @@ export declare namespace StencilClient {
|
|
|
685
685
|
template(init: CreateTemplate): Promise<Template>;
|
|
686
686
|
workflow(init: CreateWorkflow): Promise<Workflow>;
|
|
687
687
|
}
|
|
688
|
-
|
|
688
|
+
interface DeleteBuilder {
|
|
689
689
|
locale(id: LocaleId): Promise<void>;
|
|
690
690
|
article(id: ArticleId): Promise<void>;
|
|
691
691
|
page(id: PageId): Promise<void>;
|
|
@@ -696,7 +696,7 @@ export declare namespace StencilClient {
|
|
|
696
696
|
workflowArticlePage(workflow: WorkflowId, article: ArticleId, locale: Locale): Promise<void>;
|
|
697
697
|
release(id: ReleaseId): Promise<void>;
|
|
698
698
|
}
|
|
699
|
-
|
|
699
|
+
interface UpdateBuilder {
|
|
700
700
|
locale(article: LocaleMutator): Promise<SiteLocale>;
|
|
701
701
|
article(article: ArticleMutator): Promise<Article>;
|
|
702
702
|
pages(pages: PageMutator[]): Promise<Page[]>;
|
|
@@ -704,10 +704,10 @@ export declare namespace StencilClient {
|
|
|
704
704
|
workflow(workflow: WorkflowMutator): Promise<Workflow>;
|
|
705
705
|
template(template: TemplateMutator): Promise<Template>;
|
|
706
706
|
}
|
|
707
|
-
|
|
707
|
+
interface Store {
|
|
708
708
|
fetch<T>(path: string, init?: RequestInit): Promise<T>;
|
|
709
709
|
}
|
|
710
|
-
|
|
710
|
+
interface StoreConfig {
|
|
711
711
|
url: string;
|
|
712
712
|
oidc?: string;
|
|
713
713
|
status?: string;
|
|
@@ -716,11 +716,11 @@ export declare namespace StencilClient {
|
|
|
716
716
|
value: string;
|
|
717
717
|
};
|
|
718
718
|
}
|
|
719
|
-
|
|
719
|
+
interface ErrorMsg {
|
|
720
720
|
id: string;
|
|
721
721
|
value: string;
|
|
722
722
|
}
|
|
723
|
-
|
|
723
|
+
interface ErrorProps {
|
|
724
724
|
text: string;
|
|
725
725
|
status: number;
|
|
726
726
|
errors: any[];
|
|
@@ -728,17 +728,76 @@ export declare namespace StencilClient {
|
|
|
728
728
|
}
|
|
729
729
|
|
|
730
730
|
export declare namespace StencilClient {
|
|
731
|
-
const mock: () => Service;
|
|
731
|
+
const mock: () => StencilApi.Service;
|
|
732
732
|
const service: (init: {
|
|
733
|
-
store?: Store;
|
|
734
|
-
config?: StoreConfig;
|
|
735
|
-
}) => Service;
|
|
733
|
+
store?: StencilApi.Store;
|
|
734
|
+
config?: StencilApi.StoreConfig;
|
|
735
|
+
}) => StencilApi.Service;
|
|
736
|
+
export class CreateBuilderImpl implements StencilApi.CreateBuilder {
|
|
737
|
+
private _backend;
|
|
738
|
+
constructor(backend: StencilApi.Store);
|
|
739
|
+
site(): Promise<StencilApi.Site>;
|
|
740
|
+
importData(init: string): Promise<void>;
|
|
741
|
+
release(init: StencilApi.CreateRelease): Promise<StencilApi.Release>;
|
|
742
|
+
locale(init: StencilApi.CreateLocale): Promise<StencilApi.SiteLocale>;
|
|
743
|
+
article(init: StencilApi.CreateArticle): Promise<StencilApi.Article>;
|
|
744
|
+
page(init: StencilApi.CreatePage): Promise<StencilApi.Page>;
|
|
745
|
+
link(init: StencilApi.CreateLink): Promise<StencilApi.Link>;
|
|
746
|
+
workflow(init: StencilApi.CreateWorkflow): Promise<StencilApi.Workflow>;
|
|
747
|
+
template(init: StencilApi.CreateTemplate): Promise<StencilApi.Template>;
|
|
748
|
+
}
|
|
749
|
+
export class UpdateBuilderImpl implements StencilApi.UpdateBuilder {
|
|
750
|
+
private _backend;
|
|
751
|
+
constructor(backend: StencilApi.Store);
|
|
752
|
+
locale(init: StencilApi.LocaleMutator): Promise<StencilApi.SiteLocale>;
|
|
753
|
+
article(init: StencilApi.ArticleMutator): Promise<StencilApi.Article>;
|
|
754
|
+
pages(init: StencilApi.PageMutator[]): Promise<StencilApi.Page[]>;
|
|
755
|
+
link(init: StencilApi.LinkMutator): Promise<StencilApi.Link>;
|
|
756
|
+
workflow(init: StencilApi.WorkflowMutator): Promise<StencilApi.Workflow>;
|
|
757
|
+
template(init: StencilApi.TemplateMutator): Promise<StencilApi.Template>;
|
|
758
|
+
}
|
|
759
|
+
export class DeleteBuilderImpl implements StencilApi.DeleteBuilder {
|
|
760
|
+
private _backend;
|
|
761
|
+
constructor(backend: StencilApi.Store);
|
|
762
|
+
locale(init: StencilApi.LocaleId): Promise<void>;
|
|
763
|
+
release(init: StencilApi.ReleaseId): Promise<void>;
|
|
764
|
+
article(init: StencilApi.ArticleId): Promise<void>;
|
|
765
|
+
page(init: StencilApi.PageId): Promise<void>;
|
|
766
|
+
link(init: StencilApi.LinkId): Promise<void>;
|
|
767
|
+
workflow(init: StencilApi.WorkflowId): Promise<void>;
|
|
768
|
+
workflowArticlePage(workflow: StencilApi.WorkflowId, article: StencilApi.ArticleId, _locale: StencilApi.Locale): Promise<void>;
|
|
769
|
+
linkArticlePage(link: StencilApi.LinkId, article: StencilApi.ArticleId, _locale: StencilApi.Locale): Promise<void>;
|
|
770
|
+
template(init: StencilApi.TemplateId): Promise<void>;
|
|
771
|
+
}
|
|
772
|
+
export interface StoreError extends Error {
|
|
773
|
+
text: string;
|
|
774
|
+
status: number;
|
|
775
|
+
errors: StencilApi.ErrorMsg[];
|
|
776
|
+
}
|
|
777
|
+
export class StoreErrorImpl extends Error {
|
|
778
|
+
private _props;
|
|
779
|
+
constructor(props: StencilApi.ErrorProps);
|
|
780
|
+
get name(): string;
|
|
781
|
+
get status(): number;
|
|
782
|
+
get errors(): any[];
|
|
783
|
+
}
|
|
784
|
+
export class DefaultStore implements StencilApi.Store {
|
|
785
|
+
private _config;
|
|
786
|
+
private _updateStarted;
|
|
787
|
+
private _iapSessionRefreshWindow;
|
|
788
|
+
private _defRef;
|
|
789
|
+
constructor(config: StencilApi.StoreConfig);
|
|
790
|
+
iapRefresh(): Promise<void>;
|
|
791
|
+
iapLogin(): boolean;
|
|
792
|
+
handle401(): Promise<void>;
|
|
793
|
+
fetch<T>(path: string, req?: RequestInit): Promise<T>;
|
|
794
|
+
}
|
|
736
795
|
}
|
|
737
796
|
|
|
738
797
|
export declare const StencilComposer: default_2.FC<StencilComposerProps>;
|
|
739
798
|
|
|
740
799
|
declare interface StencilComposerProps {
|
|
741
|
-
service:
|
|
800
|
+
service: StencilApi.Service;
|
|
742
801
|
locked?: boolean;
|
|
743
802
|
}
|
|
744
803
|
|
|
@@ -935,400 +994,128 @@ declare namespace StencilComposerApi {
|
|
|
935
994
|
}
|
|
936
995
|
interface PageUpdate {
|
|
937
996
|
saved: boolean;
|
|
938
|
-
origin:
|
|
939
|
-
value:
|
|
940
|
-
withValue(value:
|
|
997
|
+
origin: StencilApi.Page;
|
|
998
|
+
value: StencilApi.LocalisedContent;
|
|
999
|
+
withValue(value: StencilApi.LocalisedContent): PageUpdate;
|
|
941
1000
|
}
|
|
942
1001
|
interface SessionFilter {
|
|
943
|
-
locale?:
|
|
944
|
-
withLocale(locale?:
|
|
1002
|
+
locale?: StencilApi.LocaleId;
|
|
1003
|
+
withLocale(locale?: StencilApi.LocaleId): SessionFilter;
|
|
945
1004
|
}
|
|
946
1005
|
interface Session {
|
|
947
|
-
site:
|
|
948
|
-
pages: Record<
|
|
1006
|
+
site: StencilApi.Site;
|
|
1007
|
+
pages: Record<StencilApi.PageId, PageUpdate>;
|
|
949
1008
|
articles: ArticleView[];
|
|
950
1009
|
workflows: WorkflowView[];
|
|
951
1010
|
links: LinkView[];
|
|
952
1011
|
search: SearchData;
|
|
953
1012
|
filter: SessionFilter;
|
|
954
|
-
getArticleName(articleId:
|
|
1013
|
+
getArticleName(articleId: StencilApi.ArticleId): {
|
|
955
1014
|
missing: boolean;
|
|
956
1015
|
name: string;
|
|
957
1016
|
};
|
|
958
|
-
getArticleView(articleId:
|
|
959
|
-
getLinkView(linkId:
|
|
960
|
-
getLinkName(linkId:
|
|
1017
|
+
getArticleView(articleId: StencilApi.ArticleId): ArticleView;
|
|
1018
|
+
getLinkView(linkId: StencilApi.LinkId): LinkView;
|
|
1019
|
+
getLinkName(linkId: StencilApi.LinkId): {
|
|
961
1020
|
missing: boolean;
|
|
962
1021
|
name: string;
|
|
963
1022
|
};
|
|
964
|
-
getWorkflowView(workflowId:
|
|
965
|
-
getWorkflowName(workflowId:
|
|
1023
|
+
getWorkflowView(workflowId: StencilApi.WorkflowId): WorkflowView;
|
|
1024
|
+
getWorkflowName(workflowId: StencilApi.WorkflowId): {
|
|
966
1025
|
missing: boolean;
|
|
967
1026
|
name: string;
|
|
968
1027
|
};
|
|
969
|
-
getArticlesForLocale(locale:
|
|
970
|
-
getArticlesForLocales(locales:
|
|
971
|
-
withPage(page:
|
|
972
|
-
withPageValue(page:
|
|
973
|
-
withoutPages(pages:
|
|
974
|
-
withLocaleFilter(locale?:
|
|
975
|
-
withSite(site:
|
|
1028
|
+
getArticlesForLocale(locale: StencilApi.LocaleId): StencilApi.Article[];
|
|
1029
|
+
getArticlesForLocales(locales: StencilApi.LocaleId[]): StencilApi.Article[];
|
|
1030
|
+
withPage(page: StencilApi.PageId): Session;
|
|
1031
|
+
withPageValue(page: StencilApi.PageId, value: StencilApi.LocalisedContent): Session;
|
|
1032
|
+
withoutPages(pages: StencilApi.PageId[]): Session;
|
|
1033
|
+
withLocaleFilter(locale?: StencilApi.LocaleId): Session;
|
|
1034
|
+
withSite(site: StencilApi.Site): Session;
|
|
976
1035
|
}
|
|
977
1036
|
interface Actions {
|
|
978
1037
|
handleLoad(): Promise<void>;
|
|
979
1038
|
handleLoadSite(): Promise<void>;
|
|
980
|
-
handlePageUpdate(page:
|
|
981
|
-
handlePageUpdateRemove(pages:
|
|
982
|
-
handleLocaleFilter(locale?:
|
|
1039
|
+
handlePageUpdate(page: StencilApi.PageId, value: StencilApi.LocalisedContent): void;
|
|
1040
|
+
handlePageUpdateRemove(pages: StencilApi.PageId[]): void;
|
|
1041
|
+
handleLocaleFilter(locale?: StencilApi.LocaleId): void;
|
|
983
1042
|
}
|
|
984
1043
|
interface ContextType {
|
|
985
1044
|
session: Session;
|
|
986
1045
|
actions: Actions;
|
|
987
|
-
service:
|
|
1046
|
+
service: StencilApi.Service;
|
|
988
1047
|
}
|
|
989
1048
|
interface ArticleView {
|
|
990
|
-
article:
|
|
1049
|
+
article: StencilApi.Article;
|
|
991
1050
|
pages: PageView[];
|
|
992
|
-
canCreate:
|
|
1051
|
+
canCreate: StencilApi.SiteLocale[];
|
|
993
1052
|
links: LinkView[];
|
|
994
1053
|
workflows: WorkflowView[];
|
|
995
1054
|
children: ArticleView[];
|
|
996
1055
|
displayOrder: number;
|
|
997
|
-
getPageById(pageId:
|
|
998
|
-
getPageByLocaleId(localeId:
|
|
999
|
-
findPageByLocaleId(localeId:
|
|
1056
|
+
getPageById(pageId: StencilApi.PageId): PageView;
|
|
1057
|
+
getPageByLocaleId(localeId: StencilApi.LocaleId): PageView;
|
|
1058
|
+
findPageByLocaleId(localeId: StencilApi.LocaleId): PageView | undefined;
|
|
1000
1059
|
}
|
|
1001
1060
|
interface PageView {
|
|
1002
1061
|
title: string;
|
|
1003
|
-
page:
|
|
1004
|
-
locale:
|
|
1062
|
+
page: StencilApi.Page;
|
|
1063
|
+
locale: StencilApi.SiteLocale;
|
|
1005
1064
|
}
|
|
1006
1065
|
interface LinkView {
|
|
1007
|
-
link:
|
|
1066
|
+
link: StencilApi.Link;
|
|
1008
1067
|
labels: LabelView[];
|
|
1009
1068
|
}
|
|
1010
1069
|
interface WorkflowView {
|
|
1011
|
-
workflow:
|
|
1070
|
+
workflow: StencilApi.Workflow;
|
|
1012
1071
|
labels: LabelView[];
|
|
1013
1072
|
}
|
|
1014
1073
|
interface LabelView {
|
|
1015
|
-
label:
|
|
1016
|
-
locale:
|
|
1074
|
+
label: StencilApi.LocaleLabel;
|
|
1075
|
+
locale: StencilApi.SiteLocale;
|
|
1017
1076
|
}
|
|
1018
1077
|
}
|
|
1019
1078
|
|
|
1020
1079
|
|
|
1021
1080
|
declare namespace StencilComposerApi {
|
|
1081
|
+
class ImmutableTabData implements TabData {
|
|
1082
|
+
private _nav;
|
|
1083
|
+
constructor(props: {
|
|
1084
|
+
nav: Nav;
|
|
1085
|
+
});
|
|
1086
|
+
get nav(): Nav;
|
|
1087
|
+
withNav(nav: Nav): ImmutableTabData;
|
|
1088
|
+
}
|
|
1022
1089
|
const createTab: (props: {
|
|
1023
1090
|
nav: Nav;
|
|
1024
|
-
page?:
|
|
1091
|
+
page?: StencilApi.Page;
|
|
1025
1092
|
}) => ImmutableTabData;
|
|
1026
1093
|
const ComposerContext: React.Context<ContextType>;
|
|
1027
|
-
const useUnsaved: (article:
|
|
1094
|
+
const useUnsaved: (article: StencilApi.Article) => boolean;
|
|
1028
1095
|
const useComposer: () => {
|
|
1029
1096
|
session: Session;
|
|
1030
|
-
service:
|
|
1097
|
+
service: StencilApi.Service;
|
|
1031
1098
|
actions: Actions;
|
|
1032
|
-
site:
|
|
1033
|
-
isArticleSaved: (article:
|
|
1099
|
+
site: StencilApi.Site;
|
|
1100
|
+
isArticleSaved: (article: StencilApi.Article) => boolean;
|
|
1034
1101
|
};
|
|
1035
|
-
const useSite: () =>
|
|
1102
|
+
const useSite: () => StencilApi.Site;
|
|
1036
1103
|
const useSession: () => Session;
|
|
1037
1104
|
const useNav: () => {
|
|
1038
1105
|
handleInTab: (props: {
|
|
1039
|
-
article:
|
|
1106
|
+
article: StencilApi.Article;
|
|
1040
1107
|
type: NavType;
|
|
1041
1108
|
locale?: string | null;
|
|
1042
1109
|
secondary?: boolean;
|
|
1043
1110
|
}) => void;
|
|
1044
|
-
findTab: (article:
|
|
1111
|
+
findTab: (article: StencilApi.Article) => Tab | undefined;
|
|
1045
1112
|
};
|
|
1046
1113
|
const Provider: React.FC<{
|
|
1047
1114
|
children: React.ReactNode;
|
|
1048
|
-
service:
|
|
1115
|
+
service: StencilApi.Service;
|
|
1049
1116
|
}>;
|
|
1050
1117
|
}
|
|
1051
1118
|
|
|
1052
|
-
declare namespace StencilClient {
|
|
1053
|
-
type PageId = string;
|
|
1054
|
-
type LinkId = string;
|
|
1055
|
-
type ArticleId = string;
|
|
1056
|
-
type WorkflowId = string;
|
|
1057
|
-
type LocaleId = string;
|
|
1058
|
-
type Locale = string;
|
|
1059
|
-
type LocalisedMarkdown = string;
|
|
1060
|
-
type LocalisedContent = string;
|
|
1061
|
-
type ReleaseId = string;
|
|
1062
|
-
type TemplateId = string;
|
|
1063
|
-
type LinkType = "internal" | "external" | "phone";
|
|
1064
|
-
type TemplateType = "page";
|
|
1065
|
-
interface Site {
|
|
1066
|
-
name: string;
|
|
1067
|
-
contentType: "OK" | "NOT_CREATED" | "EMPTY" | "ERRORS" | "NO_CONNECTION";
|
|
1068
|
-
locales: Record<string, SiteLocale>;
|
|
1069
|
-
pages: Record<PageId, Page>;
|
|
1070
|
-
links: Record<LinkId, Link>;
|
|
1071
|
-
articles: Record<ArticleId, Article>;
|
|
1072
|
-
workflows: Record<WorkflowId, Workflow>;
|
|
1073
|
-
releases: Record<ReleaseId, Release>;
|
|
1074
|
-
templates: Record<TemplateId, Template>;
|
|
1075
|
-
}
|
|
1076
|
-
interface SiteLocale {
|
|
1077
|
-
id: LocaleId;
|
|
1078
|
-
body: {
|
|
1079
|
-
value: Locale;
|
|
1080
|
-
enabled: boolean;
|
|
1081
|
-
};
|
|
1082
|
-
}
|
|
1083
|
-
interface LocaleMutator {
|
|
1084
|
-
localeId: LocaleId;
|
|
1085
|
-
value: string;
|
|
1086
|
-
enabled: boolean;
|
|
1087
|
-
}
|
|
1088
|
-
interface Page {
|
|
1089
|
-
id: PageId;
|
|
1090
|
-
created: string;
|
|
1091
|
-
modified: string;
|
|
1092
|
-
body: {
|
|
1093
|
-
article: ArticleId;
|
|
1094
|
-
locale: Locale;
|
|
1095
|
-
content: LocalisedMarkdown;
|
|
1096
|
-
devMode?: boolean;
|
|
1097
|
-
};
|
|
1098
|
-
}
|
|
1099
|
-
interface PageMutator {
|
|
1100
|
-
pageId: PageId;
|
|
1101
|
-
locale: Locale;
|
|
1102
|
-
content: LocalisedContent;
|
|
1103
|
-
devMode: boolean | undefined;
|
|
1104
|
-
}
|
|
1105
|
-
interface Template {
|
|
1106
|
-
id: TemplateId;
|
|
1107
|
-
body: {
|
|
1108
|
-
type: TemplateType;
|
|
1109
|
-
name: string;
|
|
1110
|
-
description: string;
|
|
1111
|
-
content: string;
|
|
1112
|
-
};
|
|
1113
|
-
}
|
|
1114
|
-
interface TemplateMutator {
|
|
1115
|
-
id: TemplateId;
|
|
1116
|
-
type: TemplateType;
|
|
1117
|
-
name: string;
|
|
1118
|
-
description: string;
|
|
1119
|
-
content: string;
|
|
1120
|
-
}
|
|
1121
|
-
interface Article {
|
|
1122
|
-
id: ArticleId;
|
|
1123
|
-
body: {
|
|
1124
|
-
parentId?: ArticleId;
|
|
1125
|
-
name: string;
|
|
1126
|
-
order: number;
|
|
1127
|
-
devMode?: boolean;
|
|
1128
|
-
};
|
|
1129
|
-
}
|
|
1130
|
-
interface ArticleMutator {
|
|
1131
|
-
articleId: ArticleId;
|
|
1132
|
-
parentId?: ArticleId;
|
|
1133
|
-
name: string;
|
|
1134
|
-
order: number;
|
|
1135
|
-
links: LinkId[] | undefined;
|
|
1136
|
-
workflows: WorkflowId[] | undefined;
|
|
1137
|
-
devMode: boolean | undefined;
|
|
1138
|
-
}
|
|
1139
|
-
interface Release {
|
|
1140
|
-
id: string;
|
|
1141
|
-
body: {
|
|
1142
|
-
note?: string;
|
|
1143
|
-
name: string;
|
|
1144
|
-
created: string;
|
|
1145
|
-
locales: LocaleReleaseItem[];
|
|
1146
|
-
articles: ArticleReleaseItem[];
|
|
1147
|
-
links: LinkReleaseItem[];
|
|
1148
|
-
workflows: WorkflowReleaseItem[];
|
|
1149
|
-
pages: PageReleaseItem[];
|
|
1150
|
-
};
|
|
1151
|
-
}
|
|
1152
|
-
interface LinkReleaseItem extends ReleaseItem {
|
|
1153
|
-
value: string;
|
|
1154
|
-
contentType: string;
|
|
1155
|
-
articles: string;
|
|
1156
|
-
labels: LocaleLabel[];
|
|
1157
|
-
}
|
|
1158
|
-
interface WorkflowReleaseItem extends ReleaseItem {
|
|
1159
|
-
value: string;
|
|
1160
|
-
articles: string[];
|
|
1161
|
-
labels: LocaleLabel[];
|
|
1162
|
-
}
|
|
1163
|
-
interface LocaleReleaseItem extends ReleaseItem {
|
|
1164
|
-
value: string;
|
|
1165
|
-
}
|
|
1166
|
-
interface ArticleReleaseItem extends ReleaseItem {
|
|
1167
|
-
name: string;
|
|
1168
|
-
parentId?: string;
|
|
1169
|
-
}
|
|
1170
|
-
interface PageReleaseItem extends ReleaseItem {
|
|
1171
|
-
locale: string;
|
|
1172
|
-
h1: string;
|
|
1173
|
-
}
|
|
1174
|
-
interface ReleaseItem {
|
|
1175
|
-
id: string;
|
|
1176
|
-
hash: string;
|
|
1177
|
-
}
|
|
1178
|
-
interface Link {
|
|
1179
|
-
id: LinkId;
|
|
1180
|
-
body: {
|
|
1181
|
-
articles: ArticleId[];
|
|
1182
|
-
contentType: LinkType;
|
|
1183
|
-
value: string;
|
|
1184
|
-
labels: LocaleLabel[];
|
|
1185
|
-
devMode?: boolean;
|
|
1186
|
-
};
|
|
1187
|
-
}
|
|
1188
|
-
interface LocaleLabel {
|
|
1189
|
-
locale: LocaleId;
|
|
1190
|
-
labelValue: LocalisedContent;
|
|
1191
|
-
}
|
|
1192
|
-
interface LinkMutator {
|
|
1193
|
-
linkId: LinkId;
|
|
1194
|
-
type: LinkType;
|
|
1195
|
-
value: string;
|
|
1196
|
-
articles: ArticleId[] | undefined;
|
|
1197
|
-
labels: LocaleLabel[] | undefined;
|
|
1198
|
-
devMode: boolean | undefined;
|
|
1199
|
-
}
|
|
1200
|
-
interface Workflow {
|
|
1201
|
-
id: WorkflowId;
|
|
1202
|
-
body: {
|
|
1203
|
-
articles: ArticleId[];
|
|
1204
|
-
value: string;
|
|
1205
|
-
labels: LocaleLabel[];
|
|
1206
|
-
devMode?: boolean;
|
|
1207
|
-
};
|
|
1208
|
-
}
|
|
1209
|
-
interface WorkflowMutator {
|
|
1210
|
-
workflowId: WorkflowId;
|
|
1211
|
-
value: string;
|
|
1212
|
-
articles: ArticleId[] | undefined;
|
|
1213
|
-
labels: LocaleLabel[] | undefined;
|
|
1214
|
-
devMode: boolean | undefined;
|
|
1215
|
-
}
|
|
1216
|
-
interface FetchIntegration {
|
|
1217
|
-
fetch<T>(path: string, init?: RequestInit): Promise<T>;
|
|
1218
|
-
}
|
|
1219
|
-
interface Service {
|
|
1220
|
-
getSite(): Promise<Site>;
|
|
1221
|
-
getReleaseContent(releaseId: string): Promise<{}>;
|
|
1222
|
-
create(): CreateBuilder;
|
|
1223
|
-
delete(): DeleteBuilder;
|
|
1224
|
-
update(): UpdateBuilder;
|
|
1225
|
-
version(): Promise<VersionEntity>;
|
|
1226
|
-
}
|
|
1227
|
-
interface VersionEntity {
|
|
1228
|
-
version: string;
|
|
1229
|
-
built: string;
|
|
1230
|
-
}
|
|
1231
|
-
interface CreateArticle {
|
|
1232
|
-
parentId?: ArticleId;
|
|
1233
|
-
name: string;
|
|
1234
|
-
order: number;
|
|
1235
|
-
devMode: boolean | undefined;
|
|
1236
|
-
}
|
|
1237
|
-
interface CreateLocale {
|
|
1238
|
-
locale: Locale;
|
|
1239
|
-
}
|
|
1240
|
-
interface CreatePage {
|
|
1241
|
-
articleId: ArticleId;
|
|
1242
|
-
locale: LocaleId;
|
|
1243
|
-
content?: string;
|
|
1244
|
-
devMode: boolean | undefined;
|
|
1245
|
-
}
|
|
1246
|
-
interface CreateTemplate {
|
|
1247
|
-
type: "page" | string;
|
|
1248
|
-
name: string;
|
|
1249
|
-
description: string;
|
|
1250
|
-
content: string;
|
|
1251
|
-
}
|
|
1252
|
-
interface CreateLink {
|
|
1253
|
-
type: "internal" | "external" | string;
|
|
1254
|
-
value: string;
|
|
1255
|
-
labels: LocaleLabel[];
|
|
1256
|
-
articles: ArticleId[];
|
|
1257
|
-
devMode: boolean | undefined;
|
|
1258
|
-
}
|
|
1259
|
-
interface CreateWorkflow {
|
|
1260
|
-
value: string;
|
|
1261
|
-
labels: LocaleLabel[];
|
|
1262
|
-
articles: ArticleId[];
|
|
1263
|
-
devMode: boolean | undefined;
|
|
1264
|
-
}
|
|
1265
|
-
interface CreateRelease {
|
|
1266
|
-
name: string;
|
|
1267
|
-
note?: string;
|
|
1268
|
-
created: string;
|
|
1269
|
-
}
|
|
1270
|
-
interface CreateBuilder {
|
|
1271
|
-
site(): Promise<Site>;
|
|
1272
|
-
importData(init: string): Promise<void>;
|
|
1273
|
-
release(init: CreateRelease): Promise<Release>;
|
|
1274
|
-
locale(init: CreateLocale): Promise<SiteLocale>;
|
|
1275
|
-
article(init: CreateArticle): Promise<Article>;
|
|
1276
|
-
page(init: CreatePage): Promise<Page>;
|
|
1277
|
-
link(init: CreateLink): Promise<Link>;
|
|
1278
|
-
template(init: CreateTemplate): Promise<Template>;
|
|
1279
|
-
workflow(init: CreateWorkflow): Promise<Workflow>;
|
|
1280
|
-
}
|
|
1281
|
-
interface DeleteBuilder {
|
|
1282
|
-
locale(id: LocaleId): Promise<void>;
|
|
1283
|
-
article(id: ArticleId): Promise<void>;
|
|
1284
|
-
page(id: PageId): Promise<void>;
|
|
1285
|
-
link(id: LinkId): Promise<void>;
|
|
1286
|
-
template(id: TemplateId): Promise<void>;
|
|
1287
|
-
linkArticlePage(link: LinkId, article: ArticleId, locale: Locale): Promise<void>;
|
|
1288
|
-
workflow(id: WorkflowId): Promise<void>;
|
|
1289
|
-
workflowArticlePage(workflow: WorkflowId, article: ArticleId, locale: Locale): Promise<void>;
|
|
1290
|
-
release(id: ReleaseId): Promise<void>;
|
|
1291
|
-
}
|
|
1292
|
-
interface UpdateBuilder {
|
|
1293
|
-
locale(article: LocaleMutator): Promise<SiteLocale>;
|
|
1294
|
-
article(article: ArticleMutator): Promise<Article>;
|
|
1295
|
-
pages(pages: PageMutator[]): Promise<Page[]>;
|
|
1296
|
-
link(link: LinkMutator): Promise<Link>;
|
|
1297
|
-
workflow(workflow: WorkflowMutator): Promise<Workflow>;
|
|
1298
|
-
template(template: TemplateMutator): Promise<Template>;
|
|
1299
|
-
}
|
|
1300
|
-
interface Store {
|
|
1301
|
-
fetch<T>(path: string, init?: RequestInit): Promise<T>;
|
|
1302
|
-
}
|
|
1303
|
-
interface StoreConfig {
|
|
1304
|
-
url: string;
|
|
1305
|
-
oidc?: string;
|
|
1306
|
-
status?: string;
|
|
1307
|
-
csrf?: {
|
|
1308
|
-
key: string;
|
|
1309
|
-
value: string;
|
|
1310
|
-
};
|
|
1311
|
-
}
|
|
1312
|
-
interface ErrorMsg {
|
|
1313
|
-
id: string;
|
|
1314
|
-
value: string;
|
|
1315
|
-
}
|
|
1316
|
-
interface ErrorProps {
|
|
1317
|
-
text: string;
|
|
1318
|
-
status: number;
|
|
1319
|
-
errors: any[];
|
|
1320
|
-
}
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
declare namespace StencilClient {
|
|
1325
|
-
const mock: () => Service;
|
|
1326
|
-
const service: (init: {
|
|
1327
|
-
store?: Store;
|
|
1328
|
-
config?: StoreConfig;
|
|
1329
|
-
}) => Service;
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
1119
|
|
|
1333
1120
|
declare namespace WrenchComposerApi {
|
|
1334
1121
|
interface Nav {
|
|
@@ -1392,6 +1179,14 @@ declare namespace WrenchComposerApi {
|
|
|
1392
1179
|
|
|
1393
1180
|
|
|
1394
1181
|
declare namespace WrenchComposerApi {
|
|
1182
|
+
class ImmutableTabData implements TabData {
|
|
1183
|
+
private _nav;
|
|
1184
|
+
constructor(props: {
|
|
1185
|
+
nav: Nav;
|
|
1186
|
+
});
|
|
1187
|
+
get nav(): Nav;
|
|
1188
|
+
withNav(nav: Nav): ImmutableTabData;
|
|
1189
|
+
}
|
|
1395
1190
|
const createTab: (props: {
|
|
1396
1191
|
nav: Nav;
|
|
1397
1192
|
page?: HdesApi.Entity<any>;
|
|
@@ -1454,6 +1249,14 @@ declare namespace Decision {
|
|
|
1454
1249
|
}
|
|
1455
1250
|
|
|
1456
1251
|
|
|
1252
|
+
declare namespace GraphAPI {
|
|
1253
|
+
const create: (props: {
|
|
1254
|
+
fl: HdesApi.AstFlow;
|
|
1255
|
+
models: HdesApi.Site;
|
|
1256
|
+
}) => Vis.Model;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
|
|
1457
1260
|
declare namespace Vis {
|
|
1458
1261
|
interface Model {
|
|
1459
1262
|
nodes: Node[];
|
|
@@ -1494,11 +1297,3 @@ declare namespace Vis {
|
|
|
1494
1297
|
declare namespace Vis {
|
|
1495
1298
|
const create: (init: InitProps) => React.ReactElement;
|
|
1496
1299
|
}
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
declare namespace GraphAPI {
|
|
1500
|
-
const create: (props: {
|
|
1501
|
-
fl: HdesApi.AstFlow;
|
|
1502
|
-
models: HdesApi.Site;
|
|
1503
|
-
}) => Vis.Model;
|
|
1504
|
-
}
|