@hapl/api-queries 0.1.92 → 0.1.94

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.
@@ -1,5 +1,5 @@
1
1
  import { AxiosResponse, AxiosError } from 'axios';
2
- import { AvailableFunds, AvailableFundsIncomeType, AvailableFundsPaymentType, AvailableFundsCostType, AvailableFundsRealtyType } from '../../../types';
2
+ import { AvailableFunds, AvailableFundsIncomeType, AvailableFundsPaymentType, AvailableFundsCostType, AvailableFundsRealtyType, AvailableFundsPayerType } from '../../../types';
3
3
  declare type SuccessData = {
4
4
  success: true;
5
5
  data: AvailableFunds;
@@ -22,7 +22,9 @@ export declare type CreateAvailableFundsBody = {
22
22
  realtyType: AvailableFundsRealtyType;
23
23
  receivedAt: string;
24
24
  serviceRequestId: number;
25
+ payerType?: AvailableFundsPayerType;
25
26
  comment?: string;
27
+ dealId?: number;
26
28
  };
27
29
  export declare type CreateAvailableFundsData = AxiosResponse<ResultData>;
28
30
  export declare type CreateAvailableFundsError = AxiosError<ResultError>;
@@ -19,8 +19,8 @@ export declare type FindAvailableFundsParams = {
19
19
  'serviceRequest.id'?: number | number[];
20
20
  };
21
21
  limits?: {
22
- page: number;
23
- count: number;
22
+ page?: number;
23
+ count: number | 'all';
24
24
  };
25
25
  sorting?: {
26
26
  direction: 'asc' | 'desc';
@@ -1,5 +1,5 @@
1
1
  import { AxiosResponse, AxiosError } from 'axios';
2
- import { AvailableFunds, AvailableFundsIncomeType, AvailableFundsPaymentType, AvailableFundsCostType, AvailableFundsRealtyType } from '../../../types';
2
+ import { AvailableFunds, AvailableFundsIncomeType, AvailableFundsPaymentType, AvailableFundsCostType, AvailableFundsRealtyType, AvailableFundsPayerType } from '../../../types';
3
3
  declare type SuccessData = {
4
4
  success: true;
5
5
  data: AvailableFunds;
@@ -23,6 +23,7 @@ export declare type UpdateAvailableFundsBody = {
23
23
  incomeType?: AvailableFundsIncomeType;
24
24
  paymentType?: AvailableFundsPaymentType | AvailableFundsCostType;
25
25
  realtyType?: AvailableFundsRealtyType;
26
+ payerType?: AvailableFundsPayerType;
26
27
  comment?: string;
27
28
  };
28
29
  export declare type UpdateAvailableFundsData = AxiosResponse<ResultData>;
@@ -1,4 +1,4 @@
1
- import { AvailableFundsIncomeType, AvailableFundsCostType, AvailableFundsPaymentType, AvailableFundsRealtyType } from '../types';
1
+ import { AvailableFundsIncomeType, AvailableFundsCostType, AvailableFundsPaymentType, AvailableFundsRealtyType, AvailableFundsPayerType, AvailableFundsCommonPaymentType } from '../types';
2
2
  export declare const AvailableFundsDictionary: {
3
3
  IncomeType: {
4
4
  cashbox: string;
@@ -6,6 +6,7 @@ export declare const AvailableFundsDictionary: {
6
6
  other: string;
7
7
  };
8
8
  CostType: {
9
+ bill_of_credit: string;
9
10
  bonus_payment_to_mentor: string;
10
11
  bonus_payment_to_teamlead: string;
11
12
  bonus_to_trainee: string;
@@ -13,7 +14,29 @@ export declare const AvailableFundsDictionary: {
13
14
  charging_bank_account: string;
14
15
  legal_support_payment: string;
15
16
  other_payments: string;
17
+ partner_charges: string;
16
18
  refund_of_advance: string;
19
+ realty_legal_check: string;
20
+ safe_deposit_box: string;
21
+ };
22
+ CommonPaymentType: {
23
+ advance_payment_under_the_advance_agreement: string;
24
+ bill_of_credit: string;
25
+ bonus_payment_to_mentor: string;
26
+ bonus_payment_to_teamlead: string;
27
+ bonus_to_trainee: string;
28
+ bonus_to_expert: string;
29
+ charging_bank_account: string;
30
+ closing_deal: string;
31
+ legal_support_payment: string;
32
+ letter_of_guarantee: string;
33
+ other_payments: string;
34
+ partner_charges: string;
35
+ prepayment: string;
36
+ realty_legal_check: string;
37
+ refund_of_advance: string;
38
+ safe_deposit_box: string;
39
+ security_payment: string;
17
40
  };
18
41
  PaymentType: {
19
42
  advance_payment_under_the_advance_agreement: string;
@@ -29,4 +52,10 @@ export declare const AvailableFundsDictionary: {
29
52
  "new_flat/developer": string;
30
53
  resale: string;
31
54
  };
55
+ PayerType: {
56
+ common: string;
57
+ homeapp: string;
58
+ sales_head: string;
59
+ expert: string;
60
+ };
32
61
  };
@@ -1,6 +1,8 @@
1
1
  import { ServiceRequestCategorizedFileCategory } from '../types';
2
2
  export declare const ServiceRequestCategorizedFileDictionary: {
3
3
  Category: {
4
+ adv_agreement: string;
5
+ advance_form: string;
4
6
  check_list: string;
5
7
  contract: string;
6
8
  kc: string;
@@ -6,15 +6,38 @@ export declare enum AvailableFundsIncomeType {
6
6
  CheckingAccount = "checking_account",
7
7
  Other = "other"
8
8
  }
9
- export declare enum AvailableFundsCostType {
9
+ export declare enum AvailableFundsCommonPaymentType {
10
+ AdvancePaymentUnderTheAdvanceAgreement = "advance_payment_under_the_advance_agreement",
11
+ BillOfCredit = "bill_of_credit",
10
12
  BonusPaymentToMentor = "bonus_payment_to_mentor",
11
13
  BonusPaymentToTeamlead = "bonus_payment_to_teamlead",
14
+ BonusToExpert = "bonus_to_expert",
12
15
  BonusToTrainee = "bonus_to_trainee",
16
+ ChargingBankAccount = "charging_bank_account",
17
+ ClosingDeal = "closing_deal",
18
+ LegalSupportPayment = "legal_support_payment",
19
+ LetterOfGuarantee = "letter_of_guarantee",
20
+ OtherPayments = "other_payments",
21
+ PartnerCharges = "partner_charges",
22
+ Prepayment = "prepayment",
23
+ RealtyLegalCheck = "realty_legal_check",
24
+ RefundOfAdvance = "refund_of_advance",
25
+ SafeDepositBox = "safe_deposit_box",
26
+ SecurityPayment = "security_payment"
27
+ }
28
+ export declare enum AvailableFundsCostType {
29
+ BillOfCredit = "bill_of_credit",
30
+ BonusPaymentToMentor = "bonus_payment_to_mentor",
31
+ BonusPaymentToTeamlead = "bonus_payment_to_teamlead",
13
32
  BonusToExpert = "bonus_to_expert",
33
+ BonusToTrainee = "bonus_to_trainee",
14
34
  ChargingBankAccount = "charging_bank_account",
15
35
  LegalSupportPayment = "legal_support_payment",
16
36
  OtherPayments = "other_payments",
17
- RefundOfAdvance = "refund_of_advance"
37
+ PartnerCharges = "partner_charges",
38
+ RealtyLegalCheck = "realty_legal_check",
39
+ RefundOfAdvance = "refund_of_advance",
40
+ SafeDepositBox = "safe_deposit_box"
18
41
  }
19
42
  export declare enum AvailableFundsPaymentType {
20
43
  AdvancePaymentUnderTheAdvanceAgreement = "advance_payment_under_the_advance_agreement",
@@ -30,6 +53,12 @@ export declare enum AvailableFundsRealtyType {
30
53
  NewFlatDeveloper = "new_flat/developer",
31
54
  Resale = "resale"
32
55
  }
56
+ export declare enum AvailableFundsPayerType {
57
+ Common = "common",
58
+ Homeapp = "homeapp",
59
+ SalesHead = "sales_head",
60
+ Expert = "expert"
61
+ }
33
62
  export declare type AvailableFunds = {
34
63
  amount: number;
35
64
  author: Partial<User>;
@@ -42,6 +71,7 @@ export declare type AvailableFunds = {
42
71
  serviceRequest: Partial<ServiceRequest> & {
43
72
  id: number;
44
73
  };
74
+ payerType?: AvailableFundsPayerType;
45
75
  deal?: Partial<Deal> & {
46
76
  id: number;
47
77
  };
@@ -1,5 +1,7 @@
1
1
  import { File } from './File';
2
2
  export declare enum ServiceRequestCategorizedFileCategory {
3
+ AdvAgreement = "adv_agreement",
4
+ AdvanceForm = "advance_form",
3
5
  CheckList = "check_list",
4
6
  Contract = "contract",
5
7
  DeleteReason = "deleteReason",
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.92",
2
+ "version": "0.1.94",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -5,6 +5,7 @@ import {
5
5
  AvailableFundsPaymentType,
6
6
  AvailableFundsCostType,
7
7
  AvailableFundsRealtyType,
8
+ AvailableFundsPayerType,
8
9
  } from '../../../types';
9
10
 
10
11
  type SuccessData = { success: true; data: AvailableFunds };
@@ -21,7 +22,9 @@ export type CreateAvailableFundsBody = {
21
22
  realtyType: AvailableFundsRealtyType;
22
23
  receivedAt: string;
23
24
  serviceRequestId: number;
25
+ payerType?: AvailableFundsPayerType;
24
26
  comment?: string;
27
+ dealId?: number;
25
28
  };
26
29
  export type CreateAvailableFundsData = AxiosResponse<ResultData>;
27
30
  export type CreateAvailableFundsError = AxiosError<ResultError>;
@@ -27,11 +27,7 @@ export function deleteAvailableFundsRequest({
27
27
  headers: { Accept: 'application/json', ...headers },
28
28
  transformResponse: [
29
29
  ...(axios.defaults.transformResponse as AxiosTransformer[]),
30
- (data: SuccessData | ErrorData): ResultData | ResultError => {
31
- if (data.success) return data.data;
32
-
33
- return data.data.error;
34
- },
30
+ (data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data : data.data.error),
35
31
  ],
36
32
  })
37
33
  .then((res: DeleteAvailableFundsData) => res)
@@ -16,7 +16,7 @@ export type FindAvailableFundsParams = {
16
16
  'serviceRequest.curator'?: number | number[];
17
17
  'serviceRequest.id'?: number | number[];
18
18
  };
19
- limits?: { page: number; count: number };
19
+ limits?: { page?: number; count: number | 'all' };
20
20
  sorting?: { direction: 'asc' | 'desc'; type: 'createdAt' | 'id' | 'receivedAt' | 'serviceRequest' | 'deal' };
21
21
  };
22
22
  export type FindAvailableFundsData = AxiosResponse<ResultData>;
@@ -6,6 +6,7 @@ import {
6
6
  AvailableFundsPaymentType,
7
7
  AvailableFundsCostType,
8
8
  AvailableFundsRealtyType,
9
+ AvailableFundsPayerType,
9
10
  } from '../../../types';
10
11
 
11
12
  type SuccessData = { success: true; data: AvailableFunds };
@@ -21,6 +22,7 @@ export type UpdateAvailableFundsBody = {
21
22
  incomeType?: AvailableFundsIncomeType;
22
23
  paymentType?: AvailableFundsPaymentType | AvailableFundsCostType;
23
24
  realtyType?: AvailableFundsRealtyType;
25
+ payerType?: AvailableFundsPayerType;
24
26
  comment?: string;
25
27
  };
26
28
  export type UpdateAvailableFundsData = AxiosResponse<ResultData>;
@@ -44,11 +46,7 @@ export function updateAvailableFundsRequest({
44
46
  headers: { Accept: 'application/json', 'Content-Type': 'application/json', ...headers },
45
47
  transformResponse: [
46
48
  ...(axios.defaults.transformResponse as AxiosTransformer[]),
47
- (data: SuccessData | ErrorData): ResultData | ResultError => {
48
- if (data.success) return data.data;
49
-
50
- return data.data.error;
51
- },
49
+ (data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data : data.data.error),
52
50
  ],
53
51
  })
54
52
  .then((res: UpdateAvailableFundsData) => res)
@@ -3,6 +3,8 @@ import {
3
3
  AvailableFundsCostType,
4
4
  AvailableFundsPaymentType,
5
5
  AvailableFundsRealtyType,
6
+ AvailableFundsPayerType,
7
+ AvailableFundsCommonPaymentType,
6
8
  } from '../types';
7
9
 
8
10
  export const AvailableFundsDictionary = {
@@ -12,6 +14,7 @@ export const AvailableFundsDictionary = {
12
14
  [AvailableFundsIncomeType.Other]: 'Прочее',
13
15
  },
14
16
  CostType: {
17
+ [AvailableFundsCostType.BillOfCredit]: 'Оплата аккредитива',
15
18
  [AvailableFundsCostType.BonusPaymentToMentor]: 'Выплата бонуса наставнику',
16
19
  [AvailableFundsCostType.BonusPaymentToTeamlead]: 'Выплата бонуса РОПу',
17
20
  [AvailableFundsCostType.BonusToTrainee]: 'Выплата бонуса стажеру',
@@ -19,7 +22,29 @@ export const AvailableFundsDictionary = {
19
22
  [AvailableFundsCostType.ChargingBankAccount]: 'Внесение на р/с',
20
23
  [AvailableFundsCostType.LegalSupportPayment]: 'Внесение за альтернативный объект',
21
24
  [AvailableFundsCostType.OtherPayments]: 'Прочие расходы',
25
+ [AvailableFundsCostType.PartnerCharges]: 'Партнерские расходы',
22
26
  [AvailableFundsCostType.RefundOfAdvance]: 'Возврат аванса',
27
+ [AvailableFundsCostType.RealtyLegalCheck]: 'Проверка объектов',
28
+ [AvailableFundsCostType.SafeDepositBox]: 'Оплата банковской ячейки',
29
+ },
30
+ CommonPaymentType: {
31
+ [AvailableFundsCommonPaymentType.AdvancePaymentUnderTheAdvanceAgreement]: 'Аванс по соглашению об авансе',
32
+ [AvailableFundsCommonPaymentType.BillOfCredit]: 'Оплата аккредитива',
33
+ [AvailableFundsCommonPaymentType.BonusPaymentToMentor]: 'Выплата бонуса наставнику',
34
+ [AvailableFundsCommonPaymentType.BonusPaymentToTeamlead]: 'Выплата бонуса РОПу',
35
+ [AvailableFundsCommonPaymentType.BonusToTrainee]: 'Выплата бонуса стажеру',
36
+ [AvailableFundsCommonPaymentType.BonusToExpert]: 'Выплата бонуса эксперту',
37
+ [AvailableFundsCommonPaymentType.ChargingBankAccount]: 'Внесение на р/с',
38
+ [AvailableFundsCommonPaymentType.ClosingDeal]: 'Закрытие сделки',
39
+ [AvailableFundsCommonPaymentType.LegalSupportPayment]: 'Внесение за альтернативный объект',
40
+ [AvailableFundsCommonPaymentType.LetterOfGuarantee]: 'Гарантийное письмо',
41
+ [AvailableFundsCommonPaymentType.OtherPayments]: 'Прочие расходы',
42
+ [AvailableFundsCommonPaymentType.PartnerCharges]: 'Партнерские расходы',
43
+ [AvailableFundsCommonPaymentType.Prepayment]: 'Предоплата',
44
+ [AvailableFundsCommonPaymentType.RealtyLegalCheck]: 'Проверка объектов',
45
+ [AvailableFundsCommonPaymentType.RefundOfAdvance]: 'Возврат аванса',
46
+ [AvailableFundsCommonPaymentType.SafeDepositBox]: 'Оплата банковской ячейки',
47
+ [AvailableFundsCommonPaymentType.SecurityPayment]: 'Обеспечительный платеж',
23
48
  },
24
49
  PaymentType: {
25
50
  [AvailableFundsPaymentType.AdvancePaymentUnderTheAdvanceAgreement]: 'Аванс по соглашению об авансе',
@@ -35,4 +60,10 @@ export const AvailableFundsDictionary = {
35
60
  [AvailableFundsRealtyType.NewFlatDeveloper]: 'Новостройки/Застройщик',
36
61
  [AvailableFundsRealtyType.Resale]: 'Вторичка',
37
62
  },
63
+ PayerType: {
64
+ [AvailableFundsPayerType.Common]: 'Общий',
65
+ [AvailableFundsPayerType.Homeapp]: 'Homeapp',
66
+ [AvailableFundsPayerType.SalesHead]: 'РОП',
67
+ [AvailableFundsPayerType.Expert]: 'Эксперт',
68
+ },
38
69
  };
@@ -2,6 +2,8 @@ import { ServiceRequestCategorizedFileCategory } from '../types';
2
2
 
3
3
  export const ServiceRequestCategorizedFileDictionary = {
4
4
  Category: {
5
+ [ServiceRequestCategorizedFileCategory.AdvAgreement]: 'Соглашение на рекламу',
6
+ [ServiceRequestCategorizedFileCategory.AdvanceForm]: 'Анкета на аванс',
5
7
  [ServiceRequestCategorizedFileCategory.CheckList]: 'Чек-лист со встречи',
6
8
  [ServiceRequestCategorizedFileCategory.Contract]: 'Договор оказания услуг',
7
9
  [ServiceRequestCategorizedFileCategory.Kc]: 'Файлы от КЦ',
@@ -8,15 +8,39 @@ export enum AvailableFundsIncomeType {
8
8
  Other = 'other',
9
9
  }
10
10
 
11
- export enum AvailableFundsCostType {
11
+ export enum AvailableFundsCommonPaymentType {
12
+ AdvancePaymentUnderTheAdvanceAgreement = 'advance_payment_under_the_advance_agreement',
13
+ BillOfCredit = 'bill_of_credit',
12
14
  BonusPaymentToMentor = 'bonus_payment_to_mentor',
13
15
  BonusPaymentToTeamlead = 'bonus_payment_to_teamlead',
16
+ BonusToExpert = 'bonus_to_expert',
14
17
  BonusToTrainee = 'bonus_to_trainee',
18
+ ChargingBankAccount = 'charging_bank_account',
19
+ ClosingDeal = 'closing_deal',
20
+ LegalSupportPayment = 'legal_support_payment',
21
+ LetterOfGuarantee = 'letter_of_guarantee',
22
+ OtherPayments = 'other_payments',
23
+ PartnerCharges = 'partner_charges',
24
+ Prepayment = 'prepayment',
25
+ RealtyLegalCheck = 'realty_legal_check',
26
+ RefundOfAdvance = 'refund_of_advance',
27
+ SafeDepositBox = 'safe_deposit_box',
28
+ SecurityPayment = 'security_payment',
29
+ }
30
+
31
+ export enum AvailableFundsCostType {
32
+ BillOfCredit = 'bill_of_credit',
33
+ BonusPaymentToMentor = 'bonus_payment_to_mentor',
34
+ BonusPaymentToTeamlead = 'bonus_payment_to_teamlead',
15
35
  BonusToExpert = 'bonus_to_expert',
36
+ BonusToTrainee = 'bonus_to_trainee',
16
37
  ChargingBankAccount = 'charging_bank_account',
17
38
  LegalSupportPayment = 'legal_support_payment',
18
39
  OtherPayments = 'other_payments',
40
+ PartnerCharges = 'partner_charges',
41
+ RealtyLegalCheck = 'realty_legal_check',
19
42
  RefundOfAdvance = 'refund_of_advance',
43
+ SafeDepositBox = 'safe_deposit_box',
20
44
  }
21
45
 
22
46
  export enum AvailableFundsPaymentType {
@@ -35,6 +59,13 @@ export enum AvailableFundsRealtyType {
35
59
  Resale = 'resale',
36
60
  }
37
61
 
62
+ export enum AvailableFundsPayerType {
63
+ Common = 'common',
64
+ Homeapp = 'homeapp',
65
+ SalesHead = 'sales_head',
66
+ Expert = 'expert',
67
+ }
68
+
38
69
  export type AvailableFunds = {
39
70
  amount: number;
40
71
  author: Partial<User>;
@@ -45,6 +76,7 @@ export type AvailableFunds = {
45
76
  realtyType: AvailableFundsRealtyType;
46
77
  receivedAt: string;
47
78
  serviceRequest: Partial<ServiceRequest> & { id: number };
79
+ payerType?: AvailableFundsPayerType;
48
80
  deal?: Partial<Deal> & { id: number };
49
81
  comment?: string;
50
82
  };
@@ -1,6 +1,8 @@
1
1
  import { File } from './File';
2
2
 
3
3
  export enum ServiceRequestCategorizedFileCategory {
4
+ AdvAgreement = 'adv_agreement',
5
+ AdvanceForm = 'advance_form',
4
6
  CheckList = 'check_list',
5
7
  Contract = 'contract',
6
8
  DeleteReason = 'deleteReason',