orgnote-api 0.20.2 → 0.40.0
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/api.d.ts +93 -98
- package/constants/{command-groups.contant.d.ts → command-groups.d.ts} +2 -1
- package/constants/{command-groups.contant.js → command-groups.js} +2 -0
- package/constants/extension-errors.d.ts +9 -0
- package/constants/extension-errors.js +18 -0
- package/constants/file-guard-errors.d.ts +8 -0
- package/constants/file-guard-errors.js +18 -0
- package/constants/git-errors.d.ts +9 -0
- package/constants/git-errors.js +18 -0
- package/constants/i18n-keys.d.ts +371 -0
- package/constants/i18n-keys.js +158 -0
- package/constants/index.d.ts +9 -1
- package/constants/index.js +9 -1
- package/constants/oauth-providers.d.ts +1 -0
- package/constants/oauth-providers.js +1 -0
- package/constants/route-names.d.ts +36 -0
- package/constants/route-names.js +37 -0
- package/constants/route-paths.d.ts +5 -0
- package/constants/route-paths.js +4 -0
- package/constants/style-sizes.d.ts +1 -0
- package/constants/style-sizes.js +1 -0
- package/encryption/__tests__/encryption.spec.js +4 -5
- package/encryption/__tests__/note-encryption.spec.js +46 -348
- package/encryption/encryption.d.ts +9 -4
- package/encryption/encryption.js +25 -5
- package/encryption/note-encryption.d.ts +1 -1
- package/encryption/note-encryption.js +6 -6
- package/files-api.d.ts +0 -1
- package/index.d.ts +4 -1
- package/index.js +4 -1
- package/mappers/orgnode-to-note.d.ts +2 -2
- package/mappers/orgnode-to-note.js +3 -2
- package/models/auth-store.d.ts +3 -3
- package/models/buffer-store.d.ts +14 -0
- package/models/buffer.d.ts +24 -0
- package/models/colors.d.ts +1 -0
- package/models/command.d.ts +13 -8
- package/models/commands-group-store.d.ts +11 -0
- package/models/commands-store.d.ts +13 -0
- package/models/completion-store.d.ts +14 -0
- package/models/completion.d.ts +16 -7
- package/models/config-store.d.ts +9 -0
- package/models/confirmation-modal.d.ts +11 -0
- package/models/context-menu-store.d.ts +10 -0
- package/models/cron-store.d.ts +21 -0
- package/models/cron-task.d.ts +30 -0
- package/models/css-utils.d.ts +17 -0
- package/models/default-commands.d.ts +52 -3
- package/models/default-commands.js +59 -2
- package/models/encryption-store.d.ts +10 -0
- package/models/encryption-store.js +1 -0
- package/models/encryption.d.ts +54 -11
- package/models/encryption.js +28 -1
- package/models/extension-registry-store.d.ts +9 -0
- package/models/extension-registry-store.js +1 -0
- package/models/extension-store.d.ts +18 -0
- package/models/extension-store.js +1 -0
- package/models/extension.d.ts +96 -24
- package/models/extension.js +88 -1
- package/models/file-guard-store.d.ts +14 -0
- package/models/file-guard-store.js +1 -0
- package/models/file-guard.d.ts +27 -0
- package/models/file-guard.js +1 -0
- package/models/{file-cache.d.ts → file-info.d.ts} +1 -1
- package/models/file-info.js +1 -0
- package/models/file-manager-store.d.ts +10 -12
- package/models/file-opener-store.d.ts +6 -4
- package/models/file-system-manager-store.d.ts +13 -0
- package/models/file-system-manager-store.js +1 -0
- package/models/file-system-store.d.ts +19 -0
- package/models/file-system-store.js +1 -0
- package/models/file-system.d.ts +32 -5
- package/models/file-system.js +2 -0
- package/models/file-upload.d.ts +6 -0
- package/models/file-upload.js +1 -0
- package/models/file-watcher-store.d.ts +18 -0
- package/models/file-watcher-store.js +1 -0
- package/models/files-store.d.ts +2 -2
- package/models/git-store.d.ts +12 -0
- package/models/git-store.js +1 -0
- package/models/git.d.ts +47 -0
- package/models/git.js +1 -0
- package/models/i18n-keys.d.ts +2 -0
- package/models/i18n-keys.js +1 -0
- package/models/index.d.ts +56 -2
- package/models/index.js +59 -2
- package/models/layout-snapshot-repository.d.ts +14 -0
- package/models/layout-snapshot-repository.js +1 -0
- package/models/layout-store.d.ts +17 -0
- package/models/layout-store.js +1 -0
- package/models/layout.d.ts +16 -0
- package/models/layout.js +1 -0
- package/models/log-repository.d.ts +17 -0
- package/models/log-repository.js +1 -0
- package/models/log-store.d.ts +15 -0
- package/models/log-store.js +1 -0
- package/models/log.d.ts +12 -0
- package/models/log.js +1 -0
- package/models/logger.d.ts +8 -0
- package/models/logger.js +1 -0
- package/models/menu-action.d.ts +18 -0
- package/models/menu-action.js +1 -0
- package/models/modal-store.d.ts +16 -0
- package/models/modal-store.js +1 -0
- package/models/modal.d.ts +10 -2
- package/models/note.d.ts +30 -13
- package/models/notification-config.d.ts +14 -0
- package/models/notification-config.js +1 -0
- package/models/notifications-store.d.ts +20 -0
- package/models/notifications-store.js +1 -0
- package/models/oauth-provider.d.ts +2 -1
- package/models/orgnote-config.d.ts +80 -0
- package/models/orgnote-config.js +42 -0
- package/models/orgnote-url.d.ts +6 -0
- package/models/orgnote-url.js +1 -0
- package/models/pane-snapshot-repository.d.ts +0 -0
- package/models/pane-snapshot-repository.js +0 -0
- package/models/pane.d.ts +38 -0
- package/models/pane.js +1 -0
- package/models/panes-store.d.ts +30 -0
- package/models/panes-store.js +1 -0
- package/models/platform-detection.d.ts +11 -0
- package/models/platform-detection.js +1 -0
- package/models/platform-specific.d.ts +1 -0
- package/models/platform-specific.js +1 -0
- package/models/platform.d.ts +2 -0
- package/models/platform.js +1 -0
- package/models/queue-store.d.ts +49 -0
- package/models/queue-store.js +1 -0
- package/models/queue-task.d.ts +15 -0
- package/models/queue-task.js +1 -0
- package/models/repositories.d.ts +58 -38
- package/models/screen-detection.d.ts +10 -0
- package/models/screen-detection.js +1 -0
- package/models/settings-store.d.ts +12 -0
- package/models/settings-store.js +1 -0
- package/models/settings-ui-store.d.ts +7 -0
- package/models/settings-ui-store.js +1 -0
- package/models/sidebar-store.d.ts +22 -0
- package/models/sidebar-store.js +1 -0
- package/models/splash-screen.d.ts +13 -0
- package/models/splash-screen.js +1 -0
- package/models/store.d.ts +1 -1
- package/models/style-size.d.ts +2 -0
- package/models/style-size.js +1 -0
- package/models/style-variant.d.ts +1 -0
- package/models/style-variant.js +1 -0
- package/models/sync-store.d.ts +8 -6
- package/models/sync.d.ts +0 -5
- package/models/system-info.d.ts +47 -0
- package/models/system-info.js +1 -0
- package/models/theme-store.d.ts +16 -0
- package/models/theme-store.js +1 -0
- package/models/theme-variables.d.ts +4 -189
- package/models/theme-variables.js +2 -191
- package/models/toolbar-store.d.ts +9 -0
- package/models/toolbar-store.js +1 -0
- package/models/ui-store.d.ts +6 -0
- package/models/ui-store.js +1 -0
- package/models/user.d.ts +3 -4
- package/models/vue-component.d.ts +4 -2
- package/package-lock.json +5553 -0
- package/package.json +37 -26
- package/remote-api/api.d.ts +288 -669
- package/remote-api/api.js +199 -485
- package/remote-api/base.js +1 -1
- package/remote-api/common.d.ts +1 -1
- package/sync/__tests__/memory-state.spec.d.ts +1 -0
- package/sync/__tests__/memory-state.spec.js +49 -0
- package/sync/__tests__/plan.spec.d.ts +1 -0
- package/sync/__tests__/plan.spec.js +116 -0
- package/sync/create-sync-plan.d.ts +2 -0
- package/sync/create-sync-plan.js +13 -0
- package/sync/fetch.d.ts +8 -0
- package/sync/fetch.js +32 -0
- package/sync/index.d.ts +10 -0
- package/sync/index.js +9 -0
- package/sync/memory-state.d.ts +2 -0
- package/sync/memory-state.js +22 -0
- package/sync/operations/conflict.d.ts +10 -0
- package/sync/operations/conflict.js +56 -0
- package/sync/operations/delete-local.d.ts +2 -0
- package/sync/operations/delete-local.js +17 -0
- package/sync/operations/delete-remote.d.ts +2 -0
- package/sync/operations/delete-remote.js +26 -0
- package/sync/operations/download.d.ts +2 -0
- package/sync/operations/download.js +20 -0
- package/sync/operations/index.d.ts +5 -0
- package/sync/operations/index.js +5 -0
- package/sync/operations/synced-file.d.ts +14 -0
- package/sync/operations/synced-file.js +5 -0
- package/sync/operations/upload.d.ts +2 -0
- package/sync/operations/upload.js +30 -0
- package/sync/plan.d.ts +9 -0
- package/sync/plan.js +57 -0
- package/sync/recovery.d.ts +2 -0
- package/sync/recovery.js +6 -0
- package/sync/scan.d.ts +4 -0
- package/sync/scan.js +40 -0
- package/sync/types.d.ts +74 -0
- package/sync/types.js +7 -0
- package/sync/utils/__tests__/oldest-synced-at.spec.d.ts +1 -0
- package/sync/utils/__tests__/oldest-synced-at.spec.js +38 -0
- package/sync/utils/oldest-synced-at.d.ts +2 -0
- package/sync/utils/oldest-synced-at.js +9 -0
- package/types/index.d.ts +0 -0
- package/types/index.js +0 -0
- package/utils/__tests__/find-files-diff.spec.d.ts +1 -0
- package/{tools → utils}/__tests__/find-files-diff.spec.js +3 -3
- package/utils/__tests__/find-note-files-diff.spec.d.ts +1 -0
- package/{tools → utils}/__tests__/find-note-files-diff.spec.js +5 -5
- package/utils/__tests__/get-file-name.spec.d.ts +1 -0
- package/utils/__tests__/get-string-path.spec.d.ts +1 -0
- package/utils/__tests__/is-gpg-encrypted.spec.d.ts +1 -0
- package/utils/__tests__/is-org-file.spec.d.ts +1 -0
- package/utils/__tests__/join.spec.d.ts +1 -0
- package/utils/__tests__/join.spec.js +32 -0
- package/utils/__tests__/nullable-guards.spec.d.ts +1 -0
- package/utils/__tests__/nullable-guards.spec.js +44 -0
- package/utils/__tests__/parent-folder.spec.d.ts +1 -0
- package/utils/__tests__/read-org-files-recursively.spec.d.ts +1 -0
- package/utils/__tests__/split-path.spec.d.ts +1 -0
- package/utils/__tests__/to-absolute-path.spec.d.ts +1 -0
- package/utils/__tests__/to-absolute-path.spec.js +26 -0
- package/utils/__tests__/to-error.spec.d.ts +1 -0
- package/utils/__tests__/to-error.spec.js +112 -0
- package/utils/__tests__/with-root.spec.d.ts +1 -0
- package/utils/__tests__/with-root.spec.js +20 -0
- package/{tools → utils}/find-notes-files-diff.js +6 -3
- package/{tools → utils}/index.d.ts +4 -1
- package/{tools → utils}/index.js +4 -1
- package/utils/join-path.d.ts +1 -0
- package/utils/join-path.js +13 -0
- package/utils/nullable-guards.d.ts +2 -0
- package/utils/nullable-guards.js +6 -0
- package/utils/to-absolute-path.d.ts +2 -0
- package/utils/to-absolute-path.js +2 -0
- package/utils/to-error.d.ts +6 -0
- package/utils/to-error.js +33 -0
- package/utils/toml.d.ts +3 -0
- package/utils/toml.js +31 -0
- package/utils/with-root.d.ts +1 -0
- package/utils/with-root.js +6 -0
- package/websocket/client.d.ts +24 -0
- package/websocket/client.js +83 -0
- package/models/file-tree.d.ts +0 -12
- package/tools/__tests__/join.spec.js +0 -24
- package/tools/join-path.d.ts +0 -1
- package/tools/join-path.js +0 -7
- package/tools/mock-server.d.ts +0 -1
- package/tools/mock-server.js +0 -12
- /package/models/{file-cache.js → buffer-store.js} +0 -0
- /package/models/{file-tree.js → buffer.js} +0 -0
- /package/{tools/__tests__/find-files-diff.spec.d.ts → models/colors.js} +0 -0
- /package/{tools/__tests__/find-note-files-diff.spec.d.ts → models/commands-group-store.js} +0 -0
- /package/{tools/__tests__/get-file-name.spec.d.ts → models/commands-store.js} +0 -0
- /package/{tools/__tests__/get-string-path.spec.d.ts → models/completion-store.js} +0 -0
- /package/{tools/__tests__/is-gpg-encrypted.spec.d.ts → models/config-store.js} +0 -0
- /package/{tools/__tests__/is-org-file.spec.d.ts → models/confirmation-modal.js} +0 -0
- /package/{tools/__tests__/join.spec.d.ts → models/context-menu-store.js} +0 -0
- /package/{tools/__tests__/parent-folder.spec.d.ts → models/cron-store.js} +0 -0
- /package/{tools/__tests__/read-org-files-recursively.spec.d.ts → models/cron-task.js} +0 -0
- /package/{tools/__tests__/split-path.spec.d.ts → models/css-utils.js} +0 -0
- /package/{tools → utils}/__tests__/get-file-name.spec.js +0 -0
- /package/{tools → utils}/__tests__/get-string-path.spec.js +0 -0
- /package/{tools → utils}/__tests__/is-gpg-encrypted.spec.js +0 -0
- /package/{tools → utils}/__tests__/is-org-file.spec.js +0 -0
- /package/{tools → utils}/__tests__/parent-folder.spec.js +0 -0
- /package/{tools → utils}/__tests__/read-org-files-recursively.spec.js +0 -0
- /package/{tools → utils}/__tests__/split-path.spec.js +0 -0
- /package/{tools → utils}/find-notes-files-diff.d.ts +0 -0
- /package/{tools → utils}/get-file-name.d.ts +0 -0
- /package/{tools → utils}/get-file-name.js +0 -0
- /package/{tools → utils}/get-parent-dir.d.ts +0 -0
- /package/{tools → utils}/get-parent-dir.js +0 -0
- /package/{tools → utils}/get-string-path.d.ts +0 -0
- /package/{tools → utils}/get-string-path.js +0 -0
- /package/{tools → utils}/is-gpg-encrypted.d.ts +0 -0
- /package/{tools → utils}/is-gpg-encrypted.js +0 -0
- /package/{tools → utils}/is-org-file.d.ts +0 -0
- /package/{tools → utils}/is-org-file.js +0 -0
- /package/{tools → utils}/split-path.d.ts +0 -0
- /package/{tools → utils}/split-path.js +0 -0
package/remote-api/api.js
CHANGED
|
@@ -17,26 +17,6 @@ import globalAxios from 'axios';
|
|
|
17
17
|
import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from "./common.js";
|
|
18
18
|
// @ts-ignore
|
|
19
19
|
import { BASE_PATH, BaseAPI, operationServerMap } from "./base.js";
|
|
20
|
-
export const HandlersCreatingNoteEncryptionTypeEnum = {
|
|
21
|
-
GpgKeys: 'gpgKeys',
|
|
22
|
-
GpgPassword: 'gpgPassword',
|
|
23
|
-
Disabled: 'disabled'
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @export
|
|
28
|
-
* @enum {string}
|
|
29
|
-
*/
|
|
30
|
-
export const ModelsCategory = {
|
|
31
|
-
CategoryArticle: 'article',
|
|
32
|
-
CategoryBook: 'book',
|
|
33
|
-
CategorySchedule: 'schedule'
|
|
34
|
-
};
|
|
35
|
-
export const ModelsPublicNoteEncryptionTypeEnum = {
|
|
36
|
-
GpgKeys: 'gpgKeys',
|
|
37
|
-
GpgPassword: 'gpgPassword',
|
|
38
|
-
Disabled: 'disabled'
|
|
39
|
-
};
|
|
40
20
|
/**
|
|
41
21
|
* AuthApi - axios parameter creator
|
|
42
22
|
* @export
|
|
@@ -612,36 +592,35 @@ export class AuthApi extends BaseAPI {
|
|
|
612
592
|
}
|
|
613
593
|
}
|
|
614
594
|
/**
|
|
615
|
-
*
|
|
595
|
+
* EventsApi - axios parameter creator
|
|
616
596
|
* @export
|
|
617
597
|
*/
|
|
618
|
-
export const
|
|
598
|
+
export const EventsApiAxiosParamCreator = function (configuration) {
|
|
619
599
|
return {
|
|
620
600
|
/**
|
|
621
|
-
*
|
|
622
|
-
* @summary
|
|
623
|
-
* @param {
|
|
601
|
+
* Generic WebSocket endpoint for real-time user events (sync, notifications, etc). Requires `Upgrade: websocket` header.
|
|
602
|
+
* @summary WebSocket Events Channel
|
|
603
|
+
* @param {string} [token] Auth token (alternative to Authorization header)
|
|
624
604
|
* @param {*} [options] Override http request option.
|
|
625
605
|
* @throws {RequiredError}
|
|
626
606
|
*/
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
assertParamExists('filesUploadPost', 'filesUploadPostRequest', filesUploadPostRequest);
|
|
630
|
-
const localVarPath = `/files/upload`;
|
|
607
|
+
wsV1EventsGet: async (token, options = {}) => {
|
|
608
|
+
const localVarPath = `/ws/v1/events`;
|
|
631
609
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
632
610
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
633
611
|
let baseOptions;
|
|
634
612
|
if (configuration) {
|
|
635
613
|
baseOptions = configuration.baseOptions;
|
|
636
614
|
}
|
|
637
|
-
const localVarRequestOptions = { method: '
|
|
615
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
638
616
|
const localVarHeaderParameter = {};
|
|
639
617
|
const localVarQueryParameter = {};
|
|
640
|
-
|
|
618
|
+
if (token !== undefined) {
|
|
619
|
+
localVarQueryParameter['token'] = token;
|
|
620
|
+
}
|
|
641
621
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
642
622
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
643
623
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
644
|
-
localVarRequestOptions.data = serializeDataIfNeeded(filesUploadPostRequest, localVarRequestOptions, configuration);
|
|
645
624
|
return {
|
|
646
625
|
url: toPathString(localVarUrlObj),
|
|
647
626
|
options: localVarRequestOptions,
|
|
@@ -650,200 +629,134 @@ export const FilesApiAxiosParamCreator = function (configuration) {
|
|
|
650
629
|
};
|
|
651
630
|
};
|
|
652
631
|
/**
|
|
653
|
-
*
|
|
632
|
+
* EventsApi - functional programming interface
|
|
654
633
|
* @export
|
|
655
634
|
*/
|
|
656
|
-
export const
|
|
657
|
-
const localVarAxiosParamCreator =
|
|
635
|
+
export const EventsApiFp = function (configuration) {
|
|
636
|
+
const localVarAxiosParamCreator = EventsApiAxiosParamCreator(configuration);
|
|
658
637
|
return {
|
|
659
638
|
/**
|
|
660
|
-
*
|
|
661
|
-
* @summary
|
|
662
|
-
* @param {
|
|
639
|
+
* Generic WebSocket endpoint for real-time user events (sync, notifications, etc). Requires `Upgrade: websocket` header.
|
|
640
|
+
* @summary WebSocket Events Channel
|
|
641
|
+
* @param {string} [token] Auth token (alternative to Authorization header)
|
|
663
642
|
* @param {*} [options] Override http request option.
|
|
664
643
|
* @throws {RequiredError}
|
|
665
644
|
*/
|
|
666
|
-
async
|
|
667
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
645
|
+
async wsV1EventsGet(token, options) {
|
|
646
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.wsV1EventsGet(token, options);
|
|
668
647
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
669
|
-
const localVarOperationServerBasePath = operationServerMap['
|
|
648
|
+
const localVarOperationServerBasePath = operationServerMap['EventsApi.wsV1EventsGet']?.[localVarOperationServerIndex]?.url;
|
|
670
649
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
671
650
|
},
|
|
672
651
|
};
|
|
673
652
|
};
|
|
674
653
|
/**
|
|
675
|
-
*
|
|
654
|
+
* EventsApi - factory interface
|
|
676
655
|
* @export
|
|
677
656
|
*/
|
|
678
|
-
export const
|
|
679
|
-
const localVarFp =
|
|
657
|
+
export const EventsApiFactory = function (configuration, basePath, axios) {
|
|
658
|
+
const localVarFp = EventsApiFp(configuration);
|
|
680
659
|
return {
|
|
681
660
|
/**
|
|
682
|
-
*
|
|
683
|
-
* @summary
|
|
684
|
-
* @param {
|
|
661
|
+
* Generic WebSocket endpoint for real-time user events (sync, notifications, etc). Requires `Upgrade: websocket` header.
|
|
662
|
+
* @summary WebSocket Events Channel
|
|
663
|
+
* @param {string} [token] Auth token (alternative to Authorization header)
|
|
685
664
|
* @param {*} [options] Override http request option.
|
|
686
665
|
* @throws {RequiredError}
|
|
687
666
|
*/
|
|
688
|
-
|
|
689
|
-
return localVarFp.
|
|
667
|
+
wsV1EventsGet(token, options) {
|
|
668
|
+
return localVarFp.wsV1EventsGet(token, options).then((request) => request(axios, basePath));
|
|
690
669
|
},
|
|
691
670
|
};
|
|
692
671
|
};
|
|
693
672
|
/**
|
|
694
|
-
*
|
|
673
|
+
* EventsApi - object-oriented interface
|
|
695
674
|
* @export
|
|
696
|
-
* @class
|
|
675
|
+
* @class EventsApi
|
|
697
676
|
* @extends {BaseAPI}
|
|
698
677
|
*/
|
|
699
|
-
export class
|
|
678
|
+
export class EventsApi extends BaseAPI {
|
|
700
679
|
/**
|
|
701
|
-
*
|
|
702
|
-
* @summary
|
|
703
|
-
* @param {
|
|
680
|
+
* Generic WebSocket endpoint for real-time user events (sync, notifications, etc). Requires `Upgrade: websocket` header.
|
|
681
|
+
* @summary WebSocket Events Channel
|
|
682
|
+
* @param {string} [token] Auth token (alternative to Authorization header)
|
|
704
683
|
* @param {*} [options] Override http request option.
|
|
705
684
|
* @throws {RequiredError}
|
|
706
|
-
* @memberof
|
|
685
|
+
* @memberof EventsApi
|
|
707
686
|
*/
|
|
708
|
-
|
|
709
|
-
return
|
|
687
|
+
wsV1EventsGet(token, options) {
|
|
688
|
+
return EventsApiFp(this.configuration).wsV1EventsGet(token, options).then((request) => request(this.axios, this.basePath));
|
|
710
689
|
}
|
|
711
690
|
}
|
|
712
691
|
/**
|
|
713
|
-
*
|
|
692
|
+
* SyncApi - axios parameter creator
|
|
714
693
|
* @export
|
|
715
694
|
*/
|
|
716
|
-
export const
|
|
695
|
+
export const SyncApiAxiosParamCreator = function (configuration) {
|
|
717
696
|
return {
|
|
718
697
|
/**
|
|
719
|
-
*
|
|
720
|
-
* @summary
|
|
698
|
+
* Returns file changes since the specified timestamp
|
|
699
|
+
* @summary Get file changes
|
|
700
|
+
* @param {number} [since] Unix timestamp in milliseconds for incremental sync
|
|
701
|
+
* @param {number} [limit] Maximum number of changes to return (default: 100, max: 500)
|
|
702
|
+
* @param {string} [cursor] Pagination cursor
|
|
721
703
|
* @param {*} [options] Override http request option.
|
|
722
704
|
* @throws {RequiredError}
|
|
723
705
|
*/
|
|
724
|
-
|
|
725
|
-
const localVarPath = `/
|
|
706
|
+
syncChangesGet: async (since, limit, cursor, options = {}) => {
|
|
707
|
+
const localVarPath = `/sync/changes`;
|
|
726
708
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
727
709
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
728
710
|
let baseOptions;
|
|
729
711
|
if (configuration) {
|
|
730
712
|
baseOptions = configuration.baseOptions;
|
|
731
713
|
}
|
|
732
|
-
const localVarRequestOptions = { method: '
|
|
714
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
733
715
|
const localVarHeaderParameter = {};
|
|
734
716
|
const localVarQueryParameter = {};
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
738
|
-
return {
|
|
739
|
-
url: toPathString(localVarUrlObj),
|
|
740
|
-
options: localVarRequestOptions,
|
|
741
|
-
};
|
|
742
|
-
},
|
|
743
|
-
/**
|
|
744
|
-
* Bulk update or insert notes
|
|
745
|
-
* @summary Upsert notes
|
|
746
|
-
* @param {Array<HandlersCreatingNote>} notes List of crated notes
|
|
747
|
-
* @param {*} [options] Override http request option.
|
|
748
|
-
* @throws {RequiredError}
|
|
749
|
-
*/
|
|
750
|
-
notesBulkUpsertPut: async (notes, options = {}) => {
|
|
751
|
-
// verify required parameter 'notes' is not null or undefined
|
|
752
|
-
assertParamExists('notesBulkUpsertPut', 'notes', notes);
|
|
753
|
-
const localVarPath = `/notes/bulk-upsert`;
|
|
754
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
755
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
756
|
-
let baseOptions;
|
|
757
|
-
if (configuration) {
|
|
758
|
-
baseOptions = configuration.baseOptions;
|
|
717
|
+
if (since !== undefined) {
|
|
718
|
+
localVarQueryParameter['since'] = since;
|
|
759
719
|
}
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
766
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
767
|
-
localVarRequestOptions.data = serializeDataIfNeeded(notes, localVarRequestOptions, configuration);
|
|
768
|
-
return {
|
|
769
|
-
url: toPathString(localVarUrlObj),
|
|
770
|
-
options: localVarRequestOptions,
|
|
771
|
-
};
|
|
772
|
-
},
|
|
773
|
-
/**
|
|
774
|
-
* Mark notes as deleted by provided list of ids
|
|
775
|
-
* @summary Delete notes
|
|
776
|
-
* @param {Array<string>} ids List of ids of deleted notes
|
|
777
|
-
* @param {*} [options] Override http request option.
|
|
778
|
-
* @throws {RequiredError}
|
|
779
|
-
*/
|
|
780
|
-
notesDelete: async (ids, options = {}) => {
|
|
781
|
-
// verify required parameter 'ids' is not null or undefined
|
|
782
|
-
assertParamExists('notesDelete', 'ids', ids);
|
|
783
|
-
const localVarPath = `/notes`;
|
|
784
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
785
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
786
|
-
let baseOptions;
|
|
787
|
-
if (configuration) {
|
|
788
|
-
baseOptions = configuration.baseOptions;
|
|
720
|
+
if (limit !== undefined) {
|
|
721
|
+
localVarQueryParameter['limit'] = limit;
|
|
722
|
+
}
|
|
723
|
+
if (cursor !== undefined) {
|
|
724
|
+
localVarQueryParameter['cursor'] = cursor;
|
|
789
725
|
}
|
|
790
|
-
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
|
|
791
|
-
const localVarHeaderParameter = {};
|
|
792
|
-
const localVarQueryParameter = {};
|
|
793
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
794
726
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
795
727
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
796
728
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
797
|
-
localVarRequestOptions.data = serializeDataIfNeeded(ids, localVarRequestOptions, configuration);
|
|
798
729
|
return {
|
|
799
730
|
url: toPathString(localVarUrlObj),
|
|
800
731
|
options: localVarRequestOptions,
|
|
801
732
|
};
|
|
802
733
|
},
|
|
803
734
|
/**
|
|
804
|
-
*
|
|
805
|
-
* @summary
|
|
806
|
-
* @param {
|
|
807
|
-
* @param {number} [
|
|
808
|
-
* @param {string} [userId] User id of which notes to load
|
|
809
|
-
* @param {string} [searchText]
|
|
810
|
-
* @param {boolean} [my] Load all my own notes (user will be used from provided token)
|
|
811
|
-
* @param {string} [from]
|
|
812
|
-
* @param {boolean} [includeDeleted]
|
|
735
|
+
* Soft delete a file (creates tombstone for sync)
|
|
736
|
+
* @summary Delete a file
|
|
737
|
+
* @param {string} path File path
|
|
738
|
+
* @param {number} [version] Expected version for optimistic locking
|
|
813
739
|
* @param {*} [options] Override http request option.
|
|
814
740
|
* @throws {RequiredError}
|
|
815
741
|
*/
|
|
816
|
-
|
|
817
|
-
|
|
742
|
+
syncFilesDelete: async (path, version, options = {}) => {
|
|
743
|
+
// verify required parameter 'path' is not null or undefined
|
|
744
|
+
assertParamExists('syncFilesDelete', 'path', path);
|
|
745
|
+
const localVarPath = `/sync/files`;
|
|
818
746
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
819
747
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
820
748
|
let baseOptions;
|
|
821
749
|
if (configuration) {
|
|
822
750
|
baseOptions = configuration.baseOptions;
|
|
823
751
|
}
|
|
824
|
-
const localVarRequestOptions = { method: '
|
|
752
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
|
|
825
753
|
const localVarHeaderParameter = {};
|
|
826
754
|
const localVarQueryParameter = {};
|
|
827
|
-
if (
|
|
828
|
-
localVarQueryParameter['
|
|
829
|
-
}
|
|
830
|
-
if (offset !== undefined) {
|
|
831
|
-
localVarQueryParameter['offset'] = offset;
|
|
832
|
-
}
|
|
833
|
-
if (userId !== undefined) {
|
|
834
|
-
localVarQueryParameter['userId'] = userId;
|
|
835
|
-
}
|
|
836
|
-
if (searchText !== undefined) {
|
|
837
|
-
localVarQueryParameter['searchText'] = searchText;
|
|
838
|
-
}
|
|
839
|
-
if (my !== undefined) {
|
|
840
|
-
localVarQueryParameter['my'] = my;
|
|
755
|
+
if (path !== undefined) {
|
|
756
|
+
localVarQueryParameter['path'] = path;
|
|
841
757
|
}
|
|
842
|
-
if (
|
|
843
|
-
localVarQueryParameter['
|
|
844
|
-
}
|
|
845
|
-
if (includeDeleted !== undefined) {
|
|
846
|
-
localVarQueryParameter['includeDeleted'] = includeDeleted;
|
|
758
|
+
if (version !== undefined) {
|
|
759
|
+
localVarQueryParameter['version'] = version;
|
|
847
760
|
}
|
|
848
761
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
849
762
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -854,17 +767,16 @@ export const NotesApiAxiosParamCreator = function (configuration) {
|
|
|
854
767
|
};
|
|
855
768
|
},
|
|
856
769
|
/**
|
|
857
|
-
*
|
|
858
|
-
* @summary
|
|
859
|
-
* @param {string}
|
|
770
|
+
* Download file content by path
|
|
771
|
+
* @summary Download a file
|
|
772
|
+
* @param {string} path File path
|
|
860
773
|
* @param {*} [options] Override http request option.
|
|
861
774
|
* @throws {RequiredError}
|
|
862
775
|
*/
|
|
863
|
-
|
|
864
|
-
// verify required parameter '
|
|
865
|
-
assertParamExists('
|
|
866
|
-
const localVarPath = `/
|
|
867
|
-
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
776
|
+
syncFilesGet: async (path, options = {}) => {
|
|
777
|
+
// verify required parameter 'path' is not null or undefined
|
|
778
|
+
assertParamExists('syncFilesGet', 'path', path);
|
|
779
|
+
const localVarPath = `/sync/files`;
|
|
868
780
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
869
781
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
870
782
|
let baseOptions;
|
|
@@ -874,69 +786,60 @@ export const NotesApiAxiosParamCreator = function (configuration) {
|
|
|
874
786
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
875
787
|
const localVarHeaderParameter = {};
|
|
876
788
|
const localVarQueryParameter = {};
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
880
|
-
return {
|
|
881
|
-
url: toPathString(localVarUrlObj),
|
|
882
|
-
options: localVarRequestOptions,
|
|
883
|
-
};
|
|
884
|
-
},
|
|
885
|
-
/**
|
|
886
|
-
* Create note
|
|
887
|
-
* @summary Create note
|
|
888
|
-
* @param {HandlersCreatingNote} note Note model
|
|
889
|
-
* @param {*} [options] Override http request option.
|
|
890
|
-
* @throws {RequiredError}
|
|
891
|
-
*/
|
|
892
|
-
notesPost: async (note, options = {}) => {
|
|
893
|
-
// verify required parameter 'note' is not null or undefined
|
|
894
|
-
assertParamExists('notesPost', 'note', note);
|
|
895
|
-
const localVarPath = `/notes/`;
|
|
896
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
897
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
898
|
-
let baseOptions;
|
|
899
|
-
if (configuration) {
|
|
900
|
-
baseOptions = configuration.baseOptions;
|
|
789
|
+
if (path !== undefined) {
|
|
790
|
+
localVarQueryParameter['path'] = path;
|
|
901
791
|
}
|
|
902
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
903
|
-
const localVarHeaderParameter = {};
|
|
904
|
-
const localVarQueryParameter = {};
|
|
905
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
906
792
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
907
793
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
908
794
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
909
|
-
localVarRequestOptions.data = serializeDataIfNeeded(note, localVarRequestOptions, configuration);
|
|
910
795
|
return {
|
|
911
796
|
url: toPathString(localVarUrlObj),
|
|
912
797
|
options: localVarRequestOptions,
|
|
913
798
|
};
|
|
914
799
|
},
|
|
915
800
|
/**
|
|
916
|
-
*
|
|
917
|
-
* @summary
|
|
918
|
-
* @param {
|
|
801
|
+
* Upload a file to sync storage with content-addressable deduplication
|
|
802
|
+
* @summary Upload a file
|
|
803
|
+
* @param {string} filePath Relative file path
|
|
804
|
+
* @param {File} file File content
|
|
805
|
+
* @param {string} [xContentHash] SHA-256 hash for verification
|
|
806
|
+
* @param {number} [expectedVersion] Expected version for optimistic locking
|
|
919
807
|
* @param {*} [options] Override http request option.
|
|
920
808
|
* @throws {RequiredError}
|
|
921
809
|
*/
|
|
922
|
-
|
|
923
|
-
// verify required parameter '
|
|
924
|
-
assertParamExists('
|
|
925
|
-
|
|
810
|
+
syncFilesPut: async (filePath, file, xContentHash, expectedVersion, options = {}) => {
|
|
811
|
+
// verify required parameter 'filePath' is not null or undefined
|
|
812
|
+
assertParamExists('syncFilesPut', 'filePath', filePath);
|
|
813
|
+
// verify required parameter 'file' is not null or undefined
|
|
814
|
+
assertParamExists('syncFilesPut', 'file', file);
|
|
815
|
+
const localVarPath = `/sync/files`;
|
|
926
816
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
927
817
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
928
818
|
let baseOptions;
|
|
929
819
|
if (configuration) {
|
|
930
820
|
baseOptions = configuration.baseOptions;
|
|
931
821
|
}
|
|
932
|
-
const localVarRequestOptions = { method: '
|
|
822
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
|
|
933
823
|
const localVarHeaderParameter = {};
|
|
934
824
|
const localVarQueryParameter = {};
|
|
935
|
-
|
|
825
|
+
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
|
826
|
+
if (xContentHash != null) {
|
|
827
|
+
localVarHeaderParameter['X-Content-Hash'] = String(xContentHash);
|
|
828
|
+
}
|
|
829
|
+
if (filePath !== undefined) {
|
|
830
|
+
localVarFormParams.append('filePath', filePath);
|
|
831
|
+
}
|
|
832
|
+
if (file !== undefined) {
|
|
833
|
+
localVarFormParams.append('file', file);
|
|
834
|
+
}
|
|
835
|
+
if (expectedVersion !== undefined) {
|
|
836
|
+
localVarFormParams.append('expectedVersion', expectedVersion);
|
|
837
|
+
}
|
|
838
|
+
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
|
936
839
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
937
840
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
938
841
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
939
|
-
localVarRequestOptions.data =
|
|
842
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
940
843
|
return {
|
|
941
844
|
url: toPathString(localVarUrlObj),
|
|
942
845
|
options: localVarRequestOptions,
|
|
@@ -945,282 +848,183 @@ export const NotesApiAxiosParamCreator = function (configuration) {
|
|
|
945
848
|
};
|
|
946
849
|
};
|
|
947
850
|
/**
|
|
948
|
-
*
|
|
851
|
+
* SyncApi - functional programming interface
|
|
949
852
|
* @export
|
|
950
853
|
*/
|
|
951
|
-
export const
|
|
952
|
-
const localVarAxiosParamCreator =
|
|
854
|
+
export const SyncApiFp = function (configuration) {
|
|
855
|
+
const localVarAxiosParamCreator = SyncApiAxiosParamCreator(configuration);
|
|
953
856
|
return {
|
|
954
857
|
/**
|
|
955
|
-
*
|
|
956
|
-
* @summary
|
|
858
|
+
* Returns file changes since the specified timestamp
|
|
859
|
+
* @summary Get file changes
|
|
860
|
+
* @param {number} [since] Unix timestamp in milliseconds for incremental sync
|
|
861
|
+
* @param {number} [limit] Maximum number of changes to return (default: 100, max: 500)
|
|
862
|
+
* @param {string} [cursor] Pagination cursor
|
|
957
863
|
* @param {*} [options] Override http request option.
|
|
958
864
|
* @throws {RequiredError}
|
|
959
865
|
*/
|
|
960
|
-
async
|
|
961
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
866
|
+
async syncChangesGet(since, limit, cursor, options) {
|
|
867
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.syncChangesGet(since, limit, cursor, options);
|
|
962
868
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
963
|
-
const localVarOperationServerBasePath = operationServerMap['
|
|
869
|
+
const localVarOperationServerBasePath = operationServerMap['SyncApi.syncChangesGet']?.[localVarOperationServerIndex]?.url;
|
|
964
870
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
965
871
|
},
|
|
966
872
|
/**
|
|
967
|
-
*
|
|
968
|
-
* @summary
|
|
969
|
-
* @param {
|
|
873
|
+
* Soft delete a file (creates tombstone for sync)
|
|
874
|
+
* @summary Delete a file
|
|
875
|
+
* @param {string} path File path
|
|
876
|
+
* @param {number} [version] Expected version for optimistic locking
|
|
970
877
|
* @param {*} [options] Override http request option.
|
|
971
878
|
* @throws {RequiredError}
|
|
972
879
|
*/
|
|
973
|
-
async
|
|
974
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
880
|
+
async syncFilesDelete(path, version, options) {
|
|
881
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.syncFilesDelete(path, version, options);
|
|
975
882
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
976
|
-
const localVarOperationServerBasePath = operationServerMap['
|
|
883
|
+
const localVarOperationServerBasePath = operationServerMap['SyncApi.syncFilesDelete']?.[localVarOperationServerIndex]?.url;
|
|
977
884
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
978
885
|
},
|
|
979
886
|
/**
|
|
980
|
-
*
|
|
981
|
-
* @summary
|
|
982
|
-
* @param {
|
|
887
|
+
* Download file content by path
|
|
888
|
+
* @summary Download a file
|
|
889
|
+
* @param {string} path File path
|
|
983
890
|
* @param {*} [options] Override http request option.
|
|
984
891
|
* @throws {RequiredError}
|
|
985
892
|
*/
|
|
986
|
-
async
|
|
987
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
893
|
+
async syncFilesGet(path, options) {
|
|
894
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.syncFilesGet(path, options);
|
|
988
895
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
989
|
-
const localVarOperationServerBasePath = operationServerMap['
|
|
896
|
+
const localVarOperationServerBasePath = operationServerMap['SyncApi.syncFilesGet']?.[localVarOperationServerIndex]?.url;
|
|
990
897
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
991
898
|
},
|
|
992
899
|
/**
|
|
993
|
-
*
|
|
994
|
-
* @summary
|
|
995
|
-
* @param {
|
|
996
|
-
* @param {
|
|
997
|
-
* @param {string} [
|
|
998
|
-
* @param {
|
|
999
|
-
* @param {boolean} [my] Load all my own notes (user will be used from provided token)
|
|
1000
|
-
* @param {string} [from]
|
|
1001
|
-
* @param {boolean} [includeDeleted]
|
|
900
|
+
* Upload a file to sync storage with content-addressable deduplication
|
|
901
|
+
* @summary Upload a file
|
|
902
|
+
* @param {string} filePath Relative file path
|
|
903
|
+
* @param {File} file File content
|
|
904
|
+
* @param {string} [xContentHash] SHA-256 hash for verification
|
|
905
|
+
* @param {number} [expectedVersion] Expected version for optimistic locking
|
|
1002
906
|
* @param {*} [options] Override http request option.
|
|
1003
907
|
* @throws {RequiredError}
|
|
1004
908
|
*/
|
|
1005
|
-
async
|
|
1006
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
909
|
+
async syncFilesPut(filePath, file, xContentHash, expectedVersion, options) {
|
|
910
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.syncFilesPut(filePath, file, xContentHash, expectedVersion, options);
|
|
1007
911
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1008
|
-
const localVarOperationServerBasePath = operationServerMap['
|
|
1009
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1010
|
-
},
|
|
1011
|
-
/**
|
|
1012
|
-
* get note by id
|
|
1013
|
-
* @summary Get note
|
|
1014
|
-
* @param {string} id Note ID
|
|
1015
|
-
* @param {*} [options] Override http request option.
|
|
1016
|
-
* @throws {RequiredError}
|
|
1017
|
-
*/
|
|
1018
|
-
async notesIdGet(id, options) {
|
|
1019
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.notesIdGet(id, options);
|
|
1020
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1021
|
-
const localVarOperationServerBasePath = operationServerMap['NotesApi.notesIdGet']?.[localVarOperationServerIndex]?.url;
|
|
1022
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1023
|
-
},
|
|
1024
|
-
/**
|
|
1025
|
-
* Create note
|
|
1026
|
-
* @summary Create note
|
|
1027
|
-
* @param {HandlersCreatingNote} note Note model
|
|
1028
|
-
* @param {*} [options] Override http request option.
|
|
1029
|
-
* @throws {RequiredError}
|
|
1030
|
-
*/
|
|
1031
|
-
async notesPost(note, options) {
|
|
1032
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.notesPost(note, options);
|
|
1033
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1034
|
-
const localVarOperationServerBasePath = operationServerMap['NotesApi.notesPost']?.[localVarOperationServerIndex]?.url;
|
|
1035
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1036
|
-
},
|
|
1037
|
-
/**
|
|
1038
|
-
* Synchronize notes with specific timestamp
|
|
1039
|
-
* @summary Synchronize notes
|
|
1040
|
-
* @param {HandlersSyncNotesRequest} data Sync notes request
|
|
1041
|
-
* @param {*} [options] Override http request option.
|
|
1042
|
-
* @throws {RequiredError}
|
|
1043
|
-
*/
|
|
1044
|
-
async notesSyncPost(data, options) {
|
|
1045
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.notesSyncPost(data, options);
|
|
1046
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1047
|
-
const localVarOperationServerBasePath = operationServerMap['NotesApi.notesSyncPost']?.[localVarOperationServerIndex]?.url;
|
|
912
|
+
const localVarOperationServerBasePath = operationServerMap['SyncApi.syncFilesPut']?.[localVarOperationServerIndex]?.url;
|
|
1048
913
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1049
914
|
},
|
|
1050
915
|
};
|
|
1051
916
|
};
|
|
1052
917
|
/**
|
|
1053
|
-
*
|
|
918
|
+
* SyncApi - factory interface
|
|
1054
919
|
* @export
|
|
1055
920
|
*/
|
|
1056
|
-
export const
|
|
1057
|
-
const localVarFp =
|
|
921
|
+
export const SyncApiFactory = function (configuration, basePath, axios) {
|
|
922
|
+
const localVarFp = SyncApiFp(configuration);
|
|
1058
923
|
return {
|
|
1059
924
|
/**
|
|
1060
|
-
*
|
|
1061
|
-
* @summary
|
|
1062
|
-
* @param {
|
|
1063
|
-
* @
|
|
1064
|
-
|
|
1065
|
-
allNotesDelete(options) {
|
|
1066
|
-
return localVarFp.allNotesDelete(options).then((request) => request(axios, basePath));
|
|
1067
|
-
},
|
|
1068
|
-
/**
|
|
1069
|
-
* Bulk update or insert notes
|
|
1070
|
-
* @summary Upsert notes
|
|
1071
|
-
* @param {Array<HandlersCreatingNote>} notes List of crated notes
|
|
1072
|
-
* @param {*} [options] Override http request option.
|
|
1073
|
-
* @throws {RequiredError}
|
|
1074
|
-
*/
|
|
1075
|
-
notesBulkUpsertPut(notes, options) {
|
|
1076
|
-
return localVarFp.notesBulkUpsertPut(notes, options).then((request) => request(axios, basePath));
|
|
1077
|
-
},
|
|
1078
|
-
/**
|
|
1079
|
-
* Mark notes as deleted by provided list of ids
|
|
1080
|
-
* @summary Delete notes
|
|
1081
|
-
* @param {Array<string>} ids List of ids of deleted notes
|
|
1082
|
-
* @param {*} [options] Override http request option.
|
|
1083
|
-
* @throws {RequiredError}
|
|
1084
|
-
*/
|
|
1085
|
-
notesDelete(ids, options) {
|
|
1086
|
-
return localVarFp.notesDelete(ids, options).then((request) => request(axios, basePath));
|
|
1087
|
-
},
|
|
1088
|
-
/**
|
|
1089
|
-
* Get all notes with optional filter
|
|
1090
|
-
* @summary Get notes
|
|
1091
|
-
* @param {number} [limit]
|
|
1092
|
-
* @param {number} [offset]
|
|
1093
|
-
* @param {string} [userId] User id of which notes to load
|
|
1094
|
-
* @param {string} [searchText]
|
|
1095
|
-
* @param {boolean} [my] Load all my own notes (user will be used from provided token)
|
|
1096
|
-
* @param {string} [from]
|
|
1097
|
-
* @param {boolean} [includeDeleted]
|
|
925
|
+
* Returns file changes since the specified timestamp
|
|
926
|
+
* @summary Get file changes
|
|
927
|
+
* @param {number} [since] Unix timestamp in milliseconds for incremental sync
|
|
928
|
+
* @param {number} [limit] Maximum number of changes to return (default: 100, max: 500)
|
|
929
|
+
* @param {string} [cursor] Pagination cursor
|
|
1098
930
|
* @param {*} [options] Override http request option.
|
|
1099
931
|
* @throws {RequiredError}
|
|
1100
932
|
*/
|
|
1101
|
-
|
|
1102
|
-
return localVarFp.
|
|
933
|
+
syncChangesGet(since, limit, cursor, options) {
|
|
934
|
+
return localVarFp.syncChangesGet(since, limit, cursor, options).then((request) => request(axios, basePath));
|
|
1103
935
|
},
|
|
1104
936
|
/**
|
|
1105
|
-
*
|
|
1106
|
-
* @summary
|
|
1107
|
-
* @param {string}
|
|
937
|
+
* Soft delete a file (creates tombstone for sync)
|
|
938
|
+
* @summary Delete a file
|
|
939
|
+
* @param {string} path File path
|
|
940
|
+
* @param {number} [version] Expected version for optimistic locking
|
|
1108
941
|
* @param {*} [options] Override http request option.
|
|
1109
942
|
* @throws {RequiredError}
|
|
1110
943
|
*/
|
|
1111
|
-
|
|
1112
|
-
return localVarFp.
|
|
944
|
+
syncFilesDelete(path, version, options) {
|
|
945
|
+
return localVarFp.syncFilesDelete(path, version, options).then((request) => request(axios, basePath));
|
|
1113
946
|
},
|
|
1114
947
|
/**
|
|
1115
|
-
*
|
|
1116
|
-
* @summary
|
|
1117
|
-
* @param {
|
|
948
|
+
* Download file content by path
|
|
949
|
+
* @summary Download a file
|
|
950
|
+
* @param {string} path File path
|
|
1118
951
|
* @param {*} [options] Override http request option.
|
|
1119
952
|
* @throws {RequiredError}
|
|
1120
953
|
*/
|
|
1121
|
-
|
|
1122
|
-
return localVarFp.
|
|
954
|
+
syncFilesGet(path, options) {
|
|
955
|
+
return localVarFp.syncFilesGet(path, options).then((request) => request(axios, basePath));
|
|
1123
956
|
},
|
|
1124
957
|
/**
|
|
1125
|
-
*
|
|
1126
|
-
* @summary
|
|
1127
|
-
* @param {
|
|
958
|
+
* Upload a file to sync storage with content-addressable deduplication
|
|
959
|
+
* @summary Upload a file
|
|
960
|
+
* @param {string} filePath Relative file path
|
|
961
|
+
* @param {File} file File content
|
|
962
|
+
* @param {string} [xContentHash] SHA-256 hash for verification
|
|
963
|
+
* @param {number} [expectedVersion] Expected version for optimistic locking
|
|
1128
964
|
* @param {*} [options] Override http request option.
|
|
1129
965
|
* @throws {RequiredError}
|
|
1130
966
|
*/
|
|
1131
|
-
|
|
1132
|
-
return localVarFp.
|
|
967
|
+
syncFilesPut(filePath, file, xContentHash, expectedVersion, options) {
|
|
968
|
+
return localVarFp.syncFilesPut(filePath, file, xContentHash, expectedVersion, options).then((request) => request(axios, basePath));
|
|
1133
969
|
},
|
|
1134
970
|
};
|
|
1135
971
|
};
|
|
1136
972
|
/**
|
|
1137
|
-
*
|
|
973
|
+
* SyncApi - object-oriented interface
|
|
1138
974
|
* @export
|
|
1139
|
-
* @class
|
|
975
|
+
* @class SyncApi
|
|
1140
976
|
* @extends {BaseAPI}
|
|
1141
977
|
*/
|
|
1142
|
-
export class
|
|
1143
|
-
/**
|
|
1144
|
-
* Force delete all user notes. This operation is irreversible
|
|
1145
|
-
* @summary Drop all user notes
|
|
1146
|
-
* @param {*} [options] Override http request option.
|
|
1147
|
-
* @throws {RequiredError}
|
|
1148
|
-
* @memberof NotesApi
|
|
1149
|
-
*/
|
|
1150
|
-
allNotesDelete(options) {
|
|
1151
|
-
return NotesApiFp(this.configuration).allNotesDelete(options).then((request) => request(this.axios, this.basePath));
|
|
1152
|
-
}
|
|
1153
|
-
/**
|
|
1154
|
-
* Bulk update or insert notes
|
|
1155
|
-
* @summary Upsert notes
|
|
1156
|
-
* @param {Array<HandlersCreatingNote>} notes List of crated notes
|
|
1157
|
-
* @param {*} [options] Override http request option.
|
|
1158
|
-
* @throws {RequiredError}
|
|
1159
|
-
* @memberof NotesApi
|
|
1160
|
-
*/
|
|
1161
|
-
notesBulkUpsertPut(notes, options) {
|
|
1162
|
-
return NotesApiFp(this.configuration).notesBulkUpsertPut(notes, options).then((request) => request(this.axios, this.basePath));
|
|
1163
|
-
}
|
|
1164
|
-
/**
|
|
1165
|
-
* Mark notes as deleted by provided list of ids
|
|
1166
|
-
* @summary Delete notes
|
|
1167
|
-
* @param {Array<string>} ids List of ids of deleted notes
|
|
1168
|
-
* @param {*} [options] Override http request option.
|
|
1169
|
-
* @throws {RequiredError}
|
|
1170
|
-
* @memberof NotesApi
|
|
1171
|
-
*/
|
|
1172
|
-
notesDelete(ids, options) {
|
|
1173
|
-
return NotesApiFp(this.configuration).notesDelete(ids, options).then((request) => request(this.axios, this.basePath));
|
|
1174
|
-
}
|
|
978
|
+
export class SyncApi extends BaseAPI {
|
|
1175
979
|
/**
|
|
1176
|
-
*
|
|
1177
|
-
* @summary Get
|
|
1178
|
-
* @param {number} [
|
|
1179
|
-
* @param {number} [
|
|
1180
|
-
* @param {string} [
|
|
1181
|
-
* @param {string} [searchText]
|
|
1182
|
-
* @param {boolean} [my] Load all my own notes (user will be used from provided token)
|
|
1183
|
-
* @param {string} [from]
|
|
1184
|
-
* @param {boolean} [includeDeleted]
|
|
980
|
+
* Returns file changes since the specified timestamp
|
|
981
|
+
* @summary Get file changes
|
|
982
|
+
* @param {number} [since] Unix timestamp in milliseconds for incremental sync
|
|
983
|
+
* @param {number} [limit] Maximum number of changes to return (default: 100, max: 500)
|
|
984
|
+
* @param {string} [cursor] Pagination cursor
|
|
1185
985
|
* @param {*} [options] Override http request option.
|
|
1186
986
|
* @throws {RequiredError}
|
|
1187
|
-
* @memberof
|
|
987
|
+
* @memberof SyncApi
|
|
1188
988
|
*/
|
|
1189
|
-
|
|
1190
|
-
return
|
|
989
|
+
syncChangesGet(since, limit, cursor, options) {
|
|
990
|
+
return SyncApiFp(this.configuration).syncChangesGet(since, limit, cursor, options).then((request) => request(this.axios, this.basePath));
|
|
1191
991
|
}
|
|
1192
992
|
/**
|
|
1193
|
-
*
|
|
1194
|
-
* @summary
|
|
1195
|
-
* @param {string}
|
|
993
|
+
* Soft delete a file (creates tombstone for sync)
|
|
994
|
+
* @summary Delete a file
|
|
995
|
+
* @param {string} path File path
|
|
996
|
+
* @param {number} [version] Expected version for optimistic locking
|
|
1196
997
|
* @param {*} [options] Override http request option.
|
|
1197
998
|
* @throws {RequiredError}
|
|
1198
|
-
* @memberof
|
|
999
|
+
* @memberof SyncApi
|
|
1199
1000
|
*/
|
|
1200
|
-
|
|
1201
|
-
return
|
|
1001
|
+
syncFilesDelete(path, version, options) {
|
|
1002
|
+
return SyncApiFp(this.configuration).syncFilesDelete(path, version, options).then((request) => request(this.axios, this.basePath));
|
|
1202
1003
|
}
|
|
1203
1004
|
/**
|
|
1204
|
-
*
|
|
1205
|
-
* @summary
|
|
1206
|
-
* @param {
|
|
1005
|
+
* Download file content by path
|
|
1006
|
+
* @summary Download a file
|
|
1007
|
+
* @param {string} path File path
|
|
1207
1008
|
* @param {*} [options] Override http request option.
|
|
1208
1009
|
* @throws {RequiredError}
|
|
1209
|
-
* @memberof
|
|
1010
|
+
* @memberof SyncApi
|
|
1210
1011
|
*/
|
|
1211
|
-
|
|
1212
|
-
return
|
|
1012
|
+
syncFilesGet(path, options) {
|
|
1013
|
+
return SyncApiFp(this.configuration).syncFilesGet(path, options).then((request) => request(this.axios, this.basePath));
|
|
1213
1014
|
}
|
|
1214
1015
|
/**
|
|
1215
|
-
*
|
|
1216
|
-
* @summary
|
|
1217
|
-
* @param {
|
|
1016
|
+
* Upload a file to sync storage with content-addressable deduplication
|
|
1017
|
+
* @summary Upload a file
|
|
1018
|
+
* @param {string} filePath Relative file path
|
|
1019
|
+
* @param {File} file File content
|
|
1020
|
+
* @param {string} [xContentHash] SHA-256 hash for verification
|
|
1021
|
+
* @param {number} [expectedVersion] Expected version for optimistic locking
|
|
1218
1022
|
* @param {*} [options] Override http request option.
|
|
1219
1023
|
* @throws {RequiredError}
|
|
1220
|
-
* @memberof
|
|
1024
|
+
* @memberof SyncApi
|
|
1221
1025
|
*/
|
|
1222
|
-
|
|
1223
|
-
return
|
|
1026
|
+
syncFilesPut(filePath, file, xContentHash, expectedVersion, options) {
|
|
1027
|
+
return SyncApiFp(this.configuration).syncFilesPut(filePath, file, xContentHash, expectedVersion, options).then((request) => request(this.axios, this.basePath));
|
|
1224
1028
|
}
|
|
1225
1029
|
}
|
|
1226
1030
|
/**
|
|
@@ -1383,93 +1187,3 @@ export class SystemInfoApi extends BaseAPI {
|
|
|
1383
1187
|
return SystemInfoApiFp(this.configuration).systemInfoVersionGet(version, options).then((request) => request(this.axios, this.basePath));
|
|
1384
1188
|
}
|
|
1385
1189
|
}
|
|
1386
|
-
/**
|
|
1387
|
-
* TagsApi - axios parameter creator
|
|
1388
|
-
* @export
|
|
1389
|
-
*/
|
|
1390
|
-
export const TagsApiAxiosParamCreator = function (configuration) {
|
|
1391
|
-
return {
|
|
1392
|
-
/**
|
|
1393
|
-
* Return list of al registered tags
|
|
1394
|
-
* @summary Get tags
|
|
1395
|
-
* @param {*} [options] Override http request option.
|
|
1396
|
-
* @throws {RequiredError}
|
|
1397
|
-
*/
|
|
1398
|
-
tagsGet: async (options = {}) => {
|
|
1399
|
-
const localVarPath = `/tags`;
|
|
1400
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1401
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1402
|
-
let baseOptions;
|
|
1403
|
-
if (configuration) {
|
|
1404
|
-
baseOptions = configuration.baseOptions;
|
|
1405
|
-
}
|
|
1406
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
1407
|
-
const localVarHeaderParameter = {};
|
|
1408
|
-
const localVarQueryParameter = {};
|
|
1409
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1410
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1411
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1412
|
-
return {
|
|
1413
|
-
url: toPathString(localVarUrlObj),
|
|
1414
|
-
options: localVarRequestOptions,
|
|
1415
|
-
};
|
|
1416
|
-
},
|
|
1417
|
-
};
|
|
1418
|
-
};
|
|
1419
|
-
/**
|
|
1420
|
-
* TagsApi - functional programming interface
|
|
1421
|
-
* @export
|
|
1422
|
-
*/
|
|
1423
|
-
export const TagsApiFp = function (configuration) {
|
|
1424
|
-
const localVarAxiosParamCreator = TagsApiAxiosParamCreator(configuration);
|
|
1425
|
-
return {
|
|
1426
|
-
/**
|
|
1427
|
-
* Return list of al registered tags
|
|
1428
|
-
* @summary Get tags
|
|
1429
|
-
* @param {*} [options] Override http request option.
|
|
1430
|
-
* @throws {RequiredError}
|
|
1431
|
-
*/
|
|
1432
|
-
async tagsGet(options) {
|
|
1433
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.tagsGet(options);
|
|
1434
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1435
|
-
const localVarOperationServerBasePath = operationServerMap['TagsApi.tagsGet']?.[localVarOperationServerIndex]?.url;
|
|
1436
|
-
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1437
|
-
},
|
|
1438
|
-
};
|
|
1439
|
-
};
|
|
1440
|
-
/**
|
|
1441
|
-
* TagsApi - factory interface
|
|
1442
|
-
* @export
|
|
1443
|
-
*/
|
|
1444
|
-
export const TagsApiFactory = function (configuration, basePath, axios) {
|
|
1445
|
-
const localVarFp = TagsApiFp(configuration);
|
|
1446
|
-
return {
|
|
1447
|
-
/**
|
|
1448
|
-
* Return list of al registered tags
|
|
1449
|
-
* @summary Get tags
|
|
1450
|
-
* @param {*} [options] Override http request option.
|
|
1451
|
-
* @throws {RequiredError}
|
|
1452
|
-
*/
|
|
1453
|
-
tagsGet(options) {
|
|
1454
|
-
return localVarFp.tagsGet(options).then((request) => request(axios, basePath));
|
|
1455
|
-
},
|
|
1456
|
-
};
|
|
1457
|
-
};
|
|
1458
|
-
/**
|
|
1459
|
-
* TagsApi - object-oriented interface
|
|
1460
|
-
* @export
|
|
1461
|
-
* @class TagsApi
|
|
1462
|
-
* @extends {BaseAPI}
|
|
1463
|
-
*/
|
|
1464
|
-
export class TagsApi extends BaseAPI {
|
|
1465
|
-
/**
|
|
1466
|
-
* Return list of al registered tags
|
|
1467
|
-
* @summary Get tags
|
|
1468
|
-
* @param {*} [options] Override http request option.
|
|
1469
|
-
* @throws {RequiredError}
|
|
1470
|
-
* @memberof TagsApi
|
|
1471
|
-
*/
|
|
1472
|
-
tagsGet(options) {
|
|
1473
|
-
return TagsApiFp(this.configuration).tagsGet(options).then((request) => request(this.axios, this.basePath));
|
|
1474
|
-
}
|
|
1475
|
-
}
|