identity-admin 1.19.0 → 1.20.0

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.
@@ -0,0 +1,2 @@
1
+ import { Schema, SchemaOptions } from "mongoose";
2
+ export declare function getFileSchema(schemaOptions: SchemaOptions): Schema;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFileSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const helpers_1 = require("../../types/helpers");
6
+ function getFileSchema(schemaOptions) {
7
+ return new mongoose_1.Schema({
8
+ title: {
9
+ type: String,
10
+ required: true,
11
+ },
12
+ url: {
13
+ type: String,
14
+ required: true,
15
+ },
16
+ type: {
17
+ type: String,
18
+ required: true,
19
+ enum: Object.values(helpers_1.FileTypes),
20
+ },
21
+ }, schemaOptions);
22
+ }
23
+ exports.getFileSchema = getFileSchema;
@@ -0,0 +1,15 @@
1
+ import { Document, Model, Types } from 'mongoose';
2
+ import { FileTypes } from '../../types/helpers';
3
+ export interface IFileProps {
4
+ _id?: Types.ObjectId;
5
+ title: string;
6
+ url: string;
7
+ type: FileTypes;
8
+ }
9
+ export interface IFileDocument extends IFileProps, Document {
10
+ _id: Types.ObjectId;
11
+ createdAt: Date;
12
+ updatedAt: Date;
13
+ }
14
+ export default interface IFileModel extends Model<IFileDocument> {
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import { Document, Model, Types } from "mongoose";
2
+ export interface ILocationProps {
3
+ _id?: Types.ObjectId;
4
+ address?: string;
5
+ latitude?: number;
6
+ longitude?: number;
7
+ }
8
+ export interface ILocationDocument extends ILocationProps, Document {
9
+ _id: Types.ObjectId;
10
+ createdAt: Date;
11
+ updatedAt: Date;
12
+ }
13
+ export default interface ILocationModel extends Model<ILocationDocument> {
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import { Schema, SchemaOptions } from "mongoose";
2
+ export declare function getLocationSchema(schemaOptions: SchemaOptions): Schema;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getLocationSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ function getLocationSchema(schemaOptions) {
6
+ return new mongoose_1.Schema({
7
+ address: {
8
+ type: String,
9
+ required: false,
10
+ },
11
+ latitude: {
12
+ type: Number,
13
+ required: false,
14
+ },
15
+ longitude: {
16
+ type: Number,
17
+ required: false,
18
+ },
19
+ }, schemaOptions);
20
+ }
21
+ exports.getLocationSchema = getLocationSchema;
@@ -29,9 +29,12 @@ export declare enum FieldTypes {
29
29
  LOCALIZEDSTRING = "localizedString",
30
30
  PHONENUMBER = "phoneNumber",
31
31
  COLOR = "color",
32
- TIMEPICKER = "timePicker"
32
+ TIMEPICKER = "timePicker",
33
+ FILE = "File",
34
+ LOCATION = "LOCATION"
33
35
  }
34
36
  export declare enum FileTypes {
37
+ ALL = "ALL",
35
38
  IMAGE = "IMAGE",
36
39
  _3D = "3D",
37
40
  PDF = "PDF",
@@ -37,9 +37,12 @@ var FieldTypes;
37
37
  FieldTypes["PHONENUMBER"] = "phoneNumber";
38
38
  FieldTypes["COLOR"] = "color";
39
39
  FieldTypes["TIMEPICKER"] = "timePicker";
40
+ FieldTypes["FILE"] = "File";
41
+ FieldTypes["LOCATION"] = "LOCATION";
40
42
  })(FieldTypes = exports.FieldTypes || (exports.FieldTypes = {}));
41
43
  var FileTypes;
42
44
  (function (FileTypes) {
45
+ FileTypes["ALL"] = "ALL";
43
46
  FileTypes["IMAGE"] = "IMAGE";
44
47
  FileTypes["_3D"] = "3D";
45
48
  FileTypes["PDF"] = "PDF";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "identity-admin",
3
- "version": "1.19.0",
3
+ "version": "1.20.0",
4
4
  "description": "",
5
5
  "main": "lib/Dashboard.js",
6
6
  "types": "lib/Dashbord.d.ts",