aaspai-authx 0.1.1 → 0.1.3

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/index.d.cts CHANGED
@@ -5,6 +5,7 @@ import { AuthXUser, AuthXSession } from 'aaspai-types';
5
5
  import * as bson from 'bson';
6
6
  import * as mongoose from 'mongoose';
7
7
  import { Document } from 'mongoose';
8
+ import * as nodemailer_lib_smtp_transport from 'nodemailer/lib/smtp-transport';
8
9
  import * as _nestjs_passport from '@nestjs/passport';
9
10
  import * as _nestjs_common from '@nestjs/common';
10
11
  import { ExecutionContext } from '@nestjs/common';
@@ -64,10 +65,20 @@ declare class AuthAdminService {
64
65
  }): Promise<(mongoose.Document<unknown, {}, {
65
66
  email: string;
66
67
  roles: string[];
67
- projectId: string;
68
- id: string;
69
68
  firstName: string;
70
69
  lastName: string;
70
+ metadata: mongoose.Types.DocumentArray<{
71
+ key: string;
72
+ value: any;
73
+ }, mongoose.Types.Subdocument<bson.ObjectId, any, {
74
+ key: string;
75
+ value: any;
76
+ }> & {
77
+ key: string;
78
+ value: any;
79
+ }>;
80
+ projectId: string;
81
+ id: string;
71
82
  emailVerified: boolean;
72
83
  lastEmailSent: mongoose.Types.DocumentArray<{
73
84
  prototype?: {
@@ -220,6 +231,17 @@ declare class AuthAdminService {
220
231
  UTC?: {} | null | undefined;
221
232
  now?: {} | null | undefined;
222
233
  }>;
234
+ orgId?: string | null | undefined;
235
+ lastPasswordReset?: NativeDate | null | undefined;
236
+ passwordHash?: string | null | undefined;
237
+ } & mongoose.DefaultTimestampProps, {}, {
238
+ timestamps: true;
239
+ collection: string;
240
+ }> & {
241
+ email: string;
242
+ roles: string[];
243
+ firstName: string;
244
+ lastName: string;
223
245
  metadata: mongoose.Types.DocumentArray<{
224
246
  key: string;
225
247
  value: any;
@@ -230,19 +252,8 @@ declare class AuthAdminService {
230
252
  key: string;
231
253
  value: any;
232
254
  }>;
233
- orgId?: string | null | undefined;
234
- lastPasswordReset?: NativeDate | null | undefined;
235
- passwordHash?: string | null | undefined;
236
- } & mongoose.DefaultTimestampProps, {}, {
237
- timestamps: true;
238
- collection: string;
239
- }> & {
240
- email: string;
241
- roles: string[];
242
255
  projectId: string;
243
256
  id: string;
244
- firstName: string;
245
- lastName: string;
246
257
  emailVerified: boolean;
247
258
  lastEmailSent: mongoose.Types.DocumentArray<{
248
259
  prototype?: {
@@ -395,16 +406,6 @@ declare class AuthAdminService {
395
406
  UTC?: {} | null | undefined;
396
407
  now?: {} | null | undefined;
397
408
  }>;
398
- metadata: mongoose.Types.DocumentArray<{
399
- key: string;
400
- value: any;
401
- }, mongoose.Types.Subdocument<bson.ObjectId, any, {
402
- key: string;
403
- value: any;
404
- }> & {
405
- key: string;
406
- value: any;
407
- }>;
408
409
  orgId?: string | null | undefined;
409
410
  lastPasswordReset?: NativeDate | null | undefined;
410
411
  passwordHash?: string | null | undefined;
@@ -416,10 +417,20 @@ declare class AuthAdminService {
416
417
  getUserById(userId: string): Promise<(mongoose.Document<unknown, {}, {
417
418
  email: string;
418
419
  roles: string[];
419
- projectId: string;
420
- id: string;
421
420
  firstName: string;
422
421
  lastName: string;
422
+ metadata: mongoose.Types.DocumentArray<{
423
+ key: string;
424
+ value: any;
425
+ }, mongoose.Types.Subdocument<bson.ObjectId, any, {
426
+ key: string;
427
+ value: any;
428
+ }> & {
429
+ key: string;
430
+ value: any;
431
+ }>;
432
+ projectId: string;
433
+ id: string;
423
434
  emailVerified: boolean;
424
435
  lastEmailSent: mongoose.Types.DocumentArray<{
425
436
  prototype?: {
@@ -572,6 +583,17 @@ declare class AuthAdminService {
572
583
  UTC?: {} | null | undefined;
573
584
  now?: {} | null | undefined;
574
585
  }>;
586
+ orgId?: string | null | undefined;
587
+ lastPasswordReset?: NativeDate | null | undefined;
588
+ passwordHash?: string | null | undefined;
589
+ } & mongoose.DefaultTimestampProps, {}, {
590
+ timestamps: true;
591
+ collection: string;
592
+ }> & {
593
+ email: string;
594
+ roles: string[];
595
+ firstName: string;
596
+ lastName: string;
575
597
  metadata: mongoose.Types.DocumentArray<{
576
598
  key: string;
577
599
  value: any;
@@ -582,19 +604,8 @@ declare class AuthAdminService {
582
604
  key: string;
583
605
  value: any;
584
606
  }>;
585
- orgId?: string | null | undefined;
586
- lastPasswordReset?: NativeDate | null | undefined;
587
- passwordHash?: string | null | undefined;
588
- } & mongoose.DefaultTimestampProps, {}, {
589
- timestamps: true;
590
- collection: string;
591
- }> & {
592
- email: string;
593
- roles: string[];
594
607
  projectId: string;
595
608
  id: string;
596
- firstName: string;
597
- lastName: string;
598
609
  emailVerified: boolean;
599
610
  lastEmailSent: mongoose.Types.DocumentArray<{
600
611
  prototype?: {
@@ -747,16 +758,6 @@ declare class AuthAdminService {
747
758
  UTC?: {} | null | undefined;
748
759
  now?: {} | null | undefined;
749
760
  }>;
750
- metadata: mongoose.Types.DocumentArray<{
751
- key: string;
752
- value: any;
753
- }, mongoose.Types.Subdocument<bson.ObjectId, any, {
754
- key: string;
755
- value: any;
756
- }> & {
757
- key: string;
758
- value: any;
759
- }>;
760
761
  orgId?: string | null | undefined;
761
762
  lastPasswordReset?: NativeDate | null | undefined;
762
763
  passwordHash?: string | null | undefined;
@@ -778,10 +779,20 @@ declare class AuthAdminService {
778
779
  }): Promise<mongoose.Document<unknown, {}, {
779
780
  email: string;
780
781
  roles: string[];
781
- projectId: string;
782
- id: string;
783
782
  firstName: string;
784
783
  lastName: string;
784
+ metadata: mongoose.Types.DocumentArray<{
785
+ key: string;
786
+ value: any;
787
+ }, mongoose.Types.Subdocument<bson.ObjectId, any, {
788
+ key: string;
789
+ value: any;
790
+ }> & {
791
+ key: string;
792
+ value: any;
793
+ }>;
794
+ projectId: string;
795
+ id: string;
785
796
  emailVerified: boolean;
786
797
  lastEmailSent: mongoose.Types.DocumentArray<{
787
798
  prototype?: {
@@ -934,6 +945,17 @@ declare class AuthAdminService {
934
945
  UTC?: {} | null | undefined;
935
946
  now?: {} | null | undefined;
936
947
  }>;
948
+ orgId?: string | null | undefined;
949
+ lastPasswordReset?: NativeDate | null | undefined;
950
+ passwordHash?: string | null | undefined;
951
+ } & mongoose.DefaultTimestampProps, {}, {
952
+ timestamps: true;
953
+ collection: string;
954
+ }> & {
955
+ email: string;
956
+ roles: string[];
957
+ firstName: string;
958
+ lastName: string;
937
959
  metadata: mongoose.Types.DocumentArray<{
938
960
  key: string;
939
961
  value: any;
@@ -944,19 +966,8 @@ declare class AuthAdminService {
944
966
  key: string;
945
967
  value: any;
946
968
  }>;
947
- orgId?: string | null | undefined;
948
- lastPasswordReset?: NativeDate | null | undefined;
949
- passwordHash?: string | null | undefined;
950
- } & mongoose.DefaultTimestampProps, {}, {
951
- timestamps: true;
952
- collection: string;
953
- }> & {
954
- email: string;
955
- roles: string[];
956
969
  projectId: string;
957
970
  id: string;
958
- firstName: string;
959
- lastName: string;
960
971
  emailVerified: boolean;
961
972
  lastEmailSent: mongoose.Types.DocumentArray<{
962
973
  prototype?: {
@@ -1109,16 +1120,6 @@ declare class AuthAdminService {
1109
1120
  UTC?: {} | null | undefined;
1110
1121
  now?: {} | null | undefined;
1111
1122
  }>;
1112
- metadata: mongoose.Types.DocumentArray<{
1113
- key: string;
1114
- value: any;
1115
- }, mongoose.Types.Subdocument<bson.ObjectId, any, {
1116
- key: string;
1117
- value: any;
1118
- }> & {
1119
- key: string;
1120
- value: any;
1121
- }>;
1122
1123
  orgId?: string | null | undefined;
1123
1124
  lastPasswordReset?: NativeDate | null | undefined;
1124
1125
  passwordHash?: string | null | undefined;
@@ -1141,7 +1142,7 @@ declare class EmailService {
1141
1142
  constructor();
1142
1143
  sign(payload: any, ttlSec?: number): string;
1143
1144
  verify<T = any>(token: string): T;
1144
- send(to: string, subject: string, html: string): Promise<void>;
1145
+ send(to: string, subject: string, html: string): Promise<nodemailer_lib_smtp_transport.SentMessageInfo>;
1145
1146
  canSend(lastEmailSent: Date[]): {
1146
1147
  ok: boolean;
1147
1148
  reason: string;
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import { AuthXUser, AuthXSession } from 'aaspai-types';
5
5
  import * as bson from 'bson';
6
6
  import * as mongoose from 'mongoose';
7
7
  import { Document } from 'mongoose';
8
+ import * as nodemailer_lib_smtp_transport from 'nodemailer/lib/smtp-transport';
8
9
  import * as _nestjs_passport from '@nestjs/passport';
9
10
  import * as _nestjs_common from '@nestjs/common';
10
11
  import { ExecutionContext } from '@nestjs/common';
@@ -64,10 +65,20 @@ declare class AuthAdminService {
64
65
  }): Promise<(mongoose.Document<unknown, {}, {
65
66
  email: string;
66
67
  roles: string[];
67
- projectId: string;
68
- id: string;
69
68
  firstName: string;
70
69
  lastName: string;
70
+ metadata: mongoose.Types.DocumentArray<{
71
+ key: string;
72
+ value: any;
73
+ }, mongoose.Types.Subdocument<bson.ObjectId, any, {
74
+ key: string;
75
+ value: any;
76
+ }> & {
77
+ key: string;
78
+ value: any;
79
+ }>;
80
+ projectId: string;
81
+ id: string;
71
82
  emailVerified: boolean;
72
83
  lastEmailSent: mongoose.Types.DocumentArray<{
73
84
  prototype?: {
@@ -220,6 +231,17 @@ declare class AuthAdminService {
220
231
  UTC?: {} | null | undefined;
221
232
  now?: {} | null | undefined;
222
233
  }>;
234
+ orgId?: string | null | undefined;
235
+ lastPasswordReset?: NativeDate | null | undefined;
236
+ passwordHash?: string | null | undefined;
237
+ } & mongoose.DefaultTimestampProps, {}, {
238
+ timestamps: true;
239
+ collection: string;
240
+ }> & {
241
+ email: string;
242
+ roles: string[];
243
+ firstName: string;
244
+ lastName: string;
223
245
  metadata: mongoose.Types.DocumentArray<{
224
246
  key: string;
225
247
  value: any;
@@ -230,19 +252,8 @@ declare class AuthAdminService {
230
252
  key: string;
231
253
  value: any;
232
254
  }>;
233
- orgId?: string | null | undefined;
234
- lastPasswordReset?: NativeDate | null | undefined;
235
- passwordHash?: string | null | undefined;
236
- } & mongoose.DefaultTimestampProps, {}, {
237
- timestamps: true;
238
- collection: string;
239
- }> & {
240
- email: string;
241
- roles: string[];
242
255
  projectId: string;
243
256
  id: string;
244
- firstName: string;
245
- lastName: string;
246
257
  emailVerified: boolean;
247
258
  lastEmailSent: mongoose.Types.DocumentArray<{
248
259
  prototype?: {
@@ -395,16 +406,6 @@ declare class AuthAdminService {
395
406
  UTC?: {} | null | undefined;
396
407
  now?: {} | null | undefined;
397
408
  }>;
398
- metadata: mongoose.Types.DocumentArray<{
399
- key: string;
400
- value: any;
401
- }, mongoose.Types.Subdocument<bson.ObjectId, any, {
402
- key: string;
403
- value: any;
404
- }> & {
405
- key: string;
406
- value: any;
407
- }>;
408
409
  orgId?: string | null | undefined;
409
410
  lastPasswordReset?: NativeDate | null | undefined;
410
411
  passwordHash?: string | null | undefined;
@@ -416,10 +417,20 @@ declare class AuthAdminService {
416
417
  getUserById(userId: string): Promise<(mongoose.Document<unknown, {}, {
417
418
  email: string;
418
419
  roles: string[];
419
- projectId: string;
420
- id: string;
421
420
  firstName: string;
422
421
  lastName: string;
422
+ metadata: mongoose.Types.DocumentArray<{
423
+ key: string;
424
+ value: any;
425
+ }, mongoose.Types.Subdocument<bson.ObjectId, any, {
426
+ key: string;
427
+ value: any;
428
+ }> & {
429
+ key: string;
430
+ value: any;
431
+ }>;
432
+ projectId: string;
433
+ id: string;
423
434
  emailVerified: boolean;
424
435
  lastEmailSent: mongoose.Types.DocumentArray<{
425
436
  prototype?: {
@@ -572,6 +583,17 @@ declare class AuthAdminService {
572
583
  UTC?: {} | null | undefined;
573
584
  now?: {} | null | undefined;
574
585
  }>;
586
+ orgId?: string | null | undefined;
587
+ lastPasswordReset?: NativeDate | null | undefined;
588
+ passwordHash?: string | null | undefined;
589
+ } & mongoose.DefaultTimestampProps, {}, {
590
+ timestamps: true;
591
+ collection: string;
592
+ }> & {
593
+ email: string;
594
+ roles: string[];
595
+ firstName: string;
596
+ lastName: string;
575
597
  metadata: mongoose.Types.DocumentArray<{
576
598
  key: string;
577
599
  value: any;
@@ -582,19 +604,8 @@ declare class AuthAdminService {
582
604
  key: string;
583
605
  value: any;
584
606
  }>;
585
- orgId?: string | null | undefined;
586
- lastPasswordReset?: NativeDate | null | undefined;
587
- passwordHash?: string | null | undefined;
588
- } & mongoose.DefaultTimestampProps, {}, {
589
- timestamps: true;
590
- collection: string;
591
- }> & {
592
- email: string;
593
- roles: string[];
594
607
  projectId: string;
595
608
  id: string;
596
- firstName: string;
597
- lastName: string;
598
609
  emailVerified: boolean;
599
610
  lastEmailSent: mongoose.Types.DocumentArray<{
600
611
  prototype?: {
@@ -747,16 +758,6 @@ declare class AuthAdminService {
747
758
  UTC?: {} | null | undefined;
748
759
  now?: {} | null | undefined;
749
760
  }>;
750
- metadata: mongoose.Types.DocumentArray<{
751
- key: string;
752
- value: any;
753
- }, mongoose.Types.Subdocument<bson.ObjectId, any, {
754
- key: string;
755
- value: any;
756
- }> & {
757
- key: string;
758
- value: any;
759
- }>;
760
761
  orgId?: string | null | undefined;
761
762
  lastPasswordReset?: NativeDate | null | undefined;
762
763
  passwordHash?: string | null | undefined;
@@ -778,10 +779,20 @@ declare class AuthAdminService {
778
779
  }): Promise<mongoose.Document<unknown, {}, {
779
780
  email: string;
780
781
  roles: string[];
781
- projectId: string;
782
- id: string;
783
782
  firstName: string;
784
783
  lastName: string;
784
+ metadata: mongoose.Types.DocumentArray<{
785
+ key: string;
786
+ value: any;
787
+ }, mongoose.Types.Subdocument<bson.ObjectId, any, {
788
+ key: string;
789
+ value: any;
790
+ }> & {
791
+ key: string;
792
+ value: any;
793
+ }>;
794
+ projectId: string;
795
+ id: string;
785
796
  emailVerified: boolean;
786
797
  lastEmailSent: mongoose.Types.DocumentArray<{
787
798
  prototype?: {
@@ -934,6 +945,17 @@ declare class AuthAdminService {
934
945
  UTC?: {} | null | undefined;
935
946
  now?: {} | null | undefined;
936
947
  }>;
948
+ orgId?: string | null | undefined;
949
+ lastPasswordReset?: NativeDate | null | undefined;
950
+ passwordHash?: string | null | undefined;
951
+ } & mongoose.DefaultTimestampProps, {}, {
952
+ timestamps: true;
953
+ collection: string;
954
+ }> & {
955
+ email: string;
956
+ roles: string[];
957
+ firstName: string;
958
+ lastName: string;
937
959
  metadata: mongoose.Types.DocumentArray<{
938
960
  key: string;
939
961
  value: any;
@@ -944,19 +966,8 @@ declare class AuthAdminService {
944
966
  key: string;
945
967
  value: any;
946
968
  }>;
947
- orgId?: string | null | undefined;
948
- lastPasswordReset?: NativeDate | null | undefined;
949
- passwordHash?: string | null | undefined;
950
- } & mongoose.DefaultTimestampProps, {}, {
951
- timestamps: true;
952
- collection: string;
953
- }> & {
954
- email: string;
955
- roles: string[];
956
969
  projectId: string;
957
970
  id: string;
958
- firstName: string;
959
- lastName: string;
960
971
  emailVerified: boolean;
961
972
  lastEmailSent: mongoose.Types.DocumentArray<{
962
973
  prototype?: {
@@ -1109,16 +1120,6 @@ declare class AuthAdminService {
1109
1120
  UTC?: {} | null | undefined;
1110
1121
  now?: {} | null | undefined;
1111
1122
  }>;
1112
- metadata: mongoose.Types.DocumentArray<{
1113
- key: string;
1114
- value: any;
1115
- }, mongoose.Types.Subdocument<bson.ObjectId, any, {
1116
- key: string;
1117
- value: any;
1118
- }> & {
1119
- key: string;
1120
- value: any;
1121
- }>;
1122
1123
  orgId?: string | null | undefined;
1123
1124
  lastPasswordReset?: NativeDate | null | undefined;
1124
1125
  passwordHash?: string | null | undefined;
@@ -1141,7 +1142,7 @@ declare class EmailService {
1141
1142
  constructor();
1142
1143
  sign(payload: any, ttlSec?: number): string;
1143
1144
  verify<T = any>(token: string): T;
1144
- send(to: string, subject: string, html: string): Promise<void>;
1145
+ send(to: string, subject: string, html: string): Promise<nodemailer_lib_smtp_transport.SentMessageInfo>;
1145
1146
  canSend(lastEmailSent: Date[]): {
1146
1147
  ok: boolean;
1147
1148
  reason: string;