@mj-biz-apps/common-server 5.42.0 → 5.44.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,63 @@
1
+ /**
2
+ * The cipher this host protects captured content with.
3
+ *
4
+ * WHAT IT IS FOR. `ActivitySyncRunDetail.CapturedContent` holds content from messages the engine
5
+ * deliberately declined to ingest, kept so an auditor asking "what was in the message you did not
6
+ * file?" has an answer. Its own description settles how: *"Ciphertext, always — never plaintext,
7
+ * whatever the policy... Encrypted through MJ's EncryptionEngine against an MJ: Encryption Keys row;
8
+ * this app never implements its own crypto."*
9
+ *
10
+ * WHY IT LIVES HERE. `common-activity-sync` holds to the second half of that sentence by taking no
11
+ * runtime dependency on the Encryption engine and asking a host for a cipher instead. This package
12
+ * already depends on MJ's engines, already runs at MJAPI startup, and already fills the other two
13
+ * seams the same way — so it fills this one too.
14
+ *
15
+ * That last part is the whole point. A seam nothing implements is the defect this subsystem keeps
16
+ * being cleaned of: `ActivityFileSink` is exported, documented and registered, and its `Store()` has
17
+ * no caller on any real path. This interface ships WITH its implementation so it never reaches that
18
+ * state.
19
+ *
20
+ * @module @mj-biz-apps/common-server
21
+ */
22
+ import type { UserInfo } from '@memberjunction/core';
23
+ import { type ActivityContentCipher } from '@mj-biz-apps/common-activity-sync';
24
+ /**
25
+ * Encrypts through MJ, and does nothing else.
26
+ *
27
+ * NO DECRYPTION, deliberately. `ActivityContentCipher` has one method because the sync engine never
28
+ * needs to read captured content back — that is an audit action performed by a person holding the
29
+ * key. An engine that cannot decrypt cannot leak, and keeping the interface to one direction means
30
+ * the capability is not sitting there to be misused later.
31
+ */
32
+ export declare class MJActivityContentCipher implements ActivityContentCipher {
33
+ /**
34
+ * The user is forwarded because the SEAM carries it, not because this engine needs it.
35
+ *
36
+ * `Encrypt` only consults `contextUser` when the engine has not been configured, and by the time
37
+ * any capture runs it always has: `setupSQLServerClient` calls `StartupManager.Startup()`, which
38
+ * configures this engine with a system user. That holds even when key validation FAILS — `Loaded`
39
+ * means the metadata loaded, and the key-material check is a separate step. Measured in a fresh
40
+ * process against a host with no usable key: with and without a user, `Encrypt` returns the same
41
+ * error either way.
42
+ *
43
+ * So this forwards an argument MJ does not presently read. It is still right to forward: MJ's own
44
+ * `ResolverBase` passes the user at both of its call sites rather than trusting startup, and the
45
+ * interface's contract is written for hosts whose cipher must reach key material as somebody.
46
+ *
47
+ * @throws whatever `EncryptionEngine` throws for a missing or unusable key. Throwing is correct:
48
+ * the engine records the failure as a run issue and saves the decision without content.
49
+ * The alternative — returning the plaintext, or an empty string — would put unprotected
50
+ * content in a column whose contract is "ciphertext, always".
51
+ */
52
+ Encrypt(plaintext: string, encryptionKeyID: string, contextUser: UserInfo): Promise<string>;
53
+ }
54
+ /**
55
+ * Register it. Called from `LoadBizAppsCommonServer` at MJAPI startup.
56
+ *
57
+ * Unconditional, and cheap to be so: registering a cipher does not turn retention on. Retention is
58
+ * off unless a provider type or connection sets `SkippedContentPolicy` above `None`, and the engine
59
+ * refuses to run at all if a policy asks for capture that this host cannot encrypt. Registering
60
+ * always means that refusal is about the POLICY being wrong, never about the host being half-wired.
61
+ */
62
+ export declare function LoadActivityContentCipher(): void;
63
+ //# sourceMappingURL=activity-content-cipher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity-content-cipher.d.ts","sourceRoot":"","sources":["../../src/custom/activity-content-cipher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAiC,KAAK,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE9G;;;;;;;GAOG;AACH,qBAAa,uBAAwB,YAAW,qBAAqB;IACjE;;;;;;;;;;;;;;;;;;OAkBG;IACU,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;CAG3G;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD"}
@@ -0,0 +1,46 @@
1
+ import { EncryptionEngine } from '@memberjunction/encryption';
2
+ import { RegisterActivityContentCipher } from '@mj-biz-apps/common-activity-sync';
3
+ /**
4
+ * Encrypts through MJ, and does nothing else.
5
+ *
6
+ * NO DECRYPTION, deliberately. `ActivityContentCipher` has one method because the sync engine never
7
+ * needs to read captured content back — that is an audit action performed by a person holding the
8
+ * key. An engine that cannot decrypt cannot leak, and keeping the interface to one direction means
9
+ * the capability is not sitting there to be misused later.
10
+ */
11
+ export class MJActivityContentCipher {
12
+ /**
13
+ * The user is forwarded because the SEAM carries it, not because this engine needs it.
14
+ *
15
+ * `Encrypt` only consults `contextUser` when the engine has not been configured, and by the time
16
+ * any capture runs it always has: `setupSQLServerClient` calls `StartupManager.Startup()`, which
17
+ * configures this engine with a system user. That holds even when key validation FAILS — `Loaded`
18
+ * means the metadata loaded, and the key-material check is a separate step. Measured in a fresh
19
+ * process against a host with no usable key: with and without a user, `Encrypt` returns the same
20
+ * error either way.
21
+ *
22
+ * So this forwards an argument MJ does not presently read. It is still right to forward: MJ's own
23
+ * `ResolverBase` passes the user at both of its call sites rather than trusting startup, and the
24
+ * interface's contract is written for hosts whose cipher must reach key material as somebody.
25
+ *
26
+ * @throws whatever `EncryptionEngine` throws for a missing or unusable key. Throwing is correct:
27
+ * the engine records the failure as a run issue and saves the decision without content.
28
+ * The alternative — returning the plaintext, or an empty string — would put unprotected
29
+ * content in a column whose contract is "ciphertext, always".
30
+ */
31
+ async Encrypt(plaintext, encryptionKeyID, contextUser) {
32
+ return EncryptionEngine.Instance.Encrypt(plaintext, encryptionKeyID, contextUser);
33
+ }
34
+ }
35
+ /**
36
+ * Register it. Called from `LoadBizAppsCommonServer` at MJAPI startup.
37
+ *
38
+ * Unconditional, and cheap to be so: registering a cipher does not turn retention on. Retention is
39
+ * off unless a provider type or connection sets `SkippedContentPolicy` above `None`, and the engine
40
+ * refuses to run at all if a policy asks for capture that this host cannot encrypt. Registering
41
+ * always means that refusal is about the POLICY being wrong, never about the host being half-wired.
42
+ */
43
+ export function LoadActivityContentCipher() {
44
+ RegisterActivityContentCipher(new MJActivityContentCipher());
45
+ }
46
+ //# sourceMappingURL=activity-content-cipher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity-content-cipher.js","sourceRoot":"","sources":["../../src/custom/activity-content-cipher.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,6BAA6B,EAA8B,MAAM,mCAAmC,CAAC;AAE9G;;;;;;;GAOG;AACH,MAAM,OAAO,uBAAuB;IAChC;;;;;;;;;;;;;;;;;;OAkBG;IACI,KAAK,CAAC,OAAO,CAAC,SAAiB,EAAE,eAAuB,EAAE,WAAqB;QAClF,OAAO,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,eAAe,EAAE,WAAW,CAAC,CAAC;IACtF,CAAC;CACJ;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB;IACrC,6BAA6B,CAAC,IAAI,uBAAuB,EAAE,CAAC,CAAC;AACjE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"graph-transport-factory.d.ts","sourceRoot":"","sources":["../../src/custom/graph-transport-factory.ts"],"names":[],"mappings":"AAoBA,OAAO,EACH,4BAA4B,EAI5B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAEhC,MAAM,mCAAmC,CAAC;AAK3C;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,wBAAwB,GAAG,wBAAwB,GAAG,IAAI,CAiBxG;AAgDD;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD;AAED,8EAA8E;AAC9E,OAAO,EAAE,4BAA4B,EAAE,CAAC"}
1
+ {"version":3,"file":"graph-transport-factory.d.ts","sourceRoot":"","sources":["../../src/custom/graph-transport-factory.ts"],"names":[],"mappings":"AAoBA,OAAO,EACH,4BAA4B,EAM5B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAGhC,MAAM,mCAAmC,CAAC;AAO3C;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,wBAAwB,GAAG,wBAAwB,GAAG,IAAI,CAoCxG;AA2DD;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD;AAED,8EAA8E;AAC9E,OAAO,EAAE,4BAA4B,EAAE,CAAC"}
@@ -17,9 +17,11 @@
17
17
  import { BaseCommunicationProvider } from '@memberjunction/communication-types';
18
18
  import { CredentialEngine } from '@memberjunction/credentials';
19
19
  import { MJGlobal } from '@memberjunction/global';
20
- import { GRAPH_COMMUNICATION_PROVIDER, GraphCommunicationTransport, MJGraphTransportDeps, RegisterActivityTransportFactory, } from '@mj-biz-apps/common-activity-sync';
21
- /** The `ActivitySyncProviderType.DriverClass` this factory serves. It serves exactly one. */
20
+ import { GRAPH_COMMUNICATION_PROVIDER, GraphCalendarTransport, GraphCommunicationTransport, MJGraphCalendarTransportDeps, MJGraphTransportDeps, RegisterActivityTransportFactory, } from '@mj-biz-apps/common-activity-sync';
21
+ /** `ActivitySyncProviderType.DriverClass` — the mail surface. */
22
22
  const MICROSOFT_365 = 'Microsoft365';
23
+ /** `ActivitySyncProviderType.CalendarDriverClass` — the calendar surface of the same connection. */
24
+ const MICROSOFT_365_CALENDAR = 'Microsoft365.Calendar';
23
25
  /**
24
26
  * Build a live Graph transport for one connection, or null when this factory cannot serve it.
25
27
  *
@@ -34,17 +36,32 @@ const MICROSOFT_365 = 'Microsoft365';
34
36
  * Anything else is a wiring fault and is left to throw.
35
37
  */
36
38
  export function GraphTransportFactory(context) {
37
- if (context.DriverClass !== MICROSOFT_365) {
39
+ const isMail = context.DriverClass === MICROSOFT_365;
40
+ const isCalendar = context.DriverClass === MICROSOFT_365_CALENDAR;
41
+ if (!isMail && !isCalendar) {
38
42
  return null;
39
43
  }
40
44
  const credentialName = (context.CredentialsRef ?? '').trim();
41
45
  if (!credentialName) {
42
46
  return null;
43
47
  }
44
- return new GraphCommunicationTransport(MJGraphTransportDeps({
48
+ // ONE FACTORY, TWO SURFACES, ONE CREDENTIAL. A connection configures a single CredentialsRef and
49
+ // both of its surfaces resolve through it — the same app registration holds Mail.Read and
50
+ // Calendars.Read, and the same Exchange policy scopes both. Separate factories would let a
51
+ // connection end up reading mail as one principal and calendar as another.
52
+ const shared = {
45
53
  CredentialName: credentialName,
46
54
  ContextUser: context.ContextUser,
47
55
  GetCredentialEngine: () => CredentialLoader(context.ContextUser),
56
+ };
57
+ if (isCalendar) {
58
+ return new GraphCalendarTransport(MJGraphCalendarTransportDeps({
59
+ ...shared,
60
+ GetCommunicationProvider: ResolveCommunicationProviderForEvents,
61
+ }));
62
+ }
63
+ return new GraphCommunicationTransport(MJGraphTransportDeps({
64
+ ...shared,
48
65
  GetCommunicationProvider: ResolveCommunicationProvider,
49
66
  }));
50
67
  }
@@ -89,6 +106,16 @@ function ResolveCommunicationProvider(name) {
89
106
  }
90
107
  return instance;
91
108
  }
109
+ /**
110
+ * The same registered provider, viewed as an event reader.
111
+ *
112
+ * Delegates rather than duplicating the base-class check: `ClassFactory.CreateInstance` returns an
113
+ * instance of the BASE class when no registration matches, so a missing provider comes back truthy
114
+ * and answers nothing usefully. That check is load-bearing and must not exist in two places.
115
+ */
116
+ function ResolveCommunicationProviderForEvents(name) {
117
+ return ResolveCommunicationProvider(name);
118
+ }
92
119
  /**
93
120
  * Register this host's factory. Called once from the package bootstrap.
94
121
  *
@@ -1 +1 @@
1
- {"version":3,"file":"graph-transport-factory.js","sourceRoot":"","sources":["../../src/custom/graph-transport-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;A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CAAC,YAAY,CAAC,cAAc,CAC1D,yBAAyB,EACzB,IAAI,CACP,CAAC;IACF,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,WAAW,CAAC,IAAI,KAAK,2BAA2B,EAAE,CAAC;QACzE,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,OAAO,QAAyC,CAAC;AACrD,CAAC;AAED;;;;;;GAMG;AACH,SAAS,qCAAqC,CAAC,IAAY;IACvD,OAAO,4BAA4B,CAAC,IAAI,CAAuC,CAAC;AACpF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB;IACrC,gCAAgC,CAAC,qBAAqB,CAAC,CAAC;AAC5D,CAAC;AAED,8EAA8E;AAC9E,OAAO,EAAE,4BAA4B,EAAE,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * The mail-enabled security group the Exchange assignment names — when the app IS restricted.
3
+ *
4
+ * Set this OR `ACTIVITY_SYNC_MAILBOX_POLICY_ACCEPTED_RISK`, never both. They record the two decisions
5
+ * an organisation actually makes, and claiming both would say the app is simultaneously restricted
6
+ * and knowingly unrestricted.
7
+ */
8
+ export declare const ENV_GROUP = "ACTIVITY_SYNC_MAILBOX_POLICY_GROUP";
9
+ /**
10
+ * A sentence saying what is being accepted — when the tenant-wide grant is accepted as-is.
11
+ *
12
+ * Adding an API permission in Entra and creating an Exchange RBAC assignment are different jobs owned
13
+ * by different people, and plenty of deployments will do the first and not the second. That is a
14
+ * legitimate outcome; refusing to model it would leave those deployments inventing a group name or
15
+ * bypassing the gate, and both destroy the record this exists to keep.
16
+ */
17
+ export declare const ENV_ACCEPTED_RISK = "ACTIVITY_SYNC_MAILBOX_POLICY_ACCEPTED_RISK";
18
+ /** Who verified the policy exists. A person — the decision needs an owner. */
19
+ export declare const ENV_CONFIRMED_BY = "ACTIVITY_SYNC_MAILBOX_POLICY_CONFIRMED_BY";
20
+ /** When they verified it, as an ISO-8601 date. Policies get deleted; staleness should be visible. */
21
+ export declare const ENV_CONFIRMED_AT = "ACTIVITY_SYNC_MAILBOX_POLICY_CONFIRMED_AT";
22
+ /**
23
+ * Read the attestation from the environment and register it, if this host has one.
24
+ *
25
+ * Returns true when live fetch was enabled, false when the host is not configured for it. Throws
26
+ * only on a configuration that is present but wrong — see "set all three or none" above.
27
+ *
28
+ * @param env the environment to read; injected so this is testable without mutating process.env.
29
+ */
30
+ export declare function LoadLiveMailboxPolicyFromEnv(env?: NodeJS.ProcessEnv): boolean;
31
+ //# sourceMappingURL=live-mailbox-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live-mailbox-policy.d.ts","sourceRoot":"","sources":["../../src/custom/live-mailbox-policy.ts"],"names":[],"mappings":"AAyBA;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,uCAAuC,CAAC;AAE9D;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,+CAA+C,CAAC;AAC9E,8EAA8E;AAC9E,eAAO,MAAM,gBAAgB,8CAA8C,CAAC;AAC5E,qGAAqG;AACrG,eAAO,MAAM,gBAAgB,8CAA8C,CAAC;AAO5E;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAmE1F"}
@@ -0,0 +1,107 @@
1
+ /**
2
+ * How THIS host says it is scoped to read real mailboxes.
3
+ *
4
+ * WHAT IT IS PROTECTING. `MSGraphProvider` authenticates app-only, so the `Mail.Read` APPLICATION
5
+ * permission is granted against the tenant, not against a mailbox: it reads EVERY mailbox in the
6
+ * organisation. The `Mailbox` column on a connection narrows what we ASK for, not what we are
7
+ * ALLOWED to read. Only an Exchange Application Access Policy, binding the app registration to a
8
+ * mail-enabled security group, narrows the grant itself.
9
+ *
10
+ * WHY ENVIRONMENT AND NOT A DATABASE ROW. `ActivitySyncConnection` is an ordinary editable entity.
11
+ * If the opt-in lived there, anyone who could edit a row could turn on tenant-wide mail reading from
12
+ * a form. Deployment configuration is the right altitude: changing it needs access to the host, and
13
+ * it is reviewed and deployed rather than typed. This is the same reasoning the package already
14
+ * applies to the transport itself — "a database row should not be able to reach in and swap it".
15
+ *
16
+ * SET ALL THREE OR NONE. A partial configuration THROWS rather than quietly staying off. Silently
17
+ * ignoring a half-filled opt-in is the failure this codebase keeps being written against: an
18
+ * operator who set two of three variables would see refusals, believe the policy was wrong, and go
19
+ * looking in Exchange for a fault that is in their .env.
20
+ *
21
+ * @module @mj-biz-apps/common-server
22
+ */
23
+ import { LogStatus } from '@memberjunction/core';
24
+ import { AllowLiveMailboxFetch } from '@mj-biz-apps/common-activity-sync';
25
+ /**
26
+ * The mail-enabled security group the Exchange assignment names — when the app IS restricted.
27
+ *
28
+ * Set this OR `ACTIVITY_SYNC_MAILBOX_POLICY_ACCEPTED_RISK`, never both. They record the two decisions
29
+ * an organisation actually makes, and claiming both would say the app is simultaneously restricted
30
+ * and knowingly unrestricted.
31
+ */
32
+ export const ENV_GROUP = 'ACTIVITY_SYNC_MAILBOX_POLICY_GROUP';
33
+ /**
34
+ * A sentence saying what is being accepted — when the tenant-wide grant is accepted as-is.
35
+ *
36
+ * Adding an API permission in Entra and creating an Exchange RBAC assignment are different jobs owned
37
+ * by different people, and plenty of deployments will do the first and not the second. That is a
38
+ * legitimate outcome; refusing to model it would leave those deployments inventing a group name or
39
+ * bypassing the gate, and both destroy the record this exists to keep.
40
+ */
41
+ export const ENV_ACCEPTED_RISK = 'ACTIVITY_SYNC_MAILBOX_POLICY_ACCEPTED_RISK';
42
+ /** Who verified the policy exists. A person — the decision needs an owner. */
43
+ export const ENV_CONFIRMED_BY = 'ACTIVITY_SYNC_MAILBOX_POLICY_CONFIRMED_BY';
44
+ /** When they verified it, as an ISO-8601 date. Policies get deleted; staleness should be visible. */
45
+ export const ENV_CONFIRMED_AT = 'ACTIVITY_SYNC_MAILBOX_POLICY_CONFIRMED_AT';
46
+ /** Required whichever decision was made. */
47
+ const ALWAYS = [ENV_CONFIRMED_BY, ENV_CONFIRMED_AT];
48
+ /** Exactly one of these says WHICH decision it was. */
49
+ const EITHER = [ENV_GROUP, ENV_ACCEPTED_RISK];
50
+ /**
51
+ * Read the attestation from the environment and register it, if this host has one.
52
+ *
53
+ * Returns true when live fetch was enabled, false when the host is not configured for it. Throws
54
+ * only on a configuration that is present but wrong — see "set all three or none" above.
55
+ *
56
+ * @param env the environment to read; injected so this is testable without mutating process.env.
57
+ */
58
+ export function LoadLiveMailboxPolicyFromEnv(env = process.env) {
59
+ const set = (k) => (env[k] ?? '').trim();
60
+ const present = [...ALWAYS, ...EITHER].filter((k) => set(k).length > 0);
61
+ if (present.length === 0) {
62
+ // The ordinary case for every host that has not opted in. Not an error, and not logged as
63
+ // one — the provider's own refusal already explains what is off and how to turn it on.
64
+ return false;
65
+ }
66
+ const missingAlways = ALWAYS.filter((k) => !set(k));
67
+ if (missingAlways.length > 0) {
68
+ throw new Error(`Live mailbox fetch is partially configured: ${missingAlways.join(', ')} missing. Whichever ` +
69
+ 'decision was made, it needs a name and a date — a partial opt-in stays OFF, and silently ' +
70
+ 'doing so would send you looking for an Exchange fault that is not there.');
71
+ }
72
+ const group = set(ENV_GROUP);
73
+ const acceptedRisk = set(ENV_ACCEPTED_RISK);
74
+ // EXACTLY ONE. Both would claim the app is restricted AND knowingly unrestricted; neither leaves
75
+ // the decision unstated while the other variables imply one was made.
76
+ if (group && acceptedRisk) {
77
+ throw new Error(`Set ${ENV_GROUP} or ${ENV_ACCEPTED_RISK}, not both. The first says the app is restricted to ` +
78
+ 'a group; the second says the tenant-wide grant was accepted as-is. They cannot both be true.');
79
+ }
80
+ if (!group && !acceptedRisk) {
81
+ throw new Error(`Set ${ENV_GROUP} when an Exchange assignment restricts the app to a security group, or ` +
82
+ `${ENV_ACCEPTED_RISK} to record that the tenant-wide grant was accepted and why. Live fetch ` +
83
+ 'stays off until one of them says which.');
84
+ }
85
+ const confirmedAt = new Date(set(ENV_CONFIRMED_AT));
86
+ if (Number.isNaN(confirmedAt.getTime())) {
87
+ throw new Error(`${ENV_CONFIRMED_AT} is not a valid date: "${env[ENV_CONFIRMED_AT]}". Use ISO-8601.`);
88
+ }
89
+ const common = { Confirmed: true, ConfirmedBy: set(ENV_CONFIRMED_BY), ConfirmedAt: confirmedAt };
90
+ AllowLiveMailboxFetch(group
91
+ ? { ...common, Scope: 'RestrictedToGroup', ScopedToGroup: group }
92
+ : { ...common, Scope: 'TenantWideAccepted', AcceptedRisk: acceptedRisk });
93
+ /**
94
+ * Say it out loud, once, at bootstrap.
95
+ *
96
+ * Without this the attestation is written and never read by anything: `ConfirmedAt` in particular
97
+ * exists because "policies get deleted; staleness should be visible", and nothing was making it
98
+ * visible — it was reachable only through `HostLiveMailboxPolicy()`, which has no callers. A
99
+ * recorded decision nobody surfaces is the same silent shape this package is being cleaned of.
100
+ *
101
+ * It also puts the fact in the host log at the moment it starts mattering: this line is the
102
+ * difference between an operator discovering that a host reads real mailboxes, and not.
103
+ */
104
+ LogStatus(`Activity Sync: LIVE mailbox fetch ENABLED — ${group ? `restricted to group "${group}"` : `tenant-wide grant accepted ("${acceptedRisk}")`}, confirmed by ${set(ENV_CONFIRMED_BY)} on ${confirmedAt.toISOString().slice(0, 10)}.`);
105
+ return true;
106
+ }
107
+ //# sourceMappingURL=live-mailbox-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live-mailbox-policy.js","sourceRoot":"","sources":["../../src/custom/live-mailbox-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE1E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,oCAAoC,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,4CAA4C,CAAC;AAC9E,8EAA8E;AAC9E,MAAM,CAAC,MAAM,gBAAgB,GAAG,2CAA2C,CAAC;AA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Server(): void;
21
21
  export { SyncActivitiesAction, LoadSyncActivitiesAction } from './custom/sync-activities.action.js';
22
22
  export { LogActivityAction, LoadLogActivityAction } from './custom/log-activity.action.js';
23
23
  export { GraphTransportFactory, LoadGraphTransportFactory } from './custom/graph-transport-factory.js';
24
+ export { MJActivityContentCipher, LoadActivityContentCipher } from './custom/activity-content-cipher.js';
25
+ export { LoadLiveMailboxPolicyFromEnv, ENV_GROUP, ENV_ACCEPTED_RISK, ENV_CONFIRMED_BY, ENV_CONFIRMED_AT, } from './custom/live-mailbox-policy.js';
24
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,8BAA8B,CAAC;AACtC,OAAO,6BAA6B,CAAC;AAIrC,OAAO,0CAA0C,CAAC;AAOlD,OAAO,0BAA0B,CAAC;AAMlC,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAOlF,oFAAoF;AACpF,eAAO,MAAM,cAAc,UAAsD,CAAC;AAElF;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAS9C;AAED,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,8BAA8B,CAAC;AACtC,OAAO,6BAA6B,CAAC;AAIrC,OAAO,0CAA0C,CAAC;AASlD,OAAO,0BAA0B,CAAC;AAMlC,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAOlF,oFAAoF;AACpF,eAAO,MAAM,cAAc,UAAsD,CAAC;AAElF;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAkB9C;AAED,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AACvG,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AACzG,OAAO,EACH,4BAA4B,EAC5B,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,GACnB,MAAM,iCAAiC,CAAC"}
package/dist/index.js CHANGED
@@ -15,6 +15,8 @@ import { LoadActivitySyncEngine } from '@mj-biz-apps/common-core-entities-server
15
15
  import { LoadSyncActivitiesAction } from './custom/sync-activities.action.js';
16
16
  import { LoadLogActivityAction } from './custom/log-activity.action.js';
17
17
  import { LoadGraphTransportFactory } from './custom/graph-transport-factory.js';
18
+ import { LoadLiveMailboxPolicyFromEnv } from './custom/live-mailbox-policy.js';
19
+ import { LoadActivityContentCipher } from './custom/activity-content-cipher.js';
18
20
  // Import generated GraphQL resolvers
19
21
  import './generated/generated.js';
20
22
  // Re-export the manifest for consumers
@@ -36,10 +38,21 @@ export function LoadBizAppsCommonServer() {
36
38
  LoadSyncActivitiesAction();
37
39
  LoadLogActivityAction();
38
40
  // Registers the seam that turns a connection's CredentialsRef into a live Graph transport.
39
- // Nothing about this enables a live read on its own — AllowLiveFetch still defaults false.
41
+ // Nothing about this enables a live read on its own — the provider still refuses until this
42
+ // host attests that its app registration is scoped.
40
43
  LoadGraphTransportFactory();
44
+ // And that attestation, when this deployment has one. Absent, every live read stays refused;
45
+ // partially configured, this THROWS during bootstrap rather than leaving a misleading refusal.
46
+ LoadLiveMailboxPolicyFromEnv();
47
+ // And the cipher that protects content captured from messages the engine declined to ingest.
48
+ // Registering it turns nothing on: retention is off unless a policy asks for it. What it does is
49
+ // make the engine's refusal, when a policy DOES ask, be about the policy rather than about this
50
+ // host being half-wired.
51
+ LoadActivityContentCipher();
41
52
  }
42
53
  export { SyncActivitiesAction, LoadSyncActivitiesAction } from './custom/sync-activities.action.js';
43
54
  export { LogActivityAction, LoadLogActivityAction } from './custom/log-activity.action.js';
44
55
  export { GraphTransportFactory, LoadGraphTransportFactory } from './custom/graph-transport-factory.js';
56
+ export { MJActivityContentCipher, LoadActivityContentCipher } from './custom/activity-content-cipher.js';
57
+ export { LoadLiveMailboxPolicyFromEnv, ENV_GROUP, ENV_ACCEPTED_RISK, ENV_CONFIRMED_BY, ENV_CONFIRMED_AT, } from './custom/live-mailbox-policy.js';
45
58
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,yEAAyE;AACzE,OAAO,8BAA8B,CAAC;AACtC,OAAO,6BAA6B,CAAC;AAErC,qEAAqE;AACrE,4DAA4D;AAC5D,OAAO,0CAA0C,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAEhF,qCAAqC;AACrC,OAAO,0BAA0B,CAAC;AAKlC,uCAAuC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,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U,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/D,oFAAoF;AACpF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,6BAA6B,CAAC,CAAC,CAAC;AAElF;;;;GAIG;AACH,MAAM,UAAU,uBAAuB;IACnC,0DAA0D;IAC1D,kFAAkF;IAClF,sBAAsB,EAAE,CAAC;IACzB,wBAAwB,EAAE,CAAC;IAC3B,qBAAqB,EAAE,CAAC;IACxB,2FAA2F;IAC3F,4FAA4F;IAC5F,oDAAoD;IACpD,yBAAyB,EAAE,CAAC;IAC5B,6FAA6F;IAC7F,+FAA+F;IAC/F,4BAA4B,EAAE,CAAC;IAC/B,6FAA6F;IAC7F,iGAAiG;IACjG,gGAAgG;IAChG,yBAAyB;IACzB,yBAAyB,EAAE,CAAC;AAChC,CAAC;AAED,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AACvG,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AACzG,OAAO,EACH,4BAA4B,EAC5B,SAAS,EACT,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,GACnB,MAAM,iCAAiC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mj-biz-apps/common-server",
3
3
  "type": "module",
4
- "version": "5.42.0",
4
+ "version": "5.44.0",
5
5
  "description": "BizApps Common server bootstrap - GraphQL resolvers and class registrations for the Common business entities Open App",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -18,21 +18,22 @@
18
18
  "vitest": "^3.2.4"
19
19
  },
20
20
  "dependencies": {
21
- "@mj-biz-apps/common-activity-sync": "5.42.0",
22
- "@mj-biz-apps/common-core-entities-server": "5.42.0",
23
- "@mj-biz-apps/common-entities": "5.42.0",
24
- "@mj-biz-apps/common-actions": "5.42.0",
21
+ "@mj-biz-apps/common-activity-sync": "5.44.0",
22
+ "@mj-biz-apps/common-core-entities-server": "5.44.0",
23
+ "@mj-biz-apps/common-entities": "5.44.0",
24
+ "@mj-biz-apps/common-actions": "5.44.0",
25
25
  "class-validator": "^0.14.3"
26
26
  },
27
27
  "peerDependencies": {
28
- "@memberjunction/actions": "^6.1.0-edge.5",
29
- "@memberjunction/actions-base": "^6.1.0-edge.5",
30
- "@memberjunction/communication-types": "^6.1.0-edge.5",
31
- "@memberjunction/core": "^6.1.0-edge.5",
32
- "@memberjunction/credentials": "^6.1.0-edge.5",
33
- "@memberjunction/global": "^6.1.0-edge.5",
34
- "@memberjunction/server": "^6.1.0-edge.5",
35
- "@memberjunction/sqlserver-dataprovider": "^6.1.0-edge.5"
28
+ "@memberjunction/actions": "^6.1.0-edge.6",
29
+ "@memberjunction/actions-base": "^6.1.0-edge.6",
30
+ "@memberjunction/communication-types": "^6.1.0-edge.6",
31
+ "@memberjunction/core": "^6.1.0-edge.6",
32
+ "@memberjunction/credentials": "^6.1.0-edge.6",
33
+ "@memberjunction/encryption": "^6.1.0-edge.6",
34
+ "@memberjunction/global": "^6.1.0-edge.6",
35
+ "@memberjunction/server": "^6.1.0-edge.6",
36
+ "@memberjunction/sqlserver-dataprovider": "^6.1.0-edge.6"
36
37
  },
37
38
  "repository": {
38
39
  "type": "git",
@@ -40,6 +41,7 @@
40
41
  },
41
42
  "scripts": {
42
43
  "build": "tsc && tsc-alias -f",
43
- "test": "vitest run"
44
+ "test": "tsc -p tsconfig.typecheck.json && vitest run",
45
+ "test:mutants": "node test-harnesses/mutate-checks.mjs"
44
46
  }
45
47
  }