theragist-ts 1.0.40 → 1.0.42
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/admin/notification.d.ts +10 -0
- package/dist/admin/notification.js +160 -4
- package/dist/auth/message.d.ts +27 -0
- package/dist/auth/message.js +400 -4
- package/dist/auth/service.d.ts +25 -1
- package/dist/auth/service.js +102 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +25 -19
- package/dist/notification/message.d.ts +2 -0
- package/dist/notification/message.js +33 -1
- package/dist/user/message.d.ts +1 -1
- package/dist/user/message.js +5 -5
- package/dist/wallet/message.d.ts +8 -0
- package/dist/wallet/message.js +107 -2
- package/dist/wallet/service.d.ts +13 -1
- package/dist/wallet/service.js +46 -0
- package/package.json +1 -1
|
@@ -301,9 +301,19 @@ export interface TriggerNotificationRequest {
|
|
|
301
301
|
sourceId: string;
|
|
302
302
|
idempotencyKey: string;
|
|
303
303
|
scheduledAt: string;
|
|
304
|
+
role: string;
|
|
305
|
+
status: string;
|
|
306
|
+
organization: string;
|
|
307
|
+
search: string;
|
|
304
308
|
}
|
|
305
309
|
export interface TriggerNotificationResponse {
|
|
306
310
|
dispatches: AdminNotificationDispatch[];
|
|
311
|
+
matchedUsers: number;
|
|
312
|
+
dispatched: number;
|
|
313
|
+
failed: number;
|
|
314
|
+
failedUserIds: string[];
|
|
315
|
+
sourceType: string;
|
|
316
|
+
sourceId: string;
|
|
307
317
|
}
|
|
308
318
|
export interface PreviewNotificationRequest {
|
|
309
319
|
workflowKey: string;
|
|
@@ -4265,6 +4265,10 @@ function createBaseTriggerNotificationRequest() {
|
|
|
4265
4265
|
sourceId: "",
|
|
4266
4266
|
idempotencyKey: "",
|
|
4267
4267
|
scheduledAt: "",
|
|
4268
|
+
role: "",
|
|
4269
|
+
status: "",
|
|
4270
|
+
organization: "",
|
|
4271
|
+
search: "",
|
|
4268
4272
|
};
|
|
4269
4273
|
}
|
|
4270
4274
|
exports.TriggerNotificationRequest = {
|
|
@@ -4302,6 +4306,18 @@ exports.TriggerNotificationRequest = {
|
|
|
4302
4306
|
if (message.scheduledAt !== "") {
|
|
4303
4307
|
writer.uint32(90).string(message.scheduledAt);
|
|
4304
4308
|
}
|
|
4309
|
+
if (message.role !== "") {
|
|
4310
|
+
writer.uint32(98).string(message.role);
|
|
4311
|
+
}
|
|
4312
|
+
if (message.status !== "") {
|
|
4313
|
+
writer.uint32(106).string(message.status);
|
|
4314
|
+
}
|
|
4315
|
+
if (message.organization !== "") {
|
|
4316
|
+
writer.uint32(114).string(message.organization);
|
|
4317
|
+
}
|
|
4318
|
+
if (message.search !== "") {
|
|
4319
|
+
writer.uint32(122).string(message.search);
|
|
4320
|
+
}
|
|
4305
4321
|
return writer;
|
|
4306
4322
|
},
|
|
4307
4323
|
decode(input, length) {
|
|
@@ -4388,6 +4404,34 @@ exports.TriggerNotificationRequest = {
|
|
|
4388
4404
|
message.scheduledAt = reader.string();
|
|
4389
4405
|
continue;
|
|
4390
4406
|
}
|
|
4407
|
+
case 12: {
|
|
4408
|
+
if (tag !== 98) {
|
|
4409
|
+
break;
|
|
4410
|
+
}
|
|
4411
|
+
message.role = reader.string();
|
|
4412
|
+
continue;
|
|
4413
|
+
}
|
|
4414
|
+
case 13: {
|
|
4415
|
+
if (tag !== 106) {
|
|
4416
|
+
break;
|
|
4417
|
+
}
|
|
4418
|
+
message.status = reader.string();
|
|
4419
|
+
continue;
|
|
4420
|
+
}
|
|
4421
|
+
case 14: {
|
|
4422
|
+
if (tag !== 114) {
|
|
4423
|
+
break;
|
|
4424
|
+
}
|
|
4425
|
+
message.organization = reader.string();
|
|
4426
|
+
continue;
|
|
4427
|
+
}
|
|
4428
|
+
case 15: {
|
|
4429
|
+
if (tag !== 122) {
|
|
4430
|
+
break;
|
|
4431
|
+
}
|
|
4432
|
+
message.search = reader.string();
|
|
4433
|
+
continue;
|
|
4434
|
+
}
|
|
4391
4435
|
}
|
|
4392
4436
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4393
4437
|
break;
|
|
@@ -4417,6 +4461,10 @@ exports.TriggerNotificationRequest = {
|
|
|
4417
4461
|
sourceId: isSet(object.sourceId) ? globalThis.String(object.sourceId) : "",
|
|
4418
4462
|
idempotencyKey: isSet(object.idempotencyKey) ? globalThis.String(object.idempotencyKey) : "",
|
|
4419
4463
|
scheduledAt: isSet(object.scheduledAt) ? globalThis.String(object.scheduledAt) : "",
|
|
4464
|
+
role: isSet(object.role) ? globalThis.String(object.role) : "",
|
|
4465
|
+
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
4466
|
+
organization: isSet(object.organization) ? globalThis.String(object.organization) : "",
|
|
4467
|
+
search: isSet(object.search) ? globalThis.String(object.search) : "",
|
|
4420
4468
|
};
|
|
4421
4469
|
},
|
|
4422
4470
|
toJSON(message) {
|
|
@@ -4455,13 +4503,25 @@ exports.TriggerNotificationRequest = {
|
|
|
4455
4503
|
if (message.scheduledAt !== "") {
|
|
4456
4504
|
obj.scheduledAt = message.scheduledAt;
|
|
4457
4505
|
}
|
|
4506
|
+
if (message.role !== "") {
|
|
4507
|
+
obj.role = message.role;
|
|
4508
|
+
}
|
|
4509
|
+
if (message.status !== "") {
|
|
4510
|
+
obj.status = message.status;
|
|
4511
|
+
}
|
|
4512
|
+
if (message.organization !== "") {
|
|
4513
|
+
obj.organization = message.organization;
|
|
4514
|
+
}
|
|
4515
|
+
if (message.search !== "") {
|
|
4516
|
+
obj.search = message.search;
|
|
4517
|
+
}
|
|
4458
4518
|
return obj;
|
|
4459
4519
|
},
|
|
4460
4520
|
create(base) {
|
|
4461
4521
|
return exports.TriggerNotificationRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
4462
4522
|
},
|
|
4463
4523
|
fromPartial(object) {
|
|
4464
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
4524
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
4465
4525
|
const message = createBaseTriggerNotificationRequest();
|
|
4466
4526
|
message.workflowKey = (_a = object.workflowKey) !== null && _a !== void 0 ? _a : "";
|
|
4467
4527
|
message.recipientUserIds = ((_b = object.recipientUserIds) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
@@ -4474,17 +4534,39 @@ exports.TriggerNotificationRequest = {
|
|
|
4474
4534
|
message.sourceId = (_j = object.sourceId) !== null && _j !== void 0 ? _j : "";
|
|
4475
4535
|
message.idempotencyKey = (_k = object.idempotencyKey) !== null && _k !== void 0 ? _k : "";
|
|
4476
4536
|
message.scheduledAt = (_l = object.scheduledAt) !== null && _l !== void 0 ? _l : "";
|
|
4537
|
+
message.role = (_m = object.role) !== null && _m !== void 0 ? _m : "";
|
|
4538
|
+
message.status = (_o = object.status) !== null && _o !== void 0 ? _o : "";
|
|
4539
|
+
message.organization = (_p = object.organization) !== null && _p !== void 0 ? _p : "";
|
|
4540
|
+
message.search = (_q = object.search) !== null && _q !== void 0 ? _q : "";
|
|
4477
4541
|
return message;
|
|
4478
4542
|
},
|
|
4479
4543
|
};
|
|
4480
4544
|
function createBaseTriggerNotificationResponse() {
|
|
4481
|
-
return { dispatches: [] };
|
|
4545
|
+
return { dispatches: [], matchedUsers: 0, dispatched: 0, failed: 0, failedUserIds: [], sourceType: "", sourceId: "" };
|
|
4482
4546
|
}
|
|
4483
4547
|
exports.TriggerNotificationResponse = {
|
|
4484
4548
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
4485
4549
|
for (const v of message.dispatches) {
|
|
4486
4550
|
exports.AdminNotificationDispatch.encode(v, writer.uint32(10).fork()).join();
|
|
4487
4551
|
}
|
|
4552
|
+
if (message.matchedUsers !== 0) {
|
|
4553
|
+
writer.uint32(16).int32(message.matchedUsers);
|
|
4554
|
+
}
|
|
4555
|
+
if (message.dispatched !== 0) {
|
|
4556
|
+
writer.uint32(24).int32(message.dispatched);
|
|
4557
|
+
}
|
|
4558
|
+
if (message.failed !== 0) {
|
|
4559
|
+
writer.uint32(32).int32(message.failed);
|
|
4560
|
+
}
|
|
4561
|
+
for (const v of message.failedUserIds) {
|
|
4562
|
+
writer.uint32(42).string(v);
|
|
4563
|
+
}
|
|
4564
|
+
if (message.sourceType !== "") {
|
|
4565
|
+
writer.uint32(50).string(message.sourceType);
|
|
4566
|
+
}
|
|
4567
|
+
if (message.sourceId !== "") {
|
|
4568
|
+
writer.uint32(58).string(message.sourceId);
|
|
4569
|
+
}
|
|
4488
4570
|
return writer;
|
|
4489
4571
|
},
|
|
4490
4572
|
decode(input, length) {
|
|
@@ -4501,6 +4583,48 @@ exports.TriggerNotificationResponse = {
|
|
|
4501
4583
|
message.dispatches.push(exports.AdminNotificationDispatch.decode(reader, reader.uint32()));
|
|
4502
4584
|
continue;
|
|
4503
4585
|
}
|
|
4586
|
+
case 2: {
|
|
4587
|
+
if (tag !== 16) {
|
|
4588
|
+
break;
|
|
4589
|
+
}
|
|
4590
|
+
message.matchedUsers = reader.int32();
|
|
4591
|
+
continue;
|
|
4592
|
+
}
|
|
4593
|
+
case 3: {
|
|
4594
|
+
if (tag !== 24) {
|
|
4595
|
+
break;
|
|
4596
|
+
}
|
|
4597
|
+
message.dispatched = reader.int32();
|
|
4598
|
+
continue;
|
|
4599
|
+
}
|
|
4600
|
+
case 4: {
|
|
4601
|
+
if (tag !== 32) {
|
|
4602
|
+
break;
|
|
4603
|
+
}
|
|
4604
|
+
message.failed = reader.int32();
|
|
4605
|
+
continue;
|
|
4606
|
+
}
|
|
4607
|
+
case 5: {
|
|
4608
|
+
if (tag !== 42) {
|
|
4609
|
+
break;
|
|
4610
|
+
}
|
|
4611
|
+
message.failedUserIds.push(reader.string());
|
|
4612
|
+
continue;
|
|
4613
|
+
}
|
|
4614
|
+
case 6: {
|
|
4615
|
+
if (tag !== 50) {
|
|
4616
|
+
break;
|
|
4617
|
+
}
|
|
4618
|
+
message.sourceType = reader.string();
|
|
4619
|
+
continue;
|
|
4620
|
+
}
|
|
4621
|
+
case 7: {
|
|
4622
|
+
if (tag !== 58) {
|
|
4623
|
+
break;
|
|
4624
|
+
}
|
|
4625
|
+
message.sourceId = reader.string();
|
|
4626
|
+
continue;
|
|
4627
|
+
}
|
|
4504
4628
|
}
|
|
4505
4629
|
if ((tag & 7) === 4 || tag === 0) {
|
|
4506
4630
|
break;
|
|
@@ -4514,23 +4638,55 @@ exports.TriggerNotificationResponse = {
|
|
|
4514
4638
|
dispatches: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.dispatches)
|
|
4515
4639
|
? object.dispatches.map((e) => exports.AdminNotificationDispatch.fromJSON(e))
|
|
4516
4640
|
: [],
|
|
4641
|
+
matchedUsers: isSet(object.matchedUsers) ? globalThis.Number(object.matchedUsers) : 0,
|
|
4642
|
+
dispatched: isSet(object.dispatched) ? globalThis.Number(object.dispatched) : 0,
|
|
4643
|
+
failed: isSet(object.failed) ? globalThis.Number(object.failed) : 0,
|
|
4644
|
+
failedUserIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.failedUserIds)
|
|
4645
|
+
? object.failedUserIds.map((e) => globalThis.String(e))
|
|
4646
|
+
: [],
|
|
4647
|
+
sourceType: isSet(object.sourceType) ? globalThis.String(object.sourceType) : "",
|
|
4648
|
+
sourceId: isSet(object.sourceId) ? globalThis.String(object.sourceId) : "",
|
|
4517
4649
|
};
|
|
4518
4650
|
},
|
|
4519
4651
|
toJSON(message) {
|
|
4520
|
-
var _a;
|
|
4652
|
+
var _a, _b;
|
|
4521
4653
|
const obj = {};
|
|
4522
4654
|
if ((_a = message.dispatches) === null || _a === void 0 ? void 0 : _a.length) {
|
|
4523
4655
|
obj.dispatches = message.dispatches.map((e) => exports.AdminNotificationDispatch.toJSON(e));
|
|
4524
4656
|
}
|
|
4657
|
+
if (message.matchedUsers !== 0) {
|
|
4658
|
+
obj.matchedUsers = Math.round(message.matchedUsers);
|
|
4659
|
+
}
|
|
4660
|
+
if (message.dispatched !== 0) {
|
|
4661
|
+
obj.dispatched = Math.round(message.dispatched);
|
|
4662
|
+
}
|
|
4663
|
+
if (message.failed !== 0) {
|
|
4664
|
+
obj.failed = Math.round(message.failed);
|
|
4665
|
+
}
|
|
4666
|
+
if ((_b = message.failedUserIds) === null || _b === void 0 ? void 0 : _b.length) {
|
|
4667
|
+
obj.failedUserIds = message.failedUserIds;
|
|
4668
|
+
}
|
|
4669
|
+
if (message.sourceType !== "") {
|
|
4670
|
+
obj.sourceType = message.sourceType;
|
|
4671
|
+
}
|
|
4672
|
+
if (message.sourceId !== "") {
|
|
4673
|
+
obj.sourceId = message.sourceId;
|
|
4674
|
+
}
|
|
4525
4675
|
return obj;
|
|
4526
4676
|
},
|
|
4527
4677
|
create(base) {
|
|
4528
4678
|
return exports.TriggerNotificationResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
4529
4679
|
},
|
|
4530
4680
|
fromPartial(object) {
|
|
4531
|
-
var _a;
|
|
4681
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
4532
4682
|
const message = createBaseTriggerNotificationResponse();
|
|
4533
4683
|
message.dispatches = ((_a = object.dispatches) === null || _a === void 0 ? void 0 : _a.map((e) => exports.AdminNotificationDispatch.fromPartial(e))) || [];
|
|
4684
|
+
message.matchedUsers = (_b = object.matchedUsers) !== null && _b !== void 0 ? _b : 0;
|
|
4685
|
+
message.dispatched = (_c = object.dispatched) !== null && _c !== void 0 ? _c : 0;
|
|
4686
|
+
message.failed = (_d = object.failed) !== null && _d !== void 0 ? _d : 0;
|
|
4687
|
+
message.failedUserIds = ((_e = object.failedUserIds) === null || _e === void 0 ? void 0 : _e.map((e) => e)) || [];
|
|
4688
|
+
message.sourceType = (_f = object.sourceType) !== null && _f !== void 0 ? _f : "";
|
|
4689
|
+
message.sourceId = (_g = object.sourceId) !== null && _g !== void 0 ? _g : "";
|
|
4534
4690
|
return message;
|
|
4535
4691
|
},
|
|
4536
4692
|
};
|
package/dist/auth/message.d.ts
CHANGED
|
@@ -41,6 +41,10 @@ export interface LoginRequest {
|
|
|
41
41
|
export interface LoginResponse {
|
|
42
42
|
user: AuthUser | undefined;
|
|
43
43
|
session: Session | undefined;
|
|
44
|
+
requiresTwoFactor: boolean;
|
|
45
|
+
twoFactorMethod: string;
|
|
46
|
+
challengeToken: string;
|
|
47
|
+
message: string;
|
|
44
48
|
}
|
|
45
49
|
export interface RefreshTokenRequest {
|
|
46
50
|
refreshToken: string;
|
|
@@ -94,6 +98,25 @@ export interface SocialLoginResponse {
|
|
|
94
98
|
user: AuthUser | undefined;
|
|
95
99
|
session: Session | undefined;
|
|
96
100
|
authProvider: string;
|
|
101
|
+
requiresTwoFactor: boolean;
|
|
102
|
+
twoFactorMethod: string;
|
|
103
|
+
challengeToken: string;
|
|
104
|
+
message: string;
|
|
105
|
+
}
|
|
106
|
+
export interface VerifyTwoFactorRequest {
|
|
107
|
+
challengeToken: string;
|
|
108
|
+
otp: string;
|
|
109
|
+
}
|
|
110
|
+
export interface VerifyTwoFactorResponse {
|
|
111
|
+
user: AuthUser | undefined;
|
|
112
|
+
session: Session | undefined;
|
|
113
|
+
}
|
|
114
|
+
export interface ResendTwoFactorCodeRequest {
|
|
115
|
+
challengeToken: string;
|
|
116
|
+
}
|
|
117
|
+
export interface ResendTwoFactorCodeResponse {
|
|
118
|
+
success: boolean;
|
|
119
|
+
message: string;
|
|
97
120
|
}
|
|
98
121
|
export interface SocialLinkRequest {
|
|
99
122
|
provider: string;
|
|
@@ -215,6 +238,10 @@ export declare const ResendEmailVerificationResponse: MessageFns<ResendEmailVeri
|
|
|
215
238
|
export declare const SocialLoginRequest: MessageFns<SocialLoginRequest>;
|
|
216
239
|
export declare const DeviceInfo: MessageFns<DeviceInfo>;
|
|
217
240
|
export declare const SocialLoginResponse: MessageFns<SocialLoginResponse>;
|
|
241
|
+
export declare const VerifyTwoFactorRequest: MessageFns<VerifyTwoFactorRequest>;
|
|
242
|
+
export declare const VerifyTwoFactorResponse: MessageFns<VerifyTwoFactorResponse>;
|
|
243
|
+
export declare const ResendTwoFactorCodeRequest: MessageFns<ResendTwoFactorCodeRequest>;
|
|
244
|
+
export declare const ResendTwoFactorCodeResponse: MessageFns<ResendTwoFactorCodeResponse>;
|
|
218
245
|
export declare const SocialLinkRequest: MessageFns<SocialLinkRequest>;
|
|
219
246
|
export declare const SocialLinkResponse: MessageFns<SocialLinkResponse>;
|
|
220
247
|
export declare const SocialUnlinkRequest: MessageFns<SocialUnlinkRequest>;
|