@nomalism-com/types 0.46.37 → 0.46.38
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.cjs +0 -8
- package/dist/index.js +0 -8
- package/dist/modules/sms/allowedDevice/interfaces.d.ts +22 -0
- package/dist/modules/sms/allowedDevice/route.schema.d.ts +3 -0
- package/dist/modules/sms/smsSender/interfaces.d.ts +5 -2
- package/dist/modules/sms/smsTemplate/interfaces.d.ts +2 -2
- package/dist/modules/sms/smsTemplate/route.schema.d.ts +0 -2
- package/dist/shared/entities/sms.d.ts +16 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6015,8 +6015,6 @@ var Route134 = "sms_template";
|
|
|
6015
6015
|
var route_schema_exports120 = {};
|
|
6016
6016
|
__export(route_schema_exports120, {
|
|
6017
6017
|
createBody: () => createBody67,
|
|
6018
|
-
idParam: () => idParam2,
|
|
6019
|
-
keyParam: () => keyParam,
|
|
6020
6018
|
updateBody: () => updateBody57
|
|
6021
6019
|
});
|
|
6022
6020
|
import joi121 from "joi";
|
|
@@ -6034,12 +6032,6 @@ var updateBodyKeys55 = {
|
|
|
6034
6032
|
variables: joi121.object().pattern(joi121.string(), joi121.alternatives().try(joi121.string(), joi121.number(), joi121.boolean())).optional()
|
|
6035
6033
|
};
|
|
6036
6034
|
var updateBody57 = joi121.object().keys(updateBodyKeys55).messages(messages);
|
|
6037
|
-
var idParam2 = joi121.object().keys({
|
|
6038
|
-
id: joi121.string().uuid().required()
|
|
6039
|
-
}).messages(messages);
|
|
6040
|
-
var keyParam = joi121.object().keys({
|
|
6041
|
-
key: joi121.string().required()
|
|
6042
|
-
}).messages(messages);
|
|
6043
6035
|
|
|
6044
6036
|
// src/index.ts
|
|
6045
6037
|
var index_default = main_exports;
|
package/dist/index.js
CHANGED
|
@@ -6015,8 +6015,6 @@ var Route134 = "sms_template";
|
|
|
6015
6015
|
var route_schema_exports120 = {};
|
|
6016
6016
|
__export(route_schema_exports120, {
|
|
6017
6017
|
createBody: () => createBody67,
|
|
6018
|
-
idParam: () => idParam2,
|
|
6019
|
-
keyParam: () => keyParam,
|
|
6020
6018
|
updateBody: () => updateBody57
|
|
6021
6019
|
});
|
|
6022
6020
|
import joi121 from "joi";
|
|
@@ -6034,12 +6032,6 @@ var updateBodyKeys55 = {
|
|
|
6034
6032
|
variables: joi121.object().pattern(joi121.string(), joi121.alternatives().try(joi121.string(), joi121.number(), joi121.boolean())).optional()
|
|
6035
6033
|
};
|
|
6036
6034
|
var updateBody57 = joi121.object().keys(updateBodyKeys55).messages(messages);
|
|
6037
|
-
var idParam2 = joi121.object().keys({
|
|
6038
|
-
id: joi121.string().uuid().required()
|
|
6039
|
-
}).messages(messages);
|
|
6040
|
-
var keyParam = joi121.object().keys({
|
|
6041
|
-
key: joi121.string().required()
|
|
6042
|
-
}).messages(messages);
|
|
6043
6035
|
|
|
6044
6036
|
// src/index.ts
|
|
6045
6037
|
var index_default = main_exports;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AllowedDevice } from '../../../shared/entities/sms';
|
|
2
|
+
import * as IShared from '../../../shared/interface';
|
|
3
|
+
export type Entity = AllowedDevice;
|
|
4
|
+
export declare const Route = "allowed_device";
|
|
5
|
+
export interface IEntity extends Entity {
|
|
6
|
+
}
|
|
7
|
+
export type ICreateRequest = Pick<Entity, 'key' | 'apk_name'>;
|
|
8
|
+
export interface IUpdateRequest {
|
|
9
|
+
allow_app?: boolean;
|
|
10
|
+
allow_sms?: boolean;
|
|
11
|
+
allow_ticket?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface IRepository {
|
|
14
|
+
find(): Promise<IEntity[]>;
|
|
15
|
+
findById(id: string): Promise<IEntity>;
|
|
16
|
+
findByKey(key: string): Promise<IEntity>;
|
|
17
|
+
create(data: ICreateRequest): Promise<string>;
|
|
18
|
+
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
19
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
22
|
+
export type IApi = IRepository;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SmsSender } from '../../../shared/entities/sms';
|
|
2
|
+
import * as IShared from '../../../shared/interface';
|
|
2
3
|
export type Entity = SmsSender;
|
|
3
4
|
export declare const Route = "sms_sender";
|
|
4
5
|
export declare const ISmsSenderStatsEnum: {
|
|
@@ -34,9 +35,11 @@ export interface IFindResponse {
|
|
|
34
35
|
processed_at?: Date;
|
|
35
36
|
sent_at?: Date;
|
|
36
37
|
}
|
|
37
|
-
export interface
|
|
38
|
+
export interface IRepository {
|
|
38
39
|
claim(): Promise<IClaimResponse[]>;
|
|
39
40
|
result(id: string, data: IResultRequest): Promise<void>;
|
|
40
41
|
findById(id: string): Promise<IFindResponse>;
|
|
41
|
-
|
|
42
|
+
find(): Promise<IFindResponse[]>;
|
|
42
43
|
}
|
|
44
|
+
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
45
|
+
export type IApi = IRepository;
|
|
@@ -19,8 +19,8 @@ export interface IUpdateRequest {
|
|
|
19
19
|
}
|
|
20
20
|
export interface IRepository {
|
|
21
21
|
find(): Promise<IEntity[]>;
|
|
22
|
-
findById(id: string): Promise<
|
|
23
|
-
findByKey(key: string): Promise<
|
|
22
|
+
findById(id: string): Promise<IEntity>;
|
|
23
|
+
findByKey(key: string): Promise<IEntity>;
|
|
24
24
|
create(data: ICreateRequest): Promise<string>;
|
|
25
25
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
26
26
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
@@ -29,3 +29,19 @@ export type SmsTemplate = {
|
|
|
29
29
|
created_by: string;
|
|
30
30
|
updated_by: string;
|
|
31
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* Model AllowedDevice
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
export type AllowedDevice = {
|
|
37
|
+
id: string;
|
|
38
|
+
key: string;
|
|
39
|
+
apk_name: string;
|
|
40
|
+
allow_app: boolean;
|
|
41
|
+
allow_sms: boolean;
|
|
42
|
+
allow_ticket: boolean;
|
|
43
|
+
created_at: Date;
|
|
44
|
+
updated_at: Date;
|
|
45
|
+
created_by: string;
|
|
46
|
+
updated_by: string;
|
|
47
|
+
};
|
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.46.
|
|
4
|
+
"version": "0.46.38",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|