@things-factory/worklist 10.1.4 → 10.1.6
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-client/components/activity-approval-ribon.js +17 -2
- package/dist-client/components/activity-approval-ribon.js.map +1 -1
- package/dist-client/components/decision-slots.d.ts +89 -0
- package/dist-client/components/decision-slots.js +111 -0
- package/dist-client/components/decision-slots.js.map +1 -0
- package/dist-client/pages/activity-approval/activity-approval-page.d.ts +72 -0
- package/dist-client/pages/activity-approval/activity-approval-page.js +425 -43
- package/dist-client/pages/activity-approval/activity-approval-page.js.map +1 -1
- package/dist-client/pages/activity-catalog/activity-catalog-page.d.ts +24 -0
- package/dist-client/pages/activity-catalog/activity-catalog-page.js +101 -6
- package/dist-client/pages/activity-catalog/activity-catalog-page.js.map +1 -1
- package/dist-client/pages/installable-activity/installable-activity-list-page.d.ts +27 -0
- package/dist-client/pages/installable-activity/installable-activity-list-page.js +70 -11
- package/dist-client/pages/installable-activity/installable-activity-list-page.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/controllers/activity-approval/approval-line.d.ts +32 -0
- package/dist-server/controllers/activity-approval/approval-line.js +35 -0
- package/dist-server/controllers/activity-approval/approval-line.js.map +1 -1
- package/dist-server/controllers/activity-approval/approve.js +17 -0
- package/dist-server/controllers/activity-approval/approve.js.map +1 -1
- package/dist-server/controllers/activity-approval/reject.js +21 -1
- package/dist-server/controllers/activity-approval/reject.js.map +1 -1
- package/dist-server/controllers/activity-installation/activity-installation-controller.js +5 -9
- package/dist-server/controllers/activity-installation/activity-installation-controller.js.map +1 -1
- package/dist-server/controllers/activity-installation/installable-to-activity.d.ts +49 -0
- package/dist-server/controllers/activity-installation/installable-to-activity.js +40 -0
- package/dist-server/controllers/activity-installation/installable-to-activity.js.map +1 -0
- package/dist-server/controllers/activity-installation/registry-conflict.d.ts +32 -0
- package/dist-server/controllers/activity-installation/registry-conflict.js +21 -0
- package/dist-server/controllers/activity-installation/registry-conflict.js.map +1 -0
- package/dist-server/service/activity/activity-decision-key-item-type.d.ts +160 -0
- package/dist-server/service/activity/activity-decision-key-item-type.js +176 -0
- package/dist-server/service/activity/activity-decision-key-item-type.js.map +1 -0
- package/dist-server/service/activity/activity-type.d.ts +3 -0
- package/dist-server/service/activity/activity-type.js +8 -0
- package/dist-server/service/activity/activity-type.js.map +1 -1
- package/dist-server/service/activity/activity.d.ts +30 -0
- package/dist-server/service/activity/activity.js +14 -0
- package/dist-server/service/activity/activity.js.map +1 -1
- package/dist-server/service/activity/decision-key-declaration.d.ts +33 -0
- package/dist-server/service/activity/decision-key-declaration.js +67 -0
- package/dist-server/service/activity/decision-key-declaration.js.map +1 -0
- package/dist-server/service/activity/{credential-guard-subscriber.d.ts → declaration-guard-subscriber.d.ts} +6 -1
- package/dist-server/service/activity/declaration-guard-subscriber.js +46 -0
- package/dist-server/service/activity/declaration-guard-subscriber.js.map +1 -0
- package/dist-server/service/activity/index.d.ts +3 -3
- package/dist-server/service/activity/index.js +2 -2
- package/dist-server/service/activity/index.js.map +1 -1
- package/dist-server/service/activity/search-key-declaration.d.ts +38 -0
- package/dist-server/service/activity/search-key-declaration.js +49 -0
- package/dist-server/service/activity/search-key-declaration.js.map +1 -0
- package/dist-server/service/activity-instance/activity-instance-type.js.map +1 -1
- package/dist-server/service/activity-instance/index.d.ts +1 -1
- package/dist-server/service/activity-template/index.d.ts +1 -1
- package/dist-server/service/activity-thread/index.d.ts +1 -1
- package/dist-server/service/index.d.ts +3 -3
- package/dist-server/service/installable-activity/installable-activity-mutation.js +24 -0
- package/dist-server/service/installable-activity/installable-activity-mutation.js.map +1 -1
- package/dist-server/service/installable-activity/installable-activity.d.ts +9 -0
- package/dist-server/service/installable-activity/installable-activity.js +5 -0
- package/dist-server/service/installable-activity/installable-activity.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/translations/en.json +28 -6
- package/translations/ja.json +22 -0
- package/translations/ko.json +28 -6
- package/translations/ms.json +22 -0
- package/translations/zh.json +22 -0
- package/dist-server/service/activity/credential-guard-subscriber.js +0 -35
- package/dist-server/service/activity/credential-guard-subscriber.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity.js","sourceRoot":"","sources":["../../../server/service/activity/activity.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAUgB;AAEhB,yDAAsD;AACtD,iDAA8C;AAC9C,+DAAqG;AAErG,qEAA4D;AAC5D,yFAA0E;AAE1E,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,uCAAqB,CAAA;IACrB,2CAAyB,CAAA;AAC3B,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB;AAED,IAAA,+BAAgB,EAAC,cAAc,EAAE;IAC/B,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,iCAAiC;CAC/C,CAAC,CAAA;AAEF,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,iCAAS,CAAA;IACT,qCAAa,CAAA;IACb,uCAAe,CAAA;AACjB,CAAC,EAJW,oBAAoB,oCAApB,oBAAoB,QAI/B;AAED,IAAA,+BAAgB,EAAC,oBAAoB,EAAE;IACrC,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,kEAAkE;CAChF,CAAC,CAAA;AAEF,IAAY,YAWX;AAXD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,6BAAa,CAAA;IACb,iCAAiB,CAAA;IACjB,8CAA8B,CAAA;IAC9B,iCAAiB,CAAA;IACjB,0CAA0B,CAAA;IAC1B,6BAAa,CAAA;AACf,CAAC,EAXW,YAAY,4BAAZ,YAAY,QAWvB;AAED,IAAA,+BAAgB,EAAC,YAAY,EAAE;IAC7B,IAAI,EAAE,cAAc;IACpB,WAAW,EAA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ACnC;AAIlB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;yCAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;;2CACnC;AAGlB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACxB;mBAnLP,QAAQ;IAJpB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,eAAe,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAClG,IAAA,eAAK,EAAC,eAAe,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IACvH,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;GACtC,QAAQ,CAoLpB","sourcesContent":["import { Field, ID, ObjectType, registerEnumType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn,\n VersionColumn\n} from 'typeorm'\n\nimport { Role, User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\nimport { OrgMemberTargetType, OrgMemberTarget, ApprovalLineItem } from '@things-factory/organization'\n\nimport { ActivityModelItem } from './activity-model-type.js'\nimport { ActivitySearchKeyItem } from './activity-search-key-item-type.js'\n\nexport enum ActivityStatus {\n Draft = 'draft',\n Released = 'released',\n Deprecated = 'deprecated'\n}\n\nregisterEnumType(ActivityStatus, {\n name: 'ActivityStatus',\n description: 'state enumeration of a activity'\n})\n\nexport enum ActivityStartingType {\n None = '',\n Post = 'post',\n Issue = 'issue'\n}\n\nregisterEnumType(ActivityStartingType, {\n name: 'ActivityStartingType',\n description: 'whether the purpose of starting the activity is to issue or post'\n})\n\nexport enum ActivityType {\n Task = 'task',\n Service = 'service',\n Send = 'send',\n Receive = 'receive',\n User = 'user',\n Manual = 'manual',\n BusinessRule = 'business-rule',\n Script = 'script',\n Subprocess = 'sub-process',\n Call = 'call'\n}\n\nregisterEnumType(ActivityType, {\n name: 'ActivityType',\n description: 'type enumeration of a activity based on BPMN 2.0'\n})\n\nexport enum MultipleInstanceType {\n Single = 'single',\n Parallel = 'parallel',\n Sequential = 'sequential'\n}\n\nregisterEnumType(MultipleInstanceType, {\n name: 'MultipleInstanceType',\n description: 'type enumeration of a multiple instance property based on BPMN 2.0'\n})\n\nexport enum ActivityUIType {\n Generated = 'generated',\n Template = 'template',\n Board = 'board',\n CustomElement = 'custom-element',\n Page = 'page',\n External = 'external'\n}\n\nregisterEnumType(ActivityUIType, {\n name: 'ActivityUIType',\n description: 'user-interface type enumeration of a activity'\n})\n\n@ObjectType()\nexport class AssigneeItem {\n @Field(type => OrgMemberTargetType, { nullable: true })\n type?: OrgMemberTargetType\n\n @Field({ nullable: true })\n value?: string\n\n @Field(type => OrgMemberTarget, { nullable: true })\n assignee?: OrgMemberTarget\n}\n\n@Entity()\n@Index('ix_activity_0', (activity: Activity) => [activity.domain, activity.name], { unique: true })\n@Index('ix_activity_1', (activity: Activity) => [activity.domain, activity.state, activity.priority], { unique: false })\n@ObjectType({ description: 'Entity for Activity' })\nexport class Activity {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @VersionColumn({ default: 1 })\n @Field({ nullable: true })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true })\n domain?: Domain\n\n @RelationId((activity: Activity) => activity.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'BPMN 2.0 task type' })\n activityType?: ActivityType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n state?: ActivityStatus\n\n @Column('simple-json', { nullable: true })\n @Field(type => [ActivitySearchKeyItem], { nullable: true })\n searchKeys?: ActivitySearchKeyItem[]\n\n @Column('simple-json', { nullable: true })\n @Field(type => [ActivityModelItem], { nullable: true })\n model?: ActivityModelItem[]\n\n @Column({ nullable: true, default: 1 })\n @Field({ nullable: true })\n priority?: number = 1\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Whether the purpose of starting the activity is to issue or post' })\n startingType?: ActivityStartingType\n\n @Column({ nullable: true })\n @Field({\n nullable: true,\n description:\n 'Parallel or sequential are properties as a multi-instance activity, otherwise it means a single instance.'\n })\n multiple?: MultipleInstanceType\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Autostart schedule in crontab format' })\n schedule?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'ID of the autostart schedule registered in the schedule service' })\n scheduleId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Time zone to which automatic scheduling is applied' })\n timezone?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Standard time for this activity to be performed' })\n standardTime?: number\n\n @ManyToOne(type => Role, { nullable: true })\n @Field(type => Role, { nullable: true })\n issuerRole?: Role\n\n @RelationId((activity: Activity) => activity.issuerRole)\n issuerRoleId?: string\n\n @ManyToOne(type => Role, { nullable: true })\n @Field(type => Role, { nullable: true, description: 'Roles eligible to pick up activity from the activity bank.' })\n assigneeRole?: Role\n\n @RelationId((activity: Activity) => activity.assigneeRole)\n assigneeRoleId?: string\n\n @ManyToOne(type => Role, { nullable: true })\n @Field(type => Role, { nullable: true, description: 'The final authority on a given activity.' })\n supervisoryRole?: Role\n\n @RelationId((activity: Activity) => activity.supervisoryRole)\n supervisoryRoleId?: string\n\n @Column('simple-json', { nullable: true })\n @Field(type => [AssigneeItem], { nullable: true, description: 'Who to resolve for the activity.' })\n assignees?: AssigneeItem[]\n\n @Column('simple-json', { nullable: true })\n @Field(type => [ApprovalLineItem], {\n nullable: true,\n description: 'Approval line for handling the activity.'\n })\n approvalLine?: ApprovalLineItem[]\n\n /**\n * **반려하면 끝인가.**\n *\n * ── 왜 이 축이 필요한가 ──────────────────────────────────────────────────\n * 반려된 스레드는 `restartActivityThread` 로 되살릴 수 있고, 그러면 다음 차수의 결재가 새로 선다.\n * 휴가 신청처럼 **고쳐서 다시 내는** 업무에는 그것이 맞다.\n *\n * 그런데 되돌릴 수 없는 판정을 다루는 업무가 있다 — 부적합 처분, 트윈 조치. 그런 것은 반려되는\n * 순간 대상이 닫힌다. 그 뒤에 결재를 되살리면 **사람은 승인할 것이 있다고 보는데 승인에 효력이\n * 없다.** 승인해도 아무 일이 일어나지 않고 오류도 안 난다.\n *\n * 참이면 되살리지 못한다. 다시 하려면 새로 낸다.\n *\n * ── 기본값은 거짓이다 ────────────────────────────────────────────────────\n * 지금 있는 업무들은 되살릴 수 있는 것을 전제로 만들어졌다. 기본을 참으로 두면 그 업무들의 거동이\n * 말없이 바뀐다.\n */\n @Column({ type: 'boolean', nullable: true, default: false })\n @Field({ nullable: true, description: 'true when a rejection closes the case for good — it cannot be restarted' })\n rejectionIsFinal?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The type of UI to be shown when a task is performed' })\n uiType?: ActivityUIType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n uiSource?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The type of view to be shown when a task is approved' })\n viewType?: ActivityUIType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n viewSource?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The type of report to be shown when a task is approved' })\n reportType?: ActivityUIType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n reportSource?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'User assigned to the client application' })\n client?: User\n\n @RelationId((activity: Activity) => activity.client)\n clientId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((activity: Activity) => activity.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((activity: Activity) => activity.updater)\n updaterId?: string\n\n @Field(type => String, { nullable: true })\n thumbnail?: string\n}\n"]}
|
|
1
|
+
{"version":3,"file":"activity.js","sourceRoot":"","sources":["../../../server/service/activity/activity.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAUgB;AAEhB,yDAAsD;AACtD,iDAA8C;AAC9C,+DAAqG;AAErG,qEAA4D;AAC5D,yFAA0E;AAC1E,6FAA8E;AAE9E,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,uCAAqB,CAAA;IACrB,2CAAyB,CAAA;AAC3B,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB;AAED,IAAA,+BAAgB,EAAC,cAAc,EAAE;IAC/B,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,iCAAiC;CAC/C,CAAC,CAAA;AAEF,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,iCAAS,CAAA;IACT,qCAAa,CAAA;IACb,uCAAe,CAAA;AACjB,CAAC,EAJW,oBAAoB,oCAApB,oBAAoB,QAI/B;AAED,IAAA,+BAAgB,EAAC,oBAAoB,EAAE;IACrC,IAAI,EAAE,sBAAsB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AC;;2CACxB;mBAzNP,QAAQ;IAJpB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,eAAe,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAClG,IAAA,eAAK,EAAC,eAAe,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IACvH,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;GACtC,QAAQ,CA0NpB","sourcesContent":["import { Field, ID, ObjectType, registerEnumType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn,\n VersionColumn\n} from 'typeorm'\n\nimport { Role, User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\nimport { OrgMemberTargetType, OrgMemberTarget, ApprovalLineItem } from '@things-factory/organization'\n\nimport { ActivityModelItem } from './activity-model-type.js'\nimport { ActivitySearchKeyItem } from './activity-search-key-item-type.js'\nimport { ActivityDecisionKeyItem } from './activity-decision-key-item-type.js'\n\nexport enum ActivityStatus {\n Draft = 'draft',\n Released = 'released',\n Deprecated = 'deprecated'\n}\n\nregisterEnumType(ActivityStatus, {\n name: 'ActivityStatus',\n description: 'state enumeration of a activity'\n})\n\nexport enum ActivityStartingType {\n None = '',\n Post = 'post',\n Issue = 'issue'\n}\n\nregisterEnumType(ActivityStartingType, {\n name: 'ActivityStartingType',\n description: 'whether the purpose of starting the activity is to issue or post'\n})\n\nexport enum ActivityType {\n Task = 'task',\n Service = 'service',\n Send = 'send',\n Receive = 'receive',\n User = 'user',\n Manual = 'manual',\n BusinessRule = 'business-rule',\n Script = 'script',\n Subprocess = 'sub-process',\n Call = 'call'\n}\n\nregisterEnumType(ActivityType, {\n name: 'ActivityType',\n description: 'type enumeration of a activity based on BPMN 2.0'\n})\n\nexport enum MultipleInstanceType {\n Single = 'single',\n Parallel = 'parallel',\n Sequential = 'sequential'\n}\n\nregisterEnumType(MultipleInstanceType, {\n name: 'MultipleInstanceType',\n description: 'type enumeration of a multiple instance property based on BPMN 2.0'\n})\n\nexport enum ActivityUIType {\n Generated = 'generated',\n Template = 'template',\n Board = 'board',\n CustomElement = 'custom-element',\n Page = 'page',\n External = 'external'\n}\n\nregisterEnumType(ActivityUIType, {\n name: 'ActivityUIType',\n description: 'user-interface type enumeration of a activity'\n})\n\n@ObjectType()\nexport class AssigneeItem {\n @Field(type => OrgMemberTargetType, { nullable: true })\n type?: OrgMemberTargetType\n\n @Field({ nullable: true })\n value?: string\n\n @Field(type => OrgMemberTarget, { nullable: true })\n assignee?: OrgMemberTarget\n}\n\n@Entity()\n@Index('ix_activity_0', (activity: Activity) => [activity.domain, activity.name], { unique: true })\n@Index('ix_activity_1', (activity: Activity) => [activity.domain, activity.state, activity.priority], { unique: false })\n@ObjectType({ description: 'Entity for Activity' })\nexport class Activity {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @VersionColumn({ default: 1 })\n @Field({ nullable: true })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true })\n domain?: Domain\n\n @RelationId((activity: Activity) => activity.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n /**\n * The display name a person reads. `name` is the callback key and renaming it breaks callbacks.\n *\n * ── Why this is a column ──────────────────────────────────────────────────\n * It was declared on InstallableActivity only, and installActivity spread the template onto this\n * row, so a field with no column here was dropped and the save reported success. The result was\n * that 「부적합 처분 승인」 reached exactly one screen — the catalog, which reads the template\n * registry directly — while every screen that reads this row showed the instance name and the\n * instance description instead. The activity's own name appeared nowhere on the approval screen.\n */\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Display name for a person. `name` is the callback key.' })\n label?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'BPMN 2.0 task type' })\n activityType?: ActivityType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n state?: ActivityStatus\n\n @Column('simple-json', { nullable: true })\n @Field(type => [ActivitySearchKeyItem], { nullable: true })\n searchKeys?: ActivitySearchKeyItem[]\n\n /**\n * What an approver reads, and the part each value plays.\n *\n * The approval screen has one frame for every activity — ribbon, content, timeline, comment — and\n * the content is drawn by whichever of the six ui types the activity names. Five of the six point\n * at something built by hand; the sixth, `generated`, draws the model as a list of name and value\n * pairs. A list of pairs answers \"what are the values\" and not \"what happens if I approve\", which\n * is the only question this screen exists for, so every activity that needed the second answer\n * left `generated` and shipped a custom element. plant wrote four of them and all four laid out\n * the same five slots in the same order.\n *\n * Declaring the slots lets `generated` draw a decision. It also reaches the activity with no\n * screen at all: the twin actuation approval, whose ten values arrive as a flat list today and\n * whose approval is the one that actually moves equipment.\n *\n * Empty means nobody has declared it, and `generated` falls back to the model as before.\n */\n @Column('simple-json', { nullable: true })\n @Field(type => [ActivityDecisionKeyItem], {\n nullable: true,\n description: 'Which input values an approver judges by, and the part each one plays'\n })\n decisionKeys?: ActivityDecisionKeyItem[]\n\n @Column('simple-json', { nullable: true })\n @Field(type => [ActivityModelItem], { nullable: true })\n model?: ActivityModelItem[]\n\n @Column({ nullable: true, default: 1 })\n @Field({ nullable: true })\n priority?: number = 1\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Whether the purpose of starting the activity is to issue or post' })\n startingType?: ActivityStartingType\n\n @Column({ nullable: true })\n @Field({\n nullable: true,\n description:\n 'Parallel or sequential are properties as a multi-instance activity, otherwise it means a single instance.'\n })\n multiple?: MultipleInstanceType\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Autostart schedule in crontab format' })\n schedule?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'ID of the autostart schedule registered in the schedule service' })\n scheduleId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Time zone to which automatic scheduling is applied' })\n timezone?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Standard time for this activity to be performed' })\n standardTime?: number\n\n @ManyToOne(type => Role, { nullable: true })\n @Field(type => Role, { nullable: true })\n issuerRole?: Role\n\n @RelationId((activity: Activity) => activity.issuerRole)\n issuerRoleId?: string\n\n @ManyToOne(type => Role, { nullable: true })\n @Field(type => Role, { nullable: true, description: 'Roles eligible to pick up activity from the activity bank.' })\n assigneeRole?: Role\n\n @RelationId((activity: Activity) => activity.assigneeRole)\n assigneeRoleId?: string\n\n @ManyToOne(type => Role, { nullable: true })\n @Field(type => Role, { nullable: true, description: 'The final authority on a given activity.' })\n supervisoryRole?: Role\n\n @RelationId((activity: Activity) => activity.supervisoryRole)\n supervisoryRoleId?: string\n\n @Column('simple-json', { nullable: true })\n @Field(type => [AssigneeItem], { nullable: true, description: 'Who to resolve for the activity.' })\n assignees?: AssigneeItem[]\n\n @Column('simple-json', { nullable: true })\n @Field(type => [ApprovalLineItem], {\n nullable: true,\n description: 'Approval line for handling the activity.'\n })\n approvalLine?: ApprovalLineItem[]\n\n /**\n * **반려하면 끝인가.**\n *\n * ── 왜 이 축이 필요한가 ──────────────────────────────────────────────────\n * 반려된 스레드는 `restartActivityThread` 로 되살릴 수 있고, 그러면 다음 차수의 결재가 새로 선다.\n * 휴가 신청처럼 **고쳐서 다시 내는** 업무에는 그것이 맞다.\n *\n * 그런데 되돌릴 수 없는 판정을 다루는 업무가 있다 — 부적합 처분, 트윈 조치. 그런 것은 반려되는\n * 순간 대상이 닫힌다. 그 뒤에 결재를 되살리면 **사람은 승인할 것이 있다고 보는데 승인에 효력이\n * 없다.** 승인해도 아무 일이 일어나지 않고 오류도 안 난다.\n *\n * 참이면 되살리지 못한다. 다시 하려면 새로 낸다.\n *\n * ── 기본값은 거짓이다 ────────────────────────────────────────────────────\n * 지금 있는 업무들은 되살릴 수 있는 것을 전제로 만들어졌다. 기본을 참으로 두면 그 업무들의 거동이\n * 말없이 바뀐다.\n */\n @Column({ type: 'boolean', nullable: true, default: false })\n @Field({ nullable: true, description: 'true when a rejection closes the case for good — it cannot be restarted' })\n rejectionIsFinal?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The type of UI to be shown when a task is performed' })\n uiType?: ActivityUIType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n uiSource?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The type of view to be shown when a task is approved' })\n viewType?: ActivityUIType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n viewSource?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The type of report to be shown when a task is approved' })\n reportType?: ActivityUIType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n reportSource?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'User assigned to the client application' })\n client?: User\n\n @RelationId((activity: Activity) => activity.client)\n clientId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((activity: Activity) => activity.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((activity: Activity) => activity.updater)\n updaterId?: string\n\n @Field(type => String, { nullable: true })\n thumbnail?: string\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Refuses a decisionKeys declaration that cannot draw.
|
|
3
|
+
*
|
|
4
|
+
* Same reasoning as search keys: a declaration that does not work should fail where it arrives, not
|
|
5
|
+
* where someone opens an approval. The difference is what "not working" means here — nothing is
|
|
6
|
+
* dropped by a save, so the failure would be a screen that quietly draws less than it was told to.
|
|
7
|
+
*
|
|
8
|
+
* The shape is spelled out rather than imported. ActivityDecisionKeyItem carries type-graphql
|
|
9
|
+
* decorators and the test runner strips types without reading them, so importing the declared class
|
|
10
|
+
* pulls type-graphql in and the test file fails to load.
|
|
11
|
+
*/
|
|
12
|
+
type DecisionKeyDeclaration = {
|
|
13
|
+
role?: string;
|
|
14
|
+
inputPath?: string;
|
|
15
|
+
};
|
|
16
|
+
/** Roles a screen knows how to draw. Widening this is an architecture decision, not a lane's. */
|
|
17
|
+
export declare const DECISION_ROLES: readonly ["headline", "subject", "reversibility", "reason", "evidence", "currentState", "consequence", "policy"];
|
|
18
|
+
/**
|
|
19
|
+
* The roles that may appear more than once.
|
|
20
|
+
*
|
|
21
|
+
* An approval can change several things at once — plant's priority change pushes some orders back
|
|
22
|
+
* and moves others ahead — and those are separate consequences, not one merged sentence. Grounds
|
|
23
|
+
* come in several the same way: which inspection, against which spec, decided when.
|
|
24
|
+
*
|
|
25
|
+
* Every other role names a single value. Two headlines would leave the screen picking one with
|
|
26
|
+
* nothing to say why.
|
|
27
|
+
*
|
|
28
|
+
* Named consequence, not effect: TwinCommand.effect is what the source reported back after dispatch
|
|
29
|
+
* — an observation, and past — while this is a prediction, and future.
|
|
30
|
+
*/
|
|
31
|
+
export declare const REPEATABLE_ROLES: readonly ["consequence", "evidence"];
|
|
32
|
+
export declare function assertDecisionKeysAreUsable(decisionKeys: DecisionKeyDeclaration[] | undefined, activityName?: string): void;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REPEATABLE_ROLES = exports.DECISION_ROLES = void 0;
|
|
4
|
+
exports.assertDecisionKeysAreUsable = assertDecisionKeysAreUsable;
|
|
5
|
+
/** Roles a screen knows how to draw. Widening this is an architecture decision, not a lane's. */
|
|
6
|
+
exports.DECISION_ROLES = [
|
|
7
|
+
'headline',
|
|
8
|
+
'subject',
|
|
9
|
+
'reversibility',
|
|
10
|
+
'reason',
|
|
11
|
+
'evidence',
|
|
12
|
+
'currentState',
|
|
13
|
+
'consequence',
|
|
14
|
+
'policy'
|
|
15
|
+
];
|
|
16
|
+
/**
|
|
17
|
+
* The roles that may appear more than once.
|
|
18
|
+
*
|
|
19
|
+
* An approval can change several things at once — plant's priority change pushes some orders back
|
|
20
|
+
* and moves others ahead — and those are separate consequences, not one merged sentence. Grounds
|
|
21
|
+
* come in several the same way: which inspection, against which spec, decided when.
|
|
22
|
+
*
|
|
23
|
+
* Every other role names a single value. Two headlines would leave the screen picking one with
|
|
24
|
+
* nothing to say why.
|
|
25
|
+
*
|
|
26
|
+
* Named consequence, not effect: TwinCommand.effect is what the source reported back after dispatch
|
|
27
|
+
* — an observation, and past — while this is a prediction, and future.
|
|
28
|
+
*/
|
|
29
|
+
exports.REPEATABLE_ROLES = ['consequence', 'evidence'];
|
|
30
|
+
function assertDecisionKeysAreUsable(decisionKeys, activityName) {
|
|
31
|
+
if (!decisionKeys?.length) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const named = activityName ? `activity "${activityName}"` : 'this activity';
|
|
35
|
+
const unknown = decisionKeys.filter(key => !exports.DECISION_ROLES.includes(String(key?.role ?? '')));
|
|
36
|
+
if (unknown.length) {
|
|
37
|
+
throw new Error(`${named} declares decision keys with a role the approval screen does not know: ` +
|
|
38
|
+
`${unknown.map(key => `"${key?.role ?? ''}"`).join(', ')}. ` +
|
|
39
|
+
`Known roles are ${exports.DECISION_ROLES.join(', ')}. A role outside that set draws nothing.`);
|
|
40
|
+
}
|
|
41
|
+
const pathless = decisionKeys.filter(key => !String(key?.inputPath ?? '').trim());
|
|
42
|
+
if (pathless.length) {
|
|
43
|
+
throw new Error(`${named} declares ${pathless.length} decision key(s) with no inputPath. ` +
|
|
44
|
+
`A decision key names the value it draws; without a path there is nothing to read.`);
|
|
45
|
+
}
|
|
46
|
+
/*
|
|
47
|
+
* An index or a wildcard resolves to nothing at draw time and the slot would report "the path led
|
|
48
|
+
* nowhere" — which reads as a payload that disagrees with the declaration, when the truth is that
|
|
49
|
+
* the declaration used a path language that does not exist. Refusing here says which it was.
|
|
50
|
+
*/
|
|
51
|
+
const notPaths = decisionKeys.filter(key => /[[\]*]/.test(String(key?.inputPath ?? '')));
|
|
52
|
+
if (notPaths.length) {
|
|
53
|
+
throw new Error(`${named} declares decision keys whose inputPath is not a plain dotted path: ` +
|
|
54
|
+
`${notPaths.map(key => `"${key?.inputPath ?? ''}"`).join(', ')}. ` +
|
|
55
|
+
`Dots only — no array index and no wildcard. Point at the list itself; drawing its items is ` +
|
|
56
|
+
`the slot's work.`);
|
|
57
|
+
}
|
|
58
|
+
const repeated = exports.DECISION_ROLES.filter(role => !exports.REPEATABLE_ROLES.includes(role) &&
|
|
59
|
+
decisionKeys.filter(key => key?.role === role).length > 1);
|
|
60
|
+
if (repeated.length) {
|
|
61
|
+
throw new Error(`${named} declares more than one "${repeated.join('", "')}" decision key. ` +
|
|
62
|
+
`Only ${exports.REPEATABLE_ROLES.map(role => `"${role}"`).join(' and ')} may repeat — an approval can ` +
|
|
63
|
+
`change several things at once, and grounds come in several. The screen would draw one of the ` +
|
|
64
|
+
`others and could not say which.`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=decision-key-declaration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decision-key-declaration.js","sourceRoot":"","sources":["../../../server/service/activity/decision-key-declaration.ts"],"names":[],"mappings":";;;AAwCA,kEA2DC;AAtFD,iGAAiG;AACpF,QAAA,cAAc,GAAG;IAC5B,UAAU;IACV,SAAS;IACT,eAAe;IACf,QAAQ;IACR,UAAU;IACV,cAAc;IACd,aAAa;IACb,QAAQ;CACA,CAAA;AAEV;;;;;;;;;;;;GAYG;AACU,QAAA,gBAAgB,GAAG,CAAC,aAAa,EAA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AI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,sEAAsE;YAC5E,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,GAAG,EAAE,SAAS,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YAClE,6FAA6F;YAC7F,kBAAkB,CACrB,CAAA;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,sBAAc,CAAC,MAAM,CACpC,IAAI,CAAC,EAAE,CACL,CAAE,wBAAsC,CAAC,QAAQ,CAAC,IAAI,CAAC;QACvD,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAC5D,CAAA;IAED,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,4BAA4B,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB;YACzE,QAAQ,wBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,gCAAgC;YAC/F,+FAA+F;YAC/F,iCAAiC,CACpC,CAAA;IACH,CAAC;AACH,CAAC","sourcesContent":["/**\n * Refuses a decisionKeys declaration that cannot draw.\n *\n * Same reasoning as search keys: a declaration that does not work should fail where it arrives, not\n * where someone opens an approval. The difference is what \"not working\" means here — nothing is\n * dropped by a save, so the failure would be a screen that quietly draws less than it was told to.\n *\n * The shape is spelled out rather than imported. ActivityDecisionKeyItem carries type-graphql\n * decorators and the test runner strips types without reading them, so importing the declared class\n * pulls type-graphql in and the test file fails to load.\n */\ntype DecisionKeyDeclaration = { role?: string; inputPath?: string }\n\n/** Roles a screen knows how to draw. Widening this is an architecture decision, not a lane's. */\nexport const DECISION_ROLES = [\n 'headline',\n 'subject',\n 'reversibility',\n 'reason',\n 'evidence',\n 'currentState',\n 'consequence',\n 'policy'\n] as const\n\n/**\n * The roles that may appear more than once.\n *\n * An approval can change several things at once — plant's priority change pushes some orders back\n * and moves others ahead — and those are separate consequences, not one merged sentence. Grounds\n * come in several the same way: which inspection, against which spec, decided when.\n *\n * Every other role names a single value. Two headlines would leave the screen picking one with\n * nothing to say why.\n *\n * Named consequence, not effect: TwinCommand.effect is what the source reported back after dispatch\n * — an observation, and past — while this is a prediction, and future.\n */\nexport const REPEATABLE_ROLES = ['consequence', 'evidence'] as const\n\nexport function assertDecisionKeysAreUsable(\n decisionKeys: DecisionKeyDeclaration[] | undefined,\n activityName?: string\n): void {\n if (!decisionKeys?.length) {\n return\n }\n\n const named = activityName ? `activity \"${activityName}\"` : 'this activity'\n\n const unknown = decisionKeys.filter(key => !(DECISION_ROLES as readonly string[]).includes(String(key?.role ?? '')))\n\n if (unknown.length) {\n throw new Error(\n `${named} declares decision keys with a role the approval screen does not know: ` +\n `${unknown.map(key => `\"${key?.role ?? ''}\"`).join(', ')}. ` +\n `Known roles are ${DECISION_ROLES.join(', ')}. A role outside that set draws nothing.`\n )\n }\n\n const pathless = decisionKeys.filter(key => !String(key?.inputPath ?? '').trim())\n\n if (pathless.length) {\n throw new Error(\n `${named} declares ${pathless.length} decision key(s) with no inputPath. ` +\n `A decision key names the value it draws; without a path there is nothing to read.`\n )\n }\n\n /*\n * An index or a wildcard resolves to nothing at draw time and the slot would report \"the path led\n * nowhere\" — which reads as a payload that disagrees with the declaration, when the truth is that\n * the declaration used a path language that does not exist. Refusing here says which it was.\n */\n const notPaths = decisionKeys.filter(key => /[[\\]*]/.test(String(key?.inputPath ?? '')))\n\n if (notPaths.length) {\n throw new Error(\n `${named} declares decision keys whose inputPath is not a plain dotted path: ` +\n `${notPaths.map(key => `\"${key?.inputPath ?? ''}\"`).join(', ')}. ` +\n `Dots only — no array index and no wildcard. Point at the list itself; drawing its items is ` +\n `the slot's work.`\n )\n }\n\n const repeated = DECISION_ROLES.filter(\n role =>\n !(REPEATABLE_ROLES as readonly string[]).includes(role) &&\n decisionKeys.filter(key => key?.role === role).length > 1\n )\n\n if (repeated.length) {\n throw new Error(\n `${named} declares more than one \"${repeated.join('\", \"')}\" decision key. ` +\n `Only ${REPEATABLE_ROLES.map(role => `\"${role}\"`).join(' and ')} may repeat — an approval can ` +\n `change several things at once, and grounds come in several. The screen would draw one of the ` +\n `others and could not say which.`\n )\n }\n}\n"]}
|
|
@@ -11,9 +11,14 @@ import { Activity } from './activity.js';
|
|
|
11
11
|
* transaction, so a refused model is never half-written.
|
|
12
12
|
*
|
|
13
13
|
* A template carrying such a field is caught here too: installActivity saves an Activity from it.
|
|
14
|
+
*
|
|
15
|
+
* What is refused here are declarations that cannot work — not policy about what an activity may
|
|
16
|
+
* mean. A credential field cannot be stored, and a sixth search key cannot be indexed; both would
|
|
17
|
+
* otherwise be accepted, dropped, and reported as saved.
|
|
14
18
|
*/
|
|
15
|
-
export declare class
|
|
19
|
+
export declare class ActivityDeclarationGuardSubscriber implements EntitySubscriberInterface<Activity> {
|
|
16
20
|
listenTo(): typeof Activity;
|
|
17
21
|
beforeInsert(event: InsertEvent<Activity>): void;
|
|
18
22
|
beforeUpdate(event: UpdateEvent<Activity>): void;
|
|
23
|
+
private assertDeclarable;
|
|
19
24
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActivityDeclarationGuardSubscriber = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const typeorm_1 = require("typeorm");
|
|
6
|
+
const activity_js_1 = require("./activity.js");
|
|
7
|
+
const credential_field_js_1 = require("./credential-field.js");
|
|
8
|
+
const search_key_declaration_js_1 = require("./search-key-declaration.js");
|
|
9
|
+
const decision_key_declaration_js_1 = require("./decision-key-declaration.js");
|
|
10
|
+
/**
|
|
11
|
+
* **One place, because there are five ways in.**
|
|
12
|
+
*
|
|
13
|
+
* Activities are saved by createActivity, updateActivity, multipleUpsertActivities, the importer,
|
|
14
|
+
* and installActivity. A check written at each of those is not a rule — it is five things to
|
|
15
|
+
* remember, and the sixth way in arrives without it.
|
|
16
|
+
*
|
|
17
|
+
* TypeORM's subscriber is the seam every one of them passes through. Throwing here aborts the
|
|
18
|
+
* transaction, so a refused model is never half-written.
|
|
19
|
+
*
|
|
20
|
+
* A template carrying such a field is caught here too: installActivity saves an Activity from it.
|
|
21
|
+
*
|
|
22
|
+
* What is refused here are declarations that cannot work — not policy about what an activity may
|
|
23
|
+
* mean. A credential field cannot be stored, and a sixth search key cannot be indexed; both would
|
|
24
|
+
* otherwise be accepted, dropped, and reported as saved.
|
|
25
|
+
*/
|
|
26
|
+
let ActivityDeclarationGuardSubscriber = class ActivityDeclarationGuardSubscriber {
|
|
27
|
+
listenTo() {
|
|
28
|
+
return activity_js_1.Activity;
|
|
29
|
+
}
|
|
30
|
+
beforeInsert(event) {
|
|
31
|
+
this.assertDeclarable(event.entity);
|
|
32
|
+
}
|
|
33
|
+
beforeUpdate(event) {
|
|
34
|
+
this.assertDeclarable(event.entity);
|
|
35
|
+
}
|
|
36
|
+
assertDeclarable(activity) {
|
|
37
|
+
(0, credential_field_js_1.assertNoCredentialField)(activity?.model, activity?.name);
|
|
38
|
+
(0, search_key_declaration_js_1.assertSearchKeysAreUsable)(activity?.searchKeys, activity?.name);
|
|
39
|
+
(0, decision_key_declaration_js_1.assertDecisionKeysAreUsable)(activity?.decisionKeys, activity?.name);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
exports.ActivityDeclarationGuardSubscriber = ActivityDeclarationGuardSubscriber;
|
|
43
|
+
exports.ActivityDeclarationGuardSubscriber = ActivityDeclarationGuardSubscriber = tslib_1.__decorate([
|
|
44
|
+
(0, typeorm_1.EventSubscriber)()
|
|
45
|
+
], ActivityDeclarationGuardSubscriber);
|
|
46
|
+
//# sourceMappingURL=declaration-guard-subscriber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declaration-guard-subscriber.js","sourceRoot":"","sources":["../../../server/service/activity/declaration-guard-subscriber.ts"],"names":[],"mappings":";;;;AAAA,qCAA8F;AAE9F,+CAAwC;AACxC,+DAA+D;AAC/D,2EAAuE;AACvE,+EAA2E;AAE3E;;;;;;;;;;;;;;;GAeG;AAEI,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAC7C,QAAQ;QACN,OAAO,sBAAQ,CAAA;IACjB,CAAC;IAED,YAAY,CAAC,KAA4B;QACvC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IACrC,CAAC;IAED,YAAY,CAAC,KAA4B;QACvC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,MAAkB,CAAC,CAAA;IACjD,CAAC;IAEO,gBAAgB,CAAC,QAAmB;QAC1C,IAAA,6CAAuB,EAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAA;QACxD,IAAA,qDAAyB,EAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAA;QAC/D,IAAA,yDAA2B,EAAC,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAA;IACrE,CAAC;CACF,CAAA;AAlBY,gFAAkC;6CAAlC,kCAAkC;IAD9C,IAAA,yBAAe,GAAE;GACL,kCAAkC,CAkB9C","sourcesContent":["import { EntitySubscriberInterface, EventSubscriber, InsertEvent, UpdateEvent } from 'typeorm'\n\nimport { Activity } from './activity.js'\nimport { assertNoCredentialField } from './credential-field.js'\nimport { assertSearchKeysAreUsable } from './search-key-declaration.js'\nimport { assertDecisionKeysAreUsable } from './decision-key-declaration.js'\n\n/**\n * **One place, because there are five ways in.**\n *\n * Activities are saved by createActivity, updateActivity, multipleUpsertActivities, the importer,\n * and installActivity. A check written at each of those is not a rule — it is five things to\n * remember, and the sixth way in arrives without it.\n *\n * TypeORM's subscriber is the seam every one of them passes through. Throwing here aborts the\n * transaction, so a refused model is never half-written.\n *\n * A template carrying such a field is caught here too: installActivity saves an Activity from it.\n *\n * What is refused here are declarations that cannot work — not policy about what an activity may\n * mean. A credential field cannot be stored, and a sixth search key cannot be indexed; both would\n * otherwise be accepted, dropped, and reported as saved.\n */\n@EventSubscriber()\nexport class ActivityDeclarationGuardSubscriber implements EntitySubscriberInterface<Activity> {\n listenTo() {\n return Activity\n }\n\n beforeInsert(event: InsertEvent<Activity>) {\n this.assertDeclarable(event.entity)\n }\n\n beforeUpdate(event: UpdateEvent<Activity>) {\n this.assertDeclarable(event.entity as Activity)\n }\n\n private assertDeclarable(activity?: Activity) {\n assertNoCredentialField(activity?.model, activity?.name)\n assertSearchKeysAreUsable(activity?.searchKeys, activity?.name)\n assertDecisionKeysAreUsable(activity?.decisionKeys, activity?.name)\n }\n}\n"]}
|
|
@@ -3,7 +3,7 @@ import { ActivityHistory } from "./activity-history.js";
|
|
|
3
3
|
import { ActivityMutation } from "./activity-mutation.js";
|
|
4
4
|
import { ActivityQuery } from "./activity-query.js";
|
|
5
5
|
import { ActivityHistoryEntitySubscriber } from "./event-subscriber.js";
|
|
6
|
-
import {
|
|
6
|
+
import { ActivityDeclarationGuardSubscriber } from "./declaration-guard-subscriber.js";
|
|
7
7
|
export declare const entities: (typeof Activity | typeof ActivityHistory)[];
|
|
8
|
-
export declare const resolvers: (typeof
|
|
9
|
-
export declare const subscribers: (typeof ActivityHistoryEntitySubscriber | typeof
|
|
8
|
+
export declare const resolvers: (typeof ActivityQuery | typeof ActivityMutation)[];
|
|
9
|
+
export declare const subscribers: (typeof ActivityHistoryEntitySubscriber | typeof ActivityDeclarationGuardSubscriber)[];
|
|
@@ -6,8 +6,8 @@ const activity_history_js_1 = require("./activity-history.js");
|
|
|
6
6
|
const activity_mutation_js_1 = require("./activity-mutation.js");
|
|
7
7
|
const activity_query_js_1 = require("./activity-query.js");
|
|
8
8
|
const event_subscriber_js_1 = require("./event-subscriber.js");
|
|
9
|
-
const
|
|
9
|
+
const declaration_guard_subscriber_js_1 = require("./declaration-guard-subscriber.js");
|
|
10
10
|
exports.entities = [activity_js_1.Activity, activity_history_js_1.ActivityHistory];
|
|
11
11
|
exports.resolvers = [activity_query_js_1.ActivityQuery, activity_mutation_js_1.ActivityMutation];
|
|
12
|
-
exports.subscribers = [event_subscriber_js_1.ActivityHistoryEntitySubscriber,
|
|
12
|
+
exports.subscribers = [event_subscriber_js_1.ActivityHistoryEntitySubscriber, declaration_guard_subscriber_js_1.ActivityDeclarationGuardSubscriber];
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/activity/index.ts"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,+DAAuD;AACvD,iEAAyD;AACzD,2DAAmD;AACnD,+DAAuE;AACvE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/activity/index.ts"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,+DAAuD;AACvD,iEAAyD;AACzD,2DAAmD;AACnD,+DAAuE;AACvE,uFAAsF;AAEzE,QAAA,QAAQ,GAAG,CAAC,sBAAQ,EAAE,qCAAe,CAAC,CAAA;AACtC,QAAA,SAAS,GAAG,CAAC,iCAAa,EAAE,uCAAgB,CAAC,CAAA;AAC7C,QAAA,WAAW,GAAG,CAAC,qDAA+B,EAAE,oEAAkC,CAAC,CAAA","sourcesContent":["import { Activity } from \"./activity.js\"\nimport { ActivityHistory } from \"./activity-history.js\"\nimport { ActivityMutation } from \"./activity-mutation.js\"\nimport { ActivityQuery } from \"./activity-query.js\"\nimport { ActivityHistoryEntitySubscriber } from \"./event-subscriber.js\"\nimport { ActivityDeclarationGuardSubscriber } from \"./declaration-guard-subscriber.js\"\n\nexport const entities = [Activity, ActivityHistory]\nexport const resolvers = [ActivityQuery, ActivityMutation]\nexport const subscribers = [ActivityHistoryEntitySubscriber, ActivityDeclarationGuardSubscriber]\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shape this rule needs, spelled out rather than imported.
|
|
3
|
+
*
|
|
4
|
+
* ActivitySearchKeyItem carries type-graphql decorators, and the test runner parses TypeScript by
|
|
5
|
+
* stripping types — it reads neither a decorator nor an enum. Importing the declared class pulls
|
|
6
|
+
* type-graphql in and the whole test file fails to load, which is what happened when this module
|
|
7
|
+
* first imported it (2026-09-09). A rule about a field's text needs only the field.
|
|
8
|
+
*/
|
|
9
|
+
type SearchKeyDeclaration = {
|
|
10
|
+
inputKey?: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* How many search keys an activity may declare.
|
|
14
|
+
*
|
|
15
|
+
* fillActivitySearchKeys writes each one to `key0${index + 1}` on the instance, and the instance has
|
|
16
|
+
* key01 through key05 — five columns, no more. The function has no ceiling, so a sixth key writes to
|
|
17
|
+
* key06, a column that does not exist. A spread save drops a field it does not recognise and reports
|
|
18
|
+
* success, which means the declaration looks accepted, the value is never stored, and searching on
|
|
19
|
+
* that axis answers zero rows with no error anywhere.
|
|
20
|
+
*
|
|
21
|
+
* Nothing declares six today: twelve declarations across four repositories, the largest three
|
|
22
|
+
* (measured 2026-09-09). This refusal is what keeps the seventh one from being the first to find
|
|
23
|
+
* out.
|
|
24
|
+
*/
|
|
25
|
+
export declare const MOST_SEARCH_KEYS = 5;
|
|
26
|
+
/**
|
|
27
|
+
* Why a dotted key cannot work here.
|
|
28
|
+
*
|
|
29
|
+
* fillActivitySearchKeys reads `input[key.inputKey]` — one top-level key, and an array is indexed by
|
|
30
|
+
* its first element because the value goes into a searchable column. A dot in that name looks up a
|
|
31
|
+
* property literally called "shift.passes", finds nothing, and the axis is quietly left unfilled.
|
|
32
|
+
*
|
|
33
|
+
* ActivityDecisionKeyItem.inputPath is the field that does take a path, because it points at a value
|
|
34
|
+
* to draw rather than one to index. The two names are different so that using the wrong one is
|
|
35
|
+
* visible rather than silent. (2026-09-09, architect's ruling)
|
|
36
|
+
*/
|
|
37
|
+
export declare function assertSearchKeysAreUsable(searchKeys: SearchKeyDeclaration[] | undefined, activityName?: string): void;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MOST_SEARCH_KEYS = void 0;
|
|
4
|
+
exports.assertSearchKeysAreUsable = assertSearchKeysAreUsable;
|
|
5
|
+
/**
|
|
6
|
+
* How many search keys an activity may declare.
|
|
7
|
+
*
|
|
8
|
+
* fillActivitySearchKeys writes each one to `key0${index + 1}` on the instance, and the instance has
|
|
9
|
+
* key01 through key05 — five columns, no more. The function has no ceiling, so a sixth key writes to
|
|
10
|
+
* key06, a column that does not exist. A spread save drops a field it does not recognise and reports
|
|
11
|
+
* success, which means the declaration looks accepted, the value is never stored, and searching on
|
|
12
|
+
* that axis answers zero rows with no error anywhere.
|
|
13
|
+
*
|
|
14
|
+
* Nothing declares six today: twelve declarations across four repositories, the largest three
|
|
15
|
+
* (measured 2026-09-09). This refusal is what keeps the seventh one from being the first to find
|
|
16
|
+
* out.
|
|
17
|
+
*/
|
|
18
|
+
exports.MOST_SEARCH_KEYS = 5;
|
|
19
|
+
/**
|
|
20
|
+
* Why a dotted key cannot work here.
|
|
21
|
+
*
|
|
22
|
+
* fillActivitySearchKeys reads `input[key.inputKey]` — one top-level key, and an array is indexed by
|
|
23
|
+
* its first element because the value goes into a searchable column. A dot in that name looks up a
|
|
24
|
+
* property literally called "shift.passes", finds nothing, and the axis is quietly left unfilled.
|
|
25
|
+
*
|
|
26
|
+
* ActivityDecisionKeyItem.inputPath is the field that does take a path, because it points at a value
|
|
27
|
+
* to draw rather than one to index. The two names are different so that using the wrong one is
|
|
28
|
+
* visible rather than silent. (2026-09-09, architect's ruling)
|
|
29
|
+
*/
|
|
30
|
+
function assertSearchKeysAreUsable(searchKeys, activityName) {
|
|
31
|
+
if (!searchKeys?.length) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const named = activityName ? `activity "${activityName}"` : 'this activity';
|
|
35
|
+
if (searchKeys.length > exports.MOST_SEARCH_KEYS) {
|
|
36
|
+
throw new Error(`${named} declares ${searchKeys.length} search keys, and an activity instance has only ` +
|
|
37
|
+
`${exports.MOST_SEARCH_KEYS} columns to hold them (key01..key0${exports.MOST_SEARCH_KEYS}). ` +
|
|
38
|
+
`Keys past the ${exports.MOST_SEARCH_KEYS}th would be dropped without an error and searching on ` +
|
|
39
|
+
`them would answer zero rows.`);
|
|
40
|
+
}
|
|
41
|
+
const dotted = searchKeys.filter(key => String(key?.inputKey ?? '').includes('.'));
|
|
42
|
+
if (dotted.length) {
|
|
43
|
+
throw new Error(`${named} declares search keys whose inputKey holds a path: ` +
|
|
44
|
+
`${dotted.map(key => `"${key.inputKey}"`).join(', ')}. ` +
|
|
45
|
+
`A search key names one top-level key of the input, because its value goes into a searchable ` +
|
|
46
|
+
`column. Use ActivityDecisionKeyItem.inputPath for a value nested inside the input.`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=search-key-declaration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-key-declaration.js","sourceRoot":"","sources":["../../../server/service/activity/search-key-declaration.ts"],"names":[],"mappings":";;;AAoCA,8DA0BC;AApDD;;;;;;;;;;;;GAYG;AACU,QAAA,gBAAgB,GAAG,CAAC,CAAA;AAEjC;;;;;;;;;;GAUG;AACH,SAAgB,yBAAyB,CAAC,UAA8C,EAAE,YAAqB;IAC7G,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QACxB,OAAM;IACR,CAAC;IAED,MAAM,KAAK,GAAG,YAAY,CAAC,CAAC,CAAC,aAAa,YAAY,GAAG,CAAC,CAAC,CAAC,eAAe,CAAA;IAE3E,IAAI,UAAU,CAAC,MAAM,GAAG,wBAAgB,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,aAAa,UAAU,CAAC,MAAM,kDAAkD;YACtF,GAAG,wBAAgB,qCAAqC,wBAAgB,KAAK;YAC7E,iBAAiB,wBAAgB,wDAAwD;YACzF,8BAA8B,CACjC,CAAA;IACH,CAAC;IAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAA;IAElF,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CACb,GAAG,KAAK,qDAAqD;YAC3D,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YACxD,8FAA8F;YAC9F,oFAAoF,CACvF,CAAA;IACH,CAAC;AACH,CAAC","sourcesContent":["/**\n * The shape this rule needs, spelled out rather than imported.\n *\n * ActivitySearchKeyItem carries type-graphql decorators, and the test runner parses TypeScript by\n * stripping types — it reads neither a decorator nor an enum. Importing the declared class pulls\n * type-graphql in and the whole test file fails to load, which is what happened when this module\n * first imported it (2026-09-09). A rule about a field's text needs only the field.\n */\ntype SearchKeyDeclaration = { inputKey?: string }\n\n/**\n * How many search keys an activity may declare.\n *\n * fillActivitySearchKeys writes each one to `key0${index + 1}` on the instance, and the instance has\n * key01 through key05 — five columns, no more. The function has no ceiling, so a sixth key writes to\n * key06, a column that does not exist. A spread save drops a field it does not recognise and reports\n * success, which means the declaration looks accepted, the value is never stored, and searching on\n * that axis answers zero rows with no error anywhere.\n *\n * Nothing declares six today: twelve declarations across four repositories, the largest three\n * (measured 2026-09-09). This refusal is what keeps the seventh one from being the first to find\n * out.\n */\nexport const MOST_SEARCH_KEYS = 5\n\n/**\n * Why a dotted key cannot work here.\n *\n * fillActivitySearchKeys reads `input[key.inputKey]` — one top-level key, and an array is indexed by\n * its first element because the value goes into a searchable column. A dot in that name looks up a\n * property literally called \"shift.passes\", finds nothing, and the axis is quietly left unfilled.\n *\n * ActivityDecisionKeyItem.inputPath is the field that does take a path, because it points at a value\n * to draw rather than one to index. The two names are different so that using the wrong one is\n * visible rather than silent. (2026-09-09, architect's ruling)\n */\nexport function assertSearchKeysAreUsable(searchKeys: SearchKeyDeclaration[] | undefined, activityName?: string): void {\n if (!searchKeys?.length) {\n return\n }\n\n const named = activityName ? `activity \"${activityName}\"` : 'this activity'\n\n if (searchKeys.length > MOST_SEARCH_KEYS) {\n throw new Error(\n `${named} declares ${searchKeys.length} search keys, and an activity instance has only ` +\n `${MOST_SEARCH_KEYS} columns to hold them (key01..key0${MOST_SEARCH_KEYS}). ` +\n `Keys past the ${MOST_SEARCH_KEYS}th would be dropped without an error and searching on ` +\n `them would answer zero rows.`\n )\n }\n\n const dotted = searchKeys.filter(key => String(key?.inputKey ?? '').includes('.'))\n\n if (dotted.length) {\n throw new Error(\n `${named} declares search keys whose inputKey holds a path: ` +\n `${dotted.map(key => `\"${key.inputKey}\"`).join(', ')}. ` +\n `A search key names one top-level key of the input, because its value goes into a searchable ` +\n `column. Use ActivityDecisionKeyItem.inputPath for a value nested inside the input.`\n )\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-instance-type.js","sourceRoot":"","sources":["../../../server/service/activity-instance/activity-instance-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,yDAAgD;AAChD,iDAA2E;AAG3E,yDAAoF;AACpF,iEAAiF;AAE1E,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CAkEjC,CAAA;AAlEY,sDAAqB;AAEhC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAA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AAE,CAAC;;qDACX;gCAnCJ,qBAAqB;IADjC,IAAA,wBAAS,GAAE;GACC,qBAAqB,CAoCjC;AAGM,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAMhC,CAAA;AANY,oDAAoB;AAE/B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,uCAAgB,CAAC,CAAC;;mDACT;AAGzB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;mDACN;+BALF,oBAAoB;IADhC,IAAA,yBAAU,GAAE;GACA,oBAAoB,CAMhC","sourcesContent":["import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { Role } from '@things-factory/auth-base'\nimport { ObjectRef, ScalarDate, ScalarObject } from '@things-factory/shell'\nimport { ApprovalLineItem } from '@things-factory/organization'\n\nimport { ActivityType, ActivityUIType, AssigneeItem } from '../activity/activity.js'\nimport { ActivityInstance, ActivityInstanceStatus } from './activity-instance.js'\n@InputType()\nexport class ActivityInstanceDraft {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field()\n name: string\n\n @Field({ nullable: true })\n activityId: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n priority?: number\n\n @Field({ nullable: true })\n reason?: string\n\n @Field(type => Int, { nullable: true })\n threadsMin?: number\n\n @Field(type => Int, { nullable: true })\n threadsMax?: number\n\n @Field(type => ScalarDate, { nullable: true })\n dueAt?: Date\n\n @Field(type => ScalarObject, { nullable: true })\n input?: { [key: string]: any }\n\n @Field(type => ScalarObject, { nullable: true })\n output?: { [key: string]: any }\n\n @Field({ nullable: true })\n adhocType?: string\n\n @Field({ nullable: true })\n refBy?: string\n\n @Field({ nullable: true })\n activityType?: ActivityType\n\n @Field({ nullable: true })\n uiType?: ActivityUIType\n\n @Field({ nullable: true })\n uiSource?: string\n\n @Field({ nullable: true })\n viewType?: ActivityUIType\n\n @Field({ nullable: true })\n viewSource?: string\n\n @Field(type => ObjectRef, { nullable: true })\n supervisoryRole?: Role\n\n @Field(type => ObjectRef, { nullable: true })\n assigneeRole?: Role\n\n @Field(type => ScalarObject, { nullable: true })\n assignees?: AssigneeItem[]\n\n @Field(type => ScalarObject, { nullable: true })\n approvalLine?: ApprovalLineItem[]\n}\n\n@InputType()\nexport class ActivityInstanceIssue {\n @Field(type => ID, { nullable: true })\n id?: string\n\n /**\n * 이 건은 **결재를 받아야 한다**고 내는 쪽이 말하는 자리.\n *\n * ── 왜 필요한가 ──────────────────────────────────────────────────────────\n * `startingType: 'post'` 는 낸 사람에게 스레드를 하나 만들고 곧바로 제출까지 간다. 결재선이 있으면\n * 거기서 상신되고, **없으면 그대로 끝난다.** 끝나면 완료 콜백이 돌아 업무가 확정된다.\n *\n * 그 거동 자체는 틀리지 않았다 — 결재 없이 내면 끝나는 일이 있다(작업 일지 같은 것). 문제는 **내는\n * 쪽이 「이건 결재를 받는다」고 믿고 냈는데 결재선이 비어 조용히 확정되는 경우**다. 오류도 없고\n * 흔적도 없어서, 승인 게이트가 있는 척만 하게 된다.\n *\n * 그래서 기대를 여기서 말한다. 말하지 않은 건은 아무것도 달라지지 않는다.\n *\n * ── 왜 내는 쪽에서 미리 보지 않고 여기서 보나 ────────────────────────────\n * 미리 봐도 되지만 그것만으로는 부족하다. 보고 나서 내기까지 사이에 누가 결재선을 비울 수 있다.\n * 내는 것과 같은 트랜잭션 안에서 보는 자리가 여기 하나뿐이다.\n */\n @Field({\n nullable: true,\n description: 'true when the caller expects this to go through an approval line — issuing fails if the line is empty'\n })\n requireApproval?: boolean\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n activityId?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n priority?: number\n\n @Field({ nullable: true })\n reason?: string\n\n @Field(type => Int, { nullable: true })\n threadsMin?: number\n\n @Field(type => Int, { nullable: true })\n threadsMax?: number\n\n @Field(type => ScalarDate, { nullable: true })\n dueAt?: Date\n\n @Field(type => ScalarObject, { nullable: true })\n input?: { [key: string]: any }\n\n @Field(type => ScalarObject, { nullable: true })\n output?: { [key: string]: any }\n\n @Field({ nullable: true })\n adhocType?: string\n\n @Field({ nullable: true })\n refBy?: string\n\n @Field({ nullable: true })\n activityType?: ActivityType\n\n @Field({ nullable: true })\n uiType?: ActivityUIType\n\n @Field({ nullable: true })\n uiSource?: string\n\n @Field({ nullable: true })\n viewType?: ActivityUIType\n\n @Field({ nullable: true })\n viewSource?: string\n\n @Field(type => ObjectRef, { nullable: true })\n supervisoryRole?: Role\n\n @Field(type => ObjectRef, { nullable: true })\n assigneeRole?: Role\n\n @Field(type => ScalarObject, { nullable: true })\n assignees?: AssigneeItem[]\n\n @Field(type => ScalarObject, { nullable: true })\n approvalLine?: ApprovalLineItem[]\n\n /** 반려하면 끝인가. 주지 않으면 액티비티의 선언을 따른다. */\n @Field({ nullable: true, description: 'true when a rejection closes this case for good' })\n rejectionIsFinal?: boolean\n}\n\n@InputType()\nexport class ActivityInstanceSave {\n @Field(type => ScalarObject, { nullable: true })\n output?: { [key: string]: any }\n\n @Field(type => ScalarObject, { nullable: true })\n assignees?: AssigneeItem[]\n\n @Field(type => ScalarObject, { nullable: true })\n approvalLine?: ApprovalLineItem[]\n}\n\n@InputType()\nexport class ActivityInstancePatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n priority?: number\n\n @Field({ nullable: true })\n state?: ActivityInstanceStatus\n\n @Field(type => Int, { nullable: true })\n threadsMin?: number\n\n @Field(type => Int, { nullable: true })\n threadsMax?: number\n\n @Field(type => ScalarDate, { nullable: true })\n dueAt?: Date\n\n @Field(type => ScalarObject, { nullable: true })\n input?: { [key: string]: any }\n\n @Field(type => ScalarObject, { nullable: true })\n assignees?: AssigneeItem[]\n\n @Field(type => ScalarObject, { nullable: true })\n approvalLine?: ApprovalLineItem[]\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class ActivityInstanceList {\n @Field(type => [ActivityInstance])\n items: ActivityInstance[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
1
|
+
{"version":3,"file":"activity-instance-type.js","sourceRoot":"","sources":["../../../server/service/activity-instance/activity-instance-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,yDAAgD;AAChD,iDAA2E;AAG3E,yDAAoF;AACpF,iEAAiF;AAE1E,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CAkEjC,CAAA;AAlEY,sDAAqB;AAEhC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDAC3B;AAGX;IADC,IAAA,oBAAK,GAAE;;mDACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACR;AAGlB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACT;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACX;AAGf;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACpB;AAGnB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACpB;AAGnB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACtC,IAAI;oDAAA;AAGZ;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,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AE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACtC,IAAI;oDAAA;AAGZ;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDAClB;AAG9B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACtB;AAc1B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DACf;AAGjC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACX;gCA9CJ,qBAAqB;IADjC,IAAA,wBAAS,GAAE;GACC,qBAAqB,CA+CjC;AAGM,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAMhC,CAAA;AANY,oDAAoB;AAE/B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,uCAAgB,CAAC,CAAC;;mDACT;AAGzB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;mDACN;+BALF,oBAAoB;IADhC,IAAA,yBAAU,GAAE;GACA,oBAAoB,CAMhC","sourcesContent":["import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { Role } from '@things-factory/auth-base'\nimport { ObjectRef, ScalarDate, ScalarObject } from '@things-factory/shell'\nimport { ApprovalLineItem } from '@things-factory/organization'\n\nimport { ActivityType, ActivityUIType, AssigneeItem } from '../activity/activity.js'\nimport { ActivityInstance, ActivityInstanceStatus } from './activity-instance.js'\n@InputType()\nexport class ActivityInstanceDraft {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field()\n name: string\n\n @Field({ nullable: true })\n activityId: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n priority?: number\n\n @Field({ nullable: true })\n reason?: string\n\n @Field(type => Int, { nullable: true })\n threadsMin?: number\n\n @Field(type => Int, { nullable: true })\n threadsMax?: number\n\n @Field(type => ScalarDate, { nullable: true })\n dueAt?: Date\n\n @Field(type => ScalarObject, { nullable: true })\n input?: { [key: string]: any }\n\n @Field(type => ScalarObject, { nullable: true })\n output?: { [key: string]: any }\n\n @Field({ nullable: true })\n adhocType?: string\n\n @Field({ nullable: true })\n refBy?: string\n\n @Field({ nullable: true })\n activityType?: ActivityType\n\n @Field({ nullable: true })\n uiType?: ActivityUIType\n\n @Field({ nullable: true })\n uiSource?: string\n\n @Field({ nullable: true })\n viewType?: ActivityUIType\n\n @Field({ nullable: true })\n viewSource?: string\n\n @Field(type => ObjectRef, { nullable: true })\n supervisoryRole?: Role\n\n @Field(type => ObjectRef, { nullable: true })\n assigneeRole?: Role\n\n @Field(type => ScalarObject, { nullable: true })\n assignees?: AssigneeItem[]\n\n @Field(type => ScalarObject, { nullable: true })\n approvalLine?: ApprovalLineItem[]\n}\n\n@InputType()\nexport class ActivityInstanceIssue {\n @Field(type => ID, { nullable: true })\n id?: string\n\n /**\n * 이 건은 **결재를 받아야 한다**고 내는 쪽이 말하는 자리.\n *\n * ── 왜 필요한가 ──────────────────────────────────────────────────────────\n * `startingType: 'post'` 는 낸 사람에게 스레드를 하나 만들고 곧바로 제출까지 간다. 결재선이 있으면\n * 거기서 상신되고, **없으면 그대로 끝난다.** 끝나면 완료 콜백이 돌아 업무가 확정된다.\n *\n * 그 거동 자체는 틀리지 않았다 — 결재 없이 내면 끝나는 일이 있다(작업 일지 같은 것). 문제는 **내는\n * 쪽이 「이건 결재를 받는다」고 믿고 냈는데 결재선이 비어 조용히 확정되는 경우**다. 오류도 없고\n * 흔적도 없어서, 승인 게이트가 있는 척만 하게 된다.\n *\n * 그래서 기대를 여기서 말한다. 말하지 않은 건은 아무것도 달라지지 않는다.\n *\n * ── 왜 내는 쪽에서 미리 보지 않고 여기서 보나 ────────────────────────────\n * 미리 봐도 되지만 그것만으로는 부족하다. 보고 나서 내기까지 사이에 누가 결재선을 비울 수 있다.\n * 내는 것과 같은 트랜잭션 안에서 보는 자리가 여기 하나뿐이다.\n */\n @Field({\n nullable: true,\n description: 'true when the caller expects this to go through an approval line — issuing fails if the line is empty'\n })\n requireApproval?: boolean\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n activityId?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n priority?: number\n\n @Field({ nullable: true })\n reason?: string\n\n @Field(type => Int, { nullable: true })\n threadsMin?: number\n\n @Field(type => Int, { nullable: true })\n threadsMax?: number\n\n @Field(type => ScalarDate, { nullable: true })\n dueAt?: Date\n\n @Field(type => ScalarObject, { nullable: true })\n input?: { [key: string]: any }\n\n @Field(type => ScalarObject, { nullable: true })\n output?: { [key: string]: any }\n\n @Field({ nullable: true })\n adhocType?: string\n\n @Field({ nullable: true })\n refBy?: string\n\n @Field({ nullable: true })\n activityType?: ActivityType\n\n @Field({ nullable: true })\n uiType?: ActivityUIType\n\n @Field({ nullable: true })\n uiSource?: string\n\n @Field({ nullable: true })\n viewType?: ActivityUIType\n\n @Field({ nullable: true })\n viewSource?: string\n\n @Field(type => ObjectRef, { nullable: true })\n supervisoryRole?: Role\n\n @Field(type => ObjectRef, { nullable: true })\n assigneeRole?: Role\n\n @Field(type => ScalarObject, { nullable: true })\n assignees?: AssigneeItem[]\n\n @Field(type => ScalarObject, { nullable: true })\n approvalLine?: ApprovalLineItem[]\n\n /** 반려하면 끝인가. 주지 않으면 액티비티의 선언을 따른다. */\n @Field({ nullable: true, description: 'true when a rejection closes this case for good' })\n rejectionIsFinal?: boolean\n}\n\n@InputType()\nexport class ActivityInstanceSave {\n @Field(type => ScalarObject, { nullable: true })\n output?: { [key: string]: any }\n\n @Field(type => ScalarObject, { nullable: true })\n assignees?: AssigneeItem[]\n\n /*\n * No mutation takes this input type today, which is what keeps a guarantee elsewhere standing:\n * approve() and reject() read the capacity of a seat off activityInstance.approvalLine, and that\n * holds only because the line cannot change after submission. The two mutations that do accept a\n * line — draftActivityInstance and issueActivityInstance — both refuse an instance whose state is\n * not Draft, and a Draft instance has no thread and so no approvals.\n *\n * Wiring this field to a mutation would let the line change while approvals are already standing\n * on it, so the line at judgment time would no longer be the line at submission time. Raise it\n * with the architect before doing so. (2026-09-09)\n */\n @Field(type => ScalarObject, { nullable: true })\n approvalLine?: ApprovalLineItem[]\n}\n\n@InputType()\nexport class ActivityInstancePatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n priority?: number\n\n @Field({ nullable: true })\n state?: ActivityInstanceStatus\n\n @Field(type => Int, { nullable: true })\n threadsMin?: number\n\n @Field(type => Int, { nullable: true })\n threadsMax?: number\n\n @Field(type => ScalarDate, { nullable: true })\n dueAt?: Date\n\n @Field(type => ScalarObject, { nullable: true })\n input?: { [key: string]: any }\n\n @Field(type => ScalarObject, { nullable: true })\n assignees?: AssigneeItem[]\n\n /*\n * No mutation takes this input type today, which is what keeps a guarantee elsewhere standing:\n * approve() and reject() read the capacity of a seat off activityInstance.approvalLine, and that\n * holds only because the line cannot change after submission. The two mutations that do accept a\n * line — draftActivityInstance and issueActivityInstance — both refuse an instance whose state is\n * not Draft, and a Draft instance has no thread and so no approvals.\n *\n * Wiring this field to a mutation would let the line change while approvals are already standing\n * on it, so the line at judgment time would no longer be the line at submission time. Raise it\n * with the architect before doing so. (2026-09-09)\n */\n @Field(type => ScalarObject, { nullable: true })\n approvalLine?: ApprovalLineItem[]\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class ActivityInstanceList {\n @Field(type => [ActivityInstance])\n items: ActivityInstance[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -6,5 +6,5 @@ import { ActivityInstanceHistoryQuery } from "./activity-instance-history-query.
|
|
|
6
6
|
import { ActivityInstanceSubscription } from "./activity-instance-subscription.js";
|
|
7
7
|
import { ActivityInstanceHistoryEntitySubscriber, ActivityInstanceSubscriber } from "./event-subscriber.js";
|
|
8
8
|
export declare const entities: (typeof ActivityInstance | typeof ActivityInstanceHistory)[];
|
|
9
|
-
export declare const resolvers: (typeof
|
|
9
|
+
export declare const resolvers: (typeof ActivityInstanceQuery | typeof ActivityInstanceMutation | typeof ActivityInstanceSubscription | typeof ActivityInstanceHistoryQuery)[];
|
|
10
10
|
export declare const subscribers: (typeof ActivityInstanceSubscriber | typeof ActivityInstanceHistoryEntitySubscriber)[];
|
|
@@ -4,5 +4,5 @@ import { ActivityTemplateMutation } from "./activity-template-mutation.js";
|
|
|
4
4
|
import { ActivityTemplateQuery } from "./activity-template-query.js";
|
|
5
5
|
import { ActivityTemplateHistoryEntitySubscriber } from "./event-subscriber.js";
|
|
6
6
|
export declare const entities: (typeof ActivityTemplate | typeof ActivityTemplateHistory)[];
|
|
7
|
-
export declare const resolvers: (typeof
|
|
7
|
+
export declare const resolvers: (typeof ActivityTemplateQuery | typeof ActivityTemplateMutation)[];
|
|
8
8
|
export declare const subscribers: (typeof ActivityTemplateHistoryEntitySubscriber)[];
|
|
@@ -6,5 +6,5 @@ import { ActivityThreadHistoryQuery } from "./activity-thread-history-query.js";
|
|
|
6
6
|
import { ActivityThreadSubscription } from "./activity-thread-subscription.js";
|
|
7
7
|
import { ActivityThreadHistoryEntitySubscriber, ActivityThreadSubscriber } from "./event-subscriber.js";
|
|
8
8
|
export declare const entities: (typeof ActivityThread | typeof ActivityThreadHistory)[];
|
|
9
|
-
export declare const resolvers: (typeof
|
|
9
|
+
export declare const resolvers: (typeof ActivityThreadQuery | typeof ActivityThreadHistoryQuery | typeof ActivityThreadMutation | typeof ActivityThreadSubscription)[];
|
|
10
10
|
export declare const subscribers: (typeof ActivityThreadSubscriber | typeof ActivityThreadHistoryEntitySubscriber)[];
|
|
@@ -5,8 +5,8 @@ export * from './activity-instance/activity-instance.js';
|
|
|
5
5
|
export * from './activity/activity.js';
|
|
6
6
|
export * from './installable-activity/installable-activity.js';
|
|
7
7
|
export * from './activity-summary/activity-summary.js';
|
|
8
|
-
export declare const entities: (typeof import("./activity/activity.js").
|
|
9
|
-
export declare const subscribers: (typeof import("./activity-
|
|
8
|
+
export declare const entities: (typeof import("./activity-instance/activity-instance.js").ActivityInstance | typeof import("./activity-instance/activity-instance-history.js").ActivityInstanceHistory | typeof import("./activity-approval/activity-approval.js").ActivityApproval | typeof import("./activity/activity.js").Activity | typeof import("./activity/activity-history.js").ActivityHistory | typeof import("./activity-template/activity-template.js").ActivityTemplate | typeof import("./activity-template/activity-template-history.js").ActivityTemplateHistory | typeof import("./activity-thread/activity-thread.js").ActivityThread | typeof import("./activity-thread/activity-thread-history.js").ActivityThreadHistory | typeof import("./installable-activity/installable-activity.js").InstallableActivity | typeof import("./activity-summary/activity-summary.js").ActivitySummary)[];
|
|
9
|
+
export declare const subscribers: (typeof import("./activity-instance/event-subscriber.js").ActivityInstanceSubscriber | typeof import("./activity-instance/event-subscriber.js").ActivityInstanceHistoryEntitySubscriber | typeof import("./activity-approval/event-subscriber.js").ActivityApprovalSubscriber | typeof import("./activity/event-subscriber.js").ActivityHistoryEntitySubscriber | typeof import("./activity/declaration-guard-subscriber.js").ActivityDeclarationGuardSubscriber | typeof import("./activity-thread/event-subscriber.js").ActivityThreadSubscriber | typeof import("./activity-thread/event-subscriber.js").ActivityThreadHistoryEntitySubscriber)[];
|
|
10
10
|
export declare const schema: {
|
|
11
|
-
resolverClasses: (typeof import("./activity-
|
|
11
|
+
resolverClasses: (typeof import("./activity-instance/activity-instance-query.js").ActivityInstanceQuery | typeof import("./activity-instance/activity-instance-mutation.js").ActivityInstanceMutation | typeof import("./activity-instance/activity-instance-subscription.js").ActivityInstanceSubscription | typeof import("./activity-instance/activity-instance-history-query.js").ActivityInstanceHistoryQuery | typeof import("./activity-stats/activity-stats-query.js").ActivityStatsQuery | typeof import("./activity-approval/activity-approval-query.js").ActivityApprovalQuery | typeof import("./activity-approval/activity-approval-mutation.js").ActivityApprovalMutation | typeof import("./activity-approval/activity-approval-subscription.js").ActivityApprovalSubscription | typeof import("./activity/activity-query.js").ActivityQuery | typeof import("./activity/activity-mutation.js").ActivityMutation | typeof import("./activity-template/activity-template-query.js").ActivityTemplateQuery | typeof import("./activity-template/activity-template-mutation.js").ActivityTemplateMutation | typeof import("./activity-thread/activity-thread-query.js").ActivityThreadQuery | typeof import("./activity-thread/activity-thread-history-query.js").ActivityThreadHistoryQuery | typeof import("./activity-thread/activity-thread-mutation.js").ActivityThreadMutation | typeof import("./activity-thread/activity-thread-subscription.js").ActivityThreadSubscription | typeof import("./installable-activity/installable-activity-query.js").InstallableActivityQuery | typeof import("./installable-activity/installable-activity-mutation.js").InstallableActivityMutation | typeof import("./activity-summary/activity-summary-query.js").ActivitySummaryQuery)[];
|
|
12
12
|
};
|
|
@@ -13,10 +13,32 @@ let InstallableActivityMutation = class InstallableActivityMutation {
|
|
|
13
13
|
* 세우는 방법은 `installActivity` 한 벌만 갖는다 — 화면에서 누르는 것과 앱이 기동할 때 세우는 것이
|
|
14
14
|
* 서로 다른 코드를 타면 언젠가 갈라지고, 그때 「화면으로 세운 것만 되는」 결함이 된다.
|
|
15
15
|
*/
|
|
16
|
+
/*
|
|
17
|
+
* Authorization (2026-09-11)
|
|
18
|
+
*
|
|
19
|
+
* Both mutations here had no `@privilege` directive and no `checkAuthority` call inside, so any
|
|
20
|
+
* signed-in user of the domain could deactivate an activity. Deactivating one blocks the work it
|
|
21
|
+
* carries: with `OOC Review` (dataset) deactivated, that domain can no longer raise or process an
|
|
22
|
+
* out-of-control review.
|
|
23
|
+
*
|
|
24
|
+
* The pair is `activity:mutation`. These calls write this module's own `Activity` rows and grant
|
|
25
|
+
* no capability outside it, so one pair covers both. Seven existing declarations in this package
|
|
26
|
+
* already use that pair for creating, deleting and enabling the same entity, and both mutations
|
|
27
|
+
* return `Activity` rather than `Boolean`, which matches those seven rather than a light switch.
|
|
28
|
+
*
|
|
29
|
+
* `domainOwnerGranted: true` matches those seven as well. The people who actually call this are
|
|
30
|
+
* domain owners, and they pass without an explicit grant.
|
|
31
|
+
*
|
|
32
|
+
* This closes the door for the first time; it is not a rename, so there is no `legacy` alias to
|
|
33
|
+
* carry and no record of who was passing through while it was undeclared. If someone is blocked
|
|
34
|
+
* after this deploys, an administrator grants `activity:mutation` (the privilege row is created
|
|
35
|
+
* at boot).
|
|
36
|
+
*/
|
|
16
37
|
async activateInstallableActivity(name, context) {
|
|
17
38
|
const { domain, user, tx } = context.state;
|
|
18
39
|
return await (0, activity_installation_controller_js_1.installActivity)(name, domain, { manager: tx, user });
|
|
19
40
|
}
|
|
41
|
+
/* Same privilege pair as activating. Deactivating is the heavier of the two: it stops submissions. */
|
|
20
42
|
async deactivateInstallableActivity(name, context) {
|
|
21
43
|
const { domain, user, tx } = context.state;
|
|
22
44
|
const repository = tx.getRepository(activity_js_1.Activity);
|
|
@@ -37,6 +59,7 @@ let InstallableActivityMutation = class InstallableActivityMutation {
|
|
|
37
59
|
exports.InstallableActivityMutation = InstallableActivityMutation;
|
|
38
60
|
tslib_1.__decorate([
|
|
39
61
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
62
|
+
(0, type_graphql_1.Directive)('@privilege(category: "activity", privilege: "mutation", domainOwnerGranted: true)'),
|
|
40
63
|
(0, type_graphql_1.Mutation)(returns => activity_js_1.Activity, { description: 'To activate installable activity to Activity on given domain' }),
|
|
41
64
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
|
|
42
65
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
@@ -46,6 +69,7 @@ tslib_1.__decorate([
|
|
|
46
69
|
], InstallableActivityMutation.prototype, "activateInstallableActivity", null);
|
|
47
70
|
tslib_1.__decorate([
|
|
48
71
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
72
|
+
(0, type_graphql_1.Directive)('@privilege(category: "activity", privilege: "mutation", domainOwnerGranted: true)'),
|
|
49
73
|
(0, type_graphql_1.Mutation)(returns => activity_js_1.Activity, { description: 'To deactivate installable activity to Activity on given domain' }),
|
|
50
74
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
|
|
51
75
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|