Removed reflect-metadata/typedi
This commit is contained in:
parent
b9e384ae0d
commit
273565c9d8
12
package-lock.json
generated
12
package-lock.json
generated
@ -26,9 +26,7 @@
|
|||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"react-select": "^5.7.2",
|
"react-select": "^5.7.2",
|
||||||
"reflect-metadata": "^0.1.13",
|
|
||||||
"sass": "^1.59.2",
|
"sass": "^1.59.2",
|
||||||
"typedi": "^0.10.0",
|
|
||||||
"typescript": "4.9.5"
|
"typescript": "4.9.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -3906,11 +3904,6 @@
|
|||||||
"node": ">=8.10.0"
|
"node": ">=8.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/reflect-metadata": {
|
|
||||||
"version": "0.1.13",
|
|
||||||
"resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz",
|
|
||||||
"integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg=="
|
|
||||||
},
|
|
||||||
"node_modules/regenerator-runtime": {
|
"node_modules/regenerator-runtime": {
|
||||||
"version": "0.13.11",
|
"version": "0.13.11",
|
||||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
|
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
|
||||||
@ -4498,11 +4491,6 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typedi": {
|
|
||||||
"version": "0.10.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/typedi/-/typedi-0.10.0.tgz",
|
|
||||||
"integrity": "sha512-v3UJF8xm68BBj6AF4oQML3ikrfK2c9EmZUyLOfShpJuItAqVBHWP/KtpGinkSsIiP6EZyyb6Z3NXyW9dgS9X1w=="
|
|
||||||
},
|
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "4.9.5",
|
"version": "4.9.5",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
|
||||||
|
@ -21,16 +21,14 @@
|
|||||||
"dotenv": "^16.0.3",
|
"dotenv": "^16.0.3",
|
||||||
"eslint": "8.36.0",
|
"eslint": "8.36.0",
|
||||||
"eslint-config-next": "13.2.4",
|
"eslint-config-next": "13.2.4",
|
||||||
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.40",
|
|
||||||
"form-data": "^4.0.0",
|
"form-data": "^4.0.0",
|
||||||
|
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.40",
|
||||||
"next": "13.2.4",
|
"next": "13.2.4",
|
||||||
"prettier": "^2.8.7",
|
"prettier": "^2.8.7",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"react-select": "^5.7.2",
|
"react-select": "^5.7.2",
|
||||||
"reflect-metadata": "^0.1.13",
|
|
||||||
"sass": "^1.59.2",
|
"sass": "^1.59.2",
|
||||||
"typedi": "^0.10.0",
|
|
||||||
"typescript": "4.9.5"
|
"typescript": "4.9.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import { Service } from "typedi";
|
|
||||||
import BaseApiService from "@Front/Api/BaseApiService";
|
import BaseApiService from "@Front/Api/BaseApiService";
|
||||||
import { FrontendVariables } from "@Front/Config/VariablesFront";
|
import { FrontendVariables } from "@Front/Config/VariablesFront";
|
||||||
|
|
||||||
@Service()
|
|
||||||
export default class Auth extends BaseApiService {
|
export default class Auth extends BaseApiService {
|
||||||
private static instance: Auth;
|
private static instance: Auth;
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import { Service } from "typedi";
|
|
||||||
import BaseNotary from "../BaseCustomer";
|
import BaseNotary from "../BaseCustomer";
|
||||||
import User from "le-coffre-resources/dist/Notary";
|
import User from "le-coffre-resources/dist/Notary";
|
||||||
|
|
||||||
@Service()
|
|
||||||
export default class Users extends BaseNotary {
|
export default class Users extends BaseNotary {
|
||||||
private static instance: Users;
|
private static instance: Users;
|
||||||
private readonly baseURl = this.namespaceUrl.concat("/Users");
|
private readonly baseURl = this.namespaceUrl.concat("/Users");
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import { Service } from "typedi";
|
|
||||||
import BaseNotary from "../BaseNotary";
|
import BaseNotary from "../BaseNotary";
|
||||||
import User from "le-coffre-resources/dist/Notary";
|
import User from "le-coffre-resources/dist/Notary";
|
||||||
|
|
||||||
@Service()
|
|
||||||
export default class Users extends BaseNotary {
|
export default class Users extends BaseNotary {
|
||||||
private static instance: Users;
|
private static instance: Users;
|
||||||
private readonly baseURl = this.namespaceUrl.concat("/Users");
|
private readonly baseURl = this.namespaceUrl.concat("/Users");
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { Contact, Customer } from "le-coffre-resources/dist/SuperAdmin";
|
import { Contact, Customer } from "le-coffre-resources/dist/SuperAdmin";
|
||||||
import { Service } from "typedi";
|
|
||||||
|
|
||||||
import BaseSuperAdmin from "../BaseSuperAdmin";
|
import BaseSuperAdmin from "../BaseSuperAdmin";
|
||||||
import { ECivility } from "le-coffre-resources/dist/Customer/Contact";
|
import { ECivility } from "le-coffre-resources/dist/Customer/Contact";
|
||||||
@ -26,7 +25,6 @@ export interface IPostCustomersParams {
|
|||||||
address?: Contact["address"];
|
address?: Contact["address"];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Service()
|
|
||||||
export default class Customers extends BaseSuperAdmin {
|
export default class Customers extends BaseSuperAdmin {
|
||||||
private static instance: Customers;
|
private static instance: Customers;
|
||||||
private readonly baseURl = this.namespaceUrl.concat("/customers");
|
private readonly baseURl = this.namespaceUrl.concat("/customers");
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { Service } from "typedi";
|
|
||||||
import { DeedType } from "le-coffre-resources/dist/Notary";
|
import { DeedType } from "le-coffre-resources/dist/Notary";
|
||||||
import BaseSuperAdmin from "../BaseSuperAdmin";
|
import BaseSuperAdmin from "../BaseSuperAdmin";
|
||||||
|
|
||||||
@ -19,7 +18,6 @@ export type IPutDeedTypesParams = {
|
|||||||
deed_type_has_document_types?: DeedType["deed_type_has_document_types"];
|
deed_type_has_document_types?: DeedType["deed_type_has_document_types"];
|
||||||
};
|
};
|
||||||
|
|
||||||
@Service()
|
|
||||||
export default class DeedTypes extends BaseSuperAdmin {
|
export default class DeedTypes extends BaseSuperAdmin {
|
||||||
private static instance: DeedTypes;
|
private static instance: DeedTypes;
|
||||||
private readonly baseURl = this.namespaceUrl.concat("/deed-types");
|
private readonly baseURl = this.namespaceUrl.concat("/deed-types");
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { Service } from "typedi";
|
|
||||||
import { Deed, OfficeFolder } from "le-coffre-resources/dist/Notary";
|
import { Deed, OfficeFolder } from "le-coffre-resources/dist/Notary";
|
||||||
import BaseSuperAdmin from "../BaseSuperAdmin";
|
import BaseSuperAdmin from "../BaseSuperAdmin";
|
||||||
|
|
||||||
@ -19,7 +18,6 @@ export type IPutDeedsParams = {
|
|||||||
deed_has_document_types?: Deed["deed_has_document_types"];
|
deed_has_document_types?: Deed["deed_has_document_types"];
|
||||||
};
|
};
|
||||||
|
|
||||||
@Service()
|
|
||||||
export default class Deeds extends BaseSuperAdmin {
|
export default class Deeds extends BaseSuperAdmin {
|
||||||
private static instance: Deeds;
|
private static instance: Deeds;
|
||||||
private readonly baseURl = this.namespaceUrl.concat("/deeds");
|
private readonly baseURl = this.namespaceUrl.concat("/deeds");
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { DocumentType } from "le-coffre-resources/dist/SuperAdmin";
|
import { DocumentType } from "le-coffre-resources/dist/SuperAdmin";
|
||||||
import { Service } from "typedi";
|
|
||||||
|
|
||||||
import BaseSuperAdmin from "../BaseSuperAdmin";
|
import BaseSuperAdmin from "../BaseSuperAdmin";
|
||||||
|
|
||||||
@ -23,7 +22,6 @@ export interface IPostDocumentTypesParams {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Service()
|
|
||||||
export default class DocumentTypes extends BaseSuperAdmin {
|
export default class DocumentTypes extends BaseSuperAdmin {
|
||||||
private static instance: DocumentTypes;
|
private static instance: DocumentTypes;
|
||||||
private readonly baseURl = this.namespaceUrl.concat("/document-types");
|
private readonly baseURl = this.namespaceUrl.concat("/document-types");
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { Document } from "le-coffre-resources/dist/SuperAdmin";
|
import { Document } from "le-coffre-resources/dist/SuperAdmin";
|
||||||
import { Service } from "typedi";
|
|
||||||
|
|
||||||
import BaseSuperAdmin from "../BaseSuperAdmin";
|
import BaseSuperAdmin from "../BaseSuperAdmin";
|
||||||
import { EDocumentStatus } from "le-coffre-resources/dist/Customer/Document";
|
import { EDocumentStatus } from "le-coffre-resources/dist/Customer/Document";
|
||||||
@ -19,7 +18,6 @@ export type IPutDocumentsParams = {
|
|||||||
|
|
||||||
export interface IPostDocumentsParams {}
|
export interface IPostDocumentsParams {}
|
||||||
|
|
||||||
@Service()
|
|
||||||
export default class Documents extends BaseSuperAdmin {
|
export default class Documents extends BaseSuperAdmin {
|
||||||
private static instance: Documents;
|
private static instance: Documents;
|
||||||
private readonly baseURl = this.namespaceUrl.concat("/documents");
|
private readonly baseURl = this.namespaceUrl.concat("/documents");
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import { File } from "le-coffre-resources/dist/SuperAdmin";
|
import { File } from "le-coffre-resources/dist/SuperAdmin";
|
||||||
import Container, { Service } from "typedi";
|
|
||||||
|
|
||||||
import BaseSuperAdmin from "../BaseSuperAdmin";
|
import BaseSuperAdmin from "../BaseSuperAdmin";
|
||||||
import CryptoService from "@Front/Services/CryptoService/CryptoService";
|
import CryptoService from "@Front/Services/CryptoService/CryptoService";
|
||||||
|
console.log(CryptoService);
|
||||||
|
|
||||||
|
|
||||||
// TODO Type get query params -> Where + inclue + orderby
|
// TODO Type get query params -> Where + inclue + orderby
|
||||||
export interface IGetFilesparams {
|
export interface IGetFilesparams {
|
||||||
@ -16,21 +17,17 @@ export type IPutFilesParams = {};
|
|||||||
|
|
||||||
export interface IPostFilesParams {}
|
export interface IPostFilesParams {}
|
||||||
|
|
||||||
@Service()
|
|
||||||
export default class Files extends BaseSuperAdmin {
|
export default class Files extends BaseSuperAdmin {
|
||||||
private static instance: Files;
|
private static instance: Files;
|
||||||
private readonly baseURl = this.namespaceUrl.concat("/files");
|
private readonly baseURl = this.namespaceUrl.concat("/files");
|
||||||
|
|
||||||
private constructor(private cryptoService: CryptoService) {
|
private cryptoService: CryptoService = CryptoService.getInstance();
|
||||||
|
private constructor() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static getInstance() {
|
public static getInstance() {
|
||||||
if (!this.instance) {
|
return (this.instance ??= new this());
|
||||||
return new this(Container.get(CryptoService));
|
|
||||||
} else {
|
|
||||||
return this.instance;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async get(q: IGetFilesparams): Promise<File[]> {
|
public async get(q: IGetFilesparams): Promise<File[]> {
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { Service } from "typedi";
|
|
||||||
import User, { Customer, DeedType, Office, OfficeFolder } from "le-coffre-resources/dist/Notary";
|
import User, { Customer, DeedType, Office, OfficeFolder } from "le-coffre-resources/dist/Notary";
|
||||||
import BaseSuperAdmin from "../BaseSuperAdmin";
|
import BaseSuperAdmin from "../BaseSuperAdmin";
|
||||||
import { EFolderStatus } from "le-coffre-resources/dist/Customer/OfficeFolder";
|
import { EFolderStatus } from "le-coffre-resources/dist/Customer/OfficeFolder";
|
||||||
@ -42,7 +41,6 @@ export type IPutFoldersParams = {
|
|||||||
office_folder_has_customers?: { customer: { uid: Customer["uid"] } }[];
|
office_folder_has_customers?: { customer: { uid: Customer["uid"] } }[];
|
||||||
};
|
};
|
||||||
|
|
||||||
@Service()
|
|
||||||
export default class Folders extends BaseSuperAdmin {
|
export default class Folders extends BaseSuperAdmin {
|
||||||
private static instance: Folders;
|
private static instance: Folders;
|
||||||
private readonly baseURl = this.namespaceUrl.concat("/folders");
|
private readonly baseURl = this.namespaceUrl.concat("/folders");
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { Service } from "typedi";
|
|
||||||
import User from "le-coffre-resources/dist/SuperAdmin";
|
import User from "le-coffre-resources/dist/SuperAdmin";
|
||||||
import BaseSuperAdmin from "../BaseSuperAdmin";
|
import BaseSuperAdmin from "../BaseSuperAdmin";
|
||||||
|
|
||||||
@ -20,7 +19,6 @@ export type IPutUsersParams = {
|
|||||||
documents?: User["documents"];
|
documents?: User["documents"];
|
||||||
};
|
};
|
||||||
|
|
||||||
@Service()
|
|
||||||
export default class Users extends BaseSuperAdmin {
|
export default class Users extends BaseSuperAdmin {
|
||||||
private static instance: Users;
|
private static instance: Users;
|
||||||
private readonly baseURl = this.namespaceUrl.concat("/users");
|
private readonly baseURl = this.namespaceUrl.concat("/users");
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import "reflect-metadata";
|
|
||||||
import Header from "@Front/Components/DesignSystem/Header";
|
import Header from "@Front/Components/DesignSystem/Header";
|
||||||
import Version from "@Front/Components/DesignSystem/Version";
|
import Version from "@Front/Components/DesignSystem/Version";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import "reflect-metadata";
|
|
||||||
|
|
||||||
import ChevronIcon from "@Assets/Icons/chevron.svg";
|
import ChevronIcon from "@Assets/Icons/chevron.svg";
|
||||||
import Folders, { IGetFoldersParams } from "@Front/Api/LeCoffreApi/SuperAdmin/Folders/Folders";
|
import Folders, { IGetFoldersParams } from "@Front/Api/LeCoffreApi/SuperAdmin/Folders/Folders";
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import "reflect-metadata";
|
|
||||||
|
|
||||||
import React, { ReactNode } from "react";
|
import React, { ReactNode } from "react";
|
||||||
import classes from "./classes.module.scss";
|
import classes from "./classes.module.scss";
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import "reflect-metadata";
|
|
||||||
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
||||||
import DepositDocument from "@Front/Components/DesignSystem/DepositDocument";
|
import DepositDocument from "@Front/Components/DesignSystem/DepositDocument";
|
||||||
import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField";
|
import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField";
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import "reflect-metadata";
|
|
||||||
|
|
||||||
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
||||||
import CheckBox from "@Front/Components/DesignSystem/CheckBox";
|
import CheckBox from "@Front/Components/DesignSystem/CheckBox";
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import "reflect-metadata";
|
|
||||||
|
|
||||||
import Customers from "@Front/Api/LeCoffreApi/SuperAdmin/Customers/Customers";
|
import Customers from "@Front/Api/LeCoffreApi/SuperAdmin/Customers/Customers";
|
||||||
import Folders, { IPutFoldersParams } from "@Front/Api/LeCoffreApi/SuperAdmin/Folders/Folders";
|
import Folders, { IPutFoldersParams } from "@Front/Api/LeCoffreApi/SuperAdmin/Folders/Folders";
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import "reflect-metadata";
|
|
||||||
|
|
||||||
import PlusIcon from "@Assets/Icons/plus.svg";
|
import PlusIcon from "@Assets/Icons/plus.svg";
|
||||||
import Folders from "@Front/Api/LeCoffreApi/SuperAdmin/Folders/Folders";
|
import Folders from "@Front/Api/LeCoffreApi/SuperAdmin/Folders/Folders";
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import "reflect-metadata";
|
|
||||||
|
|
||||||
import ChevronIcon from "@Assets/Icons/chevron.svg";
|
import ChevronIcon from "@Assets/Icons/chevron.svg";
|
||||||
import Folders, { IPutFoldersParams } from "@Front/Api/LeCoffreApi/SuperAdmin/Folders/Folders";
|
import Folders, { IPutFoldersParams } from "@Front/Api/LeCoffreApi/SuperAdmin/Folders/Folders";
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import "reflect-metadata";
|
|
||||||
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
||||||
import Form from "@Front/Components/DesignSystem/Form";
|
import Form from "@Front/Components/DesignSystem/Form";
|
||||||
import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField";
|
import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField";
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import "reflect-metadata";
|
|
||||||
|
|
||||||
import Folders from "@Front/Api/LeCoffreApi/SuperAdmin/Folders/Folders";
|
import Folders from "@Front/Api/LeCoffreApi/SuperAdmin/Folders/Folders";
|
||||||
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import "reflect-metadata";
|
|
||||||
|
|
||||||
import LeftArrowIcon from "@Assets/Icons/left-arrow.svg";
|
import LeftArrowIcon from "@Assets/Icons/left-arrow.svg";
|
||||||
import RightArrowIcon from "@Assets/Icons/right-arrow.svg";
|
import RightArrowIcon from "@Assets/Icons/right-arrow.svg";
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import "reflect-metadata";
|
|
||||||
|
|
||||||
import ChevronIcon from "@Assets/Icons/chevron.svg";
|
import ChevronIcon from "@Assets/Icons/chevron.svg";
|
||||||
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
||||||
|
@ -1,20 +1,25 @@
|
|||||||
import { Service } from "typedi";
|
|
||||||
import { FrontendVariables } from "@Front/Config/VariablesFront";
|
import { FrontendVariables } from "@Front/Config/VariablesFront";
|
||||||
import crypto from "crypto";
|
import crypto from "crypto";
|
||||||
|
console.log(crypto);
|
||||||
|
|
||||||
|
|
||||||
@Service()
|
|
||||||
export default class CryptoService {
|
export default class CryptoService {
|
||||||
private jwkKey: JsonWebKey;
|
private jwkKey: JsonWebKey;
|
||||||
private subtle: SubtleCrypto = window.crypto.subtle;
|
private subtle: SubtleCrypto = window.crypto.subtle;
|
||||||
constructor(protected variables: FrontendVariables) {
|
private static instance: CryptoService;
|
||||||
|
private constructor() {
|
||||||
this.jwkKey = {
|
this.jwkKey = {
|
||||||
kty: "oct",
|
kty: "oct",
|
||||||
k: variables.KEY_DATA,
|
k: FrontendVariables.getInstance().KEY_DATA,
|
||||||
alg: "A256GCM",
|
alg: "A256GCM",
|
||||||
ext: true,
|
ext: true,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static getInstance() {
|
||||||
|
return (this.instance ??= new this());
|
||||||
|
}
|
||||||
|
|
||||||
private async getKey() {
|
private async getKey() {
|
||||||
return await this.subtle.importKey("jwk", this.jwkKey, { name: "AES-GCM" }, false, ["encrypt", "decrypt"]);
|
return await this.subtle.importKey("jwk", this.jwkKey, { name: "AES-GCM" }, false, ["encrypt", "decrypt"]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user