@silexpert/core 1.1.127 → 1.1.129
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/Das.d.ts +9 -0
- package/es/api/resources/Das.d.ts.map +1 -0
- package/es/api/resources/Das.js +17 -0
- package/es/api/resources/Das.js.map +1 -0
- package/es/types/Enum/Aspone.d.ts +2 -1
- package/es/types/Enum/Aspone.d.ts.map +1 -1
- package/es/types/Enum/Aspone.js +1 -0
- package/es/types/Enum/Aspone.js.map +1 -1
- package/es/types/Enum/BrandLegalstart.d.ts +16 -0
- package/es/types/Enum/BrandLegalstart.d.ts.map +1 -1
- package/es/types/Enum/BrandLegalstart.js +90 -0
- package/es/types/Enum/BrandLegalstart.js.map +1 -1
- package/es/types/Enum/CerfaType.d.ts +2 -1
- package/es/types/Enum/CerfaType.d.ts.map +1 -1
- package/es/types/Enum/CerfaType.js +1 -0
- package/es/types/Enum/CerfaType.js.map +1 -1
- package/es/types/Enum/Country.d.ts +4 -0
- package/es/types/Enum/Country.d.ts.map +1 -1
- package/es/types/Enum/Country.js +6440 -0
- package/es/types/Enum/Country.js.map +1 -1
- package/es/types/Enum/Das.d.ts +15 -0
- package/es/types/Enum/Das.d.ts.map +1 -0
- package/es/types/Enum/Das.js +22 -0
- package/es/types/Enum/Das.js.map +1 -0
- package/es/types/Enum/TimeCounterType.d.ts +7 -0
- package/es/types/Enum/TimeCounterType.d.ts.map +1 -1
- package/es/types/Enum/TimeCounterType.js +7 -0
- package/es/types/Enum/TimeCounterType.js.map +1 -1
- package/es/types/Interface/api/aspone/ReadInterchange.d.ts +1 -1
- package/es/types/Interface/api/aspone/ReadInterchange.d.ts.map +1 -1
- package/es/types/Interface/api/aspone/ReadInterchange.js.map +1 -1
- package/es/types/Interface/api/calendarEvent/createCalendarEvent.d.ts +1 -1
- package/es/types/Interface/api/calendarEvent/createCalendarEvent.d.ts.map +1 -1
- package/es/types/Interface/api/calendarEvent/createCalendarEvent.js +1 -1
- package/es/types/Interface/api/calendarEvent/createCalendarEvent.js.map +1 -1
- package/es/types/Interface/api/cerfa/ReadCerfa.d.ts +1 -0
- package/es/types/Interface/api/cerfa/ReadCerfa.d.ts.map +1 -1
- package/es/types/Interface/api/cerfa/ReadCerfa.js.map +1 -1
- package/es/types/Interface/api/cerfa/das2.d.ts +112 -0
- package/es/types/Interface/api/cerfa/das2.d.ts.map +1 -0
- package/es/types/Interface/api/cerfa/das2.js +65 -0
- package/es/types/Interface/api/cerfa/das2.js.map +1 -0
- package/es/types/Interface/models/IApiError.d.ts +2 -1
- package/es/types/Interface/models/IApiError.d.ts.map +1 -1
- package/es/types/Interface/models/IApiError.js +1 -0
- package/es/types/Interface/models/IApiError.js.map +1 -1
- package/es/types/Interface/models/IThirdParty.d.ts +1 -0
- package/es/types/Interface/models/IThirdParty.d.ts.map +1 -1
- package/es/types/Interface/models/IThirdParty.js.map +1 -1
- package/es/types/index.d.ts +2 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +2 -0
- package/es/types/index.js.map +1 -1
- package/es/utils/documents.js +1 -1
- package/es/utils/documents.js.map +1 -1
- package/es/utils/phone.d.ts +1 -0
- package/es/utils/phone.d.ts.map +1 -1
- package/es/utils/phone.js +8 -0
- package/es/utils/phone.js.map +1 -1
- package/js/api/resources/Das.js +26 -0
- package/js/api/resources/Das.js.map +1 -0
- package/js/types/Enum/Aspone.js +1 -0
- package/js/types/Enum/Aspone.js.map +1 -1
- package/js/types/Enum/BrandLegalstart.js +81 -1
- package/js/types/Enum/BrandLegalstart.js.map +1 -1
- package/js/types/Enum/CerfaType.js +1 -0
- package/js/types/Enum/CerfaType.js.map +1 -1
- package/js/types/Enum/Country.js +19315 -0
- package/js/types/Enum/Country.js.map +1 -1
- package/js/types/Enum/Das.js +42 -0
- package/js/types/Enum/Das.js.map +1 -0
- package/js/types/Enum/TimeCounterType.js +7 -0
- package/js/types/Enum/TimeCounterType.js.map +1 -1
- package/js/types/Interface/api/aspone/ReadInterchange.js.map +1 -1
- package/js/types/Interface/api/calendarEvent/createCalendarEvent.js +1 -1
- package/js/types/Interface/api/calendarEvent/createCalendarEvent.js.map +1 -1
- package/js/types/Interface/api/cerfa/ReadCerfa.js.map +1 -1
- package/js/types/Interface/api/cerfa/das2.js +36 -0
- package/js/types/Interface/api/cerfa/das2.js.map +1 -0
- package/js/types/Interface/models/IApiError.js +1 -0
- package/js/types/Interface/models/IApiError.js.map +1 -1
- package/js/types/Interface/models/IThirdParty.js.map +1 -1
- package/js/types/index.js +20 -0
- package/js/types/index.js.map +1 -1
- package/js/utils/documents.js +1 -1
- package/js/utils/documents.js.map +1 -1
- package/js/utils/phone.js +9 -0
- package/js/utils/phone.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Das.ts +21 -0
- package/ts/types/Enum/Aspone.ts +1 -0
- package/ts/types/Enum/BrandLegalstart.ts +91 -0
- package/ts/types/Enum/CerfaType.ts +1 -0
- package/ts/types/Enum/Country.ts +6441 -0
- package/ts/types/Enum/Das.ts +21 -0
- package/ts/types/Enum/TimeCounterType.ts +7 -0
- package/ts/types/Interface/api/aspone/ReadInterchange.ts +1 -1
- package/ts/types/Interface/api/calendarEvent/createCalendarEvent.ts +2 -2
- package/ts/types/Interface/api/cerfa/ReadCerfa.ts +1 -1
- package/ts/types/Interface/api/cerfa/das2.ts +142 -0
- package/ts/types/Interface/models/IApiError.ts +1 -0
- package/ts/types/Interface/models/IThirdParty.ts +1 -0
- package/ts/types/index.ts +2 -0
- package/ts/utils/documents.ts +1 -1
- package/ts/utils/phone.ts +12 -0
package/js/utils/documents.js
CHANGED
|
@@ -8,7 +8,7 @@ var _Ged = require("../types/Enum/Ged");
|
|
|
8
8
|
var _LegalForm = require("../types/Enum/LegalForm");
|
|
9
9
|
const requiredListDocs = (idLegalForm, isOnlyPrevi, isOnlyJuridic, isOnlySocial, isCreation) => {
|
|
10
10
|
if (isOnlyPrevi) {
|
|
11
|
-
return [_Ged.GedFileType.IDENTITY_CARD, _Ged.GedFileType.PLAQUETTE
|
|
11
|
+
return [_Ged.GedFileType.IDENTITY_CARD, _Ged.GedFileType.PLAQUETTE];
|
|
12
12
|
}
|
|
13
13
|
if (isCreation || isOnlyJuridic || isOnlySocial) {
|
|
14
14
|
return [_Ged.GedFileType.RIB, _Ged.GedFileType.PLAQUETTE];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documents.js","names":["_Ged","require","_LegalForm","requiredListDocs","idLegalForm","isOnlyPrevi","isOnlyJuridic","isOnlySocial","isCreation","GedFileType","IDENTITY_CARD","PLAQUETTE","RIB","
|
|
1
|
+
{"version":3,"file":"documents.js","names":["_Ged","require","_LegalForm","requiredListDocs","idLegalForm","isOnlyPrevi","isOnlyJuridic","isOnlySocial","isCreation","GedFileType","IDENTITY_CARD","PLAQUETTE","RIB","generique","LegalForm","SAS","id","SA","includes","push","DISTRIBUTION_OF_SHARE","SELARLU","EURL","SASU","SARL","SCI","EARL","KBIS","STATUTES","DBE2","SEPA","SELARL","EI","AUTO_ENTREPRENEUR","SIRENE","EIRL","PATRIMONY","ASSOCIATION","RULES_OF_PROCEDURE","REGISTRATION_OF_THE_ASSOCIATION_AT_THE_PREFECTURE","REPRESENTATIVE_OF_THE_ASSOCIATION","exports"],"sources":["../../ts/utils/documents.ts"],"sourcesContent":["import { GedFileType } from '../types/Enum/Ged';\nimport { LegalForm } from '../types/Enum/LegalForm';\n\nconst requiredListDocs = (idLegalForm: number, isOnlyPrevi?: boolean, isOnlyJuridic?: boolean, isOnlySocial?: boolean, isCreation?: boolean): GedFileType[] => {\n if (isOnlyPrevi) {\n return [GedFileType.IDENTITY_CARD, GedFileType.PLAQUETTE];\n }\n if (isCreation || isOnlyJuridic || isOnlySocial) {\n return [GedFileType.RIB, GedFileType.PLAQUETTE];\n }\n\n const generique = [GedFileType.IDENTITY_CARD, GedFileType.RIB, GedFileType.PLAQUETTE];\n\n if ([LegalForm.SAS.id, LegalForm.SA.id].includes(idLegalForm)) {\n generique.push(GedFileType.DISTRIBUTION_OF_SHARE);\n }\n\n if ([LegalForm.SELARLU.id, LegalForm.EURL.id, LegalForm.SASU.id, LegalForm.SA.id, LegalForm.SAS.id, LegalForm.SARL.id, LegalForm.SCI.id, LegalForm.EARL.id].includes(idLegalForm)) {\n return [...generique, GedFileType.KBIS, GedFileType.STATUTES, GedFileType.DBE2, GedFileType.SEPA];\n }\n if ([LegalForm.SELARL.id].includes(idLegalForm)) {\n return [...generique, GedFileType.KBIS, GedFileType.STATUTES, GedFileType.SEPA];\n }\n if ([LegalForm.EI.id, LegalForm.AUTO_ENTREPRENEUR.id].includes(idLegalForm)) {\n return [...generique, GedFileType.SIRENE, GedFileType.SEPA];\n }\n if ([LegalForm.EIRL.id].includes(idLegalForm)) {\n return [...generique, GedFileType.SIRENE, GedFileType.SEPA, GedFileType.PATRIMONY];\n }\n if ([LegalForm.ASSOCIATION.id].includes(idLegalForm)) {\n return [...generique, GedFileType.RULES_OF_PROCEDURE, GedFileType.REGISTRATION_OF_THE_ASSOCIATION_AT_THE_PREFECTURE, GedFileType.REPRESENTATIVE_OF_THE_ASSOCIATION];\n }\n return generique;\n};\n\nexport {\n requiredListDocs,\n};"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAEA,MAAME,gBAAgB,GAAGA,CAACC,WAAmB,EAAEC,WAAqB,EAAEC,aAAuB,EAAEC,YAAsB,EAAEC,UAAoB,KAAmB;EAC5J,IAAIH,WAAW,EAAE;IACf,OAAO,CAACI,gBAAW,CAACC,aAAa,EAAED,gBAAW,CAACE,SAAS,CAAC;;EAE3D,IAAIH,UAAU,IAAIF,aAAa,IAAIC,YAAY,EAAE;IAC/C,OAAO,CAACE,gBAAW,CAACG,GAAG,EAAEH,gBAAW,CAACE,SAAS,CAAC;;EAGjD,MAAME,SAAS,GAAG,CAACJ,gBAAW,CAACC,aAAa,EAAED,gBAAW,CAACG,GAAG,EA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ACqB,IAAI,CAACnB,EAAE,CAAC,CAACE,QAAQ,CAACd,WAAW,CAAC,EAAE;IAC7C,OAAO,CAAC,GAAGS,SAAS,EAAEJ,gBAAW,CAACyB,MAAM,EAAEzB,gBAAW,CAACqB,IAAI,EAAErB,gBAAW,CAAC2B,SAAS,CAAC;;EAEpF,IAAI,CAACtB,oBAAS,CAACuB,WAAW,CAACrB,EAAE,CAAC,CAACE,QAAQ,CAACd,WAAW,CAAC,EAAE;IACpD,OAAO,CAAC,GAAGS,SAAS,EAAEJ,gBAAW,CAAC6B,kBAAkB,EAAE7B,gBAAW,CAAC8B,iDAAiD,EAAE9B,gBAAW,CAAC+B,iCAAiC,CAAC;;EAErK,OAAO3B,SAAS;AAClB,CAAC;AAAC4B,OAAA,CAGAtC,gBAAgB,GAAhBA,gBAAgB"}
|
package/js/utils/phone.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.formatPhoneNumberToE164 = formatPhoneNumberToE164;
|
|
|
7
7
|
exports.getPhoneNumberWithoutPrefix = getPhoneNumberWithoutPrefix;
|
|
8
8
|
exports.countSegmentsFromMessage = countSegmentsFromMessage;
|
|
9
9
|
exports.getPhoneNumberFromRoles = getPhoneNumberFromRoles;
|
|
10
|
+
exports.formatPhoneNumberToNational = formatPhoneNumberToNational;
|
|
10
11
|
var _smsSegmentsCalculator = require("sms-segments-calculator");
|
|
11
12
|
var _Phone = require("../types/Enum/Phone");
|
|
12
13
|
var _Role = require("../types/Enum/Role");
|
|
@@ -61,4 +62,12 @@ function getPhoneNumberFromRoles(roles, attribute = 'phoneNumber') {
|
|
|
61
62
|
}
|
|
62
63
|
return null;
|
|
63
64
|
}
|
|
65
|
+
function formatPhoneNumberToNational(phoneNumber) {
|
|
66
|
+
const phoneWithoutSpace = phoneNumber.replace(/ /g, '');
|
|
67
|
+
if (phoneWithoutSpace === null || phoneWithoutSpace === void 0 ? void 0 : phoneWithoutSpace.startsWith('+33')) {
|
|
68
|
+
return phoneWithoutSpace.replace('+33', '0');
|
|
69
|
+
}
|
|
70
|
+
// Fonction à mettre à jour en fonction des cas de notre bdd
|
|
71
|
+
return phoneWithoutSpace;
|
|
72
|
+
}
|
|
64
73
|
//# sourceMappingURL=phone.js.map
|
package/js/utils/phone.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone.js","names":["formatPhoneNumberToE164","exports","getPhoneNumberWithoutPrefix","countSegmentsFromMessage","getPhoneNumberFromRoles","_smsSegmentsCalculator","require","_Phone","_Role","_RoleDetail","phoneNumber","prefix","charAt","numberInt","replace","length","substring","number","Object","keys","PhonePrefix","map","index","forEach","message","SegmentedMessage","segmentsCount","roles","attribute","some","role","Role","FRONT_OFFICE","EXPERT_ACCOUNTANT","includes","RoleDetail","FRONT_OFFICE_EXPRESS","COMMERCIAL","FACTURATION","CUSTOMER_SUCCESS","JURIDIC","JURIDICAL_SUPPORT","SOCIAL"],"sources":["../../ts/utils/phone.ts"],"sourcesContent":["import { SegmentedMessage } from 'sms-segments-calculator';\nimport { PhonePrefix } from '../types/Enum/Phone';\nimport { Role } from '../types/Enum/Role';\nimport { RoleDetail } from '../types/Enum/RoleDetail';\n\nexport function formatPhoneNumberToE164(phoneNumber: string | null, prefix = '+33'): string | null {\n if (!phoneNumber) return null;\n if (phoneNumber.charAt(0) !== '+' && phoneNumber.charAt(0) === '0') {\n const numberInt = phoneNumber.replace(/\\D/g, '');\n if (prefix) {\n if (numberInt.length === 10 && numberInt.charAt(0) === '0') {\n return `${prefix}${numberInt.substring(1)}`;\n }\n return `${prefix}${numberInt}`;\n }\n if (numberInt.charAt(0) === '0' && numberInt.length === 10) return `+33${numberInt.substring(1)}`;\n return numberInt;\n }\n return phoneNumber;\n}\n\nexport function getPhoneNumberWithoutPrefix(phoneNumber: string): string {\n let number = phoneNumber;\n // @ts-ignore\n Object.keys(PhonePrefix).map((index) => PhonePrefix[index].prefix).forEach((prefix) => {\n number = number.replace(prefix, '');\n });\n return number;\n}\n\nexport function countSegmentsFromMessage(message: string): number {\n return new SegmentedMessage(message, 'auto').segmentsCount;\n}\n\nexport function getPhoneNumberFromRoles(roles: number[], attribute: 'phoneNumber' | 'phoneNumberPourcentage' | 'phoneNumberStatutsExpress' = 'phoneNumber'): string | null {\n if (roles.some((role) => [Role.FRONT_OFFICE, Role.EXPERT_ACCOUNTANT].includes(role))) {\n return RoleDetail.FRONT_OFFICE[attribute];\n }\n\n if (roles.some((role) => [Role.FRONT_OFFICE_EXPRESS].includes(role))) {\n return RoleDetail.FRONT_OFFICE_EXPRESS[attribute];\n }\n\n if (roles.some((role) => [Role.COMMERCIAL].includes(role))) {\n return RoleDetail.COMMERCIAL[attribute];\n }\n\n if (roles.some((role) => [Role.FACTURATION].includes(role))) {\n return RoleDetail.FACTURATION[attribute];\n }\n\n if (roles.some((role) => [Role.CUSTOMER_SUCCESS].includes(role))) {\n return RoleDetail.CUSTOMER_SUCCESS[attribute];\n }\n\n if (roles.some((role) => [Role.JURIDIC, Role.JURIDICAL_SUPPORT].includes(role))) {\n return RoleDetail.JURIDIC[attribute];\n }\n\n if (roles.some((role) => [Role.SOCIAL].includes(role))) {\n return RoleDetail.SOCIAL[attribute];\n }\n\n return null;\n}"],"mappings":";;;;;QAKgBA,uBAAuB,GAAvBA,uBAAuB;AAAAC,OAAA,CAgBvBC,2BAA2B,GAA3BA,2BAA2B;AAAAD,OAAA,CAS3BE,wBAAwB,GAAxBA,wBAAwB;AAAAF,OAAA,CAIxBG,uBAAuB,GAAvBA,uBAAuB;
|
|
1
|
+
{"version":3,"file":"phone.js","names":["formatPhoneNumberToE164","exports","getPhoneNumberWithoutPrefix","countSegmentsFromMessage","getPhoneNumberFromRoles","formatPhoneNumberToNational","_smsSegmentsCalculator","require","_Phone","_Role","_RoleDetail","phoneNumber","prefix","charAt","numberInt","replace","length","substring","number","Object","keys","PhonePrefix","map","index","forEach","message","SegmentedMessage","segmentsCount","roles","attribute","some","role","Role","FRONT_OFFICE","EXPERT_ACCOUNTANT","includes","RoleDetail","FRONT_OFFICE_EXPRESS","COMMERCIAL","FACTURATION","CUSTOMER_SUCCESS","JURIDIC","JURIDICAL_SUPPORT","SOCIAL","phoneWithoutSpace","startsWith"],"sources":["../../ts/utils/phone.ts"],"sourcesContent":["import { SegmentedMessage } from 'sms-segments-calculator';\nimport { PhonePrefix } from '../types/Enum/Phone';\nimport { Role } from '../types/Enum/Role';\nimport { RoleDetail } from '../types/Enum/RoleDetail';\n\nexport function formatPhoneNumberToE164(phoneNumber: string | null, prefix = '+33'): string | null {\n if (!phoneNumber) return null;\n if (phoneNumber.charAt(0) !== '+' && phoneNumber.charAt(0) === '0') {\n const numberInt = phoneNumber.replace(/\\D/g, '');\n if (prefix) {\n if (numberInt.length === 10 && numberInt.charAt(0) === '0') {\n return `${prefix}${numberInt.substring(1)}`;\n }\n return `${prefix}${numberInt}`;\n }\n if (numberInt.charAt(0) === '0' && numberInt.length === 10) return `+33${numberInt.substring(1)}`;\n return numberInt;\n }\n return phoneNumber;\n}\n\nexport function getPhoneNumberWithoutPrefix(phoneNumber: string): string {\n let number = phoneNumber;\n // @ts-ignore\n Object.keys(PhonePrefix).map((index) => PhonePrefix[index].prefix).forEach((prefix) => {\n number = number.replace(prefix, '');\n });\n return number;\n}\n\nexport function countSegmentsFromMessage(message: string): number {\n return new SegmentedMessage(message, 'auto').segmentsCount;\n}\n\nexport function getPhoneNumberFromRoles(roles: number[], attribute: 'phoneNumber' | 'phoneNumberPourcentage' | 'phoneNumberStatutsExpress' = 'phoneNumber'): string | null {\n if (roles.some((role) => [Role.FRONT_OFFICE, Role.EXPERT_ACCOUNTANT].includes(role))) {\n return RoleDetail.FRONT_OFFICE[attribute];\n }\n\n if (roles.some((role) => [Role.FRONT_OFFICE_EXPRESS].includes(role))) {\n return RoleDetail.FRONT_OFFICE_EXPRESS[attribute];\n }\n\n if (roles.some((role) => [Role.COMMERCIAL].includes(role))) {\n return RoleDetail.COMMERCIAL[attribute];\n }\n\n if (roles.some((role) => [Role.FACTURATION].includes(role))) {\n return RoleDetail.FACTURATION[attribute];\n }\n\n if (roles.some((role) => [Role.CUSTOMER_SUCCESS].includes(role))) {\n return RoleDetail.CUSTOMER_SUCCESS[attribute];\n }\n\n if (roles.some((role) => [Role.JURIDIC, Role.JURIDICAL_SUPPORT].includes(role))) {\n return RoleDetail.JURIDIC[attribute];\n }\n\n if (roles.some((role) => [Role.SOCIAL].includes(role))) {\n return RoleDetail.SOCIAL[attribute];\n }\n\n return null;\n}\n\nexport function formatPhoneNumberToNational(phoneNumber: string): string {\n\n const phoneWithoutSpace = phoneNumber.replace(/ /g, '');\n\n if (phoneWithoutSpace?.startsWith('+33')) {\n return phoneWithoutSpace.replace('+33', '0');\n }\n\n // Fonction à mettre à jour en fonction des cas de notre bdd\n return phoneWithoutSpace;\n}"],"mappings":";;;;;QAKgBA,uBAAuB,GAAvBA,uBAAuB;AAAAC,OAAA,CAgBvBC,2BAA2B,GAA3BA,2BAA2B;AAAAD,OAAA,CAS3BE,wBAAwB,GAAxBA,wBAAwB;AAAAF,OAAA,CAIxBG,uBAAuB,GAAvBA,uBAAuB;AAAAH,OAAA,CAgCvBI,2BAA2B,GAA3BA,2BAA2B;AAlE3C,IAAAC,sBAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAEM,SAAUP,uBAAuBA,CAACW,WAA0B,EAAEC,MAAM,GAAG,KAAK;EAChF,IAAI,CAACD,WAAW,EAAE,OAAO,IAAI;EAC7B,IAAIA,WAAW,CAACE,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,IAAIF,WAAW,CAACE,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;IAClE,MAAMC,SAAS,GAAGH,WAAW,CAACI,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;IAChD,IAAIH,MAAM,EAAE;MACV,IAAIE,SAAS,CAACE,MAAM,KAAK,EAAE,IAAIF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AAiB,CAAC7B,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;;EAG9C;EACA,OAAO6B,iBAAiB;AAC1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.129",
|
|
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",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CreateDasRegistration, DeclareDasRegistration, QueryDasTransaction, ReadFormattedAccountingTransaction, ReadRegistration } from '../../types';
|
|
2
|
+
import { Resource } from '../Resource';
|
|
3
|
+
|
|
4
|
+
export class Das extends Resource {
|
|
5
|
+
//
|
|
6
|
+
getAllTransactions(idSociety: number, query: QueryDasTransaction): Promise<ReadFormattedAccountingTransaction[]> {
|
|
7
|
+
return this.axios.$get(`/societies/${idSociety}/das/transactions`, { params: query });
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
createRegistration(idSociety: number, payload: CreateDasRegistration): Promise<ReadRegistration> {
|
|
11
|
+
return this.axios.$post(`/societies/${idSociety}/das`, payload);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare(idSociety: number, idRegistration: number, payload: DeclareDasRegistration): Promise<ReadRegistration> {
|
|
15
|
+
return this.axios.$post(`/societies/${idSociety}/das/${idRegistration}/declare`, payload);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
preview(idSociety: number, payload: DeclareDasRegistration): Promise<string> {
|
|
19
|
+
return this.axios.$post(`/societies/${idSociety}/das/preview`, payload);
|
|
20
|
+
}
|
|
21
|
+
}
|
package/ts/types/Enum/Aspone.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PrestationType } from './PrestationType';
|
|
2
|
+
|
|
1
3
|
export const BrandLegalstart = [
|
|
2
4
|
{
|
|
3
5
|
idTypeBrand: 1,
|
|
@@ -102,5 +104,94 @@ export const BrandLegalstart = [
|
|
|
102
104
|
name: 'Télétravail',
|
|
103
105
|
},
|
|
104
106
|
},
|
|
107
|
+
salesContractConfig: [
|
|
108
|
+
// pour les pages statiques
|
|
109
|
+
{
|
|
110
|
+
label: 'Page d\'introduction',
|
|
111
|
+
name: 'page_intro',
|
|
112
|
+
needBgImage: true,
|
|
113
|
+
versionable: false,
|
|
114
|
+
idPrestationType: [PrestationType.COMPTA_PRO_COMPTASTART, PrestationType.COMPTA_PRO_COMPTASTART_EXPRESS],
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
label: 'Page chiffres',
|
|
118
|
+
name: 'page_numbers',
|
|
119
|
+
needBgImage: true,
|
|
120
|
+
versionable: false,
|
|
121
|
+
idPrestationType: [PrestationType.COMPTA_PRO_COMPTASTART, PrestationType.COMPTA_PRO_COMPTASTART_EXPRESS],
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
label: 'Page simplifié',
|
|
125
|
+
name: 'page_simplified',
|
|
126
|
+
needBgImage: true,
|
|
127
|
+
versionable: false,
|
|
128
|
+
idPrestationType: [PrestationType.COMPTA_PRO_COMPTASTART, PrestationType.COMPTA_PRO_COMPTASTART_EXPRESS],
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
label: 'Détail de la lettre de mission',
|
|
132
|
+
name: 'page_detail_ldm',
|
|
133
|
+
needBgImage: false,
|
|
134
|
+
versionable: false,
|
|
135
|
+
idPrestationType: [PrestationType.COMPTA_PRO_COMPTASTART], // Prestations non express
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
label: 'Détail de la lettre de mission (express)',
|
|
139
|
+
name: 'page_detail_ldm_back',
|
|
140
|
+
needBgImage: false,
|
|
141
|
+
versionable: false,
|
|
142
|
+
idPrestationType: [PrestationType.COMPTA_PRO_COMPTASTART_EXPRESS], // Prestations express
|
|
143
|
+
},
|
|
144
|
+
// pour les pages dynamiques
|
|
145
|
+
{
|
|
146
|
+
label: 'Compta Pro Comptastart',
|
|
147
|
+
name: 'bloc_compta_pro',
|
|
148
|
+
needBgImage: false,
|
|
149
|
+
versionable: true,
|
|
150
|
+
idPrestationType: [PrestationType.COMPTA_PRO_COMPTASTART, PrestationType.COMPTA_PRO_COMPTASTART_EXPRESS],
|
|
151
|
+
keyName: 'isWithApplicationFees',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
label: 'Compta Pro Comptastart sur mesure',
|
|
155
|
+
name: 'bloc_compta_pro_sm',
|
|
156
|
+
needBgImage: false,
|
|
157
|
+
versionable: false,
|
|
158
|
+
idPrestationType: [],
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
label: 'Signature',
|
|
162
|
+
name: 'bloc_sign',
|
|
163
|
+
needBgImage: false,
|
|
164
|
+
idPrestationType: [PrestationType.COMPTA_PRO_COMPTASTART, PrestationType.COMPTA_PRO_COMPTASTART_EXPRESS],
|
|
165
|
+
versionable: false,
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
label: 'Conditions Générals de Vente (CGV) 1/2',
|
|
169
|
+
name: 'bloc_cgv_first',
|
|
170
|
+
needBgImage: false,
|
|
171
|
+
idPrestationType: [PrestationType.COMPTA_PRO_COMPTASTART, PrestationType.COMPTA_PRO_COMPTASTART_EXPRESS],
|
|
172
|
+
versionable: false,
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
label: 'Conditions Générals de Vente (CGV) 2/2',
|
|
176
|
+
name: 'bloc_cgv_second',
|
|
177
|
+
needBgImage: false,
|
|
178
|
+
idPrestationType: [PrestationType.COMPTA_PRO_COMPTASTART, PrestationType.COMPTA_PRO_COMPTASTART_EXPRESS],
|
|
179
|
+
versionable: false,
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
label: 'Mandat de prélèvement SEPA',
|
|
183
|
+
name: 'bloc_sepa',
|
|
184
|
+
needBgImage: false,
|
|
185
|
+
idPrestationType: [PrestationType.COMPTA_PRO_COMPTASTART, PrestationType.COMPTA_PRO_COMPTASTART_EXPRESS],
|
|
186
|
+
versionable: false,
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
label: 'Pièces à nous envoyer',
|
|
190
|
+
name: 'bloc_send_files',
|
|
191
|
+
needBgImage: false,
|
|
192
|
+
idPrestationType: [PrestationType.COMPTA_PRO_COMPTASTART, PrestationType.COMPTA_PRO_COMPTASTART_EXPRESS],
|
|
193
|
+
versionable: false,
|
|
194
|
+
},
|
|
195
|
+
],
|
|
105
196
|
},
|
|
106
197
|
];
|