@credo-ts/question-answer 0.6.1-pr-2091-20241119140918 → 0.6.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.
Files changed (118) hide show
  1. package/build/QuestionAnswerApi.d.mts +60 -0
  2. package/build/QuestionAnswerApi.d.mts.map +1 -0
  3. package/build/QuestionAnswerApi.mjs +97 -0
  4. package/build/QuestionAnswerApi.mjs.map +1 -0
  5. package/build/QuestionAnswerEvents.d.mts +19 -0
  6. package/build/QuestionAnswerEvents.d.mts.map +1 -0
  7. package/build/QuestionAnswerEvents.mjs +9 -0
  8. package/build/QuestionAnswerEvents.mjs.map +1 -0
  9. package/build/QuestionAnswerModule.d.mts +15 -0
  10. package/build/QuestionAnswerModule.d.mts.map +1 -0
  11. package/build/QuestionAnswerModule.mjs +38 -0
  12. package/build/QuestionAnswerModule.mjs.map +1 -0
  13. package/build/QuestionAnswerRole.d.mts +8 -0
  14. package/build/QuestionAnswerRole.d.mts.map +1 -0
  15. package/build/QuestionAnswerRole.mjs +10 -0
  16. package/build/QuestionAnswerRole.mjs.map +1 -0
  17. package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorate.mjs +10 -0
  18. package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateMetadata.mjs +7 -0
  19. package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateParam.mjs +9 -0
  20. package/build/handlers/AnswerMessageHandler.mjs +17 -0
  21. package/build/handlers/AnswerMessageHandler.mjs.map +1 -0
  22. package/build/handlers/QuestionMessageHandler.mjs +17 -0
  23. package/build/handlers/QuestionMessageHandler.mjs.map +1 -0
  24. package/build/handlers/index.mjs +2 -0
  25. package/build/index.d.mts +15 -0
  26. package/build/index.mjs +16 -0
  27. package/build/messages/AnswerMessage.d.mts +21 -0
  28. package/build/messages/AnswerMessage.d.mts.map +1 -0
  29. package/build/messages/AnswerMessage.mjs +33 -0
  30. package/build/messages/AnswerMessage.mjs.map +1 -0
  31. package/build/messages/QuestionMessage.d.mts +29 -0
  32. package/build/messages/QuestionMessage.d.mts.map +1 -0
  33. package/build/messages/QuestionMessage.mjs +61 -0
  34. package/build/messages/QuestionMessage.mjs.map +1 -0
  35. package/build/messages/index.d.mts +2 -0
  36. package/build/messages/index.mjs +2 -0
  37. package/build/models/QuestionAnswerState.d.mts +15 -0
  38. package/build/models/QuestionAnswerState.d.mts.map +1 -0
  39. package/build/models/QuestionAnswerState.mjs +17 -0
  40. package/build/models/QuestionAnswerState.mjs.map +1 -0
  41. package/build/models/ValidResponse.d.mts +8 -0
  42. package/build/models/ValidResponse.d.mts.map +1 -0
  43. package/build/models/ValidResponse.mjs +10 -0
  44. package/build/models/ValidResponse.mjs.map +1 -0
  45. package/build/repository/QuestionAnswerRecord.d.mts +53 -0
  46. package/build/repository/QuestionAnswerRecord.d.mts.map +1 -0
  47. package/build/repository/QuestionAnswerRecord.mjs +44 -0
  48. package/build/repository/QuestionAnswerRecord.mjs.map +1 -0
  49. package/build/repository/QuestionAnswerRepository.d.mts +10 -0
  50. package/build/repository/QuestionAnswerRepository.d.mts.map +1 -0
  51. package/build/repository/QuestionAnswerRepository.mjs +22 -0
  52. package/build/repository/QuestionAnswerRepository.mjs.map +1 -0
  53. package/build/repository/index.d.mts +2 -0
  54. package/build/repository/index.mjs +2 -0
  55. package/build/services/QuestionAnswerService.d.mts +116 -0
  56. package/build/services/QuestionAnswerService.d.mts.map +1 -0
  57. package/build/services/QuestionAnswerService.mjs +239 -0
  58. package/build/services/QuestionAnswerService.mjs.map +1 -0
  59. package/build/services/index.d.mts +1 -0
  60. package/build/services/index.mjs +1 -0
  61. package/package.json +16 -15
  62. package/build/QuestionAnswerApi.d.ts +0 -53
  63. package/build/QuestionAnswerApi.js +0 -106
  64. package/build/QuestionAnswerApi.js.map +0 -1
  65. package/build/QuestionAnswerEvents.d.ts +0 -13
  66. package/build/QuestionAnswerEvents.js +0 -8
  67. package/build/QuestionAnswerEvents.js.map +0 -1
  68. package/build/QuestionAnswerModule.d.ts +0 -9
  69. package/build/QuestionAnswerModule.js +0 -29
  70. package/build/QuestionAnswerModule.js.map +0 -1
  71. package/build/QuestionAnswerRole.d.ts +0 -4
  72. package/build/QuestionAnswerRole.js +0 -9
  73. package/build/QuestionAnswerRole.js.map +0 -1
  74. package/build/handlers/AnswerMessageHandler.d.ts +0 -9
  75. package/build/handlers/AnswerMessageHandler.js +0 -15
  76. package/build/handlers/AnswerMessageHandler.js.map +0 -1
  77. package/build/handlers/QuestionMessageHandler.d.ts +0 -9
  78. package/build/handlers/QuestionMessageHandler.js +0 -15
  79. package/build/handlers/QuestionMessageHandler.js.map +0 -1
  80. package/build/handlers/index.d.ts +0 -2
  81. package/build/handlers/index.js +0 -19
  82. package/build/handlers/index.js.map +0 -1
  83. package/build/index.d.ts +0 -8
  84. package/build/index.js +0 -25
  85. package/build/index.js.map +0 -1
  86. package/build/messages/AnswerMessage.d.ts +0 -15
  87. package/build/messages/AnswerMessage.js +0 -42
  88. package/build/messages/AnswerMessage.js.map +0 -1
  89. package/build/messages/QuestionMessage.d.ts +0 -23
  90. package/build/messages/QuestionMessage.js +0 -70
  91. package/build/messages/QuestionMessage.js.map +0 -1
  92. package/build/messages/index.d.ts +0 -2
  93. package/build/messages/index.js +0 -19
  94. package/build/messages/index.js.map +0 -1
  95. package/build/models/QuestionAnswerState.d.ts +0 -11
  96. package/build/models/QuestionAnswerState.js +0 -16
  97. package/build/models/QuestionAnswerState.js.map +0 -1
  98. package/build/models/ValidResponse.d.ts +0 -4
  99. package/build/models/ValidResponse.js +0 -12
  100. package/build/models/ValidResponse.js.map +0 -1
  101. package/build/models/index.d.ts +0 -2
  102. package/build/models/index.js +0 -19
  103. package/build/models/index.js.map +0 -1
  104. package/build/repository/QuestionAnswerRecord.d.ts +0 -48
  105. package/build/repository/QuestionAnswerRecord.js +0 -44
  106. package/build/repository/QuestionAnswerRecord.js.map +0 -1
  107. package/build/repository/QuestionAnswerRepository.d.ts +0 -5
  108. package/build/repository/QuestionAnswerRepository.js +0 -29
  109. package/build/repository/QuestionAnswerRepository.js.map +0 -1
  110. package/build/repository/index.d.ts +0 -2
  111. package/build/repository/index.js +0 -19
  112. package/build/repository/index.js.map +0 -1
  113. package/build/services/QuestionAnswerService.d.ts +0 -107
  114. package/build/services/QuestionAnswerService.js +0 -234
  115. package/build/services/QuestionAnswerService.js.map +0 -1
  116. package/build/services/index.d.ts +0 -1
  117. package/build/services/index.js +0 -18
  118. package/build/services/index.js.map +0 -1
@@ -1,11 +0,0 @@
1
- /**
2
- * QuestionAnswer states inferred from RFC 0113.
3
- *
4
- * @see https://github.com/hyperledger/aries-rfcs/blob/main/features/0113-question-answer/README.md
5
- */
6
- export declare enum QuestionAnswerState {
7
- QuestionSent = "question-sent",
8
- QuestionReceived = "question-received",
9
- AnswerReceived = "answer-received",
10
- AnswerSent = "answer-sent"
11
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QuestionAnswerState = void 0;
4
- /**
5
- * QuestionAnswer states inferred from RFC 0113.
6
- *
7
- * @see https://github.com/hyperledger/aries-rfcs/blob/main/features/0113-question-answer/README.md
8
- */
9
- var QuestionAnswerState;
10
- (function (QuestionAnswerState) {
11
- QuestionAnswerState["QuestionSent"] = "question-sent";
12
- QuestionAnswerState["QuestionReceived"] = "question-received";
13
- QuestionAnswerState["AnswerReceived"] = "answer-received";
14
- QuestionAnswerState["AnswerSent"] = "answer-sent";
15
- })(QuestionAnswerState || (exports.QuestionAnswerState = QuestionAnswerState = {}));
16
- //# sourceMappingURL=QuestionAnswerState.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QuestionAnswerState.js","sourceRoot":"","sources":["../../src/models/QuestionAnswerState.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,qDAA8B,CAAA;IAC9B,6DAAsC,CAAA;IACtC,yDAAkC,CAAA;IAClC,iDAA0B,CAAA;AAC5B,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B"}
@@ -1,4 +0,0 @@
1
- export declare class ValidResponse {
2
- constructor(options: ValidResponse);
3
- text: string;
4
- }
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ValidResponse = void 0;
4
- class ValidResponse {
5
- constructor(options) {
6
- if (options) {
7
- this.text = options.text;
8
- }
9
- }
10
- }
11
- exports.ValidResponse = ValidResponse;
12
- //# sourceMappingURL=ValidResponse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ValidResponse.js","sourceRoot":"","sources":["../../src/models/ValidResponse.ts"],"names":[],"mappings":";;;AAAA,MAAa,aAAa;IACxB,YAAmB,OAAsB;QACvC,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAA;QAC1B,CAAC;IACH,CAAC;CAGF;AARD,sCAQC"}
@@ -1,2 +0,0 @@
1
- export * from './QuestionAnswerState';
2
- export * from './ValidResponse';
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./QuestionAnswerState"), exports);
18
- __exportStar(require("./ValidResponse"), exports);
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAqC;AACrC,kDAA+B"}
@@ -1,48 +0,0 @@
1
- import type { QuestionAnswerRole } from '../QuestionAnswerRole';
2
- import type { QuestionAnswerState, ValidResponse } from '../models';
3
- import type { RecordTags, TagsBase } from '@credo-ts/core';
4
- import { BaseRecord } from '@credo-ts/core';
5
- export type CustomQuestionAnswerTags = TagsBase;
6
- export type DefaultQuestionAnswerTags = {
7
- connectionId: string;
8
- role: QuestionAnswerRole;
9
- state: QuestionAnswerState;
10
- threadId: string;
11
- };
12
- export type QuestionAnswerTags = RecordTags<QuestionAnswerRecord>;
13
- export interface QuestionAnswerStorageProps {
14
- id?: string;
15
- createdAt?: Date;
16
- connectionId: string;
17
- role: QuestionAnswerRole;
18
- signatureRequired: boolean;
19
- state: QuestionAnswerState;
20
- tags?: CustomQuestionAnswerTags;
21
- threadId: string;
22
- questionText: string;
23
- questionDetail?: string;
24
- validResponses: ValidResponse[];
25
- response?: string;
26
- }
27
- export declare class QuestionAnswerRecord extends BaseRecord<DefaultQuestionAnswerTags, CustomQuestionAnswerTags> {
28
- questionText: string;
29
- questionDetail?: string;
30
- validResponses: ValidResponse[];
31
- connectionId: string;
32
- role: QuestionAnswerRole;
33
- signatureRequired: boolean;
34
- state: QuestionAnswerState;
35
- threadId: string;
36
- response?: string;
37
- static readonly type = "QuestionAnswerRecord";
38
- readonly type = "QuestionAnswerRecord";
39
- constructor(props: QuestionAnswerStorageProps);
40
- getTags(): {
41
- connectionId: string;
42
- role: QuestionAnswerRole;
43
- state: QuestionAnswerState;
44
- threadId: string;
45
- };
46
- assertRole(expectedRole: QuestionAnswerRole): void;
47
- assertState(expectedStates: QuestionAnswerState | QuestionAnswerState[]): void;
48
- }
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QuestionAnswerRecord = void 0;
4
- const core_1 = require("@credo-ts/core");
5
- class QuestionAnswerRecord extends core_1.BaseRecord {
6
- constructor(props) {
7
- var _a, _b, _c;
8
- super();
9
- this.type = QuestionAnswerRecord.type;
10
- if (props) {
11
- this.id = (_a = props.id) !== null && _a !== void 0 ? _a : core_1.utils.uuid();
12
- this.createdAt = (_b = props.createdAt) !== null && _b !== void 0 ? _b : new Date();
13
- this.questionText = props.questionText;
14
- this.questionDetail = props.questionDetail;
15
- this.validResponses = props.validResponses;
16
- this.connectionId = props.connectionId;
17
- this._tags = (_c = props.tags) !== null && _c !== void 0 ? _c : {};
18
- this.role = props.role;
19
- this.signatureRequired = props.signatureRequired;
20
- this.state = props.state;
21
- this.threadId = props.threadId;
22
- this.response = props.response;
23
- }
24
- }
25
- getTags() {
26
- return Object.assign(Object.assign({}, this._tags), { connectionId: this.connectionId, role: this.role, state: this.state, threadId: this.threadId });
27
- }
28
- assertRole(expectedRole) {
29
- if (this.role !== expectedRole) {
30
- throw new core_1.CredoError(`Invalid question answer record role ${this.role}, expected is ${expectedRole}.`);
31
- }
32
- }
33
- assertState(expectedStates) {
34
- if (!Array.isArray(expectedStates)) {
35
- expectedStates = [expectedStates];
36
- }
37
- if (!expectedStates.includes(this.state)) {
38
- throw new core_1.CredoError(`Question answer record is in invalid state ${this.state}. Valid states are: ${expectedStates.join(', ')}.`);
39
- }
40
- }
41
- }
42
- exports.QuestionAnswerRecord = QuestionAnswerRecord;
43
- QuestionAnswerRecord.type = 'QuestionAnswerRecord';
44
- //# sourceMappingURL=QuestionAnswerRecord.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QuestionAnswerRecord.js","sourceRoot":"","sources":["../../src/repository/QuestionAnswerRecord.ts"],"names":[],"mappings":";;;AAIA,yCAA8D;AA6B9D,MAAa,oBAAqB,SAAQ,iBAA+D;IAcvG,YAAmB,KAAiC;;QAClD,KAAK,EAAE,CAAA;QAHO,SAAI,GAAG,oBAAoB,CAAC,IAAI,CAAA;QAK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,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;YACnC,cAAc,GAAG,CAAC,cAAc,CAAC,CAAA;QACnC,CAAC;QAED,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,iBAAU,CAClB,8CAA8C,IAAI,CAAC,KAAK,uBAAuB,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAC5G,CAAA;QACH,CAAC;IACH,CAAC;;AA3DH,oDA4DC;AAjDwB,yBAAI,GAAG,sBAAsB,AAAzB,CAAyB"}
@@ -1,5 +0,0 @@
1
- import { EventEmitter, Repository, StorageService } from '@credo-ts/core';
2
- import { QuestionAnswerRecord } from './QuestionAnswerRecord';
3
- export declare class QuestionAnswerRepository extends Repository<QuestionAnswerRecord> {
4
- constructor(storageService: StorageService<QuestionAnswerRecord>, eventEmitter: EventEmitter);
5
- }
@@ -1,29 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.QuestionAnswerRepository = void 0;
16
- const core_1 = require("@credo-ts/core");
17
- const QuestionAnswerRecord_1 = require("./QuestionAnswerRecord");
18
- let QuestionAnswerRepository = class QuestionAnswerRepository extends core_1.Repository {
19
- constructor(storageService, eventEmitter) {
20
- super(QuestionAnswerRecord_1.QuestionAnswerRecord, storageService, eventEmitter);
21
- }
22
- };
23
- exports.QuestionAnswerRepository = QuestionAnswerRepository;
24
- exports.QuestionAnswerRepository = QuestionAnswerRepository = __decorate([
25
- (0, core_1.injectable)(),
26
- __param(0, (0, core_1.inject)(core_1.InjectionSymbols.StorageService)),
27
- __metadata("design:paramtypes", [Object, core_1.EventEmitter])
28
- ], QuestionAnswerRepository);
29
- //# sourceMappingURL=QuestionAnswerRepository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QuestionAnswerRepository.js","sourceRoot":"","sources":["../../src/repository/QuestionAnswerRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,yCAA+G;AAE/G,iEAA6D;AAGtD,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,iBAAgC;IAC5E,YAC2C,cAAoD,EAC7F,YAA0B;QAE1B,KAAK,CAAC,2CAAoB,EAAE,cAAc,EAAE,YAAY,CAAC,CAAA;IAC3D,CAAC;CACF,CAAA;AAPY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,iBAAU,GAAE;IAGR,WAAA,IAAA,aAAM,EAAC,uBAAgB,CAAC,cAAc,CAAC,CAAA;6CAC1B,mBAAY;GAHjB,wBAAwB,CAOpC"}
@@ -1,2 +0,0 @@
1
- export * from './QuestionAnswerRecord';
2
- export * from './QuestionAnswerRepository';
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./QuestionAnswerRecord"), exports);
18
- __exportStar(require("./QuestionAnswerRepository"), exports);
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/repository/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAsC;AACtC,6DAA0C"}
@@ -1,107 +0,0 @@
1
- import type { ValidResponse } from '../models';
2
- import type { AgentContext, InboundMessageContext, Query, QueryOptions } from '@credo-ts/core';
3
- import { EventEmitter, Logger } from '@credo-ts/core';
4
- import { AnswerMessage, QuestionMessage } from '../messages';
5
- import { QuestionAnswerRepository, QuestionAnswerRecord } from '../repository';
6
- export declare class QuestionAnswerService {
7
- private questionAnswerRepository;
8
- private eventEmitter;
9
- private logger;
10
- constructor(questionAnswerRepository: QuestionAnswerRepository, eventEmitter: EventEmitter, logger: Logger);
11
- /**
12
- * Create a question message and a new QuestionAnswer record for the questioner role
13
- *
14
- * @param question text for question message
15
- * @param details optional details for question message
16
- * @param connectionId connection for QuestionAnswer record
17
- * @param validResponses array of valid responses for question
18
- * @returns question message and QuestionAnswer record
19
- */
20
- createQuestion(agentContext: AgentContext, connectionId: string, config: {
21
- question: string;
22
- validResponses: ValidResponse[];
23
- detail?: string;
24
- }): Promise<{
25
- questionMessage: QuestionMessage;
26
- questionAnswerRecord: QuestionAnswerRecord;
27
- }>;
28
- /**
29
- * receive question message and create record for responder role
30
- *
31
- * @param messageContext the message context containing a question message
32
- * @returns QuestionAnswer record
33
- */
34
- processReceiveQuestion(messageContext: InboundMessageContext<QuestionMessage>): Promise<QuestionAnswerRecord>;
35
- /**
36
- * create answer message, check that response is valid
37
- *
38
- * @param questionAnswerRecord record containing question and valid responses
39
- * @param response response used in answer message
40
- * @returns answer message and QuestionAnswer record
41
- */
42
- createAnswer(agentContext: AgentContext, questionAnswerRecord: QuestionAnswerRecord, response: string): Promise<{
43
- answerMessage: AnswerMessage;
44
- questionAnswerRecord: QuestionAnswerRecord;
45
- }>;
46
- /**
47
- * receive answer as questioner
48
- *
49
- * @param messageContext the message context containing an answer message message
50
- * @returns QuestionAnswer record
51
- */
52
- receiveAnswer(messageContext: InboundMessageContext<AnswerMessage>): Promise<QuestionAnswerRecord>;
53
- /**
54
- * Update the record to a new state and emit an state changed event. Also updates the record
55
- * in storage.
56
- *
57
- * @param questionAnswerRecord The question answer record to update the state for
58
- * @param newState The state to update to
59
- *
60
- */
61
- private updateState;
62
- private createRecord;
63
- /**
64
- * Retrieve a question answer record by connection id and thread id
65
- *
66
- * @param connectionId The connection id
67
- * @param threadId The thread id
68
- * @throws {RecordNotFoundError} If no record is found
69
- * @throws {RecordDuplicateError} If multiple records are found
70
- * @returns The question answer record
71
- */
72
- getByThreadAndConnectionId(agentContext: AgentContext, connectionId: string, threadId: string): Promise<QuestionAnswerRecord>;
73
- /**
74
- * Retrieve a question answer record by thread id
75
- *
76
- * @param connectionId The connection id
77
- * @param threadId The thread id
78
- * @returns The question answer record or null if not found
79
- */
80
- findByThreadAndConnectionId(agentContext: AgentContext, connectionId: string, threadId: string): Promise<QuestionAnswerRecord | null>;
81
- /**
82
- * Retrieve a question answer record by id
83
- *
84
- * @param questionAnswerId The questionAnswer record id
85
- * @throws {RecordNotFoundError} If no record is found
86
- * @return The question answer record
87
- *
88
- */
89
- getById(agentContext: AgentContext, questionAnswerId: string): Promise<QuestionAnswerRecord>;
90
- /**
91
- * Retrieve a question answer record by id
92
- *
93
- * @param questionAnswerId The questionAnswer record id
94
- * @return The question answer record or null if not found
95
- *
96
- */
97
- findById(agentContext: AgentContext, questionAnswerId: string): Promise<QuestionAnswerRecord | null>;
98
- /**
99
- * Retrieve a question answer record by id
100
- *
101
- * @param questionAnswerId The questionAnswer record id
102
- * @return The question answer record or null if not found
103
- *
104
- */
105
- getAll(agentContext: AgentContext): Promise<QuestionAnswerRecord[]>;
106
- findAllByQuery(agentContext: AgentContext, query: Query<QuestionAnswerRecord>, queryOptions?: QueryOptions): Promise<QuestionAnswerRecord[]>;
107
- }
@@ -1,234 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.QuestionAnswerService = void 0;
16
- const core_1 = require("@credo-ts/core");
17
- const QuestionAnswerEvents_1 = require("../QuestionAnswerEvents");
18
- const QuestionAnswerRole_1 = require("../QuestionAnswerRole");
19
- const messages_1 = require("../messages");
20
- const models_1 = require("../models");
21
- const repository_1 = require("../repository");
22
- let QuestionAnswerService = class QuestionAnswerService {
23
- constructor(questionAnswerRepository, eventEmitter, logger) {
24
- this.questionAnswerRepository = questionAnswerRepository;
25
- this.eventEmitter = eventEmitter;
26
- this.logger = logger;
27
- }
28
- /**
29
- * Create a question message and a new QuestionAnswer record for the questioner role
30
- *
31
- * @param question text for question message
32
- * @param details optional details for question message
33
- * @param connectionId connection for QuestionAnswer record
34
- * @param validResponses array of valid responses for question
35
- * @returns question message and QuestionAnswer record
36
- */
37
- async createQuestion(agentContext, connectionId, config) {
38
- const questionMessage = new messages_1.QuestionMessage({
39
- questionText: config.question,
40
- questionDetail: config === null || config === void 0 ? void 0 : config.detail,
41
- signatureRequired: false,
42
- validResponses: config.validResponses,
43
- });
44
- const questionAnswerRecord = await this.createRecord({
45
- questionText: questionMessage.questionText,
46
- questionDetail: questionMessage.questionDetail,
47
- threadId: questionMessage.threadId,
48
- connectionId: connectionId,
49
- role: QuestionAnswerRole_1.QuestionAnswerRole.Questioner,
50
- signatureRequired: false,
51
- state: models_1.QuestionAnswerState.QuestionSent,
52
- validResponses: questionMessage.validResponses,
53
- });
54
- await this.questionAnswerRepository.save(agentContext, questionAnswerRecord);
55
- this.eventEmitter.emit(agentContext, {
56
- type: QuestionAnswerEvents_1.QuestionAnswerEventTypes.QuestionAnswerStateChanged,
57
- payload: { previousState: null, questionAnswerRecord },
58
- });
59
- return { questionMessage, questionAnswerRecord };
60
- }
61
- /**
62
- * receive question message and create record for responder role
63
- *
64
- * @param messageContext the message context containing a question message
65
- * @returns QuestionAnswer record
66
- */
67
- async processReceiveQuestion(messageContext) {
68
- const { message: questionMessage } = messageContext;
69
- this.logger.debug(`Receiving question message with id ${questionMessage.id}`);
70
- const connection = messageContext.assertReadyConnection();
71
- const questionRecord = await this.findByThreadAndConnectionId(messageContext.agentContext, connection.id, questionMessage.id);
72
- if (questionRecord) {
73
- throw new core_1.CredoError(`Question answer record with thread Id ${questionMessage.id} already exists.`);
74
- }
75
- const questionAnswerRecord = await this.createRecord({
76
- questionText: questionMessage.questionText,
77
- questionDetail: questionMessage.questionDetail,
78
- connectionId: connection === null || connection === void 0 ? void 0 : connection.id,
79
- threadId: questionMessage.threadId,
80
- role: QuestionAnswerRole_1.QuestionAnswerRole.Responder,
81
- signatureRequired: false,
82
- state: models_1.QuestionAnswerState.QuestionReceived,
83
- validResponses: questionMessage.validResponses,
84
- });
85
- await this.questionAnswerRepository.save(messageContext.agentContext, questionAnswerRecord);
86
- this.eventEmitter.emit(messageContext.agentContext, {
87
- type: QuestionAnswerEvents_1.QuestionAnswerEventTypes.QuestionAnswerStateChanged,
88
- payload: { previousState: null, questionAnswerRecord },
89
- });
90
- return questionAnswerRecord;
91
- }
92
- /**
93
- * create answer message, check that response is valid
94
- *
95
- * @param questionAnswerRecord record containing question and valid responses
96
- * @param response response used in answer message
97
- * @returns answer message and QuestionAnswer record
98
- */
99
- async createAnswer(agentContext, questionAnswerRecord, response) {
100
- const answerMessage = new messages_1.AnswerMessage({ response: response, threadId: questionAnswerRecord.threadId });
101
- questionAnswerRecord.assertState(models_1.QuestionAnswerState.QuestionReceived);
102
- questionAnswerRecord.response = response;
103
- if (questionAnswerRecord.validResponses.some((e) => e.text === response)) {
104
- await this.updateState(agentContext, questionAnswerRecord, models_1.QuestionAnswerState.AnswerSent);
105
- }
106
- else {
107
- throw new core_1.CredoError(`Response does not match valid responses`);
108
- }
109
- return { answerMessage, questionAnswerRecord };
110
- }
111
- /**
112
- * receive answer as questioner
113
- *
114
- * @param messageContext the message context containing an answer message message
115
- * @returns QuestionAnswer record
116
- */
117
- async receiveAnswer(messageContext) {
118
- const { message: answerMessage } = messageContext;
119
- this.logger.debug(`Receiving answer message with id ${answerMessage.id}`);
120
- const connection = messageContext.assertReadyConnection();
121
- const questionAnswerRecord = await this.findByThreadAndConnectionId(messageContext.agentContext, connection.id, answerMessage.threadId);
122
- if (!questionAnswerRecord) {
123
- throw new core_1.CredoError(`Question Answer record with thread Id ${answerMessage.threadId} not found.`);
124
- }
125
- questionAnswerRecord.assertState(models_1.QuestionAnswerState.QuestionSent);
126
- questionAnswerRecord.assertRole(QuestionAnswerRole_1.QuestionAnswerRole.Questioner);
127
- questionAnswerRecord.response = answerMessage.response;
128
- await this.updateState(messageContext.agentContext, questionAnswerRecord, models_1.QuestionAnswerState.AnswerReceived);
129
- return questionAnswerRecord;
130
- }
131
- /**
132
- * Update the record to a new state and emit an state changed event. Also updates the record
133
- * in storage.
134
- *
135
- * @param questionAnswerRecord The question answer record to update the state for
136
- * @param newState The state to update to
137
- *
138
- */
139
- async updateState(agentContext, questionAnswerRecord, newState) {
140
- const previousState = questionAnswerRecord.state;
141
- questionAnswerRecord.state = newState;
142
- await this.questionAnswerRepository.update(agentContext, questionAnswerRecord);
143
- this.eventEmitter.emit(agentContext, {
144
- type: QuestionAnswerEvents_1.QuestionAnswerEventTypes.QuestionAnswerStateChanged,
145
- payload: {
146
- previousState,
147
- questionAnswerRecord: questionAnswerRecord,
148
- },
149
- });
150
- }
151
- async createRecord(options) {
152
- const questionMessageRecord = new repository_1.QuestionAnswerRecord({
153
- questionText: options.questionText,
154
- questionDetail: options.questionDetail,
155
- connectionId: options.connectionId,
156
- threadId: options.threadId,
157
- role: options.role,
158
- signatureRequired: options.signatureRequired,
159
- state: options.state,
160
- validResponses: options.validResponses,
161
- });
162
- return questionMessageRecord;
163
- }
164
- /**
165
- * Retrieve a question answer record by connection id and thread id
166
- *
167
- * @param connectionId The connection id
168
- * @param threadId The thread id
169
- * @throws {RecordNotFoundError} If no record is found
170
- * @throws {RecordDuplicateError} If multiple records are found
171
- * @returns The question answer record
172
- */
173
- getByThreadAndConnectionId(agentContext, connectionId, threadId) {
174
- return this.questionAnswerRepository.getSingleByQuery(agentContext, {
175
- connectionId,
176
- threadId,
177
- });
178
- }
179
- /**
180
- * Retrieve a question answer record by thread id
181
- *
182
- * @param connectionId The connection id
183
- * @param threadId The thread id
184
- * @returns The question answer record or null if not found
185
- */
186
- findByThreadAndConnectionId(agentContext, connectionId, threadId) {
187
- return this.questionAnswerRepository.findSingleByQuery(agentContext, {
188
- connectionId,
189
- threadId,
190
- });
191
- }
192
- /**
193
- * Retrieve a question answer record by id
194
- *
195
- * @param questionAnswerId The questionAnswer record id
196
- * @throws {RecordNotFoundError} If no record is found
197
- * @return The question answer record
198
- *
199
- */
200
- getById(agentContext, questionAnswerId) {
201
- return this.questionAnswerRepository.getById(agentContext, questionAnswerId);
202
- }
203
- /**
204
- * Retrieve a question answer record by id
205
- *
206
- * @param questionAnswerId The questionAnswer record id
207
- * @return The question answer record or null if not found
208
- *
209
- */
210
- findById(agentContext, questionAnswerId) {
211
- return this.questionAnswerRepository.findById(agentContext, questionAnswerId);
212
- }
213
- /**
214
- * Retrieve a question answer record by id
215
- *
216
- * @param questionAnswerId The questionAnswer record id
217
- * @return The question answer record or null if not found
218
- *
219
- */
220
- getAll(agentContext) {
221
- return this.questionAnswerRepository.getAll(agentContext);
222
- }
223
- async findAllByQuery(agentContext, query, queryOptions) {
224
- return this.questionAnswerRepository.findByQuery(agentContext, query, queryOptions);
225
- }
226
- };
227
- exports.QuestionAnswerService = QuestionAnswerService;
228
- exports.QuestionAnswerService = QuestionAnswerService = __decorate([
229
- (0, core_1.injectable)(),
230
- __param(2, (0, core_1.inject)(core_1.InjectionSymbols.Logger)),
231
- __metadata("design:paramtypes", [repository_1.QuestionAnswerRepository,
232
- core_1.EventEmitter, Object])
233
- ], QuestionAnswerService);
234
- //# sourceMappingURL=QuestionAnswerService.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QuestionAnswerService.js","sourceRoot":"","sources":["../../src/services/QuestionAnswerService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAIA,yCAAuG;AAEvG,kEAAkE;AAClE,8DAA0D;AAC1D,0CAA4D;AAC5D,sCAA+C;AAC/C,8CAA8E;AAGvE,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAKhC,YACE,wBAAkD,EAClD,YAA0B,EACO,MAAc;QAE/C,IAAI,CAAC,wBAAwB,GAAG,wBAAwB,CAAA;QACxD,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IACD;;;;;;;;OAQG;IACI,KAAK,CAAC,cAAc,CACzB,YAA0B,EAC1B,YAAoB,EACpB,MAIC;QAED,MAAM,eAAe,GAAG,IAAI,0BAAe,CAAC;YAC1C,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AC;IAED;;;;;;;OAOG;IACI,OAAO,CAAC,YAA0B,EAAE,gBAAwB;QACjE,OAAO,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAA;IAC9E,CAAC;IAED;;;;;;OAMG;IACI,QAAQ,CAAC,YAA0B,EAAE,gBAAwB;QAClE,OAAO,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAA;IAC/E,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,YAA0B;QACtC,OAAO,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;IAC3D,CAAC;IAEM,KAAK,CAAC,cAAc,CACzB,YAA0B,EAC1B,KAAkC,EAClC,YAA2B;QAE3B,OAAO,IAAI,CAAC,wBAAwB,CAAC,WAAW,CAAC,YAAY,EAAE,KAAK,EAAE,YAAY,CAAC,CAAA;IACrF,CAAC;CACF,CAAA;AA5RY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,iBAAU,GAAE;IASR,WAAA,IAAA,aAAM,EAAC,uBAAgB,CAAC,MAAM,CAAC,CAAA;qCAFN,qCAAwB;QACpC,mBAAY;GAPjB,qBAAqB,CA4RjC"}
@@ -1 +0,0 @@
1
- export * from './QuestionAnswerService';
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./QuestionAnswerService"), exports);
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAuC"}