762155a55e
Add the confirm-link edge method (auth.email.confirm_link): a new EmailConfirmLinkRequest/Result fbs table, the transcode const + handler + encoder, and the backend-client call to the existing /sessions/email/confirm-link endpoint — it rides Execute under the existing service prefix, so no proto/Caddy change. Add a language field to EmailRequestRequest and forward it (the backend already seeds it). Add the NotifyProfile sub-kind + notify.ProfileChanged, published by the confirm-link handler on a successful link so an in-app session re-fetches its profile when the email was confirmed in another browser. Regenerated fbs bindings (Go + TS).
73 lines
2.8 KiB
TypeScript
73 lines
2.8 KiB
TypeScript
// automatically generated by the FlatBuffers compiler, do not modify
|
|
|
|
import * as flatbuffers from 'flatbuffers';
|
|
|
|
export class EmailRequestRequest {
|
|
bb: flatbuffers.ByteBuffer|null = null;
|
|
bb_pos = 0;
|
|
__init(i:number, bb:flatbuffers.ByteBuffer):EmailRequestRequest {
|
|
this.bb_pos = i;
|
|
this.bb = bb;
|
|
return this;
|
|
}
|
|
|
|
static getRootAsEmailRequestRequest(bb:flatbuffers.ByteBuffer, obj?:EmailRequestRequest):EmailRequestRequest {
|
|
return (obj || new EmailRequestRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
}
|
|
|
|
static getSizePrefixedRootAsEmailRequestRequest(bb:flatbuffers.ByteBuffer, obj?:EmailRequestRequest):EmailRequestRequest {
|
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
return (obj || new EmailRequestRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
}
|
|
|
|
email():string|null
|
|
email(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
email(optionalEncoding?:any):string|Uint8Array|null {
|
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
}
|
|
|
|
browserTz():string|null
|
|
browserTz(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
browserTz(optionalEncoding?:any):string|Uint8Array|null {
|
|
const offset = this.bb!.__offset(this.bb_pos, 6);
|
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
}
|
|
|
|
language():string|null
|
|
language(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
language(optionalEncoding?:any):string|Uint8Array|null {
|
|
const offset = this.bb!.__offset(this.bb_pos, 8);
|
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
}
|
|
|
|
static startEmailRequestRequest(builder:flatbuffers.Builder) {
|
|
builder.startObject(3);
|
|
}
|
|
|
|
static addEmail(builder:flatbuffers.Builder, emailOffset:flatbuffers.Offset) {
|
|
builder.addFieldOffset(0, emailOffset, 0);
|
|
}
|
|
|
|
static addBrowserTz(builder:flatbuffers.Builder, browserTzOffset:flatbuffers.Offset) {
|
|
builder.addFieldOffset(1, browserTzOffset, 0);
|
|
}
|
|
|
|
static addLanguage(builder:flatbuffers.Builder, languageOffset:flatbuffers.Offset) {
|
|
builder.addFieldOffset(2, languageOffset, 0);
|
|
}
|
|
|
|
static endEmailRequestRequest(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
const offset = builder.endObject();
|
|
return offset;
|
|
}
|
|
|
|
static createEmailRequestRequest(builder:flatbuffers.Builder, emailOffset:flatbuffers.Offset, browserTzOffset:flatbuffers.Offset, languageOffset:flatbuffers.Offset):flatbuffers.Offset {
|
|
EmailRequestRequest.startEmailRequestRequest(builder);
|
|
EmailRequestRequest.addEmail(builder, emailOffset);
|
|
EmailRequestRequest.addBrowserTz(builder, browserTzOffset);
|
|
EmailRequestRequest.addLanguage(builder, languageOffset);
|
|
return EmailRequestRequest.endEmailRequestRequest(builder);
|
|
}
|
|
}
|