@silexpert/core 1.3.214-esm-8 → 1.3.214-esm-10
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/ESM-MIGRATION.md +78 -0
- package/dist/api/resources/Payment.d.ts +1 -1
- package/dist/api/resources/Payment.d.ts.map +1 -1
- package/dist/api/resources/Payment.js.map +1 -1
- package/dist/api/resources/PaymentExpectationCustomer.d.ts +1 -1
- package/dist/api/resources/PaymentExpectationCustomer.d.ts.map +1 -1
- package/dist/api/resources/PaymentExpectationCustomer.js.map +1 -1
- package/dist/api/resources/StripePurchase.d.ts +1 -1
- package/dist/api/resources/StripePurchase.d.ts.map +1 -1
- package/dist/api/resources/StripePurchase.js.map +1 -1
- package/package.json +19 -1
- package/ts/api/resources/Payment.ts +1 -1
- package/ts/api/resources/PaymentExpectationCustomer.ts +1 -1
- package/ts/api/resources/StripePurchase.ts +1 -1
package/ESM-MIGRATION.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# ESM Migration Guide
|
|
2
|
+
|
|
3
|
+
## ✅ Completed Changes
|
|
4
|
+
|
|
5
|
+
Your core repository is now ESM-friendly for Nuxt4! Here's what was updated:
|
|
6
|
+
|
|
7
|
+
### 1. Package.json Enhancements
|
|
8
|
+
|
|
9
|
+
- **Enhanced exports**: Added development and default conditions for better compatibility
|
|
10
|
+
- **Improved imports**: Added `#types/*` and `#api/*` for cleaner internal imports
|
|
11
|
+
- **ESM metadata**: Added `sideEffects: false` for tree-shaking optimization
|
|
12
|
+
- **Node.js compatibility**: Lowered requirement to >=20 for broader compatibility
|
|
13
|
+
- **Keywords**: Added relevant ESM and framework keywords
|
|
14
|
+
|
|
15
|
+
### 2. TypeScript Configuration Fixes
|
|
16
|
+
|
|
17
|
+
- **Consistent module resolution**: Fixed "NodeNext" capitalization
|
|
18
|
+
- **Better lib targets**: Updated from "esnext" to specific "ES2022" + "DOM"
|
|
19
|
+
- **Fixed syntax**: Removed invalid trailing comma
|
|
20
|
+
- **Type safety improvements**: Fixed several type-only imports for better ESM compliance
|
|
21
|
+
|
|
22
|
+
### 3. ESM Compliance Verification
|
|
23
|
+
|
|
24
|
+
- ✅ All source files already use proper `.js` extensions in imports
|
|
25
|
+
- ✅ No CommonJS patterns detected (module.exports, require(), etc.)
|
|
26
|
+
- ✅ Package marked as ESM with `"type": "module"`
|
|
27
|
+
- ✅ Build compiles successfully
|
|
28
|
+
|
|
29
|
+
## 🚀 Using with Nuxt4
|
|
30
|
+
|
|
31
|
+
Your core package can now be safely used in Nuxt4 projects:
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
// In your Nuxt4 app
|
|
35
|
+
import { Silex } from '@silexpert/core';
|
|
36
|
+
|
|
37
|
+
// Or use specific utilities
|
|
38
|
+
import { brandUtils } from '@silexpert/core';
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 🔧 Next Steps (Optional Improvements)
|
|
42
|
+
|
|
43
|
+
### Enable Strict ESM Mode
|
|
44
|
+
|
|
45
|
+
For even better ESM compliance, you can progressively enable `verbatimModuleSyntax`:
|
|
46
|
+
|
|
47
|
+
1. **Add to tsconfig-base.json**:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"compilerOptions": {
|
|
52
|
+
"verbatimModuleSyntax": true
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
2. **Fix remaining type imports**: Convert `import { Type }` to `import type { Type }` for interfaces and types that aren't used at runtime.
|
|
58
|
+
|
|
59
|
+
### Performance Optimization
|
|
60
|
+
|
|
61
|
+
- Consider enabling `"isolatedModules": true` for faster builds
|
|
62
|
+
- Add `"noUncheckedIndexedAccess": true` for better type safety
|
|
63
|
+
|
|
64
|
+
## 📦 Build & Publish
|
|
65
|
+
|
|
66
|
+
Your existing build process remains the same:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npm run tsc # Compile TypeScript
|
|
70
|
+
npm publish # Publish to npm
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The package is now fully compatible with:
|
|
74
|
+
|
|
75
|
+
- ✅ Nuxt4
|
|
76
|
+
- ✅ Vue 3 with Vite
|
|
77
|
+
- ✅ Modern bundlers (Webpack 5+, Rollup, etc.)
|
|
78
|
+
- ✅ Node.js 20+ ESM environments
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Resource } from '../Resource.js';
|
|
2
2
|
import { AskProcessPaymentRecovery, BasePaginate, CreateNotifyCustomer, CreatePaymentRecovery, CreatePaymentsAutoBilling, IPayment, QueryMonthlyPayment, QueryPayment, QueryPaymentCsv, QueryPayments, QueryPaymentInvoice, QueryPaymentRecoveryPaginated, QueryPaymentRecoveryStatistic, QuerySocietyUnpaid, ReadPaid, ReadPaymentInvoice, ReadPaymentRecovery, ReadPaymentRecoveryClaim, ReadPaymentRecoveryStatistic, ReadStatPrestation, ReadStatsSocietyUnpaid, UpdatePayment, QueryStripeSubscriptionId, UpdatePaymentMethod, CreatePaymentsRebilling } from '../../types/index.js';
|
|
3
3
|
import { IPaymentRecovery } from '../../types/Interface/models/IPaymentRecovery.js';
|
|
4
|
-
import Stripe from 'stripe';
|
|
4
|
+
import type Stripe from 'stripe';
|
|
5
5
|
export declare class Payment extends Resource {
|
|
6
6
|
getMonthlyCsv(query: QueryMonthlyPayment): Promise<void>;
|
|
7
7
|
getInternalPaymentCsv(query: QueryPaymentCsv): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payment.d.ts","sourceRoot":"","sources":["../../../ts/api/resources/Payment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACL,yBAAyB,EACzB,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,QAAQ,EACR,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,aAAa,EACb,mBAAmB,E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AC1E,CAAC;IAED,qBAAqB,CACnB,KAAoC,EACpC,MAAmB;QAEnB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,+BAA+B,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IACrF,CAAC;IAED,UAAU,CAAC,iBAAyB,EAAE,OAAkC;QACtE,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,sBAAsB,iBAAiB,UAAU,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;IAED,MAAM,CAAC,KAAoB,EAAE,MAAmB;QAC9C,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,cAAc,CAAC,SAAiB;QAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,SAAS,OAAO,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,OAAsB;QACvC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,CAAC,EAAU;QACf,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED,WAAW,CAAC,EAAU;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;IACrD,CAAC;CACF","sourcesContent":["import { Resource } from '../Resource.js';\nimport {\n AskProcessPaymentRecovery,\n BasePaginate,\n CreateNotifyCustomer,\n CreatePaymentRecovery,\n CreatePaymentsAutoBilling,\n IPayment,\n QueryMonthlyPayment,\n QueryPayment,\n QueryPaymentCsv,\n QueryPayments,\n QueryPaymentInvoice,\n QueryPaymentRecoveryPaginated,\n QueryPaymentRecoveryStatistic,\n QuerySocietyUnpaid,\n ReadPaid,\n ReadPaymentInvoice,\n ReadPaymentRecovery,\n ReadPaymentRecoveryClaim,\n ReadPaymentRecoveryStatistic,\n ReadStatPrestation,\n ReadStatsSocietyUnpaid,\n UpdatePayment,\n QueryStripeSubscriptionId,\n UpdatePaymentMethod,\n CreatePaymentsRebilling,\n} from '../../types/index.js';\nimport { IPaymentRecovery } from '../../types/Interface/models/IPaymentRecovery.js';\nimport Stripe from 'stripe';\n\nexport class Payment extends Resource {\n getMonthlyCsv(query: QueryMonthlyPayment): Promise<void> {\n return this.axios.$get('payment/monthlyCsv', {\n params: query,\n responseType: 'arraybuffer',\n headers: {\n Accept: 'application/csv',\n },\n });\n }\n\n getInternalPaymentCsv(query: QueryPaymentCsv): Promise<void> {\n return this.axios.$get('payment/internal-payment/csv', {\n params: query,\n responseType: 'arraybuffer',\n headers: {\n Accept: 'application/csv',\n },\n });\n }\n\n notifyCustomers(payload: CreateNotifyCustomer): Promise<void> {\n return this.axios.$post('payment/notify-customers', payload);\n }\n\n notifyCustomersInvoice(payload: CreateNotifyCustomer): Promise<void> {\n return this.axios.$post('payment/notify-customers-invoice', payload);\n }\n\n getPaid(payload: QueryPayment): Promise<ReadPaid> {\n return this.axios.$get('payment/paid', {\n params: payload,\n });\n }\n\n getUnpaid(payload: QueryPayment): Promise<IPayment & { unpaid: number }[]> {\n return this.axios.$get('payment/unpaid', {\n params: payload,\n });\n }\n\n /**\n * Return list of payments which could be collectables\n * @param signal\n * @returns\n */\n getAutoCollectables(signal: AbortSignal): Promise<IPayment[]> {\n return this.axios.$get('payments/auto-collectables', {\n signal,\n });\n }\n\n /**\n * Return list of payments which are collectables\n * @param signal\n * @returns\n */\n getCollectables(signal: AbortSignal): Promise<IPayment[]> {\n return this.axios.$get('payments/collectables', {\n signal,\n });\n }\n setAsCollectable(listIdPayment: number[]): Promise<IPayment[]> {\n return this.axios.$patch('payments', {\n listIdPayment,\n isCollectable: true,\n });\n }\n\n getAllPaymentMethods(params: QueryStripeSubscriptionId): Promise<string> {\n return this.axios.$get('/stripe/payments/methods', { params });\n }\n\n updatePaymentMethod(params: UpdatePaymentMethod): Promise<Stripe.PaymentMethod> {\n return this.axios.$put('/stripe/payments/methods', params);\n }\n\n getStatsPaidByPrestation(\n payload: QueryPayment,\n ): Promise<{ invoicePaymentStats: ReadStatPrestation; assetPaymentStats: ReadStatPrestation }> {\n return this.axios.$get('payment/paid-by-prestations', {\n params: payload,\n });\n }\n\n getStatsSocietyUnpaid(payload: QuerySocietyUnpaid): Promise<ReadStatsSocietyUnpaid[]> {\n return this.axios.$get('payment/societies-unpaid', {\n params: payload,\n });\n }\n\n generateForAutoBilling(payload: CreatePaymentsAutoBilling): Promise<number> {\n return this.axios.$post('payment/auto-billing', payload);\n }\n\n generateForRebilling(payload: CreatePaymentsRebilling): Promise<number> {\n return this.axios.$post('payment/rebilling', payload);\n }\n\n getAllInvoices(idExercice: number, query: QueryPaymentInvoice): Promise<ReadPaymentInvoice[]> {\n return this.axios.$get(`/exercices/${idExercice}/invoices`, { params: query });\n }\n\n createRecovery(idFile: number, payload: CreatePaymentRecovery): Promise<IPaymentRecovery> {\n return this.axios.$post(`/invoices/${idFile}/payments-recovery`, payload);\n }\n\n getRecovery(idPaymentRecovery: number): Promise<ReadPaymentRecoveryClaim> {\n return this.axios.$get(`/payments-recovery/${idPaymentRecovery}`);\n }\n\n getPaginatedRecovery(\n query: QueryPaymentRecoveryPaginated,\n signal: AbortSignal,\n ): Promise<BasePaginate<ReadPaymentRecovery>> {\n return this.axios.$get('/payments-recovery', { params: query, signal });\n }\n\n getRecoveryStatistics(\n query: QueryPaymentRecoveryStatistic,\n signal: AbortSignal,\n ): Promise<ReadPaymentRecoveryStatistic> {\n return this.axios.$get('/payments-recovery/statistics', { params: query, signal });\n }\n\n askProcess(idPaymentRecovery: number, payload: AskProcessPaymentRecovery): Promise<IPaymentRecovery> {\n return this.axios.$post(`/payments-recovery/${idPaymentRecovery}/contact`, payload);\n }\n\n getAll(query: QueryPayments, signal: AbortSignal): Promise<IPayment[]> {\n return this.axios.$get('/payments', { params: query, signal });\n }\n\n getLastPayment(idSociety: number): Promise<IPayment> {\n return this.axios.$get(`/payment/${idSociety}/last`);\n }\n\n update(id: number, payload: UpdatePayment): Promise<IPayment> {\n return this.axios.$patch(`/payments/${id}`, payload);\n }\n\n delete(id: number): Promise<true> {\n return this.axios.$delete(`/payments/${id}`);\n }\n\n forceDelete(id: number): Promise<true> {\n return this.axios.$delete(`/payments/force/${id}`);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Payment.js","sourceRoot":"","sources":["../../../ts/api/resources/Payment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AA+B1C,MAAM,OAAO,OAAQ,SAAQ,QAAQ;IACnC,aAAa,CAAC,KAA0B;QACtC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,oBAAoB,EAAE;YAC3C,MAAM,EAAE,KAAK;YACb,YAAY,EAAE,aAAa;YAC3B,OAAO,EAAE;gBACP,MAAM,EAAE,iBAAiB;aAC1B;SACF,CAAC,CAAC;IACL,CAAC;IAED,qBAAqB,CAAC,KAAsB;QAC1C,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,8BAA8B,EAAE;YACrD,MAAM,EAAE,KAAK;YACb,YAAY,EAAE,aAAa;YAC3B,OAAO,EAAE;gBACP,MAAM,EAAE,iBAAiB;aAC1B;SACF,CAAC,CAAC;IACL,CAAC;IAED,eAAe,CAAC,OAA6B;QAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED,sBAAsB,CAAC,OAA6B;QAClD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,kCAAkC,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;IAED,OAAO,CAAC,OAAqB;QAC3B,OAAO,IAAI,CAAC,KAAK,CAA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KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,cAAc,CAAC,SAAiB;QAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,SAAS,OAAO,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,OAAsB;QACvC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,CAAC,EAAU;QACf,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED,WAAW,CAAC,EAAU;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;IACrD,CAAC;CACF","sourcesContent":["import { Resource } from '../Resource.js';\nimport {\n AskProcessPaymentRecovery,\n BasePaginate,\n CreateNotifyCustomer,\n CreatePaymentRecovery,\n CreatePaymentsAutoBilling,\n IPayment,\n QueryMonthlyPayment,\n QueryPayment,\n QueryPaymentCsv,\n QueryPayments,\n QueryPaymentInvoice,\n QueryPaymentRecoveryPaginated,\n QueryPaymentRecoveryStatistic,\n QuerySocietyUnpaid,\n ReadPaid,\n ReadPaymentInvoice,\n ReadPaymentRecovery,\n ReadPaymentRecoveryClaim,\n ReadPaymentRecoveryStatistic,\n ReadStatPrestation,\n ReadStatsSocietyUnpaid,\n UpdatePayment,\n QueryStripeSubscriptionId,\n UpdatePaymentMethod,\n CreatePaymentsRebilling,\n} from '../../types/index.js';\nimport { IPaymentRecovery } from '../../types/Interface/models/IPaymentRecovery.js';\nimport type Stripe from 'stripe';\n\nexport class Payment extends Resource {\n getMonthlyCsv(query: QueryMonthlyPayment): Promise<void> {\n return this.axios.$get('payment/monthlyCsv', {\n params: query,\n responseType: 'arraybuffer',\n headers: {\n Accept: 'application/csv',\n },\n });\n }\n\n getInternalPaymentCsv(query: QueryPaymentCsv): Promise<void> {\n return this.axios.$get('payment/internal-payment/csv', {\n params: query,\n responseType: 'arraybuffer',\n headers: {\n Accept: 'application/csv',\n },\n });\n }\n\n notifyCustomers(payload: CreateNotifyCustomer): Promise<void> {\n return this.axios.$post('payment/notify-customers', payload);\n }\n\n notifyCustomersInvoice(payload: CreateNotifyCustomer): Promise<void> {\n return this.axios.$post('payment/notify-customers-invoice', payload);\n }\n\n getPaid(payload: QueryPayment): Promise<ReadPaid> {\n return this.axios.$get('payment/paid', {\n params: payload,\n });\n }\n\n getUnpaid(payload: QueryPayment): Promise<IPayment & { unpaid: number }[]> {\n return this.axios.$get('payment/unpaid', {\n params: payload,\n });\n }\n\n /**\n * Return list of payments which could be collectables\n * @param signal\n * @returns\n */\n getAutoCollectables(signal: AbortSignal): Promise<IPayment[]> {\n return this.axios.$get('payments/auto-collectables', {\n signal,\n });\n }\n\n /**\n * Return list of payments which are collectables\n * @param signal\n * @returns\n */\n getCollectables(signal: AbortSignal): Promise<IPayment[]> {\n return this.axios.$get('payments/collectables', {\n signal,\n });\n }\n setAsCollectable(listIdPayment: number[]): Promise<IPayment[]> {\n return this.axios.$patch('payments', {\n listIdPayment,\n isCollectable: true,\n });\n }\n\n getAllPaymentMethods(params: QueryStripeSubscriptionId): Promise<string> {\n return this.axios.$get('/stripe/payments/methods', { params });\n }\n\n updatePaymentMethod(params: UpdatePaymentMethod): Promise<Stripe.PaymentMethod> {\n return this.axios.$put('/stripe/payments/methods', params);\n }\n\n getStatsPaidByPrestation(\n payload: QueryPayment,\n ): Promise<{ invoicePaymentStats: ReadStatPrestation; assetPaymentStats: ReadStatPrestation }> {\n return this.axios.$get('payment/paid-by-prestations', {\n params: payload,\n });\n }\n\n getStatsSocietyUnpaid(payload: QuerySocietyUnpaid): Promise<ReadStatsSocietyUnpaid[]> {\n return this.axios.$get('payment/societies-unpaid', {\n params: payload,\n });\n }\n\n generateForAutoBilling(payload: CreatePaymentsAutoBilling): Promise<number> {\n return this.axios.$post('payment/auto-billing', payload);\n }\n\n generateForRebilling(payload: CreatePaymentsRebilling): Promise<number> {\n return this.axios.$post('payment/rebilling', payload);\n }\n\n getAllInvoices(idExercice: number, query: QueryPaymentInvoice): Promise<ReadPaymentInvoice[]> {\n return this.axios.$get(`/exercices/${idExercice}/invoices`, { params: query });\n }\n\n createRecovery(idFile: number, payload: CreatePaymentRecovery): Promise<IPaymentRecovery> {\n return this.axios.$post(`/invoices/${idFile}/payments-recovery`, payload);\n }\n\n getRecovery(idPaymentRecovery: number): Promise<ReadPaymentRecoveryClaim> {\n return this.axios.$get(`/payments-recovery/${idPaymentRecovery}`);\n }\n\n getPaginatedRecovery(\n query: QueryPaymentRecoveryPaginated,\n signal: AbortSignal,\n ): Promise<BasePaginate<ReadPaymentRecovery>> {\n return this.axios.$get('/payments-recovery', { params: query, signal });\n }\n\n getRecoveryStatistics(\n query: QueryPaymentRecoveryStatistic,\n signal: AbortSignal,\n ): Promise<ReadPaymentRecoveryStatistic> {\n return this.axios.$get('/payments-recovery/statistics', { params: query, signal });\n }\n\n askProcess(idPaymentRecovery: number, payload: AskProcessPaymentRecovery): Promise<IPaymentRecovery> {\n return this.axios.$post(`/payments-recovery/${idPaymentRecovery}/contact`, payload);\n }\n\n getAll(query: QueryPayments, signal: AbortSignal): Promise<IPayment[]> {\n return this.axios.$get('/payments', { params: query, signal });\n }\n\n getLastPayment(idSociety: number): Promise<IPayment> {\n return this.axios.$get(`/payment/${idSociety}/last`);\n }\n\n update(id: number, payload: UpdatePayment): Promise<IPayment> {\n return this.axios.$patch(`/payments/${id}`, payload);\n }\n\n delete(id: number): Promise<true> {\n return this.axios.$delete(`/payments/${id}`);\n }\n\n forceDelete(id: number): Promise<true> {\n return this.axios.$delete(`/payments/force/${id}`);\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CancelToken } from 'axios';
|
|
2
2
|
import { Resource } from '../Resource.js';
|
|
3
3
|
import { QueryGetPaymentExpectationCustomer, IPaymentExpectationCustomer, QueryPayPaymentExpectationCustomer, QueryConfirmPaymentExpectationCustomer, QueryGetSocietyPaymentsExpectationsCustomers, QueryDeleteSocietyPaymentExpectationCustomer, BasePaginate, UpdateRefundSocietyPaymentExpectationCustomer, CreateSocietyPaymentExpectationCustomer, ReadPaymentExpectationCustomerStat, QueryGetSocietyPaymentsExpectationsCustomersStats, ReadPaymentIntent, SendPaymentExpectationCustomer, CreateTapToPayIntent, CreateTapToPayConnectionToken, CreatePaymentLocation } from '../../types/index.js';
|
|
4
|
-
import Stripe from 'stripe';
|
|
4
|
+
import type Stripe from 'stripe';
|
|
5
5
|
export declare class PaymentExpectationCustomer extends Resource {
|
|
6
6
|
get(params: QueryGetPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer>;
|
|
7
7
|
getBySociety(params: QueryGetSocietyPaymentsExpectationsCustomers, cancelToken?: CancelToken, signal?: AbortSignal): Promise<BasePaginate<IPaymentExpectationCustomer>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentExpectationCustomer.d.ts","sourceRoot":"","sources":["../../../ts/api/resources/PaymentExpectationCustomer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACL,kCAAkC,EAClC,2BAA2B,EAC3B,kCAAkC,EAClC,sCAAsC,EACtC,4CAA4C,EAC5C,4CAA4C,EAC5C,YAAY,EACZ,6CAA6C,EAC7C,uCAAuC,EACvC,kCAAkC,EAClC,iDAAiD,EACjD,iBAAiB,EACjB,8BAA8B,EAC9B,oBAAoB,EACpB,6BAA6B,EAC7B,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,MAAM,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"PaymentExpectationCustomer.d.ts","sourceRoot":"","sources":["../../../ts/api/resources/PaymentExpectationCust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BAA2B,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED,oBAAoB,CAAC,OAA6B;QAChD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF","sourcesContent":["import { CancelToken } from 'axios';\nimport { Resource } from '../Resource.js';\nimport {\n QueryGetPaymentExpectationCustomer,\n IPaymentExpectationCustomer,\n QueryPayPaymentExpectationCustomer,\n QueryConfirmPaymentExpectationCustomer,\n QueryGetSocietyPaymentsExpectationsCustomers,\n QueryDeleteSocietyPaymentExpectationCustomer,\n BasePaginate,\n UpdateRefundSocietyPaymentExpectationCustomer,\n CreateSocietyPaymentExpectationCustomer,\n ReadPaymentExpectationCustomerStat,\n QueryGetSocietyPaymentsExpectationsCustomersStats,\n ReadPaymentIntent,\n SendPaymentExpectationCustomer,\n CreateTapToPayIntent,\n CreateTapToPayConnectionToken,\n CreatePaymentLocation,\n} from '../../types/index.js';\nimport Stripe from 'stripe';\n\nexport class PaymentExpectationCustomer extends Resource {\n get(params: QueryGetPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer> {\n return this.axios.$get('/paymentExpectationCustomer', { params });\n }\n getBySociety(\n params: QueryGetSocietyPaymentsExpectationsCustomers,\n cancelToken?: CancelToken,\n signal?: AbortSignal,\n ): Promise<BasePaginate<IPaymentExpectationCustomer>> {\n return this.axios.$get(`/society/${params.idSociety}/paymentsExpectationsCustomers`, {\n ...(cancelToken ? { cancelToken } : {}),\n ...(signal ? { signal } : {}),\n params,\n });\n }\n stats(params: QueryGetSocietyPaymentsExpectationsCustomersStats): Promise<ReadPaymentExpectationCustomerStat> {\n return this.axios.$get(`/society/${params.idSociety}/paymentsExpectationsCustomers/stats`, {\n params,\n });\n }\n pay(params: QueryPayPaymentExpectationCustomer): Promise<ReadPaymentIntent | IPaymentExpectationCustomer> {\n return this.axios.$post('/paymentExpectationCustomer/pay', params);\n }\n confirm(params: QueryConfirmPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer> {\n return this.axios.$post('/paymentExpectationCustomer/confirm', params);\n }\n delete(params: QueryDeleteSocietyPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer> {\n return this.axios.$delete(`/society/${params.idSociety}/paymentsExpectationsCustomers/${params.id}`);\n }\n refund(params: UpdateRefundSocietyPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer> {\n return this.axios.$put(`/society/${params.idSociety}/paymentsExpectationsCustomers/${params.id}/refund`, params);\n }\n create(params: CreateSocietyPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer> {\n return this.axios.$post(`/society/${params.idSociety}/paymentExpectationCustomer`, params);\n }\n\n send(id: number, payload: SendPaymentExpectationCustomer): Promise<true> {\n return this.axios.$post(`/society/payment-expectation-customers/${id}/send`, payload);\n }\n\n /**\n * TAP TO PAY - STRIPE\n */\n\n createLocation(body: CreatePaymentLocation): Promise<Stripe.Response<Stripe.Terminal.Location>> {\n return this.axios.$post('/stripe/tap-to-pay/locations', body);\n }\n\n getAllLocations(): Promise<Stripe.ApiList<Stripe.Terminal.Location>> {\n return this.axios.$get('/stripe/tap-to-pay/locations');\n }\n\n createTapToPayConnectionToken(payload: CreateTapToPayConnectionToken): Promise<Stripe.Terminal.ConnectionToken> {\n return this.axios.$post('/stripe/tap-to-pay/tokens', payload);\n }\n\n createTapToPayIntent(payload: CreateTapToPayIntent): Promise<Stripe.Response<Stripe.PaymentIntent>> {\n return this.axios.$post('/stripe/tap-to-pay/intents', payload);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"PaymentExpectationCustomer.js","sourceRoot":"","sources":["../../../ts/api/resources/PaymentExpectationCustomer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAqB1C,MAAM,OAAO,0BAA2B,SAAQ,QAAQ;IACtD,GAAG,CAAC,MAA0C;QAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,6BAA6B,EAAE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AC;IAC7F,CAAC;IAED,IAAI,CAAC,EAAU,EAAE,OAAuC;QACtD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,0CAA0C,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC;IAED;;OAEG;IAEH,cAAc,CAAC,IAA2B;QACxC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,8BAA8B,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;IACzD,CAAC;IAED,6BAA6B,CAAC,OAAsC;QAClE,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED,oBAAoB,CAAC,OAA6B;QAChD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF","sourcesContent":["import { CancelToken } from 'axios';\nimport { Resource } from '../Resource.js';\nimport {\n QueryGetPaymentExpectationCustomer,\n IPaymentExpectationCustomer,\n QueryPayPaymentExpectationCustomer,\n QueryConfirmPaymentExpectationCustomer,\n QueryGetSocietyPaymentsExpectationsCustomers,\n QueryDeleteSocietyPaymentExpectationCustomer,\n BasePaginate,\n UpdateRefundSocietyPaymentExpectationCustomer,\n CreateSocietyPaymentExpectationCustomer,\n ReadPaymentExpectationCustomerStat,\n QueryGetSocietyPaymentsExpectationsCustomersStats,\n ReadPaymentIntent,\n SendPaymentExpectationCustomer,\n CreateTapToPayIntent,\n CreateTapToPayConnectionToken,\n CreatePaymentLocation,\n} from '../../types/index.js';\nimport type Stripe from 'stripe';\n\nexport class PaymentExpectationCustomer extends Resource {\n get(params: QueryGetPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer> {\n return this.axios.$get('/paymentExpectationCustomer', { params });\n }\n getBySociety(\n params: QueryGetSocietyPaymentsExpectationsCustomers,\n cancelToken?: CancelToken,\n signal?: AbortSignal,\n ): Promise<BasePaginate<IPaymentExpectationCustomer>> {\n return this.axios.$get(`/society/${params.idSociety}/paymentsExpectationsCustomers`, {\n ...(cancelToken ? { cancelToken } : {}),\n ...(signal ? { signal } : {}),\n params,\n });\n }\n stats(params: QueryGetSocietyPaymentsExpectationsCustomersStats): Promise<ReadPaymentExpectationCustomerStat> {\n return this.axios.$get(`/society/${params.idSociety}/paymentsExpectationsCustomers/stats`, {\n params,\n });\n }\n pay(params: QueryPayPaymentExpectationCustomer): Promise<ReadPaymentIntent | IPaymentExpectationCustomer> {\n return this.axios.$post('/paymentExpectationCustomer/pay', params);\n }\n confirm(params: QueryConfirmPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer> {\n return this.axios.$post('/paymentExpectationCustomer/confirm', params);\n }\n delete(params: QueryDeleteSocietyPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer> {\n return this.axios.$delete(`/society/${params.idSociety}/paymentsExpectationsCustomers/${params.id}`);\n }\n refund(params: UpdateRefundSocietyPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer> {\n return this.axios.$put(`/society/${params.idSociety}/paymentsExpectationsCustomers/${params.id}/refund`, params);\n }\n create(params: CreateSocietyPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer> {\n return this.axios.$post(`/society/${params.idSociety}/paymentExpectationCustomer`, params);\n }\n\n send(id: number, payload: SendPaymentExpectationCustomer): Promise<true> {\n return this.axios.$post(`/society/payment-expectation-customers/${id}/send`, payload);\n }\n\n /**\n * TAP TO PAY - STRIPE\n */\n\n createLocation(body: CreatePaymentLocation): Promise<Stripe.Response<Stripe.Terminal.Location>> {\n return this.axios.$post('/stripe/tap-to-pay/locations', body);\n }\n\n getAllLocations(): Promise<Stripe.ApiList<Stripe.Terminal.Location>> {\n return this.axios.$get('/stripe/tap-to-pay/locations');\n }\n\n createTapToPayConnectionToken(payload: CreateTapToPayConnectionToken): Promise<Stripe.Terminal.ConnectionToken> {\n return this.axios.$post('/stripe/tap-to-pay/tokens', payload);\n }\n\n createTapToPayIntent(payload: CreateTapToPayIntent): Promise<Stripe.Response<Stripe.PaymentIntent>> {\n return this.axios.$post('/stripe/tap-to-pay/intents', payload);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StripePurchase.d.ts","sourceRoot":"","sources":["../../../ts/api/resources/StripePurchase.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"StripePurchase.d.ts","sourceRoot":"","sources":["../../../ts/api/resources/StripePurchase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE/E,qBAAa,cAAe,SAAQ,QAAQ;IAC1C,YAAY,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IAI/D,wBAAwB,CACtB,QAAQ,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EACnE,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAOpD,aAAa,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;CAGjG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StripePurchase.js","sourceRoot":"","sources":["../../../ts/api/resources/StripePurchase.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,MAAM,OAAO,cAAe,SAAQ,QAAQ;IAC1C,YAAY,CAAC,MAAwB;QACnC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,wBAAwB,CACtB,QAAmE,EACnE,OAA8B;QAE9B,OAAO,IAAI,CAAC,aAAa,CAAC;YACxB,GAAG,OAAO;YACV,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAA8B;QAC1C,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF","sourcesContent":["import Stripe from 'stripe';\nimport { Resource } from '../Resource.js';\nimport { CreatePurchaseSession, QueryStripePrice } from '../../types/index.js';\n\nexport class StripePurchase extends Resource {\n getAllPrices(params: QueryStripePrice): Promise<Stripe.Price[]> {\n return this.axios.$get('/stripe/purchases/prices', { params });\n }\n\n createNewExerciceSession(\n metadata: { idSociety: number; startDate: string; endDate: string },\n payload: CreatePurchaseSession,\n ): Promise<Stripe.Response<Stripe.Checkout.Session>> {\n return this.createSession({\n ...payload,\n metadata,\n });\n }\n\n createSession(payload: CreatePurchaseSession): Promise<Stripe.Response<Stripe.Checkout.Session>> {\n return this.axios.$post('/stripe/purchases/sessions', payload);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"StripePurchase.js","sourceRoot":"","sources":["../../../ts/api/resources/StripePurchase.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,MAAM,OAAO,cAAe,SAAQ,QAAQ;IAC1C,YAAY,CAAC,MAAwB;QACnC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,wBAAwB,CACtB,QAAmE,EACnE,OAA8B;QAE9B,OAAO,IAAI,CAAC,aAAa,CAAC;YACxB,GAAG,OAAO;YACV,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAA8B;QAC1C,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF","sourcesContent":["import type Stripe from 'stripe';\nimport { Resource } from '../Resource.js';\nimport { CreatePurchaseSession, QueryStripePrice } from '../../types/index.js';\n\nexport class StripePurchase extends Resource {\n getAllPrices(params: QueryStripePrice): Promise<Stripe.Price[]> {\n return this.axios.$get('/stripe/purchases/prices', { params });\n }\n\n createNewExerciceSession(\n metadata: { idSociety: number; startDate: string; endDate: string },\n payload: CreatePurchaseSession,\n ): Promise<Stripe.Response<Stripe.Checkout.Session>> {\n return this.createSession({\n ...payload,\n metadata,\n });\n }\n\n createSession(payload: CreatePurchaseSession): Promise<Stripe.Response<Stripe.Checkout.Session>> {\n return this.axios.$post('/stripe/purchases/sessions', payload);\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.3.214-esm-
|
|
3
|
+
"version": "1.3.214-esm-10",
|
|
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
|
"type": "module",
|
|
@@ -9,6 +9,18 @@
|
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
+
"browser": {
|
|
13
|
+
"development": "./dist/index.js",
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"node": {
|
|
19
|
+
"development": "./dist/index.js",
|
|
20
|
+
"import": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"default": "./dist/index.js"
|
|
23
|
+
},
|
|
12
24
|
"development": "./dist/index.js",
|
|
13
25
|
"import": "./dist/index.js",
|
|
14
26
|
"types": "./dist/index.d.ts",
|
|
@@ -16,6 +28,12 @@
|
|
|
16
28
|
},
|
|
17
29
|
"./package.json": "./package.json"
|
|
18
30
|
},
|
|
31
|
+
"browser": {
|
|
32
|
+
"debug": false
|
|
33
|
+
},
|
|
34
|
+
"resolutions": {
|
|
35
|
+
"debug": "^4.3.7"
|
|
36
|
+
},
|
|
19
37
|
"sideEffects": false,
|
|
20
38
|
"imports": {
|
|
21
39
|
"#utils/*": "./dist/utils/*",
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
CreatePaymentsRebilling,
|
|
28
28
|
} from '../../types/index.js';
|
|
29
29
|
import { IPaymentRecovery } from '../../types/Interface/models/IPaymentRecovery.js';
|
|
30
|
-
import Stripe from 'stripe';
|
|
30
|
+
import type Stripe from 'stripe';
|
|
31
31
|
|
|
32
32
|
export class Payment extends Resource {
|
|
33
33
|
getMonthlyCsv(query: QueryMonthlyPayment): Promise<void> {
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
CreateTapToPayConnectionToken,
|
|
19
19
|
CreatePaymentLocation,
|
|
20
20
|
} from '../../types/index.js';
|
|
21
|
-
import Stripe from 'stripe';
|
|
21
|
+
import type Stripe from 'stripe';
|
|
22
22
|
|
|
23
23
|
export class PaymentExpectationCustomer extends Resource {
|
|
24
24
|
get(params: QueryGetPaymentExpectationCustomer): Promise<IPaymentExpectationCustomer> {
|