@mj-biz-apps/common-server 5.43.0 → 5.45.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/dist/custom/activity-content-cipher.d.ts +63 -0
- package/dist/custom/activity-content-cipher.d.ts.map +1 -0
- package/dist/custom/activity-content-cipher.js +46 -0
- package/dist/custom/activity-content-cipher.js.map +1 -0
- package/dist/custom/get-party-signals.action.d.ts +21 -0
- package/dist/custom/get-party-signals.action.d.ts.map +1 -0
- package/dist/custom/get-party-signals.action.js +91 -0
- package/dist/custom/get-party-signals.action.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/package.json +7 -5
|
@@ -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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `Common.GetPartySignals` — the server-side union of every `Party Signals` query.
|
|
3
|
+
*
|
|
4
|
+
* Explorer's party pickers use the client store, which does this in the browser. This action is
|
|
5
|
+
* the same answer for everything that is not Angular: Skip, agents, MCP, and any report or script
|
|
6
|
+
* that needs to know which organizations and people are customers. One definition of "customer",
|
|
7
|
+
* discovered from metadata rather than hard-coded, so the two can never drift.
|
|
8
|
+
*
|
|
9
|
+
* Runs every query as the CALLING user, so the roster a caller gets back is the one their
|
|
10
|
+
* permissions allow. A query the user cannot read contributes nothing and is named in `Warnings`
|
|
11
|
+
* — a missing signal degrades ranking, it does not fail the call.
|
|
12
|
+
*/
|
|
13
|
+
import { BaseAction } from '@memberjunction/actions';
|
|
14
|
+
import type { ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
15
|
+
export declare class GetPartySignalsAction extends BaseAction {
|
|
16
|
+
protected InternalRunAction(params: RunActionParams): Promise<ActionResultSimple>;
|
|
17
|
+
private union;
|
|
18
|
+
private runSource;
|
|
19
|
+
}
|
|
20
|
+
export declare function LoadGetPartySignalsAction(): void;
|
|
21
|
+
//# sourceMappingURL=get-party-signals.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-party-signals.action.d.ts","sourceRoot":"","sources":["../../src/custom/get-party-signals.action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAe,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAsBrG,qBACa,qBAAsB,SAAQ,UAAU;cACjC,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;YAezE,KAAK;YAkBL,SAAS;CAoB1B;AAMD,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* `Common.GetPartySignals` — the server-side union of every `Party Signals` query.
|
|
9
|
+
*
|
|
10
|
+
* Explorer's party pickers use the client store, which does this in the browser. This action is
|
|
11
|
+
* the same answer for everything that is not Angular: Skip, agents, MCP, and any report or script
|
|
12
|
+
* that needs to know which organizations and people are customers. One definition of "customer",
|
|
13
|
+
* discovered from metadata rather than hard-coded, so the two can never drift.
|
|
14
|
+
*
|
|
15
|
+
* Runs every query as the CALLING user, so the roster a caller gets back is the one their
|
|
16
|
+
* permissions allow. A query the user cannot read contributes nothing and is named in `Warnings`
|
|
17
|
+
* — a missing signal degrades ranking, it does not fail the call.
|
|
18
|
+
*/
|
|
19
|
+
import { BaseAction } from '@memberjunction/actions';
|
|
20
|
+
import { RunQuery } from '@memberjunction/core';
|
|
21
|
+
import { QueryEngine } from '@memberjunction/core-entities';
|
|
22
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
23
|
+
import { MergePartySignalRows, ParseSignalNouns, PARTY_SIGNALS_CATEGORY, } from '@mj-biz-apps/common-entities';
|
|
24
|
+
function setOutput(params, name, value) {
|
|
25
|
+
const existing = params.Params?.find((p) => p.Name?.toLowerCase() === name.toLowerCase());
|
|
26
|
+
if (existing) {
|
|
27
|
+
existing.Value = value;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
params.Params = params.Params ?? [];
|
|
31
|
+
params.Params.push({ Name: name, Value: value, Type: 'Output' });
|
|
32
|
+
}
|
|
33
|
+
let GetPartySignalsAction = class GetPartySignalsAction extends BaseAction {
|
|
34
|
+
async InternalRunAction(params) {
|
|
35
|
+
if (!params.ContextUser) {
|
|
36
|
+
return { Success: false, ResultCode: 'VALIDATION_ERROR', Message: 'ContextUser is required.' };
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
return await this.union(params, params.ContextUser);
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
return {
|
|
43
|
+
Success: false,
|
|
44
|
+
ResultCode: 'ERROR',
|
|
45
|
+
Message: `GetPartySignals failed: ${messageOf(error)}`,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async union(params, user) {
|
|
50
|
+
const warnings = [];
|
|
51
|
+
await QueryEngine.Instance.Config(false, user);
|
|
52
|
+
const queries = QueryEngine.Instance.Queries.filter((query) => query.Category === PARTY_SIGNALS_CATEGORY);
|
|
53
|
+
const sources = await Promise.all(queries.map((query) => this.runSource(query.ID, query.Name, query.Description, user, warnings)));
|
|
54
|
+
const roster = MergePartySignalRows(sources);
|
|
55
|
+
setOutput(params, 'Roster', JSON.stringify(roster));
|
|
56
|
+
setOutput(params, 'Warnings', JSON.stringify(warnings));
|
|
57
|
+
return {
|
|
58
|
+
Success: true,
|
|
59
|
+
ResultCode: 'SUCCESS',
|
|
60
|
+
Message: `${roster.length} part${roster.length === 1 ? 'y' : 'ies'} from ${sources.length} signal quer${sources.length === 1 ? 'y' : 'ies'}`
|
|
61
|
+
+ `${warnings.length > 0 ? `, ${warnings.length} unavailable` : ''}.`,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
async runSource(id, name, description, user, warnings) {
|
|
65
|
+
const source = { QueryKey: name, ...ParseSignalNouns(description), Rows: [] };
|
|
66
|
+
try {
|
|
67
|
+
const result = await new RunQuery().RunQuery({ QueryID: id }, user);
|
|
68
|
+
if (result.Success) {
|
|
69
|
+
source.Rows = result.Results ?? [];
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
warnings.push(`${name}: ${result.ErrorMessage ?? 'failed'}`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
warnings.push(`${name}: ${messageOf(error)}`);
|
|
77
|
+
}
|
|
78
|
+
return source;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
GetPartySignalsAction = __decorate([
|
|
82
|
+
RegisterClass(BaseAction, 'Common.GetPartySignals')
|
|
83
|
+
], GetPartySignalsAction);
|
|
84
|
+
export { GetPartySignalsAction };
|
|
85
|
+
function messageOf(error) {
|
|
86
|
+
return error instanceof Error ? error.message : String(error);
|
|
87
|
+
}
|
|
88
|
+
export function LoadGetPartySignalsAction() {
|
|
89
|
+
void GetPartySignalsAction;
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=get-party-signals.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-party-signals.action.js","sourceRoot":"","sources":["../../src/custom/get-party-signals.action.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAiB,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EACH,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,GAGzB,MAAM,8BAA8B,CAAC;AAEtC,SAAS,SAAS,CAAC,MAAuB,EAAE,IAAY,EAAE,KAAc;IACpE,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;IAC1F,IAAI,QAAQ,EAAE,CAAC;QACX,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC;QACvB,OAAO;IACX,CAAC;IACD,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC;IACpC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAiB,CAAC,CAAC;AACpF,CAAC;AAGM,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,UAAU;IACvC,KAAK,CAAC,iBAAiB,CAAC,MAAuB;QACrD,IAAI,CAAC,MAAM,CAAC,WAAW,E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tDY,qBAAqB;IADjC,aAAa,CAAC,UAAU,EAAE,wBAAwB,CAAC;GACvC,qBAAqB,CAsDjC;;AAED,SAAS,SAAS,CAAC,KAAc;IAC7B,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,yBAAyB;IACrC,KAAK,qBAAqB,CAAC;AAC/B,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export declare const RESOLVER_PATHS: string[];
|
|
|
20
20
|
export declare function LoadBizAppsCommonServer(): void;
|
|
21
21
|
export { SyncActivitiesAction, LoadSyncActivitiesAction } from './custom/sync-activities.action.js';
|
|
22
22
|
export { LogActivityAction, LoadLogActivityAction } from './custom/log-activity.action.js';
|
|
23
|
+
export { GetPartySignalsAction, LoadGetPartySignalsAction } from './custom/get-party-signals.action.js';
|
|
23
24
|
export { GraphTransportFactory, LoadGraphTransportFactory } from './custom/graph-transport-factory.js';
|
|
25
|
+
export { MJActivityContentCipher, LoadActivityContentCipher } from './custom/activity-content-cipher.js';
|
|
24
26
|
export { LoadLiveMailboxPolicyFromEnv, ENV_GROUP, ENV_ACCEPTED_RISK, ENV_CONFIRMED_BY, ENV_CONFIRMED_AT, } from './custom/live-mailbox-policy.js';
|
|
25
27
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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;
|
|
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;AAUlD,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,CAsB9C;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,sCAAsC,CAAC;AACxG,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
|
@@ -14,8 +14,10 @@ import '@mj-biz-apps/common-core-entities-server';
|
|
|
14
14
|
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
|
+
import { LoadGetPartySignalsAction } from './custom/get-party-signals.action.js';
|
|
17
18
|
import { LoadGraphTransportFactory } from './custom/graph-transport-factory.js';
|
|
18
19
|
import { LoadLiveMailboxPolicyFromEnv } from './custom/live-mailbox-policy.js';
|
|
20
|
+
import { LoadActivityContentCipher } from './custom/activity-content-cipher.js';
|
|
19
21
|
// Import generated GraphQL resolvers
|
|
20
22
|
import './generated/generated.js';
|
|
21
23
|
// Re-export the manifest for consumers
|
|
@@ -36,6 +38,10 @@ export function LoadBizAppsCommonServer() {
|
|
|
36
38
|
LoadActivitySyncEngine();
|
|
37
39
|
LoadSyncActivitiesAction();
|
|
38
40
|
LoadLogActivityAction();
|
|
41
|
+
// The one server-side answer to "which organizations and people are our customers", unioned
|
|
42
|
+
// from every query apps ship in the Party Signals category. Explorer uses the client store;
|
|
43
|
+
// Skip, agents, MCP and reports come through here so the two definitions cannot drift.
|
|
44
|
+
LoadGetPartySignalsAction();
|
|
39
45
|
// Registers the seam that turns a connection's CredentialsRef into a live Graph transport.
|
|
40
46
|
// Nothing about this enables a live read on its own — the provider still refuses until this
|
|
41
47
|
// host attests that its app registration is scoped.
|
|
@@ -43,9 +49,16 @@ export function LoadBizAppsCommonServer() {
|
|
|
43
49
|
// And that attestation, when this deployment has one. Absent, every live read stays refused;
|
|
44
50
|
// partially configured, this THROWS during bootstrap rather than leaving a misleading refusal.
|
|
45
51
|
LoadLiveMailboxPolicyFromEnv();
|
|
52
|
+
// And the cipher that protects content captured from messages the engine declined to ingest.
|
|
53
|
+
// Registering it turns nothing on: retention is off unless a policy asks for it. What it does is
|
|
54
|
+
// make the engine's refusal, when a policy DOES ask, be about the policy rather than about this
|
|
55
|
+
// host being half-wired.
|
|
56
|
+
LoadActivityContentCipher();
|
|
46
57
|
}
|
|
47
58
|
export { SyncActivitiesAction, LoadSyncActivitiesAction } from './custom/sync-activities.action.js';
|
|
48
59
|
export { LogActivityAction, LoadLogActivityAction } from './custom/log-activity.action.js';
|
|
60
|
+
export { GetPartySignalsAction, LoadGetPartySignalsAction } from './custom/get-party-signals.action.js';
|
|
49
61
|
export { GraphTransportFactory, LoadGraphTransportFactory } from './custom/graph-transport-factory.js';
|
|
62
|
+
export { MJActivityContentCipher, LoadActivityContentCipher } from './custom/activity-content-cipher.js';
|
|
50
63
|
export { LoadLiveMailboxPolicyFromEnv, ENV_GROUP, ENV_ACCEPTED_RISK, ENV_CONFIRMED_BY, ENV_CONFIRMED_AT, } from './custom/live-mailbox-policy.js';
|
|
51
64
|
//# 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;AAChF,OAAO,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;
|
|
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,sCAAsC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAEhF,qCAAqC;AACrC,OAAO,0BAA0B,CAAC;AAKlC,uCAAuC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAA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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mj-biz-apps/common-server",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.45.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,10 +18,10 @@
|
|
|
18
18
|
"vitest": "^3.2.4"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@mj-biz-apps/common-activity-sync": "5.
|
|
22
|
-
"@mj-biz-apps/common-core-entities-server": "5.
|
|
23
|
-
"@mj-biz-apps/common-entities": "5.
|
|
24
|
-
"@mj-biz-apps/common-actions": "5.
|
|
21
|
+
"@mj-biz-apps/common-activity-sync": "5.45.0",
|
|
22
|
+
"@mj-biz-apps/common-core-entities-server": "5.45.0",
|
|
23
|
+
"@mj-biz-apps/common-entities": "5.45.0",
|
|
24
|
+
"@mj-biz-apps/common-actions": "5.45.0",
|
|
25
25
|
"class-validator": "^0.14.3"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
@@ -29,7 +29,9 @@
|
|
|
29
29
|
"@memberjunction/actions-base": "^6.1.0-edge.6",
|
|
30
30
|
"@memberjunction/communication-types": "^6.1.0-edge.6",
|
|
31
31
|
"@memberjunction/core": "^6.1.0-edge.6",
|
|
32
|
+
"@memberjunction/core-entities": "^6.1.0-edge.6",
|
|
32
33
|
"@memberjunction/credentials": "^6.1.0-edge.6",
|
|
34
|
+
"@memberjunction/encryption": "^6.1.0-edge.6",
|
|
33
35
|
"@memberjunction/global": "^6.1.0-edge.6",
|
|
34
36
|
"@memberjunction/server": "^6.1.0-edge.6",
|
|
35
37
|
"@memberjunction/sqlserver-dataprovider": "^6.1.0-edge.6"
|