@wenex/sdk 1.1.44 → 1.1.46
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/common/interfaces/auth/auths/check.interface.d.ts +6 -0
- package/common/interfaces/auth/auths/check.interface.js +3 -0
- package/common/interfaces/auth/auths/check.interface.js.map +1 -0
- package/common/interfaces/auth/auths/index.d.ts +1 -0
- package/common/interfaces/auth/auths/index.js +1 -0
- package/common/interfaces/auth/auths/index.js.map +1 -1
- package/common/interfaces/financial/invoices/invoice.interface.d.ts +3 -1
- package/package.json +1 -1
- package/services/auth/auths.service.d.ts +2 -1
- package/services/auth/auths.service.js +3 -0
- package/services/auth/auths.service.js.map +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.interface.js","sourceRoot":"","sources":["../../../../src/common/interfaces/auth/auths/check.interface.ts"],"names":[],"mappings":""}
|
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./authentication"), exports);
|
|
18
18
|
__exportStar(require("./authorization"), exports);
|
|
19
|
+
__exportStar(require("./check.interface"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/interfaces/auth/auths/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,kDAAgC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/interfaces/auth/auths/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,kDAAgC;AAChC,oDAAkC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Document } from 'mongoose';
|
|
2
2
|
import { Pay, PayDto } from '../common';
|
|
3
|
+
import { State } from '../../../core/enums';
|
|
3
4
|
import { InvoiceType } from '../../../enums/financial';
|
|
4
5
|
import { Core, Dto, NesteDto } from '../../../core/interfaces';
|
|
5
6
|
import { InvoiceItem, InvoiceItemDto } from './item.interface';
|
|
@@ -12,13 +13,14 @@ export interface Invoice<Properties extends object = object> extends Core<Proper
|
|
|
12
13
|
payers?: Pay<Properties>[];
|
|
13
14
|
currency?: string;
|
|
14
15
|
items?: InvoiceItem<Properties>[];
|
|
16
|
+
state: State;
|
|
15
17
|
closed_at?: Date;
|
|
16
18
|
expires_at?: Date;
|
|
17
19
|
replication?: number;
|
|
18
20
|
subscription?: string;
|
|
19
21
|
}
|
|
20
22
|
export type InvoiceDoc<Properties extends object = object> = Invoice<Properties> & Document;
|
|
21
|
-
export type InvoiceDto<Properties extends object = object> = NesteDto<Dto<Invoice<Properties>, 'type'>, {
|
|
23
|
+
export type InvoiceDto<Properties extends object = object> = NesteDto<Dto<Invoice<Properties>, 'type' | 'state'>, {
|
|
22
24
|
payees: PayDto[];
|
|
23
25
|
payers?: PayDto[];
|
|
24
26
|
items?: InvoiceItemDto[];
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AxiosInstance } from 'axios';
|
|
2
|
-
import { AuthenticationRequest, AuthenticationResponse, AuthorizationRequest, AuthorizationResponse } from '../../common/interfaces/auth';
|
|
2
|
+
import { AuthCheck, AuthenticationRequest, AuthenticationResponse, AuthorizationRequest, AuthorizationResponse } from '../../common/interfaces/auth';
|
|
3
3
|
import { Result } from '../../common/core/interfaces';
|
|
4
4
|
import { RequestConfig } from '../../common/core/classes';
|
|
5
5
|
import { JwtToken } from '../../common/core/interfaces/auth';
|
|
@@ -8,6 +8,7 @@ export declare class AuthsService extends RequestService {
|
|
|
8
8
|
protected readonly axios: AxiosInstance;
|
|
9
9
|
protected readonly url: (path: string) => string;
|
|
10
10
|
constructor(axios: AxiosInstance);
|
|
11
|
+
check(data: AuthCheck, config?: RequestConfig): Promise<Result>;
|
|
11
12
|
token(data: AuthenticationRequest, config?: RequestConfig): Promise<AuthenticationResponse>;
|
|
12
13
|
verify(config?: RequestConfig): Promise<JwtToken>;
|
|
13
14
|
logout(config?: RequestConfig): Promise<Result>;
|
|
@@ -8,6 +8,9 @@ class AuthsService extends providers_1.RequestService {
|
|
|
8
8
|
this.axios = axios;
|
|
9
9
|
this.url = (path) => `/auth/${path}`;
|
|
10
10
|
}
|
|
11
|
+
check(data, config) {
|
|
12
|
+
return this.post(this.url('check'), data, config);
|
|
13
|
+
}
|
|
11
14
|
token(data, config) {
|
|
12
15
|
return this.post(this.url('token'), data, config);
|
|
13
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auths.service.js","sourceRoot":"","sources":["../../src/services/auth/auths.service.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"auths.service.js","sourceRoot":"","sources":["../../src/services/auth/auths.service.ts"],"names":[],"mappings":";;;AAYA,2DAA6D;AAE7D,MAAa,YAAa,SAAQ,0BAAc;IAG9C,YAA+B,KAAoB;QACjD,KAAK,CAAC,KAAK,CAAC,CAAC;QADgB,UAAK,GAAL,KAAK,CAAe;QAFhC,QAAG,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,SAAS,IAAI,EAAE,CAAC;IAI3D,CAAC;IAED,KAAK,CAAC,IAAe,EAAE,MAAsB;QAC3C,OAAO,IAAI,CAAC,IAAI,CAAoB,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACvE,CAAC;IAED,KAAK,CAAC,IAA2B,EAAE,MAAsB;QACvD,OAAO,IAAI,CAAC,IAAI,CAAgD,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACnG,CAAC;IAED,MAAM,CAAC,MAAsB;QAC3B,OAAO,IAAI,CAAC,GAAG,CAAW,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;IACxD,CAAC;IAED,MAAM,CAAC,MAAsB;QAC3B,OAAO,IAAI,CAAC,GAAG,CAAS,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;IAED,GAAG,CAAC,IAA0B,EAAE,MAAsB;QACpD,OAAO,IAAI,CAAC,IAAI,CAA8C,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAC/F,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,KAAoB;QAC/B,OAAO,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;CACF;AA9BD,oCA8BC"}
|