@dxs-ts/eveli-ide 0.0.18 → 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 +269 -490
- package/build/index.js +16125 -16120
- 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
|
|
|
@@ -900,388 +959,6 @@ declare namespace HdesClient {
|
|
|
900
959
|
}
|
|
901
960
|
|
|
902
961
|
|
|
903
|
-
declare namespace WrenchComposerApi {
|
|
904
|
-
interface Nav {
|
|
905
|
-
value?: string | null;
|
|
906
|
-
}
|
|
907
|
-
interface TabData {
|
|
908
|
-
nav?: Nav;
|
|
909
|
-
withNav(nav: Nav): TabData;
|
|
910
|
-
}
|
|
911
|
-
interface Tab extends BurgerApi.TabSession<TabData> {
|
|
912
|
-
}
|
|
913
|
-
interface DebugSession {
|
|
914
|
-
error?: HdesApi.StoreError;
|
|
915
|
-
debug?: HdesApi.DebugResponse;
|
|
916
|
-
csv?: string;
|
|
917
|
-
json?: string;
|
|
918
|
-
selected: HdesApi.EntityId;
|
|
919
|
-
inputType: DebugInputType;
|
|
920
|
-
}
|
|
921
|
-
type DebugInputType = "CSV" | "JSON";
|
|
922
|
-
interface DebugSessions {
|
|
923
|
-
selected?: HdesApi.EntityId;
|
|
924
|
-
values: Record<HdesApi.EntityId, DebugSession>;
|
|
925
|
-
}
|
|
926
|
-
interface PageUpdate {
|
|
927
|
-
saved: boolean;
|
|
928
|
-
origin: HdesApi.Entity<any>;
|
|
929
|
-
value: HdesApi.AstCommand[];
|
|
930
|
-
withValue(value: HdesApi.AstCommand[]): PageUpdate;
|
|
931
|
-
}
|
|
932
|
-
interface Session {
|
|
933
|
-
site: HdesApi.Site;
|
|
934
|
-
pages: Record<HdesApi.EntityId, PageUpdate>;
|
|
935
|
-
debug: DebugSessions;
|
|
936
|
-
branchName?: string;
|
|
937
|
-
getDecision(decisionName: string): undefined | HdesApi.Entity<HdesApi.AstDecision>;
|
|
938
|
-
getFlow(flowName: string): undefined | HdesApi.Entity<HdesApi.AstFlow>;
|
|
939
|
-
getService(serviceName: string): undefined | HdesApi.Entity<HdesApi.AstService>;
|
|
940
|
-
getEntity(id: HdesApi.EntityId): undefined | HdesApi.Entity<any>;
|
|
941
|
-
withDebug(page: DebugSession): Session;
|
|
942
|
-
withPage(page: HdesApi.EntityId): Session;
|
|
943
|
-
withPageValue(page: HdesApi.EntityId, value: HdesApi.AstCommand[]): Session;
|
|
944
|
-
withoutPages(pages: HdesApi.EntityId[]): Session;
|
|
945
|
-
withBranch(branchName?: string): Session;
|
|
946
|
-
withSite(site: HdesApi.Site): Session;
|
|
947
|
-
}
|
|
948
|
-
interface Actions {
|
|
949
|
-
handleLoad(): Promise<void>;
|
|
950
|
-
handleLoadSite(site?: HdesApi.Site): Promise<void>;
|
|
951
|
-
handleDebugUpdate(debug: DebugSession): void;
|
|
952
|
-
handlePageUpdate(page: HdesApi.EntityId, value: HdesApi.AstCommand[]): void;
|
|
953
|
-
handlePageUpdateRemove(pages: HdesApi.EntityId[]): void;
|
|
954
|
-
handleBranchUpdate(branchName?: string): void;
|
|
955
|
-
}
|
|
956
|
-
interface ContextType {
|
|
957
|
-
session: Session;
|
|
958
|
-
actions: Actions;
|
|
959
|
-
service: HdesApi.Service;
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
declare namespace WrenchComposerApi {
|
|
965
|
-
class ImmutableTabData implements TabData {
|
|
966
|
-
private _nav;
|
|
967
|
-
constructor(props: {
|
|
968
|
-
nav: Nav;
|
|
969
|
-
});
|
|
970
|
-
get nav(): Nav;
|
|
971
|
-
withNav(nav: Nav): ImmutableTabData;
|
|
972
|
-
}
|
|
973
|
-
const createTab: (props: {
|
|
974
|
-
nav: Nav;
|
|
975
|
-
page?: HdesApi.Entity<any>;
|
|
976
|
-
}) => ImmutableTabData;
|
|
977
|
-
const ComposerContext: React.Context<ContextType>;
|
|
978
|
-
const useUnsaved: (entity: HdesApi.Entity<any>) => boolean;
|
|
979
|
-
const useComposer: () => {
|
|
980
|
-
session: Session;
|
|
981
|
-
service: HdesApi.Service;
|
|
982
|
-
actions: Actions;
|
|
983
|
-
site: HdesApi.Site;
|
|
984
|
-
isArticleSaved: (entity: HdesApi.Entity<any>) => boolean;
|
|
985
|
-
};
|
|
986
|
-
const useSite: () => HdesApi.Site;
|
|
987
|
-
const useBranchName: () => string | undefined;
|
|
988
|
-
const useSession: () => Session;
|
|
989
|
-
const useNav: () => {
|
|
990
|
-
handleInTab: (props: {
|
|
991
|
-
article: HdesApi.Entity<any>;
|
|
992
|
-
}) => void;
|
|
993
|
-
findTab: (article: HdesApi.Entity<any>) => Tab | undefined;
|
|
994
|
-
};
|
|
995
|
-
const useDebug: () => {
|
|
996
|
-
handleDebugInit: (selected: HdesApi.EntityId) => void;
|
|
997
|
-
};
|
|
998
|
-
const Provider: React.FC<{
|
|
999
|
-
children: React.ReactNode;
|
|
1000
|
-
service: HdesApi.Service;
|
|
1001
|
-
}>;
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
declare namespace StencilClient {
|
|
1005
|
-
type PageId = string;
|
|
1006
|
-
type LinkId = string;
|
|
1007
|
-
type ArticleId = string;
|
|
1008
|
-
type WorkflowId = string;
|
|
1009
|
-
type LocaleId = string;
|
|
1010
|
-
type Locale = string;
|
|
1011
|
-
type LocalisedMarkdown = string;
|
|
1012
|
-
type LocalisedContent = string;
|
|
1013
|
-
type ReleaseId = string;
|
|
1014
|
-
type TemplateId = string;
|
|
1015
|
-
type LinkType = "internal" | "external" | "phone";
|
|
1016
|
-
type TemplateType = "page";
|
|
1017
|
-
interface Site {
|
|
1018
|
-
name: string;
|
|
1019
|
-
contentType: "OK" | "NOT_CREATED" | "EMPTY" | "ERRORS" | "NO_CONNECTION";
|
|
1020
|
-
locales: Record<string, SiteLocale>;
|
|
1021
|
-
pages: Record<PageId, Page>;
|
|
1022
|
-
links: Record<LinkId, Link>;
|
|
1023
|
-
articles: Record<ArticleId, Article>;
|
|
1024
|
-
workflows: Record<WorkflowId, Workflow>;
|
|
1025
|
-
releases: Record<ReleaseId, Release>;
|
|
1026
|
-
templates: Record<TemplateId, Template>;
|
|
1027
|
-
}
|
|
1028
|
-
interface SiteLocale {
|
|
1029
|
-
id: LocaleId;
|
|
1030
|
-
body: {
|
|
1031
|
-
value: Locale;
|
|
1032
|
-
enabled: boolean;
|
|
1033
|
-
};
|
|
1034
|
-
}
|
|
1035
|
-
interface LocaleMutator {
|
|
1036
|
-
localeId: LocaleId;
|
|
1037
|
-
value: string;
|
|
1038
|
-
enabled: boolean;
|
|
1039
|
-
}
|
|
1040
|
-
interface Page {
|
|
1041
|
-
id: PageId;
|
|
1042
|
-
created: string;
|
|
1043
|
-
modified: string;
|
|
1044
|
-
body: {
|
|
1045
|
-
article: ArticleId;
|
|
1046
|
-
locale: Locale;
|
|
1047
|
-
content: LocalisedMarkdown;
|
|
1048
|
-
devMode?: boolean;
|
|
1049
|
-
};
|
|
1050
|
-
}
|
|
1051
|
-
interface PageMutator {
|
|
1052
|
-
pageId: PageId;
|
|
1053
|
-
locale: Locale;
|
|
1054
|
-
content: LocalisedContent;
|
|
1055
|
-
devMode: boolean | undefined;
|
|
1056
|
-
}
|
|
1057
|
-
interface Template {
|
|
1058
|
-
id: TemplateId;
|
|
1059
|
-
body: {
|
|
1060
|
-
type: TemplateType;
|
|
1061
|
-
name: string;
|
|
1062
|
-
description: string;
|
|
1063
|
-
content: string;
|
|
1064
|
-
};
|
|
1065
|
-
}
|
|
1066
|
-
interface TemplateMutator {
|
|
1067
|
-
id: TemplateId;
|
|
1068
|
-
type: TemplateType;
|
|
1069
|
-
name: string;
|
|
1070
|
-
description: string;
|
|
1071
|
-
content: string;
|
|
1072
|
-
}
|
|
1073
|
-
interface Article {
|
|
1074
|
-
id: ArticleId;
|
|
1075
|
-
body: {
|
|
1076
|
-
parentId?: ArticleId;
|
|
1077
|
-
name: string;
|
|
1078
|
-
order: number;
|
|
1079
|
-
devMode?: boolean;
|
|
1080
|
-
};
|
|
1081
|
-
}
|
|
1082
|
-
interface ArticleMutator {
|
|
1083
|
-
articleId: ArticleId;
|
|
1084
|
-
parentId?: ArticleId;
|
|
1085
|
-
name: string;
|
|
1086
|
-
order: number;
|
|
1087
|
-
links: LinkId[] | undefined;
|
|
1088
|
-
workflows: WorkflowId[] | undefined;
|
|
1089
|
-
devMode: boolean | undefined;
|
|
1090
|
-
}
|
|
1091
|
-
interface Release {
|
|
1092
|
-
id: string;
|
|
1093
|
-
body: {
|
|
1094
|
-
note?: string;
|
|
1095
|
-
name: string;
|
|
1096
|
-
created: string;
|
|
1097
|
-
locales: LocaleReleaseItem[];
|
|
1098
|
-
articles: ArticleReleaseItem[];
|
|
1099
|
-
links: LinkReleaseItem[];
|
|
1100
|
-
workflows: WorkflowReleaseItem[];
|
|
1101
|
-
pages: PageReleaseItem[];
|
|
1102
|
-
};
|
|
1103
|
-
}
|
|
1104
|
-
interface LinkReleaseItem extends ReleaseItem {
|
|
1105
|
-
value: string;
|
|
1106
|
-
contentType: string;
|
|
1107
|
-
articles: string;
|
|
1108
|
-
labels: LocaleLabel[];
|
|
1109
|
-
}
|
|
1110
|
-
interface WorkflowReleaseItem extends ReleaseItem {
|
|
1111
|
-
value: string;
|
|
1112
|
-
articles: string[];
|
|
1113
|
-
labels: LocaleLabel[];
|
|
1114
|
-
}
|
|
1115
|
-
interface LocaleReleaseItem extends ReleaseItem {
|
|
1116
|
-
value: string;
|
|
1117
|
-
}
|
|
1118
|
-
interface ArticleReleaseItem extends ReleaseItem {
|
|
1119
|
-
name: string;
|
|
1120
|
-
parentId?: string;
|
|
1121
|
-
}
|
|
1122
|
-
interface PageReleaseItem extends ReleaseItem {
|
|
1123
|
-
locale: string;
|
|
1124
|
-
h1: string;
|
|
1125
|
-
}
|
|
1126
|
-
interface ReleaseItem {
|
|
1127
|
-
id: string;
|
|
1128
|
-
hash: string;
|
|
1129
|
-
}
|
|
1130
|
-
interface Link {
|
|
1131
|
-
id: LinkId;
|
|
1132
|
-
body: {
|
|
1133
|
-
articles: ArticleId[];
|
|
1134
|
-
contentType: LinkType;
|
|
1135
|
-
value: string;
|
|
1136
|
-
labels: LocaleLabel[];
|
|
1137
|
-
devMode?: boolean;
|
|
1138
|
-
};
|
|
1139
|
-
}
|
|
1140
|
-
interface LocaleLabel {
|
|
1141
|
-
locale: LocaleId;
|
|
1142
|
-
labelValue: LocalisedContent;
|
|
1143
|
-
}
|
|
1144
|
-
interface LinkMutator {
|
|
1145
|
-
linkId: LinkId;
|
|
1146
|
-
type: LinkType;
|
|
1147
|
-
value: string;
|
|
1148
|
-
articles: ArticleId[] | undefined;
|
|
1149
|
-
labels: LocaleLabel[] | undefined;
|
|
1150
|
-
devMode: boolean | undefined;
|
|
1151
|
-
}
|
|
1152
|
-
interface Workflow {
|
|
1153
|
-
id: WorkflowId;
|
|
1154
|
-
body: {
|
|
1155
|
-
articles: ArticleId[];
|
|
1156
|
-
value: string;
|
|
1157
|
-
labels: LocaleLabel[];
|
|
1158
|
-
devMode?: boolean;
|
|
1159
|
-
};
|
|
1160
|
-
}
|
|
1161
|
-
interface WorkflowMutator {
|
|
1162
|
-
workflowId: WorkflowId;
|
|
1163
|
-
value: string;
|
|
1164
|
-
articles: ArticleId[] | undefined;
|
|
1165
|
-
labels: LocaleLabel[] | undefined;
|
|
1166
|
-
devMode: boolean | undefined;
|
|
1167
|
-
}
|
|
1168
|
-
interface FetchIntegration {
|
|
1169
|
-
fetch<T>(path: string, init?: RequestInit): Promise<T>;
|
|
1170
|
-
}
|
|
1171
|
-
interface Service {
|
|
1172
|
-
getSite(): Promise<Site>;
|
|
1173
|
-
getReleaseContent(releaseId: string): Promise<{}>;
|
|
1174
|
-
create(): CreateBuilder;
|
|
1175
|
-
delete(): DeleteBuilder;
|
|
1176
|
-
update(): UpdateBuilder;
|
|
1177
|
-
version(): Promise<VersionEntity>;
|
|
1178
|
-
}
|
|
1179
|
-
interface VersionEntity {
|
|
1180
|
-
version: string;
|
|
1181
|
-
built: string;
|
|
1182
|
-
}
|
|
1183
|
-
interface CreateArticle {
|
|
1184
|
-
parentId?: ArticleId;
|
|
1185
|
-
name: string;
|
|
1186
|
-
order: number;
|
|
1187
|
-
devMode: boolean | undefined;
|
|
1188
|
-
}
|
|
1189
|
-
interface CreateLocale {
|
|
1190
|
-
locale: Locale;
|
|
1191
|
-
}
|
|
1192
|
-
interface CreatePage {
|
|
1193
|
-
articleId: ArticleId;
|
|
1194
|
-
locale: LocaleId;
|
|
1195
|
-
content?: string;
|
|
1196
|
-
devMode: boolean | undefined;
|
|
1197
|
-
}
|
|
1198
|
-
interface CreateTemplate {
|
|
1199
|
-
type: "page" | string;
|
|
1200
|
-
name: string;
|
|
1201
|
-
description: string;
|
|
1202
|
-
content: string;
|
|
1203
|
-
}
|
|
1204
|
-
interface CreateLink {
|
|
1205
|
-
type: "internal" | "external" | string;
|
|
1206
|
-
value: string;
|
|
1207
|
-
labels: LocaleLabel[];
|
|
1208
|
-
articles: ArticleId[];
|
|
1209
|
-
devMode: boolean | undefined;
|
|
1210
|
-
}
|
|
1211
|
-
interface CreateWorkflow {
|
|
1212
|
-
value: string;
|
|
1213
|
-
labels: LocaleLabel[];
|
|
1214
|
-
articles: ArticleId[];
|
|
1215
|
-
devMode: boolean | undefined;
|
|
1216
|
-
}
|
|
1217
|
-
interface CreateRelease {
|
|
1218
|
-
name: string;
|
|
1219
|
-
note?: string;
|
|
1220
|
-
created: string;
|
|
1221
|
-
}
|
|
1222
|
-
interface CreateBuilder {
|
|
1223
|
-
site(): Promise<Site>;
|
|
1224
|
-
importData(init: string): Promise<void>;
|
|
1225
|
-
release(init: CreateRelease): Promise<Release>;
|
|
1226
|
-
locale(init: CreateLocale): Promise<SiteLocale>;
|
|
1227
|
-
article(init: CreateArticle): Promise<Article>;
|
|
1228
|
-
page(init: CreatePage): Promise<Page>;
|
|
1229
|
-
link(init: CreateLink): Promise<Link>;
|
|
1230
|
-
template(init: CreateTemplate): Promise<Template>;
|
|
1231
|
-
workflow(init: CreateWorkflow): Promise<Workflow>;
|
|
1232
|
-
}
|
|
1233
|
-
interface DeleteBuilder {
|
|
1234
|
-
locale(id: LocaleId): Promise<void>;
|
|
1235
|
-
article(id: ArticleId): Promise<void>;
|
|
1236
|
-
page(id: PageId): Promise<void>;
|
|
1237
|
-
link(id: LinkId): Promise<void>;
|
|
1238
|
-
template(id: TemplateId): Promise<void>;
|
|
1239
|
-
linkArticlePage(link: LinkId, article: ArticleId, locale: Locale): Promise<void>;
|
|
1240
|
-
workflow(id: WorkflowId): Promise<void>;
|
|
1241
|
-
workflowArticlePage(workflow: WorkflowId, article: ArticleId, locale: Locale): Promise<void>;
|
|
1242
|
-
release(id: ReleaseId): Promise<void>;
|
|
1243
|
-
}
|
|
1244
|
-
interface UpdateBuilder {
|
|
1245
|
-
locale(article: LocaleMutator): Promise<SiteLocale>;
|
|
1246
|
-
article(article: ArticleMutator): Promise<Article>;
|
|
1247
|
-
pages(pages: PageMutator[]): Promise<Page[]>;
|
|
1248
|
-
link(link: LinkMutator): Promise<Link>;
|
|
1249
|
-
workflow(workflow: WorkflowMutator): Promise<Workflow>;
|
|
1250
|
-
template(template: TemplateMutator): Promise<Template>;
|
|
1251
|
-
}
|
|
1252
|
-
interface Store {
|
|
1253
|
-
fetch<T>(path: string, init?: RequestInit): Promise<T>;
|
|
1254
|
-
}
|
|
1255
|
-
interface StoreConfig {
|
|
1256
|
-
url: string;
|
|
1257
|
-
oidc?: string;
|
|
1258
|
-
status?: string;
|
|
1259
|
-
csrf?: {
|
|
1260
|
-
key: string;
|
|
1261
|
-
value: string;
|
|
1262
|
-
};
|
|
1263
|
-
}
|
|
1264
|
-
interface ErrorMsg {
|
|
1265
|
-
id: string;
|
|
1266
|
-
value: string;
|
|
1267
|
-
}
|
|
1268
|
-
interface ErrorProps {
|
|
1269
|
-
text: string;
|
|
1270
|
-
status: number;
|
|
1271
|
-
errors: any[];
|
|
1272
|
-
}
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
declare namespace StencilClient {
|
|
1277
|
-
const mock: () => Service;
|
|
1278
|
-
const service: (init: {
|
|
1279
|
-
store?: Store;
|
|
1280
|
-
config?: StoreConfig;
|
|
1281
|
-
}) => Service;
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
962
|
declare namespace StencilComposerApi {
|
|
1286
963
|
interface SearchData {
|
|
1287
964
|
values: readonly SearchDataEntry[];
|
|
@@ -1317,85 +994,85 @@ declare namespace StencilComposerApi {
|
|
|
1317
994
|
}
|
|
1318
995
|
interface PageUpdate {
|
|
1319
996
|
saved: boolean;
|
|
1320
|
-
origin:
|
|
1321
|
-
value:
|
|
1322
|
-
withValue(value:
|
|
997
|
+
origin: StencilApi.Page;
|
|
998
|
+
value: StencilApi.LocalisedContent;
|
|
999
|
+
withValue(value: StencilApi.LocalisedContent): PageUpdate;
|
|
1323
1000
|
}
|
|
1324
1001
|
interface SessionFilter {
|
|
1325
|
-
locale?:
|
|
1326
|
-
withLocale(locale?:
|
|
1002
|
+
locale?: StencilApi.LocaleId;
|
|
1003
|
+
withLocale(locale?: StencilApi.LocaleId): SessionFilter;
|
|
1327
1004
|
}
|
|
1328
1005
|
interface Session {
|
|
1329
|
-
site:
|
|
1330
|
-
pages: Record<
|
|
1006
|
+
site: StencilApi.Site;
|
|
1007
|
+
pages: Record<StencilApi.PageId, PageUpdate>;
|
|
1331
1008
|
articles: ArticleView[];
|
|
1332
1009
|
workflows: WorkflowView[];
|
|
1333
1010
|
links: LinkView[];
|
|
1334
1011
|
search: SearchData;
|
|
1335
1012
|
filter: SessionFilter;
|
|
1336
|
-
getArticleName(articleId:
|
|
1013
|
+
getArticleName(articleId: StencilApi.ArticleId): {
|
|
1337
1014
|
missing: boolean;
|
|
1338
1015
|
name: string;
|
|
1339
1016
|
};
|
|
1340
|
-
getArticleView(articleId:
|
|
1341
|
-
getLinkView(linkId:
|
|
1342
|
-
getLinkName(linkId:
|
|
1017
|
+
getArticleView(articleId: StencilApi.ArticleId): ArticleView;
|
|
1018
|
+
getLinkView(linkId: StencilApi.LinkId): LinkView;
|
|
1019
|
+
getLinkName(linkId: StencilApi.LinkId): {
|
|
1343
1020
|
missing: boolean;
|
|
1344
1021
|
name: string;
|
|
1345
1022
|
};
|
|
1346
|
-
getWorkflowView(workflowId:
|
|
1347
|
-
getWorkflowName(workflowId:
|
|
1023
|
+
getWorkflowView(workflowId: StencilApi.WorkflowId): WorkflowView;
|
|
1024
|
+
getWorkflowName(workflowId: StencilApi.WorkflowId): {
|
|
1348
1025
|
missing: boolean;
|
|
1349
1026
|
name: string;
|
|
1350
1027
|
};
|
|
1351
|
-
getArticlesForLocale(locale:
|
|
1352
|
-
getArticlesForLocales(locales:
|
|
1353
|
-
withPage(page:
|
|
1354
|
-
withPageValue(page:
|
|
1355
|
-
withoutPages(pages:
|
|
1356
|
-
withLocaleFilter(locale?:
|
|
1357
|
-
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;
|
|
1358
1035
|
}
|
|
1359
1036
|
interface Actions {
|
|
1360
1037
|
handleLoad(): Promise<void>;
|
|
1361
1038
|
handleLoadSite(): Promise<void>;
|
|
1362
|
-
handlePageUpdate(page:
|
|
1363
|
-
handlePageUpdateRemove(pages:
|
|
1364
|
-
handleLocaleFilter(locale?:
|
|
1039
|
+
handlePageUpdate(page: StencilApi.PageId, value: StencilApi.LocalisedContent): void;
|
|
1040
|
+
handlePageUpdateRemove(pages: StencilApi.PageId[]): void;
|
|
1041
|
+
handleLocaleFilter(locale?: StencilApi.LocaleId): void;
|
|
1365
1042
|
}
|
|
1366
1043
|
interface ContextType {
|
|
1367
1044
|
session: Session;
|
|
1368
1045
|
actions: Actions;
|
|
1369
|
-
service:
|
|
1046
|
+
service: StencilApi.Service;
|
|
1370
1047
|
}
|
|
1371
1048
|
interface ArticleView {
|
|
1372
|
-
article:
|
|
1049
|
+
article: StencilApi.Article;
|
|
1373
1050
|
pages: PageView[];
|
|
1374
|
-
canCreate:
|
|
1051
|
+
canCreate: StencilApi.SiteLocale[];
|
|
1375
1052
|
links: LinkView[];
|
|
1376
1053
|
workflows: WorkflowView[];
|
|
1377
1054
|
children: ArticleView[];
|
|
1378
1055
|
displayOrder: number;
|
|
1379
|
-
getPageById(pageId:
|
|
1380
|
-
getPageByLocaleId(localeId:
|
|
1381
|
-
findPageByLocaleId(localeId:
|
|
1056
|
+
getPageById(pageId: StencilApi.PageId): PageView;
|
|
1057
|
+
getPageByLocaleId(localeId: StencilApi.LocaleId): PageView;
|
|
1058
|
+
findPageByLocaleId(localeId: StencilApi.LocaleId): PageView | undefined;
|
|
1382
1059
|
}
|
|
1383
1060
|
interface PageView {
|
|
1384
1061
|
title: string;
|
|
1385
|
-
page:
|
|
1386
|
-
locale:
|
|
1062
|
+
page: StencilApi.Page;
|
|
1063
|
+
locale: StencilApi.SiteLocale;
|
|
1387
1064
|
}
|
|
1388
1065
|
interface LinkView {
|
|
1389
|
-
link:
|
|
1066
|
+
link: StencilApi.Link;
|
|
1390
1067
|
labels: LabelView[];
|
|
1391
1068
|
}
|
|
1392
1069
|
interface WorkflowView {
|
|
1393
|
-
workflow:
|
|
1070
|
+
workflow: StencilApi.Workflow;
|
|
1394
1071
|
labels: LabelView[];
|
|
1395
1072
|
}
|
|
1396
1073
|
interface LabelView {
|
|
1397
|
-
label:
|
|
1398
|
-
locale:
|
|
1074
|
+
label: StencilApi.LocaleLabel;
|
|
1075
|
+
locale: StencilApi.SiteLocale;
|
|
1399
1076
|
}
|
|
1400
1077
|
}
|
|
1401
1078
|
|
|
@@ -1411,31 +1088,133 @@ declare namespace StencilComposerApi {
|
|
|
1411
1088
|
}
|
|
1412
1089
|
const createTab: (props: {
|
|
1413
1090
|
nav: Nav;
|
|
1414
|
-
page?:
|
|
1091
|
+
page?: StencilApi.Page;
|
|
1415
1092
|
}) => ImmutableTabData;
|
|
1416
1093
|
const ComposerContext: React.Context<ContextType>;
|
|
1417
|
-
const useUnsaved: (article:
|
|
1094
|
+
const useUnsaved: (article: StencilApi.Article) => boolean;
|
|
1418
1095
|
const useComposer: () => {
|
|
1419
1096
|
session: Session;
|
|
1420
|
-
service:
|
|
1097
|
+
service: StencilApi.Service;
|
|
1421
1098
|
actions: Actions;
|
|
1422
|
-
site:
|
|
1423
|
-
isArticleSaved: (article:
|
|
1099
|
+
site: StencilApi.Site;
|
|
1100
|
+
isArticleSaved: (article: StencilApi.Article) => boolean;
|
|
1424
1101
|
};
|
|
1425
|
-
const useSite: () =>
|
|
1102
|
+
const useSite: () => StencilApi.Site;
|
|
1426
1103
|
const useSession: () => Session;
|
|
1427
1104
|
const useNav: () => {
|
|
1428
1105
|
handleInTab: (props: {
|
|
1429
|
-
article:
|
|
1106
|
+
article: StencilApi.Article;
|
|
1430
1107
|
type: NavType;
|
|
1431
1108
|
locale?: string | null;
|
|
1432
1109
|
secondary?: boolean;
|
|
1433
1110
|
}) => void;
|
|
1434
|
-
findTab: (article:
|
|
1111
|
+
findTab: (article: StencilApi.Article) => Tab | undefined;
|
|
1112
|
+
};
|
|
1113
|
+
const Provider: React.FC<{
|
|
1114
|
+
children: React.ReactNode;
|
|
1115
|
+
service: StencilApi.Service;
|
|
1116
|
+
}>;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
|
|
1120
|
+
declare namespace WrenchComposerApi {
|
|
1121
|
+
interface Nav {
|
|
1122
|
+
value?: string | null;
|
|
1123
|
+
}
|
|
1124
|
+
interface TabData {
|
|
1125
|
+
nav?: Nav;
|
|
1126
|
+
withNav(nav: Nav): TabData;
|
|
1127
|
+
}
|
|
1128
|
+
interface Tab extends BurgerApi.TabSession<TabData> {
|
|
1129
|
+
}
|
|
1130
|
+
interface DebugSession {
|
|
1131
|
+
error?: HdesApi.StoreError;
|
|
1132
|
+
debug?: HdesApi.DebugResponse;
|
|
1133
|
+
csv?: string;
|
|
1134
|
+
json?: string;
|
|
1135
|
+
selected: HdesApi.EntityId;
|
|
1136
|
+
inputType: DebugInputType;
|
|
1137
|
+
}
|
|
1138
|
+
type DebugInputType = "CSV" | "JSON";
|
|
1139
|
+
interface DebugSessions {
|
|
1140
|
+
selected?: HdesApi.EntityId;
|
|
1141
|
+
values: Record<HdesApi.EntityId, DebugSession>;
|
|
1142
|
+
}
|
|
1143
|
+
interface PageUpdate {
|
|
1144
|
+
saved: boolean;
|
|
1145
|
+
origin: HdesApi.Entity<any>;
|
|
1146
|
+
value: HdesApi.AstCommand[];
|
|
1147
|
+
withValue(value: HdesApi.AstCommand[]): PageUpdate;
|
|
1148
|
+
}
|
|
1149
|
+
interface Session {
|
|
1150
|
+
site: HdesApi.Site;
|
|
1151
|
+
pages: Record<HdesApi.EntityId, PageUpdate>;
|
|
1152
|
+
debug: DebugSessions;
|
|
1153
|
+
branchName?: string;
|
|
1154
|
+
getDecision(decisionName: string): undefined | HdesApi.Entity<HdesApi.AstDecision>;
|
|
1155
|
+
getFlow(flowName: string): undefined | HdesApi.Entity<HdesApi.AstFlow>;
|
|
1156
|
+
getService(serviceName: string): undefined | HdesApi.Entity<HdesApi.AstService>;
|
|
1157
|
+
getEntity(id: HdesApi.EntityId): undefined | HdesApi.Entity<any>;
|
|
1158
|
+
withDebug(page: DebugSession): Session;
|
|
1159
|
+
withPage(page: HdesApi.EntityId): Session;
|
|
1160
|
+
withPageValue(page: HdesApi.EntityId, value: HdesApi.AstCommand[]): Session;
|
|
1161
|
+
withoutPages(pages: HdesApi.EntityId[]): Session;
|
|
1162
|
+
withBranch(branchName?: string): Session;
|
|
1163
|
+
withSite(site: HdesApi.Site): Session;
|
|
1164
|
+
}
|
|
1165
|
+
interface Actions {
|
|
1166
|
+
handleLoad(): Promise<void>;
|
|
1167
|
+
handleLoadSite(site?: HdesApi.Site): Promise<void>;
|
|
1168
|
+
handleDebugUpdate(debug: DebugSession): void;
|
|
1169
|
+
handlePageUpdate(page: HdesApi.EntityId, value: HdesApi.AstCommand[]): void;
|
|
1170
|
+
handlePageUpdateRemove(pages: HdesApi.EntityId[]): void;
|
|
1171
|
+
handleBranchUpdate(branchName?: string): void;
|
|
1172
|
+
}
|
|
1173
|
+
interface ContextType {
|
|
1174
|
+
session: Session;
|
|
1175
|
+
actions: Actions;
|
|
1176
|
+
service: HdesApi.Service;
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
|
|
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
|
+
}
|
|
1190
|
+
const createTab: (props: {
|
|
1191
|
+
nav: Nav;
|
|
1192
|
+
page?: HdesApi.Entity<any>;
|
|
1193
|
+
}) => ImmutableTabData;
|
|
1194
|
+
const ComposerContext: React.Context<ContextType>;
|
|
1195
|
+
const useUnsaved: (entity: HdesApi.Entity<any>) => boolean;
|
|
1196
|
+
const useComposer: () => {
|
|
1197
|
+
session: Session;
|
|
1198
|
+
service: HdesApi.Service;
|
|
1199
|
+
actions: Actions;
|
|
1200
|
+
site: HdesApi.Site;
|
|
1201
|
+
isArticleSaved: (entity: HdesApi.Entity<any>) => boolean;
|
|
1202
|
+
};
|
|
1203
|
+
const useSite: () => HdesApi.Site;
|
|
1204
|
+
const useBranchName: () => string | undefined;
|
|
1205
|
+
const useSession: () => Session;
|
|
1206
|
+
const useNav: () => {
|
|
1207
|
+
handleInTab: (props: {
|
|
1208
|
+
article: HdesApi.Entity<any>;
|
|
1209
|
+
}) => void;
|
|
1210
|
+
findTab: (article: HdesApi.Entity<any>) => Tab | undefined;
|
|
1211
|
+
};
|
|
1212
|
+
const useDebug: () => {
|
|
1213
|
+
handleDebugInit: (selected: HdesApi.EntityId) => void;
|
|
1435
1214
|
};
|
|
1436
1215
|
const Provider: React.FC<{
|
|
1437
1216
|
children: React.ReactNode;
|
|
1438
|
-
service:
|
|
1217
|
+
service: HdesApi.Service;
|
|
1439
1218
|
}>;
|
|
1440
1219
|
}
|
|
1441
1220
|
|
|
@@ -1470,6 +1249,14 @@ declare namespace Decision {
|
|
|
1470
1249
|
}
|
|
1471
1250
|
|
|
1472
1251
|
|
|
1252
|
+
declare namespace GraphAPI {
|
|
1253
|
+
const create: (props: {
|
|
1254
|
+
fl: HdesApi.AstFlow;
|
|
1255
|
+
models: HdesApi.Site;
|
|
1256
|
+
}) => Vis.Model;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
|
|
1473
1260
|
declare namespace Vis {
|
|
1474
1261
|
interface Model {
|
|
1475
1262
|
nodes: Node[];
|
|
@@ -1510,11 +1297,3 @@ declare namespace Vis {
|
|
|
1510
1297
|
declare namespace Vis {
|
|
1511
1298
|
const create: (init: InitProps) => React.ReactElement;
|
|
1512
1299
|
}
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
declare namespace GraphAPI {
|
|
1516
|
-
const create: (props: {
|
|
1517
|
-
fl: HdesApi.AstFlow;
|
|
1518
|
-
models: HdesApi.Site;
|
|
1519
|
-
}) => Vis.Model;
|
|
1520
|
-
}
|