* Answer a `confirm_required` frame. `accept=true` resumes the stream onto the * same id; `accept=false` ends it with a rejected `done`.
(token: string, accept: boolean)
| 144 | * same id; `accept=false` ends it with a rejected `done`. |
| 145 | */ |
| 146 | async confirm(token: string, accept: boolean): Promise<void> { |
| 147 | await this.source.answer( |
| 148 | create(EnvelopeSchema, { |
| 149 | id: this.source.id, |
| 150 | kind: Envelope_Kind.ANSWER, |
| 151 | payload: { case: "confirmAnswer", value: { token, accept } }, |
| 152 | }), |
| 153 | ); |
| 154 | } |
| 155 | |
| 156 | /** |
| 157 | * Drain to the final text (the `done` frame's text, else accumulated event |