@nomalism-com/types 0.46.42 → 0.46.44
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
CHANGED
|
@@ -6050,8 +6050,7 @@ __export(route_schema_exports121, {
|
|
|
6050
6050
|
});
|
|
6051
6051
|
import joi122 from "joi";
|
|
6052
6052
|
var createBodyKeys66 = {
|
|
6053
|
-
key: joi122.string().required()
|
|
6054
|
-
apk_name: joi122.string().required()
|
|
6053
|
+
key: joi122.string().required()
|
|
6055
6054
|
};
|
|
6056
6055
|
var createBody68 = joi122.object().keys(createBodyKeys66).messages(messages);
|
|
6057
6056
|
var updateBodyKeys56 = {
|
package/dist/index.js
CHANGED
|
@@ -6050,8 +6050,7 @@ __export(route_schema_exports121, {
|
|
|
6050
6050
|
});
|
|
6051
6051
|
import joi122 from "joi";
|
|
6052
6052
|
var createBodyKeys66 = {
|
|
6053
|
-
key: joi122.string().required()
|
|
6054
|
-
apk_name: joi122.string().required()
|
|
6053
|
+
key: joi122.string().required()
|
|
6055
6054
|
};
|
|
6056
6055
|
var createBody68 = joi122.object().keys(createBodyKeys66).messages(messages);
|
|
6057
6056
|
var updateBodyKeys56 = {
|
|
@@ -4,14 +4,18 @@ export type Entity = AllowedDevice;
|
|
|
4
4
|
export declare const Route = "allowed_device";
|
|
5
5
|
export interface IEntity extends Entity {
|
|
6
6
|
}
|
|
7
|
-
export type ICreateRequest = Pick<Entity, 'key'
|
|
7
|
+
export type ICreateRequest = Pick<Entity, 'key'>;
|
|
8
8
|
export type apkType = 'sms' | 'ticket' | 'app';
|
|
9
9
|
export type IUpdateRequest = Pick<Entity, 'name' | 'allow_app' | 'allow_sms' | 'allow_ticket'>;
|
|
10
|
+
export interface ICreateResponse {
|
|
11
|
+
name: string;
|
|
12
|
+
allowed: apkType[];
|
|
13
|
+
}
|
|
10
14
|
export interface IRepository {
|
|
11
15
|
find(): Promise<IEntity[]>;
|
|
12
16
|
findById(id: string): Promise<IEntity>;
|
|
13
17
|
findByKey(key: string): Promise<IEntity>;
|
|
14
|
-
create(data: ICreateRequest): Promise<
|
|
18
|
+
create(data: ICreateRequest): Promise<ICreateResponse>;
|
|
15
19
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
16
20
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
17
21
|
}
|
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.44",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|