@tak-ps/cloudtak 13.55.1 → 13.55.2

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.
@@ -4,10 +4,8 @@ import type { MissionChange } from '../types.ts';
4
4
  */
5
5
  export default class SubscriptionChanges {
6
6
  guid: string;
7
- token: string;
8
7
  missiontoken?: string;
9
8
  constructor(guid: string, opts: {
10
- token: string;
11
9
  missiontoken?: string;
12
10
  });
13
11
  headers(): Record<string, string>;
@@ -5,10 +5,8 @@ import type { Mission } from '../types.ts';
5
5
  */
6
6
  export default class SubscriptionContents {
7
7
  guid: string;
8
- token: string;
9
8
  missiontoken?: string;
10
9
  constructor(guid: string, opts: {
11
- token: string;
12
10
  missiontoken?: string;
13
11
  });
14
12
  headers(): Record<string, string>;
@@ -8,10 +8,8 @@ import type { Feature, FeatureCollection } from '../types.ts';
8
8
  */
9
9
  export default class SubscriptionFeature {
10
10
  parent: Subscription;
11
- token: string;
12
11
  missiontoken?: string;
13
12
  constructor(parent: Subscription, opts: {
14
- token: string;
15
13
  missiontoken?: string;
16
14
  });
17
15
  headers(): Record<string, string>;
@@ -9,10 +9,8 @@ import type { MissionLayer, MissionLayer_Create, MissionLayer_Update } from '../
9
9
  */
10
10
  export default class SubscriptionLayer {
11
11
  parent: Subscription;
12
- token: string;
13
12
  missiontoken?: string;
14
13
  constructor(parent: Subscription, opts: {
15
- token: string;
16
14
  missiontoken?: string;
17
15
  });
18
16
  headers(): Record<string, string>;
@@ -5,10 +5,8 @@ import type { MissionLog } from '../types.ts';
5
5
  */
6
6
  export default class SubscriptionLog {
7
7
  guid: string;
8
- token: string;
9
8
  missiontoken?: string;
10
9
  constructor(guid: string, opts: {
11
- token: string;
12
10
  missiontoken?: string;
13
11
  });
14
12
  headers(): Record<string, string>;
@@ -32,7 +32,6 @@ export default class Subscription {
32
32
  feature: SubscriptionFeature;
33
33
  layer: SubscriptionLayer;
34
34
  chat: SubscriptionChat;
35
- token: string;
36
35
  missiontoken?: string;
37
36
  dirty: boolean;
38
37
  subscribed: boolean;
@@ -40,21 +39,19 @@ export default class Subscription {
40
39
  _sync: BroadcastChannel;
41
40
  constructor(mission: Mission, role: MissionRole, opts: {
42
41
  subscribed: boolean;
43
- token: string;
44
42
  missiontoken?: string;
45
43
  });
46
44
  /**
47
45
  * Return a Subscription instance of one already exists in the local DB,
48
46
  */
49
- static from(guid: string, token: string, opts?: {
47
+ static from(guid: string, opts?: {
50
48
  subscribed?: boolean;
51
49
  }): Promise<Subscription | undefined>;
52
50
  /**
53
51
  * Loads an existing Subscription from the local DB an refreshes it,
54
52
  * or creates a new Subscription from the server if it does not exist locally.
55
53
  */
56
- static load(guid: string, opts: {
57
- token: string;
54
+ static load(guid: string, opts?: {
58
55
  reload?: boolean;
59
56
  missiontoken?: string;
60
57
  subscribed?: boolean;
@@ -69,6 +66,11 @@ export default class Subscription {
69
66
  }): Promise<void>;
70
67
  delete(): Promise<void>;
71
68
  headers(): Record<string, string>;
69
+ /**
70
+ * Update the Mission Token, propagating it to the sub-stores which
71
+ * each hold their own copy for generating MissionAuthorization headers
72
+ */
73
+ setMissionToken(token?: string): void;
72
74
  /**
73
75
  * Reload the Mission from the local Database
74
76
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tak-ps/cloudtak",
3
3
  "type": "module",
4
- "version": "13.55.1",
4
+ "version": "13.55.2",
5
5
  "types": "dist/types/plugin.d.ts",
6
6
  "files": [
7
7
  "dist/types"