@akad/sdk 1.0.18 → 1.0.20
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/base.d.ts +1 -0
- package/broker/index.d.ts +3 -3
- package/broker/types.d.ts +1 -3
- package/endorsement/index.d.ts +5 -0
- package/endorsement/index.test.d.ts +1 -0
- package/main.d.ts +32 -17
- package/package.json +1 -1
- package/payment/index.d.ts +4 -4
- package/payment/types.d.ts +3 -3
- package/plugin/index.d.ts +4 -4
- package/plugin/types.d.ts +2 -4
- package/quotation/bindType.d.ts +1 -1
- package/quotation/fullQuoteType.d.ts +1 -1
- package/quotation/index.d.ts +14 -14
- package/quotation/quickQuoteType.d.ts +1 -1
- package/quotation/quotationType.d.ts +3 -3
- package/quotation/switchSelectedVersionType.d.ts +1 -1
- package/quotation/versionsType.d.ts +1 -1
- package/report/index.d.ts +2 -2
- package/report/types.d.ts +1 -1
- package/ts-lib.js +184 -166
- package/ts-lib.umd.cjs +5 -5
package/base.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare const createBase: (config: Config) => {
|
|
|
19
19
|
data: string;
|
|
20
20
|
contentType?: string;
|
|
21
21
|
responseType?: ResponseType;
|
|
22
|
+
headers?: Record<string, string>;
|
|
22
23
|
}) => Promise<T>;
|
|
23
24
|
getAccessToken: () => string | null;
|
|
24
25
|
setTokens: (tokens: TokenResponse) => void;
|
package/broker/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Config } from '../base';
|
|
2
|
-
import {
|
|
2
|
+
import { BrokerageFirmType } from './types';
|
|
3
3
|
|
|
4
4
|
export declare const createBroker: (config: Config) => {
|
|
5
|
-
getBroker: () => Promise<
|
|
6
|
-
getAllBrokerages: (name: string) => Promise<
|
|
5
|
+
getBroker: () => Promise<unknown>;
|
|
6
|
+
getAllBrokerages: (name: string) => Promise<BrokerageFirmType>;
|
|
7
7
|
};
|
package/broker/types.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/main.d.ts
CHANGED
|
@@ -16,37 +16,52 @@ export default function sdkInitialize(config: Config): {
|
|
|
16
16
|
postData: (data: import('./data/types').dataType) => Promise<import('./data/types').dataType>;
|
|
17
17
|
};
|
|
18
18
|
quotation: {
|
|
19
|
-
getQuotations: (params: import('./quotation/quotationType').
|
|
20
|
-
getQuotationDetail: (params: import('./quotation/quotationType').
|
|
21
|
-
postQuickQuote: (data: import('./quotation/quickQuoteType').
|
|
22
|
-
postFullQuote: (data: import('./quotation/fullQuoteType').
|
|
23
|
-
postBind: (data: import('./quotation/bindType').
|
|
24
|
-
getQuotation: (data: import('./quotation/quotationType').
|
|
25
|
-
getVersions: (data: import('./quotation/versionsType').
|
|
26
|
-
switchSelectedVersion: (data: import('./quotation/switchSelectedVersionType').
|
|
19
|
+
getQuotations: (params: import('./quotation/quotationType').QuotationListParams) => Promise<import('./quotation/quotationType').QuotationDetail[]>;
|
|
20
|
+
getQuotationDetail: (params: import('./quotation/quotationType').QuotationType) => Promise<import('./quotation/quotationType').QuotationDetail>;
|
|
21
|
+
postQuickQuote: (data: import('./quotation/quickQuoteType').QuickQuoteType) => Promise<import('./quotation/quickQuoteType').QuickQuoteType>;
|
|
22
|
+
postFullQuote: (data: import('./quotation/fullQuoteType').FullQuoteType) => Promise<import('./quotation/fullQuoteType').FullQuoteType>;
|
|
23
|
+
postBind: (data: import('./quotation/bindType').BindType) => Promise<import('./quotation/bindType').BindType>;
|
|
24
|
+
getQuotation: (data: import('./quotation/quotationType').QuotationType) => Promise<import('./quotation/quotationType').QuotationType>;
|
|
25
|
+
getVersions: (data: import('./quotation/versionsType').VersionsType) => Promise<import('./quotation/versionsType').VersionsType>;
|
|
26
|
+
switchSelectedVersion: (data: import('./quotation/switchSelectedVersionType').SwitchSelectedVersionType) => Promise<import('./quotation/switchSelectedVersionType').SwitchSelectedVersionType>;
|
|
27
27
|
};
|
|
28
28
|
payment: {
|
|
29
|
-
postPayment: (data: import('./payment/types').
|
|
30
|
-
getPaymentStatus: (data: import('./payment/types').
|
|
31
|
-
getPaymentSummary: (data: import('./payment/types').
|
|
29
|
+
postPayment: (data: import('./payment/types').PaymentType) => Promise<import('./payment/types').PaymentType>;
|
|
30
|
+
getPaymentStatus: (data: import('./payment/types').PaymentStatusType) => Promise<import('./payment/types').PaymentStatusType>;
|
|
31
|
+
getPaymentSummary: (data: import('./payment/types').PaymentSummaryType) => Promise<import('./payment/types').PaymentSummaryType>;
|
|
32
32
|
};
|
|
33
33
|
address: {
|
|
34
34
|
getAddress: (data: import('./address/types').addressType) => Promise<import('./address/types').addressType>;
|
|
35
35
|
};
|
|
36
36
|
broker: {
|
|
37
|
-
getBroker: () => Promise<
|
|
38
|
-
getAllBrokerages: (name: string) => Promise<import('./broker/types').
|
|
37
|
+
getBroker: () => Promise<unknown>;
|
|
38
|
+
getAllBrokerages: (name: string) => Promise<import('./broker/types').BrokerageFirmType>;
|
|
39
|
+
};
|
|
40
|
+
endorsement: {
|
|
41
|
+
putEndorsement: <ReqPayload = unknown, ResPayload = unknown>(data: ReqPayload, attachments?: File | File[] | undefined) => Promise<ResPayload>;
|
|
39
42
|
};
|
|
40
43
|
plugin: {
|
|
41
44
|
getCnpjStatus: (cnpj: string) => Promise<import('./plugin/types').CnpjStatus>;
|
|
42
|
-
getKeyNumber: () => Promise<
|
|
43
|
-
getProposalNumberByKeyNumber: (data: import('./plugin/types').
|
|
44
|
-
postCoveragesAndClausesRules: (data: import('./plugin/types').
|
|
45
|
+
getKeyNumber: () => Promise<unknown>;
|
|
46
|
+
getProposalNumberByKeyNumber: (data: import('./plugin/types').ProposalNumberByKeyNumberType) => Promise<import('./plugin/types').ProposalNumberByKeyNumberType>;
|
|
47
|
+
postCoveragesAndClausesRules: (data: import('./plugin/types').CoveragesAndClausesRulesType) => Promise<import('./plugin/types').CoveragesAndClausesRulesType>;
|
|
45
48
|
};
|
|
46
49
|
report: {
|
|
47
|
-
getReportStream: (data: import('./report/types').
|
|
50
|
+
getReportStream: (data: import('./report/types').CertificateReportType) => Promise<import('./report/types').CertificateReportType>;
|
|
48
51
|
};
|
|
49
52
|
subscriber: {
|
|
50
53
|
getSubscriber: (cnpj: string) => Promise<import('./subscriber/types').getSubscriberType>;
|
|
51
54
|
};
|
|
55
|
+
base: {
|
|
56
|
+
request: <T>(endpoint: string, options?: {
|
|
57
|
+
method: string;
|
|
58
|
+
data: string;
|
|
59
|
+
contentType?: string | undefined;
|
|
60
|
+
responseType?: import('axios').ResponseType | undefined;
|
|
61
|
+
headers?: Record<string, string> | undefined;
|
|
62
|
+
} | undefined) => Promise<T>;
|
|
63
|
+
getAccessToken: () => string | null;
|
|
64
|
+
setTokens: (tokens: import('./helpers/TokenRefreshManager').TokenResponse) => void;
|
|
65
|
+
clearTokens: () => void;
|
|
66
|
+
};
|
|
52
67
|
};
|
package/package.json
CHANGED
package/payment/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Config } from '../base';
|
|
2
|
-
import {
|
|
2
|
+
import { PaymentType, PaymentStatusType, PaymentSummaryType } from './types';
|
|
3
3
|
|
|
4
4
|
export declare const createPayment: (config: Config) => {
|
|
5
|
-
postPayment: (data:
|
|
6
|
-
getPaymentStatus: (data:
|
|
7
|
-
getPaymentSummary: (data:
|
|
5
|
+
postPayment: (data: PaymentType) => Promise<PaymentType>;
|
|
6
|
+
getPaymentStatus: (data: PaymentStatusType) => Promise<PaymentStatusType>;
|
|
7
|
+
getPaymentSummary: (data: PaymentSummaryType) => Promise<PaymentSummaryType>;
|
|
8
8
|
};
|
package/payment/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface PaymentType {
|
|
2
2
|
paymentCode: string;
|
|
3
3
|
creditCard?: {
|
|
4
4
|
installment: number;
|
|
@@ -32,9 +32,9 @@ export interface paymentType {
|
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
export interface
|
|
35
|
+
export interface PaymentSummaryType {
|
|
36
36
|
policyId: string;
|
|
37
37
|
}
|
|
38
|
-
export interface
|
|
38
|
+
export interface PaymentStatusType {
|
|
39
39
|
policyId: string;
|
|
40
40
|
}
|
package/plugin/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Config } from '../base';
|
|
2
|
-
import { CnpjStatus,
|
|
2
|
+
import { CnpjStatus, CoveragesAndClausesRulesType, ProposalNumberByKeyNumberType } from './types';
|
|
3
3
|
|
|
4
4
|
export declare const createPlugin: (config: Config) => {
|
|
5
5
|
getCnpjStatus: (cnpj: string) => Promise<CnpjStatus>;
|
|
6
|
-
getKeyNumber: () => Promise<
|
|
7
|
-
getProposalNumberByKeyNumber: (data:
|
|
8
|
-
postCoveragesAndClausesRules: (data:
|
|
6
|
+
getKeyNumber: () => Promise<unknown>;
|
|
7
|
+
getProposalNumberByKeyNumber: (data: ProposalNumberByKeyNumberType) => Promise<ProposalNumberByKeyNumberType>;
|
|
8
|
+
postCoveragesAndClausesRules: (data: CoveragesAndClausesRulesType) => Promise<CoveragesAndClausesRulesType>;
|
|
9
9
|
};
|
package/plugin/types.d.ts
CHANGED
|
@@ -2,12 +2,10 @@ export type CnpjStatus = {
|
|
|
2
2
|
status: boolean;
|
|
3
3
|
name: string;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
6
|
-
}
|
|
7
|
-
export type proposalNumberByKeyNumberType = {
|
|
5
|
+
export type ProposalNumberByKeyNumberType = {
|
|
8
6
|
keyNumber: string;
|
|
9
7
|
};
|
|
10
|
-
export type
|
|
8
|
+
export type CoveragesAndClausesRulesType = {
|
|
11
9
|
brokerIdentity?: string;
|
|
12
10
|
insured?: {
|
|
13
11
|
name?: string;
|
package/quotation/bindType.d.ts
CHANGED
package/quotation/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Config } from '../base';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { BindType } from './bindType';
|
|
3
|
+
import { FullQuoteType } from './fullQuoteType';
|
|
4
|
+
import { QuickQuoteType } from './quickQuoteType';
|
|
5
|
+
import { QuotationType, QuotationListParams, QuotationDetail } from './quotationType';
|
|
6
|
+
import { SwitchSelectedVersionType } from './switchSelectedVersionType';
|
|
7
|
+
import { VersionsType } from './versionsType';
|
|
8
8
|
|
|
9
9
|
export declare const createQuote: (config: Config) => {
|
|
10
|
-
getQuotations: (params:
|
|
11
|
-
getQuotationDetail: (params:
|
|
12
|
-
postQuickQuote: (data:
|
|
13
|
-
postFullQuote: (data:
|
|
14
|
-
postBind: (data:
|
|
15
|
-
getQuotation: (data:
|
|
16
|
-
getVersions: (data:
|
|
17
|
-
switchSelectedVersion: (data:
|
|
10
|
+
getQuotations: (params: QuotationListParams) => Promise<QuotationDetail[]>;
|
|
11
|
+
getQuotationDetail: (params: QuotationType) => Promise<QuotationDetail>;
|
|
12
|
+
postQuickQuote: (data: QuickQuoteType) => Promise<QuickQuoteType>;
|
|
13
|
+
postFullQuote: (data: FullQuoteType) => Promise<FullQuoteType>;
|
|
14
|
+
postBind: (data: BindType) => Promise<BindType>;
|
|
15
|
+
getQuotation: (data: QuotationType) => Promise<QuotationType>;
|
|
16
|
+
getVersions: (data: VersionsType) => Promise<VersionsType>;
|
|
17
|
+
switchSelectedVersion: (data: SwitchSelectedVersionType) => Promise<SwitchSelectedVersionType>;
|
|
18
18
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface QuotationType {
|
|
2
2
|
policyId: string;
|
|
3
3
|
}
|
|
4
|
-
export interface
|
|
4
|
+
export interface QuotationListParams {
|
|
5
5
|
skip: string;
|
|
6
6
|
take: string;
|
|
7
7
|
startDate?: string;
|
|
@@ -10,7 +10,7 @@ export interface quotationListParams {
|
|
|
10
10
|
policyOrCertificate?: string;
|
|
11
11
|
policyStatus?: string;
|
|
12
12
|
}
|
|
13
|
-
export interface
|
|
13
|
+
export interface QuotationDetail {
|
|
14
14
|
insuredDocument: string;
|
|
15
15
|
insuredName: string;
|
|
16
16
|
insuredAmount: number;
|
package/report/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Config } from '../base';
|
|
2
|
-
import {
|
|
2
|
+
import { CertificateReportType } from './types';
|
|
3
3
|
|
|
4
4
|
export declare const createReport: (config: Config) => {
|
|
5
|
-
getReportStream: (data:
|
|
5
|
+
getReportStream: (data: CertificateReportType) => Promise<CertificateReportType>;
|
|
6
6
|
};
|
package/report/types.d.ts
CHANGED