@tak-ps/cloudtak 13.31.0 → 13.33.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.
@@ -0,0 +1,9 @@
1
+ export declare class TimeoutError extends Error {
2
+ constructor(message: string);
3
+ }
4
+ /**
5
+ * Bound a promise to a deadline, rejecting with a TimeoutError if it does
6
+ * not settle in time. The underlying operation is not cancelled; its result
7
+ * is simply unused if it settles late.
8
+ */
9
+ export declare function withTimeout<T>(promise: Promise<T>, timeoutMs: number, label: string): Promise<T>;
@@ -14,4 +14,5 @@ export default class Config<K extends keyof FullConfig = keyof FullConfig> {
14
14
  defaults?: Partial<FullConfig>;
15
15
  }): Promise<Partial<FullConfig>>;
16
16
  static refresh(keys: (keyof FullConfig)[]): Promise<Partial<FullConfig>>;
17
+ private static persist;
17
18
  }
@@ -5,16 +5,16 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
5
5
  default: number;
6
6
  };
7
7
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
- close: (...args: any[]) => void;
9
8
  click: (...args: any[]) => void;
9
+ close: (...args: any[]) => void;
10
10
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
11
11
  size: {
12
12
  type: NumberConstructor;
13
13
  default: number;
14
14
  };
15
15
  }>> & Readonly<{
16
- onClose?: ((...args: any[]) => any) | undefined;
17
16
  onClick?: ((...args: any[]) => any) | undefined;
17
+ onClose?: ((...args: any[]) => any) | undefined;
18
18
  }>, {
19
19
  size: number;
20
20
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,9 +1,11 @@
1
+ import { ChatStatus } from '../../../database.ts';
1
2
  export type ChatMessage = {
2
3
  id: string | number;
3
4
  sender_uid: string;
4
5
  sender?: string;
5
6
  message: string;
6
7
  created: string;
8
+ status?: ChatStatus;
7
9
  };
8
10
  type __VLS_Props = {
9
11
  chats: ChatMessage[];
@@ -21,15 +21,15 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {
21
21
  refresh: typeof refresh;
22
22
  upload: typeof upload;
23
23
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
24
- error: (response: Error) => any;
25
24
  cancel: () => any;
25
+ error: (response: Error) => any;
26
26
  done: (response: unknown) => any;
27
27
  staged: (response: {
28
28
  name: string;
29
29
  }) => any;
30
30
  }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
31
- onError?: ((response: Error) => any) | undefined;
32
31
  onCancel?: (() => any) | undefined;
32
+ onError?: ((response: Error) => any) | undefined;
33
33
  onDone?: ((response: unknown) => any) | undefined;
34
34
  onStaged?: ((response: {
35
35
  name: string;
@@ -32,6 +32,22 @@ export interface DBChatroom {
32
32
  unread?: number;
33
33
  last_read: string | null;
34
34
  }
35
+ /**
36
+ * Delivery status of a chat message sent by the current user
37
+ * - sending: submitted locally but not yet confirmed by the CloudTAK Server
38
+ * - sent: received by the CloudTAK/TAK Server
39
+ * - pending/failed/delivered/read: reported by the recipient's client via
40
+ * b-t-f-p/s/d/r Chat Receipt CoTs
41
+ */
42
+ export declare enum ChatStatus {
43
+ Sending = "sending",
44
+ Sent = "sent",
45
+ Pending = "pending",
46
+ Failed = "failed",
47
+ Delivered = "delivered",
48
+ Read = "read"
49
+ }
50
+ export declare const ChatStatusRank: Record<ChatStatus, number>;
35
51
  export interface DBChatroomChat {
36
52
  id: string;
37
53
  chatroom: string;
@@ -40,6 +56,7 @@ export interface DBChatroomChat {
40
56
  message: string;
41
57
  created: string;
42
58
  unread?: boolean;
59
+ status?: ChatStatus;
43
60
  }
44
61
  export interface DBIconset {
45
62
  uid: string;
@@ -133,6 +150,7 @@ export interface DBSubscriptionChat {
133
150
  message: string;
134
151
  created: string;
135
152
  unread: boolean;
153
+ status?: ChatStatus;
136
154
  }
137
155
  export interface DBSubscription {
138
156
  guid: string;
@@ -12,6 +12,7 @@ export declare const useAppStore: import("pinia").StoreDefinition<"cloudtak-app"
12
12
  loadingStage: string;
13
13
  }, {}, {
14
14
  setServerUrl(serverUrl: string): Promise<void>;
15
+ mirrorServerUrl(serverUrl: string): Promise<void>;
15
16
  persistSession(opts: {
16
17
  token: string;
17
18
  username: string;
@@ -22,7 +23,7 @@ export declare const useAppStore: import("pinia").StoreDefinition<"cloudtak-app"
22
23
  clearSession(): Promise<void>;
23
24
  destroySession(): Promise<void>;
24
25
  applyTheme(style?: string): void;
25
- routeLogin(): void;
26
+ routeLogin(): Promise<void>;
26
27
  refreshLogin(): Promise<void>;
27
28
  logout(): Promise<void>;
28
29
  bootstrap(): Promise<boolean>;
@@ -110,6 +110,7 @@ export type APIProfileChat = {
110
110
  updated: string;
111
111
  message_id: string;
112
112
  message: string;
113
+ status?: string | null;
113
114
  };
114
115
  export type MissionTemplate = paths["/api/template/mission/{:mission}"]["get"]["responses"]["200"]["content"]["application/json"];
115
116
  export type MissionTemplateList = paths["/api/template/mission"]["get"]["responses"]["200"]["content"]["application/json"];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tak-ps/cloudtak",
3
3
  "type": "module",
4
- "version": "13.31.0",
4
+ "version": "13.33.0",
5
5
  "types": "dist/types/plugin.d.ts",
6
6
  "files": [
7
7
  "dist/types"