orgnote-api 0.0.11 → 0.0.13

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.
Files changed (33) hide show
  1. package/package.json +4 -4
  2. package/src/api.ts +70 -0
  3. package/src/generated/api/.gitignore +4 -0
  4. package/src/generated/api/.npmignore +1 -0
  5. package/src/generated/api/.openapi-generator/FILES +9 -0
  6. package/src/generated/api/.openapi-generator/VERSION +1 -0
  7. package/src/generated/api/.openapi-generator-ignore +23 -0
  8. package/src/generated/api/api.ts +2040 -0
  9. package/src/generated/api/base.ts +72 -0
  10. package/src/generated/api/common.ts +150 -0
  11. package/{dist/generated/api/configuration.d.ts → src/generated/api/configuration.ts} +21 -3
  12. package/src/generated/api/git_push.sh +57 -0
  13. package/{dist/generated/api/index.d.ts → src/generated/api/index.ts} +5 -0
  14. package/{dist/index.d.ts → src/index.ts} +3 -0
  15. package/src/models/command.ts +30 -0
  16. package/src/models/completion.ts +30 -0
  17. package/src/models/extension.ts +45 -0
  18. package/src/models/modal.ts +4 -0
  19. package/src/models/note.ts +24 -0
  20. package/src/models/theme-variables.ts +194 -0
  21. package/src/models/widget.ts +56 -0
  22. package/dist/api.d.ts +0 -66
  23. package/dist/generated/api/api.d.ts +0 -1376
  24. package/dist/generated/api/base.d.ts +0 -54
  25. package/dist/generated/api/common.d.ts +0 -65
  26. package/dist/models/command.d.ts +0 -18
  27. package/dist/models/completion.d.ts +0 -22
  28. package/dist/models/extension.d.ts +0 -34
  29. package/dist/models/modal.d.ts +0 -4
  30. package/dist/models/note.d.ts +0 -21
  31. package/dist/models/theme-variables.d.ts +0 -192
  32. package/dist/models/widget.d.ts +0 -45
  33. /package/{dist/models/index.d.ts → src/models/index.ts} +0 -0
@@ -1,54 +0,0 @@
1
- /**
2
- * Org Note API
3
- * List of methods for work with Org Note.
4
- *
5
- * The version of the OpenAPI document: 0.0.1
6
- * Contact: artawower@protonmail.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { Configuration } from './configuration';
13
- import type { AxiosInstance, AxiosRequestConfig } from 'axios';
14
- export declare const BASE_PATH: string;
15
- /**
16
- *
17
- * @export
18
- */
19
- export declare const COLLECTION_FORMATS: {
20
- csv: string;
21
- ssv: string;
22
- tsv: string;
23
- pipes: string;
24
- };
25
- /**
26
- *
27
- * @export
28
- * @interface RequestArgs
29
- */
30
- export interface RequestArgs {
31
- url: string;
32
- options: AxiosRequestConfig;
33
- }
34
- /**
35
- *
36
- * @export
37
- * @class BaseAPI
38
- */
39
- export declare class BaseAPI {
40
- protected basePath: string;
41
- protected axios: AxiosInstance;
42
- protected configuration: Configuration | undefined;
43
- constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
44
- }
45
- /**
46
- *
47
- * @export
48
- * @class RequiredError
49
- * @extends {Error}
50
- */
51
- export declare class RequiredError extends Error {
52
- field: string;
53
- constructor(field: string, msg?: string);
54
- }
@@ -1,65 +0,0 @@
1
- /**
2
- * Org Note API
3
- * List of methods for work with Org Note.
4
- *
5
- * The version of the OpenAPI document: 0.0.1
6
- * Contact: artawower@protonmail.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { Configuration } from "./configuration";
13
- import type { RequestArgs } from "./base";
14
- import type { AxiosInstance, AxiosResponse } from 'axios';
15
- /**
16
- *
17
- * @export
18
- */
19
- export declare const DUMMY_BASE_URL = "https://example.com";
20
- /**
21
- *
22
- * @throws {RequiredError}
23
- * @export
24
- */
25
- export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
26
- /**
27
- *
28
- * @export
29
- */
30
- export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
31
- /**
32
- *
33
- * @export
34
- */
35
- export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
36
- /**
37
- *
38
- * @export
39
- */
40
- export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
41
- /**
42
- *
43
- * @export
44
- */
45
- export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
46
- /**
47
- *
48
- * @export
49
- */
50
- export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
51
- /**
52
- *
53
- * @export
54
- */
55
- export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
56
- /**
57
- *
58
- * @export
59
- */
60
- export declare const toPathString: (url: URL) => string;
61
- /**
62
- *
63
- * @export
64
- */
65
- export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
@@ -1,18 +0,0 @@
1
- export declare const DEFAULT_KEYBINDING_GROUP = "default";
2
- export type CommandGroup = 'settings' | 'editor' | 'global' | 'note-detail' | 'completion' | string;
3
- export interface CommandHandlerParams {
4
- event?: KeyboardEvent;
5
- data?: unknown;
6
- [key: string]: unknown;
7
- }
8
- export interface Command {
9
- keySequence?: string | string[];
10
- description?: string;
11
- command?: string;
12
- title?: string | (() => string);
13
- icon?: string | (() => string);
14
- group?: CommandGroup;
15
- allowOnInput?: boolean;
16
- ignorePrompt?: boolean;
17
- handler: (params?: CommandHandlerParams) => unknown | Promise<unknown>;
18
- }
@@ -1,22 +0,0 @@
1
- export interface CompletionCandidate<T = unknown> {
2
- icon?: string | (() => string);
3
- group?: string;
4
- title?: string | (() => string);
5
- description?: string;
6
- command: string;
7
- data: T;
8
- commandHandler?: (data: T) => void;
9
- }
10
- export interface CompletionSearchResult<T = unknown> {
11
- total?: number;
12
- result: CompletionCandidate<T>[];
13
- }
14
- export type CandidateGetterFn<T = unknown> = (filter: string, limit?: number, offset?: number) => CompletionSearchResult<T> | Promise<CompletionSearchResult<T>>;
15
- export interface CompletionConfigs<T = unknown> {
16
- searchAutocompletions?: string[];
17
- itemsGetter: CandidateGetterFn<T>;
18
- placeholder?: string;
19
- itemHeight?: string;
20
- searchText?: string;
21
- onClicked?: (candidate: CompletionCandidate<T>) => void;
22
- }
@@ -1,34 +0,0 @@
1
- import { OrgNoteApi } from '../api';
2
- export interface ExtensionManifest {
3
- name: string;
4
- version: string;
5
- category: 'theme' | 'extension' | 'language pack' | 'other';
6
- apiVersion?: string;
7
- author?: string;
8
- description?: string;
9
- keywords?: string[];
10
- sourceType: 'git' | 'file';
11
- readmeFilePath?: string;
12
- permissions?: Array<'files' | 'personal info' | '*' | 'third party'>;
13
- reloadRequired?: boolean;
14
- sourceUrl?: string;
15
- sponsor?: string[];
16
- development?: boolean;
17
- icon?: string;
18
- }
19
- export interface Extension {
20
- [key: string]: unknown;
21
- onMounted: (api: OrgNoteApi) => Promise<void>;
22
- onUnmounted?: (api: OrgNoteApi) => Promise<void>;
23
- }
24
- export interface ExtensionMeta {
25
- manifest: ExtensionManifest;
26
- uploaded?: boolean;
27
- active?: boolean;
28
- }
29
- export interface StoredExtension extends ExtensionMeta {
30
- module?: string;
31
- }
32
- export interface ActiveExtension extends ExtensionMeta {
33
- module: Extension;
34
- }
@@ -1,4 +0,0 @@
1
- export interface ModalConfig {
2
- closable?: boolean;
3
- title?: string;
4
- }
@@ -1,21 +0,0 @@
1
- import type { ModelsPublicNote, ModelsPublicUser } from '../generated/api';
2
- export interface NotesFilter {
3
- searchText?: string;
4
- userId?: string;
5
- limit?: number;
6
- offset?: number;
7
- }
8
- export interface NotePreview {
9
- id: ModelsPublicNote['id'];
10
- meta: ModelsPublicNote['meta'];
11
- createdAt: ModelsPublicNote['createdAt'];
12
- updatedAt: ModelsPublicNote['updatedAt'];
13
- filePath: ModelsPublicNote['filePath'];
14
- isMy: ModelsPublicNote['isMy'];
15
- author?: ModelsPublicUser;
16
- bookmarked?: boolean;
17
- }
18
- export interface Note extends ModelsPublicNote {
19
- deleted?: Date;
20
- bookmarked?: boolean;
21
- }
@@ -1,192 +0,0 @@
1
- /**
2
- * This file is generated by the script `collect-css-variables.js`.
3
- * Do not edit it manually.
4
- **/
5
- export declare enum ThemeVariable {
6
- red = "red",
7
- orange = "orange",
8
- green = "green",
9
- teal = "teal",
10
- yellow = "yellow",
11
- blue = "blue",
12
- darkBlue = "darkBlue",
13
- magenta = "magenta",
14
- violet = "violet",
15
- cyan = "cyan",
16
- darkCyan = "darkCyan",
17
- white = "white",
18
- bg = "bg",
19
- bgAlt = "bgAlt",
20
- bgAlt2 = "bgAlt2",
21
- fg = "fg",
22
- fgAlt = "fgAlt",
23
- base0 = "base0",
24
- base1 = "base1",
25
- base2 = "base2",
26
- base3 = "base3",
27
- base4 = "base4",
28
- base5 = "base5",
29
- base6 = "base6",
30
- base7 = "base7",
31
- base8 = "base8"
32
- }
33
- export declare enum CSSVariable {
34
- bg = "bg",
35
- fg = "fg",
36
- dur = "dur",
37
- easyTableHeaderBackgroundColor = "easyTableHeaderBackgroundColor",
38
- easyTableHeaderFontColor = "easyTableHeaderFontColor",
39
- easyTableBodyRowBackgroundColor = "easyTableBodyRowBackgroundColor",
40
- easyTableBodyRowFontColor = "easyTableBodyRowFontColor",
41
- easyTableBodyRowHoverBackgroundColor = "easyTableBodyRowHoverBackgroundColor",
42
- easyTableFooterBackgroundColor = "easyTableFooterBackgroundColor",
43
- easyTableFooterFontColor = "easyTableFooterFontColor",
44
- easyTableBodyRowHoverFontColor = "easyTableBodyRowHoverFontColor",
45
- easyTableRowBorder = "easyTableRowBorder",
46
- easyTableBorder = "easyTableBorder",
47
- easyTableMessageFontColor = "easyTableMessageFontColor",
48
- btnFlatSize = "btnFlatSize",
49
- btnFlatBorder = "btnFlatBorder",
50
- btnFlatBorderRadius = "btnFlatBorderRadius",
51
- btnFlatBoxShadow = "btnFlatBoxShadow",
52
- btnMainColor = "btnMainColor",
53
- btnSocialSize = "btnSocialSize",
54
- btnSocialBackground = "btnSocialBackground",
55
- checkboxColor = "checkboxColor",
56
- editorFontFamily = "editorFontFamily",
57
- flexGapMd = "flexGapMd",
58
- flexGapSm = "flexGapSm",
59
- inlineCodeBackground = "inlineCodeBackground",
60
- inlineCodeFontColor = "inlineCodeFontColor",
61
- scrollBarWidth = "scrollBarWidth",
62
- scrollBarColor = "scrollBarColor",
63
- fontSizeSm = "fontSizeSm",
64
- fontSizeMd = "fontSizeMd",
65
- fontSizeLg = "fontSizeLg",
66
- headlineMargin = "headlineMargin",
67
- paragraphFontSize = "paragraphFontSize",
68
- mainFontFamily = "mainFontFamily",
69
- editorFontFamilyMain = "editorFontFamilyMain",
70
- paragraphFontFamily = "paragraphFontFamily",
71
- headlineFontFamily = "headlineFontFamily",
72
- codeFontFamily = "codeFontFamily",
73
- descriptionFontFamily = "descriptionFontFamily",
74
- descriptionFontSize = "descriptionFontSize",
75
- descriptionFontStyle = "descriptionFontStyle",
76
- descriptionFontColor = "descriptionFontColor",
77
- descriptionPadding = "descriptionPadding",
78
- codeFontSize = "codeFontSize",
79
- headlineFontWeight = "headlineFontWeight",
80
- fontColorAction = "fontColorAction",
81
- fontSm = "fontSm",
82
- fontMd = "fontMd",
83
- fontLg = "fontLg",
84
- ulFontSize = "ulFontSize",
85
- ulLineHeight = "ulLineHeight",
86
- ulFontFamily = "ulFontFamily",
87
- topBarHeight = "topBarHeight",
88
- contentMaxWidth = "contentMaxWidth",
89
- modelineHeight = "modelineHeight",
90
- modelinePadding = "modelinePadding",
91
- modelineBackground = "modelineBackground",
92
- cardBackgroundColor = "cardBackgroundColor",
93
- shadowMain = "shadowMain",
94
- sidebarWidth = "sidebarWidth",
95
- actionPaneOpenedWidth = "actionPaneOpenedWidth",
96
- footerHeight = "footerHeight",
97
- publicPreviewImageWidth = "publicPreviewImageWidth",
98
- publicPreviewImageHeight = "publicPreviewImageHeight",
99
- publicPreviewMaxHeight = "publicPreviewMaxHeight",
100
- completionItemMinHeight = "completionItemMinHeight",
101
- completionItemPadding = "completionItemPadding",
102
- completionItemMargin = "completionItemMargin",
103
- completionItemHoverBackground = "completionItemHoverBackground",
104
- completionItemHoverColor = "completionItemHoverColor",
105
- completionFloatTop = "completionFloatTop",
106
- completionBorderRadius = "completionBorderRadius",
107
- completionWidth = "completionWidth",
108
- completionMaxWidth = "completionMaxWidth",
109
- completionBorder = "completionBorder",
110
- completionBoxShadow = "completionBoxShadow",
111
- completionInputHeight = "completionInputHeight",
112
- completionContainerMargin = "completionContainerMargin",
113
- menuPadding = "menuPadding",
114
- fileUploaderBorderWidth = "fileUploaderBorderWidth",
115
- fileUploaderBorderStyle = "fileUploaderBorderStyle",
116
- fileUploaderBorderColor = "fileUploaderBorderColor",
117
- fileUploaderBg = "fileUploaderBg",
118
- fileUploaderOpacity = "fileUploaderOpacity",
119
- notePreviewLinkMaxWidth = "notePreviewLinkMaxWidth",
120
- notePreviewLinkHeight = "notePreviewLinkHeight",
121
- btnActionShadow = "btnActionShadow",
122
- btnActionBorder = "btnActionBorder",
123
- btnActionBorderColor = "btnActionBorderColor",
124
- btnActionPadding = "btnActionPadding",
125
- btnActionRadius = "btnActionRadius",
126
- btnActionFireColor = "btnActionFireColor",
127
- btnActionFireBorderColor = "btnActionFireBorderColor",
128
- btnActionMd = "btnActionMd",
129
- btnActionSm = "btnActionSm",
130
- btnActionLg = "btnActionLg",
131
- btnActionColor = "btnActionColor",
132
- btnActionBg = "btnActionBg",
133
- miniBufferBackground = "miniBufferBackground",
134
- miniBufferFontColor = "miniBufferFontColor",
135
- miniBufferBorderTop = "miniBufferBorderTop",
136
- miniBufferMaxHeight = "miniBufferMaxHeight",
137
- tagHoverBackground = "tagHoverBackground",
138
- tagHoverColor = "tagHoverColor",
139
- toolbarBorderTop = "toolbarBorderTop",
140
- toolbarHoverColor = "toolbarHoverColor",
141
- headerbarHeight = "headerbarHeight",
142
- headerbarBorderRadius = "headerbarBorderRadius",
143
- headerbarBackgroundColor = "headerbarBackgroundColor",
144
- headerbarColor = "headerbarColor",
145
- headerbarBorder = "headerbarBorder",
146
- fileItemBgHover = "fileItemBgHover",
147
- fileItemColorHover = "fileItemColorHover",
148
- fileItemHeight = "fileItemHeight",
149
- iconBtnColor = "iconBtnColor",
150
- iconBtnHoverColor = "iconBtnHoverColor",
151
- modalMaxHeight = "modalMaxHeight",
152
- modalMaxWidth = "modalMaxWidth",
153
- modalPadding = "modalPadding",
154
- blockPaddingSm = "blockPaddingSm",
155
- blockPaddingMd = "blockPaddingMd",
156
- blockPaddingLg = "blockPaddingLg",
157
- blockMarginMd = "blockMarginMd",
158
- blockMarginSm = "blockMarginSm",
159
- blockBorderRadiusMd = "blockBorderRadiusMd",
160
- blockBorderRadiusSm = "blockBorderRadiusSm",
161
- itemDefaultRadius = "itemDefaultRadius",
162
- searchIcnSize = "searchIcnSize",
163
- gapMd = "gapMd",
164
- gapSm = "gapSm",
165
- gapXs = "gapXs",
166
- srcBlockHeaderPaddingY = "srcBlockHeaderPaddingY",
167
- srcBlockFooterPaddingY = "srcBlockFooterPaddingY",
168
- srcBlockPaddingX = "srcBlockPaddingX",
169
- srcBlockPaddingY = "srcBlockPaddingY",
170
- srcBlockMarginY = "srcBlockMarginY",
171
- pagePadding = "pagePadding",
172
- editorLineHeight = "editorLineHeight",
173
- editorHeadlineLineHeight = "editorHeadlineLineHeight",
174
- editorDefaultLineHeight = "editorDefaultLineHeight",
175
- editorPaddingBottom = "editorPaddingBottom",
176
- editorCursorColor = "editorCursorColor",
177
- editorSelectionBgColor = "editorSelectionBgColor",
178
- editorSelectionColor = "editorSelectionColor",
179
- editorGutterColor = "editorGutterColor",
180
- editorGutterHoverColor = "editorGutterHoverColor",
181
- editorFoldPlaceholderColor = "editorFoldPlaceholderColor",
182
- editorActiveLineBgColor = "editorActiveLineBgColor",
183
- editorCaretColor = "editorCaretColor",
184
- orgListItemBulletMarginLeft = "orgListItemBulletMarginLeft",
185
- devicePaddingBottom = "devicePaddingBottom",
186
- graphNodeColor = "graphNodeColor",
187
- graphEdgeColor = "graphEdgeColor",
188
- graphActiveColor = "graphActiveColor",
189
- inputHeight = "inputHeight",
190
- inputLgHeight = "inputLgHeight",
191
- borderMain = "borderMain"
192
- }
@@ -1,45 +0,0 @@
1
- import type { ChangeSpec } from '@codemirror/state';
2
- import type { EditorView } from 'codemirror';
3
- import type { NodeType, OrgNode } from 'org-mode-ast';
4
- export type EmbeddedWidget = {
5
- destroy: () => void;
6
- refresh?: (...args: unknown[]) => void;
7
- };
8
- export interface WidgetBuilderParams {
9
- wrap: HTMLElement;
10
- orgNode: OrgNode;
11
- rootNodeSrc: () => OrgNode;
12
- onUpdateFn?: (newVal: string) => void;
13
- editorView: EditorView;
14
- readonly?: boolean;
15
- }
16
- export type WidgetBuilder = (params: WidgetBuilderParams) => EmbeddedWidget;
17
- export interface CommonEmbeddedWidget {
18
- satisfied?: (orgNode: OrgNode) => boolean;
19
- widgetBuilder?: WidgetBuilder;
20
- viewUpdater?: (orgNode: OrgNode, newVal: string) => ViewUpdateSchema;
21
- ignoreEvent?: boolean;
22
- showRangeOffset?: [number, number];
23
- }
24
- export interface MultilineEmbeddedWidget extends CommonEmbeddedWidget {
25
- widgetBuilder: WidgetBuilder;
26
- suppressEdit?: boolean;
27
- }
28
- export type MultilineEmbeddedWidgets = {
29
- [key in NodeType]?: MultilineEmbeddedWidget;
30
- };
31
- export type ViewUpdateSchema = ChangeSpec;
32
- export interface InlineEmbeddedWidget extends CommonEmbeddedWidget {
33
- classBuilder?: (orgNode: OrgNode) => string;
34
- decorationType: 'mark' | 'widget' | 'replace' | 'line';
35
- ignoreEditing?: boolean;
36
- side?: number;
37
- wrapComponent?: string;
38
- inclusive?: boolean;
39
- }
40
- export type InlineEmbeddedWidgets = {
41
- [key in NodeType]?: InlineEmbeddedWidget;
42
- };
43
- export type EmbeddedWidgetBuilder = (wrap: HTMLElement, dynamicProps?: {
44
- [key: string]: unknown;
45
- }) => EmbeddedWidget;
File without changes