@silexpert/core 0.4.19 → 0.4.21
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/es/api/resources/Partner.d.ts +2 -2
- package/es/api/resources/Partner.d.ts.map +1 -1
- package/es/api/resources/Partner.js +2 -2
- package/es/api/resources/Partner.js.map +1 -1
- package/es/api/resources/Subscription.d.ts +6 -0
- package/es/api/resources/Subscription.d.ts.map +1 -0
- package/es/api/resources/Subscription.js +7 -0
- package/es/api/resources/Subscription.js.map +1 -0
- package/es/api/resources.d.ts +2 -0
- package/es/api/resources.d.ts.map +1 -1
- package/es/api/resources.js +2 -0
- package/es/api/resources.js.map +1 -1
- package/es/types/Enum/PartnerTransactionType.d.ts +7 -0
- package/es/types/Enum/PartnerTransactionType.d.ts.map +1 -0
- package/es/types/Enum/PartnerTransactionType.js +8 -0
- package/es/types/Enum/PartnerTransactionType.js.map +1 -0
- package/es/types/Enum/SponsorshipEmailState.d.ts +6 -0
- package/es/types/Enum/SponsorshipEmailState.d.ts.map +1 -0
- package/es/types/Enum/SponsorshipEmailState.js +7 -0
- package/es/types/Enum/SponsorshipEmailState.js.map +1 -0
- package/es/types/Interface/api/account/CreateAccountSociety.d.ts +7 -0
- package/es/types/Interface/api/account/CreateAccountSociety.d.ts.map +1 -0
- package/es/types/Interface/api/account/CreateAccountSociety.js +29 -0
- package/es/types/Interface/api/account/CreateAccountSociety.js.map +1 -0
- package/es/types/Interface/api/account/QueryAccountSociety.d.ts +8 -0
- package/es/types/Interface/api/account/QueryAccountSociety.d.ts.map +1 -0
- package/es/types/Interface/api/account/QueryAccountSociety.js +33 -0
- package/es/types/Interface/api/account/QueryAccountSociety.js.map +1 -0
- package/es/types/Interface/api/account/QueryGenericAccount.d.ts +6 -0
- package/es/types/Interface/api/account/QueryGenericAccount.d.ts.map +1 -0
- package/es/types/Interface/api/account/QueryGenericAccount.js +25 -0
- package/es/types/Interface/api/account/QueryGenericAccount.js.map +1 -0
- package/es/types/Interface/api/account/UpdateAccountSociety.d.ts +8 -0
- package/es/types/Interface/api/account/UpdateAccountSociety.d.ts.map +1 -0
- package/es/types/Interface/api/account/UpdateAccountSociety.js +29 -0
- package/es/types/Interface/api/account/UpdateAccountSociety.js.map +1 -0
- package/es/types/Interface/api/partner/GetPartners.d.ts +4 -0
- package/es/types/Interface/api/partner/GetPartners.d.ts.map +1 -0
- package/es/types/Interface/api/partner/GetPartners.js +17 -0
- package/es/types/Interface/api/partner/GetPartners.js.map +1 -0
- package/es/types/Interface/api/shine/CreateShine.d.ts +80 -0
- package/es/types/Interface/api/shine/CreateShine.d.ts.map +1 -0
- package/es/types/Interface/api/shine/CreateShine.js +2 -0
- package/es/types/Interface/api/shine/CreateShine.js.map +1 -0
- package/es/types/Interface/api/sponsorship/CreateSponsorship.d.ts +5 -0
- package/es/types/Interface/api/sponsorship/CreateSponsorship.d.ts.map +1 -0
- package/es/types/Interface/api/sponsorship/CreateSponsorship.js +21 -0
- package/es/types/Interface/api/sponsorship/CreateSponsorship.js.map +1 -0
- package/es/types/Interface/api/sponsorship/QuerySponsorship.d.ts +7 -0
- package/es/types/Interface/api/sponsorship/QuerySponsorship.d.ts.map +1 -0
- package/es/types/Interface/api/sponsorship/QuerySponsorship.js +29 -0
- package/es/types/Interface/api/sponsorship/QuerySponsorship.js.map +1 -0
- package/es/types/Interface/api/sponsorship/SendSponsorshipLink.d.ts +5 -0
- package/es/types/Interface/api/sponsorship/SendSponsorshipLink.d.ts.map +1 -0
- package/es/types/Interface/api/sponsorship/SendSponsorshipLink.js +21 -0
- package/es/types/Interface/api/sponsorship/SendSponsorshipLink.js.map +1 -0
- package/es/types/Interface/api/stripe/QueryStripe.d.ts +5 -0
- package/es/types/Interface/api/stripe/QueryStripe.d.ts.map +1 -0
- package/es/types/Interface/api/stripe/QueryStripe.js +2 -0
- package/es/types/Interface/api/stripe/QueryStripe.js.map +1 -0
- package/es/types/Interface/api/stripe/ReadStripe.d.ts +5 -0
- package/es/types/Interface/api/stripe/ReadStripe.d.ts.map +1 -0
- package/es/types/Interface/api/stripe/ReadStripe.js +2 -0
- package/es/types/Interface/api/stripe/ReadStripe.js.map +1 -0
- package/es/types/Interface/models/IAccountingTransaction.d.ts +1 -1
- package/es/types/Interface/models/IAccountingTransaction.d.ts.map +1 -1
- package/es/types/Interface/models/IAccountingTransaction.js.map +1 -1
- package/es/types/Interface/models/IApiError.d.ts +34 -1
- package/es/types/Interface/models/IApiError.d.ts.map +1 -1
- package/es/types/Interface/models/IApiError.js +35 -0
- package/es/types/Interface/models/IApiError.js.map +1 -1
- package/es/types/Interface/models/IBankConnection.d.ts +4 -1
- package/es/types/Interface/models/IBankConnection.d.ts.map +1 -1
- package/es/types/Interface/models/IBankConnection.js.map +1 -1
- package/es/types/Interface/models/IBankTransaction.d.ts +1 -1
- package/es/types/Interface/models/IBankTransaction.d.ts.map +1 -1
- package/es/types/Interface/models/IBankTransaction.js.map +1 -1
- package/es/types/Interface/models/IEngagementBankTransaction.d.ts +1 -1
- package/es/types/Interface/models/IEngagementBankTransaction.d.ts.map +1 -1
- package/es/types/Interface/models/IEngagementBankTransaction.js.map +1 -1
- package/es/types/Interface/models/IPartnerTransaction.d.ts +3 -3
- package/es/types/Interface/models/IPartnerTransaction.d.ts.map +1 -1
- package/es/types/Interface/models/IPartnerTransaction.js.map +1 -1
- package/es/types/Interface/models/ISponsorship.d.ts +9 -0
- package/es/types/Interface/models/ISponsorship.d.ts.map +1 -0
- package/es/types/Interface/models/ISponsorship.js +2 -0
- package/es/types/Interface/models/ISponsorship.js.map +1 -0
- package/es/types/Interface/models/ISponsorshipLink.d.ts +1 -2
- package/es/types/Interface/models/ISponsorshipLink.d.ts.map +1 -1
- package/es/types/Interface/models/ISponsorshipLink.js.map +1 -1
- package/es/types/index.d.ts +13 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +13 -0
- package/es/types/index.js.map +1 -1
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.d.ts.map +1 -1
- package/es/utils/index.js +1 -0
- package/es/utils/index.js.map +1 -1
- package/es/utils/stringUtils/clean.d.ts +3 -0
- package/es/utils/stringUtils/clean.d.ts.map +1 -0
- package/es/utils/stringUtils/clean.js +12 -0
- package/es/utils/stringUtils/clean.js.map +1 -0
- package/es/utils/stringUtils/index.d.ts +2 -0
- package/es/utils/stringUtils/index.d.ts.map +1 -0
- package/es/utils/stringUtils/index.js +2 -0
- package/es/utils/stringUtils/index.js.map +1 -0
- package/js/api/resources/Partner.js +4 -2
- package/js/api/resources/Partner.js.map +1 -1
- package/js/api/resources/Subscription.js +20 -0
- package/js/api/resources/Subscription.js.map +1 -0
- package/js/api/resources.js +4 -1
- package/js/api/resources.js.map +1 -1
- package/js/types/Enum/PartnerTransactionType.js +14 -0
- package/js/types/Enum/{TypePartnerTransaction.js.map → PartnerTransactionType.js.map} +1 -1
- package/js/types/Enum/SponsorshipEmailState.js +13 -0
- package/js/types/Enum/SponsorshipEmailState.js.map +1 -0
- package/js/types/Interface/api/account/CreateAccountSociety.js +33 -0
- package/js/types/Interface/api/account/CreateAccountSociety.js.map +1 -0
- package/js/types/Interface/api/account/QueryAccountSociety.js +35 -0
- package/js/types/Interface/api/account/QueryAccountSociety.js.map +1 -0
- package/js/types/Interface/api/account/QueryGenericAccount.js +31 -0
- package/js/types/Interface/api/account/QueryGenericAccount.js.map +1 -0
- package/js/types/Interface/api/account/UpdateAccountSociety.js +33 -0
- package/js/types/Interface/api/account/UpdateAccountSociety.js.map +1 -0
- package/js/types/Interface/api/partner/GetPartners.js +27 -0
- package/js/types/Interface/api/partner/GetPartners.js.map +1 -0
- package/js/types/Interface/api/shine/CreateShine.js +6 -0
- package/js/types/Interface/api/shine/CreateShine.js.map +1 -0
- package/js/types/Interface/api/sponsorship/CreateSponsorship.js +29 -0
- package/js/types/Interface/api/sponsorship/CreateSponsorship.js.map +1 -0
- package/js/types/Interface/api/sponsorship/QuerySponsorship.js +33 -0
- package/js/types/Interface/api/sponsorship/QuerySponsorship.js.map +1 -0
- package/js/types/Interface/api/sponsorship/SendSponsorshipLink.js +29 -0
- package/js/types/Interface/api/sponsorship/SendSponsorshipLink.js.map +1 -0
- package/js/types/Interface/api/stripe/QueryStripe.js +6 -0
- package/js/types/Interface/api/stripe/QueryStripe.js.map +1 -0
- package/js/types/Interface/api/stripe/ReadStripe.js +6 -0
- package/js/types/Interface/api/stripe/ReadStripe.js.map +1 -0
- package/js/types/Interface/models/IApiError.js +37 -2
- package/js/types/Interface/models/IApiError.js.map +1 -1
- package/js/types/Interface/models/ISponsorship.js +6 -0
- package/js/types/Interface/models/ISponsorship.js.map +1 -0
- package/js/types/index.js +156 -0
- package/js/types/index.js.map +1 -1
- package/js/utils/index.js +12 -0
- package/js/utils/index.js.map +1 -1
- package/js/utils/stringUtils/clean.js +15 -0
- package/js/utils/stringUtils/clean.js.map +1 -0
- package/js/utils/stringUtils/index.js +18 -0
- package/js/utils/stringUtils/index.js.map +1 -0
- package/package.json +1 -1
- package/ts/api/resources/Partner.ts +3 -2
- package/ts/api/resources/Subscription.ts +8 -0
- package/ts/api/resources.ts +2 -0
- package/ts/types/Enum/{TypePartnerTransaction.ts → PartnerTransactionType.ts} +1 -1
- package/ts/types/Enum/SponsorshipEmailState.ts +5 -0
- package/ts/types/Interface/api/account/CreateAccountSociety.ts +15 -0
- package/ts/types/Interface/api/account/QueryAccountSociety.ts +18 -0
- package/ts/types/Interface/api/account/QueryGenericAccount.ts +12 -0
- package/ts/types/Interface/api/account/UpdateAccountSociety.ts +18 -0
- package/ts/types/Interface/api/partner/GetPartners.ts +6 -0
- package/ts/types/Interface/api/shine/CreateShine.ts +84 -0
- package/ts/types/Interface/api/sponsorship/CreateSponsorship.ts +9 -0
- package/ts/types/Interface/api/sponsorship/QuerySponsorship.ts +15 -0
- package/ts/types/Interface/api/sponsorship/SendSponsorshipLink.ts +9 -0
- package/ts/types/Interface/api/stripe/QueryStripe.ts +4 -0
- package/ts/types/Interface/api/stripe/ReadStripe.ts +4 -0
- package/ts/types/Interface/models/IAccountingTransaction.ts +1 -1
- package/ts/types/Interface/models/IApiError.ts +37 -0
- package/ts/types/Interface/models/IBankConnection.ts +4 -1
- package/ts/types/Interface/models/IBankTransaction.ts +1 -1
- package/ts/types/Interface/models/IEngagementBankTransaction.ts +1 -1
- package/ts/types/Interface/models/IPartnerTransaction.ts +3 -3
- package/ts/types/Interface/models/ISponsorship.ts +9 -0
- package/ts/types/Interface/models/ISponsorshipLink.ts +1 -2
- package/ts/types/index.ts +13 -0
- package/ts/utils/index.ts +1 -0
- package/ts/utils/stringUtils/clean.ts +12 -0
- package/ts/utils/stringUtils/index.ts +1 -0
- package/es/types/Enum/TypePartnerTransaction.d.ts +0 -7
- package/es/types/Enum/TypePartnerTransaction.d.ts.map +0 -1
- package/es/types/Enum/TypePartnerTransaction.js +0 -8
- package/es/types/Enum/TypePartnerTransaction.js.map +0 -1
- package/js/types/Enum/TypePartnerTransaction.js +0 -14
package/js/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../ts/utils/index.ts"],"names":[],"mappings":";;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from './objectUtils';\nexport * from './decorators';\n"],"sourceRoot":"","file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../ts/utils/index.ts"],"names":[],"mappings":";;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from './objectUtils';\nexport * from './stringUtils';\nexport * from './decorators';\n"],"sourceRoot":"","file":"index.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.cleanForRules = cleanForRules;
|
|
7
|
+
const wordsToExclude = ['cheque', 'prelevement', 'cheques', 'prelevements', 'prlvt', 'prlv', 'valeur', 'euro', 'solde', 'dont'];
|
|
8
|
+
const minWordsForDesignation = exports.minWordsForDesignation = 3;
|
|
9
|
+
|
|
10
|
+
function cleanForRules(string) {
|
|
11
|
+
return string.toLowerCase().replace(/[^a-z0-9 ]/gi, '') // Conservation des espaces & caractères alphanumérique
|
|
12
|
+
.split(' ').filter(str => str.length >= minWordsForDesignation && !wordsToExclude.includes(str)) // Suppression des mots à exclure et désignation inférieur à 3 char
|
|
13
|
+
.join(' ').replace(/[^a-z]/gi, ''); // Conservation des caractères alphanumérique
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=clean.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../ts/utils/stringUtils/clean.ts"],"names":[],"mappings":";;;;;QAGgB,a,GAAA,a;AAHhB,MAAM,cAAc,GAAG,CAAC,QAAD,EAAW,aAAX,EAA0B,SAA1B,EAAqC,cAArC,EAAqD,OAArD,EAA8D,MAA9D,EAAsE,QAAtE,EAAgF,MAAhF,EAAwF,OAAxF,EAAiG,MAAjG,CAAvB;AACO,MAAM,sBAAsB,WAAtB,sBAAsB,GAAG,CAA/B;;AAED,SAAU,aAAV,CAAwB,MAAxB,EAAsC;AAC1C,SAAO,MAAM,CACV,WADI,GAEJ,OAFI,CAEI,cAFJ,EAEoB,EAFpB,EAEwB;AAFxB,GAGJ,KAHI,CAGE,GAHF,EAIJ,MAJI,CAII,GAAD,IAAS,GAAG,CAAC,MAAJ,IAAc,sBAAd,IAAwC,CAAC,cAAc,CAAC,QAAf,CAAwB,GAAxB,CAJrD,EAImF;AAJnF,GAKJ,IALI,CAKC,GALD,EAMJ,OANI,CAMI,UANJ,EAMgB,EANhB,CAAP,CAD0C,CAOd;AAC7B","sourcesContent":["const wordsToExclude = ['cheque', 'prelevement', 'cheques', 'prelevements', 'prlvt', 'prlv', 'valeur', 'euro', 'solde', 'dont'];\nexport const minWordsForDesignation = 3;\n\nexport function cleanForRules(string: string) : string {\n return string\n .toLowerCase()\n .replace(/[^a-z0-9 ]/gi, '') // Conservation des espaces & caractères alphanumérique\n .split(' ')\n .filter((str) => str.length >= minWordsForDesignation && !wordsToExclude.includes(str)) // Suppression des mots à exclure et désignation inférieur à 3 char\n .join(' ')\n .replace(/[^a-z]/gi, ''); // Conservation des caractères alphanumérique\n}"],"sourceRoot":"","file":"clean.js"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _clean = require("./clean");
|
|
8
|
+
|
|
9
|
+
Object.keys(_clean).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () {
|
|
14
|
+
return _clean[key];
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../ts/utils/stringUtils/index.ts"],"names":[],"mappings":";;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from './clean';\n"],"sourceRoot":"","file":"index.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.21",
|
|
4
4
|
"description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
|
|
5
5
|
"homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
|
|
6
6
|
"main": "js/index.js",
|
|
@@ -2,13 +2,14 @@ import { Resource } from '../Resource';
|
|
|
2
2
|
import {
|
|
3
3
|
ISocietyPartner,
|
|
4
4
|
CreatePartner,
|
|
5
|
+
GetPartners,
|
|
5
6
|
} from '../../types';
|
|
6
7
|
|
|
7
8
|
export class Partner extends Resource {
|
|
8
9
|
create(params: CreatePartner): Promise<ISocietyPartner> {
|
|
9
10
|
return this.axios.$post('partner', params);
|
|
10
11
|
}
|
|
11
|
-
getAll(): Promise<ISocietyPartner[]> {
|
|
12
|
-
return this.axios.$get('partners');
|
|
12
|
+
getAll(params: GetPartners): Promise<ISocietyPartner[]> {
|
|
13
|
+
return this.axios.$get('partners', { params });
|
|
13
14
|
}
|
|
14
15
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Resource } from '../Resource';
|
|
2
|
+
import { RetrieveUpcomingInvoiceParams, ReadUpcomingInvoice } from '../../types';
|
|
3
|
+
|
|
4
|
+
export class Subscription extends Resource {
|
|
5
|
+
retrieveUpcomingInvoice(params: RetrieveUpcomingInvoiceParams): Promise<ReadUpcomingInvoice> {
|
|
6
|
+
return this.axios.$get('/subscription/next-invoice', { params });
|
|
7
|
+
}
|
|
8
|
+
}
|
package/ts/api/resources.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { IncomeStatement } from './resources/IncomeStatement';
|
|
|
18
18
|
import { BalanceSheet } from './resources/BalanceSheet';
|
|
19
19
|
import { Cerfa } from './resources/Cerfa';
|
|
20
20
|
import { LegalForm } from './resources/LegalForm';
|
|
21
|
+
import { Subscription } from './resources/Subscription';
|
|
21
22
|
import { Authenticate } from './resources/Authenticate';
|
|
22
23
|
import { Search } from './resources/Search';
|
|
23
24
|
|
|
@@ -44,4 +45,5 @@ export const resources = {
|
|
|
44
45
|
legalForm: LegalForm,
|
|
45
46
|
authenticate: Authenticate,
|
|
46
47
|
search: Search,
|
|
48
|
+
subscription: Subscription,
|
|
47
49
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
2
|
+
|
|
3
|
+
export class CreateAccountSociety {
|
|
4
|
+
@ApiProperty()
|
|
5
|
+
number: number;
|
|
6
|
+
|
|
7
|
+
@ApiProperty()
|
|
8
|
+
name: string;
|
|
9
|
+
|
|
10
|
+
@ApiProperty()
|
|
11
|
+
idParentAccount: number;
|
|
12
|
+
|
|
13
|
+
@ApiPropertyOptional()
|
|
14
|
+
idVat?: number;
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
2
|
+
|
|
3
|
+
export class QueryAccountSociety {
|
|
4
|
+
@ApiProperty()
|
|
5
|
+
page: number;
|
|
6
|
+
|
|
7
|
+
@ApiProperty()
|
|
8
|
+
limit: number;
|
|
9
|
+
|
|
10
|
+
@ApiProperty()
|
|
11
|
+
descending: boolean;
|
|
12
|
+
|
|
13
|
+
@ApiPropertyOptional()
|
|
14
|
+
accountClass?: number;
|
|
15
|
+
|
|
16
|
+
@ApiPropertyOptional()
|
|
17
|
+
search?: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
2
|
+
|
|
3
|
+
export class UpdateAccountSociety {
|
|
4
|
+
@ApiProperty()
|
|
5
|
+
id: number;
|
|
6
|
+
|
|
7
|
+
@ApiPropertyOptional()
|
|
8
|
+
number?: number;
|
|
9
|
+
|
|
10
|
+
@ApiPropertyOptional()
|
|
11
|
+
name?: string;
|
|
12
|
+
|
|
13
|
+
// @ApiPropertyOptional() // value toujours à false lorsque ce décorateur est actif
|
|
14
|
+
isHidden?: boolean;
|
|
15
|
+
|
|
16
|
+
@ApiPropertyOptional()
|
|
17
|
+
idVat?: number | null;
|
|
18
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Code } from '../../models/IApiError';
|
|
2
|
+
|
|
3
|
+
export type ShineErrorResponse = {
|
|
4
|
+
code: Code;
|
|
5
|
+
message: string;
|
|
6
|
+
status: number;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export type ShineSuccessResponse = {
|
|
10
|
+
access_token: string;
|
|
11
|
+
expires_in: number;
|
|
12
|
+
id_token?: string;
|
|
13
|
+
refresh_token: string;
|
|
14
|
+
scope: string;
|
|
15
|
+
token_type: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type ShineTokenInformations = {
|
|
19
|
+
exp: number;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type ShineBankAccount = {
|
|
23
|
+
bankAccountId: string;
|
|
24
|
+
currentBalance:number;
|
|
25
|
+
currentBalanceFloat:number;
|
|
26
|
+
nextBalance:number;
|
|
27
|
+
nextBalanceFloat:number;
|
|
28
|
+
currency:string;
|
|
29
|
+
iban:string;
|
|
30
|
+
bic:string;
|
|
31
|
+
name:string;
|
|
32
|
+
ownerName:string;
|
|
33
|
+
trzWalletId:string;
|
|
34
|
+
type:string;
|
|
35
|
+
createdAt:number;
|
|
36
|
+
status:string;
|
|
37
|
+
uid:string;
|
|
38
|
+
companyProfileId:string;
|
|
39
|
+
updatedAt:number;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export type ShineBankTransaction = {
|
|
43
|
+
transactionId: string;
|
|
44
|
+
createdAt: number;
|
|
45
|
+
currency: string;
|
|
46
|
+
paymentMethod: string;
|
|
47
|
+
paymentProvider: string;
|
|
48
|
+
providerTransactionId: string;
|
|
49
|
+
status: string;
|
|
50
|
+
title: string;
|
|
51
|
+
titleLatinised: string;
|
|
52
|
+
type: 'payout' | 'payin';
|
|
53
|
+
uid: string;
|
|
54
|
+
updatedAt: number;
|
|
55
|
+
value: number;
|
|
56
|
+
bankTransferId: string;
|
|
57
|
+
transactionAt: number;
|
|
58
|
+
fee: number;
|
|
59
|
+
transferPayinSenderName: string;
|
|
60
|
+
feeType: string;
|
|
61
|
+
description: string;
|
|
62
|
+
category: string;
|
|
63
|
+
isRefund: false;
|
|
64
|
+
directDebitMandateId: string;
|
|
65
|
+
bankAccountId: string;
|
|
66
|
+
transactionSettledAt: number;
|
|
67
|
+
providerCardPaymentId: null;
|
|
68
|
+
providerCardTransactionId: null;
|
|
69
|
+
cardPaymentStatus: null;
|
|
70
|
+
isPersonal: false;
|
|
71
|
+
hasReceipts: false;
|
|
72
|
+
note: string;
|
|
73
|
+
isHidden: false;
|
|
74
|
+
authorizationReleasedAt: null;
|
|
75
|
+
refundTransactionId: null;
|
|
76
|
+
executedAt: null;
|
|
77
|
+
companyUserId: null;
|
|
78
|
+
initiatorName: null;
|
|
79
|
+
remainingAuthorized: null;
|
|
80
|
+
expectedReleaseDate: null;
|
|
81
|
+
cardPaymentMethod: null;
|
|
82
|
+
paymentCurrency: string;
|
|
83
|
+
is3DS: false
|
|
84
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
2
|
+
|
|
3
|
+
export class QuerySponsorship {
|
|
4
|
+
@ApiProperty()
|
|
5
|
+
page: number;
|
|
6
|
+
|
|
7
|
+
@ApiProperty()
|
|
8
|
+
limit: number;
|
|
9
|
+
|
|
10
|
+
@ApiPropertyOptional()
|
|
11
|
+
state?: number;
|
|
12
|
+
|
|
13
|
+
@ApiProperty()
|
|
14
|
+
idSociety?: number;
|
|
15
|
+
}
|
|
@@ -17,7 +17,7 @@ export interface IAccountingTransaction {
|
|
|
17
17
|
id?: number;
|
|
18
18
|
label: string | null;
|
|
19
19
|
invoiceNumber: string | null;
|
|
20
|
-
|
|
20
|
+
reference: string | null;
|
|
21
21
|
dateValue: Date;
|
|
22
22
|
dateLocked?: Date | null;
|
|
23
23
|
dateVerified?: Date | null;
|
|
@@ -55,6 +55,37 @@ export enum Code {
|
|
|
55
55
|
// Income statement
|
|
56
56
|
invalidIncomeStatementList = 'invalid_income_statement_list',
|
|
57
57
|
|
|
58
|
+
// Shine errors
|
|
59
|
+
AUTHORIZATION_CLIENT_NOT_FOUND = 'AUTHORIZATION_CLIENT_NOT_FOUND',
|
|
60
|
+
AUTHORIZATION_CLIENT_SECRET_DOES_NOT_MATCH = 'AUTHORIZATION_CLIENT_SECRET_DOES_NOT_MATCH',
|
|
61
|
+
AUTHORIZATION_REDIRECT_URI_DOES_NOT_MATCH = 'AUTHORIZATION_REDIRECT_URI_DOES_NOT_MATCH',
|
|
62
|
+
AUTHORIZATION_REQUESTED_SCOPE_NOT_AVAILABLE = 'AUTHORIZATION_REQUESTED_SCOPE_NOT_AVAILABLE',
|
|
63
|
+
AUTHORIZATION_REQUESTED_SCOPE_NOT_AUTHORIZED = 'AUTHORIZATION_REQUESTED_SCOPE_NOT_AUTHORIZED',
|
|
64
|
+
AUTHORIZATION_REQUESTED_SCOPE_MISSING_OPENID = 'AUTHORIZATION_REQUESTED_SCOPE_MISSING_OPENID',
|
|
65
|
+
AUTHORIZATION_CLIENT_STATUS_NOT_VALID = 'AUTHORIZATION_CLIENT_STATUS_NOT_VALID',
|
|
66
|
+
AUTHORIZATION_CODE_MISSING = 'AUTHORIZATION_CODE_MISSING',
|
|
67
|
+
AUTHORIZATION_CODE_NOT_FOUND = 'AUTHORIZATION_CODE_NOT_FOUND',
|
|
68
|
+
AUTHORIZATION_CODE_ALREADY_USED = 'AUTHORIZATION_CODE_ALREADY_USED',
|
|
69
|
+
AUTHORIZATION_CODE_EXPIRED = 'AUTHORIZATION_CODE_EXPIRED',
|
|
70
|
+
AUTHORIZATION_CODE_REDIRECT_URI_DOES_NOT_MATCH = 'AUTHORIZATION_CODE_REDIRECT_URI_DOES_NOT_MATCH',
|
|
71
|
+
AUTHORIZATION_ACCESS_TOKEN_EXPIRED = 'AUTHORIZATION_ACCESS_TOKEN_EXPIRED',
|
|
72
|
+
AUTHORIZATION_INVALID_ACCESS_TOKEN = 'AUTHORIZATION_INVALID_ACCESS_TOKEN',
|
|
73
|
+
AUTHORIZATION_MISSING_ACCESS_TOKEN = 'AUTHORIZATION_MISSING_ACCESS_TOKEN',
|
|
74
|
+
AUTHORIZATION_ACCESS_TOKEN_WRONG_AUDIENCE = 'AUTHORIZATION_ACCESS_TOKEN_WRONG_AUDIENCE',
|
|
75
|
+
AUTHORIZATION_ACCESS_TOKEN_MISSING_SCOPE = 'AUTHORIZATION_ACCESS_TOKEN_MISSING_SCOPE',
|
|
76
|
+
AUTHORIZATION_ACCESS_TOKEN_FORBIDDEN = 'AUTHORIZATION_ACCESS_TOKEN_FORBIDDEN',
|
|
77
|
+
AUTHORIZATION_UNSUPPORTED_RESPONSE_TYPE = 'AUTHORIZATION_UNSUPPORTED_RESPONSE_TYPE',
|
|
78
|
+
AUTHORIZATION_UNSUPPORTED_GRANT_TYPE = 'AUTHORIZATION_UNSUPPORTED_GRANT_TYPE',
|
|
79
|
+
AUTHORIZATION_REFRESH_TOKEN_MISSING = 'AUTHORIZATION_REFRESH_TOKEN_MISSING',
|
|
80
|
+
AUTHORIZATION_REFRESH_TOKEN_EXPIRED = 'AUTHORIZATION_REFRESH_TOKEN_EXPIRED',
|
|
81
|
+
AUTHORIZATION_REFRESH_TOKEN_INVALID = 'AUTHORIZATION_REFRESH_TOKEN_INVALID',
|
|
82
|
+
AUTHORIZATION_REFRESH_TOKEN_REDIRECT_URI_DOES_NOT_MATCH = 'AUTHORIZATION_REFRESH_TOKEN_REDIRECT_URI_DOES_NOT_MATCH',
|
|
83
|
+
AUTHORIZATION_REFRESH_TOKEN_REVOKED = 'AUTHORIZATION_REFRESH_TOKEN_REVOKED',
|
|
84
|
+
AUTHORIZATION_USER_NOT_AUTHORIZED = 'AUTHORIZATION_USER_NOT_AUTHORIZED',
|
|
85
|
+
responseNotManaged = 'response_not_managed',
|
|
86
|
+
bankAccountsError = 'bank_accounts_error',
|
|
87
|
+
refreshTokenError = 'refresh_token_error',
|
|
88
|
+
|
|
58
89
|
// Balance Sheet
|
|
59
90
|
invalidBalanceSheetList = 'invalid_balance_sheet_list',
|
|
60
91
|
|
|
@@ -70,6 +101,12 @@ export enum Code {
|
|
|
70
101
|
|
|
71
102
|
// Cerfa
|
|
72
103
|
civilityNotFound = 'civility_not_found',
|
|
104
|
+
|
|
105
|
+
// Sponsorship
|
|
106
|
+
emailAlreadyUsedForsponsorship = 'email_already_used_for_sponsorship',
|
|
107
|
+
idSocietyAlreadyUsedForsponsorship = 'idSociety_already_used_for_sponsorship',
|
|
108
|
+
sponsorshipCodeDoesntExist = 'sponsorship_code_doesnt_exist',
|
|
109
|
+
sponsorshipLinkDoesntExist = 'sponsorship_link_doesnt_exist',
|
|
73
110
|
}
|
|
74
111
|
|
|
75
112
|
export interface IApiError {
|
|
@@ -5,11 +5,14 @@ export interface IBankConnection {
|
|
|
5
5
|
id?: number;
|
|
6
6
|
login: string | null;
|
|
7
7
|
password: string | null;
|
|
8
|
+
token: string | null;
|
|
9
|
+
refreshToken: string | null;
|
|
10
|
+
expireAt: Date | null;
|
|
8
11
|
idBankList: number | null;
|
|
9
12
|
idSociety: number;
|
|
10
13
|
createdAt?: Date | null;
|
|
11
14
|
updatedAt?: Date | null;
|
|
12
15
|
|
|
13
16
|
// Associations
|
|
14
|
-
bankList
|
|
17
|
+
bankList?: IBankList;
|
|
15
18
|
}
|
|
@@ -9,7 +9,7 @@ import { IPartnerTransaction } from './IPartnerTransaction';
|
|
|
9
9
|
export interface IEngagementBankTransaction {
|
|
10
10
|
id?: number;
|
|
11
11
|
migrate: boolean;
|
|
12
|
-
|
|
12
|
+
reference: string | null;
|
|
13
13
|
dateValue: Date;
|
|
14
14
|
dateLocked: Date | null;
|
|
15
15
|
dateVerified: Date | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PartnerTransactionType } from '../../Enum/PartnerTransactionType';
|
|
2
2
|
import { IPartnerTransactionType } from './IPartnerTransactionType';
|
|
3
3
|
|
|
4
4
|
// partnersTransactions
|
|
@@ -6,12 +6,12 @@ export interface IPartnerTransaction {
|
|
|
6
6
|
id?: number;
|
|
7
7
|
tokenString: string | null;
|
|
8
8
|
tokenInteger: number | null;
|
|
9
|
-
idTypePartnerTransaction:
|
|
9
|
+
idTypePartnerTransaction: PartnerTransactionType;
|
|
10
10
|
idAccountingTransaction: number | null;
|
|
11
11
|
createdAt?: Date | null;
|
|
12
12
|
updatedAt?: Date | null;
|
|
13
13
|
idEngagementBankTransaction: number | null;
|
|
14
14
|
|
|
15
15
|
// Associations
|
|
16
|
-
typePartnerTransaction
|
|
16
|
+
typePartnerTransaction?: IPartnerTransactionType;
|
|
17
17
|
}
|
package/ts/types/index.ts
CHANGED
|
@@ -194,6 +194,7 @@ export * from './Interface/models/ISoftwareCompta';
|
|
|
194
194
|
export * from './Interface/models/ISource';
|
|
195
195
|
export * from './Interface/models/ISpecialOperation';
|
|
196
196
|
export * from './Interface/models/ISponsorshipLink';
|
|
197
|
+
export * from './Interface/models/ISponsorship';
|
|
197
198
|
export * from './Interface/models/IStatusSignature';
|
|
198
199
|
export * from './Interface/models/IStripeEvent';
|
|
199
200
|
export * from './Interface/models/ISupervision';
|
|
@@ -304,11 +305,13 @@ export * from './Enum/PartnerType';
|
|
|
304
305
|
export * from './Enum/ThirdPartyType';
|
|
305
306
|
export * from './Enum/FecFileDelimiter';
|
|
306
307
|
export * from './Enum/IncomeStatement';
|
|
308
|
+
export * from './Enum/PartnerTransactionType';
|
|
307
309
|
export * from './Enum/Vehicle';
|
|
308
310
|
export * from './Enum/VehicleType';
|
|
309
311
|
export * from './Enum/BalanceSheet';
|
|
310
312
|
export * from './Enum/LetterState';
|
|
311
313
|
export * from './Enum/DefaultPermissions';
|
|
314
|
+
export * from './Enum/SponsorshipEmailState';
|
|
312
315
|
export * from './Enum/Ged';
|
|
313
316
|
|
|
314
317
|
// Interfaces API
|
|
@@ -322,6 +325,10 @@ export * from './Interface/api/paymentExpectationCustomer/UpdatePaymentExpectati
|
|
|
322
325
|
export * from './Interface/api/paymentExpectationCustomer/CreatePaymentExpectationCustomer';
|
|
323
326
|
export * from './Interface/api/accountType/ReadAccountType';
|
|
324
327
|
export * from './Interface/api/account/QueryAccounts';
|
|
328
|
+
export * from './Interface/api/account/CreateAccountSociety';
|
|
329
|
+
export * from './Interface/api/account/UpdateAccountSociety';
|
|
330
|
+
export * from './Interface/api/account/QueryAccountSociety';
|
|
331
|
+
export * from './Interface/api/account/QueryGenericAccount';
|
|
325
332
|
export * from './Interface/api/accountingTransaction/QueryTransaction';
|
|
326
333
|
export * from './Interface/api/user/QueryConfirm';
|
|
327
334
|
export * from './Interface/api/user/QueryResendConfirmationLink';
|
|
@@ -349,6 +356,7 @@ export * from './Interface/api/letter/CreateLetter';
|
|
|
349
356
|
export * from './Interface/api/mailInvoice/CreateInvoiceMail';
|
|
350
357
|
export * from './Interface/api/mailInvoice/UpdateInvoiceMail';
|
|
351
358
|
export * from './Interface/api/partner/CreatePartner';
|
|
359
|
+
export * from './Interface/api/partner/GetPartners';
|
|
352
360
|
// export * from './Interface/api/generalLedger/GeneralLedgerQuery';
|
|
353
361
|
export * from './Interface/api/fecFile/CreateFecFile';
|
|
354
362
|
export * from './Interface/api/fecFile/ReadFecFile';
|
|
@@ -358,5 +366,10 @@ export * from './Interface/api/incomeStatement/ReadIncomeStatement';
|
|
|
358
366
|
export * from './Interface/api/balanceSheet/ReadBalanceSheet';
|
|
359
367
|
export * from './Interface/api/pappers/QueryPappers';
|
|
360
368
|
export * from './Interface/api/pappers/ReadPappers';
|
|
369
|
+
export * from './Interface/api/sponsorship/SendSponsorshipLink';
|
|
370
|
+
export * from './Interface/api/sponsorship/CreateSponsorship';
|
|
371
|
+
export * from './Interface/api/sponsorship/QuerySponsorship';
|
|
361
372
|
export * from './Interface/api/pappers/CreatePappers';
|
|
362
373
|
export * from './Interface/api/bankAccount/DeleteTransaction';
|
|
374
|
+
export * from './Interface/api/stripe/QueryStripe';
|
|
375
|
+
export * from './Interface/api/stripe/ReadStripe';
|
package/ts/utils/index.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const wordsToExclude = ['cheque', 'prelevement', 'cheques', 'prelevements', 'prlvt', 'prlv', 'valeur', 'euro', 'solde', 'dont'];
|
|
2
|
+
export const minWordsForDesignation = 3;
|
|
3
|
+
|
|
4
|
+
export function cleanForRules(string: string) : string {
|
|
5
|
+
return string
|
|
6
|
+
.toLowerCase()
|
|
7
|
+
.replace(/[^a-z0-9 ]/gi, '') // Conservation des espaces & caractères alphanumérique
|
|
8
|
+
.split(' ')
|
|
9
|
+
.filter((str) => str.length >= minWordsForDesignation && !wordsToExclude.includes(str)) // Suppression des mots à exclure et désignation inférieur à 3 char
|
|
10
|
+
.join(' ')
|
|
11
|
+
.replace(/[^a-z]/gi, ''); // Conservation des caractères alphanumérique
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './clean';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TypePartnerTransaction.d.ts","sourceRoot":"","sources":["../../../ts/types/Enum/TypePartnerTransaction.ts"],"names":[],"mappings":"AAAA,oBAAY,sBAAsB;IAChC,KAAK,IAAI;IACT,cAAc,IAAI;IAClB,KAAK,IAAI;IACT,KAAK,IAAI;CACV"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export var TypePartnerTransaction;
|
|
2
|
-
(function (TypePartnerTransaction) {
|
|
3
|
-
TypePartnerTransaction[TypePartnerTransaction["OTHER"] = 1] = "OTHER";
|
|
4
|
-
TypePartnerTransaction[TypePartnerTransaction["BUDGET_INSIGHT"] = 2] = "BUDGET_INSIGHT";
|
|
5
|
-
TypePartnerTransaction[TypePartnerTransaction["QONTO"] = 3] = "QONTO";
|
|
6
|
-
TypePartnerTransaction[TypePartnerTransaction["SHINE"] = 4] = "SHINE";
|
|
7
|
-
})(TypePartnerTransaction || (TypePartnerTransaction = {}));
|
|
8
|
-
//# sourceMappingURL=TypePartnerTransaction.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TypePartnerTransaction.js","sourceRoot":"","sources":["../../../ts/types/Enum/TypePartnerTransaction.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,sBAKX;AALD,WAAY,sBAAsB;IAChC,qEAAS,CAAA;IACT,uFAAkB,CAAA;IAClB,qEAAS,CAAA;IACT,qEAAS,CAAA;AACX,CAAC,EALW,sBAAsB,KAAtB,sBAAsB,QAKjC","sourcesContent":["export enum TypePartnerTransaction {\n OTHER = 1,\n BUDGET_INSIGHT = 2,\n QONTO = 3,\n SHINE = 4,\n}"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var TypePartnerTransaction = exports.TypePartnerTransaction = undefined;
|
|
7
|
-
|
|
8
|
-
(function (TypePartnerTransaction) {
|
|
9
|
-
TypePartnerTransaction[TypePartnerTransaction["OTHER"] = 1] = "OTHER";
|
|
10
|
-
TypePartnerTransaction[TypePartnerTransaction["BUDGET_INSIGHT"] = 2] = "BUDGET_INSIGHT";
|
|
11
|
-
TypePartnerTransaction[TypePartnerTransaction["QONTO"] = 3] = "QONTO";
|
|
12
|
-
TypePartnerTransaction[TypePartnerTransaction["SHINE"] = 4] = "SHINE";
|
|
13
|
-
})(TypePartnerTransaction || (exports.TypePartnerTransaction = TypePartnerTransaction = {}));
|
|
14
|
-
//# sourceMappingURL=TypePartnerTransaction.js.map
|