@akad/sdk 1.0.10 → 1.0.12

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,8 @@
1
+ import { Config } from '../base';
2
+ import { SignUpPayload, SignInPayload, SignInResponse, UserProfile, SignUpResponse } from './types';
3
+
4
+ export declare const createAuthAkad: (config: Config) => {
5
+ signUp: (data: SignUpPayload) => Promise<SignUpResponse>;
6
+ signIn: (data: SignInPayload) => Promise<SignInResponse>;
7
+ getProfile: () => Promise<UserProfile>;
8
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,34 @@
1
+ export type Gender = 'Male' | 'Female' | 'Other';
2
+ export type UserType = 'tomador';
3
+ export interface SignUpPayload {
4
+ name: string;
5
+ document: string;
6
+ gender: Gender;
7
+ email: string;
8
+ password: string;
9
+ birthDate: string;
10
+ userType: UserType;
11
+ }
12
+ export interface SignUpResponse {
13
+ status: number;
14
+ statusText: string;
15
+ data: string | object;
16
+ }
17
+ export interface SignInPayload {
18
+ email: string;
19
+ password: string;
20
+ }
21
+ export interface SignInResponse {
22
+ data: {
23
+ accessToken: string;
24
+ expiresIn: number;
25
+ };
26
+ }
27
+ export interface UserProfile {
28
+ name: string;
29
+ email: string;
30
+ userType: UserType;
31
+ document: string;
32
+ birthDate: string;
33
+ gender: Gender;
34
+ }
package/main.d.ts CHANGED
@@ -5,10 +5,17 @@ export default function sdkInitialize(config: Config): {
5
5
  postLogin: (data: import('./auth/types').loginType) => Promise<import('./auth/types').loginType>;
6
6
  getToken: (exchangeCode: string) => Promise<import('./auth/types').getTokenType>;
7
7
  };
8
+ authAkad: {
9
+ signUp: (data: import('./authAkad/types').SignUpPayload) => Promise<import('./authAkad/types').SignUpResponse>;
10
+ signIn: (data: import('./authAkad/types').SignInPayload) => Promise<import('./authAkad/types').SignInResponse>;
11
+ getProfile: () => Promise<import('./authAkad/types').UserProfile>;
12
+ };
8
13
  data: {
9
14
  postData: (data: import('./data/types').dataType) => Promise<import('./data/types').dataType>;
10
15
  };
11
16
  quotation: {
17
+ getQuotations: (params: import('./quotation/quotationType').quotationListParams) => Promise<import('./quotation/quotationType').quotationDetail[]>;
18
+ getQuotationDetail: (params: import('./quotation/quotationType').quotationType) => Promise<import('./quotation/quotationType').quotationDetail>;
12
19
  postQuickQuote: (data: import('./quotation/quickQuoteType').quickQuoteType) => Promise<import('./quotation/quickQuoteType').quickQuoteType>;
13
20
  postFullQuote: (data: import('./quotation/fullQuoteType').fullQuoteType) => Promise<import('./quotation/fullQuoteType').fullQuoteType>;
14
21
  postBind: (data: import('./quotation/bindType').bindType) => Promise<import('./quotation/bindType').bindType>;
@@ -31,6 +38,7 @@ export default function sdkInitialize(config: Config): {
31
38
  getCnpjStatus: (cnpj: string) => Promise<import('./plugin/types').CnpjStatus>;
32
39
  getKeyNumber: () => Promise<import('./plugin/types').keyNumberType>;
33
40
  getProposalNumberByKeyNumber: (data: import('./plugin/types').proposalNumberByKeyNumberType) => Promise<import('./plugin/types').proposalNumberByKeyNumberType>;
41
+ postCoveragesAndClausesRules: (data: import('./plugin/types').coveragesAndClausesRulesType) => Promise<import('./plugin/types').coveragesAndClausesRulesType>;
34
42
  };
35
43
  report: {
36
44
  getReportStream: (data: import('./report/types').certificateReportType) => Promise<import('./report/types').certificateReportType>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akad/sdk",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "main": "./ts-lib.umd.cjs",
5
5
  "module": "./ts-lib.js",
6
6
  "exports": {
package/plugin/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { Config } from '../base';
2
- import { CnpjStatus, keyNumberType, proposalNumberByKeyNumberType } from './types';
2
+ import { CnpjStatus, coveragesAndClausesRulesType, keyNumberType, proposalNumberByKeyNumberType } from './types';
3
3
 
4
4
  export declare const createPlugin: (config: Config) => {
5
5
  getCnpjStatus: (cnpj: string) => Promise<CnpjStatus>;
6
6
  getKeyNumber: () => Promise<keyNumberType>;
7
7
  getProposalNumberByKeyNumber: (data: proposalNumberByKeyNumberType) => Promise<proposalNumberByKeyNumberType>;
8
+ postCoveragesAndClausesRules: (data: coveragesAndClausesRulesType) => Promise<coveragesAndClausesRulesType>;
8
9
  };
package/plugin/types.d.ts CHANGED
@@ -7,3 +7,58 @@ export interface keyNumberType {
7
7
  export type proposalNumberByKeyNumberType = {
8
8
  keyNumber: string;
9
9
  };
10
+ export type coveragesAndClausesRulesType = {
11
+ brokerIdentity?: string;
12
+ insured?: {
13
+ name?: string;
14
+ email?: string;
15
+ crea?: number;
16
+ gender?: string;
17
+ document?: string;
18
+ mobile?: string;
19
+ dateOfBirth?: string;
20
+ address?: {
21
+ postCode: string;
22
+ number: string;
23
+ ibge: number;
24
+ state: string;
25
+ city: string;
26
+ street: string;
27
+ suburb: string;
28
+ complement: string;
29
+ };
30
+ isHolding?: boolean;
31
+ };
32
+ riskAnalysis?: {
33
+ policyRisk?: {
34
+ goods?: [
35
+ {
36
+ goodCategoryTypeKey: string;
37
+ goodTypeKey: string;
38
+ conditionGoodTypeKey: string;
39
+ valueGoods: number;
40
+ packageTypeKey: string;
41
+ containerAmount: number;
42
+ goodsDetails: string;
43
+ }
44
+ ];
45
+ };
46
+ };
47
+ broker?: {
48
+ identity?: string;
49
+ comission?: number;
50
+ contact?: {
51
+ phone?: string;
52
+ email?: string;
53
+ };
54
+ coBrokerage?: [
55
+ {
56
+ name?: string;
57
+ document?: string;
58
+ comission?: number;
59
+ susepNumber?: number;
60
+ }
61
+ ];
62
+ showBrokerageInfo?: boolean;
63
+ };
64
+ };
@@ -2,11 +2,13 @@ import { Config } from '../base';
2
2
  import { bindType } from './bindType';
3
3
  import { fullQuoteType } from './fullQuoteType';
4
4
  import { quickQuoteType } from './quickQuoteType';
5
- import { quotationType } from './quotationType';
5
+ import { quotationType, quotationListParams, quotationDetail } from './quotationType';
6
6
  import { switchSelectedVersionType } from './switchSelectedVersionType';
7
7
  import { versionsType } from './versionsType';
8
8
 
9
9
  export declare const createQuote: (config: Config) => {
10
+ getQuotations: (params: quotationListParams) => Promise<quotationDetail[]>;
11
+ getQuotationDetail: (params: quotationType) => Promise<quotationDetail>;
10
12
  postQuickQuote: (data: quickQuoteType) => Promise<quickQuoteType>;
11
13
  postFullQuote: (data: fullQuoteType) => Promise<fullQuoteType>;
12
14
  postBind: (data: bindType) => Promise<bindType>;
@@ -1,3 +1,38 @@
1
1
  export interface quotationType {
2
2
  policyId: string;
3
3
  }
4
+ export interface quotationListParams {
5
+ skip: string;
6
+ take: string;
7
+ startDate?: string;
8
+ endDate?: string;
9
+ searchText?: string;
10
+ policyOrCertificate?: string;
11
+ policyStatus?: string;
12
+ }
13
+ export interface quotationDetail {
14
+ insuredDocument: string;
15
+ insuredName: string;
16
+ insuredAmount: number;
17
+ proposalStatus: number;
18
+ policyStatus: number;
19
+ status: string;
20
+ proposalNo: string;
21
+ policyId: string;
22
+ lastPolicyId?: string;
23
+ lastPolicyNo?: string;
24
+ bookCurrencyCode?: string;
25
+ premium: number;
26
+ netPremium: number;
27
+ vat: number;
28
+ commission: number;
29
+ commissionRate: number;
30
+ createdAt: string;
31
+ effectiveDate: string;
32
+ expiryDate: string;
33
+ issueDate: string;
34
+ uwStatus: number;
35
+ certificate: string;
36
+ keyNumber?: string;
37
+ person?: string;
38
+ }