@silexpert/core 1.3.59 → 1.3.60
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/dist/cjs/api/resources/Subscription.d.ts +2 -2
- package/dist/cjs/api/resources/Subscription.d.ts.map +1 -1
- package/dist/cjs/api/resources/Subscription.js +3 -4
- package/dist/cjs/api/resources/Subscription.js.map +1 -1
- package/dist/cjs/api/resources/User.d.ts +2 -1
- package/dist/cjs/api/resources/User.d.ts.map +1 -1
- package/dist/cjs/api/resources/User.js +3 -0
- package/dist/cjs/api/resources/User.js.map +1 -1
- package/dist/cjs/api/resources.d.ts +0 -4
- package/dist/cjs/api/resources.d.ts.map +1 -1
- package/dist/cjs/api/resources.js +0 -4
- package/dist/cjs/api/resources.js.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheet.js +12 -12
- package/dist/cjs/types/Enum/BalanceSheet.js.map +1 -1
- package/dist/cjs/types/Enum/PrestationType.js +8 -8
- package/dist/cjs/types/Enum/PrestationType.js.map +1 -1
- package/dist/cjs/types/Interface/api/commercial/RequiredDocsTypeParams.d.ts +1 -0
- package/dist/cjs/types/Interface/api/commercial/RequiredDocsTypeParams.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/commercial/RequiredDocsTypeParams.js.map +1 -1
- package/dist/cjs/types/Interface/api/config/ConfigType.d.ts +40 -71
- package/dist/cjs/types/Interface/api/config/ConfigType.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/config/ConfigType.js.map +1 -1
- package/dist/cjs/types/Interface/api/internalInvoicing/GetLastRef.d.ts +0 -2
- package/dist/cjs/types/Interface/api/internalInvoicing/GetLastRef.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/internalInvoicing/GetLastRef.js +0 -12
- package/dist/cjs/types/Interface/api/internalInvoicing/GetLastRef.js.map +1 -1
- package/dist/cjs/types/Interface/api/user/Query.d.ts +9 -0
- package/dist/cjs/types/Interface/api/user/Query.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/user/Query.js +30 -1
- package/dist/cjs/types/Interface/api/user/Query.js.map +1 -1
- package/dist/cjs/types/Interface/models/IApiError.d.ts +0 -1
- package/dist/cjs/types/Interface/models/IApiError.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IApiError.js +0 -2
- package/dist/cjs/types/Interface/models/IApiError.js.map +1 -1
- package/dist/cjs/types/index.d.ts +0 -10
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +0 -11
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/utils/index.d.ts +0 -1
- package/dist/cjs/utils/index.d.ts.map +1 -1
- package/dist/cjs/utils/index.js +0 -1
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/payment.d.ts +1 -0
- package/dist/cjs/utils/payment.d.ts.map +1 -1
- package/dist/cjs/utils/payment.js.map +1 -1
- package/dist/cjs/utils/prestation.d.ts +2 -1
- package/dist/cjs/utils/prestation.d.ts.map +1 -1
- package/dist/cjs/utils/prestation.js +19 -4
- package/dist/cjs/utils/prestation.js.map +1 -1
- package/dist/cjs/utils/vat/utils.d.ts +2 -0
- package/dist/cjs/utils/vat/utils.d.ts.map +1 -1
- package/dist/cjs/utils/vat/utils.js +10 -0
- package/dist/cjs/utils/vat/utils.js.map +1 -1
- package/dist/mjs/api/resources/Subscription.d.ts +2 -2
- package/dist/mjs/api/resources/Subscription.d.ts.map +1 -1
- package/dist/mjs/api/resources/Subscription.js +3 -4
- package/dist/mjs/api/resources/Subscription.js.map +1 -1
- package/dist/mjs/api/resources/User.d.ts +2 -1
- package/dist/mjs/api/resources/User.d.ts.map +1 -1
- package/dist/mjs/api/resources/User.js +6 -0
- package/dist/mjs/api/resources/User.js.map +1 -1
- package/dist/mjs/api/resources.d.ts +0 -4
- package/dist/mjs/api/resources.d.ts.map +1 -1
- package/dist/mjs/api/resources.js +0 -4
- package/dist/mjs/api/resources.js.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheet.js +12 -12
- package/dist/mjs/types/Enum/BalanceSheet.js.map +1 -1
- package/dist/mjs/types/Enum/PrestationType.js +8 -8
- package/dist/mjs/types/Enum/PrestationType.js.map +1 -1
- package/dist/mjs/types/Interface/api/commercial/RequiredDocsTypeParams.d.ts +1 -0
- package/dist/mjs/types/Interface/api/commercial/RequiredDocsTypeParams.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/commercial/RequiredDocsTypeParams.js.map +1 -1
- package/dist/mjs/types/Interface/api/config/ConfigType.d.ts +40 -71
- package/dist/mjs/types/Interface/api/config/ConfigType.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/config/ConfigType.js.map +1 -1
- package/dist/mjs/types/Interface/api/internalInvoicing/GetLastRef.d.ts +0 -2
- package/dist/mjs/types/Interface/api/internalInvoicing/GetLastRef.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/internalInvoicing/GetLastRef.js +0 -14
- package/dist/mjs/types/Interface/api/internalInvoicing/GetLastRef.js.map +1 -1
- package/dist/mjs/types/Interface/api/user/Query.d.ts +9 -0
- package/dist/mjs/types/Interface/api/user/Query.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/user/Query.js +28 -0
- package/dist/mjs/types/Interface/api/user/Query.js.map +1 -1
- package/dist/mjs/types/Interface/models/IApiError.d.ts +0 -1
- package/dist/mjs/types/Interface/models/IApiError.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IApiError.js +0 -2
- package/dist/mjs/types/Interface/models/IApiError.js.map +1 -1
- package/dist/mjs/types/index.d.ts +0 -10
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +0 -11
- package/dist/mjs/types/index.js.map +1 -1
- package/dist/mjs/utils/index.d.ts +0 -1
- package/dist/mjs/utils/index.d.ts.map +1 -1
- package/dist/mjs/utils/index.js +0 -1
- package/dist/mjs/utils/index.js.map +1 -1
- package/dist/mjs/utils/payment.d.ts +1 -0
- package/dist/mjs/utils/payment.d.ts.map +1 -1
- package/dist/mjs/utils/payment.js.map +1 -1
- package/dist/mjs/utils/prestation.d.ts +2 -1
- package/dist/mjs/utils/prestation.d.ts.map +1 -1
- package/dist/mjs/utils/prestation.js +17 -4
- package/dist/mjs/utils/prestation.js.map +1 -1
- package/dist/mjs/utils/vat/utils.d.ts +2 -0
- package/dist/mjs/utils/vat/utils.d.ts.map +1 -1
- package/dist/mjs/utils/vat/utils.js +9 -0
- package/dist/mjs/utils/vat/utils.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Subscription.ts +5 -15
- package/ts/api/resources/User.ts +8 -0
- package/ts/api/resources.ts +0 -4
- package/ts/types/Enum/BalanceSheet.ts +12 -12
- package/ts/types/Enum/PrestationType.ts +8 -8
- package/ts/types/Interface/api/commercial/RequiredDocsTypeParams.ts +1 -0
- package/ts/types/Interface/api/config/ConfigType.ts +39 -75
- package/ts/types/Interface/api/internalInvoicing/GetLastRef.ts +0 -10
- package/ts/types/Interface/api/user/Query.ts +26 -0
- package/ts/types/Interface/models/IApiError.ts +0 -3
- package/ts/types/index.ts +0 -11
- package/ts/utils/index.ts +0 -1
- package/ts/utils/payment.ts +1 -0
- package/ts/utils/prestation.ts +30 -5
- package/ts/utils/vat/utils.ts +10 -1
- package/dist/cjs/api/resources/PromoCode.d.ts +0 -14
- package/dist/cjs/api/resources/PromoCode.d.ts.map +0 -1
- package/dist/cjs/api/resources/PromoCode.js +0 -35
- package/dist/cjs/api/resources/PromoCode.js.map +0 -1
- package/dist/cjs/api/resources/SocietyPromoCode.d.ts +0 -8
- package/dist/cjs/api/resources/SocietyPromoCode.d.ts.map +0 -1
- package/dist/cjs/api/resources/SocietyPromoCode.js +0 -17
- package/dist/cjs/api/resources/SocietyPromoCode.js.map +0 -1
- package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.d.ts +0 -14
- package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js +0 -85
- package/dist/cjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js.map +0 -1
- package/dist/cjs/types/Interface/api/promoCode/CreatePromoCode.d.ts +0 -12
- package/dist/cjs/types/Interface/api/promoCode/CreatePromoCode.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/promoCode/CreatePromoCode.js +0 -53
- package/dist/cjs/types/Interface/api/promoCode/CreatePromoCode.js.map +0 -1
- package/dist/cjs/types/Interface/api/promoCode/QueryDefaultPromotion.d.ts +0 -8
- package/dist/cjs/types/Interface/api/promoCode/QueryDefaultPromotion.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/promoCode/QueryDefaultPromotion.js +0 -49
- package/dist/cjs/types/Interface/api/promoCode/QueryDefaultPromotion.js.map +0 -1
- package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPaginationPromoCode.d.ts +0 -5
- package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPaginationPromoCode.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPaginationPromoCode.js +0 -34
- package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPaginationPromoCode.js.map +0 -1
- package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPromotion.d.ts +0 -7
- package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPromotion.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPromotion.js +0 -3
- package/dist/cjs/types/Interface/api/promoCode/ReadDefaultPromotion.js.map +0 -1
- package/dist/cjs/types/Interface/api/promoCode/UpdatePromoCode.d.ts +0 -12
- package/dist/cjs/types/Interface/api/promoCode/UpdatePromoCode.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/promoCode/UpdatePromoCode.js +0 -53
- package/dist/cjs/types/Interface/api/promoCode/UpdatePromoCode.js.map +0 -1
- package/dist/cjs/types/Interface/api/societyPromoCode/CreateSocietyPromoCode.d.ts +0 -5
- package/dist/cjs/types/Interface/api/societyPromoCode/CreateSocietyPromoCode.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/societyPromoCode/CreateSocietyPromoCode.js +0 -25
- package/dist/cjs/types/Interface/api/societyPromoCode/CreateSocietyPromoCode.js.map +0 -1
- package/dist/cjs/types/Interface/models/IDefaultPromotion.d.ts +0 -17
- package/dist/cjs/types/Interface/models/IDefaultPromotion.d.ts.map +0 -1
- package/dist/cjs/types/Interface/models/IDefaultPromotion.js +0 -3
- package/dist/cjs/types/Interface/models/IDefaultPromotion.js.map +0 -1
- package/dist/cjs/types/Interface/models/IPromoCode.d.ts +0 -15
- package/dist/cjs/types/Interface/models/IPromoCode.d.ts.map +0 -1
- package/dist/cjs/types/Interface/models/IPromoCode.js +0 -3
- package/dist/cjs/types/Interface/models/IPromoCode.js.map +0 -1
- package/dist/cjs/types/Interface/models/ISocietyPromoCode.d.ts +0 -8
- package/dist/cjs/types/Interface/models/ISocietyPromoCode.d.ts.map +0 -1
- package/dist/cjs/types/Interface/models/ISocietyPromoCode.js +0 -3
- package/dist/cjs/types/Interface/models/ISocietyPromoCode.js.map +0 -1
- package/dist/cjs/utils/subscription.d.ts +0 -21
- package/dist/cjs/utils/subscription.d.ts.map +0 -1
- package/dist/cjs/utils/subscription.js +0 -97
- package/dist/cjs/utils/subscription.js.map +0 -1
- package/dist/mjs/api/resources/PromoCode.d.ts +0 -14
- package/dist/mjs/api/resources/PromoCode.d.ts.map +0 -1
- package/dist/mjs/api/resources/PromoCode.js +0 -31
- package/dist/mjs/api/resources/PromoCode.js.map +0 -1
- package/dist/mjs/api/resources/SocietyPromoCode.d.ts +0 -8
- package/dist/mjs/api/resources/SocietyPromoCode.d.ts.map +0 -1
- package/dist/mjs/api/resources/SocietyPromoCode.js +0 -13
- package/dist/mjs/api/resources/SocietyPromoCode.js.map +0 -1
- package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.d.ts +0 -14
- package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js +0 -93
- package/dist/mjs/types/Interface/api/promoCode/CreateDefaultPromoCode.js.map +0 -1
- package/dist/mjs/types/Interface/api/promoCode/CreatePromoCode.d.ts +0 -12
- package/dist/mjs/types/Interface/api/promoCode/CreatePromoCode.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/promoCode/CreatePromoCode.js +0 -58
- package/dist/mjs/types/Interface/api/promoCode/CreatePromoCode.js.map +0 -1
- package/dist/mjs/types/Interface/api/promoCode/QueryDefaultPromotion.d.ts +0 -8
- package/dist/mjs/types/Interface/api/promoCode/QueryDefaultPromotion.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/promoCode/QueryDefaultPromotion.js +0 -50
- package/dist/mjs/types/Interface/api/promoCode/QueryDefaultPromotion.js.map +0 -1
- package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPaginationPromoCode.d.ts +0 -5
- package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPaginationPromoCode.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPaginationPromoCode.js +0 -28
- package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPaginationPromoCode.js.map +0 -1
- package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPromotion.d.ts +0 -7
- package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPromotion.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPromotion.js +0 -2
- package/dist/mjs/types/Interface/api/promoCode/ReadDefaultPromotion.js.map +0 -1
- package/dist/mjs/types/Interface/api/promoCode/UpdatePromoCode.d.ts +0 -12
- package/dist/mjs/types/Interface/api/promoCode/UpdatePromoCode.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/promoCode/UpdatePromoCode.js +0 -58
- package/dist/mjs/types/Interface/api/promoCode/UpdatePromoCode.js.map +0 -1
- package/dist/mjs/types/Interface/api/societyPromoCode/CreateSocietyPromoCode.d.ts +0 -5
- package/dist/mjs/types/Interface/api/societyPromoCode/CreateSocietyPromoCode.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/societyPromoCode/CreateSocietyPromoCode.js +0 -23
- package/dist/mjs/types/Interface/api/societyPromoCode/CreateSocietyPromoCode.js.map +0 -1
- package/dist/mjs/types/Interface/models/IDefaultPromotion.d.ts +0 -17
- package/dist/mjs/types/Interface/models/IDefaultPromotion.d.ts.map +0 -1
- package/dist/mjs/types/Interface/models/IDefaultPromotion.js +0 -2
- package/dist/mjs/types/Interface/models/IDefaultPromotion.js.map +0 -1
- package/dist/mjs/types/Interface/models/IPromoCode.d.ts +0 -15
- package/dist/mjs/types/Interface/models/IPromoCode.d.ts.map +0 -1
- package/dist/mjs/types/Interface/models/IPromoCode.js +0 -2
- package/dist/mjs/types/Interface/models/IPromoCode.js.map +0 -1
- package/dist/mjs/types/Interface/models/ISocietyPromoCode.d.ts +0 -8
- package/dist/mjs/types/Interface/models/ISocietyPromoCode.d.ts.map +0 -1
- package/dist/mjs/types/Interface/models/ISocietyPromoCode.js +0 -2
- package/dist/mjs/types/Interface/models/ISocietyPromoCode.js.map +0 -1
- package/dist/mjs/utils/subscription.d.ts +0 -21
- package/dist/mjs/utils/subscription.d.ts.map +0 -1
- package/dist/mjs/utils/subscription.js +0 -92
- package/dist/mjs/utils/subscription.js.map +0 -1
- package/ts/api/resources/PromoCode.ts +0 -50
- package/ts/api/resources/SocietyPromoCode.ts +0 -16
- package/ts/types/Interface/api/promoCode/CreateDefaultPromoCode.ts +0 -59
- package/ts/types/Interface/api/promoCode/CreatePromoCode.ts +0 -30
- package/ts/types/Interface/api/promoCode/QueryDefaultPromotion.ts +0 -30
- package/ts/types/Interface/api/promoCode/ReadDefaultPaginationPromoCode.ts +0 -14
- package/ts/types/Interface/api/promoCode/ReadDefaultPromotion.ts +0 -7
- package/ts/types/Interface/api/promoCode/UpdatePromoCode.ts +0 -30
- package/ts/types/Interface/api/societyPromoCode/CreateSocietyPromoCode.ts +0 -9
- package/ts/types/Interface/models/IDefaultPromotion.ts +0 -16
- package/ts/types/Interface/models/IPromoCode.ts +0 -14
- package/ts/types/Interface/models/ISocietyPromoCode.ts +0 -7
- package/ts/utils/subscription.ts +0 -124
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ApiPropertyOptional } from '../../../../utils';
|
|
2
|
-
|
|
3
|
-
export class UpdatePromoCode {
|
|
4
|
-
@ApiPropertyOptional()
|
|
5
|
-
name?: string;
|
|
6
|
-
|
|
7
|
-
@ApiPropertyOptional()
|
|
8
|
-
microMonthly?: string | null;
|
|
9
|
-
|
|
10
|
-
@ApiPropertyOptional()
|
|
11
|
-
microMonthlyDescription?: string | null;
|
|
12
|
-
|
|
13
|
-
@ApiPropertyOptional()
|
|
14
|
-
microYearly?: string | null;
|
|
15
|
-
|
|
16
|
-
@ApiPropertyOptional()
|
|
17
|
-
microYearlyDescription?: string | null;
|
|
18
|
-
|
|
19
|
-
@ApiPropertyOptional()
|
|
20
|
-
businessMonthly?: string | null;
|
|
21
|
-
|
|
22
|
-
@ApiPropertyOptional()
|
|
23
|
-
businessMonthlyDescription?: string | null;
|
|
24
|
-
|
|
25
|
-
@ApiPropertyOptional()
|
|
26
|
-
businessYearly?: string | null;
|
|
27
|
-
|
|
28
|
-
@ApiPropertyOptional()
|
|
29
|
-
businessYearlyDescription?: string | null;
|
|
30
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface IDefaultPromotion {
|
|
2
|
-
id?: number;
|
|
3
|
-
label: string;
|
|
4
|
-
startDate?: Date | null;
|
|
5
|
-
endDate?: Date | null;
|
|
6
|
-
isYearly: boolean;
|
|
7
|
-
isMonthly: boolean;
|
|
8
|
-
isMicroPlan: boolean;
|
|
9
|
-
isCashBasedBusinessPlan: boolean;
|
|
10
|
-
isAccrualBusinessPlan: boolean;
|
|
11
|
-
isTest: boolean;
|
|
12
|
-
metadata?: string | null;
|
|
13
|
-
idStripeCoupon: string;
|
|
14
|
-
createdAt?: Date | null;
|
|
15
|
-
updatedAt?: Date | null;
|
|
16
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface IPromoCode {
|
|
2
|
-
id?: number;
|
|
3
|
-
name: string;
|
|
4
|
-
microMonthly?: string | null;
|
|
5
|
-
microMonthlyDescription?: string | null;
|
|
6
|
-
microYearly?: string | null;
|
|
7
|
-
microYearlyDescription?: string | null;
|
|
8
|
-
businessMonthly?: string | null;
|
|
9
|
-
businessMonthlyDescription?: string | null;
|
|
10
|
-
businessYearly?: string | null;
|
|
11
|
-
businessYearlyDescription?: string | null;
|
|
12
|
-
createdAt?: Date | null;
|
|
13
|
-
updatedAt?: Date | null;
|
|
14
|
-
}
|
package/ts/utils/subscription.ts
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { ComptaType } from '../types/Enum/ComptaType';
|
|
2
|
-
import { LegalFormTypeEnum } from '../types/Enum/LegalForm';
|
|
3
|
-
import { TaxSystem } from '../types/Enum/TaxSystem';
|
|
4
|
-
|
|
5
|
-
interface OfferParams {
|
|
6
|
-
idLegalForm: LegalFormTypeEnum | null;
|
|
7
|
-
idComptaType: ComptaType | null;
|
|
8
|
-
idTaxSystem: TaxSystem | null;
|
|
9
|
-
isYearly?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
interface StripeOffer {
|
|
13
|
-
name: string;
|
|
14
|
-
isYearly: boolean;
|
|
15
|
-
isMicro: boolean;
|
|
16
|
-
key: string;
|
|
17
|
-
isCashBased: boolean;
|
|
18
|
-
isSocietyTax?: boolean;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const isTestKey: boolean = ['dev', 'staging', 'development', 'test', 'gitlab'].includes(process.env.NODE_ENV ?? '');
|
|
22
|
-
|
|
23
|
-
// AE | Annuel | Forfait Bilan complet
|
|
24
|
-
const ID_SUBSCRIPTION_MICRO_ANNUAL = !isTestKey ? 'price_1PFyHHIHo1jEedppVjwrqPr1' : 'price_1MRyi1IHo1jEedppRKdY06Re';
|
|
25
|
-
|
|
26
|
-
// AE | Mensuel | Forfait Bilan complet
|
|
27
|
-
const ID_SUBSCRIPTION_MICRO_MENSUAL = !isTestKey ? 'price_1LBJ4xIHo1jEedppylxr3fFa' : 'price_1LBI57IHo1jEedpppnxskfgv';
|
|
28
|
-
|
|
29
|
-
// Entreprise | Annuel | Forfait entreprise à l'IR
|
|
30
|
-
const ID_SUBSCRIPTION_INCOME_TAX_ANNUAL = !isTestKey
|
|
31
|
-
? 'price_1PFyG8IHo1jEedpp73TUxiJd'
|
|
32
|
-
: 'price_1MRyiJIHo1jEedppUe7MnPtW';
|
|
33
|
-
|
|
34
|
-
// Entreprise | Mensuel | Forfaitentreprise à l'IR
|
|
35
|
-
const ID_SUBSCRIPTION_INCOME_TAX_MENSUAL = !isTestKey
|
|
36
|
-
? 'price_1LBJ5YIHo1jEedppzwTErh9M'
|
|
37
|
-
: 'price_1LBIA3IHo1jEedpp2taeQ7yW';
|
|
38
|
-
|
|
39
|
-
// Entreprise | Annuel | Forfait entreprise à l'IS
|
|
40
|
-
const ID_SUBSCRIPTION_SOCIETY_TAX_ANNUAL = !isTestKey
|
|
41
|
-
? 'price_1PFwE3IHo1jEedpphgWrgwkA'
|
|
42
|
-
: 'price_1MRyiWIHo1jEedppp5tnksZe';
|
|
43
|
-
|
|
44
|
-
// Entreprise | Mensuel | Forfait entreprise à l'IS
|
|
45
|
-
const ID_SUBSCRIPTION_SOCIETY_TAX_MENSUAL = !isTestKey
|
|
46
|
-
? 'price_1LBJ69IHo1jEedppAWLeOk3I'
|
|
47
|
-
: 'price_1LBIB7IHo1jEedppocxyc1ft';
|
|
48
|
-
|
|
49
|
-
export const stripeTaxRate = isTestKey ? 'txr_1I9X9MIHo1jEedppM0DqL4iE' : 'txr_1I9X5wIHo1jEedppYttGFc0N';
|
|
50
|
-
|
|
51
|
-
const list: StripeOffer[] = [
|
|
52
|
-
{
|
|
53
|
-
name: 'Offre auto-entrepreneur',
|
|
54
|
-
isYearly: true,
|
|
55
|
-
isMicro: true,
|
|
56
|
-
key: ID_SUBSCRIPTION_MICRO_ANNUAL,
|
|
57
|
-
isCashBased: true,
|
|
58
|
-
isSocietyTax: false,
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
name: 'Offre auto-entrepreneur',
|
|
62
|
-
isYearly: false,
|
|
63
|
-
isMicro: true,
|
|
64
|
-
key: ID_SUBSCRIPTION_MICRO_MENSUAL,
|
|
65
|
-
isCashBased: true,
|
|
66
|
-
isSocietyTax: false,
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
name: 'Offre entreprise IS',
|
|
70
|
-
isYearly: true,
|
|
71
|
-
isMicro: false,
|
|
72
|
-
key: ID_SUBSCRIPTION_SOCIETY_TAX_ANNUAL,
|
|
73
|
-
isCashBased: false,
|
|
74
|
-
isSocietyTax: true,
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
name: 'Offre entreprise IS',
|
|
78
|
-
isMicro: false,
|
|
79
|
-
isYearly: false,
|
|
80
|
-
key: ID_SUBSCRIPTION_SOCIETY_TAX_MENSUAL,
|
|
81
|
-
isCashBased: false,
|
|
82
|
-
isSocietyTax: true,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
name: 'Offre entreprise IR',
|
|
86
|
-
isMicro: false,
|
|
87
|
-
isYearly: true,
|
|
88
|
-
isCashBased: true,
|
|
89
|
-
isSocietyTax: false,
|
|
90
|
-
key: ID_SUBSCRIPTION_INCOME_TAX_ANNUAL,
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
name: 'Offre entreprise IR',
|
|
94
|
-
isMicro: false,
|
|
95
|
-
isYearly: false,
|
|
96
|
-
key: ID_SUBSCRIPTION_INCOME_TAX_MENSUAL,
|
|
97
|
-
isCashBased: true,
|
|
98
|
-
isSocietyTax: false,
|
|
99
|
-
},
|
|
100
|
-
];
|
|
101
|
-
|
|
102
|
-
export function getDefaultOffer(params: OfferParams): StripeOffer {
|
|
103
|
-
const { idLegalForm, idComptaType, isYearly, idTaxSystem } = params;
|
|
104
|
-
|
|
105
|
-
const isMicro = LegalFormTypeEnum.AUTO_ENTREPRENEUR === idLegalForm;
|
|
106
|
-
const isCashBased = idComptaType
|
|
107
|
-
? [ComptaType.CASH_BASED, ComptaType.CASH_BASED_ASSISTANCE, ComptaType.CASH_BASED_SEIZURE].includes(idComptaType)
|
|
108
|
-
: false;
|
|
109
|
-
const isSocietyTax = idTaxSystem === TaxSystem.IS;
|
|
110
|
-
|
|
111
|
-
const newPlan = list.find(
|
|
112
|
-
(l) =>
|
|
113
|
-
l.isMicro === isMicro &&
|
|
114
|
-
l.isYearly === isYearly &&
|
|
115
|
-
l.isCashBased === isCashBased &&
|
|
116
|
-
l.isSocietyTax === isSocietyTax,
|
|
117
|
-
);
|
|
118
|
-
|
|
119
|
-
if (newPlan) {
|
|
120
|
-
return newPlan;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return isYearly ? list[2] : list[3];
|
|
124
|
-
}
|