@nomalism-com/types 0.49.8 → 0.49.9
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/shared/interface.d.ts +15 -0
- package/package.json +1 -1
|
@@ -41,6 +41,15 @@ export interface IUserToken {
|
|
|
41
41
|
superuser?: boolean;
|
|
42
42
|
system_modules?: ISystemModule[];
|
|
43
43
|
}
|
|
44
|
+
export interface IJwtSub {
|
|
45
|
+
user_id: string;
|
|
46
|
+
superuser?: boolean;
|
|
47
|
+
system_modules?: ISystemModule[];
|
|
48
|
+
}
|
|
49
|
+
export interface ICachedUserTokens {
|
|
50
|
+
access_token?: string;
|
|
51
|
+
refresh_token?: string;
|
|
52
|
+
}
|
|
44
53
|
export type IEntityWithUserToken<T> = {
|
|
45
54
|
[K in keyof T]: T[K] extends (...params: infer U) => unknown ? (...params: [...U, IUserToken]) => ReturnType<T[K]> : T[K];
|
|
46
55
|
};
|
|
@@ -88,6 +97,9 @@ export interface ILogGoogleApiRequest {
|
|
|
88
97
|
info: string;
|
|
89
98
|
error?: string;
|
|
90
99
|
}
|
|
100
|
+
export interface ILastMoloniRequest {
|
|
101
|
+
stamp: string | number;
|
|
102
|
+
}
|
|
91
103
|
export declare const IDataTypeEnum: {
|
|
92
104
|
date: "date";
|
|
93
105
|
datetime: "datetime";
|
|
@@ -404,6 +416,9 @@ export interface IBrokerMessage<T extends IBrokerTopic = IBrokerTopic> {
|
|
|
404
416
|
topic: T;
|
|
405
417
|
payload: IBrokerTopicPayload[T];
|
|
406
418
|
}
|
|
419
|
+
export type Nullable<T> = {
|
|
420
|
+
[K in keyof T]: T[K] | null;
|
|
421
|
+
};
|
|
407
422
|
export type RequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
408
423
|
[K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;
|
|
409
424
|
}[Keys];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomalism-com/types",
|
|
3
3
|
"description": "A nomalism package with all necessary types and validations for developing APIs",
|
|
4
|
-
"version": "0.49.
|
|
4
|
+
"version": "0.49.9",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|