orgnote-api 0.42.1 → 0.42.3

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 CHANGED
@@ -1,4 +1,4 @@
1
- import { InlineEmbeddedWidget, MultilineEmbeddedWidget, OrgLineClass, SyncStoreDefinition, BufferViewerStoreDefinition, CommandsStoreDefinition, CommandsGroupStoreDefinition, ModalStoreDefinition, SettingsStoreDefinition, SettingsUiStoreDefinition, MultipleUploadParams, UploadParams, CompletionStoreDefinition, PaneStoreDefinition, LayoutStoreDefinition, FileManagerStoreDefinition, UseScreenDetection, UseKeyboardState, NotificationsStoreDefinition, BufferStoreDefinition, BufferProviderStoreDefinition, Repositories, LogStoreDefinition, UseSystemInfo, ContextMenuStoreDefinition, QueueStoreDefinition, FileGuardStoreDefinition, FileWatcherStoreDefinition, BuildOrgNoteUrl, AuthStoreDefinition, FileSearchStoreDefinition, FileMetaStoreDefinition, FontStoreDefinition, EmbeddedBufferStoreDefinition, UseFileContent, UseAppResume } from './models/index.js';
1
+ import { InlineEmbeddedWidget, MultilineEmbeddedWidget, OrgLineClass, SyncStoreDefinition, BufferViewerStoreDefinition, CommandsStoreDefinition, CommandsGroupStoreDefinition, ModalStoreDefinition, SettingsStoreDefinition, SettingsUiStoreDefinition, MultipleUploadParams, UploadParams, CompletionStoreDefinition, PaneStoreDefinition, LayoutStoreDefinition, FileManagerStoreDefinition, UseScreenDetection, UseKeyboardState, NotificationsStoreDefinition, BufferStoreDefinition, BufferProviderStoreDefinition, Repositories, LogStoreDefinition, UseSystemInfo, ContextMenuStoreDefinition, QueueStoreDefinition, FileGuardStoreDefinition, FileWatcherStoreDefinition, BuildOrgNoteUrl, AuthStoreDefinition, FileSearchStoreDefinition, FileMetaStoreDefinition, FontStoreDefinition, EmbeddedBufferStoreDefinition, UseFileContent, UseAppResume, ClientUpdateStoreDefinition } from './models/index.js';
2
2
  import { WebSocketClient } from './websocket/client.js';
3
3
  import { WidgetType } from './models/widget-type.js';
4
4
  import { NodeType } from 'org-mode-ast';
@@ -163,6 +163,7 @@ export interface OrgNoteApi {
163
163
  * Also handles API token lifecycle (create, list, revoke).
164
164
  */
165
165
  useSettings: SettingsStoreDefinition;
166
+ useClientUpdate: ClientUpdateStoreDefinition;
166
167
  useConfig: ConfigStoreDefinition;
167
168
  /**
168
169
  * Access the [Quasar](https://quasar.dev/) framework globals ($q).
@@ -189,6 +189,12 @@ export declare enum i18n {
189
189
  GPG_EMAIL_INVALID = "gpg email invalid",
190
190
  CLEAR_ALL_NOTIFICATIONS = "clear all notifications",
191
191
  NO_NOTIFICATIONS = "no notifications",
192
+ SHOW_LATEST_CHANGES = "show latest changes",
193
+ LATEST_CHANGES_NOTIFICATION_DESCRIPTION = "open latest changes notification description",
194
+ NO_LATEST_CHANGES = "no latest changes",
195
+ UPDATED_TO_VERSION = "updated to version",
196
+ UPDATED_FROM_VERSION = "updated from version",
197
+ OPEN_RELEASE_NOTES = "open release notes",
192
198
  GRAPH_TITLE = "graph.title",
193
199
  GRAPH_DESCRIPTION = "graph.description",
194
200
  GRAPH_EMPTY_TITLE = "graph.empty.title",
@@ -231,7 +237,9 @@ export declare enum i18n {
231
237
  export declare const I18N: {
232
238
  REPORT_BUG: DefaultCommands.REPORT_BUG;
233
239
  OPEN_SYSTEM_INFO: DefaultCommands.OPEN_SYSTEM_INFO;
240
+ SHOW_LATEST_CHANGES: DefaultCommands.SHOW_LATEST_CHANGES;
234
241
  SHOW_LOGS: DefaultCommands.SHOW_LOGS;
242
+ APPLY_PWA_UPDATE: DefaultCommands.APPLY_PWA_UPDATE;
235
243
  CLEAR_LOGS: DefaultCommands.CLEAR_LOGS;
236
244
  TOGGLE_SIDEBAR: DefaultCommands.TOGGLE_SIDEBAR;
237
245
  CLOSE_SIDEBAR: DefaultCommands.CLOSE_SIDEBAR;
@@ -552,6 +560,11 @@ export declare const I18N: {
552
560
  GPG_EMAIL_INVALID: i18n.GPG_EMAIL_INVALID;
553
561
  CLEAR_ALL_NOTIFICATIONS: i18n.CLEAR_ALL_NOTIFICATIONS;
554
562
  NO_NOTIFICATIONS: i18n.NO_NOTIFICATIONS;
563
+ LATEST_CHANGES_NOTIFICATION_DESCRIPTION: i18n.LATEST_CHANGES_NOTIFICATION_DESCRIPTION;
564
+ NO_LATEST_CHANGES: i18n.NO_LATEST_CHANGES;
565
+ UPDATED_TO_VERSION: i18n.UPDATED_TO_VERSION;
566
+ UPDATED_FROM_VERSION: i18n.UPDATED_FROM_VERSION;
567
+ OPEN_RELEASE_NOTES: i18n.OPEN_RELEASE_NOTES;
555
568
  GRAPH_TITLE: i18n.GRAPH_TITLE;
556
569
  GRAPH_DESCRIPTION: i18n.GRAPH_DESCRIPTION;
557
570
  GRAPH_EMPTY_TITLE: i18n.GRAPH_EMPTY_TITLE;
@@ -200,6 +200,12 @@ export var i18n;
200
200
  i18n["GPG_EMAIL_INVALID"] = "gpg email invalid";
201
201
  i18n["CLEAR_ALL_NOTIFICATIONS"] = "clear all notifications";
202
202
  i18n["NO_NOTIFICATIONS"] = "no notifications";
203
+ i18n["SHOW_LATEST_CHANGES"] = "show latest changes";
204
+ i18n["LATEST_CHANGES_NOTIFICATION_DESCRIPTION"] = "open latest changes notification description";
205
+ i18n["NO_LATEST_CHANGES"] = "no latest changes";
206
+ i18n["UPDATED_TO_VERSION"] = "updated to version";
207
+ i18n["UPDATED_FROM_VERSION"] = "updated from version";
208
+ i18n["OPEN_RELEASE_NOTES"] = "open release notes";
203
209
  // Graph
204
210
  i18n["GRAPH_TITLE"] = "graph.title";
205
211
  i18n["GRAPH_DESCRIPTION"] = "graph.description";
@@ -0,0 +1,11 @@
1
+ import type { ComputedRef } from 'vue';
2
+ import type { StoreDefinition } from './store.js';
3
+ import type { ChangelogRecord } from './client-update.js';
4
+ export interface ClientUpdateStore {
5
+ updateChangelog: ComputedRef<ChangelogRecord | null>;
6
+ unreadUpdateChangelog: ComputedRef<ChangelogRecord | null>;
7
+ syncUpdateChangelog: () => Promise<void>;
8
+ loadLatestChangelog: () => Promise<ChangelogRecord | null>;
9
+ markChangelogAsRead: () => void;
10
+ }
11
+ export type ClientUpdateStoreDefinition = StoreDefinition<ClientUpdateStore>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ export interface Changelog {
2
+ version: string;
3
+ changeLog: string;
4
+ url: string;
5
+ }
6
+ export interface ChangelogRecord extends Changelog {
7
+ fromVersion?: string;
8
+ detectedAt: string;
9
+ viewedAt?: string;
10
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,7 +1,9 @@
1
1
  export declare enum DefaultCommands {
2
2
  REPORT_BUG = "report bug",
3
3
  OPEN_SYSTEM_INFO = "open system info",
4
+ SHOW_LATEST_CHANGES = "show latest changes",
4
5
  SHOW_LOGS = "show logs",
6
+ APPLY_PWA_UPDATE = "apply pwa update",
5
7
  CLEAR_LOGS = "clear logs",
6
8
  TOGGLE_SIDEBAR = "toggle sidebar",
7
9
  CLOSE_SIDEBAR = "close sidebar",
@@ -8,7 +8,9 @@ export var DefaultCommands;
8
8
  // Global commands
9
9
  DefaultCommands["REPORT_BUG"] = "report bug";
10
10
  DefaultCommands["OPEN_SYSTEM_INFO"] = "open system info";
11
+ DefaultCommands["SHOW_LATEST_CHANGES"] = "show latest changes";
11
12
  DefaultCommands["SHOW_LOGS"] = "show logs";
13
+ DefaultCommands["APPLY_PWA_UPDATE"] = "apply pwa update";
12
14
  DefaultCommands["CLEAR_LOGS"] = "clear logs";
13
15
  DefaultCommands["TOGGLE_SIDEBAR"] = "toggle sidebar";
14
16
  DefaultCommands["CLOSE_SIDEBAR"] = "close sidebar";
package/models/index.d.ts CHANGED
@@ -19,6 +19,7 @@ export * from './user.js';
19
19
  export * from './oauth-provider.js';
20
20
  export * from './auth-state.js';
21
21
  export * from './orgnote-config.js';
22
+ export * from './client-update.js';
22
23
  export * from './sync-profile-config.js';
23
24
  export * from './platform-specific.js';
24
25
  export * from './css-utils.js';
@@ -60,6 +61,7 @@ export * from './extension-store.js';
60
61
  export * from './file-system-store.js';
61
62
  export * from './file-watcher-store.js';
62
63
  export * from './settings-store.js';
64
+ export * from './client-update-store.js';
63
65
  export * from './encryption-store.js';
64
66
  export * from './ui-store.js';
65
67
  export * from './sidebar-store.js';
package/models/index.js CHANGED
@@ -19,6 +19,7 @@ export * from "./user.js";
19
19
  export * from "./oauth-provider.js";
20
20
  export * from "./auth-state.js";
21
21
  export * from "./orgnote-config.js";
22
+ export * from "./client-update.js";
22
23
  export * from "./sync-profile-config.js";
23
24
  export * from "./platform-specific.js";
24
25
  export * from "./css-utils.js";
@@ -62,6 +63,7 @@ export * from "./extension-store.js";
62
63
  export * from "./file-system-store.js";
63
64
  export * from "./file-watcher-store.js";
64
65
  export * from "./settings-store.js";
66
+ export * from "./client-update-store.js";
65
67
  export * from "./encryption-store.js";
66
68
  export * from "./ui-store.js";
67
69
  export * from "./sidebar-store.js";
@@ -1,5 +1,5 @@
1
1
  import { StyleVariant } from './style-variant.js';
2
- export interface NotificationConfig {
2
+ export interface NotificationConfig<T = unknown> {
3
3
  id?: string;
4
4
  message: string;
5
5
  description?: string;
@@ -11,5 +11,7 @@ export interface NotificationConfig {
11
11
  icon?: string;
12
12
  iconEnabled?: boolean;
13
13
  onClick?: () => void;
14
+ actionCommand?: string;
15
+ actionPayload?: T;
14
16
  stored?: boolean;
15
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orgnote-api",
3
- "version": "0.42.1",
3
+ "version": "0.42.3",
4
4
  "description": "Official API for creating extensions for OrgNote app",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -1120,6 +1120,13 @@ export declare class SyncApi extends BaseAPI {
1120
1120
  * @export
1121
1121
  */
1122
1122
  export declare const SystemInfoApiAxiosParamCreator: (configuration?: Configuration) => {
1123
+ /**
1124
+ *
1125
+ * @summary GetLatestClientUpdate
1126
+ * @param {*} [options] Override http request option.
1127
+ * @throws {RequiredError}
1128
+ */
1129
+ systemInfoClientUpdateLatestGet: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1123
1130
  /**
1124
1131
  *
1125
1132
  * @summary GetUpdatesFromVersion
@@ -1142,6 +1149,13 @@ export declare const SystemInfoApiAxiosParamCreator: (configuration?: Configurat
1142
1149
  * @export
1143
1150
  */
1144
1151
  export declare const SystemInfoApiFp: (configuration?: Configuration) => {
1152
+ /**
1153
+ *
1154
+ * @summary GetLatestClientUpdate
1155
+ * @param {*} [options] Override http request option.
1156
+ * @throws {RequiredError}
1157
+ */
1158
+ systemInfoClientUpdateLatestGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ModelsOrgNoteClientUpdateInfo>>;
1145
1159
  /**
1146
1160
  *
1147
1161
  * @summary GetUpdatesFromVersion
@@ -1164,6 +1178,13 @@ export declare const SystemInfoApiFp: (configuration?: Configuration) => {
1164
1178
  * @export
1165
1179
  */
1166
1180
  export declare const SystemInfoApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
1181
+ /**
1182
+ *
1183
+ * @summary GetLatestClientUpdate
1184
+ * @param {*} [options] Override http request option.
1185
+ * @throws {RequiredError}
1186
+ */
1187
+ systemInfoClientUpdateLatestGet(options?: any): AxiosPromise<ModelsOrgNoteClientUpdateInfo>;
1167
1188
  /**
1168
1189
  *
1169
1190
  * @summary GetUpdatesFromVersion
@@ -1188,6 +1209,14 @@ export declare const SystemInfoApiFactory: (configuration?: Configuration, baseP
1188
1209
  * @extends {BaseAPI}
1189
1210
  */
1190
1211
  export declare class SystemInfoApi extends BaseAPI {
1212
+ /**
1213
+ *
1214
+ * @summary GetLatestClientUpdate
1215
+ * @param {*} [options] Override http request option.
1216
+ * @throws {RequiredError}
1217
+ * @memberof SystemInfoApi
1218
+ */
1219
+ systemInfoClientUpdateLatestGet(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ModelsOrgNoteClientUpdateInfo, any>>;
1191
1220
  /**
1192
1221
  *
1193
1222
  * @summary GetUpdatesFromVersion
package/remote-api/api.js CHANGED
@@ -1033,6 +1033,31 @@ export class SyncApi extends BaseAPI {
1033
1033
  */
1034
1034
  export const SystemInfoApiAxiosParamCreator = function (configuration) {
1035
1035
  return {
1036
+ /**
1037
+ *
1038
+ * @summary GetLatestClientUpdate
1039
+ * @param {*} [options] Override http request option.
1040
+ * @throws {RequiredError}
1041
+ */
1042
+ systemInfoClientUpdateLatestGet: async (options = {}) => {
1043
+ const localVarPath = `/system-info/client-update/latest`;
1044
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1045
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1046
+ let baseOptions;
1047
+ if (configuration) {
1048
+ baseOptions = configuration.baseOptions;
1049
+ }
1050
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1051
+ const localVarHeaderParameter = {};
1052
+ const localVarQueryParameter = {};
1053
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1054
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1055
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1056
+ return {
1057
+ url: toPathString(localVarUrlObj),
1058
+ options: localVarRequestOptions,
1059
+ };
1060
+ },
1036
1061
  /**
1037
1062
  *
1038
1063
  * @summary GetUpdatesFromVersion
@@ -1100,6 +1125,18 @@ export const SystemInfoApiAxiosParamCreator = function (configuration) {
1100
1125
  export const SystemInfoApiFp = function (configuration) {
1101
1126
  const localVarAxiosParamCreator = SystemInfoApiAxiosParamCreator(configuration);
1102
1127
  return {
1128
+ /**
1129
+ *
1130
+ * @summary GetLatestClientUpdate
1131
+ * @param {*} [options] Override http request option.
1132
+ * @throws {RequiredError}
1133
+ */
1134
+ async systemInfoClientUpdateLatestGet(options) {
1135
+ const localVarAxiosArgs = await localVarAxiosParamCreator.systemInfoClientUpdateLatestGet(options);
1136
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1137
+ const localVarOperationServerBasePath = operationServerMap['SystemInfoApi.systemInfoClientUpdateLatestGet']?.[localVarOperationServerIndex]?.url;
1138
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1139
+ },
1103
1140
  /**
1104
1141
  *
1105
1142
  * @summary GetUpdatesFromVersion
@@ -1135,6 +1172,15 @@ export const SystemInfoApiFp = function (configuration) {
1135
1172
  export const SystemInfoApiFactory = function (configuration, basePath, axios) {
1136
1173
  const localVarFp = SystemInfoApiFp(configuration);
1137
1174
  return {
1175
+ /**
1176
+ *
1177
+ * @summary GetLatestClientUpdate
1178
+ * @param {*} [options] Override http request option.
1179
+ * @throws {RequiredError}
1180
+ */
1181
+ systemInfoClientUpdateLatestGet(options) {
1182
+ return localVarFp.systemInfoClientUpdateLatestGet(options).then((request) => request(axios, basePath));
1183
+ },
1138
1184
  /**
1139
1185
  *
1140
1186
  * @summary GetUpdatesFromVersion
@@ -1164,6 +1210,16 @@ export const SystemInfoApiFactory = function (configuration, basePath, axios) {
1164
1210
  * @extends {BaseAPI}
1165
1211
  */
1166
1212
  export class SystemInfoApi extends BaseAPI {
1213
+ /**
1214
+ *
1215
+ * @summary GetLatestClientUpdate
1216
+ * @param {*} [options] Override http request option.
1217
+ * @throws {RequiredError}
1218
+ * @memberof SystemInfoApi
1219
+ */
1220
+ systemInfoClientUpdateLatestGet(options) {
1221
+ return SystemInfoApiFp(this.configuration).systemInfoClientUpdateLatestGet(options).then((request) => request(this.axios, this.basePath));
1222
+ }
1167
1223
  /**
1168
1224
  *
1169
1225
  * @summary GetUpdatesFromVersion