@memberjunction/server 5.44.0 → 5.45.1
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/agentSessions/ReturningVisitorRecap.d.ts +39 -0
- package/dist/agentSessions/ReturningVisitorRecap.d.ts.map +1 -0
- package/dist/agentSessions/ReturningVisitorRecap.js +198 -0
- package/dist/agentSessions/ReturningVisitorRecap.js.map +1 -0
- package/dist/agentSessions/SessionJanitor.d.ts +13 -0
- package/dist/agentSessions/SessionJanitor.d.ts.map +1 -1
- package/dist/agentSessions/SessionJanitor.js +65 -7
- package/dist/agentSessions/SessionJanitor.js.map +1 -1
- package/dist/agentSessions/SessionManager.d.ts.map +1 -1
- package/dist/agentSessions/SessionManager.js +37 -0
- package/dist/agentSessions/SessionManager.js.map +1 -1
- package/dist/auth/magicLink/MagicLinkRouter.d.ts +10 -0
- package/dist/auth/magicLink/MagicLinkRouter.d.ts.map +1 -1
- package/dist/auth/magicLink/MagicLinkRouter.js +16 -0
- package/dist/auth/magicLink/MagicLinkRouter.js.map +1 -1
- package/dist/auth/magicLink/MagicLinkService.d.ts +7 -0
- package/dist/auth/magicLink/MagicLinkService.d.ts.map +1 -1
- package/dist/auth/magicLink/MagicLinkService.js +13 -3
- package/dist/auth/magicLink/MagicLinkService.js.map +1 -1
- package/dist/auth/magicLink/index.d.ts +1 -1
- package/dist/auth/magicLink/index.d.ts.map +1 -1
- package/dist/auth/magicLink/index.js +1 -1
- package/dist/auth/magicLink/index.js.map +1 -1
- package/dist/auth/magicLink/magicLinkCore.d.ts +38 -1
- package/dist/auth/magicLink/magicLinkCore.d.ts.map +1 -1
- package/dist/auth/magicLink/magicLinkCore.js +42 -19
- package/dist/auth/magicLink/magicLinkCore.js.map +1 -1
- package/dist/auth/magicLink/types.d.ts +26 -0
- package/dist/auth/magicLink/types.d.ts.map +1 -1
- package/dist/config.d.ts +1883 -144
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +160 -36
- package/dist/config.js.map +1 -1
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +45 -2
- package/dist/context.js.map +1 -1
- package/dist/generated/generated.d.ts +522 -0
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +2860 -0
- package/dist/generated/generated.js.map +1 -1
- package/dist/generic/ResolverBase.d.ts +13 -0
- package/dist/generic/ResolverBase.d.ts.map +1 -1
- package/dist/generic/ResolverBase.js +22 -0
- package/dist/generic/ResolverBase.js.map +1 -1
- package/dist/generic/RunViewResolver.d.ts.map +1 -1
- package/dist/generic/RunViewResolver.js +4 -0
- package/dist/generic/RunViewResolver.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +101 -3
- package/dist/index.js.map +1 -1
- package/dist/integration/CustomColumnPromoter.d.ts.map +1 -1
- package/dist/integration/CustomColumnPromoter.js +6 -0
- package/dist/integration/CustomColumnPromoter.js.map +1 -1
- package/dist/realtimeWidget/WidgetRouter.d.ts +26 -0
- package/dist/realtimeWidget/WidgetRouter.d.ts.map +1 -0
- package/dist/realtimeWidget/WidgetRouter.js +182 -0
- package/dist/realtimeWidget/WidgetRouter.js.map +1 -0
- package/dist/realtimeWidget/WidgetSessionService.d.ts +265 -0
- package/dist/realtimeWidget/WidgetSessionService.d.ts.map +1 -0
- package/dist/realtimeWidget/WidgetSessionService.js +477 -0
- package/dist/realtimeWidget/WidgetSessionService.js.map +1 -0
- package/dist/realtimeWidget/host-identity.d.ts +40 -0
- package/dist/realtimeWidget/host-identity.d.ts.map +1 -0
- package/dist/realtimeWidget/host-identity.js +58 -0
- package/dist/realtimeWidget/host-identity.js.map +1 -0
- package/dist/realtimeWidget/index.d.ts +10 -0
- package/dist/realtimeWidget/index.d.ts.map +1 -0
- package/dist/realtimeWidget/index.js +9 -0
- package/dist/realtimeWidget/index.js.map +1 -0
- package/dist/realtimeWidget/visitorIdentity.d.ts +76 -0
- package/dist/realtimeWidget/visitorIdentity.d.ts.map +1 -0
- package/dist/realtimeWidget/visitorIdentity.js +202 -0
- package/dist/realtimeWidget/visitorIdentity.js.map +1 -0
- package/dist/realtimeWidget/widgetCore.d.ts +106 -0
- package/dist/realtimeWidget/widgetCore.d.ts.map +1 -0
- package/dist/realtimeWidget/widgetCore.js +173 -0
- package/dist/realtimeWidget/widgetCore.js.map +1 -0
- package/dist/realtimeWidget/widgetGuestElevation.d.ts +51 -0
- package/dist/realtimeWidget/widgetGuestElevation.d.ts.map +1 -0
- package/dist/realtimeWidget/widgetGuestElevation.js +79 -0
- package/dist/realtimeWidget/widgetGuestElevation.js.map +1 -0
- package/dist/resolvers/ComponentRegistryResolver.d.ts +7 -0
- package/dist/resolvers/ComponentRegistryResolver.d.ts.map +1 -1
- package/dist/resolvers/ComponentRegistryResolver.js +31 -8
- package/dist/resolvers/ComponentRegistryResolver.js.map +1 -1
- package/dist/resolvers/EntityPermissionResolver.d.ts.map +1 -1
- package/dist/resolvers/EntityPermissionResolver.js +1 -2
- package/dist/resolvers/EntityPermissionResolver.js.map +1 -1
- package/dist/resolvers/QuerySystemUserResolver.d.ts +9 -6
- package/dist/resolvers/QuerySystemUserResolver.d.ts.map +1 -1
- package/dist/resolvers/QuerySystemUserResolver.js +15 -13
- package/dist/resolvers/QuerySystemUserResolver.js.map +1 -1
- package/dist/resolvers/RealtimeClientSessionResolver.d.ts +10 -0
- package/dist/resolvers/RealtimeClientSessionResolver.d.ts.map +1 -1
- package/dist/resolvers/RealtimeClientSessionResolver.js +47 -3
- package/dist/resolvers/RealtimeClientSessionResolver.js.map +1 -1
- package/dist/resolvers/RingCentralTelephonyResolver.d.ts +27 -0
- package/dist/resolvers/RingCentralTelephonyResolver.d.ts.map +1 -0
- package/dist/resolvers/RingCentralTelephonyResolver.js +87 -0
- package/dist/resolvers/RingCentralTelephonyResolver.js.map +1 -0
- package/dist/resolvers/RunAIAgentResolver.d.ts +9 -0
- package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +20 -4
- package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
- package/dist/resolvers/SearchKnowledgeResolver.d.ts.map +1 -1
- package/dist/resolvers/SearchKnowledgeResolver.js +2 -0
- package/dist/resolvers/SearchKnowledgeResolver.js.map +1 -1
- package/dist/resolvers/TeamsMeetingsResolver.d.ts +28 -0
- package/dist/resolvers/TeamsMeetingsResolver.d.ts.map +1 -0
- package/dist/resolvers/TeamsMeetingsResolver.js +91 -0
- package/dist/resolvers/TeamsMeetingsResolver.js.map +1 -0
- package/dist/resolvers/TelephonyResolver.d.ts +26 -0
- package/dist/resolvers/TelephonyResolver.d.ts.map +1 -0
- package/dist/resolvers/TelephonyResolver.js +86 -0
- package/dist/resolvers/TelephonyResolver.js.map +1 -0
- package/dist/resolvers/TestQuerySQLResolver.d.ts +1 -1
- package/dist/resolvers/TestQuerySQLResolver.d.ts.map +1 -1
- package/dist/resolvers/TestQuerySQLResolver.js +2 -3
- package/dist/resolvers/TestQuerySQLResolver.js.map +1 -1
- package/dist/resolvers/VonageTelephonyResolver.d.ts +26 -0
- package/dist/resolvers/VonageTelephonyResolver.d.ts.map +1 -0
- package/dist/resolvers/VonageTelephonyResolver.js +86 -0
- package/dist/resolvers/VonageTelephonyResolver.js.map +1 -0
- package/dist/rest/MediaStreamHandler.js +4 -1
- package/dist/rest/MediaStreamHandler.js.map +1 -1
- package/dist/telephony/RingCentralTelephonyService.d.ts +115 -0
- package/dist/telephony/RingCentralTelephonyService.d.ts.map +1 -0
- package/dist/telephony/RingCentralTelephonyService.js +262 -0
- package/dist/telephony/RingCentralTelephonyService.js.map +1 -0
- package/dist/telephony/TeamsMeetingsRouter.d.ts +40 -0
- package/dist/telephony/TeamsMeetingsRouter.d.ts.map +1 -0
- package/dist/telephony/TeamsMeetingsRouter.js +96 -0
- package/dist/telephony/TeamsMeetingsRouter.js.map +1 -0
- package/dist/telephony/TeamsMeetingsService.d.ts +113 -0
- package/dist/telephony/TeamsMeetingsService.d.ts.map +1 -0
- package/dist/telephony/TeamsMeetingsService.js +196 -0
- package/dist/telephony/TeamsMeetingsService.js.map +1 -0
- package/dist/telephony/TwilioTelephonyRouter.d.ts +36 -0
- package/dist/telephony/TwilioTelephonyRouter.d.ts.map +1 -0
- package/dist/telephony/TwilioTelephonyRouter.js +143 -0
- package/dist/telephony/TwilioTelephonyRouter.js.map +1 -0
- package/dist/telephony/TwilioTelephonyService.d.ts +95 -0
- package/dist/telephony/TwilioTelephonyService.d.ts.map +1 -0
- package/dist/telephony/TwilioTelephonyService.js +193 -0
- package/dist/telephony/TwilioTelephonyService.js.map +1 -0
- package/dist/telephony/VonageTelephonyRouter.d.ts +41 -0
- package/dist/telephony/VonageTelephonyRouter.d.ts.map +1 -0
- package/dist/telephony/VonageTelephonyRouter.js +201 -0
- package/dist/telephony/VonageTelephonyRouter.js.map +1 -0
- package/dist/telephony/VonageTelephonyService.d.ts +90 -0
- package/dist/telephony/VonageTelephonyService.d.ts.map +1 -0
- package/dist/telephony/VonageTelephonyService.js +191 -0
- package/dist/telephony/VonageTelephonyService.js.map +1 -0
- package/dist/telephony/calendar-scheduler.d.ts +67 -0
- package/dist/telephony/calendar-scheduler.d.ts.map +1 -0
- package/dist/telephony/calendar-scheduler.js +133 -0
- package/dist/telephony/calendar-scheduler.js.map +1 -0
- package/dist/telephony/index.d.ts +29 -0
- package/dist/telephony/index.d.ts.map +1 -0
- package/dist/telephony/index.js +38 -0
- package/dist/telephony/index.js.map +1 -0
- package/dist/telephony/media-upgrade-router.d.ts +33 -0
- package/dist/telephony/media-upgrade-router.d.ts.map +1 -0
- package/dist/telephony/media-upgrade-router.js +56 -0
- package/dist/telephony/media-upgrade-router.js.map +1 -0
- package/dist/telephony/ringcentral-runtime.d.ts +14 -0
- package/dist/telephony/ringcentral-runtime.d.ts.map +1 -0
- package/dist/telephony/ringcentral-runtime.js +18 -0
- package/dist/telephony/ringcentral-runtime.js.map +1 -0
- package/dist/telephony/teams-meetings-runtime.d.ts +16 -0
- package/dist/telephony/teams-meetings-runtime.d.ts.map +1 -0
- package/dist/telephony/teams-meetings-runtime.js +20 -0
- package/dist/telephony/teams-meetings-runtime.js.map +1 -0
- package/dist/telephony/teamsAcsMediaRegistry.d.ts +69 -0
- package/dist/telephony/teamsAcsMediaRegistry.d.ts.map +1 -0
- package/dist/telephony/teamsAcsMediaRegistry.js +118 -0
- package/dist/telephony/teamsAcsMediaRegistry.js.map +1 -0
- package/dist/telephony/telephony-runtime.d.ts +14 -0
- package/dist/telephony/telephony-runtime.d.ts.map +1 -0
- package/dist/telephony/telephony-runtime.js +18 -0
- package/dist/telephony/telephony-runtime.js.map +1 -0
- package/dist/telephony/twilioMediaRegistry.d.ts +60 -0
- package/dist/telephony/twilioMediaRegistry.d.ts.map +1 -0
- package/dist/telephony/twilioMediaRegistry.js +106 -0
- package/dist/telephony/twilioMediaRegistry.js.map +1 -0
- package/dist/telephony/vonage-runtime.d.ts +14 -0
- package/dist/telephony/vonage-runtime.d.ts.map +1 -0
- package/dist/telephony/vonage-runtime.js +18 -0
- package/dist/telephony/vonage-runtime.js.map +1 -0
- package/dist/telephony/vonageMediaRegistry.d.ts +78 -0
- package/dist/telephony/vonageMediaRegistry.d.ts.map +1 -0
- package/dist/telephony/vonageMediaRegistry.js +158 -0
- package/dist/telephony/vonageMediaRegistry.js.map +1 -0
- package/package.json +88 -83
- package/src/__tests__/RunAIAgentResolver.streaming.test.ts +128 -0
- package/src/__tests__/magicLink.test.ts +53 -3
- package/src/__tests__/search-knowledge-tags.test.ts +9 -9
- package/src/__tests__/teams-meetings-service.test.ts +65 -0
- package/src/__tests__/teamsAcsMediaRegistry.test.ts +82 -0
- package/src/__tests__/twilio-telephony-service.test.ts +23 -0
- package/src/__tests__/twilioMediaRegistry.test.ts +103 -0
- package/src/__tests__/vonageMediaRegistry.test.ts +180 -0
- package/src/__tests__/widget.test.ts +204 -0
- package/src/__tests__/widgetGuestElevation.test.ts +57 -0
- package/src/__tests__/widgetHostIdentity.test.ts +117 -0
- package/src/agentSessions/ReturningVisitorRecap.ts +242 -0
- package/src/agentSessions/SessionJanitor.ts +66 -6
- package/src/agentSessions/SessionManager.ts +38 -0
- package/src/auth/magicLink/MagicLinkRouter.ts +17 -0
- package/src/auth/magicLink/MagicLinkService.ts +13 -3
- package/src/auth/magicLink/index.ts +1 -0
- package/src/auth/magicLink/magicLinkCore.ts +48 -20
- package/src/auth/magicLink/types.ts +26 -0
- package/src/config.ts +172 -38
- package/src/context.ts +50 -3
- package/src/generated/generated.ts +1991 -1
- package/src/generic/ResolverBase.ts +28 -0
- package/src/generic/RunViewResolver.ts +4 -0
- package/src/index.ts +109 -3
- package/src/integration/CustomColumnPromoter.ts +6 -0
- package/src/realtimeWidget/WidgetRouter.ts +204 -0
- package/src/realtimeWidget/WidgetSessionService.ts +714 -0
- package/src/realtimeWidget/host-identity.ts +84 -0
- package/src/realtimeWidget/index.ts +15 -0
- package/src/realtimeWidget/visitorIdentity.ts +258 -0
- package/src/realtimeWidget/widgetCore.ts +231 -0
- package/src/realtimeWidget/widgetGuestElevation.ts +115 -0
- package/src/resolvers/ComponentRegistryResolver.ts +36 -10
- package/src/resolvers/EntityPermissionResolver.ts +1 -2
- package/src/resolvers/QuerySystemUserResolver.ts +14 -10
- package/src/resolvers/RealtimeClientSessionResolver.ts +59 -2
- package/src/resolvers/RingCentralTelephonyResolver.ts +64 -0
- package/src/resolvers/RunAIAgentResolver.ts +32 -8
- package/src/resolvers/SearchKnowledgeResolver.ts +2 -0
- package/src/resolvers/TeamsMeetingsResolver.ts +68 -0
- package/src/resolvers/TelephonyResolver.ts +63 -0
- package/src/resolvers/TestQuerySQLResolver.ts +2 -3
- package/src/resolvers/VonageTelephonyResolver.ts +63 -0
- package/src/rest/MediaStreamHandler.ts +4 -1
- package/src/telephony/RingCentralTelephonyService.ts +342 -0
- package/src/telephony/TeamsMeetingsRouter.ts +124 -0
- package/src/telephony/TeamsMeetingsService.ts +268 -0
- package/src/telephony/TwilioTelephonyRouter.ts +184 -0
- package/src/telephony/TwilioTelephonyService.ts +261 -0
- package/src/telephony/VonageTelephonyRouter.ts +239 -0
- package/src/telephony/VonageTelephonyService.ts +259 -0
- package/src/telephony/calendar-scheduler.ts +176 -0
- package/src/telephony/index.ts +43 -0
- package/src/telephony/media-upgrade-router.ts +62 -0
- package/src/telephony/ringcentral-runtime.ts +22 -0
- package/src/telephony/teams-meetings-runtime.ts +24 -0
- package/src/telephony/teamsAcsMediaRegistry.ts +152 -0
- package/src/telephony/telephony-runtime.ts +22 -0
- package/src/telephony/twilioMediaRegistry.ts +137 -0
- package/src/telephony/vonage-runtime.ts +22 -0
- package/src/telephony/vonageMediaRegistry.ts +200 -0
- package/dist/agents/skip-agent.d.ts +0 -111
- package/dist/agents/skip-agent.d.ts.map +0 -1
- package/dist/agents/skip-agent.js +0 -1487
- package/dist/agents/skip-agent.js.map +0 -1
- package/dist/agents/skip-sdk.d.ts +0 -261
- package/dist/agents/skip-sdk.d.ts.map +0 -1
- package/dist/agents/skip-sdk.js +0 -909
- package/dist/agents/skip-sdk.js.map +0 -1
- package/src/agents/skip-agent.ts +0 -1594
- package/src/agents/skip-sdk.ts +0 -1210
|
@@ -1508,6 +1508,10 @@ __decorate([
|
|
|
1508
1508
|
Field(() => [MJProcessRunDetail_]),
|
|
1509
1509
|
__metadata("design:type", Array)
|
|
1510
1510
|
], MJActionExecutionLog_.prototype, "MJProcessRunDetails_ActionExecutionLogIDArray", void 0);
|
|
1511
|
+
__decorate([
|
|
1512
|
+
Field(() => [MJUserRoutineRun_]),
|
|
1513
|
+
__metadata("design:type", Array)
|
|
1514
|
+
], MJActionExecutionLog_.prototype, "MJUserRoutineRuns_ActionExecutionLogIDArray", void 0);
|
|
1511
1515
|
MJActionExecutionLog_ = __decorate([
|
|
1512
1516
|
ObjectType({ description: `Tracks every execution of an action, including start and end times, inputs, outputs, and result codes.` })
|
|
1513
1517
|
], MJActionExecutionLog_);
|
|
@@ -1681,6 +1685,14 @@ let MJActionExecutionLogResolver = class MJActionExecutionLogResolver extends Re
|
|
|
1681
1685
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Process Run Details', rows, this.GetUserFromPayload(userPayload));
|
|
1682
1686
|
return result;
|
|
1683
1687
|
}
|
|
1688
|
+
async MJUserRoutineRuns_ActionExecutionLogIDArray(mjactionexecutionlog_, { userPayload, providers }, pubSub) {
|
|
1689
|
+
this.CheckUserReadPermissions('MJ: User Routine Runs', userPayload);
|
|
1690
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1691
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserRoutineRuns')} WHERE ${provider.QuoteIdentifier('ActionExecutionLogID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Routine Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
1692
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjactionexecutionlog_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
1693
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User Routine Runs', rows, this.GetUserFromPayload(userPayload));
|
|
1694
|
+
return result;
|
|
1695
|
+
}
|
|
1684
1696
|
async CreateMJActionExecutionLog(input, { providers, userPayload }, pubSub) {
|
|
1685
1697
|
const provider = GetReadWriteProvider(providers);
|
|
1686
1698
|
return this.CreateRecord('MJ: Action Execution Logs', input, provider, userPayload, pubSub);
|
|
@@ -1740,6 +1752,15 @@ __decorate([
|
|
|
1740
1752
|
__metadata("design:paramtypes", [MJActionExecutionLog_, Object, PubSubEngine]),
|
|
1741
1753
|
__metadata("design:returntype", Promise)
|
|
1742
1754
|
], MJActionExecutionLogResolver.prototype, "MJProcessRunDetails_ActionExecutionLogIDArray", null);
|
|
1755
|
+
__decorate([
|
|
1756
|
+
FieldResolver(() => [MJUserRoutineRun_]),
|
|
1757
|
+
__param(0, Root()),
|
|
1758
|
+
__param(1, Ctx()),
|
|
1759
|
+
__param(2, PubSub()),
|
|
1760
|
+
__metadata("design:type", Function),
|
|
1761
|
+
__metadata("design:paramtypes", [MJActionExecutionLog_, Object, PubSubEngine]),
|
|
1762
|
+
__metadata("design:returntype", Promise)
|
|
1763
|
+
], MJActionExecutionLogResolver.prototype, "MJUserRoutineRuns_ActionExecutionLogIDArray", null);
|
|
1743
1764
|
__decorate([
|
|
1744
1765
|
Mutation(() => MJActionExecutionLog_),
|
|
1745
1766
|
__param(0, Arg('input', () => CreateMJActionExecutionLogInput)),
|
|
@@ -11107,6 +11128,10 @@ __decorate([
|
|
|
11107
11128
|
Field({ nullable: true, description: `Human-readable notes and comments about this agent run step` }),
|
|
11108
11129
|
__metadata("design:type", String)
|
|
11109
11130
|
], MJAIAgentRunStep_.prototype, "Comments", void 0);
|
|
11131
|
+
__decorate([
|
|
11132
|
+
Field({ nullable: true, description: `JSON array of skill-invocation records (AgentSkillInvocation[]) associating this step with the skills involved in it, or NULL when no skills are in play. Each record carries SkillID, SkillName, ActivationType (requested = user /skill mention; auto = agent self-activation), Provenance of authority (the gate values that admitted the skill: AcceptsSkills, both ActivationMode dials, and who requested it), and an optional agent-stated Reason when self-activated. Population: Skill steps record the activation(s) they performed; Prompt steps record the full set of skills in effect for that turn; Actions and Sub-Agent steps record the skill(s) through which the executed tool became available (NULL means the tool was a native grant).` }),
|
|
11133
|
+
__metadata("design:type", String)
|
|
11134
|
+
], MJAIAgentRunStep_.prototype, "Skills", void 0);
|
|
11110
11135
|
__decorate([
|
|
11111
11136
|
Field({ nullable: true }),
|
|
11112
11137
|
MaxLength(255),
|
|
@@ -11219,6 +11244,10 @@ __decorate([
|
|
|
11219
11244
|
Field({ nullable: true }),
|
|
11220
11245
|
__metadata("design:type", String)
|
|
11221
11246
|
], CreateMJAIAgentRunStepInput.prototype, "Comments", void 0);
|
|
11247
|
+
__decorate([
|
|
11248
|
+
Field({ nullable: true }),
|
|
11249
|
+
__metadata("design:type", String)
|
|
11250
|
+
], CreateMJAIAgentRunStepInput.prototype, "Skills", void 0);
|
|
11222
11251
|
__decorate([
|
|
11223
11252
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
11224
11253
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -11312,6 +11341,10 @@ __decorate([
|
|
|
11312
11341
|
Field({ nullable: true }),
|
|
11313
11342
|
__metadata("design:type", String)
|
|
11314
11343
|
], UpdateMJAIAgentRunStepInput.prototype, "Comments", void 0);
|
|
11344
|
+
__decorate([
|
|
11345
|
+
Field({ nullable: true }),
|
|
11346
|
+
__metadata("design:type", String)
|
|
11347
|
+
], UpdateMJAIAgentRunStepInput.prototype, "Skills", void 0);
|
|
11315
11348
|
__decorate([
|
|
11316
11349
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
11317
11350
|
__metadata("design:type", Array)
|
|
@@ -11726,6 +11759,10 @@ __decorate([
|
|
|
11726
11759
|
MaxLength(36),
|
|
11727
11760
|
__metadata("design:type", String)
|
|
11728
11761
|
], MJAIAgentRun_.prototype, "AgentSessionID", void 0);
|
|
11762
|
+
__decorate([
|
|
11763
|
+
Field(() => Boolean, { description: `1 when this run executed under plan mode (whether via the per-request planMode flag or the agent's RequirePlanMode setting). Drives plan-mode indicators in the run UX and supports plan-drift auditing (comparing the approved plan against the steps that actually executed).` }),
|
|
11764
|
+
__metadata("design:type", Boolean)
|
|
11765
|
+
], MJAIAgentRun_.prototype, "PlanMode", void 0);
|
|
11729
11766
|
__decorate([
|
|
11730
11767
|
Field({ nullable: true }),
|
|
11731
11768
|
MaxLength(255),
|
|
@@ -11848,6 +11885,10 @@ __decorate([
|
|
|
11848
11885
|
Field(() => [MJExperimentSession_]),
|
|
11849
11886
|
__metadata("design:type", Array)
|
|
11850
11887
|
], MJAIAgentRun_.prototype, "MJExperimentSessions_AgentRunIDArray", void 0);
|
|
11888
|
+
__decorate([
|
|
11889
|
+
Field(() => [MJUserRoutineRun_]),
|
|
11890
|
+
__metadata("design:type", Array)
|
|
11891
|
+
], MJAIAgentRun_.prototype, "MJUserRoutineRuns_AgentRunIDArray", void 0);
|
|
11851
11892
|
MJAIAgentRun_ = __decorate([
|
|
11852
11893
|
ObjectType({ description: `Tracks individual execution runs of AI agents, including hierarchical sub-agent runs. Provides basic logging, state persistence, and resource tracking for agent executions. Supports pause/resume functionality through state serialization.` })
|
|
11853
11894
|
], MJAIAgentRun_);
|
|
@@ -12049,6 +12090,10 @@ __decorate([
|
|
|
12049
12090
|
Field({ nullable: true }),
|
|
12050
12091
|
__metadata("design:type", String)
|
|
12051
12092
|
], CreateMJAIAgentRunInput.prototype, "AgentSessionID", void 0);
|
|
12093
|
+
__decorate([
|
|
12094
|
+
Field(() => Boolean, { nullable: true }),
|
|
12095
|
+
__metadata("design:type", Boolean)
|
|
12096
|
+
], CreateMJAIAgentRunInput.prototype, "PlanMode", void 0);
|
|
12052
12097
|
__decorate([
|
|
12053
12098
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
12054
12099
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -12254,6 +12299,10 @@ __decorate([
|
|
|
12254
12299
|
Field({ nullable: true }),
|
|
12255
12300
|
__metadata("design:type", String)
|
|
12256
12301
|
], UpdateMJAIAgentRunInput.prototype, "AgentSessionID", void 0);
|
|
12302
|
+
__decorate([
|
|
12303
|
+
Field(() => Boolean, { nullable: true }),
|
|
12304
|
+
__metadata("design:type", Boolean)
|
|
12305
|
+
], UpdateMJAIAgentRunInput.prototype, "PlanMode", void 0);
|
|
12257
12306
|
__decorate([
|
|
12258
12307
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
12259
12308
|
__metadata("design:type", Array)
|
|
@@ -12429,6 +12478,14 @@ let MJAIAgentRunResolver = class MJAIAgentRunResolver extends ResolverBase {
|
|
|
12429
12478
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Experiment Sessions', rows, this.GetUserFromPayload(userPayload));
|
|
12430
12479
|
return result;
|
|
12431
12480
|
}
|
|
12481
|
+
async MJUserRoutineRuns_AgentRunIDArray(mjaiagentrun_, { userPayload, providers }, pubSub) {
|
|
12482
|
+
this.CheckUserReadPermissions('MJ: User Routine Runs', userPayload);
|
|
12483
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12484
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserRoutineRuns')} WHERE ${provider.QuoteIdentifier('AgentRunID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Routine Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
12485
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiagentrun_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
12486
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User Routine Runs', rows, this.GetUserFromPayload(userPayload));
|
|
12487
|
+
return result;
|
|
12488
|
+
}
|
|
12432
12489
|
async CreateMJAIAgentRun(input, { providers, userPayload }, pubSub) {
|
|
12433
12490
|
const provider = GetReadWriteProvider(providers);
|
|
12434
12491
|
return this.CreateRecord('MJ: AI Agent Runs', input, provider, userPayload, pubSub);
|
|
@@ -12596,6 +12653,15 @@ __decorate([
|
|
|
12596
12653
|
__metadata("design:paramtypes", [MJAIAgentRun_, Object, PubSubEngine]),
|
|
12597
12654
|
__metadata("design:returntype", Promise)
|
|
12598
12655
|
], MJAIAgentRunResolver.prototype, "MJExperimentSessions_AgentRunIDArray", null);
|
|
12656
|
+
__decorate([
|
|
12657
|
+
FieldResolver(() => [MJUserRoutineRun_]),
|
|
12658
|
+
__param(0, Root()),
|
|
12659
|
+
__param(1, Ctx()),
|
|
12660
|
+
__param(2, PubSub()),
|
|
12661
|
+
__metadata("design:type", Function),
|
|
12662
|
+
__metadata("design:paramtypes", [MJAIAgentRun_, Object, PubSubEngine]),
|
|
12663
|
+
__metadata("design:returntype", Promise)
|
|
12664
|
+
], MJAIAgentRunResolver.prototype, "MJUserRoutineRuns_AgentRunIDArray", null);
|
|
12599
12665
|
__decorate([
|
|
12600
12666
|
Mutation(() => MJAIAgentRun_),
|
|
12601
12667
|
__param(0, Arg('input', () => CreateMJAIAgentRunInput)),
|
|
@@ -14096,6 +14162,16 @@ __decorate([
|
|
|
14096
14162
|
MaxLength(36),
|
|
14097
14163
|
__metadata("design:type", String)
|
|
14098
14164
|
], MJAIAgentSession_.prototype, "RecordingFileID", void 0);
|
|
14165
|
+
__decorate([
|
|
14166
|
+
Field({ nullable: true, description: `Polymorphic counterparty-identity entity. Foreign key to Entity — identifies WHICH entity this realtime session's counterparty resolved to (e.g. User, a member/contact record, BizAppsCommon Person). Paired with LinkedRecordID via the CK_AIAgentSession_LinkBinding both-or-neither check, mirroring Conversation's linked pair. NULL while the session's counterparty is anonymous/unresolved.` }),
|
|
14167
|
+
MaxLength(36),
|
|
14168
|
+
__metadata("design:type", String)
|
|
14169
|
+
], MJAIAgentSession_.prototype, "LinkedEntityID", void 0);
|
|
14170
|
+
__decorate([
|
|
14171
|
+
Field({ nullable: true, description: `Polymorphic counterparty-identity record key. The primary-key value of the record (within LinkedEntityID's entity) this session resolved to, serialized as a string so any entity type can be referenced regardless of PK shape (UUID, int, composite). NVARCHAR(500), intentionally NOT FK-constrained. Used together with LinkedEntityID — see CK_AIAgentSession_LinkBinding. NULL while the session's counterparty is anonymous/unresolved.` }),
|
|
14172
|
+
MaxLength(500),
|
|
14173
|
+
__metadata("design:type", String)
|
|
14174
|
+
], MJAIAgentSession_.prototype, "LinkedRecordID", void 0);
|
|
14099
14175
|
__decorate([
|
|
14100
14176
|
Field({ nullable: true }),
|
|
14101
14177
|
MaxLength(255),
|
|
@@ -14116,6 +14192,11 @@ __decorate([
|
|
|
14116
14192
|
MaxLength(500),
|
|
14117
14193
|
__metadata("design:type", String)
|
|
14118
14194
|
], MJAIAgentSession_.prototype, "RecordingFile", void 0);
|
|
14195
|
+
__decorate([
|
|
14196
|
+
Field({ nullable: true }),
|
|
14197
|
+
MaxLength(255),
|
|
14198
|
+
__metadata("design:type", String)
|
|
14199
|
+
], MJAIAgentSession_.prototype, "LinkedEntity", void 0);
|
|
14119
14200
|
__decorate([
|
|
14120
14201
|
Field({ nullable: true }),
|
|
14121
14202
|
MaxLength(36),
|
|
@@ -14206,6 +14287,14 @@ __decorate([
|
|
|
14206
14287
|
Field({ nullable: true }),
|
|
14207
14288
|
__metadata("design:type", String)
|
|
14208
14289
|
], CreateMJAIAgentSessionInput.prototype, "RecordingFileID", void 0);
|
|
14290
|
+
__decorate([
|
|
14291
|
+
Field({ nullable: true }),
|
|
14292
|
+
__metadata("design:type", String)
|
|
14293
|
+
], CreateMJAIAgentSessionInput.prototype, "LinkedEntityID", void 0);
|
|
14294
|
+
__decorate([
|
|
14295
|
+
Field({ nullable: true }),
|
|
14296
|
+
__metadata("design:type", String)
|
|
14297
|
+
], CreateMJAIAgentSessionInput.prototype, "LinkedRecordID", void 0);
|
|
14209
14298
|
__decorate([
|
|
14210
14299
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
14211
14300
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -14275,6 +14364,14 @@ __decorate([
|
|
|
14275
14364
|
Field({ nullable: true }),
|
|
14276
14365
|
__metadata("design:type", String)
|
|
14277
14366
|
], UpdateMJAIAgentSessionInput.prototype, "RecordingFileID", void 0);
|
|
14367
|
+
__decorate([
|
|
14368
|
+
Field({ nullable: true }),
|
|
14369
|
+
__metadata("design:type", String)
|
|
14370
|
+
], UpdateMJAIAgentSessionInput.prototype, "LinkedEntityID", void 0);
|
|
14371
|
+
__decorate([
|
|
14372
|
+
Field({ nullable: true }),
|
|
14373
|
+
__metadata("design:type", String)
|
|
14374
|
+
], UpdateMJAIAgentSessionInput.prototype, "LinkedRecordID", void 0);
|
|
14278
14375
|
__decorate([
|
|
14279
14376
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
14280
14377
|
__metadata("design:type", Array)
|
|
@@ -16328,6 +16425,15 @@ __decorate([
|
|
|
16328
16425
|
MaxLength(20),
|
|
16329
16426
|
__metadata("design:type", String)
|
|
16330
16427
|
], MJAIAgent_.prototype, "AcceptsSkills", void 0);
|
|
16428
|
+
__decorate([
|
|
16429
|
+
Field({ description: `Controls whether this agent may ever self-activate skills from its prompt catalog. Auto: the agent sees its allowed skills whose own ActivationMode is Auto (double gate) and may activate them mid-run on its own judgment. RequestedOnly (default): the agent's prompt catalog is empty and skills only enter a run via an explicit user request (/skill mention). Orthogonal to AcceptsSkills, which governs which skills are available at all; this governs who may pull the activation trigger.` }),
|
|
16430
|
+
MaxLength(20),
|
|
16431
|
+
__metadata("design:type", String)
|
|
16432
|
+
], MJAIAgent_.prototype, "SkillActivationMode", void 0);
|
|
16433
|
+
__decorate([
|
|
16434
|
+
Field(() => Boolean, { description: `When 1, every root-level run of this agent executes in plan mode regardless of the per-request planMode flag — the agent must present a plan and receive human approval before any Actions or Sub-Agent steps execute. SupportsPlanMode is irrelevant when this is set. Use for high-consequence agents (e.g. ones with outbound-communication capabilities) where human-in-the-loop review is mandatory.` }),
|
|
16435
|
+
__metadata("design:type", Boolean)
|
|
16436
|
+
], MJAIAgent_.prototype, "RequirePlanMode", void 0);
|
|
16331
16437
|
__decorate([
|
|
16332
16438
|
Field({ nullable: true }),
|
|
16333
16439
|
MaxLength(255),
|
|
@@ -16533,6 +16639,10 @@ __decorate([
|
|
|
16533
16639
|
Field(() => [MJAIAgentSkill_]),
|
|
16534
16640
|
__metadata("design:type", Array)
|
|
16535
16641
|
], MJAIAgent_.prototype, "MJAIAgentSkills_AgentIDArray", void 0);
|
|
16642
|
+
__decorate([
|
|
16643
|
+
Field(() => [MJConversationWidgetInstance_]),
|
|
16644
|
+
__metadata("design:type", Array)
|
|
16645
|
+
], MJAIAgent_.prototype, "MJConversationWidgetInstances_PinnedAgentIDArray", void 0);
|
|
16536
16646
|
__decorate([
|
|
16537
16647
|
Field(() => [MJAISkillSubAgent_]),
|
|
16538
16648
|
__metadata("design:type", Array)
|
|
@@ -16834,6 +16944,14 @@ __decorate([
|
|
|
16834
16944
|
Field({ nullable: true }),
|
|
16835
16945
|
__metadata("design:type", String)
|
|
16836
16946
|
], CreateMJAIAgentInput.prototype, "AcceptsSkills", void 0);
|
|
16947
|
+
__decorate([
|
|
16948
|
+
Field({ nullable: true }),
|
|
16949
|
+
__metadata("design:type", String)
|
|
16950
|
+
], CreateMJAIAgentInput.prototype, "SkillActivationMode", void 0);
|
|
16951
|
+
__decorate([
|
|
16952
|
+
Field(() => Boolean, { nullable: true }),
|
|
16953
|
+
__metadata("design:type", Boolean)
|
|
16954
|
+
], CreateMJAIAgentInput.prototype, "RequirePlanMode", void 0);
|
|
16837
16955
|
__decorate([
|
|
16838
16956
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
16839
16957
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -17135,6 +17253,14 @@ __decorate([
|
|
|
17135
17253
|
Field({ nullable: true }),
|
|
17136
17254
|
__metadata("design:type", String)
|
|
17137
17255
|
], UpdateMJAIAgentInput.prototype, "AcceptsSkills", void 0);
|
|
17256
|
+
__decorate([
|
|
17257
|
+
Field({ nullable: true }),
|
|
17258
|
+
__metadata("design:type", String)
|
|
17259
|
+
], UpdateMJAIAgentInput.prototype, "SkillActivationMode", void 0);
|
|
17260
|
+
__decorate([
|
|
17261
|
+
Field(() => Boolean, { nullable: true }),
|
|
17262
|
+
__metadata("design:type", Boolean)
|
|
17263
|
+
], UpdateMJAIAgentInput.prototype, "RequirePlanMode", void 0);
|
|
17138
17264
|
__decorate([
|
|
17139
17265
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
17140
17266
|
__metadata("design:type", Array)
|
|
@@ -17486,6 +17612,14 @@ let MJAIAgentResolver = class MJAIAgentResolver extends ResolverBase {
|
|
|
17486
17612
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Skills', rows, this.GetUserFromPayload(userPayload));
|
|
17487
17613
|
return result;
|
|
17488
17614
|
}
|
|
17615
|
+
async MJConversationWidgetInstances_PinnedAgentIDArray(mjaiagent_, { userPayload, providers }, pubSub) {
|
|
17616
|
+
this.CheckUserReadPermissions('MJ: Conversation Widget Instances', userPayload);
|
|
17617
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
17618
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversationWidgetInstances')} WHERE ${provider.QuoteIdentifier('PinnedAgentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Widget Instances', userPayload, EntityPermissionType.Read, 'AND');
|
|
17619
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiagent_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
17620
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Widget Instances', rows, this.GetUserFromPayload(userPayload));
|
|
17621
|
+
return result;
|
|
17622
|
+
}
|
|
17489
17623
|
async MJAISkillSubAgents_SubAgentIDArray(mjaiagent_, { userPayload, providers }, pubSub) {
|
|
17490
17624
|
this.CheckUserReadPermissions('MJ: AI Skill Sub Agents', userPayload);
|
|
17491
17625
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -17859,6 +17993,15 @@ __decorate([
|
|
|
17859
17993
|
__metadata("design:paramtypes", [MJAIAgent_, Object, PubSubEngine]),
|
|
17860
17994
|
__metadata("design:returntype", Promise)
|
|
17861
17995
|
], MJAIAgentResolver.prototype, "MJAIAgentSkills_AgentIDArray", null);
|
|
17996
|
+
__decorate([
|
|
17997
|
+
FieldResolver(() => [MJConversationWidgetInstance_]),
|
|
17998
|
+
__param(0, Root()),
|
|
17999
|
+
__param(1, Ctx()),
|
|
18000
|
+
__param(2, PubSub()),
|
|
18001
|
+
__metadata("design:type", Function),
|
|
18002
|
+
__metadata("design:paramtypes", [MJAIAgent_, Object, PubSubEngine]),
|
|
18003
|
+
__metadata("design:returntype", Promise)
|
|
18004
|
+
], MJAIAgentResolver.prototype, "MJConversationWidgetInstances_PinnedAgentIDArray", null);
|
|
17862
18005
|
__decorate([
|
|
17863
18006
|
FieldResolver(() => [MJAISkillSubAgent_]),
|
|
17864
18007
|
__param(0, Root()),
|
|
@@ -26132,6 +26275,10 @@ __decorate([
|
|
|
26132
26275
|
Field(() => [MJDuplicateRunDetailMatch_]),
|
|
26133
26276
|
__metadata("design:type", Array)
|
|
26134
26277
|
], MJAIPromptRun_.prototype, "MJDuplicateRunDetailMatches_AIPromptRunIDArray", void 0);
|
|
26278
|
+
__decorate([
|
|
26279
|
+
Field(() => [MJUserRoutineRun_]),
|
|
26280
|
+
__metadata("design:type", Array)
|
|
26281
|
+
], MJAIPromptRun_.prototype, "MJUserRoutineRuns_PromptRunIDArray", void 0);
|
|
26135
26282
|
MJAIPromptRun_ = __decorate([
|
|
26136
26283
|
ObjectType({ description: `Tracks AI prompt executions including timings, inputs, outputs, and performance metrics.` })
|
|
26137
26284
|
], MJAIPromptRun_);
|
|
@@ -26977,6 +27124,14 @@ let MJAIPromptRunResolver = class MJAIPromptRunResolver extends ResolverBase {
|
|
|
26977
27124
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Duplicate Run Detail Matches', rows, this.GetUserFromPayload(userPayload));
|
|
26978
27125
|
return result;
|
|
26979
27126
|
}
|
|
27127
|
+
async MJUserRoutineRuns_PromptRunIDArray(mjaipromptrun_, { userPayload, providers }, pubSub) {
|
|
27128
|
+
this.CheckUserReadPermissions('MJ: User Routine Runs', userPayload);
|
|
27129
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
27130
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserRoutineRuns')} WHERE ${provider.QuoteIdentifier('PromptRunID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Routine Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
27131
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaipromptrun_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
27132
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User Routine Runs', rows, this.GetUserFromPayload(userPayload));
|
|
27133
|
+
return result;
|
|
27134
|
+
}
|
|
26980
27135
|
async CreateMJAIPromptRun(input, { providers, userPayload }, pubSub) {
|
|
26981
27136
|
const provider = GetReadWriteProvider(providers);
|
|
26982
27137
|
return this.CreateRecord('MJ: AI Prompt Runs', input, provider, userPayload, pubSub);
|
|
@@ -27090,6 +27245,15 @@ __decorate([
|
|
|
27090
27245
|
__metadata("design:paramtypes", [MJAIPromptRun_, Object, PubSubEngine]),
|
|
27091
27246
|
__metadata("design:returntype", Promise)
|
|
27092
27247
|
], MJAIPromptRunResolver.prototype, "MJDuplicateRunDetailMatches_AIPromptRunIDArray", null);
|
|
27248
|
+
__decorate([
|
|
27249
|
+
FieldResolver(() => [MJUserRoutineRun_]),
|
|
27250
|
+
__param(0, Root()),
|
|
27251
|
+
__param(1, Ctx()),
|
|
27252
|
+
__param(2, PubSub()),
|
|
27253
|
+
__metadata("design:type", Function),
|
|
27254
|
+
__metadata("design:paramtypes", [MJAIPromptRun_, Object, PubSubEngine]),
|
|
27255
|
+
__metadata("design:returntype", Promise)
|
|
27256
|
+
], MJAIPromptRunResolver.prototype, "MJUserRoutineRuns_PromptRunIDArray", null);
|
|
27093
27257
|
__decorate([
|
|
27094
27258
|
Mutation(() => MJAIPromptRun_),
|
|
27095
27259
|
__param(0, Arg('input', () => CreateMJAIPromptRunInput)),
|
|
@@ -30134,6 +30298,11 @@ __decorate([
|
|
|
30134
30298
|
Field(),
|
|
30135
30299
|
__metadata("design:type", Date)
|
|
30136
30300
|
], MJAISkill_.prototype, "_mj__UpdatedAt", void 0);
|
|
30301
|
+
__decorate([
|
|
30302
|
+
Field({ description: `Controls whether this skill may ever be self-activated by an agent. Auto: the skill may appear in accepting agents' prompt catalogs and be activated mid-run on agent judgment — but only for agents whose own SkillActivationMode is also Auto (double gate). RequestedOnly (default): the skill is excluded from prompt catalogs entirely and can only be activated when the user explicitly requests it for the run (a /skill mention flowing through ExecuteAgentParams.requestedSkillIDs). All other activation gates (AcceptsSkills, skill Status, per-agent assignment, user Run permission) apply unchanged in both modes.` }),
|
|
30303
|
+
MaxLength(20),
|
|
30304
|
+
__metadata("design:type", String)
|
|
30305
|
+
], MJAISkill_.prototype, "ActivationMode", void 0);
|
|
30137
30306
|
__decorate([
|
|
30138
30307
|
Field(),
|
|
30139
30308
|
MaxLength(100),
|
|
@@ -30200,6 +30369,10 @@ __decorate([
|
|
|
30200
30369
|
Field({ nullable: true }),
|
|
30201
30370
|
__metadata("design:type", String)
|
|
30202
30371
|
], CreateMJAISkillInput.prototype, "CreatedByUserID", void 0);
|
|
30372
|
+
__decorate([
|
|
30373
|
+
Field({ nullable: true }),
|
|
30374
|
+
__metadata("design:type", String)
|
|
30375
|
+
], CreateMJAISkillInput.prototype, "ActivationMode", void 0);
|
|
30203
30376
|
__decorate([
|
|
30204
30377
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
30205
30378
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -30249,6 +30422,10 @@ __decorate([
|
|
|
30249
30422
|
Field({ nullable: true }),
|
|
30250
30423
|
__metadata("design:type", String)
|
|
30251
30424
|
], UpdateMJAISkillInput.prototype, "CreatedByUserID", void 0);
|
|
30425
|
+
__decorate([
|
|
30426
|
+
Field({ nullable: true }),
|
|
30427
|
+
__metadata("design:type", String)
|
|
30428
|
+
], UpdateMJAISkillInput.prototype, "ActivationMode", void 0);
|
|
30252
30429
|
__decorate([
|
|
30253
30430
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
30254
30431
|
__metadata("design:type", Array)
|
|
@@ -34588,6 +34765,10 @@ __decorate([
|
|
|
34588
34765
|
Field(() => [MJMagicLinkInvite_]),
|
|
34589
34766
|
__metadata("design:type", Array)
|
|
34590
34767
|
], MJApplication_.prototype, "MJMagicLinkInvites_ApplicationIDArray", void 0);
|
|
34768
|
+
__decorate([
|
|
34769
|
+
Field(() => [MJConversationWidgetInstance_]),
|
|
34770
|
+
__metadata("design:type", Array)
|
|
34771
|
+
], MJApplication_.prototype, "MJConversationWidgetInstances_ApplicationIDArray", void 0);
|
|
34591
34772
|
MJApplication_ = __decorate([
|
|
34592
34773
|
ObjectType({ description: `Applications are used to group entities in the user interface for ease of user access` })
|
|
34593
34774
|
], MJApplication_);
|
|
@@ -34897,6 +35078,14 @@ let MJApplicationResolver = class MJApplicationResolver extends ResolverBase {
|
|
|
34897
35078
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Magic Link Invites', rows, this.GetUserFromPayload(userPayload));
|
|
34898
35079
|
return result;
|
|
34899
35080
|
}
|
|
35081
|
+
async MJConversationWidgetInstances_ApplicationIDArray(mjapplication_, { userPayload, providers }, pubSub) {
|
|
35082
|
+
this.CheckUserReadPermissions('MJ: Conversation Widget Instances', userPayload);
|
|
35083
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
35084
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversationWidgetInstances')} WHERE ${provider.QuoteIdentifier('ApplicationID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Widget Instances', userPayload, EntityPermissionType.Read, 'AND');
|
|
35085
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjapplication_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
35086
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Widget Instances', rows, this.GetUserFromPayload(userPayload));
|
|
35087
|
+
return result;
|
|
35088
|
+
}
|
|
34900
35089
|
async CreateMJApplication(input, { providers, userPayload }, pubSub) {
|
|
34901
35090
|
const provider = GetReadWriteProvider(providers);
|
|
34902
35091
|
return this.CreateRecord('MJ: Applications', input, provider, userPayload, pubSub);
|
|
@@ -35036,6 +35225,15 @@ __decorate([
|
|
|
35036
35225
|
__metadata("design:paramtypes", [MJApplication_, Object, PubSubEngine]),
|
|
35037
35226
|
__metadata("design:returntype", Promise)
|
|
35038
35227
|
], MJApplicationResolver.prototype, "MJMagicLinkInvites_ApplicationIDArray", null);
|
|
35228
|
+
__decorate([
|
|
35229
|
+
FieldResolver(() => [MJConversationWidgetInstance_]),
|
|
35230
|
+
__param(0, Root()),
|
|
35231
|
+
__param(1, Ctx()),
|
|
35232
|
+
__param(2, PubSub()),
|
|
35233
|
+
__metadata("design:type", Function),
|
|
35234
|
+
__metadata("design:paramtypes", [MJApplication_, Object, PubSubEngine]),
|
|
35235
|
+
__metadata("design:returntype", Promise)
|
|
35236
|
+
], MJApplicationResolver.prototype, "MJConversationWidgetInstances_ApplicationIDArray", null);
|
|
35039
35237
|
__decorate([
|
|
35040
35238
|
Mutation(() => MJApplication_),
|
|
35041
35239
|
__param(0, Arg('input', () => CreateMJApplicationInput)),
|
|
@@ -55677,6 +55875,422 @@ MJConversationDetailResolver = __decorate([
|
|
|
55677
55875
|
], MJConversationDetailResolver);
|
|
55678
55876
|
export { MJConversationDetailResolver };
|
|
55679
55877
|
//****************************************************************************
|
|
55878
|
+
// ENTITY CLASS for MJ: Conversation Widget Instances
|
|
55879
|
+
//****************************************************************************
|
|
55880
|
+
let MJConversationWidgetInstance_ = class MJConversationWidgetInstance_ {
|
|
55881
|
+
};
|
|
55882
|
+
__decorate([
|
|
55883
|
+
Field(),
|
|
55884
|
+
MaxLength(36),
|
|
55885
|
+
__metadata("design:type", String)
|
|
55886
|
+
], MJConversationWidgetInstance_.prototype, "ID", void 0);
|
|
55887
|
+
__decorate([
|
|
55888
|
+
Field({ description: `Human-readable name for this widget deployment (e.g. "Acme Marketing Site Support").` }),
|
|
55889
|
+
MaxLength(255),
|
|
55890
|
+
__metadata("design:type", String)
|
|
55891
|
+
], MJConversationWidgetInstance_.prototype, "Name", void 0);
|
|
55892
|
+
__decorate([
|
|
55893
|
+
Field({ description: `Public, non-secret embed key (e.g. "pk_live_…") placed in the host page's data-widget-key attribute. Used to resolve this configuration at POST /widget/session. Unique. Not a credential — security comes from the origin allowlist, rate limits, the restricted guest role, and short-lived minted tokens.` }),
|
|
55894
|
+
MaxLength(100),
|
|
55895
|
+
__metadata("design:type", String)
|
|
55896
|
+
], MJConversationWidgetInstance_.prototype, "PublicKey", void 0);
|
|
55897
|
+
__decorate([
|
|
55898
|
+
Field({ description: `Foreign key to Application — the single app a guest session is scoped to. Mirrors the magic-link single-application model.` }),
|
|
55899
|
+
MaxLength(36),
|
|
55900
|
+
__metadata("design:type", String)
|
|
55901
|
+
], MJConversationWidgetInstance_.prototype, "ApplicationID", void 0);
|
|
55902
|
+
__decorate([
|
|
55903
|
+
Field({ description: `Foreign key to AIAgent — the support agent that is PINNED for every turn (passed as explicitAgentId). D5: pinning fixes which agent runs; combined with the restricted guest role it prevents a public visitor from reaching arbitrary agents/data. The pinned agent's own tool/handoff surface should be support-scoped.` }),
|
|
55904
|
+
MaxLength(36),
|
|
55905
|
+
__metadata("design:type", String)
|
|
55906
|
+
], MJConversationWidgetInstance_.prototype, "PinnedAgentID", void 0);
|
|
55907
|
+
__decorate([
|
|
55908
|
+
Field({ description: `Foreign key to Role — the restricted guest role assigned to the synthesized guest principal. This role's entity permissions are the real authorization boundary (read/write only the visitor's own Conversation + Conversation Details). Roles ride per-session JWT claims, not DB rows on the shared Anonymous principal.` }),
|
|
55909
|
+
MaxLength(36),
|
|
55910
|
+
__metadata("design:type", String)
|
|
55911
|
+
], MJConversationWidgetInstance_.prototype, "GuestRoleID", void 0);
|
|
55912
|
+
__decorate([
|
|
55913
|
+
Field({ nullable: true, description: `Allowed embedding origins for this widget, as a JSON array of origin strings (e.g. ["https://www.acme.com","https://acme.com"]). Enforced both at mint (POST /widget/session rejects unlisted Origin) and via CORS. NULL or empty means no origin is allowed (fail-closed).` }),
|
|
55914
|
+
__metadata("design:type", String)
|
|
55915
|
+
], MJConversationWidgetInstance_.prototype, "AllowedOrigins", void 0);
|
|
55916
|
+
__decorate([
|
|
55917
|
+
Field({ description: `Which modalities this widget exposes: Text (chat only), Voice (client-direct realtime only), or Both. Gates whether the realtime-mint path is offered to the guest.` }),
|
|
55918
|
+
MaxLength(10),
|
|
55919
|
+
__metadata("design:type", String)
|
|
55920
|
+
], MJConversationWidgetInstance_.prototype, "Modality", void 0);
|
|
55921
|
+
__decorate([
|
|
55922
|
+
Field({ description: `Pluggable public-auth strategy (D1): Anonymous (guest-first, default), MagicLinkUpgrade (guest may escalate to an email-verified session), or HostIdentity (an authenticated host portal posts a signed identity assertion exchanged for an MJ guest JWT). All three converge on AuthProviderFactory + buildMagicLinkSessionUser.` }),
|
|
55923
|
+
MaxLength(20),
|
|
55924
|
+
__metadata("design:type", String)
|
|
55925
|
+
], MJConversationWidgetInstance_.prototype, "AuthStrategy", void 0);
|
|
55926
|
+
__decorate([
|
|
55927
|
+
Field({ description: `Lifecycle status. Active widgets mint sessions; Disabled widgets reject all mints (used to turn off a deployment without deleting its config).` }),
|
|
55928
|
+
MaxLength(20),
|
|
55929
|
+
__metadata("design:type", String)
|
|
55930
|
+
], MJConversationWidgetInstance_.prototype, "Status", void 0);
|
|
55931
|
+
__decorate([
|
|
55932
|
+
Field(() => Int, { description: `Time-to-live in minutes for a minted guest session JWT. Short by design (default 15) to limit replay/theft; the widget refreshes before expiry. Capped at 1440 (24h).` }),
|
|
55933
|
+
__metadata("design:type", Number)
|
|
55934
|
+
], MJConversationWidgetInstance_.prototype, "SessionTTLMinutes", void 0);
|
|
55935
|
+
__decorate([
|
|
55936
|
+
Field(() => Int, { description: `Maximum number of guest-session mints allowed per minute per source IP/origin for this widget. Reuses the magic-link rate-limit pattern.` }),
|
|
55937
|
+
__metadata("design:type", Number)
|
|
55938
|
+
], MJConversationWidgetInstance_.prototype, "RateLimitPerMinute", void 0);
|
|
55939
|
+
__decorate([
|
|
55940
|
+
Field(() => Int, { nullable: true, description: `Optional hard ceiling (minutes) on a single voice session's duration for this widget. NULL means fall back to the server-wide default. Voice is the biggest cost/abuse surface; the SessionJanitor enforces this server-side (W4).` }),
|
|
55941
|
+
__metadata("design:type", Number)
|
|
55942
|
+
], MJConversationWidgetInstance_.prototype, "VoiceMaxSessionMinutes", void 0);
|
|
55943
|
+
__decorate([
|
|
55944
|
+
Field({ nullable: true, description: `Which MJ interactive channels this widget may attach when a voice session is active, as a JSON array of channel names (e.g. ["Whiteboard"]). Resolved client-side through MJGlobal.ClassFactory the same way the realtime client driver is resolved; each named channel is scoped by the existing Widget Guest RLS on AI Agent Session Channels. NULL or empty array = no channels (the backwards-compatible default). Remote Browser, given its control surface, should only be listed when a deployment explicitly opts in.` }),
|
|
55945
|
+
__metadata("design:type", String)
|
|
55946
|
+
], MJConversationWidgetInstance_.prototype, "EnabledChannels", void 0);
|
|
55947
|
+
__decorate([
|
|
55948
|
+
Field({ nullable: true, description: `PEM-encoded RS256 public key for the host-identity auth strategy (D1). When AuthStrategy is HostIdentity, the host signs a short-lived identity assertion with its private key; the HostIdentityProvider verifies it against this per-instance key. Supersedes the interim config map (mj.config.cjs hostPublicKeys keyed by PublicKey). NULL when the widget does not use host identity; a HostIdentity widget with no key fails closed at mint.` }),
|
|
55949
|
+
__metadata("design:type", String)
|
|
55950
|
+
], MJConversationWidgetInstance_.prototype, "HostPublicKey", void 0);
|
|
55951
|
+
__decorate([
|
|
55952
|
+
Field(() => Boolean, { description: `Returning-visitor memory opt-in (R6). When 0 (default) this widget sets no durable visitor cookie and writes no cross-session recap — fully off. When 1, the widget mints a durable VisitorKey cookie, links each new Conversation to the visitor's prior one, and writes a recap memory note on close so a returning visitor's agent opens with prior context.` }),
|
|
55953
|
+
__metadata("design:type", Boolean)
|
|
55954
|
+
], MJConversationWidgetInstance_.prototype, "RememberReturningVisitors", void 0);
|
|
55955
|
+
__decorate([
|
|
55956
|
+
Field(() => Int, { nullable: true, description: `Retention window (days) for returning-visitor recap memory notes generated by this widget. NULL means use the system default. Past this window the visitor's auto-generated recap notes decay/archive via the Memory Manager. Ignored when RememberReturningVisitors = 0.` }),
|
|
55957
|
+
__metadata("design:type", Number)
|
|
55958
|
+
], MJConversationWidgetInstance_.prototype, "VisitorMemoryRetentionDays", void 0);
|
|
55959
|
+
__decorate([
|
|
55960
|
+
Field(),
|
|
55961
|
+
__metadata("design:type", Date)
|
|
55962
|
+
], MJConversationWidgetInstance_.prototype, "_mj__CreatedAt", void 0);
|
|
55963
|
+
__decorate([
|
|
55964
|
+
Field(),
|
|
55965
|
+
__metadata("design:type", Date)
|
|
55966
|
+
], MJConversationWidgetInstance_.prototype, "_mj__UpdatedAt", void 0);
|
|
55967
|
+
__decorate([
|
|
55968
|
+
Field(),
|
|
55969
|
+
MaxLength(100),
|
|
55970
|
+
__metadata("design:type", String)
|
|
55971
|
+
], MJConversationWidgetInstance_.prototype, "Application", void 0);
|
|
55972
|
+
__decorate([
|
|
55973
|
+
Field({ nullable: true }),
|
|
55974
|
+
MaxLength(255),
|
|
55975
|
+
__metadata("design:type", String)
|
|
55976
|
+
], MJConversationWidgetInstance_.prototype, "PinnedAgent", void 0);
|
|
55977
|
+
__decorate([
|
|
55978
|
+
Field(),
|
|
55979
|
+
MaxLength(50),
|
|
55980
|
+
__metadata("design:type", String)
|
|
55981
|
+
], MJConversationWidgetInstance_.prototype, "GuestRole", void 0);
|
|
55982
|
+
MJConversationWidgetInstance_ = __decorate([
|
|
55983
|
+
ObjectType({ description: `Durable per-deployment configuration for one embeddable public support widget (text and/or voice). One row per site/embed. Resolves a public widget key to its application scope, pinned support agent, restricted guest role, allowed origins, modality, auth strategy, and abuse ceilings. Reuses the magic-link anonymous-embed minting path at session time; this entity holds only the configuration.` })
|
|
55984
|
+
], MJConversationWidgetInstance_);
|
|
55985
|
+
export { MJConversationWidgetInstance_ };
|
|
55986
|
+
//****************************************************************************
|
|
55987
|
+
// INPUT TYPE for MJ: Conversation Widget Instances
|
|
55988
|
+
//****************************************************************************
|
|
55989
|
+
let CreateMJConversationWidgetInstanceInput = class CreateMJConversationWidgetInstanceInput {
|
|
55990
|
+
};
|
|
55991
|
+
__decorate([
|
|
55992
|
+
Field({ nullable: true }),
|
|
55993
|
+
__metadata("design:type", String)
|
|
55994
|
+
], CreateMJConversationWidgetInstanceInput.prototype, "ID", void 0);
|
|
55995
|
+
__decorate([
|
|
55996
|
+
Field({ nullable: true }),
|
|
55997
|
+
__metadata("design:type", String)
|
|
55998
|
+
], CreateMJConversationWidgetInstanceInput.prototype, "Name", void 0);
|
|
55999
|
+
__decorate([
|
|
56000
|
+
Field({ nullable: true }),
|
|
56001
|
+
__metadata("design:type", String)
|
|
56002
|
+
], CreateMJConversationWidgetInstanceInput.prototype, "PublicKey", void 0);
|
|
56003
|
+
__decorate([
|
|
56004
|
+
Field({ nullable: true }),
|
|
56005
|
+
__metadata("design:type", String)
|
|
56006
|
+
], CreateMJConversationWidgetInstanceInput.prototype, "ApplicationID", void 0);
|
|
56007
|
+
__decorate([
|
|
56008
|
+
Field({ nullable: true }),
|
|
56009
|
+
__metadata("design:type", String)
|
|
56010
|
+
], CreateMJConversationWidgetInstanceInput.prototype, "PinnedAgentID", void 0);
|
|
56011
|
+
__decorate([
|
|
56012
|
+
Field({ nullable: true }),
|
|
56013
|
+
__metadata("design:type", String)
|
|
56014
|
+
], CreateMJConversationWidgetInstanceInput.prototype, "GuestRoleID", void 0);
|
|
56015
|
+
__decorate([
|
|
56016
|
+
Field({ nullable: true }),
|
|
56017
|
+
__metadata("design:type", String)
|
|
56018
|
+
], CreateMJConversationWidgetInstanceInput.prototype, "AllowedOrigins", void 0);
|
|
56019
|
+
__decorate([
|
|
56020
|
+
Field({ nullable: true }),
|
|
56021
|
+
__metadata("design:type", String)
|
|
56022
|
+
], CreateMJConversationWidgetInstanceInput.prototype, "Modality", void 0);
|
|
56023
|
+
__decorate([
|
|
56024
|
+
Field({ nullable: true }),
|
|
56025
|
+
__metadata("design:type", String)
|
|
56026
|
+
], CreateMJConversationWidgetInstanceInput.prototype, "AuthStrategy", void 0);
|
|
56027
|
+
__decorate([
|
|
56028
|
+
Field({ nullable: true }),
|
|
56029
|
+
__metadata("design:type", String)
|
|
56030
|
+
], CreateMJConversationWidgetInstanceInput.prototype, "Status", void 0);
|
|
56031
|
+
__decorate([
|
|
56032
|
+
Field(() => Int, { nullable: true }),
|
|
56033
|
+
__metadata("design:type", Number)
|
|
56034
|
+
], CreateMJConversationWidgetInstanceInput.prototype, "SessionTTLMinutes", void 0);
|
|
56035
|
+
__decorate([
|
|
56036
|
+
Field(() => Int, { nullable: true }),
|
|
56037
|
+
__metadata("design:type", Number)
|
|
56038
|
+
], CreateMJConversationWidgetInstanceInput.prototype, "RateLimitPerMinute", void 0);
|
|
56039
|
+
__decorate([
|
|
56040
|
+
Field(() => Int, { nullable: true }),
|
|
56041
|
+
__metadata("design:type", Number)
|
|
56042
|
+
], CreateMJConversationWidgetInstanceInput.prototype, "VoiceMaxSessionMinutes", void 0);
|
|
56043
|
+
__decorate([
|
|
56044
|
+
Field({ nullable: true }),
|
|
56045
|
+
__metadata("design:type", String)
|
|
56046
|
+
], CreateMJConversationWidgetInstanceInput.prototype, "EnabledChannels", void 0);
|
|
56047
|
+
__decorate([
|
|
56048
|
+
Field({ nullable: true }),
|
|
56049
|
+
__metadata("design:type", String)
|
|
56050
|
+
], CreateMJConversationWidgetInstanceInput.prototype, "HostPublicKey", void 0);
|
|
56051
|
+
__decorate([
|
|
56052
|
+
Field(() => Boolean, { nullable: true }),
|
|
56053
|
+
__metadata("design:type", Boolean)
|
|
56054
|
+
], CreateMJConversationWidgetInstanceInput.prototype, "RememberReturningVisitors", void 0);
|
|
56055
|
+
__decorate([
|
|
56056
|
+
Field(() => Int, { nullable: true }),
|
|
56057
|
+
__metadata("design:type", Number)
|
|
56058
|
+
], CreateMJConversationWidgetInstanceInput.prototype, "VisitorMemoryRetentionDays", void 0);
|
|
56059
|
+
__decorate([
|
|
56060
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
56061
|
+
__metadata("design:type", RestoreContextInput)
|
|
56062
|
+
], CreateMJConversationWidgetInstanceInput.prototype, "RestoreContext___", void 0);
|
|
56063
|
+
CreateMJConversationWidgetInstanceInput = __decorate([
|
|
56064
|
+
InputType()
|
|
56065
|
+
], CreateMJConversationWidgetInstanceInput);
|
|
56066
|
+
export { CreateMJConversationWidgetInstanceInput };
|
|
56067
|
+
//****************************************************************************
|
|
56068
|
+
// INPUT TYPE for MJ: Conversation Widget Instances
|
|
56069
|
+
//****************************************************************************
|
|
56070
|
+
let UpdateMJConversationWidgetInstanceInput = class UpdateMJConversationWidgetInstanceInput {
|
|
56071
|
+
};
|
|
56072
|
+
__decorate([
|
|
56073
|
+
Field(),
|
|
56074
|
+
__metadata("design:type", String)
|
|
56075
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "ID", void 0);
|
|
56076
|
+
__decorate([
|
|
56077
|
+
Field({ nullable: true }),
|
|
56078
|
+
__metadata("design:type", String)
|
|
56079
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "Name", void 0);
|
|
56080
|
+
__decorate([
|
|
56081
|
+
Field({ nullable: true }),
|
|
56082
|
+
__metadata("design:type", String)
|
|
56083
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "PublicKey", void 0);
|
|
56084
|
+
__decorate([
|
|
56085
|
+
Field({ nullable: true }),
|
|
56086
|
+
__metadata("design:type", String)
|
|
56087
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "ApplicationID", void 0);
|
|
56088
|
+
__decorate([
|
|
56089
|
+
Field({ nullable: true }),
|
|
56090
|
+
__metadata("design:type", String)
|
|
56091
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "PinnedAgentID", void 0);
|
|
56092
|
+
__decorate([
|
|
56093
|
+
Field({ nullable: true }),
|
|
56094
|
+
__metadata("design:type", String)
|
|
56095
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "GuestRoleID", void 0);
|
|
56096
|
+
__decorate([
|
|
56097
|
+
Field({ nullable: true }),
|
|
56098
|
+
__metadata("design:type", String)
|
|
56099
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "AllowedOrigins", void 0);
|
|
56100
|
+
__decorate([
|
|
56101
|
+
Field({ nullable: true }),
|
|
56102
|
+
__metadata("design:type", String)
|
|
56103
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "Modality", void 0);
|
|
56104
|
+
__decorate([
|
|
56105
|
+
Field({ nullable: true }),
|
|
56106
|
+
__metadata("design:type", String)
|
|
56107
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "AuthStrategy", void 0);
|
|
56108
|
+
__decorate([
|
|
56109
|
+
Field({ nullable: true }),
|
|
56110
|
+
__metadata("design:type", String)
|
|
56111
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "Status", void 0);
|
|
56112
|
+
__decorate([
|
|
56113
|
+
Field(() => Int, { nullable: true }),
|
|
56114
|
+
__metadata("design:type", Number)
|
|
56115
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "SessionTTLMinutes", void 0);
|
|
56116
|
+
__decorate([
|
|
56117
|
+
Field(() => Int, { nullable: true }),
|
|
56118
|
+
__metadata("design:type", Number)
|
|
56119
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "RateLimitPerMinute", void 0);
|
|
56120
|
+
__decorate([
|
|
56121
|
+
Field(() => Int, { nullable: true }),
|
|
56122
|
+
__metadata("design:type", Number)
|
|
56123
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "VoiceMaxSessionMinutes", void 0);
|
|
56124
|
+
__decorate([
|
|
56125
|
+
Field({ nullable: true }),
|
|
56126
|
+
__metadata("design:type", String)
|
|
56127
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "EnabledChannels", void 0);
|
|
56128
|
+
__decorate([
|
|
56129
|
+
Field({ nullable: true }),
|
|
56130
|
+
__metadata("design:type", String)
|
|
56131
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "HostPublicKey", void 0);
|
|
56132
|
+
__decorate([
|
|
56133
|
+
Field(() => Boolean, { nullable: true }),
|
|
56134
|
+
__metadata("design:type", Boolean)
|
|
56135
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "RememberReturningVisitors", void 0);
|
|
56136
|
+
__decorate([
|
|
56137
|
+
Field(() => Int, { nullable: true }),
|
|
56138
|
+
__metadata("design:type", Number)
|
|
56139
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "VisitorMemoryRetentionDays", void 0);
|
|
56140
|
+
__decorate([
|
|
56141
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
56142
|
+
__metadata("design:type", Array)
|
|
56143
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "OldValues___", void 0);
|
|
56144
|
+
__decorate([
|
|
56145
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
56146
|
+
__metadata("design:type", RestoreContextInput)
|
|
56147
|
+
], UpdateMJConversationWidgetInstanceInput.prototype, "RestoreContext___", void 0);
|
|
56148
|
+
UpdateMJConversationWidgetInstanceInput = __decorate([
|
|
56149
|
+
InputType()
|
|
56150
|
+
], UpdateMJConversationWidgetInstanceInput);
|
|
56151
|
+
export { UpdateMJConversationWidgetInstanceInput };
|
|
56152
|
+
//****************************************************************************
|
|
56153
|
+
// RESOLVER for MJ: Conversation Widget Instances
|
|
56154
|
+
//****************************************************************************
|
|
56155
|
+
let RunMJConversationWidgetInstanceViewResult = class RunMJConversationWidgetInstanceViewResult {
|
|
56156
|
+
};
|
|
56157
|
+
__decorate([
|
|
56158
|
+
Field(() => [MJConversationWidgetInstance_]),
|
|
56159
|
+
__metadata("design:type", Array)
|
|
56160
|
+
], RunMJConversationWidgetInstanceViewResult.prototype, "Results", void 0);
|
|
56161
|
+
__decorate([
|
|
56162
|
+
Field(() => String, { nullable: true }),
|
|
56163
|
+
__metadata("design:type", String)
|
|
56164
|
+
], RunMJConversationWidgetInstanceViewResult.prototype, "UserViewRunID", void 0);
|
|
56165
|
+
__decorate([
|
|
56166
|
+
Field(() => Int, { nullable: true }),
|
|
56167
|
+
__metadata("design:type", Number)
|
|
56168
|
+
], RunMJConversationWidgetInstanceViewResult.prototype, "RowCount", void 0);
|
|
56169
|
+
__decorate([
|
|
56170
|
+
Field(() => Int, { nullable: true }),
|
|
56171
|
+
__metadata("design:type", Number)
|
|
56172
|
+
], RunMJConversationWidgetInstanceViewResult.prototype, "TotalRowCount", void 0);
|
|
56173
|
+
__decorate([
|
|
56174
|
+
Field(() => Int, { nullable: true }),
|
|
56175
|
+
__metadata("design:type", Number)
|
|
56176
|
+
], RunMJConversationWidgetInstanceViewResult.prototype, "ExecutionTime", void 0);
|
|
56177
|
+
__decorate([
|
|
56178
|
+
Field({ nullable: true }),
|
|
56179
|
+
__metadata("design:type", String)
|
|
56180
|
+
], RunMJConversationWidgetInstanceViewResult.prototype, "ErrorMessage", void 0);
|
|
56181
|
+
__decorate([
|
|
56182
|
+
Field(() => Boolean, { nullable: false }),
|
|
56183
|
+
__metadata("design:type", Boolean)
|
|
56184
|
+
], RunMJConversationWidgetInstanceViewResult.prototype, "Success", void 0);
|
|
56185
|
+
RunMJConversationWidgetInstanceViewResult = __decorate([
|
|
56186
|
+
ObjectType()
|
|
56187
|
+
], RunMJConversationWidgetInstanceViewResult);
|
|
56188
|
+
export { RunMJConversationWidgetInstanceViewResult };
|
|
56189
|
+
let MJConversationWidgetInstanceResolver = class MJConversationWidgetInstanceResolver extends ResolverBase {
|
|
56190
|
+
async RunMJConversationWidgetInstanceViewByID(input, { providers, userPayload }, pubSub) {
|
|
56191
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
56192
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
56193
|
+
}
|
|
56194
|
+
async RunMJConversationWidgetInstanceViewByName(input, { providers, userPayload }, pubSub) {
|
|
56195
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
56196
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
56197
|
+
}
|
|
56198
|
+
async RunMJConversationWidgetInstanceDynamicView(input, { providers, userPayload }, pubSub) {
|
|
56199
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
56200
|
+
input.EntityName = 'MJ: Conversation Widget Instances';
|
|
56201
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
56202
|
+
}
|
|
56203
|
+
async MJConversationWidgetInstance(ID, { userPayload, providers }, pubSub) {
|
|
56204
|
+
this.CheckUserReadPermissions('MJ: Conversation Widget Instances', userPayload);
|
|
56205
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
56206
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversationWidgetInstances')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Widget Instances', userPayload, EntityPermissionType.Read, 'AND');
|
|
56207
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
56208
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Conversation Widget Instances', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
56209
|
+
return result;
|
|
56210
|
+
}
|
|
56211
|
+
async CreateMJConversationWidgetInstance(input, { providers, userPayload }, pubSub) {
|
|
56212
|
+
const provider = GetReadWriteProvider(providers);
|
|
56213
|
+
return this.CreateRecord('MJ: Conversation Widget Instances', input, provider, userPayload, pubSub);
|
|
56214
|
+
}
|
|
56215
|
+
async UpdateMJConversationWidgetInstance(input, { providers, userPayload }, pubSub) {
|
|
56216
|
+
const provider = GetReadWriteProvider(providers);
|
|
56217
|
+
return this.UpdateRecord('MJ: Conversation Widget Instances', input, provider, userPayload, pubSub);
|
|
56218
|
+
}
|
|
56219
|
+
async DeleteMJConversationWidgetInstance(ID, options, { providers, userPayload }, pubSub) {
|
|
56220
|
+
const provider = GetReadWriteProvider(providers);
|
|
56221
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
56222
|
+
return this.DeleteRecord('MJ: Conversation Widget Instances', key, options, provider, userPayload, pubSub);
|
|
56223
|
+
}
|
|
56224
|
+
};
|
|
56225
|
+
__decorate([
|
|
56226
|
+
Query(() => RunMJConversationWidgetInstanceViewResult),
|
|
56227
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
56228
|
+
__param(1, Ctx()),
|
|
56229
|
+
__param(2, PubSub()),
|
|
56230
|
+
__metadata("design:type", Function),
|
|
56231
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
56232
|
+
__metadata("design:returntype", Promise)
|
|
56233
|
+
], MJConversationWidgetInstanceResolver.prototype, "RunMJConversationWidgetInstanceViewByID", null);
|
|
56234
|
+
__decorate([
|
|
56235
|
+
Query(() => RunMJConversationWidgetInstanceViewResult),
|
|
56236
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
56237
|
+
__param(1, Ctx()),
|
|
56238
|
+
__param(2, PubSub()),
|
|
56239
|
+
__metadata("design:type", Function),
|
|
56240
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
56241
|
+
__metadata("design:returntype", Promise)
|
|
56242
|
+
], MJConversationWidgetInstanceResolver.prototype, "RunMJConversationWidgetInstanceViewByName", null);
|
|
56243
|
+
__decorate([
|
|
56244
|
+
Query(() => RunMJConversationWidgetInstanceViewResult),
|
|
56245
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
56246
|
+
__param(1, Ctx()),
|
|
56247
|
+
__param(2, PubSub()),
|
|
56248
|
+
__metadata("design:type", Function),
|
|
56249
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
56250
|
+
__metadata("design:returntype", Promise)
|
|
56251
|
+
], MJConversationWidgetInstanceResolver.prototype, "RunMJConversationWidgetInstanceDynamicView", null);
|
|
56252
|
+
__decorate([
|
|
56253
|
+
Query(() => MJConversationWidgetInstance_, { nullable: true }),
|
|
56254
|
+
__param(0, Arg('ID', () => String)),
|
|
56255
|
+
__param(1, Ctx()),
|
|
56256
|
+
__param(2, PubSub()),
|
|
56257
|
+
__metadata("design:type", Function),
|
|
56258
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
56259
|
+
__metadata("design:returntype", Promise)
|
|
56260
|
+
], MJConversationWidgetInstanceResolver.prototype, "MJConversationWidgetInstance", null);
|
|
56261
|
+
__decorate([
|
|
56262
|
+
Mutation(() => MJConversationWidgetInstance_),
|
|
56263
|
+
__param(0, Arg('input', () => CreateMJConversationWidgetInstanceInput)),
|
|
56264
|
+
__param(1, Ctx()),
|
|
56265
|
+
__param(2, PubSub()),
|
|
56266
|
+
__metadata("design:type", Function),
|
|
56267
|
+
__metadata("design:paramtypes", [CreateMJConversationWidgetInstanceInput, Object, PubSubEngine]),
|
|
56268
|
+
__metadata("design:returntype", Promise)
|
|
56269
|
+
], MJConversationWidgetInstanceResolver.prototype, "CreateMJConversationWidgetInstance", null);
|
|
56270
|
+
__decorate([
|
|
56271
|
+
Mutation(() => MJConversationWidgetInstance_),
|
|
56272
|
+
__param(0, Arg('input', () => UpdateMJConversationWidgetInstanceInput)),
|
|
56273
|
+
__param(1, Ctx()),
|
|
56274
|
+
__param(2, PubSub()),
|
|
56275
|
+
__metadata("design:type", Function),
|
|
56276
|
+
__metadata("design:paramtypes", [UpdateMJConversationWidgetInstanceInput, Object, PubSubEngine]),
|
|
56277
|
+
__metadata("design:returntype", Promise)
|
|
56278
|
+
], MJConversationWidgetInstanceResolver.prototype, "UpdateMJConversationWidgetInstance", null);
|
|
56279
|
+
__decorate([
|
|
56280
|
+
Mutation(() => MJConversationWidgetInstance_),
|
|
56281
|
+
__param(0, Arg('ID', () => String)),
|
|
56282
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
56283
|
+
__param(2, Ctx()),
|
|
56284
|
+
__param(3, PubSub()),
|
|
56285
|
+
__metadata("design:type", Function),
|
|
56286
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
56287
|
+
__metadata("design:returntype", Promise)
|
|
56288
|
+
], MJConversationWidgetInstanceResolver.prototype, "DeleteMJConversationWidgetInstance", null);
|
|
56289
|
+
MJConversationWidgetInstanceResolver = __decorate([
|
|
56290
|
+
Resolver(MJConversationWidgetInstance_)
|
|
56291
|
+
], MJConversationWidgetInstanceResolver);
|
|
56292
|
+
export { MJConversationWidgetInstanceResolver };
|
|
56293
|
+
//****************************************************************************
|
|
55680
56294
|
// ENTITY CLASS for MJ: Conversations
|
|
55681
56295
|
//****************************************************************************
|
|
55682
56296
|
let MJConversation_ = class MJConversation_ {
|
|
@@ -55790,6 +56404,16 @@ __decorate([
|
|
|
55790
56404
|
MaxLength(255),
|
|
55791
56405
|
__metadata("design:type", String)
|
|
55792
56406
|
], MJConversation_.prototype, "EgressID", void 0);
|
|
56407
|
+
__decorate([
|
|
56408
|
+
Field({ nullable: true, description: `Durable, opaque returning-visitor anchor (R3). Holds the value of a long-lived first-party cookie minted by the widget on first visit, used to find this visitor's prior conversations while they are still anonymous. Distinct from ExternalID (which stays per-session for RLS isolation). NULL for conversations that are not widget returning-visitor sessions.` }),
|
|
56409
|
+
MaxLength(255),
|
|
56410
|
+
__metadata("design:type", String)
|
|
56411
|
+
], MJConversation_.prototype, "VisitorKey", void 0);
|
|
56412
|
+
__decorate([
|
|
56413
|
+
Field({ nullable: true, description: `Conversation-altitude returning-visitor chain (R2). Self-foreign-key to the visitor's immediately prior Conversation (found by VisitorKey or the resolved LinkedEntityID/LinkedRecordID pair at mint time). History and memory are conversation-scoped, so the chain lives here — NOT on AIAgentSession.LastSessionID, which owns reconnect/resume semantics and is walked by the replay viewer. Named to mirror AIAgentSession.LastSessionID. NULL for a brand-new visitor's first conversation.` }),
|
|
56414
|
+
MaxLength(36),
|
|
56415
|
+
__metadata("design:type", String)
|
|
56416
|
+
], MJConversation_.prototype, "LastConversationID", void 0);
|
|
55793
56417
|
__decorate([
|
|
55794
56418
|
Field(),
|
|
55795
56419
|
MaxLength(100),
|
|
@@ -55835,6 +56459,16 @@ __decorate([
|
|
|
55835
56459
|
MaxLength(500),
|
|
55836
56460
|
__metadata("design:type", String)
|
|
55837
56461
|
], MJConversation_.prototype, "RecordingFile", void 0);
|
|
56462
|
+
__decorate([
|
|
56463
|
+
Field({ nullable: true }),
|
|
56464
|
+
MaxLength(255),
|
|
56465
|
+
__metadata("design:type", String)
|
|
56466
|
+
], MJConversation_.prototype, "LastConversation", void 0);
|
|
56467
|
+
__decorate([
|
|
56468
|
+
Field({ nullable: true }),
|
|
56469
|
+
MaxLength(36),
|
|
56470
|
+
__metadata("design:type", String)
|
|
56471
|
+
], MJConversation_.prototype, "RootLastConversationID", void 0);
|
|
55838
56472
|
__decorate([
|
|
55839
56473
|
Field(() => [MJConversationDetail_]),
|
|
55840
56474
|
__metadata("design:type", Array)
|
|
@@ -55863,6 +56497,14 @@ __decorate([
|
|
|
55863
56497
|
Field(() => [MJAIAgentSession_]),
|
|
55864
56498
|
__metadata("design:type", Array)
|
|
55865
56499
|
], MJConversation_.prototype, "MJAIAgentSessions_ConversationIDArray", void 0);
|
|
56500
|
+
__decorate([
|
|
56501
|
+
Field(() => [MJConversation_]),
|
|
56502
|
+
__metadata("design:type", Array)
|
|
56503
|
+
], MJConversation_.prototype, "MJConversations_LastConversationIDArray", void 0);
|
|
56504
|
+
__decorate([
|
|
56505
|
+
Field(() => [MJUserRoutine_]),
|
|
56506
|
+
__metadata("design:type", Array)
|
|
56507
|
+
], MJConversation_.prototype, "MJUserRoutines_ConversationIDArray", void 0);
|
|
55866
56508
|
MJConversation_ = __decorate([
|
|
55867
56509
|
ObjectType({ description: `Tracks conversation sessions between users and AI agents or between users, including context, participants, and metadata.` })
|
|
55868
56510
|
], MJConversation_);
|
|
@@ -55956,6 +56598,14 @@ __decorate([
|
|
|
55956
56598
|
Field({ nullable: true }),
|
|
55957
56599
|
__metadata("design:type", String)
|
|
55958
56600
|
], CreateMJConversationInput.prototype, "EgressID", void 0);
|
|
56601
|
+
__decorate([
|
|
56602
|
+
Field({ nullable: true }),
|
|
56603
|
+
__metadata("design:type", String)
|
|
56604
|
+
], CreateMJConversationInput.prototype, "VisitorKey", void 0);
|
|
56605
|
+
__decorate([
|
|
56606
|
+
Field({ nullable: true }),
|
|
56607
|
+
__metadata("design:type", String)
|
|
56608
|
+
], CreateMJConversationInput.prototype, "LastConversationID", void 0);
|
|
55959
56609
|
__decorate([
|
|
55960
56610
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
55961
56611
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -56053,6 +56703,14 @@ __decorate([
|
|
|
56053
56703
|
Field({ nullable: true }),
|
|
56054
56704
|
__metadata("design:type", String)
|
|
56055
56705
|
], UpdateMJConversationInput.prototype, "EgressID", void 0);
|
|
56706
|
+
__decorate([
|
|
56707
|
+
Field({ nullable: true }),
|
|
56708
|
+
__metadata("design:type", String)
|
|
56709
|
+
], UpdateMJConversationInput.prototype, "VisitorKey", void 0);
|
|
56710
|
+
__decorate([
|
|
56711
|
+
Field({ nullable: true }),
|
|
56712
|
+
__metadata("design:type", String)
|
|
56713
|
+
], UpdateMJConversationInput.prototype, "LastConversationID", void 0);
|
|
56056
56714
|
__decorate([
|
|
56057
56715
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
56058
56716
|
__metadata("design:type", Array)
|
|
@@ -56180,6 +56838,22 @@ let MJConversationResolver = class MJConversationResolver extends ResolverBase {
|
|
|
56180
56838
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Sessions', rows, this.GetUserFromPayload(userPayload));
|
|
56181
56839
|
return result;
|
|
56182
56840
|
}
|
|
56841
|
+
async MJConversations_LastConversationIDArray(mjconversation_, { userPayload, providers }, pubSub) {
|
|
56842
|
+
this.CheckUserReadPermissions('MJ: Conversations', userPayload);
|
|
56843
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
56844
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversations')} WHERE ${provider.QuoteIdentifier('LastConversationID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversations', userPayload, EntityPermissionType.Read, 'AND');
|
|
56845
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjconversation_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
56846
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversations', rows, this.GetUserFromPayload(userPayload));
|
|
56847
|
+
return result;
|
|
56848
|
+
}
|
|
56849
|
+
async MJUserRoutines_ConversationIDArray(mjconversation_, { userPayload, providers }, pubSub) {
|
|
56850
|
+
this.CheckUserReadPermissions('MJ: User Routines', userPayload);
|
|
56851
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
56852
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserRoutines')} WHERE ${provider.QuoteIdentifier('ConversationID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Routines', userPayload, EntityPermissionType.Read, 'AND');
|
|
56853
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjconversation_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
56854
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User Routines', rows, this.GetUserFromPayload(userPayload));
|
|
56855
|
+
return result;
|
|
56856
|
+
}
|
|
56183
56857
|
async CreateMJConversation(input, { providers, userPayload }, pubSub) {
|
|
56184
56858
|
const provider = GetReadWriteProvider(providers);
|
|
56185
56859
|
return this.CreateRecord('MJ: Conversations', input, provider, userPayload, pubSub);
|
|
@@ -56293,6 +56967,24 @@ __decorate([
|
|
|
56293
56967
|
__metadata("design:paramtypes", [MJConversation_, Object, PubSubEngine]),
|
|
56294
56968
|
__metadata("design:returntype", Promise)
|
|
56295
56969
|
], MJConversationResolver.prototype, "MJAIAgentSessions_ConversationIDArray", null);
|
|
56970
|
+
__decorate([
|
|
56971
|
+
FieldResolver(() => [MJConversation_]),
|
|
56972
|
+
__param(0, Root()),
|
|
56973
|
+
__param(1, Ctx()),
|
|
56974
|
+
__param(2, PubSub()),
|
|
56975
|
+
__metadata("design:type", Function),
|
|
56976
|
+
__metadata("design:paramtypes", [MJConversation_, Object, PubSubEngine]),
|
|
56977
|
+
__metadata("design:returntype", Promise)
|
|
56978
|
+
], MJConversationResolver.prototype, "MJConversations_LastConversationIDArray", null);
|
|
56979
|
+
__decorate([
|
|
56980
|
+
FieldResolver(() => [MJUserRoutine_]),
|
|
56981
|
+
__param(0, Root()),
|
|
56982
|
+
__param(1, Ctx()),
|
|
56983
|
+
__param(2, PubSub()),
|
|
56984
|
+
__metadata("design:type", Function),
|
|
56985
|
+
__metadata("design:paramtypes", [MJConversation_, Object, PubSubEngine]),
|
|
56986
|
+
__metadata("design:returntype", Promise)
|
|
56987
|
+
], MJConversationResolver.prototype, "MJUserRoutines_ConversationIDArray", null);
|
|
56296
56988
|
__decorate([
|
|
56297
56989
|
Mutation(() => MJConversation_),
|
|
56298
56990
|
__param(0, Arg('input', () => CreateMJConversationInput)),
|
|
@@ -57029,6 +57721,10 @@ __decorate([
|
|
|
57029
57721
|
Field(() => [MJIntegration_]),
|
|
57030
57722
|
__metadata("design:type", Array)
|
|
57031
57723
|
], MJCredentialType_.prototype, "MJIntegrations_CredentialTypeIDArray", void 0);
|
|
57724
|
+
__decorate([
|
|
57725
|
+
Field(() => [MJExternalDataSourceType_]),
|
|
57726
|
+
__metadata("design:type", Array)
|
|
57727
|
+
], MJCredentialType_.prototype, "MJExternalDataSourceTypes_RequiredCredentialTypeIDArray", void 0);
|
|
57032
57728
|
__decorate([
|
|
57033
57729
|
Field(() => [MJAIVendor_]),
|
|
57034
57730
|
__metadata("design:type", Array)
|
|
@@ -57206,6 +57902,14 @@ let MJCredentialTypeResolver = class MJCredentialTypeResolver extends ResolverBa
|
|
|
57206
57902
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Integrations', rows, this.GetUserFromPayload(userPayload));
|
|
57207
57903
|
return result;
|
|
57208
57904
|
}
|
|
57905
|
+
async MJExternalDataSourceTypes_RequiredCredentialTypeIDArray(mjcredentialtype_, { userPayload, providers }, pubSub) {
|
|
57906
|
+
this.CheckUserReadPermissions('MJ: External Data Source Types', userPayload);
|
|
57907
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
57908
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwExternalDataSourceTypes')} WHERE ${provider.QuoteIdentifier('RequiredCredentialTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: External Data Source Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
57909
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjcredentialtype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
57910
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: External Data Source Types', rows, this.GetUserFromPayload(userPayload));
|
|
57911
|
+
return result;
|
|
57912
|
+
}
|
|
57209
57913
|
async MJAIVendors_CredentialTypeIDArray(mjcredentialtype_, { userPayload, providers }, pubSub) {
|
|
57210
57914
|
this.CheckUserReadPermissions('MJ: AI Vendors', userPayload);
|
|
57211
57915
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -57291,6 +57995,15 @@ __decorate([
|
|
|
57291
57995
|
__metadata("design:paramtypes", [MJCredentialType_, Object, PubSubEngine]),
|
|
57292
57996
|
__metadata("design:returntype", Promise)
|
|
57293
57997
|
], MJCredentialTypeResolver.prototype, "MJIntegrations_CredentialTypeIDArray", null);
|
|
57998
|
+
__decorate([
|
|
57999
|
+
FieldResolver(() => [MJExternalDataSourceType_]),
|
|
58000
|
+
__param(0, Root()),
|
|
58001
|
+
__param(1, Ctx()),
|
|
58002
|
+
__param(2, PubSub()),
|
|
58003
|
+
__metadata("design:type", Function),
|
|
58004
|
+
__metadata("design:paramtypes", [MJCredentialType_, Object, PubSubEngine]),
|
|
58005
|
+
__metadata("design:returntype", Promise)
|
|
58006
|
+
], MJCredentialTypeResolver.prototype, "MJExternalDataSourceTypes_RequiredCredentialTypeIDArray", null);
|
|
57294
58007
|
__decorate([
|
|
57295
58008
|
FieldResolver(() => [MJAIVendor_]),
|
|
57296
58009
|
__param(0, Root()),
|
|
@@ -57440,6 +58153,10 @@ __decorate([
|
|
|
57440
58153
|
Field(() => [MJSignatureAccount_]),
|
|
57441
58154
|
__metadata("design:type", Array)
|
|
57442
58155
|
], MJCredential_.prototype, "MJSignatureAccounts_CredentialIDArray", void 0);
|
|
58156
|
+
__decorate([
|
|
58157
|
+
Field(() => [MJExternalDataSource_]),
|
|
58158
|
+
__metadata("design:type", Array)
|
|
58159
|
+
], MJCredential_.prototype, "MJExternalDataSources_CredentialIDArray", void 0);
|
|
57443
58160
|
MJCredential_ = __decorate([
|
|
57444
58161
|
ObjectType({ description: `Stores credential instances with encrypted values. All access should go through CredentialEngine for proper audit logging.` })
|
|
57445
58162
|
], MJCredential_);
|
|
@@ -57693,6 +58410,14 @@ let MJCredentialResolver = class MJCredentialResolver extends ResolverBase {
|
|
|
57693
58410
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Signature Accounts', rows, this.GetUserFromPayload(userPayload));
|
|
57694
58411
|
return result;
|
|
57695
58412
|
}
|
|
58413
|
+
async MJExternalDataSources_CredentialIDArray(mjcredential_, { userPayload, providers }, pubSub) {
|
|
58414
|
+
this.CheckUserReadPermissions('MJ: External Data Sources', userPayload);
|
|
58415
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
58416
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwExternalDataSources')} WHERE ${provider.QuoteIdentifier('CredentialID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: External Data Sources', userPayload, EntityPermissionType.Read, 'AND');
|
|
58417
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjcredential_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
58418
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: External Data Sources', rows, this.GetUserFromPayload(userPayload));
|
|
58419
|
+
return result;
|
|
58420
|
+
}
|
|
57696
58421
|
async CreateMJCredential(input, { providers, userPayload }, pubSub) {
|
|
57697
58422
|
const provider = GetReadWriteProvider(providers);
|
|
57698
58423
|
return this.CreateRecord('MJ: Credentials', input, provider, userPayload, pubSub);
|
|
@@ -57815,6 +58540,15 @@ __decorate([
|
|
|
57815
58540
|
__metadata("design:paramtypes", [MJCredential_, Object, PubSubEngine]),
|
|
57816
58541
|
__metadata("design:returntype", Promise)
|
|
57817
58542
|
], MJCredentialResolver.prototype, "MJSignatureAccounts_CredentialIDArray", null);
|
|
58543
|
+
__decorate([
|
|
58544
|
+
FieldResolver(() => [MJExternalDataSource_]),
|
|
58545
|
+
__param(0, Root()),
|
|
58546
|
+
__param(1, Ctx()),
|
|
58547
|
+
__param(2, PubSub()),
|
|
58548
|
+
__metadata("design:type", Function),
|
|
58549
|
+
__metadata("design:paramtypes", [MJCredential_, Object, PubSubEngine]),
|
|
58550
|
+
__metadata("design:returntype", Promise)
|
|
58551
|
+
], MJCredentialResolver.prototype, "MJExternalDataSources_CredentialIDArray", null);
|
|
57818
58552
|
__decorate([
|
|
57819
58553
|
Mutation(() => MJCredential_),
|
|
57820
58554
|
__param(0, Arg('input', () => CreateMJCredentialInput)),
|
|
@@ -65306,6 +66040,16 @@ __decorate([
|
|
|
65306
66040
|
Field(() => Boolean, { description: `When set to 1 AND TrackRecordChanges is also 1, the external change detection system will scan this entity for changes made outside the MJ framework (direct SQL, third-party tools, etc.) and replay them through Save() to create proper RecordChange audit entries. Default is 0 (opt-out) because most entities, especially __mj schema metadata tables, are managed by migrations/CodeGen and should not be scanned.` }),
|
|
65307
66041
|
__metadata("design:type", Boolean)
|
|
65308
66042
|
], MJEntity_.prototype, "DetectExternalChanges", void 0);
|
|
66043
|
+
__decorate([
|
|
66044
|
+
Field({ nullable: true }),
|
|
66045
|
+
MaxLength(36),
|
|
66046
|
+
__metadata("design:type", String)
|
|
66047
|
+
], MJEntity_.prototype, "ExternalDataSourceID", void 0);
|
|
66048
|
+
__decorate([
|
|
66049
|
+
Field({ nullable: true, description: `Remote object name (table / view / collection) on the external system that backs this entity. Resolved against the data source DefaultSchema/DefaultDatabase when unqualified. Only meaningful when ExternalDataSourceID is set.` }),
|
|
66050
|
+
MaxLength(255),
|
|
66051
|
+
__metadata("design:type", String)
|
|
66052
|
+
], MJEntity_.prototype, "ExternalObjectName", void 0);
|
|
65309
66053
|
__decorate([
|
|
65310
66054
|
Field({ nullable: true, description: `Schema-based programmatic code name derived from the entity Name. Uses GetClassNameSchemaPrefix(SchemaName) as the prefix, then strips EntityNamePrefix from the Name and removes spaces. For "__mj" schema with entity "MJ: AI Models", this produces "MJAIModels". For entities in other schemas, the sanitized schema name is prepended. Used in GraphQL type generation and internal code references.` }),
|
|
65311
66055
|
__metadata("design:type", String)
|
|
@@ -65610,6 +66354,10 @@ __decorate([
|
|
|
65610
66354
|
Field(() => [MJMLModelScoringBinding_]),
|
|
65611
66355
|
__metadata("design:type", Array)
|
|
65612
66356
|
], MJEntity_.prototype, "MJMLModelScoringBindings_TargetEntityIDArray", void 0);
|
|
66357
|
+
__decorate([
|
|
66358
|
+
Field(() => [MJAIAgentSession_]),
|
|
66359
|
+
__metadata("design:type", Array)
|
|
66360
|
+
], MJEntity_.prototype, "MJAIAgentSessions_LinkedEntityIDArray", void 0);
|
|
65613
66361
|
__decorate([
|
|
65614
66362
|
Field(() => [MJScopedPromptPart_]),
|
|
65615
66363
|
__metadata("design:type", Array)
|
|
@@ -65867,6 +66615,14 @@ __decorate([
|
|
|
65867
66615
|
Field(() => Boolean, { nullable: true }),
|
|
65868
66616
|
__metadata("design:type", Boolean)
|
|
65869
66617
|
], CreateMJEntityInput.prototype, "DetectExternalChanges", void 0);
|
|
66618
|
+
__decorate([
|
|
66619
|
+
Field({ nullable: true }),
|
|
66620
|
+
__metadata("design:type", String)
|
|
66621
|
+
], CreateMJEntityInput.prototype, "ExternalDataSourceID", void 0);
|
|
66622
|
+
__decorate([
|
|
66623
|
+
Field({ nullable: true }),
|
|
66624
|
+
__metadata("design:type", String)
|
|
66625
|
+
], CreateMJEntityInput.prototype, "ExternalObjectName", void 0);
|
|
65870
66626
|
__decorate([
|
|
65871
66627
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
65872
66628
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -66124,6 +66880,14 @@ __decorate([
|
|
|
66124
66880
|
Field(() => Boolean, { nullable: true }),
|
|
66125
66881
|
__metadata("design:type", Boolean)
|
|
66126
66882
|
], UpdateMJEntityInput.prototype, "DetectExternalChanges", void 0);
|
|
66883
|
+
__decorate([
|
|
66884
|
+
Field({ nullable: true }),
|
|
66885
|
+
__metadata("design:type", String)
|
|
66886
|
+
], UpdateMJEntityInput.prototype, "ExternalDataSourceID", void 0);
|
|
66887
|
+
__decorate([
|
|
66888
|
+
Field({ nullable: true }),
|
|
66889
|
+
__metadata("design:type", String)
|
|
66890
|
+
], UpdateMJEntityInput.prototype, "ExternalObjectName", void 0);
|
|
66127
66891
|
__decorate([
|
|
66128
66892
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
66129
66893
|
__metadata("design:type", Array)
|
|
@@ -66747,6 +67511,14 @@ let MJEntityResolverBase = class MJEntityResolverBase extends ResolverBase {
|
|
|
66747
67511
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: ML Model Scoring Bindings', rows, this.GetUserFromPayload(userPayload));
|
|
66748
67512
|
return result;
|
|
66749
67513
|
}
|
|
67514
|
+
async MJAIAgentSessions_LinkedEntityIDArray(mjentity_, { userPayload, providers }, pubSub) {
|
|
67515
|
+
this.CheckUserReadPermissions('MJ: AI Agent Sessions', userPayload);
|
|
67516
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67517
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentSessions')} WHERE ${provider.QuoteIdentifier('LinkedEntityID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Sessions', userPayload, EntityPermissionType.Read, 'AND');
|
|
67518
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjentity_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
67519
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Sessions', rows, this.GetUserFromPayload(userPayload));
|
|
67520
|
+
return result;
|
|
67521
|
+
}
|
|
66750
67522
|
async MJScopedPromptParts_PrimaryScopeEntityIDArray(mjentity_, { userPayload, providers }, pubSub) {
|
|
66751
67523
|
this.CheckUserReadPermissions('MJ: Scoped Prompt Parts', userPayload);
|
|
66752
67524
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
@@ -67425,6 +68197,15 @@ __decorate([
|
|
|
67425
68197
|
__metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
|
|
67426
68198
|
__metadata("design:returntype", Promise)
|
|
67427
68199
|
], MJEntityResolverBase.prototype, "MJMLModelScoringBindings_TargetEntityIDArray", null);
|
|
68200
|
+
__decorate([
|
|
68201
|
+
FieldResolver(() => [MJAIAgentSession_]),
|
|
68202
|
+
__param(0, Root()),
|
|
68203
|
+
__param(1, Ctx()),
|
|
68204
|
+
__param(2, PubSub()),
|
|
68205
|
+
__metadata("design:type", Function),
|
|
68206
|
+
__metadata("design:paramtypes", [MJEntity_, Object, PubSubEngine]),
|
|
68207
|
+
__metadata("design:returntype", Promise)
|
|
68208
|
+
], MJEntityResolverBase.prototype, "MJAIAgentSessions_LinkedEntityIDArray", null);
|
|
67428
68209
|
__decorate([
|
|
67429
68210
|
FieldResolver(() => [MJScopedPromptPart_]),
|
|
67430
68211
|
__param(0, Root()),
|
|
@@ -75193,6 +75974,10 @@ __decorate([
|
|
|
75193
75974
|
Field(() => [MJConversation_]),
|
|
75194
75975
|
__metadata("design:type", Array)
|
|
75195
75976
|
], MJEnvironment_.prototype, "MJConversations_EnvironmentIDArray", void 0);
|
|
75977
|
+
__decorate([
|
|
75978
|
+
Field(() => [MJUserRoutine_]),
|
|
75979
|
+
__metadata("design:type", Array)
|
|
75980
|
+
], MJEnvironment_.prototype, "MJUserRoutines_EnvironmentIDArray", void 0);
|
|
75196
75981
|
MJEnvironment_ = __decorate([
|
|
75197
75982
|
ObjectType({ description: `Top-level container for organizing conversations, artifacts, and collections. Provides isolation and grouping for different teams, clients, or functional areas.` })
|
|
75198
75983
|
], MJEnvironment_);
|
|
@@ -75382,6 +76167,14 @@ let MJEnvironmentResolver = class MJEnvironmentResolver extends ResolverBase {
|
|
|
75382
76167
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversations', rows, this.GetUserFromPayload(userPayload));
|
|
75383
76168
|
return result;
|
|
75384
76169
|
}
|
|
76170
|
+
async MJUserRoutines_EnvironmentIDArray(mjenvironment_, { userPayload, providers }, pubSub) {
|
|
76171
|
+
this.CheckUserReadPermissions('MJ: User Routines', userPayload);
|
|
76172
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76173
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserRoutines')} WHERE ${provider.QuoteIdentifier('EnvironmentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Routines', userPayload, EntityPermissionType.Read, 'AND');
|
|
76174
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjenvironment_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76175
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User Routines', rows, this.GetUserFromPayload(userPayload));
|
|
76176
|
+
return result;
|
|
76177
|
+
}
|
|
75385
76178
|
async CreateMJEnvironment(input, { providers, userPayload }, pubSub) {
|
|
75386
76179
|
const provider = GetReadWriteProvider(providers);
|
|
75387
76180
|
return this.CreateRecord('MJ: Environments', input, provider, userPayload, pubSub);
|
|
@@ -75495,6 +76288,15 @@ __decorate([
|
|
|
75495
76288
|
__metadata("design:paramtypes", [MJEnvironment_, Object, PubSubEngine]),
|
|
75496
76289
|
__metadata("design:returntype", Promise)
|
|
75497
76290
|
], MJEnvironmentResolver.prototype, "MJConversations_EnvironmentIDArray", null);
|
|
76291
|
+
__decorate([
|
|
76292
|
+
FieldResolver(() => [MJUserRoutine_]),
|
|
76293
|
+
__param(0, Root()),
|
|
76294
|
+
__param(1, Ctx()),
|
|
76295
|
+
__param(2, PubSub()),
|
|
76296
|
+
__metadata("design:type", Function),
|
|
76297
|
+
__metadata("design:paramtypes", [MJEnvironment_, Object, PubSubEngine]),
|
|
76298
|
+
__metadata("design:returntype", Promise)
|
|
76299
|
+
], MJEnvironmentResolver.prototype, "MJUserRoutines_EnvironmentIDArray", null);
|
|
75498
76300
|
__decorate([
|
|
75499
76301
|
Mutation(() => MJEnvironment_),
|
|
75500
76302
|
__param(0, Arg('input', () => CreateMJEnvironmentInput)),
|
|
@@ -77139,6 +77941,763 @@ MJExplorerNavigationItemResolver = __decorate([
|
|
|
77139
77941
|
], MJExplorerNavigationItemResolver);
|
|
77140
77942
|
export { MJExplorerNavigationItemResolver };
|
|
77141
77943
|
//****************************************************************************
|
|
77944
|
+
// ENTITY CLASS for MJ: External Data Source Types
|
|
77945
|
+
//****************************************************************************
|
|
77946
|
+
let MJExternalDataSourceType_ = class MJExternalDataSourceType_ {
|
|
77947
|
+
};
|
|
77948
|
+
__decorate([
|
|
77949
|
+
Field(),
|
|
77950
|
+
MaxLength(36),
|
|
77951
|
+
__metadata("design:type", String)
|
|
77952
|
+
], MJExternalDataSourceType_.prototype, "ID", void 0);
|
|
77953
|
+
__decorate([
|
|
77954
|
+
Field({ description: `Display name of the external data source driver type (e.g. Snowflake, Oracle, MongoDB, PostgreSQL).` }),
|
|
77955
|
+
MaxLength(100),
|
|
77956
|
+
__metadata("design:type", String)
|
|
77957
|
+
], MJExternalDataSourceType_.prototype, "Name", void 0);
|
|
77958
|
+
__decorate([
|
|
77959
|
+
Field({ nullable: true, description: `Human-readable description of the driver type and what remote systems it targets.` }),
|
|
77960
|
+
__metadata("design:type", String)
|
|
77961
|
+
], MJExternalDataSourceType_.prototype, "Description", void 0);
|
|
77962
|
+
__decorate([
|
|
77963
|
+
Field({ description: `Driver class resolved at runtime via MJGlobal.ClassFactory.CreateInstance(BaseExternalDataSourceDriver, DriverClass). MUST match the @RegisterClass key on the concrete driver (e.g. 'SnowflakeExternalDriver').` }),
|
|
77964
|
+
MaxLength(255),
|
|
77965
|
+
__metadata("design:type", String)
|
|
77966
|
+
], MJExternalDataSourceType_.prototype, "DriverClass", void 0);
|
|
77967
|
+
__decorate([
|
|
77968
|
+
Field({ nullable: true }),
|
|
77969
|
+
MaxLength(36),
|
|
77970
|
+
__metadata("design:type", String)
|
|
77971
|
+
], MJExternalDataSourceType_.prototype, "RequiredCredentialTypeID", void 0);
|
|
77972
|
+
__decorate([
|
|
77973
|
+
Field({ description: `How the metadata-introspection command hydrates Entity/EntityField rows from this driver family: InformationSchema (ANSI INFORMATION_SCHEMA), NativeCatalog (vendor catalog views), SampledDocuments (infer shape from sampled documents, e.g. MongoDB), or Manual (no automated introspection).` }),
|
|
77974
|
+
MaxLength(17),
|
|
77975
|
+
__metadata("design:type", String)
|
|
77976
|
+
], MJExternalDataSourceType_.prototype, "MetadataIntrospectionStrategy", void 0);
|
|
77977
|
+
__decorate([
|
|
77978
|
+
Field({ description: `Dialect the driver expects for RunView filter pass-through: tsql, ansi, pgsql, mysql, oracle, or mongo-ast (MongoDB filter AST translated within the driver).` }),
|
|
77979
|
+
MaxLength(9),
|
|
77980
|
+
__metadata("design:type", String)
|
|
77981
|
+
], MJExternalDataSourceType_.prototype, "FilterDialect", void 0);
|
|
77982
|
+
__decorate([
|
|
77983
|
+
Field({ description: `Pagination mechanism the driver uses: OffsetFetch (SQL Server OFFSET/FETCH), LimitOffset (Postgres/MySQL LIMIT/OFFSET), TopSkip, or Cursor.` }),
|
|
77984
|
+
MaxLength(11),
|
|
77985
|
+
__metadata("design:type", String)
|
|
77986
|
+
], MJExternalDataSourceType_.prototype, "PagingStrategy", void 0);
|
|
77987
|
+
__decorate([
|
|
77988
|
+
Field(() => Boolean, { description: `Whether the driver can introspect remote schema metadata to assist Entity/EntityField generation.` }),
|
|
77989
|
+
__metadata("design:type", Boolean)
|
|
77990
|
+
], MJExternalDataSourceType_.prototype, "SupportsSchemaIntrospection", void 0);
|
|
77991
|
+
__decorate([
|
|
77992
|
+
Field(() => Boolean, { description: `Whether the driver supports native-dialect query execution for MJ Queries that set ExternalDataSourceID.` }),
|
|
77993
|
+
__metadata("design:type", Boolean)
|
|
77994
|
+
], MJExternalDataSourceType_.prototype, "SupportsNativeQueries", void 0);
|
|
77995
|
+
__decorate([
|
|
77996
|
+
Field(() => Boolean, { description: `Reserved for a future write-capable phase. Always 0 in the current read-only design; external entities are read-only.` }),
|
|
77997
|
+
__metadata("design:type", Boolean)
|
|
77998
|
+
], MJExternalDataSourceType_.prototype, "SupportsReadWrite", void 0);
|
|
77999
|
+
__decorate([
|
|
78000
|
+
Field({ description: `Lifecycle status of the driver-type catalog entry: Active or Deprecated.` }),
|
|
78001
|
+
MaxLength(10),
|
|
78002
|
+
__metadata("design:type", String)
|
|
78003
|
+
], MJExternalDataSourceType_.prototype, "Status", void 0);
|
|
78004
|
+
__decorate([
|
|
78005
|
+
Field(),
|
|
78006
|
+
__metadata("design:type", Date)
|
|
78007
|
+
], MJExternalDataSourceType_.prototype, "_mj__CreatedAt", void 0);
|
|
78008
|
+
__decorate([
|
|
78009
|
+
Field(),
|
|
78010
|
+
__metadata("design:type", Date)
|
|
78011
|
+
], MJExternalDataSourceType_.prototype, "_mj__UpdatedAt", void 0);
|
|
78012
|
+
__decorate([
|
|
78013
|
+
Field({ nullable: true }),
|
|
78014
|
+
MaxLength(100),
|
|
78015
|
+
__metadata("design:type", String)
|
|
78016
|
+
], MJExternalDataSourceType_.prototype, "RequiredCredentialType", void 0);
|
|
78017
|
+
__decorate([
|
|
78018
|
+
Field(() => [MJExternalDataSource_]),
|
|
78019
|
+
__metadata("design:type", Array)
|
|
78020
|
+
], MJExternalDataSourceType_.prototype, "MJExternalDataSources_TypeIDArray", void 0);
|
|
78021
|
+
MJExternalDataSourceType_ = __decorate([
|
|
78022
|
+
ObjectType()
|
|
78023
|
+
], MJExternalDataSourceType_);
|
|
78024
|
+
export { MJExternalDataSourceType_ };
|
|
78025
|
+
//****************************************************************************
|
|
78026
|
+
// INPUT TYPE for MJ: External Data Source Types
|
|
78027
|
+
//****************************************************************************
|
|
78028
|
+
let CreateMJExternalDataSourceTypeInput = class CreateMJExternalDataSourceTypeInput {
|
|
78029
|
+
};
|
|
78030
|
+
__decorate([
|
|
78031
|
+
Field({ nullable: true }),
|
|
78032
|
+
__metadata("design:type", String)
|
|
78033
|
+
], CreateMJExternalDataSourceTypeInput.prototype, "ID", void 0);
|
|
78034
|
+
__decorate([
|
|
78035
|
+
Field({ nullable: true }),
|
|
78036
|
+
__metadata("design:type", String)
|
|
78037
|
+
], CreateMJExternalDataSourceTypeInput.prototype, "Name", void 0);
|
|
78038
|
+
__decorate([
|
|
78039
|
+
Field({ nullable: true }),
|
|
78040
|
+
__metadata("design:type", String)
|
|
78041
|
+
], CreateMJExternalDataSourceTypeInput.prototype, "Description", void 0);
|
|
78042
|
+
__decorate([
|
|
78043
|
+
Field({ nullable: true }),
|
|
78044
|
+
__metadata("design:type", String)
|
|
78045
|
+
], CreateMJExternalDataSourceTypeInput.prototype, "DriverClass", void 0);
|
|
78046
|
+
__decorate([
|
|
78047
|
+
Field({ nullable: true }),
|
|
78048
|
+
__metadata("design:type", String)
|
|
78049
|
+
], CreateMJExternalDataSourceTypeInput.prototype, "RequiredCredentialTypeID", void 0);
|
|
78050
|
+
__decorate([
|
|
78051
|
+
Field({ nullable: true }),
|
|
78052
|
+
__metadata("design:type", String)
|
|
78053
|
+
], CreateMJExternalDataSourceTypeInput.prototype, "MetadataIntrospectionStrategy", void 0);
|
|
78054
|
+
__decorate([
|
|
78055
|
+
Field({ nullable: true }),
|
|
78056
|
+
__metadata("design:type", String)
|
|
78057
|
+
], CreateMJExternalDataSourceTypeInput.prototype, "FilterDialect", void 0);
|
|
78058
|
+
__decorate([
|
|
78059
|
+
Field({ nullable: true }),
|
|
78060
|
+
__metadata("design:type", String)
|
|
78061
|
+
], CreateMJExternalDataSourceTypeInput.prototype, "PagingStrategy", void 0);
|
|
78062
|
+
__decorate([
|
|
78063
|
+
Field(() => Boolean, { nullable: true }),
|
|
78064
|
+
__metadata("design:type", Boolean)
|
|
78065
|
+
], CreateMJExternalDataSourceTypeInput.prototype, "SupportsSchemaIntrospection", void 0);
|
|
78066
|
+
__decorate([
|
|
78067
|
+
Field(() => Boolean, { nullable: true }),
|
|
78068
|
+
__metadata("design:type", Boolean)
|
|
78069
|
+
], CreateMJExternalDataSourceTypeInput.prototype, "SupportsNativeQueries", void 0);
|
|
78070
|
+
__decorate([
|
|
78071
|
+
Field(() => Boolean, { nullable: true }),
|
|
78072
|
+
__metadata("design:type", Boolean)
|
|
78073
|
+
], CreateMJExternalDataSourceTypeInput.prototype, "SupportsReadWrite", void 0);
|
|
78074
|
+
__decorate([
|
|
78075
|
+
Field({ nullable: true }),
|
|
78076
|
+
__metadata("design:type", String)
|
|
78077
|
+
], CreateMJExternalDataSourceTypeInput.prototype, "Status", void 0);
|
|
78078
|
+
__decorate([
|
|
78079
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
78080
|
+
__metadata("design:type", RestoreContextInput)
|
|
78081
|
+
], CreateMJExternalDataSourceTypeInput.prototype, "RestoreContext___", void 0);
|
|
78082
|
+
CreateMJExternalDataSourceTypeInput = __decorate([
|
|
78083
|
+
InputType()
|
|
78084
|
+
], CreateMJExternalDataSourceTypeInput);
|
|
78085
|
+
export { CreateMJExternalDataSourceTypeInput };
|
|
78086
|
+
//****************************************************************************
|
|
78087
|
+
// INPUT TYPE for MJ: External Data Source Types
|
|
78088
|
+
//****************************************************************************
|
|
78089
|
+
let UpdateMJExternalDataSourceTypeInput = class UpdateMJExternalDataSourceTypeInput {
|
|
78090
|
+
};
|
|
78091
|
+
__decorate([
|
|
78092
|
+
Field(),
|
|
78093
|
+
__metadata("design:type", String)
|
|
78094
|
+
], UpdateMJExternalDataSourceTypeInput.prototype, "ID", void 0);
|
|
78095
|
+
__decorate([
|
|
78096
|
+
Field({ nullable: true }),
|
|
78097
|
+
__metadata("design:type", String)
|
|
78098
|
+
], UpdateMJExternalDataSourceTypeInput.prototype, "Name", void 0);
|
|
78099
|
+
__decorate([
|
|
78100
|
+
Field({ nullable: true }),
|
|
78101
|
+
__metadata("design:type", String)
|
|
78102
|
+
], UpdateMJExternalDataSourceTypeInput.prototype, "Description", void 0);
|
|
78103
|
+
__decorate([
|
|
78104
|
+
Field({ nullable: true }),
|
|
78105
|
+
__metadata("design:type", String)
|
|
78106
|
+
], UpdateMJExternalDataSourceTypeInput.prototype, "DriverClass", void 0);
|
|
78107
|
+
__decorate([
|
|
78108
|
+
Field({ nullable: true }),
|
|
78109
|
+
__metadata("design:type", String)
|
|
78110
|
+
], UpdateMJExternalDataSourceTypeInput.prototype, "RequiredCredentialTypeID", void 0);
|
|
78111
|
+
__decorate([
|
|
78112
|
+
Field({ nullable: true }),
|
|
78113
|
+
__metadata("design:type", String)
|
|
78114
|
+
], UpdateMJExternalDataSourceTypeInput.prototype, "MetadataIntrospectionStrategy", void 0);
|
|
78115
|
+
__decorate([
|
|
78116
|
+
Field({ nullable: true }),
|
|
78117
|
+
__metadata("design:type", String)
|
|
78118
|
+
], UpdateMJExternalDataSourceTypeInput.prototype, "FilterDialect", void 0);
|
|
78119
|
+
__decorate([
|
|
78120
|
+
Field({ nullable: true }),
|
|
78121
|
+
__metadata("design:type", String)
|
|
78122
|
+
], UpdateMJExternalDataSourceTypeInput.prototype, "PagingStrategy", void 0);
|
|
78123
|
+
__decorate([
|
|
78124
|
+
Field(() => Boolean, { nullable: true }),
|
|
78125
|
+
__metadata("design:type", Boolean)
|
|
78126
|
+
], UpdateMJExternalDataSourceTypeInput.prototype, "SupportsSchemaIntrospection", void 0);
|
|
78127
|
+
__decorate([
|
|
78128
|
+
Field(() => Boolean, { nullable: true }),
|
|
78129
|
+
__metadata("design:type", Boolean)
|
|
78130
|
+
], UpdateMJExternalDataSourceTypeInput.prototype, "SupportsNativeQueries", void 0);
|
|
78131
|
+
__decorate([
|
|
78132
|
+
Field(() => Boolean, { nullable: true }),
|
|
78133
|
+
__metadata("design:type", Boolean)
|
|
78134
|
+
], UpdateMJExternalDataSourceTypeInput.prototype, "SupportsReadWrite", void 0);
|
|
78135
|
+
__decorate([
|
|
78136
|
+
Field({ nullable: true }),
|
|
78137
|
+
__metadata("design:type", String)
|
|
78138
|
+
], UpdateMJExternalDataSourceTypeInput.prototype, "Status", void 0);
|
|
78139
|
+
__decorate([
|
|
78140
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
78141
|
+
__metadata("design:type", Array)
|
|
78142
|
+
], UpdateMJExternalDataSourceTypeInput.prototype, "OldValues___", void 0);
|
|
78143
|
+
__decorate([
|
|
78144
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
78145
|
+
__metadata("design:type", RestoreContextInput)
|
|
78146
|
+
], UpdateMJExternalDataSourceTypeInput.prototype, "RestoreContext___", void 0);
|
|
78147
|
+
UpdateMJExternalDataSourceTypeInput = __decorate([
|
|
78148
|
+
InputType()
|
|
78149
|
+
], UpdateMJExternalDataSourceTypeInput);
|
|
78150
|
+
export { UpdateMJExternalDataSourceTypeInput };
|
|
78151
|
+
//****************************************************************************
|
|
78152
|
+
// RESOLVER for MJ: External Data Source Types
|
|
78153
|
+
//****************************************************************************
|
|
78154
|
+
let RunMJExternalDataSourceTypeViewResult = class RunMJExternalDataSourceTypeViewResult {
|
|
78155
|
+
};
|
|
78156
|
+
__decorate([
|
|
78157
|
+
Field(() => [MJExternalDataSourceType_]),
|
|
78158
|
+
__metadata("design:type", Array)
|
|
78159
|
+
], RunMJExternalDataSourceTypeViewResult.prototype, "Results", void 0);
|
|
78160
|
+
__decorate([
|
|
78161
|
+
Field(() => String, { nullable: true }),
|
|
78162
|
+
__metadata("design:type", String)
|
|
78163
|
+
], RunMJExternalDataSourceTypeViewResult.prototype, "UserViewRunID", void 0);
|
|
78164
|
+
__decorate([
|
|
78165
|
+
Field(() => Int, { nullable: true }),
|
|
78166
|
+
__metadata("design:type", Number)
|
|
78167
|
+
], RunMJExternalDataSourceTypeViewResult.prototype, "RowCount", void 0);
|
|
78168
|
+
__decorate([
|
|
78169
|
+
Field(() => Int, { nullable: true }),
|
|
78170
|
+
__metadata("design:type", Number)
|
|
78171
|
+
], RunMJExternalDataSourceTypeViewResult.prototype, "TotalRowCount", void 0);
|
|
78172
|
+
__decorate([
|
|
78173
|
+
Field(() => Int, { nullable: true }),
|
|
78174
|
+
__metadata("design:type", Number)
|
|
78175
|
+
], RunMJExternalDataSourceTypeViewResult.prototype, "ExecutionTime", void 0);
|
|
78176
|
+
__decorate([
|
|
78177
|
+
Field({ nullable: true }),
|
|
78178
|
+
__metadata("design:type", String)
|
|
78179
|
+
], RunMJExternalDataSourceTypeViewResult.prototype, "ErrorMessage", void 0);
|
|
78180
|
+
__decorate([
|
|
78181
|
+
Field(() => Boolean, { nullable: false }),
|
|
78182
|
+
__metadata("design:type", Boolean)
|
|
78183
|
+
], RunMJExternalDataSourceTypeViewResult.prototype, "Success", void 0);
|
|
78184
|
+
RunMJExternalDataSourceTypeViewResult = __decorate([
|
|
78185
|
+
ObjectType()
|
|
78186
|
+
], RunMJExternalDataSourceTypeViewResult);
|
|
78187
|
+
export { RunMJExternalDataSourceTypeViewResult };
|
|
78188
|
+
let MJExternalDataSourceTypeResolver = class MJExternalDataSourceTypeResolver extends ResolverBase {
|
|
78189
|
+
async RunMJExternalDataSourceTypeViewByID(input, { providers, userPayload }, pubSub) {
|
|
78190
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78191
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
78192
|
+
}
|
|
78193
|
+
async RunMJExternalDataSourceTypeViewByName(input, { providers, userPayload }, pubSub) {
|
|
78194
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78195
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
78196
|
+
}
|
|
78197
|
+
async RunMJExternalDataSourceTypeDynamicView(input, { providers, userPayload }, pubSub) {
|
|
78198
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78199
|
+
input.EntityName = 'MJ: External Data Source Types';
|
|
78200
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
78201
|
+
}
|
|
78202
|
+
async MJExternalDataSourceType(ID, { userPayload, providers }, pubSub) {
|
|
78203
|
+
this.CheckUserReadPermissions('MJ: External Data Source Types', userPayload);
|
|
78204
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78205
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwExternalDataSourceTypes')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: External Data Source Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
78206
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
78207
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: External Data Source Types', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
78208
|
+
return result;
|
|
78209
|
+
}
|
|
78210
|
+
async MJExternalDataSources_TypeIDArray(mjexternaldatasourcetype_, { userPayload, providers }, pubSub) {
|
|
78211
|
+
this.CheckUserReadPermissions('MJ: External Data Sources', userPayload);
|
|
78212
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78213
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwExternalDataSources')} WHERE ${provider.QuoteIdentifier('TypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: External Data Sources', userPayload, EntityPermissionType.Read, 'AND');
|
|
78214
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjexternaldatasourcetype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
78215
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: External Data Sources', rows, this.GetUserFromPayload(userPayload));
|
|
78216
|
+
return result;
|
|
78217
|
+
}
|
|
78218
|
+
async CreateMJExternalDataSourceType(input, { providers, userPayload }, pubSub) {
|
|
78219
|
+
const provider = GetReadWriteProvider(providers);
|
|
78220
|
+
return this.CreateRecord('MJ: External Data Source Types', input, provider, userPayload, pubSub);
|
|
78221
|
+
}
|
|
78222
|
+
async UpdateMJExternalDataSourceType(input, { providers, userPayload }, pubSub) {
|
|
78223
|
+
const provider = GetReadWriteProvider(providers);
|
|
78224
|
+
return this.UpdateRecord('MJ: External Data Source Types', input, provider, userPayload, pubSub);
|
|
78225
|
+
}
|
|
78226
|
+
async DeleteMJExternalDataSourceType(ID, options, { providers, userPayload }, pubSub) {
|
|
78227
|
+
const provider = GetReadWriteProvider(providers);
|
|
78228
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
78229
|
+
return this.DeleteRecord('MJ: External Data Source Types', key, options, provider, userPayload, pubSub);
|
|
78230
|
+
}
|
|
78231
|
+
};
|
|
78232
|
+
__decorate([
|
|
78233
|
+
Query(() => RunMJExternalDataSourceTypeViewResult),
|
|
78234
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
78235
|
+
__param(1, Ctx()),
|
|
78236
|
+
__param(2, PubSub()),
|
|
78237
|
+
__metadata("design:type", Function),
|
|
78238
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
78239
|
+
__metadata("design:returntype", Promise)
|
|
78240
|
+
], MJExternalDataSourceTypeResolver.prototype, "RunMJExternalDataSourceTypeViewByID", null);
|
|
78241
|
+
__decorate([
|
|
78242
|
+
Query(() => RunMJExternalDataSourceTypeViewResult),
|
|
78243
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
78244
|
+
__param(1, Ctx()),
|
|
78245
|
+
__param(2, PubSub()),
|
|
78246
|
+
__metadata("design:type", Function),
|
|
78247
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
78248
|
+
__metadata("design:returntype", Promise)
|
|
78249
|
+
], MJExternalDataSourceTypeResolver.prototype, "RunMJExternalDataSourceTypeViewByName", null);
|
|
78250
|
+
__decorate([
|
|
78251
|
+
Query(() => RunMJExternalDataSourceTypeViewResult),
|
|
78252
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
78253
|
+
__param(1, Ctx()),
|
|
78254
|
+
__param(2, PubSub()),
|
|
78255
|
+
__metadata("design:type", Function),
|
|
78256
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
78257
|
+
__metadata("design:returntype", Promise)
|
|
78258
|
+
], MJExternalDataSourceTypeResolver.prototype, "RunMJExternalDataSourceTypeDynamicView", null);
|
|
78259
|
+
__decorate([
|
|
78260
|
+
Query(() => MJExternalDataSourceType_, { nullable: true }),
|
|
78261
|
+
__param(0, Arg('ID', () => String)),
|
|
78262
|
+
__param(1, Ctx()),
|
|
78263
|
+
__param(2, PubSub()),
|
|
78264
|
+
__metadata("design:type", Function),
|
|
78265
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
78266
|
+
__metadata("design:returntype", Promise)
|
|
78267
|
+
], MJExternalDataSourceTypeResolver.prototype, "MJExternalDataSourceType", null);
|
|
78268
|
+
__decorate([
|
|
78269
|
+
FieldResolver(() => [MJExternalDataSource_]),
|
|
78270
|
+
__param(0, Root()),
|
|
78271
|
+
__param(1, Ctx()),
|
|
78272
|
+
__param(2, PubSub()),
|
|
78273
|
+
__metadata("design:type", Function),
|
|
78274
|
+
__metadata("design:paramtypes", [MJExternalDataSourceType_, Object, PubSubEngine]),
|
|
78275
|
+
__metadata("design:returntype", Promise)
|
|
78276
|
+
], MJExternalDataSourceTypeResolver.prototype, "MJExternalDataSources_TypeIDArray", null);
|
|
78277
|
+
__decorate([
|
|
78278
|
+
Mutation(() => MJExternalDataSourceType_),
|
|
78279
|
+
__param(0, Arg('input', () => CreateMJExternalDataSourceTypeInput)),
|
|
78280
|
+
__param(1, Ctx()),
|
|
78281
|
+
__param(2, PubSub()),
|
|
78282
|
+
__metadata("design:type", Function),
|
|
78283
|
+
__metadata("design:paramtypes", [CreateMJExternalDataSourceTypeInput, Object, PubSubEngine]),
|
|
78284
|
+
__metadata("design:returntype", Promise)
|
|
78285
|
+
], MJExternalDataSourceTypeResolver.prototype, "CreateMJExternalDataSourceType", null);
|
|
78286
|
+
__decorate([
|
|
78287
|
+
Mutation(() => MJExternalDataSourceType_),
|
|
78288
|
+
__param(0, Arg('input', () => UpdateMJExternalDataSourceTypeInput)),
|
|
78289
|
+
__param(1, Ctx()),
|
|
78290
|
+
__param(2, PubSub()),
|
|
78291
|
+
__metadata("design:type", Function),
|
|
78292
|
+
__metadata("design:paramtypes", [UpdateMJExternalDataSourceTypeInput, Object, PubSubEngine]),
|
|
78293
|
+
__metadata("design:returntype", Promise)
|
|
78294
|
+
], MJExternalDataSourceTypeResolver.prototype, "UpdateMJExternalDataSourceType", null);
|
|
78295
|
+
__decorate([
|
|
78296
|
+
Mutation(() => MJExternalDataSourceType_),
|
|
78297
|
+
__param(0, Arg('ID', () => String)),
|
|
78298
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
78299
|
+
__param(2, Ctx()),
|
|
78300
|
+
__param(3, PubSub()),
|
|
78301
|
+
__metadata("design:type", Function),
|
|
78302
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
78303
|
+
__metadata("design:returntype", Promise)
|
|
78304
|
+
], MJExternalDataSourceTypeResolver.prototype, "DeleteMJExternalDataSourceType", null);
|
|
78305
|
+
MJExternalDataSourceTypeResolver = __decorate([
|
|
78306
|
+
Resolver(MJExternalDataSourceType_)
|
|
78307
|
+
], MJExternalDataSourceTypeResolver);
|
|
78308
|
+
export { MJExternalDataSourceTypeResolver };
|
|
78309
|
+
//****************************************************************************
|
|
78310
|
+
// ENTITY CLASS for MJ: External Data Sources
|
|
78311
|
+
//****************************************************************************
|
|
78312
|
+
let MJExternalDataSource_ = class MJExternalDataSource_ {
|
|
78313
|
+
};
|
|
78314
|
+
__decorate([
|
|
78315
|
+
Field(),
|
|
78316
|
+
MaxLength(36),
|
|
78317
|
+
__metadata("design:type", String)
|
|
78318
|
+
], MJExternalDataSource_.prototype, "ID", void 0);
|
|
78319
|
+
__decorate([
|
|
78320
|
+
Field({ description: `Display name of this configured external data source instance.` }),
|
|
78321
|
+
MaxLength(100),
|
|
78322
|
+
__metadata("design:type", String)
|
|
78323
|
+
], MJExternalDataSource_.prototype, "Name", void 0);
|
|
78324
|
+
__decorate([
|
|
78325
|
+
Field({ nullable: true, description: `Human-readable description of what this data source connects to and what it is used for.` }),
|
|
78326
|
+
__metadata("design:type", String)
|
|
78327
|
+
], MJExternalDataSource_.prototype, "Description", void 0);
|
|
78328
|
+
__decorate([
|
|
78329
|
+
Field(),
|
|
78330
|
+
MaxLength(36),
|
|
78331
|
+
__metadata("design:type", String)
|
|
78332
|
+
], MJExternalDataSource_.prototype, "TypeID", void 0);
|
|
78333
|
+
__decorate([
|
|
78334
|
+
Field({ nullable: true }),
|
|
78335
|
+
MaxLength(36),
|
|
78336
|
+
__metadata("design:type", String)
|
|
78337
|
+
], MJExternalDataSource_.prototype, "CredentialID", void 0);
|
|
78338
|
+
__decorate([
|
|
78339
|
+
Field({ nullable: true, description: `Default schema/namespace to resolve unqualified ExternalObjectName values against on the remote system (e.g. a SQL schema, Snowflake schema).` }),
|
|
78340
|
+
MaxLength(255),
|
|
78341
|
+
__metadata("design:type", String)
|
|
78342
|
+
], MJExternalDataSource_.prototype, "DefaultSchema", void 0);
|
|
78343
|
+
__decorate([
|
|
78344
|
+
Field({ nullable: true, description: `Default database/catalog on the remote system (e.g. Snowflake database, MongoDB dbName). Nullable when the driver derives it from connection config.` }),
|
|
78345
|
+
MaxLength(255),
|
|
78346
|
+
__metadata("design:type", String)
|
|
78347
|
+
], MJExternalDataSource_.prototype, "DefaultDatabase", void 0);
|
|
78348
|
+
__decorate([
|
|
78349
|
+
Field({ nullable: true, description: `JSON blob of NON-SECRET driver configuration (host, port, region, warehouse, replica-set name, pool sizing). All secrets flow through CredentialID -> Credential -> CredentialEngine; never store secrets here.` }),
|
|
78350
|
+
__metadata("design:type", String)
|
|
78351
|
+
], MJExternalDataSource_.prototype, "ConnectionConfig", void 0);
|
|
78352
|
+
__decorate([
|
|
78353
|
+
Field(() => Int, { description: `Default server-side cache TTL (seconds) for reads against this source. External reads use time-based TTL because no event-driven invalidation is possible on remote systems. Default 300.` }),
|
|
78354
|
+
__metadata("design:type", Number)
|
|
78355
|
+
], MJExternalDataSource_.prototype, "DefaultCacheTTLSeconds", void 0);
|
|
78356
|
+
__decorate([
|
|
78357
|
+
Field({ description: `Operational status of this data source: Active (usable), Disabled (RunView fails fast), or TestFailed (last connection test failed).` }),
|
|
78358
|
+
MaxLength(10),
|
|
78359
|
+
__metadata("design:type", String)
|
|
78360
|
+
], MJExternalDataSource_.prototype, "Status", void 0);
|
|
78361
|
+
__decorate([
|
|
78362
|
+
Field({ nullable: true, description: `Timestamp of the most recent connection test against this source.` }),
|
|
78363
|
+
__metadata("design:type", Date)
|
|
78364
|
+
], MJExternalDataSource_.prototype, "LastConnectionTestAt", void 0);
|
|
78365
|
+
__decorate([
|
|
78366
|
+
Field({ nullable: true, description: `Result message from the most recent connection test (success detail or error text).` }),
|
|
78367
|
+
__metadata("design:type", String)
|
|
78368
|
+
], MJExternalDataSource_.prototype, "LastConnectionTestResult", void 0);
|
|
78369
|
+
__decorate([
|
|
78370
|
+
Field(),
|
|
78371
|
+
__metadata("design:type", Date)
|
|
78372
|
+
], MJExternalDataSource_.prototype, "_mj__CreatedAt", void 0);
|
|
78373
|
+
__decorate([
|
|
78374
|
+
Field(),
|
|
78375
|
+
__metadata("design:type", Date)
|
|
78376
|
+
], MJExternalDataSource_.prototype, "_mj__UpdatedAt", void 0);
|
|
78377
|
+
__decorate([
|
|
78378
|
+
Field(),
|
|
78379
|
+
MaxLength(100),
|
|
78380
|
+
__metadata("design:type", String)
|
|
78381
|
+
], MJExternalDataSource_.prototype, "Type", void 0);
|
|
78382
|
+
__decorate([
|
|
78383
|
+
Field({ nullable: true }),
|
|
78384
|
+
MaxLength(200),
|
|
78385
|
+
__metadata("design:type", String)
|
|
78386
|
+
], MJExternalDataSource_.prototype, "Credential", void 0);
|
|
78387
|
+
__decorate([
|
|
78388
|
+
Field(() => [MJQuery_]),
|
|
78389
|
+
__metadata("design:type", Array)
|
|
78390
|
+
], MJExternalDataSource_.prototype, "MJQueries_ExternalDataSourceIDArray", void 0);
|
|
78391
|
+
__decorate([
|
|
78392
|
+
Field(() => [MJEntity_]),
|
|
78393
|
+
__metadata("design:type", Array)
|
|
78394
|
+
], MJExternalDataSource_.prototype, "MJEntities_ExternalDataSourceIDArray", void 0);
|
|
78395
|
+
MJExternalDataSource_ = __decorate([
|
|
78396
|
+
ObjectType()
|
|
78397
|
+
], MJExternalDataSource_);
|
|
78398
|
+
export { MJExternalDataSource_ };
|
|
78399
|
+
//****************************************************************************
|
|
78400
|
+
// INPUT TYPE for MJ: External Data Sources
|
|
78401
|
+
//****************************************************************************
|
|
78402
|
+
let CreateMJExternalDataSourceInput = class CreateMJExternalDataSourceInput {
|
|
78403
|
+
};
|
|
78404
|
+
__decorate([
|
|
78405
|
+
Field({ nullable: true }),
|
|
78406
|
+
__metadata("design:type", String)
|
|
78407
|
+
], CreateMJExternalDataSourceInput.prototype, "ID", void 0);
|
|
78408
|
+
__decorate([
|
|
78409
|
+
Field({ nullable: true }),
|
|
78410
|
+
__metadata("design:type", String)
|
|
78411
|
+
], CreateMJExternalDataSourceInput.prototype, "Name", void 0);
|
|
78412
|
+
__decorate([
|
|
78413
|
+
Field({ nullable: true }),
|
|
78414
|
+
__metadata("design:type", String)
|
|
78415
|
+
], CreateMJExternalDataSourceInput.prototype, "Description", void 0);
|
|
78416
|
+
__decorate([
|
|
78417
|
+
Field({ nullable: true }),
|
|
78418
|
+
__metadata("design:type", String)
|
|
78419
|
+
], CreateMJExternalDataSourceInput.prototype, "TypeID", void 0);
|
|
78420
|
+
__decorate([
|
|
78421
|
+
Field({ nullable: true }),
|
|
78422
|
+
__metadata("design:type", String)
|
|
78423
|
+
], CreateMJExternalDataSourceInput.prototype, "CredentialID", void 0);
|
|
78424
|
+
__decorate([
|
|
78425
|
+
Field({ nullable: true }),
|
|
78426
|
+
__metadata("design:type", String)
|
|
78427
|
+
], CreateMJExternalDataSourceInput.prototype, "DefaultSchema", void 0);
|
|
78428
|
+
__decorate([
|
|
78429
|
+
Field({ nullable: true }),
|
|
78430
|
+
__metadata("design:type", String)
|
|
78431
|
+
], CreateMJExternalDataSourceInput.prototype, "DefaultDatabase", void 0);
|
|
78432
|
+
__decorate([
|
|
78433
|
+
Field({ nullable: true }),
|
|
78434
|
+
__metadata("design:type", String)
|
|
78435
|
+
], CreateMJExternalDataSourceInput.prototype, "ConnectionConfig", void 0);
|
|
78436
|
+
__decorate([
|
|
78437
|
+
Field(() => Int, { nullable: true }),
|
|
78438
|
+
__metadata("design:type", Number)
|
|
78439
|
+
], CreateMJExternalDataSourceInput.prototype, "DefaultCacheTTLSeconds", void 0);
|
|
78440
|
+
__decorate([
|
|
78441
|
+
Field({ nullable: true }),
|
|
78442
|
+
__metadata("design:type", String)
|
|
78443
|
+
], CreateMJExternalDataSourceInput.prototype, "Status", void 0);
|
|
78444
|
+
__decorate([
|
|
78445
|
+
Field({ nullable: true }),
|
|
78446
|
+
__metadata("design:type", Date)
|
|
78447
|
+
], CreateMJExternalDataSourceInput.prototype, "LastConnectionTestAt", void 0);
|
|
78448
|
+
__decorate([
|
|
78449
|
+
Field({ nullable: true }),
|
|
78450
|
+
__metadata("design:type", String)
|
|
78451
|
+
], CreateMJExternalDataSourceInput.prototype, "LastConnectionTestResult", void 0);
|
|
78452
|
+
__decorate([
|
|
78453
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
78454
|
+
__metadata("design:type", RestoreContextInput)
|
|
78455
|
+
], CreateMJExternalDataSourceInput.prototype, "RestoreContext___", void 0);
|
|
78456
|
+
CreateMJExternalDataSourceInput = __decorate([
|
|
78457
|
+
InputType()
|
|
78458
|
+
], CreateMJExternalDataSourceInput);
|
|
78459
|
+
export { CreateMJExternalDataSourceInput };
|
|
78460
|
+
//****************************************************************************
|
|
78461
|
+
// INPUT TYPE for MJ: External Data Sources
|
|
78462
|
+
//****************************************************************************
|
|
78463
|
+
let UpdateMJExternalDataSourceInput = class UpdateMJExternalDataSourceInput {
|
|
78464
|
+
};
|
|
78465
|
+
__decorate([
|
|
78466
|
+
Field(),
|
|
78467
|
+
__metadata("design:type", String)
|
|
78468
|
+
], UpdateMJExternalDataSourceInput.prototype, "ID", void 0);
|
|
78469
|
+
__decorate([
|
|
78470
|
+
Field({ nullable: true }),
|
|
78471
|
+
__metadata("design:type", String)
|
|
78472
|
+
], UpdateMJExternalDataSourceInput.prototype, "Name", void 0);
|
|
78473
|
+
__decorate([
|
|
78474
|
+
Field({ nullable: true }),
|
|
78475
|
+
__metadata("design:type", String)
|
|
78476
|
+
], UpdateMJExternalDataSourceInput.prototype, "Description", void 0);
|
|
78477
|
+
__decorate([
|
|
78478
|
+
Field({ nullable: true }),
|
|
78479
|
+
__metadata("design:type", String)
|
|
78480
|
+
], UpdateMJExternalDataSourceInput.prototype, "TypeID", void 0);
|
|
78481
|
+
__decorate([
|
|
78482
|
+
Field({ nullable: true }),
|
|
78483
|
+
__metadata("design:type", String)
|
|
78484
|
+
], UpdateMJExternalDataSourceInput.prototype, "CredentialID", void 0);
|
|
78485
|
+
__decorate([
|
|
78486
|
+
Field({ nullable: true }),
|
|
78487
|
+
__metadata("design:type", String)
|
|
78488
|
+
], UpdateMJExternalDataSourceInput.prototype, "DefaultSchema", void 0);
|
|
78489
|
+
__decorate([
|
|
78490
|
+
Field({ nullable: true }),
|
|
78491
|
+
__metadata("design:type", String)
|
|
78492
|
+
], UpdateMJExternalDataSourceInput.prototype, "DefaultDatabase", void 0);
|
|
78493
|
+
__decorate([
|
|
78494
|
+
Field({ nullable: true }),
|
|
78495
|
+
__metadata("design:type", String)
|
|
78496
|
+
], UpdateMJExternalDataSourceInput.prototype, "ConnectionConfig", void 0);
|
|
78497
|
+
__decorate([
|
|
78498
|
+
Field(() => Int, { nullable: true }),
|
|
78499
|
+
__metadata("design:type", Number)
|
|
78500
|
+
], UpdateMJExternalDataSourceInput.prototype, "DefaultCacheTTLSeconds", void 0);
|
|
78501
|
+
__decorate([
|
|
78502
|
+
Field({ nullable: true }),
|
|
78503
|
+
__metadata("design:type", String)
|
|
78504
|
+
], UpdateMJExternalDataSourceInput.prototype, "Status", void 0);
|
|
78505
|
+
__decorate([
|
|
78506
|
+
Field({ nullable: true }),
|
|
78507
|
+
__metadata("design:type", Date)
|
|
78508
|
+
], UpdateMJExternalDataSourceInput.prototype, "LastConnectionTestAt", void 0);
|
|
78509
|
+
__decorate([
|
|
78510
|
+
Field({ nullable: true }),
|
|
78511
|
+
__metadata("design:type", String)
|
|
78512
|
+
], UpdateMJExternalDataSourceInput.prototype, "LastConnectionTestResult", void 0);
|
|
78513
|
+
__decorate([
|
|
78514
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
78515
|
+
__metadata("design:type", Array)
|
|
78516
|
+
], UpdateMJExternalDataSourceInput.prototype, "OldValues___", void 0);
|
|
78517
|
+
__decorate([
|
|
78518
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
78519
|
+
__metadata("design:type", RestoreContextInput)
|
|
78520
|
+
], UpdateMJExternalDataSourceInput.prototype, "RestoreContext___", void 0);
|
|
78521
|
+
UpdateMJExternalDataSourceInput = __decorate([
|
|
78522
|
+
InputType()
|
|
78523
|
+
], UpdateMJExternalDataSourceInput);
|
|
78524
|
+
export { UpdateMJExternalDataSourceInput };
|
|
78525
|
+
//****************************************************************************
|
|
78526
|
+
// RESOLVER for MJ: External Data Sources
|
|
78527
|
+
//****************************************************************************
|
|
78528
|
+
let RunMJExternalDataSourceViewResult = class RunMJExternalDataSourceViewResult {
|
|
78529
|
+
};
|
|
78530
|
+
__decorate([
|
|
78531
|
+
Field(() => [MJExternalDataSource_]),
|
|
78532
|
+
__metadata("design:type", Array)
|
|
78533
|
+
], RunMJExternalDataSourceViewResult.prototype, "Results", void 0);
|
|
78534
|
+
__decorate([
|
|
78535
|
+
Field(() => String, { nullable: true }),
|
|
78536
|
+
__metadata("design:type", String)
|
|
78537
|
+
], RunMJExternalDataSourceViewResult.prototype, "UserViewRunID", void 0);
|
|
78538
|
+
__decorate([
|
|
78539
|
+
Field(() => Int, { nullable: true }),
|
|
78540
|
+
__metadata("design:type", Number)
|
|
78541
|
+
], RunMJExternalDataSourceViewResult.prototype, "RowCount", void 0);
|
|
78542
|
+
__decorate([
|
|
78543
|
+
Field(() => Int, { nullable: true }),
|
|
78544
|
+
__metadata("design:type", Number)
|
|
78545
|
+
], RunMJExternalDataSourceViewResult.prototype, "TotalRowCount", void 0);
|
|
78546
|
+
__decorate([
|
|
78547
|
+
Field(() => Int, { nullable: true }),
|
|
78548
|
+
__metadata("design:type", Number)
|
|
78549
|
+
], RunMJExternalDataSourceViewResult.prototype, "ExecutionTime", void 0);
|
|
78550
|
+
__decorate([
|
|
78551
|
+
Field({ nullable: true }),
|
|
78552
|
+
__metadata("design:type", String)
|
|
78553
|
+
], RunMJExternalDataSourceViewResult.prototype, "ErrorMessage", void 0);
|
|
78554
|
+
__decorate([
|
|
78555
|
+
Field(() => Boolean, { nullable: false }),
|
|
78556
|
+
__metadata("design:type", Boolean)
|
|
78557
|
+
], RunMJExternalDataSourceViewResult.prototype, "Success", void 0);
|
|
78558
|
+
RunMJExternalDataSourceViewResult = __decorate([
|
|
78559
|
+
ObjectType()
|
|
78560
|
+
], RunMJExternalDataSourceViewResult);
|
|
78561
|
+
export { RunMJExternalDataSourceViewResult };
|
|
78562
|
+
let MJExternalDataSourceResolver = class MJExternalDataSourceResolver extends ResolverBase {
|
|
78563
|
+
async RunMJExternalDataSourceViewByID(input, { providers, userPayload }, pubSub) {
|
|
78564
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78565
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
78566
|
+
}
|
|
78567
|
+
async RunMJExternalDataSourceViewByName(input, { providers, userPayload }, pubSub) {
|
|
78568
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78569
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
78570
|
+
}
|
|
78571
|
+
async RunMJExternalDataSourceDynamicView(input, { providers, userPayload }, pubSub) {
|
|
78572
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78573
|
+
input.EntityName = 'MJ: External Data Sources';
|
|
78574
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
78575
|
+
}
|
|
78576
|
+
async MJExternalDataSource(ID, { userPayload, providers }, pubSub) {
|
|
78577
|
+
this.CheckUserReadPermissions('MJ: External Data Sources', userPayload);
|
|
78578
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78579
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwExternalDataSources')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: External Data Sources', userPayload, EntityPermissionType.Read, 'AND');
|
|
78580
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
78581
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: External Data Sources', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
78582
|
+
return result;
|
|
78583
|
+
}
|
|
78584
|
+
async MJQueries_ExternalDataSourceIDArray(mjexternaldatasource_, { userPayload, providers }, pubSub) {
|
|
78585
|
+
this.CheckUserReadPermissions('MJ: Queries', userPayload);
|
|
78586
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78587
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwQueries')} WHERE ${provider.QuoteIdentifier('ExternalDataSourceID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Queries', userPayload, EntityPermissionType.Read, 'AND');
|
|
78588
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjexternaldatasource_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
78589
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Queries', rows, this.GetUserFromPayload(userPayload));
|
|
78590
|
+
return result;
|
|
78591
|
+
}
|
|
78592
|
+
async MJEntities_ExternalDataSourceIDArray(mjexternaldatasource_, { userPayload, providers }, pubSub) {
|
|
78593
|
+
this.CheckUserReadPermissions('MJ: Entities', userPayload);
|
|
78594
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78595
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwEntities')} WHERE ${provider.QuoteIdentifier('ExternalDataSourceID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Entities', userPayload, EntityPermissionType.Read, 'AND');
|
|
78596
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjexternaldatasource_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
78597
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entities', rows, this.GetUserFromPayload(userPayload));
|
|
78598
|
+
return result;
|
|
78599
|
+
}
|
|
78600
|
+
async CreateMJExternalDataSource(input, { providers, userPayload }, pubSub) {
|
|
78601
|
+
const provider = GetReadWriteProvider(providers);
|
|
78602
|
+
return this.CreateRecord('MJ: External Data Sources', input, provider, userPayload, pubSub);
|
|
78603
|
+
}
|
|
78604
|
+
async UpdateMJExternalDataSource(input, { providers, userPayload }, pubSub) {
|
|
78605
|
+
const provider = GetReadWriteProvider(providers);
|
|
78606
|
+
return this.UpdateRecord('MJ: External Data Sources', input, provider, userPayload, pubSub);
|
|
78607
|
+
}
|
|
78608
|
+
async DeleteMJExternalDataSource(ID, options, { providers, userPayload }, pubSub) {
|
|
78609
|
+
const provider = GetReadWriteProvider(providers);
|
|
78610
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
78611
|
+
return this.DeleteRecord('MJ: External Data Sources', key, options, provider, userPayload, pubSub);
|
|
78612
|
+
}
|
|
78613
|
+
};
|
|
78614
|
+
__decorate([
|
|
78615
|
+
Query(() => RunMJExternalDataSourceViewResult),
|
|
78616
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
78617
|
+
__param(1, Ctx()),
|
|
78618
|
+
__param(2, PubSub()),
|
|
78619
|
+
__metadata("design:type", Function),
|
|
78620
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
78621
|
+
__metadata("design:returntype", Promise)
|
|
78622
|
+
], MJExternalDataSourceResolver.prototype, "RunMJExternalDataSourceViewByID", null);
|
|
78623
|
+
__decorate([
|
|
78624
|
+
Query(() => RunMJExternalDataSourceViewResult),
|
|
78625
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
78626
|
+
__param(1, Ctx()),
|
|
78627
|
+
__param(2, PubSub()),
|
|
78628
|
+
__metadata("design:type", Function),
|
|
78629
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
78630
|
+
__metadata("design:returntype", Promise)
|
|
78631
|
+
], MJExternalDataSourceResolver.prototype, "RunMJExternalDataSourceViewByName", null);
|
|
78632
|
+
__decorate([
|
|
78633
|
+
Query(() => RunMJExternalDataSourceViewResult),
|
|
78634
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
78635
|
+
__param(1, Ctx()),
|
|
78636
|
+
__param(2, PubSub()),
|
|
78637
|
+
__metadata("design:type", Function),
|
|
78638
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
78639
|
+
__metadata("design:returntype", Promise)
|
|
78640
|
+
], MJExternalDataSourceResolver.prototype, "RunMJExternalDataSourceDynamicView", null);
|
|
78641
|
+
__decorate([
|
|
78642
|
+
Query(() => MJExternalDataSource_, { nullable: true }),
|
|
78643
|
+
__param(0, Arg('ID', () => String)),
|
|
78644
|
+
__param(1, Ctx()),
|
|
78645
|
+
__param(2, PubSub()),
|
|
78646
|
+
__metadata("design:type", Function),
|
|
78647
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
78648
|
+
__metadata("design:returntype", Promise)
|
|
78649
|
+
], MJExternalDataSourceResolver.prototype, "MJExternalDataSource", null);
|
|
78650
|
+
__decorate([
|
|
78651
|
+
FieldResolver(() => [MJQuery_]),
|
|
78652
|
+
__param(0, Root()),
|
|
78653
|
+
__param(1, Ctx()),
|
|
78654
|
+
__param(2, PubSub()),
|
|
78655
|
+
__metadata("design:type", Function),
|
|
78656
|
+
__metadata("design:paramtypes", [MJExternalDataSource_, Object, PubSubEngine]),
|
|
78657
|
+
__metadata("design:returntype", Promise)
|
|
78658
|
+
], MJExternalDataSourceResolver.prototype, "MJQueries_ExternalDataSourceIDArray", null);
|
|
78659
|
+
__decorate([
|
|
78660
|
+
FieldResolver(() => [MJEntity_]),
|
|
78661
|
+
__param(0, Root()),
|
|
78662
|
+
__param(1, Ctx()),
|
|
78663
|
+
__param(2, PubSub()),
|
|
78664
|
+
__metadata("design:type", Function),
|
|
78665
|
+
__metadata("design:paramtypes", [MJExternalDataSource_, Object, PubSubEngine]),
|
|
78666
|
+
__metadata("design:returntype", Promise)
|
|
78667
|
+
], MJExternalDataSourceResolver.prototype, "MJEntities_ExternalDataSourceIDArray", null);
|
|
78668
|
+
__decorate([
|
|
78669
|
+
Mutation(() => MJExternalDataSource_),
|
|
78670
|
+
__param(0, Arg('input', () => CreateMJExternalDataSourceInput)),
|
|
78671
|
+
__param(1, Ctx()),
|
|
78672
|
+
__param(2, PubSub()),
|
|
78673
|
+
__metadata("design:type", Function),
|
|
78674
|
+
__metadata("design:paramtypes", [CreateMJExternalDataSourceInput, Object, PubSubEngine]),
|
|
78675
|
+
__metadata("design:returntype", Promise)
|
|
78676
|
+
], MJExternalDataSourceResolver.prototype, "CreateMJExternalDataSource", null);
|
|
78677
|
+
__decorate([
|
|
78678
|
+
Mutation(() => MJExternalDataSource_),
|
|
78679
|
+
__param(0, Arg('input', () => UpdateMJExternalDataSourceInput)),
|
|
78680
|
+
__param(1, Ctx()),
|
|
78681
|
+
__param(2, PubSub()),
|
|
78682
|
+
__metadata("design:type", Function),
|
|
78683
|
+
__metadata("design:paramtypes", [UpdateMJExternalDataSourceInput, Object, PubSubEngine]),
|
|
78684
|
+
__metadata("design:returntype", Promise)
|
|
78685
|
+
], MJExternalDataSourceResolver.prototype, "UpdateMJExternalDataSource", null);
|
|
78686
|
+
__decorate([
|
|
78687
|
+
Mutation(() => MJExternalDataSource_),
|
|
78688
|
+
__param(0, Arg('ID', () => String)),
|
|
78689
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
78690
|
+
__param(2, Ctx()),
|
|
78691
|
+
__param(3, PubSub()),
|
|
78692
|
+
__metadata("design:type", Function),
|
|
78693
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
78694
|
+
__metadata("design:returntype", Promise)
|
|
78695
|
+
], MJExternalDataSourceResolver.prototype, "DeleteMJExternalDataSource", null);
|
|
78696
|
+
MJExternalDataSourceResolver = __decorate([
|
|
78697
|
+
Resolver(MJExternalDataSource_)
|
|
78698
|
+
], MJExternalDataSourceResolver);
|
|
78699
|
+
export { MJExternalDataSourceResolver };
|
|
78700
|
+
//****************************************************************************
|
|
77142
78701
|
// ENTITY CLASS for MJ: File Categories
|
|
77143
78702
|
//****************************************************************************
|
|
77144
78703
|
let MJFileCategory_ = class MJFileCategory_ {
|
|
@@ -97254,6 +98813,11 @@ __decorate([
|
|
|
97254
98813
|
Field(() => Boolean, { description: `When true, this query can be referenced by other queries using composition syntax. Only queries that are both Reusable and Approved can be composed into other queries.` }),
|
|
97255
98814
|
__metadata("design:type", Boolean)
|
|
97256
98815
|
], MJQuery_.prototype, "Reusable", void 0);
|
|
98816
|
+
__decorate([
|
|
98817
|
+
Field({ nullable: true }),
|
|
98818
|
+
MaxLength(36),
|
|
98819
|
+
__metadata("design:type", String)
|
|
98820
|
+
], MJQuery_.prototype, "ExternalDataSourceID", void 0);
|
|
97257
98821
|
__decorate([
|
|
97258
98822
|
Field({ nullable: true }),
|
|
97259
98823
|
MaxLength(50),
|
|
@@ -97269,6 +98833,11 @@ __decorate([
|
|
|
97269
98833
|
MaxLength(100),
|
|
97270
98834
|
__metadata("design:type", String)
|
|
97271
98835
|
], MJQuery_.prototype, "SQLDialect", void 0);
|
|
98836
|
+
__decorate([
|
|
98837
|
+
Field({ nullable: true }),
|
|
98838
|
+
MaxLength(100),
|
|
98839
|
+
__metadata("design:type", String)
|
|
98840
|
+
], MJQuery_.prototype, "ExternalDataSource", void 0);
|
|
97272
98841
|
__decorate([
|
|
97273
98842
|
Field(() => [MJDataContextItem_]),
|
|
97274
98843
|
__metadata("design:type", Array)
|
|
@@ -97398,6 +98967,10 @@ __decorate([
|
|
|
97398
98967
|
Field(() => Boolean, { nullable: true }),
|
|
97399
98968
|
__metadata("design:type", Boolean)
|
|
97400
98969
|
], CreateMJQueryInput.prototype, "Reusable", void 0);
|
|
98970
|
+
__decorate([
|
|
98971
|
+
Field({ nullable: true }),
|
|
98972
|
+
__metadata("design:type", String)
|
|
98973
|
+
], CreateMJQueryInput.prototype, "ExternalDataSourceID", void 0);
|
|
97401
98974
|
__decorate([
|
|
97402
98975
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
97403
98976
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -97499,6 +99072,10 @@ __decorate([
|
|
|
97499
99072
|
Field(() => Boolean, { nullable: true }),
|
|
97500
99073
|
__metadata("design:type", Boolean)
|
|
97501
99074
|
], UpdateMJQueryInput.prototype, "Reusable", void 0);
|
|
99075
|
+
__decorate([
|
|
99076
|
+
Field({ nullable: true }),
|
|
99077
|
+
__metadata("design:type", String)
|
|
99078
|
+
], UpdateMJQueryInput.prototype, "ExternalDataSourceID", void 0);
|
|
97502
99079
|
__decorate([
|
|
97503
99080
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
97504
99081
|
__metadata("design:type", Array)
|
|
@@ -108863,6 +110440,10 @@ __decorate([
|
|
|
108863
110440
|
Field(() => [MJAISkillPermission_]),
|
|
108864
110441
|
__metadata("design:type", Array)
|
|
108865
110442
|
], MJRole_.prototype, "MJAISkillPermissions_RoleIDArray", void 0);
|
|
110443
|
+
__decorate([
|
|
110444
|
+
Field(() => [MJConversationWidgetInstance_]),
|
|
110445
|
+
__metadata("design:type", Array)
|
|
110446
|
+
], MJRole_.prototype, "MJConversationWidgetInstances_GuestRoleIDArray", void 0);
|
|
108866
110447
|
MJRole_ = __decorate([
|
|
108867
110448
|
ObjectType({ description: `Roles are used for security administration and can have zero to many Users as members` })
|
|
108868
110449
|
], MJRole_);
|
|
@@ -109124,6 +110705,14 @@ let MJRoleResolver = class MJRoleResolver extends ResolverBase {
|
|
|
109124
110705
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Skill Permissions', rows, this.GetUserFromPayload(userPayload));
|
|
109125
110706
|
return result;
|
|
109126
110707
|
}
|
|
110708
|
+
async MJConversationWidgetInstances_GuestRoleIDArray(mjrole_, { userPayload, providers }, pubSub) {
|
|
110709
|
+
this.CheckUserReadPermissions('MJ: Conversation Widget Instances', userPayload);
|
|
110710
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
110711
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversationWidgetInstances')} WHERE ${provider.QuoteIdentifier('GuestRoleID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversation Widget Instances', userPayload, EntityPermissionType.Read, 'AND');
|
|
110712
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrole_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
110713
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversation Widget Instances', rows, this.GetUserFromPayload(userPayload));
|
|
110714
|
+
return result;
|
|
110715
|
+
}
|
|
109127
110716
|
async CreateMJRole(input, { providers, userPayload }, pubSub) {
|
|
109128
110717
|
const provider = GetReadWriteProvider(providers);
|
|
109129
110718
|
return this.CreateRecord('MJ: Roles', input, provider, userPayload, pubSub);
|
|
@@ -109317,6 +110906,15 @@ __decorate([
|
|
|
109317
110906
|
__metadata("design:paramtypes", [MJRole_, Object, PubSubEngine]),
|
|
109318
110907
|
__metadata("design:returntype", Promise)
|
|
109319
110908
|
], MJRoleResolver.prototype, "MJAISkillPermissions_RoleIDArray", null);
|
|
110909
|
+
__decorate([
|
|
110910
|
+
FieldResolver(() => [MJConversationWidgetInstance_]),
|
|
110911
|
+
__param(0, Root()),
|
|
110912
|
+
__param(1, Ctx()),
|
|
110913
|
+
__param(2, PubSub()),
|
|
110914
|
+
__metadata("design:type", Function),
|
|
110915
|
+
__metadata("design:paramtypes", [MJRole_, Object, PubSubEngine]),
|
|
110916
|
+
__metadata("design:returntype", Promise)
|
|
110917
|
+
], MJRoleResolver.prototype, "MJConversationWidgetInstances_GuestRoleIDArray", null);
|
|
109320
110918
|
__decorate([
|
|
109321
110919
|
Mutation(() => MJRole_),
|
|
109322
110920
|
__param(0, Arg('input', () => CreateMJRoleInput)),
|
|
@@ -122841,6 +124439,10 @@ __decorate([
|
|
|
122841
124439
|
Field(() => [MJEntityDocument_]),
|
|
122842
124440
|
__metadata("design:type", Array)
|
|
122843
124441
|
], MJTemplate_.prototype, "MJEntityDocuments_TemplateIDArray", void 0);
|
|
124442
|
+
__decorate([
|
|
124443
|
+
Field(() => [MJUserRoutine_]),
|
|
124444
|
+
__metadata("design:type", Array)
|
|
124445
|
+
], MJTemplate_.prototype, "MJUserRoutines_NotificationTemplateIDArray", void 0);
|
|
122844
124446
|
MJTemplate_ = __decorate([
|
|
122845
124447
|
ObjectType({ description: `Templates are used for dynamic expansion of a static template with data from a given context. Templates can be used to create documents, messages and anything else that requires dynamic document creation merging together static text, data and lightweight logic` })
|
|
122846
124448
|
], MJTemplate_);
|
|
@@ -123070,6 +124672,14 @@ let MJTemplateResolver = class MJTemplateResolver extends ResolverBase {
|
|
|
123070
124672
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Entity Documents', rows, this.GetUserFromPayload(userPayload));
|
|
123071
124673
|
return result;
|
|
123072
124674
|
}
|
|
124675
|
+
async MJUserRoutines_NotificationTemplateIDArray(mjtemplate_, { userPayload, providers }, pubSub) {
|
|
124676
|
+
this.CheckUserReadPermissions('MJ: User Routines', userPayload);
|
|
124677
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
124678
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserRoutines')} WHERE ${provider.QuoteIdentifier('NotificationTemplateID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Routines', userPayload, EntityPermissionType.Read, 'AND');
|
|
124679
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjtemplate_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
124680
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User Routines', rows, this.GetUserFromPayload(userPayload));
|
|
124681
|
+
return result;
|
|
124682
|
+
}
|
|
123073
124683
|
async CreateMJTemplate(input, { providers, userPayload }, pubSub) {
|
|
123074
124684
|
const provider = GetReadWriteProvider(providers);
|
|
123075
124685
|
return this.CreateRecord('MJ: Templates', input, provider, userPayload, pubSub);
|
|
@@ -123192,6 +124802,15 @@ __decorate([
|
|
|
123192
124802
|
__metadata("design:paramtypes", [MJTemplate_, Object, PubSubEngine]),
|
|
123193
124803
|
__metadata("design:returntype", Promise)
|
|
123194
124804
|
], MJTemplateResolver.prototype, "MJEntityDocuments_TemplateIDArray", null);
|
|
124805
|
+
__decorate([
|
|
124806
|
+
FieldResolver(() => [MJUserRoutine_]),
|
|
124807
|
+
__param(0, Root()),
|
|
124808
|
+
__param(1, Ctx()),
|
|
124809
|
+
__param(2, PubSub()),
|
|
124810
|
+
__metadata("design:type", Function),
|
|
124811
|
+
__metadata("design:paramtypes", [MJTemplate_, Object, PubSubEngine]),
|
|
124812
|
+
__metadata("design:returntype", Promise)
|
|
124813
|
+
], MJTemplateResolver.prototype, "MJUserRoutines_NotificationTemplateIDArray", null);
|
|
123195
124814
|
__decorate([
|
|
123196
124815
|
Mutation(() => MJTemplate_),
|
|
123197
124816
|
__param(0, Arg('input', () => CreateMJTemplateInput)),
|
|
@@ -129434,6 +131053,1205 @@ MJUserRoleResolver = __decorate([
|
|
|
129434
131053
|
], MJUserRoleResolver);
|
|
129435
131054
|
export { MJUserRoleResolver };
|
|
129436
131055
|
//****************************************************************************
|
|
131056
|
+
// ENTITY CLASS for MJ: User Routine Recipients
|
|
131057
|
+
//****************************************************************************
|
|
131058
|
+
let MJUserRoutineRecipient_ = class MJUserRoutineRecipient_ {
|
|
131059
|
+
};
|
|
131060
|
+
__decorate([
|
|
131061
|
+
Field(),
|
|
131062
|
+
MaxLength(36),
|
|
131063
|
+
__metadata("design:type", String)
|
|
131064
|
+
], MJUserRoutineRecipient_.prototype, "ID", void 0);
|
|
131065
|
+
__decorate([
|
|
131066
|
+
Field({ description: `Routine this recipient belongs to.` }),
|
|
131067
|
+
MaxLength(36),
|
|
131068
|
+
__metadata("design:type", String)
|
|
131069
|
+
], MJUserRoutineRecipient_.prototype, "RoutineID", void 0);
|
|
131070
|
+
__decorate([
|
|
131071
|
+
Field({ nullable: true, description: `Internal MJ user recipient (when notifying an existing user). Either UserID or Email is set.` }),
|
|
131072
|
+
MaxLength(36),
|
|
131073
|
+
__metadata("design:type", String)
|
|
131074
|
+
], MJUserRoutineRecipient_.prototype, "UserID", void 0);
|
|
131075
|
+
__decorate([
|
|
131076
|
+
Field({ nullable: true, description: `External email recipient (when notifying a non-user). Either UserID or Email is set.` }),
|
|
131077
|
+
MaxLength(255),
|
|
131078
|
+
__metadata("design:type", String)
|
|
131079
|
+
], MJUserRoutineRecipient_.prototype, "Email", void 0);
|
|
131080
|
+
__decorate([
|
|
131081
|
+
Field({ description: `Delivery channel for this recipient: InApp or Email.` }),
|
|
131082
|
+
MaxLength(20),
|
|
131083
|
+
__metadata("design:type", String)
|
|
131084
|
+
], MJUserRoutineRecipient_.prototype, "Channel", void 0);
|
|
131085
|
+
__decorate([
|
|
131086
|
+
Field(() => Int, { description: `Explicit display/notification ordering of recipients within a routine (ascending).` }),
|
|
131087
|
+
__metadata("design:type", Number)
|
|
131088
|
+
], MJUserRoutineRecipient_.prototype, "Sequence", void 0);
|
|
131089
|
+
__decorate([
|
|
131090
|
+
Field(),
|
|
131091
|
+
__metadata("design:type", Date)
|
|
131092
|
+
], MJUserRoutineRecipient_.prototype, "_mj__CreatedAt", void 0);
|
|
131093
|
+
__decorate([
|
|
131094
|
+
Field(),
|
|
131095
|
+
__metadata("design:type", Date)
|
|
131096
|
+
], MJUserRoutineRecipient_.prototype, "_mj__UpdatedAt", void 0);
|
|
131097
|
+
__decorate([
|
|
131098
|
+
Field(),
|
|
131099
|
+
MaxLength(255),
|
|
131100
|
+
__metadata("design:type", String)
|
|
131101
|
+
], MJUserRoutineRecipient_.prototype, "Routine", void 0);
|
|
131102
|
+
__decorate([
|
|
131103
|
+
Field({ nullable: true }),
|
|
131104
|
+
MaxLength(100),
|
|
131105
|
+
__metadata("design:type", String)
|
|
131106
|
+
], MJUserRoutineRecipient_.prototype, "User", void 0);
|
|
131107
|
+
MJUserRoutineRecipient_ = __decorate([
|
|
131108
|
+
ObjectType()
|
|
131109
|
+
], MJUserRoutineRecipient_);
|
|
131110
|
+
export { MJUserRoutineRecipient_ };
|
|
131111
|
+
//****************************************************************************
|
|
131112
|
+
// INPUT TYPE for MJ: User Routine Recipients
|
|
131113
|
+
//****************************************************************************
|
|
131114
|
+
let CreateMJUserRoutineRecipientInput = class CreateMJUserRoutineRecipientInput {
|
|
131115
|
+
};
|
|
131116
|
+
__decorate([
|
|
131117
|
+
Field({ nullable: true }),
|
|
131118
|
+
__metadata("design:type", String)
|
|
131119
|
+
], CreateMJUserRoutineRecipientInput.prototype, "ID", void 0);
|
|
131120
|
+
__decorate([
|
|
131121
|
+
Field({ nullable: true }),
|
|
131122
|
+
__metadata("design:type", String)
|
|
131123
|
+
], CreateMJUserRoutineRecipientInput.prototype, "RoutineID", void 0);
|
|
131124
|
+
__decorate([
|
|
131125
|
+
Field({ nullable: true }),
|
|
131126
|
+
__metadata("design:type", String)
|
|
131127
|
+
], CreateMJUserRoutineRecipientInput.prototype, "UserID", void 0);
|
|
131128
|
+
__decorate([
|
|
131129
|
+
Field({ nullable: true }),
|
|
131130
|
+
__metadata("design:type", String)
|
|
131131
|
+
], CreateMJUserRoutineRecipientInput.prototype, "Email", void 0);
|
|
131132
|
+
__decorate([
|
|
131133
|
+
Field({ nullable: true }),
|
|
131134
|
+
__metadata("design:type", String)
|
|
131135
|
+
], CreateMJUserRoutineRecipientInput.prototype, "Channel", void 0);
|
|
131136
|
+
__decorate([
|
|
131137
|
+
Field(() => Int, { nullable: true }),
|
|
131138
|
+
__metadata("design:type", Number)
|
|
131139
|
+
], CreateMJUserRoutineRecipientInput.prototype, "Sequence", void 0);
|
|
131140
|
+
__decorate([
|
|
131141
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
131142
|
+
__metadata("design:type", RestoreContextInput)
|
|
131143
|
+
], CreateMJUserRoutineRecipientInput.prototype, "RestoreContext___", void 0);
|
|
131144
|
+
CreateMJUserRoutineRecipientInput = __decorate([
|
|
131145
|
+
InputType()
|
|
131146
|
+
], CreateMJUserRoutineRecipientInput);
|
|
131147
|
+
export { CreateMJUserRoutineRecipientInput };
|
|
131148
|
+
//****************************************************************************
|
|
131149
|
+
// INPUT TYPE for MJ: User Routine Recipients
|
|
131150
|
+
//****************************************************************************
|
|
131151
|
+
let UpdateMJUserRoutineRecipientInput = class UpdateMJUserRoutineRecipientInput {
|
|
131152
|
+
};
|
|
131153
|
+
__decorate([
|
|
131154
|
+
Field(),
|
|
131155
|
+
__metadata("design:type", String)
|
|
131156
|
+
], UpdateMJUserRoutineRecipientInput.prototype, "ID", void 0);
|
|
131157
|
+
__decorate([
|
|
131158
|
+
Field({ nullable: true }),
|
|
131159
|
+
__metadata("design:type", String)
|
|
131160
|
+
], UpdateMJUserRoutineRecipientInput.prototype, "RoutineID", void 0);
|
|
131161
|
+
__decorate([
|
|
131162
|
+
Field({ nullable: true }),
|
|
131163
|
+
__metadata("design:type", String)
|
|
131164
|
+
], UpdateMJUserRoutineRecipientInput.prototype, "UserID", void 0);
|
|
131165
|
+
__decorate([
|
|
131166
|
+
Field({ nullable: true }),
|
|
131167
|
+
__metadata("design:type", String)
|
|
131168
|
+
], UpdateMJUserRoutineRecipientInput.prototype, "Email", void 0);
|
|
131169
|
+
__decorate([
|
|
131170
|
+
Field({ nullable: true }),
|
|
131171
|
+
__metadata("design:type", String)
|
|
131172
|
+
], UpdateMJUserRoutineRecipientInput.prototype, "Channel", void 0);
|
|
131173
|
+
__decorate([
|
|
131174
|
+
Field(() => Int, { nullable: true }),
|
|
131175
|
+
__metadata("design:type", Number)
|
|
131176
|
+
], UpdateMJUserRoutineRecipientInput.prototype, "Sequence", void 0);
|
|
131177
|
+
__decorate([
|
|
131178
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
131179
|
+
__metadata("design:type", Array)
|
|
131180
|
+
], UpdateMJUserRoutineRecipientInput.prototype, "OldValues___", void 0);
|
|
131181
|
+
__decorate([
|
|
131182
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
131183
|
+
__metadata("design:type", RestoreContextInput)
|
|
131184
|
+
], UpdateMJUserRoutineRecipientInput.prototype, "RestoreContext___", void 0);
|
|
131185
|
+
UpdateMJUserRoutineRecipientInput = __decorate([
|
|
131186
|
+
InputType()
|
|
131187
|
+
], UpdateMJUserRoutineRecipientInput);
|
|
131188
|
+
export { UpdateMJUserRoutineRecipientInput };
|
|
131189
|
+
//****************************************************************************
|
|
131190
|
+
// RESOLVER for MJ: User Routine Recipients
|
|
131191
|
+
//****************************************************************************
|
|
131192
|
+
let RunMJUserRoutineRecipientViewResult = class RunMJUserRoutineRecipientViewResult {
|
|
131193
|
+
};
|
|
131194
|
+
__decorate([
|
|
131195
|
+
Field(() => [MJUserRoutineRecipient_]),
|
|
131196
|
+
__metadata("design:type", Array)
|
|
131197
|
+
], RunMJUserRoutineRecipientViewResult.prototype, "Results", void 0);
|
|
131198
|
+
__decorate([
|
|
131199
|
+
Field(() => String, { nullable: true }),
|
|
131200
|
+
__metadata("design:type", String)
|
|
131201
|
+
], RunMJUserRoutineRecipientViewResult.prototype, "UserViewRunID", void 0);
|
|
131202
|
+
__decorate([
|
|
131203
|
+
Field(() => Int, { nullable: true }),
|
|
131204
|
+
__metadata("design:type", Number)
|
|
131205
|
+
], RunMJUserRoutineRecipientViewResult.prototype, "RowCount", void 0);
|
|
131206
|
+
__decorate([
|
|
131207
|
+
Field(() => Int, { nullable: true }),
|
|
131208
|
+
__metadata("design:type", Number)
|
|
131209
|
+
], RunMJUserRoutineRecipientViewResult.prototype, "TotalRowCount", void 0);
|
|
131210
|
+
__decorate([
|
|
131211
|
+
Field(() => Int, { nullable: true }),
|
|
131212
|
+
__metadata("design:type", Number)
|
|
131213
|
+
], RunMJUserRoutineRecipientViewResult.prototype, "ExecutionTime", void 0);
|
|
131214
|
+
__decorate([
|
|
131215
|
+
Field({ nullable: true }),
|
|
131216
|
+
__metadata("design:type", String)
|
|
131217
|
+
], RunMJUserRoutineRecipientViewResult.prototype, "ErrorMessage", void 0);
|
|
131218
|
+
__decorate([
|
|
131219
|
+
Field(() => Boolean, { nullable: false }),
|
|
131220
|
+
__metadata("design:type", Boolean)
|
|
131221
|
+
], RunMJUserRoutineRecipientViewResult.prototype, "Success", void 0);
|
|
131222
|
+
RunMJUserRoutineRecipientViewResult = __decorate([
|
|
131223
|
+
ObjectType()
|
|
131224
|
+
], RunMJUserRoutineRecipientViewResult);
|
|
131225
|
+
export { RunMJUserRoutineRecipientViewResult };
|
|
131226
|
+
let MJUserRoutineRecipientResolver = class MJUserRoutineRecipientResolver extends ResolverBase {
|
|
131227
|
+
async RunMJUserRoutineRecipientViewByID(input, { providers, userPayload }, pubSub) {
|
|
131228
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
131229
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
131230
|
+
}
|
|
131231
|
+
async RunMJUserRoutineRecipientViewByName(input, { providers, userPayload }, pubSub) {
|
|
131232
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
131233
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
131234
|
+
}
|
|
131235
|
+
async RunMJUserRoutineRecipientDynamicView(input, { providers, userPayload }, pubSub) {
|
|
131236
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
131237
|
+
input.EntityName = 'MJ: User Routine Recipients';
|
|
131238
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
131239
|
+
}
|
|
131240
|
+
async MJUserRoutineRecipient(ID, { userPayload, providers }, pubSub) {
|
|
131241
|
+
this.CheckUserReadPermissions('MJ: User Routine Recipients', userPayload);
|
|
131242
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
131243
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserRoutineRecipients')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Routine Recipients', userPayload, EntityPermissionType.Read, 'AND');
|
|
131244
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
131245
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: User Routine Recipients', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
131246
|
+
return result;
|
|
131247
|
+
}
|
|
131248
|
+
async CreateMJUserRoutineRecipient(input, { providers, userPayload }, pubSub) {
|
|
131249
|
+
const provider = GetReadWriteProvider(providers);
|
|
131250
|
+
return this.CreateRecord('MJ: User Routine Recipients', input, provider, userPayload, pubSub);
|
|
131251
|
+
}
|
|
131252
|
+
async UpdateMJUserRoutineRecipient(input, { providers, userPayload }, pubSub) {
|
|
131253
|
+
const provider = GetReadWriteProvider(providers);
|
|
131254
|
+
return this.UpdateRecord('MJ: User Routine Recipients', input, provider, userPayload, pubSub);
|
|
131255
|
+
}
|
|
131256
|
+
async DeleteMJUserRoutineRecipient(ID, options, { providers, userPayload }, pubSub) {
|
|
131257
|
+
const provider = GetReadWriteProvider(providers);
|
|
131258
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
131259
|
+
return this.DeleteRecord('MJ: User Routine Recipients', key, options, provider, userPayload, pubSub);
|
|
131260
|
+
}
|
|
131261
|
+
};
|
|
131262
|
+
__decorate([
|
|
131263
|
+
Query(() => RunMJUserRoutineRecipientViewResult),
|
|
131264
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
131265
|
+
__param(1, Ctx()),
|
|
131266
|
+
__param(2, PubSub()),
|
|
131267
|
+
__metadata("design:type", Function),
|
|
131268
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
131269
|
+
__metadata("design:returntype", Promise)
|
|
131270
|
+
], MJUserRoutineRecipientResolver.prototype, "RunMJUserRoutineRecipientViewByID", null);
|
|
131271
|
+
__decorate([
|
|
131272
|
+
Query(() => RunMJUserRoutineRecipientViewResult),
|
|
131273
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
131274
|
+
__param(1, Ctx()),
|
|
131275
|
+
__param(2, PubSub()),
|
|
131276
|
+
__metadata("design:type", Function),
|
|
131277
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
131278
|
+
__metadata("design:returntype", Promise)
|
|
131279
|
+
], MJUserRoutineRecipientResolver.prototype, "RunMJUserRoutineRecipientViewByName", null);
|
|
131280
|
+
__decorate([
|
|
131281
|
+
Query(() => RunMJUserRoutineRecipientViewResult),
|
|
131282
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
131283
|
+
__param(1, Ctx()),
|
|
131284
|
+
__param(2, PubSub()),
|
|
131285
|
+
__metadata("design:type", Function),
|
|
131286
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
131287
|
+
__metadata("design:returntype", Promise)
|
|
131288
|
+
], MJUserRoutineRecipientResolver.prototype, "RunMJUserRoutineRecipientDynamicView", null);
|
|
131289
|
+
__decorate([
|
|
131290
|
+
Query(() => MJUserRoutineRecipient_, { nullable: true }),
|
|
131291
|
+
__param(0, Arg('ID', () => String)),
|
|
131292
|
+
__param(1, Ctx()),
|
|
131293
|
+
__param(2, PubSub()),
|
|
131294
|
+
__metadata("design:type", Function),
|
|
131295
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
131296
|
+
__metadata("design:returntype", Promise)
|
|
131297
|
+
], MJUserRoutineRecipientResolver.prototype, "MJUserRoutineRecipient", null);
|
|
131298
|
+
__decorate([
|
|
131299
|
+
Mutation(() => MJUserRoutineRecipient_),
|
|
131300
|
+
__param(0, Arg('input', () => CreateMJUserRoutineRecipientInput)),
|
|
131301
|
+
__param(1, Ctx()),
|
|
131302
|
+
__param(2, PubSub()),
|
|
131303
|
+
__metadata("design:type", Function),
|
|
131304
|
+
__metadata("design:paramtypes", [CreateMJUserRoutineRecipientInput, Object, PubSubEngine]),
|
|
131305
|
+
__metadata("design:returntype", Promise)
|
|
131306
|
+
], MJUserRoutineRecipientResolver.prototype, "CreateMJUserRoutineRecipient", null);
|
|
131307
|
+
__decorate([
|
|
131308
|
+
Mutation(() => MJUserRoutineRecipient_),
|
|
131309
|
+
__param(0, Arg('input', () => UpdateMJUserRoutineRecipientInput)),
|
|
131310
|
+
__param(1, Ctx()),
|
|
131311
|
+
__param(2, PubSub()),
|
|
131312
|
+
__metadata("design:type", Function),
|
|
131313
|
+
__metadata("design:paramtypes", [UpdateMJUserRoutineRecipientInput, Object, PubSubEngine]),
|
|
131314
|
+
__metadata("design:returntype", Promise)
|
|
131315
|
+
], MJUserRoutineRecipientResolver.prototype, "UpdateMJUserRoutineRecipient", null);
|
|
131316
|
+
__decorate([
|
|
131317
|
+
Mutation(() => MJUserRoutineRecipient_),
|
|
131318
|
+
__param(0, Arg('ID', () => String)),
|
|
131319
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
131320
|
+
__param(2, Ctx()),
|
|
131321
|
+
__param(3, PubSub()),
|
|
131322
|
+
__metadata("design:type", Function),
|
|
131323
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
131324
|
+
__metadata("design:returntype", Promise)
|
|
131325
|
+
], MJUserRoutineRecipientResolver.prototype, "DeleteMJUserRoutineRecipient", null);
|
|
131326
|
+
MJUserRoutineRecipientResolver = __decorate([
|
|
131327
|
+
Resolver(MJUserRoutineRecipient_)
|
|
131328
|
+
], MJUserRoutineRecipientResolver);
|
|
131329
|
+
export { MJUserRoutineRecipientResolver };
|
|
131330
|
+
//****************************************************************************
|
|
131331
|
+
// ENTITY CLASS for MJ: User Routine Runs
|
|
131332
|
+
//****************************************************************************
|
|
131333
|
+
let MJUserRoutineRun_ = class MJUserRoutineRun_ {
|
|
131334
|
+
};
|
|
131335
|
+
__decorate([
|
|
131336
|
+
Field(),
|
|
131337
|
+
MaxLength(36),
|
|
131338
|
+
__metadata("design:type", String)
|
|
131339
|
+
], MJUserRoutineRun_.prototype, "ID", void 0);
|
|
131340
|
+
__decorate([
|
|
131341
|
+
Field({ description: `Routine this run belongs to.` }),
|
|
131342
|
+
MaxLength(36),
|
|
131343
|
+
__metadata("design:type", String)
|
|
131344
|
+
], MJUserRoutineRun_.prototype, "RoutineID", void 0);
|
|
131345
|
+
__decorate([
|
|
131346
|
+
Field({ description: `When the run started.` }),
|
|
131347
|
+
__metadata("design:type", Date)
|
|
131348
|
+
], MJUserRoutineRun_.prototype, "StartedAt", void 0);
|
|
131349
|
+
__decorate([
|
|
131350
|
+
Field({ nullable: true, description: `When the run completed (null while running).` }),
|
|
131351
|
+
__metadata("design:type", Date)
|
|
131352
|
+
], MJUserRoutineRun_.prototype, "CompletedAt", void 0);
|
|
131353
|
+
__decorate([
|
|
131354
|
+
Field({ description: `Run outcome.` }),
|
|
131355
|
+
MaxLength(20),
|
|
131356
|
+
__metadata("design:type", String)
|
|
131357
|
+
], MJUserRoutineRun_.prototype, "Status", void 0);
|
|
131358
|
+
__decorate([
|
|
131359
|
+
Field({ nullable: true, description: `Linked AI Agent Run when the routine target is an agent.` }),
|
|
131360
|
+
MaxLength(36),
|
|
131361
|
+
__metadata("design:type", String)
|
|
131362
|
+
], MJUserRoutineRun_.prototype, "AgentRunID", void 0);
|
|
131363
|
+
__decorate([
|
|
131364
|
+
Field({ nullable: true, description: `For Prompt targets, links to the MJ: AI Prompt Runs record for this execution — tokens, cost, and full telemetry live there (never duplicated here).` }),
|
|
131365
|
+
MaxLength(36),
|
|
131366
|
+
__metadata("design:type", String)
|
|
131367
|
+
], MJUserRoutineRun_.prototype, "PromptRunID", void 0);
|
|
131368
|
+
__decorate([
|
|
131369
|
+
Field({ nullable: true, description: `For Action targets, links to the MJ: Action Execution Logs record for this execution — params, results, and telemetry live there (never duplicated here).` }),
|
|
131370
|
+
MaxLength(36),
|
|
131371
|
+
__metadata("design:type", String)
|
|
131372
|
+
], MJUserRoutineRun_.prototype, "ActionExecutionLogID", void 0);
|
|
131373
|
+
__decorate([
|
|
131374
|
+
Field({ nullable: true, description: `Human-readable summary of the run result.` }),
|
|
131375
|
+
__metadata("design:type", String)
|
|
131376
|
+
], MJUserRoutineRun_.prototype, "ResultSummary", void 0);
|
|
131377
|
+
__decorate([
|
|
131378
|
+
Field({ nullable: true, description: `Hash of the result, compared against the routine LastResultHash for OnChange detection.` }),
|
|
131379
|
+
MaxLength(100),
|
|
131380
|
+
__metadata("design:type", String)
|
|
131381
|
+
], MJUserRoutineRun_.prototype, "ResultHash", void 0);
|
|
131382
|
+
__decorate([
|
|
131383
|
+
Field(() => Boolean, { description: `Whether a notification was dispatched for this run.` }),
|
|
131384
|
+
__metadata("design:type", Boolean)
|
|
131385
|
+
], MJUserRoutineRun_.prototype, "NotificationSent", void 0);
|
|
131386
|
+
__decorate([
|
|
131387
|
+
Field({ nullable: true, description: `Error detail when Status is Failed.` }),
|
|
131388
|
+
__metadata("design:type", String)
|
|
131389
|
+
], MJUserRoutineRun_.prototype, "ErrorMessage", void 0);
|
|
131390
|
+
__decorate([
|
|
131391
|
+
Field(),
|
|
131392
|
+
__metadata("design:type", Date)
|
|
131393
|
+
], MJUserRoutineRun_.prototype, "_mj__CreatedAt", void 0);
|
|
131394
|
+
__decorate([
|
|
131395
|
+
Field(),
|
|
131396
|
+
__metadata("design:type", Date)
|
|
131397
|
+
], MJUserRoutineRun_.prototype, "_mj__UpdatedAt", void 0);
|
|
131398
|
+
__decorate([
|
|
131399
|
+
Field(),
|
|
131400
|
+
MaxLength(255),
|
|
131401
|
+
__metadata("design:type", String)
|
|
131402
|
+
], MJUserRoutineRun_.prototype, "Routine", void 0);
|
|
131403
|
+
__decorate([
|
|
131404
|
+
Field({ nullable: true }),
|
|
131405
|
+
MaxLength(255),
|
|
131406
|
+
__metadata("design:type", String)
|
|
131407
|
+
], MJUserRoutineRun_.prototype, "AgentRun", void 0);
|
|
131408
|
+
__decorate([
|
|
131409
|
+
Field({ nullable: true }),
|
|
131410
|
+
MaxLength(255),
|
|
131411
|
+
__metadata("design:type", String)
|
|
131412
|
+
], MJUserRoutineRun_.prototype, "PromptRun", void 0);
|
|
131413
|
+
__decorate([
|
|
131414
|
+
Field({ nullable: true }),
|
|
131415
|
+
MaxLength(425),
|
|
131416
|
+
__metadata("design:type", String)
|
|
131417
|
+
], MJUserRoutineRun_.prototype, "ActionExecutionLog", void 0);
|
|
131418
|
+
MJUserRoutineRun_ = __decorate([
|
|
131419
|
+
ObjectType()
|
|
131420
|
+
], MJUserRoutineRun_);
|
|
131421
|
+
export { MJUserRoutineRun_ };
|
|
131422
|
+
//****************************************************************************
|
|
131423
|
+
// INPUT TYPE for MJ: User Routine Runs
|
|
131424
|
+
//****************************************************************************
|
|
131425
|
+
let CreateMJUserRoutineRunInput = class CreateMJUserRoutineRunInput {
|
|
131426
|
+
};
|
|
131427
|
+
__decorate([
|
|
131428
|
+
Field({ nullable: true }),
|
|
131429
|
+
__metadata("design:type", String)
|
|
131430
|
+
], CreateMJUserRoutineRunInput.prototype, "ID", void 0);
|
|
131431
|
+
__decorate([
|
|
131432
|
+
Field({ nullable: true }),
|
|
131433
|
+
__metadata("design:type", String)
|
|
131434
|
+
], CreateMJUserRoutineRunInput.prototype, "RoutineID", void 0);
|
|
131435
|
+
__decorate([
|
|
131436
|
+
Field({ nullable: true }),
|
|
131437
|
+
__metadata("design:type", Date)
|
|
131438
|
+
], CreateMJUserRoutineRunInput.prototype, "StartedAt", void 0);
|
|
131439
|
+
__decorate([
|
|
131440
|
+
Field({ nullable: true }),
|
|
131441
|
+
__metadata("design:type", Date)
|
|
131442
|
+
], CreateMJUserRoutineRunInput.prototype, "CompletedAt", void 0);
|
|
131443
|
+
__decorate([
|
|
131444
|
+
Field({ nullable: true }),
|
|
131445
|
+
__metadata("design:type", String)
|
|
131446
|
+
], CreateMJUserRoutineRunInput.prototype, "Status", void 0);
|
|
131447
|
+
__decorate([
|
|
131448
|
+
Field({ nullable: true }),
|
|
131449
|
+
__metadata("design:type", String)
|
|
131450
|
+
], CreateMJUserRoutineRunInput.prototype, "AgentRunID", void 0);
|
|
131451
|
+
__decorate([
|
|
131452
|
+
Field({ nullable: true }),
|
|
131453
|
+
__metadata("design:type", String)
|
|
131454
|
+
], CreateMJUserRoutineRunInput.prototype, "PromptRunID", void 0);
|
|
131455
|
+
__decorate([
|
|
131456
|
+
Field({ nullable: true }),
|
|
131457
|
+
__metadata("design:type", String)
|
|
131458
|
+
], CreateMJUserRoutineRunInput.prototype, "ActionExecutionLogID", void 0);
|
|
131459
|
+
__decorate([
|
|
131460
|
+
Field({ nullable: true }),
|
|
131461
|
+
__metadata("design:type", String)
|
|
131462
|
+
], CreateMJUserRoutineRunInput.prototype, "ResultSummary", void 0);
|
|
131463
|
+
__decorate([
|
|
131464
|
+
Field({ nullable: true }),
|
|
131465
|
+
__metadata("design:type", String)
|
|
131466
|
+
], CreateMJUserRoutineRunInput.prototype, "ResultHash", void 0);
|
|
131467
|
+
__decorate([
|
|
131468
|
+
Field(() => Boolean, { nullable: true }),
|
|
131469
|
+
__metadata("design:type", Boolean)
|
|
131470
|
+
], CreateMJUserRoutineRunInput.prototype, "NotificationSent", void 0);
|
|
131471
|
+
__decorate([
|
|
131472
|
+
Field({ nullable: true }),
|
|
131473
|
+
__metadata("design:type", String)
|
|
131474
|
+
], CreateMJUserRoutineRunInput.prototype, "ErrorMessage", void 0);
|
|
131475
|
+
__decorate([
|
|
131476
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
131477
|
+
__metadata("design:type", RestoreContextInput)
|
|
131478
|
+
], CreateMJUserRoutineRunInput.prototype, "RestoreContext___", void 0);
|
|
131479
|
+
CreateMJUserRoutineRunInput = __decorate([
|
|
131480
|
+
InputType()
|
|
131481
|
+
], CreateMJUserRoutineRunInput);
|
|
131482
|
+
export { CreateMJUserRoutineRunInput };
|
|
131483
|
+
//****************************************************************************
|
|
131484
|
+
// INPUT TYPE for MJ: User Routine Runs
|
|
131485
|
+
//****************************************************************************
|
|
131486
|
+
let UpdateMJUserRoutineRunInput = class UpdateMJUserRoutineRunInput {
|
|
131487
|
+
};
|
|
131488
|
+
__decorate([
|
|
131489
|
+
Field(),
|
|
131490
|
+
__metadata("design:type", String)
|
|
131491
|
+
], UpdateMJUserRoutineRunInput.prototype, "ID", void 0);
|
|
131492
|
+
__decorate([
|
|
131493
|
+
Field({ nullable: true }),
|
|
131494
|
+
__metadata("design:type", String)
|
|
131495
|
+
], UpdateMJUserRoutineRunInput.prototype, "RoutineID", void 0);
|
|
131496
|
+
__decorate([
|
|
131497
|
+
Field({ nullable: true }),
|
|
131498
|
+
__metadata("design:type", Date)
|
|
131499
|
+
], UpdateMJUserRoutineRunInput.prototype, "StartedAt", void 0);
|
|
131500
|
+
__decorate([
|
|
131501
|
+
Field({ nullable: true }),
|
|
131502
|
+
__metadata("design:type", Date)
|
|
131503
|
+
], UpdateMJUserRoutineRunInput.prototype, "CompletedAt", void 0);
|
|
131504
|
+
__decorate([
|
|
131505
|
+
Field({ nullable: true }),
|
|
131506
|
+
__metadata("design:type", String)
|
|
131507
|
+
], UpdateMJUserRoutineRunInput.prototype, "Status", void 0);
|
|
131508
|
+
__decorate([
|
|
131509
|
+
Field({ nullable: true }),
|
|
131510
|
+
__metadata("design:type", String)
|
|
131511
|
+
], UpdateMJUserRoutineRunInput.prototype, "AgentRunID", void 0);
|
|
131512
|
+
__decorate([
|
|
131513
|
+
Field({ nullable: true }),
|
|
131514
|
+
__metadata("design:type", String)
|
|
131515
|
+
], UpdateMJUserRoutineRunInput.prototype, "PromptRunID", void 0);
|
|
131516
|
+
__decorate([
|
|
131517
|
+
Field({ nullable: true }),
|
|
131518
|
+
__metadata("design:type", String)
|
|
131519
|
+
], UpdateMJUserRoutineRunInput.prototype, "ActionExecutionLogID", void 0);
|
|
131520
|
+
__decorate([
|
|
131521
|
+
Field({ nullable: true }),
|
|
131522
|
+
__metadata("design:type", String)
|
|
131523
|
+
], UpdateMJUserRoutineRunInput.prototype, "ResultSummary", void 0);
|
|
131524
|
+
__decorate([
|
|
131525
|
+
Field({ nullable: true }),
|
|
131526
|
+
__metadata("design:type", String)
|
|
131527
|
+
], UpdateMJUserRoutineRunInput.prototype, "ResultHash", void 0);
|
|
131528
|
+
__decorate([
|
|
131529
|
+
Field(() => Boolean, { nullable: true }),
|
|
131530
|
+
__metadata("design:type", Boolean)
|
|
131531
|
+
], UpdateMJUserRoutineRunInput.prototype, "NotificationSent", void 0);
|
|
131532
|
+
__decorate([
|
|
131533
|
+
Field({ nullable: true }),
|
|
131534
|
+
__metadata("design:type", String)
|
|
131535
|
+
], UpdateMJUserRoutineRunInput.prototype, "ErrorMessage", void 0);
|
|
131536
|
+
__decorate([
|
|
131537
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
131538
|
+
__metadata("design:type", Array)
|
|
131539
|
+
], UpdateMJUserRoutineRunInput.prototype, "OldValues___", void 0);
|
|
131540
|
+
__decorate([
|
|
131541
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
131542
|
+
__metadata("design:type", RestoreContextInput)
|
|
131543
|
+
], UpdateMJUserRoutineRunInput.prototype, "RestoreContext___", void 0);
|
|
131544
|
+
UpdateMJUserRoutineRunInput = __decorate([
|
|
131545
|
+
InputType()
|
|
131546
|
+
], UpdateMJUserRoutineRunInput);
|
|
131547
|
+
export { UpdateMJUserRoutineRunInput };
|
|
131548
|
+
//****************************************************************************
|
|
131549
|
+
// RESOLVER for MJ: User Routine Runs
|
|
131550
|
+
//****************************************************************************
|
|
131551
|
+
let RunMJUserRoutineRunViewResult = class RunMJUserRoutineRunViewResult {
|
|
131552
|
+
};
|
|
131553
|
+
__decorate([
|
|
131554
|
+
Field(() => [MJUserRoutineRun_]),
|
|
131555
|
+
__metadata("design:type", Array)
|
|
131556
|
+
], RunMJUserRoutineRunViewResult.prototype, "Results", void 0);
|
|
131557
|
+
__decorate([
|
|
131558
|
+
Field(() => String, { nullable: true }),
|
|
131559
|
+
__metadata("design:type", String)
|
|
131560
|
+
], RunMJUserRoutineRunViewResult.prototype, "UserViewRunID", void 0);
|
|
131561
|
+
__decorate([
|
|
131562
|
+
Field(() => Int, { nullable: true }),
|
|
131563
|
+
__metadata("design:type", Number)
|
|
131564
|
+
], RunMJUserRoutineRunViewResult.prototype, "RowCount", void 0);
|
|
131565
|
+
__decorate([
|
|
131566
|
+
Field(() => Int, { nullable: true }),
|
|
131567
|
+
__metadata("design:type", Number)
|
|
131568
|
+
], RunMJUserRoutineRunViewResult.prototype, "TotalRowCount", void 0);
|
|
131569
|
+
__decorate([
|
|
131570
|
+
Field(() => Int, { nullable: true }),
|
|
131571
|
+
__metadata("design:type", Number)
|
|
131572
|
+
], RunMJUserRoutineRunViewResult.prototype, "ExecutionTime", void 0);
|
|
131573
|
+
__decorate([
|
|
131574
|
+
Field({ nullable: true }),
|
|
131575
|
+
__metadata("design:type", String)
|
|
131576
|
+
], RunMJUserRoutineRunViewResult.prototype, "ErrorMessage", void 0);
|
|
131577
|
+
__decorate([
|
|
131578
|
+
Field(() => Boolean, { nullable: false }),
|
|
131579
|
+
__metadata("design:type", Boolean)
|
|
131580
|
+
], RunMJUserRoutineRunViewResult.prototype, "Success", void 0);
|
|
131581
|
+
RunMJUserRoutineRunViewResult = __decorate([
|
|
131582
|
+
ObjectType()
|
|
131583
|
+
], RunMJUserRoutineRunViewResult);
|
|
131584
|
+
export { RunMJUserRoutineRunViewResult };
|
|
131585
|
+
let MJUserRoutineRunResolver = class MJUserRoutineRunResolver extends ResolverBase {
|
|
131586
|
+
async RunMJUserRoutineRunViewByID(input, { providers, userPayload }, pubSub) {
|
|
131587
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
131588
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
131589
|
+
}
|
|
131590
|
+
async RunMJUserRoutineRunViewByName(input, { providers, userPayload }, pubSub) {
|
|
131591
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
131592
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
131593
|
+
}
|
|
131594
|
+
async RunMJUserRoutineRunDynamicView(input, { providers, userPayload }, pubSub) {
|
|
131595
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
131596
|
+
input.EntityName = 'MJ: User Routine Runs';
|
|
131597
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
131598
|
+
}
|
|
131599
|
+
async MJUserRoutineRun(ID, { userPayload, providers }, pubSub) {
|
|
131600
|
+
this.CheckUserReadPermissions('MJ: User Routine Runs', userPayload);
|
|
131601
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
131602
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserRoutineRuns')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Routine Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
131603
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
131604
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: User Routine Runs', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
131605
|
+
return result;
|
|
131606
|
+
}
|
|
131607
|
+
async CreateMJUserRoutineRun(input, { providers, userPayload }, pubSub) {
|
|
131608
|
+
const provider = GetReadWriteProvider(providers);
|
|
131609
|
+
return this.CreateRecord('MJ: User Routine Runs', input, provider, userPayload, pubSub);
|
|
131610
|
+
}
|
|
131611
|
+
async UpdateMJUserRoutineRun(input, { providers, userPayload }, pubSub) {
|
|
131612
|
+
const provider = GetReadWriteProvider(providers);
|
|
131613
|
+
return this.UpdateRecord('MJ: User Routine Runs', input, provider, userPayload, pubSub);
|
|
131614
|
+
}
|
|
131615
|
+
async DeleteMJUserRoutineRun(ID, options, { providers, userPayload }, pubSub) {
|
|
131616
|
+
const provider = GetReadWriteProvider(providers);
|
|
131617
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
131618
|
+
return this.DeleteRecord('MJ: User Routine Runs', key, options, provider, userPayload, pubSub);
|
|
131619
|
+
}
|
|
131620
|
+
};
|
|
131621
|
+
__decorate([
|
|
131622
|
+
Query(() => RunMJUserRoutineRunViewResult),
|
|
131623
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
131624
|
+
__param(1, Ctx()),
|
|
131625
|
+
__param(2, PubSub()),
|
|
131626
|
+
__metadata("design:type", Function),
|
|
131627
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
131628
|
+
__metadata("design:returntype", Promise)
|
|
131629
|
+
], MJUserRoutineRunResolver.prototype, "RunMJUserRoutineRunViewByID", null);
|
|
131630
|
+
__decorate([
|
|
131631
|
+
Query(() => RunMJUserRoutineRunViewResult),
|
|
131632
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
131633
|
+
__param(1, Ctx()),
|
|
131634
|
+
__param(2, PubSub()),
|
|
131635
|
+
__metadata("design:type", Function),
|
|
131636
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
131637
|
+
__metadata("design:returntype", Promise)
|
|
131638
|
+
], MJUserRoutineRunResolver.prototype, "RunMJUserRoutineRunViewByName", null);
|
|
131639
|
+
__decorate([
|
|
131640
|
+
Query(() => RunMJUserRoutineRunViewResult),
|
|
131641
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
131642
|
+
__param(1, Ctx()),
|
|
131643
|
+
__param(2, PubSub()),
|
|
131644
|
+
__metadata("design:type", Function),
|
|
131645
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
131646
|
+
__metadata("design:returntype", Promise)
|
|
131647
|
+
], MJUserRoutineRunResolver.prototype, "RunMJUserRoutineRunDynamicView", null);
|
|
131648
|
+
__decorate([
|
|
131649
|
+
Query(() => MJUserRoutineRun_, { nullable: true }),
|
|
131650
|
+
__param(0, Arg('ID', () => String)),
|
|
131651
|
+
__param(1, Ctx()),
|
|
131652
|
+
__param(2, PubSub()),
|
|
131653
|
+
__metadata("design:type", Function),
|
|
131654
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
131655
|
+
__metadata("design:returntype", Promise)
|
|
131656
|
+
], MJUserRoutineRunResolver.prototype, "MJUserRoutineRun", null);
|
|
131657
|
+
__decorate([
|
|
131658
|
+
Mutation(() => MJUserRoutineRun_),
|
|
131659
|
+
__param(0, Arg('input', () => CreateMJUserRoutineRunInput)),
|
|
131660
|
+
__param(1, Ctx()),
|
|
131661
|
+
__param(2, PubSub()),
|
|
131662
|
+
__metadata("design:type", Function),
|
|
131663
|
+
__metadata("design:paramtypes", [CreateMJUserRoutineRunInput, Object, PubSubEngine]),
|
|
131664
|
+
__metadata("design:returntype", Promise)
|
|
131665
|
+
], MJUserRoutineRunResolver.prototype, "CreateMJUserRoutineRun", null);
|
|
131666
|
+
__decorate([
|
|
131667
|
+
Mutation(() => MJUserRoutineRun_),
|
|
131668
|
+
__param(0, Arg('input', () => UpdateMJUserRoutineRunInput)),
|
|
131669
|
+
__param(1, Ctx()),
|
|
131670
|
+
__param(2, PubSub()),
|
|
131671
|
+
__metadata("design:type", Function),
|
|
131672
|
+
__metadata("design:paramtypes", [UpdateMJUserRoutineRunInput, Object, PubSubEngine]),
|
|
131673
|
+
__metadata("design:returntype", Promise)
|
|
131674
|
+
], MJUserRoutineRunResolver.prototype, "UpdateMJUserRoutineRun", null);
|
|
131675
|
+
__decorate([
|
|
131676
|
+
Mutation(() => MJUserRoutineRun_),
|
|
131677
|
+
__param(0, Arg('ID', () => String)),
|
|
131678
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
131679
|
+
__param(2, Ctx()),
|
|
131680
|
+
__param(3, PubSub()),
|
|
131681
|
+
__metadata("design:type", Function),
|
|
131682
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
131683
|
+
__metadata("design:returntype", Promise)
|
|
131684
|
+
], MJUserRoutineRunResolver.prototype, "DeleteMJUserRoutineRun", null);
|
|
131685
|
+
MJUserRoutineRunResolver = __decorate([
|
|
131686
|
+
Resolver(MJUserRoutineRun_)
|
|
131687
|
+
], MJUserRoutineRunResolver);
|
|
131688
|
+
export { MJUserRoutineRunResolver };
|
|
131689
|
+
//****************************************************************************
|
|
131690
|
+
// ENTITY CLASS for MJ: User Routines
|
|
131691
|
+
//****************************************************************************
|
|
131692
|
+
let MJUserRoutine_ = class MJUserRoutine_ {
|
|
131693
|
+
};
|
|
131694
|
+
__decorate([
|
|
131695
|
+
Field(),
|
|
131696
|
+
MaxLength(36),
|
|
131697
|
+
__metadata("design:type", String)
|
|
131698
|
+
], MJUserRoutine_.prototype, "ID", void 0);
|
|
131699
|
+
__decorate([
|
|
131700
|
+
Field({ description: `Owner of the routine. Routines are private to their owner (row-level access).` }),
|
|
131701
|
+
MaxLength(36),
|
|
131702
|
+
__metadata("design:type", String)
|
|
131703
|
+
], MJUserRoutine_.prototype, "UserID", void 0);
|
|
131704
|
+
__decorate([
|
|
131705
|
+
Field({ nullable: true, description: `Optional environment scope for the routine.` }),
|
|
131706
|
+
MaxLength(36),
|
|
131707
|
+
__metadata("design:type", String)
|
|
131708
|
+
], MJUserRoutine_.prototype, "EnvironmentID", void 0);
|
|
131709
|
+
__decorate([
|
|
131710
|
+
Field({ description: `User-facing routine name.` }),
|
|
131711
|
+
MaxLength(255),
|
|
131712
|
+
__metadata("design:type", String)
|
|
131713
|
+
], MJUserRoutine_.prototype, "Name", void 0);
|
|
131714
|
+
__decorate([
|
|
131715
|
+
Field({ nullable: true, description: `Optional description of what the routine does.` }),
|
|
131716
|
+
__metadata("design:type", String)
|
|
131717
|
+
], MJUserRoutine_.prototype, "Description", void 0);
|
|
131718
|
+
__decorate([
|
|
131719
|
+
Field({ description: `Lifecycle status: Active (eligible to run), Paused (temporarily off), Disabled (off).` }),
|
|
131720
|
+
MaxLength(20),
|
|
131721
|
+
__metadata("design:type", String)
|
|
131722
|
+
], MJUserRoutine_.prototype, "Status", void 0);
|
|
131723
|
+
__decorate([
|
|
131724
|
+
Field({ description: `Scheduled (always notify per NotifyCondition) or Monitoring (intended for OnChange detection via result hashing).` }),
|
|
131725
|
+
MaxLength(20),
|
|
131726
|
+
__metadata("design:type", String)
|
|
131727
|
+
], MJUserRoutine_.prototype, "RoutineType", void 0);
|
|
131728
|
+
__decorate([
|
|
131729
|
+
Field({ description: `What kind of target this routine runs: Agent, Action, or Prompt. Determines how TargetID is interpreted.` }),
|
|
131730
|
+
MaxLength(20),
|
|
131731
|
+
__metadata("design:type", String)
|
|
131732
|
+
], MJUserRoutine_.prototype, "TargetType", void 0);
|
|
131733
|
+
__decorate([
|
|
131734
|
+
Field({ description: `Polymorphic reference resolved by TargetType (AIAgent.ID, Action.ID, or AIPrompt.ID). No FK because the target table varies.` }),
|
|
131735
|
+
MaxLength(36),
|
|
131736
|
+
__metadata("design:type", String)
|
|
131737
|
+
], MJUserRoutine_.prototype, "TargetID", void 0);
|
|
131738
|
+
__decorate([
|
|
131739
|
+
Field({ nullable: true, description: `For Agent targets, the user message sent to the agent on each run.` }),
|
|
131740
|
+
__metadata("design:type", String)
|
|
131741
|
+
], MJUserRoutine_.prototype, "InitialMessage", void 0);
|
|
131742
|
+
__decorate([
|
|
131743
|
+
Field({ nullable: true, description: `Optional JSON starting payload passed to the target on each run.` }),
|
|
131744
|
+
__metadata("design:type", String)
|
|
131745
|
+
], MJUserRoutine_.prototype, "StartingPayload", void 0);
|
|
131746
|
+
__decorate([
|
|
131747
|
+
Field({ nullable: true, description: `Optional JSON array of MJ: AI Skills IDs to pre-activate when the routine target is an Agent — threaded as ExecuteAgentParams.requestedSkillIDs so the agent starts each scheduled run with the requested skills' instructions and tools in effect (subject to all availability gates; ActivationMode does not gate this explicit-request path). Ignored for Action/Prompt targets.` }),
|
|
131748
|
+
__metadata("design:type", String)
|
|
131749
|
+
], MJUserRoutine_.prototype, "RequestedSkillIDs", void 0);
|
|
131750
|
+
__decorate([
|
|
131751
|
+
Field({ description: `Standard cron expression evaluated by the dispatcher to determine when the routine is due.` }),
|
|
131752
|
+
MaxLength(100),
|
|
131753
|
+
__metadata("design:type", String)
|
|
131754
|
+
], MJUserRoutine_.prototype, "CronExpression", void 0);
|
|
131755
|
+
__decorate([
|
|
131756
|
+
Field({ nullable: true, description: `Optional activation window start. An Active routine does not run before this time; once current time passes StartAt the dispatcher begins scheduling it. NULL = eligible immediately.` }),
|
|
131757
|
+
__metadata("design:type", Date)
|
|
131758
|
+
], MJUserRoutine_.prototype, "StartAt", void 0);
|
|
131759
|
+
__decorate([
|
|
131760
|
+
Field({ nullable: true, description: `Optional activation window end. An Active routine stops running once current time passes EndAt — automatic sunset without changing Status. NULL = no end.` }),
|
|
131761
|
+
__metadata("design:type", Date)
|
|
131762
|
+
], MJUserRoutine_.prototype, "EndAt", void 0);
|
|
131763
|
+
__decorate([
|
|
131764
|
+
Field({ nullable: true, description: `Optional MJ Template used to render routine notifications from the runs output data (result summary, status, target info) via the standard MJ templating architecture. When NULL, the system default routine-notification template (seeded via metadata, resolvable per instance — not hardcoded) is used.` }),
|
|
131765
|
+
MaxLength(36),
|
|
131766
|
+
__metadata("design:type", String)
|
|
131767
|
+
], MJUserRoutine_.prototype, "NotificationTemplateID", void 0);
|
|
131768
|
+
__decorate([
|
|
131769
|
+
Field({ description: `IANA timezone used when evaluating CronExpression (e.g. America/Chicago).` }),
|
|
131770
|
+
MaxLength(100),
|
|
131771
|
+
__metadata("design:type", String)
|
|
131772
|
+
], MJUserRoutine_.prototype, "Timezone", void 0);
|
|
131773
|
+
__decorate([
|
|
131774
|
+
Field({ nullable: true, description: `Next scheduled run time, computed after each run.` }),
|
|
131775
|
+
__metadata("design:type", Date)
|
|
131776
|
+
], MJUserRoutine_.prototype, "NextRunAt", void 0);
|
|
131777
|
+
__decorate([
|
|
131778
|
+
Field({ nullable: true, description: `Timestamp of the most recent run.` }),
|
|
131779
|
+
__metadata("design:type", Date)
|
|
131780
|
+
], MJUserRoutine_.prototype, "LastRunAt", void 0);
|
|
131781
|
+
__decorate([
|
|
131782
|
+
Field({ nullable: true, description: `Outcome of the most recent run.` }),
|
|
131783
|
+
MaxLength(20),
|
|
131784
|
+
__metadata("design:type", String)
|
|
131785
|
+
], MJUserRoutine_.prototype, "LastRunStatus", void 0);
|
|
131786
|
+
__decorate([
|
|
131787
|
+
Field({ nullable: true, description: `Hash of the most recent result, used by Monitoring routines to detect change for OnChange notifications.` }),
|
|
131788
|
+
MaxLength(100),
|
|
131789
|
+
__metadata("design:type", String)
|
|
131790
|
+
], MJUserRoutine_.prototype, "LastResultHash", void 0);
|
|
131791
|
+
__decorate([
|
|
131792
|
+
Field({ description: `When to notify: Always, OnSuccess, OnFailure, or OnChange (result differs from prior run).` }),
|
|
131793
|
+
MaxLength(20),
|
|
131794
|
+
__metadata("design:type", String)
|
|
131795
|
+
], MJUserRoutine_.prototype, "NotifyCondition", void 0);
|
|
131796
|
+
__decorate([
|
|
131797
|
+
Field(() => Boolean, { description: `Deliver notifications via in-app notification.` }),
|
|
131798
|
+
__metadata("design:type", Boolean)
|
|
131799
|
+
], MJUserRoutine_.prototype, "NotifyViaInApp", void 0);
|
|
131800
|
+
__decorate([
|
|
131801
|
+
Field(() => Boolean, { description: `Deliver notifications via email.` }),
|
|
131802
|
+
__metadata("design:type", Boolean)
|
|
131803
|
+
], MJUserRoutine_.prototype, "NotifyViaEmail", void 0);
|
|
131804
|
+
__decorate([
|
|
131805
|
+
Field(),
|
|
131806
|
+
__metadata("design:type", Date)
|
|
131807
|
+
], MJUserRoutine_.prototype, "_mj__CreatedAt", void 0);
|
|
131808
|
+
__decorate([
|
|
131809
|
+
Field(),
|
|
131810
|
+
__metadata("design:type", Date)
|
|
131811
|
+
], MJUserRoutine_.prototype, "_mj__UpdatedAt", void 0);
|
|
131812
|
+
__decorate([
|
|
131813
|
+
Field({ nullable: true, description: `The dedicated conversation this routine's Agent runs append to (created on first conversation-mode run, Application-scoped so it stays out of the default chat list). NULL when the routine has never run in conversation mode.` }),
|
|
131814
|
+
MaxLength(36),
|
|
131815
|
+
__metadata("design:type", String)
|
|
131816
|
+
], MJUserRoutine_.prototype, "ConversationID", void 0);
|
|
131817
|
+
__decorate([
|
|
131818
|
+
Field(),
|
|
131819
|
+
MaxLength(100),
|
|
131820
|
+
__metadata("design:type", String)
|
|
131821
|
+
], MJUserRoutine_.prototype, "User", void 0);
|
|
131822
|
+
__decorate([
|
|
131823
|
+
Field({ nullable: true }),
|
|
131824
|
+
MaxLength(255),
|
|
131825
|
+
__metadata("design:type", String)
|
|
131826
|
+
], MJUserRoutine_.prototype, "Environment", void 0);
|
|
131827
|
+
__decorate([
|
|
131828
|
+
Field({ nullable: true }),
|
|
131829
|
+
MaxLength(255),
|
|
131830
|
+
__metadata("design:type", String)
|
|
131831
|
+
], MJUserRoutine_.prototype, "NotificationTemplate", void 0);
|
|
131832
|
+
__decorate([
|
|
131833
|
+
Field({ nullable: true }),
|
|
131834
|
+
MaxLength(255),
|
|
131835
|
+
__metadata("design:type", String)
|
|
131836
|
+
], MJUserRoutine_.prototype, "Conversation", void 0);
|
|
131837
|
+
__decorate([
|
|
131838
|
+
Field(() => [MJUserRoutineRun_]),
|
|
131839
|
+
__metadata("design:type", Array)
|
|
131840
|
+
], MJUserRoutine_.prototype, "MJUserRoutineRuns_RoutineIDArray", void 0);
|
|
131841
|
+
__decorate([
|
|
131842
|
+
Field(() => [MJUserRoutineRecipient_]),
|
|
131843
|
+
__metadata("design:type", Array)
|
|
131844
|
+
], MJUserRoutine_.prototype, "MJUserRoutineRecipients_RoutineIDArray", void 0);
|
|
131845
|
+
MJUserRoutine_ = __decorate([
|
|
131846
|
+
ObjectType()
|
|
131847
|
+
], MJUserRoutine_);
|
|
131848
|
+
export { MJUserRoutine_ };
|
|
131849
|
+
//****************************************************************************
|
|
131850
|
+
// INPUT TYPE for MJ: User Routines
|
|
131851
|
+
//****************************************************************************
|
|
131852
|
+
let CreateMJUserRoutineInput = class CreateMJUserRoutineInput {
|
|
131853
|
+
};
|
|
131854
|
+
__decorate([
|
|
131855
|
+
Field({ nullable: true }),
|
|
131856
|
+
__metadata("design:type", String)
|
|
131857
|
+
], CreateMJUserRoutineInput.prototype, "ID", void 0);
|
|
131858
|
+
__decorate([
|
|
131859
|
+
Field({ nullable: true }),
|
|
131860
|
+
__metadata("design:type", String)
|
|
131861
|
+
], CreateMJUserRoutineInput.prototype, "UserID", void 0);
|
|
131862
|
+
__decorate([
|
|
131863
|
+
Field({ nullable: true }),
|
|
131864
|
+
__metadata("design:type", String)
|
|
131865
|
+
], CreateMJUserRoutineInput.prototype, "EnvironmentID", void 0);
|
|
131866
|
+
__decorate([
|
|
131867
|
+
Field({ nullable: true }),
|
|
131868
|
+
__metadata("design:type", String)
|
|
131869
|
+
], CreateMJUserRoutineInput.prototype, "Name", void 0);
|
|
131870
|
+
__decorate([
|
|
131871
|
+
Field({ nullable: true }),
|
|
131872
|
+
__metadata("design:type", String)
|
|
131873
|
+
], CreateMJUserRoutineInput.prototype, "Description", void 0);
|
|
131874
|
+
__decorate([
|
|
131875
|
+
Field({ nullable: true }),
|
|
131876
|
+
__metadata("design:type", String)
|
|
131877
|
+
], CreateMJUserRoutineInput.prototype, "Status", void 0);
|
|
131878
|
+
__decorate([
|
|
131879
|
+
Field({ nullable: true }),
|
|
131880
|
+
__metadata("design:type", String)
|
|
131881
|
+
], CreateMJUserRoutineInput.prototype, "RoutineType", void 0);
|
|
131882
|
+
__decorate([
|
|
131883
|
+
Field({ nullable: true }),
|
|
131884
|
+
__metadata("design:type", String)
|
|
131885
|
+
], CreateMJUserRoutineInput.prototype, "TargetType", void 0);
|
|
131886
|
+
__decorate([
|
|
131887
|
+
Field({ nullable: true }),
|
|
131888
|
+
__metadata("design:type", String)
|
|
131889
|
+
], CreateMJUserRoutineInput.prototype, "TargetID", void 0);
|
|
131890
|
+
__decorate([
|
|
131891
|
+
Field({ nullable: true }),
|
|
131892
|
+
__metadata("design:type", String)
|
|
131893
|
+
], CreateMJUserRoutineInput.prototype, "InitialMessage", void 0);
|
|
131894
|
+
__decorate([
|
|
131895
|
+
Field({ nullable: true }),
|
|
131896
|
+
__metadata("design:type", String)
|
|
131897
|
+
], CreateMJUserRoutineInput.prototype, "StartingPayload", void 0);
|
|
131898
|
+
__decorate([
|
|
131899
|
+
Field({ nullable: true }),
|
|
131900
|
+
__metadata("design:type", String)
|
|
131901
|
+
], CreateMJUserRoutineInput.prototype, "RequestedSkillIDs", void 0);
|
|
131902
|
+
__decorate([
|
|
131903
|
+
Field({ nullable: true }),
|
|
131904
|
+
__metadata("design:type", String)
|
|
131905
|
+
], CreateMJUserRoutineInput.prototype, "CronExpression", void 0);
|
|
131906
|
+
__decorate([
|
|
131907
|
+
Field({ nullable: true }),
|
|
131908
|
+
__metadata("design:type", Date)
|
|
131909
|
+
], CreateMJUserRoutineInput.prototype, "StartAt", void 0);
|
|
131910
|
+
__decorate([
|
|
131911
|
+
Field({ nullable: true }),
|
|
131912
|
+
__metadata("design:type", Date)
|
|
131913
|
+
], CreateMJUserRoutineInput.prototype, "EndAt", void 0);
|
|
131914
|
+
__decorate([
|
|
131915
|
+
Field({ nullable: true }),
|
|
131916
|
+
__metadata("design:type", String)
|
|
131917
|
+
], CreateMJUserRoutineInput.prototype, "NotificationTemplateID", void 0);
|
|
131918
|
+
__decorate([
|
|
131919
|
+
Field({ nullable: true }),
|
|
131920
|
+
__metadata("design:type", String)
|
|
131921
|
+
], CreateMJUserRoutineInput.prototype, "Timezone", void 0);
|
|
131922
|
+
__decorate([
|
|
131923
|
+
Field({ nullable: true }),
|
|
131924
|
+
__metadata("design:type", Date)
|
|
131925
|
+
], CreateMJUserRoutineInput.prototype, "NextRunAt", void 0);
|
|
131926
|
+
__decorate([
|
|
131927
|
+
Field({ nullable: true }),
|
|
131928
|
+
__metadata("design:type", Date)
|
|
131929
|
+
], CreateMJUserRoutineInput.prototype, "LastRunAt", void 0);
|
|
131930
|
+
__decorate([
|
|
131931
|
+
Field({ nullable: true }),
|
|
131932
|
+
__metadata("design:type", String)
|
|
131933
|
+
], CreateMJUserRoutineInput.prototype, "LastRunStatus", void 0);
|
|
131934
|
+
__decorate([
|
|
131935
|
+
Field({ nullable: true }),
|
|
131936
|
+
__metadata("design:type", String)
|
|
131937
|
+
], CreateMJUserRoutineInput.prototype, "LastResultHash", void 0);
|
|
131938
|
+
__decorate([
|
|
131939
|
+
Field({ nullable: true }),
|
|
131940
|
+
__metadata("design:type", String)
|
|
131941
|
+
], CreateMJUserRoutineInput.prototype, "NotifyCondition", void 0);
|
|
131942
|
+
__decorate([
|
|
131943
|
+
Field(() => Boolean, { nullable: true }),
|
|
131944
|
+
__metadata("design:type", Boolean)
|
|
131945
|
+
], CreateMJUserRoutineInput.prototype, "NotifyViaInApp", void 0);
|
|
131946
|
+
__decorate([
|
|
131947
|
+
Field(() => Boolean, { nullable: true }),
|
|
131948
|
+
__metadata("design:type", Boolean)
|
|
131949
|
+
], CreateMJUserRoutineInput.prototype, "NotifyViaEmail", void 0);
|
|
131950
|
+
__decorate([
|
|
131951
|
+
Field({ nullable: true }),
|
|
131952
|
+
__metadata("design:type", String)
|
|
131953
|
+
], CreateMJUserRoutineInput.prototype, "ConversationID", void 0);
|
|
131954
|
+
__decorate([
|
|
131955
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
131956
|
+
__metadata("design:type", RestoreContextInput)
|
|
131957
|
+
], CreateMJUserRoutineInput.prototype, "RestoreContext___", void 0);
|
|
131958
|
+
CreateMJUserRoutineInput = __decorate([
|
|
131959
|
+
InputType()
|
|
131960
|
+
], CreateMJUserRoutineInput);
|
|
131961
|
+
export { CreateMJUserRoutineInput };
|
|
131962
|
+
//****************************************************************************
|
|
131963
|
+
// INPUT TYPE for MJ: User Routines
|
|
131964
|
+
//****************************************************************************
|
|
131965
|
+
let UpdateMJUserRoutineInput = class UpdateMJUserRoutineInput {
|
|
131966
|
+
};
|
|
131967
|
+
__decorate([
|
|
131968
|
+
Field(),
|
|
131969
|
+
__metadata("design:type", String)
|
|
131970
|
+
], UpdateMJUserRoutineInput.prototype, "ID", void 0);
|
|
131971
|
+
__decorate([
|
|
131972
|
+
Field({ nullable: true }),
|
|
131973
|
+
__metadata("design:type", String)
|
|
131974
|
+
], UpdateMJUserRoutineInput.prototype, "UserID", void 0);
|
|
131975
|
+
__decorate([
|
|
131976
|
+
Field({ nullable: true }),
|
|
131977
|
+
__metadata("design:type", String)
|
|
131978
|
+
], UpdateMJUserRoutineInput.prototype, "EnvironmentID", void 0);
|
|
131979
|
+
__decorate([
|
|
131980
|
+
Field({ nullable: true }),
|
|
131981
|
+
__metadata("design:type", String)
|
|
131982
|
+
], UpdateMJUserRoutineInput.prototype, "Name", void 0);
|
|
131983
|
+
__decorate([
|
|
131984
|
+
Field({ nullable: true }),
|
|
131985
|
+
__metadata("design:type", String)
|
|
131986
|
+
], UpdateMJUserRoutineInput.prototype, "Description", void 0);
|
|
131987
|
+
__decorate([
|
|
131988
|
+
Field({ nullable: true }),
|
|
131989
|
+
__metadata("design:type", String)
|
|
131990
|
+
], UpdateMJUserRoutineInput.prototype, "Status", void 0);
|
|
131991
|
+
__decorate([
|
|
131992
|
+
Field({ nullable: true }),
|
|
131993
|
+
__metadata("design:type", String)
|
|
131994
|
+
], UpdateMJUserRoutineInput.prototype, "RoutineType", void 0);
|
|
131995
|
+
__decorate([
|
|
131996
|
+
Field({ nullable: true }),
|
|
131997
|
+
__metadata("design:type", String)
|
|
131998
|
+
], UpdateMJUserRoutineInput.prototype, "TargetType", void 0);
|
|
131999
|
+
__decorate([
|
|
132000
|
+
Field({ nullable: true }),
|
|
132001
|
+
__metadata("design:type", String)
|
|
132002
|
+
], UpdateMJUserRoutineInput.prototype, "TargetID", void 0);
|
|
132003
|
+
__decorate([
|
|
132004
|
+
Field({ nullable: true }),
|
|
132005
|
+
__metadata("design:type", String)
|
|
132006
|
+
], UpdateMJUserRoutineInput.prototype, "InitialMessage", void 0);
|
|
132007
|
+
__decorate([
|
|
132008
|
+
Field({ nullable: true }),
|
|
132009
|
+
__metadata("design:type", String)
|
|
132010
|
+
], UpdateMJUserRoutineInput.prototype, "StartingPayload", void 0);
|
|
132011
|
+
__decorate([
|
|
132012
|
+
Field({ nullable: true }),
|
|
132013
|
+
__metadata("design:type", String)
|
|
132014
|
+
], UpdateMJUserRoutineInput.prototype, "RequestedSkillIDs", void 0);
|
|
132015
|
+
__decorate([
|
|
132016
|
+
Field({ nullable: true }),
|
|
132017
|
+
__metadata("design:type", String)
|
|
132018
|
+
], UpdateMJUserRoutineInput.prototype, "CronExpression", void 0);
|
|
132019
|
+
__decorate([
|
|
132020
|
+
Field({ nullable: true }),
|
|
132021
|
+
__metadata("design:type", Date)
|
|
132022
|
+
], UpdateMJUserRoutineInput.prototype, "StartAt", void 0);
|
|
132023
|
+
__decorate([
|
|
132024
|
+
Field({ nullable: true }),
|
|
132025
|
+
__metadata("design:type", Date)
|
|
132026
|
+
], UpdateMJUserRoutineInput.prototype, "EndAt", void 0);
|
|
132027
|
+
__decorate([
|
|
132028
|
+
Field({ nullable: true }),
|
|
132029
|
+
__metadata("design:type", String)
|
|
132030
|
+
], UpdateMJUserRoutineInput.prototype, "NotificationTemplateID", void 0);
|
|
132031
|
+
__decorate([
|
|
132032
|
+
Field({ nullable: true }),
|
|
132033
|
+
__metadata("design:type", String)
|
|
132034
|
+
], UpdateMJUserRoutineInput.prototype, "Timezone", void 0);
|
|
132035
|
+
__decorate([
|
|
132036
|
+
Field({ nullable: true }),
|
|
132037
|
+
__metadata("design:type", Date)
|
|
132038
|
+
], UpdateMJUserRoutineInput.prototype, "NextRunAt", void 0);
|
|
132039
|
+
__decorate([
|
|
132040
|
+
Field({ nullable: true }),
|
|
132041
|
+
__metadata("design:type", Date)
|
|
132042
|
+
], UpdateMJUserRoutineInput.prototype, "LastRunAt", void 0);
|
|
132043
|
+
__decorate([
|
|
132044
|
+
Field({ nullable: true }),
|
|
132045
|
+
__metadata("design:type", String)
|
|
132046
|
+
], UpdateMJUserRoutineInput.prototype, "LastRunStatus", void 0);
|
|
132047
|
+
__decorate([
|
|
132048
|
+
Field({ nullable: true }),
|
|
132049
|
+
__metadata("design:type", String)
|
|
132050
|
+
], UpdateMJUserRoutineInput.prototype, "LastResultHash", void 0);
|
|
132051
|
+
__decorate([
|
|
132052
|
+
Field({ nullable: true }),
|
|
132053
|
+
__metadata("design:type", String)
|
|
132054
|
+
], UpdateMJUserRoutineInput.prototype, "NotifyCondition", void 0);
|
|
132055
|
+
__decorate([
|
|
132056
|
+
Field(() => Boolean, { nullable: true }),
|
|
132057
|
+
__metadata("design:type", Boolean)
|
|
132058
|
+
], UpdateMJUserRoutineInput.prototype, "NotifyViaInApp", void 0);
|
|
132059
|
+
__decorate([
|
|
132060
|
+
Field(() => Boolean, { nullable: true }),
|
|
132061
|
+
__metadata("design:type", Boolean)
|
|
132062
|
+
], UpdateMJUserRoutineInput.prototype, "NotifyViaEmail", void 0);
|
|
132063
|
+
__decorate([
|
|
132064
|
+
Field({ nullable: true }),
|
|
132065
|
+
__metadata("design:type", String)
|
|
132066
|
+
], UpdateMJUserRoutineInput.prototype, "ConversationID", void 0);
|
|
132067
|
+
__decorate([
|
|
132068
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
132069
|
+
__metadata("design:type", Array)
|
|
132070
|
+
], UpdateMJUserRoutineInput.prototype, "OldValues___", void 0);
|
|
132071
|
+
__decorate([
|
|
132072
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
132073
|
+
__metadata("design:type", RestoreContextInput)
|
|
132074
|
+
], UpdateMJUserRoutineInput.prototype, "RestoreContext___", void 0);
|
|
132075
|
+
UpdateMJUserRoutineInput = __decorate([
|
|
132076
|
+
InputType()
|
|
132077
|
+
], UpdateMJUserRoutineInput);
|
|
132078
|
+
export { UpdateMJUserRoutineInput };
|
|
132079
|
+
//****************************************************************************
|
|
132080
|
+
// RESOLVER for MJ: User Routines
|
|
132081
|
+
//****************************************************************************
|
|
132082
|
+
let RunMJUserRoutineViewResult = class RunMJUserRoutineViewResult {
|
|
132083
|
+
};
|
|
132084
|
+
__decorate([
|
|
132085
|
+
Field(() => [MJUserRoutine_]),
|
|
132086
|
+
__metadata("design:type", Array)
|
|
132087
|
+
], RunMJUserRoutineViewResult.prototype, "Results", void 0);
|
|
132088
|
+
__decorate([
|
|
132089
|
+
Field(() => String, { nullable: true }),
|
|
132090
|
+
__metadata("design:type", String)
|
|
132091
|
+
], RunMJUserRoutineViewResult.prototype, "UserViewRunID", void 0);
|
|
132092
|
+
__decorate([
|
|
132093
|
+
Field(() => Int, { nullable: true }),
|
|
132094
|
+
__metadata("design:type", Number)
|
|
132095
|
+
], RunMJUserRoutineViewResult.prototype, "RowCount", void 0);
|
|
132096
|
+
__decorate([
|
|
132097
|
+
Field(() => Int, { nullable: true }),
|
|
132098
|
+
__metadata("design:type", Number)
|
|
132099
|
+
], RunMJUserRoutineViewResult.prototype, "TotalRowCount", void 0);
|
|
132100
|
+
__decorate([
|
|
132101
|
+
Field(() => Int, { nullable: true }),
|
|
132102
|
+
__metadata("design:type", Number)
|
|
132103
|
+
], RunMJUserRoutineViewResult.prototype, "ExecutionTime", void 0);
|
|
132104
|
+
__decorate([
|
|
132105
|
+
Field({ nullable: true }),
|
|
132106
|
+
__metadata("design:type", String)
|
|
132107
|
+
], RunMJUserRoutineViewResult.prototype, "ErrorMessage", void 0);
|
|
132108
|
+
__decorate([
|
|
132109
|
+
Field(() => Boolean, { nullable: false }),
|
|
132110
|
+
__metadata("design:type", Boolean)
|
|
132111
|
+
], RunMJUserRoutineViewResult.prototype, "Success", void 0);
|
|
132112
|
+
RunMJUserRoutineViewResult = __decorate([
|
|
132113
|
+
ObjectType()
|
|
132114
|
+
], RunMJUserRoutineViewResult);
|
|
132115
|
+
export { RunMJUserRoutineViewResult };
|
|
132116
|
+
let MJUserRoutineResolver = class MJUserRoutineResolver extends ResolverBase {
|
|
132117
|
+
async RunMJUserRoutineViewByID(input, { providers, userPayload }, pubSub) {
|
|
132118
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
132119
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
132120
|
+
}
|
|
132121
|
+
async RunMJUserRoutineViewByName(input, { providers, userPayload }, pubSub) {
|
|
132122
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
132123
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
132124
|
+
}
|
|
132125
|
+
async RunMJUserRoutineDynamicView(input, { providers, userPayload }, pubSub) {
|
|
132126
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
132127
|
+
input.EntityName = 'MJ: User Routines';
|
|
132128
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
132129
|
+
}
|
|
132130
|
+
async MJUserRoutine(ID, { userPayload, providers }, pubSub) {
|
|
132131
|
+
this.CheckUserReadPermissions('MJ: User Routines', userPayload);
|
|
132132
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
132133
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserRoutines')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Routines', userPayload, EntityPermissionType.Read, 'AND');
|
|
132134
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
132135
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: User Routines', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
132136
|
+
return result;
|
|
132137
|
+
}
|
|
132138
|
+
async MJUserRoutineRuns_RoutineIDArray(mjuserroutine_, { userPayload, providers }, pubSub) {
|
|
132139
|
+
this.CheckUserReadPermissions('MJ: User Routine Runs', userPayload);
|
|
132140
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
132141
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserRoutineRuns')} WHERE ${provider.QuoteIdentifier('RoutineID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Routine Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
132142
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjuserroutine_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
132143
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User Routine Runs', rows, this.GetUserFromPayload(userPayload));
|
|
132144
|
+
return result;
|
|
132145
|
+
}
|
|
132146
|
+
async MJUserRoutineRecipients_RoutineIDArray(mjuserroutine_, { userPayload, providers }, pubSub) {
|
|
132147
|
+
this.CheckUserReadPermissions('MJ: User Routine Recipients', userPayload);
|
|
132148
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
132149
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserRoutineRecipients')} WHERE ${provider.QuoteIdentifier('RoutineID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Routine Recipients', userPayload, EntityPermissionType.Read, 'AND');
|
|
132150
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjuserroutine_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
132151
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User Routine Recipients', rows, this.GetUserFromPayload(userPayload));
|
|
132152
|
+
return result;
|
|
132153
|
+
}
|
|
132154
|
+
async CreateMJUserRoutine(input, { providers, userPayload }, pubSub) {
|
|
132155
|
+
const provider = GetReadWriteProvider(providers);
|
|
132156
|
+
return this.CreateRecord('MJ: User Routines', input, provider, userPayload, pubSub);
|
|
132157
|
+
}
|
|
132158
|
+
async UpdateMJUserRoutine(input, { providers, userPayload }, pubSub) {
|
|
132159
|
+
const provider = GetReadWriteProvider(providers);
|
|
132160
|
+
return this.UpdateRecord('MJ: User Routines', input, provider, userPayload, pubSub);
|
|
132161
|
+
}
|
|
132162
|
+
async DeleteMJUserRoutine(ID, options, { providers, userPayload }, pubSub) {
|
|
132163
|
+
const provider = GetReadWriteProvider(providers);
|
|
132164
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
132165
|
+
return this.DeleteRecord('MJ: User Routines', key, options, provider, userPayload, pubSub);
|
|
132166
|
+
}
|
|
132167
|
+
};
|
|
132168
|
+
__decorate([
|
|
132169
|
+
Query(() => RunMJUserRoutineViewResult),
|
|
132170
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
132171
|
+
__param(1, Ctx()),
|
|
132172
|
+
__param(2, PubSub()),
|
|
132173
|
+
__metadata("design:type", Function),
|
|
132174
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
132175
|
+
__metadata("design:returntype", Promise)
|
|
132176
|
+
], MJUserRoutineResolver.prototype, "RunMJUserRoutineViewByID", null);
|
|
132177
|
+
__decorate([
|
|
132178
|
+
Query(() => RunMJUserRoutineViewResult),
|
|
132179
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
132180
|
+
__param(1, Ctx()),
|
|
132181
|
+
__param(2, PubSub()),
|
|
132182
|
+
__metadata("design:type", Function),
|
|
132183
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
132184
|
+
__metadata("design:returntype", Promise)
|
|
132185
|
+
], MJUserRoutineResolver.prototype, "RunMJUserRoutineViewByName", null);
|
|
132186
|
+
__decorate([
|
|
132187
|
+
Query(() => RunMJUserRoutineViewResult),
|
|
132188
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
132189
|
+
__param(1, Ctx()),
|
|
132190
|
+
__param(2, PubSub()),
|
|
132191
|
+
__metadata("design:type", Function),
|
|
132192
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
132193
|
+
__metadata("design:returntype", Promise)
|
|
132194
|
+
], MJUserRoutineResolver.prototype, "RunMJUserRoutineDynamicView", null);
|
|
132195
|
+
__decorate([
|
|
132196
|
+
Query(() => MJUserRoutine_, { nullable: true }),
|
|
132197
|
+
__param(0, Arg('ID', () => String)),
|
|
132198
|
+
__param(1, Ctx()),
|
|
132199
|
+
__param(2, PubSub()),
|
|
132200
|
+
__metadata("design:type", Function),
|
|
132201
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
132202
|
+
__metadata("design:returntype", Promise)
|
|
132203
|
+
], MJUserRoutineResolver.prototype, "MJUserRoutine", null);
|
|
132204
|
+
__decorate([
|
|
132205
|
+
FieldResolver(() => [MJUserRoutineRun_]),
|
|
132206
|
+
__param(0, Root()),
|
|
132207
|
+
__param(1, Ctx()),
|
|
132208
|
+
__param(2, PubSub()),
|
|
132209
|
+
__metadata("design:type", Function),
|
|
132210
|
+
__metadata("design:paramtypes", [MJUserRoutine_, Object, PubSubEngine]),
|
|
132211
|
+
__metadata("design:returntype", Promise)
|
|
132212
|
+
], MJUserRoutineResolver.prototype, "MJUserRoutineRuns_RoutineIDArray", null);
|
|
132213
|
+
__decorate([
|
|
132214
|
+
FieldResolver(() => [MJUserRoutineRecipient_]),
|
|
132215
|
+
__param(0, Root()),
|
|
132216
|
+
__param(1, Ctx()),
|
|
132217
|
+
__param(2, PubSub()),
|
|
132218
|
+
__metadata("design:type", Function),
|
|
132219
|
+
__metadata("design:paramtypes", [MJUserRoutine_, Object, PubSubEngine]),
|
|
132220
|
+
__metadata("design:returntype", Promise)
|
|
132221
|
+
], MJUserRoutineResolver.prototype, "MJUserRoutineRecipients_RoutineIDArray", null);
|
|
132222
|
+
__decorate([
|
|
132223
|
+
Mutation(() => MJUserRoutine_),
|
|
132224
|
+
__param(0, Arg('input', () => CreateMJUserRoutineInput)),
|
|
132225
|
+
__param(1, Ctx()),
|
|
132226
|
+
__param(2, PubSub()),
|
|
132227
|
+
__metadata("design:type", Function),
|
|
132228
|
+
__metadata("design:paramtypes", [CreateMJUserRoutineInput, Object, PubSubEngine]),
|
|
132229
|
+
__metadata("design:returntype", Promise)
|
|
132230
|
+
], MJUserRoutineResolver.prototype, "CreateMJUserRoutine", null);
|
|
132231
|
+
__decorate([
|
|
132232
|
+
Mutation(() => MJUserRoutine_),
|
|
132233
|
+
__param(0, Arg('input', () => UpdateMJUserRoutineInput)),
|
|
132234
|
+
__param(1, Ctx()),
|
|
132235
|
+
__param(2, PubSub()),
|
|
132236
|
+
__metadata("design:type", Function),
|
|
132237
|
+
__metadata("design:paramtypes", [UpdateMJUserRoutineInput, Object, PubSubEngine]),
|
|
132238
|
+
__metadata("design:returntype", Promise)
|
|
132239
|
+
], MJUserRoutineResolver.prototype, "UpdateMJUserRoutine", null);
|
|
132240
|
+
__decorate([
|
|
132241
|
+
Mutation(() => MJUserRoutine_),
|
|
132242
|
+
__param(0, Arg('ID', () => String)),
|
|
132243
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
132244
|
+
__param(2, Ctx()),
|
|
132245
|
+
__param(3, PubSub()),
|
|
132246
|
+
__metadata("design:type", Function),
|
|
132247
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
132248
|
+
__metadata("design:returntype", Promise)
|
|
132249
|
+
], MJUserRoutineResolver.prototype, "DeleteMJUserRoutine", null);
|
|
132250
|
+
MJUserRoutineResolver = __decorate([
|
|
132251
|
+
Resolver(MJUserRoutine_)
|
|
132252
|
+
], MJUserRoutineResolver);
|
|
132253
|
+
export { MJUserRoutineResolver };
|
|
132254
|
+
//****************************************************************************
|
|
129437
132255
|
// ENTITY CLASS for MJ: User Settings
|
|
129438
132256
|
//****************************************************************************
|
|
129439
132257
|
let MJUserSetting_ = class MJUserSetting_ {
|
|
@@ -131659,6 +134477,14 @@ __decorate([
|
|
|
131659
134477
|
Field(() => [MJAISkill_]),
|
|
131660
134478
|
__metadata("design:type", Array)
|
|
131661
134479
|
], MJUser_.prototype, "MJAISkills_CreatedByUserIDArray", void 0);
|
|
134480
|
+
__decorate([
|
|
134481
|
+
Field(() => [MJUserRoutine_]),
|
|
134482
|
+
__metadata("design:type", Array)
|
|
134483
|
+
], MJUser_.prototype, "MJUserRoutines_UserIDArray", void 0);
|
|
134484
|
+
__decorate([
|
|
134485
|
+
Field(() => [MJUserRoutineRecipient_]),
|
|
134486
|
+
__metadata("design:type", Array)
|
|
134487
|
+
], MJUser_.prototype, "MJUserRoutineRecipients_UserIDArray", void 0);
|
|
131662
134488
|
MJUser_ = __decorate([
|
|
131663
134489
|
ObjectType({ description: `A list of all users who have or had access to the system` })
|
|
131664
134490
|
], MJUser_);
|
|
@@ -132728,6 +135554,22 @@ let MJUserResolverBase = class MJUserResolverBase extends ResolverBase {
|
|
|
132728
135554
|
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Skills', rows, this.GetUserFromPayload(userPayload));
|
|
132729
135555
|
return result;
|
|
132730
135556
|
}
|
|
135557
|
+
async MJUserRoutines_UserIDArray(mjuser_, { userPayload, providers }, pubSub) {
|
|
135558
|
+
this.CheckUserReadPermissions('MJ: User Routines', userPayload);
|
|
135559
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
135560
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserRoutines')} WHERE ${provider.QuoteIdentifier('UserID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Routines', userPayload, EntityPermissionType.Read, 'AND');
|
|
135561
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjuser_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
135562
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User Routines', rows, this.GetUserFromPayload(userPayload));
|
|
135563
|
+
return result;
|
|
135564
|
+
}
|
|
135565
|
+
async MJUserRoutineRecipients_UserIDArray(mjuser_, { userPayload, providers }, pubSub) {
|
|
135566
|
+
this.CheckUserReadPermissions('MJ: User Routine Recipients', userPayload);
|
|
135567
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
135568
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwUserRoutineRecipients')} WHERE ${provider.QuoteIdentifier('UserID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: User Routine Recipients', userPayload, EntityPermissionType.Read, 'AND');
|
|
135569
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjuser_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
135570
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: User Routine Recipients', rows, this.GetUserFromPayload(userPayload));
|
|
135571
|
+
return result;
|
|
135572
|
+
}
|
|
132731
135573
|
async CreateMJUser(input, { providers, userPayload }, pubSub) {
|
|
132732
135574
|
const provider = GetReadWriteProvider(providers);
|
|
132733
135575
|
return this.CreateRecord('MJ: Users', input, provider, userPayload, pubSub);
|
|
@@ -133749,6 +136591,24 @@ __decorate([
|
|
|
133749
136591
|
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
133750
136592
|
__metadata("design:returntype", Promise)
|
|
133751
136593
|
], MJUserResolverBase.prototype, "MJAISkills_CreatedByUserIDArray", null);
|
|
136594
|
+
__decorate([
|
|
136595
|
+
FieldResolver(() => [MJUserRoutine_]),
|
|
136596
|
+
__param(0, Root()),
|
|
136597
|
+
__param(1, Ctx()),
|
|
136598
|
+
__param(2, PubSub()),
|
|
136599
|
+
__metadata("design:type", Function),
|
|
136600
|
+
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
136601
|
+
__metadata("design:returntype", Promise)
|
|
136602
|
+
], MJUserResolverBase.prototype, "MJUserRoutines_UserIDArray", null);
|
|
136603
|
+
__decorate([
|
|
136604
|
+
FieldResolver(() => [MJUserRoutineRecipient_]),
|
|
136605
|
+
__param(0, Root()),
|
|
136606
|
+
__param(1, Ctx()),
|
|
136607
|
+
__param(2, PubSub()),
|
|
136608
|
+
__metadata("design:type", Function),
|
|
136609
|
+
__metadata("design:paramtypes", [MJUser_, Object, PubSubEngine]),
|
|
136610
|
+
__metadata("design:returntype", Promise)
|
|
136611
|
+
], MJUserResolverBase.prototype, "MJUserRoutineRecipients_UserIDArray", null);
|
|
133752
136612
|
__decorate([
|
|
133753
136613
|
Mutation(() => MJUser_),
|
|
133754
136614
|
__param(0, Arg('input', () => CreateMJUserInput)),
|