@silexpert/core 2.0.100 → 2.0.101
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/api/resources/Search.d.ts +2 -1
- package/dist/api/resources/Search.d.ts.map +1 -1
- package/dist/api/resources/Search.js +3 -0
- package/dist/api/resources/Search.js.map +1 -1
- package/dist/api/resources/SocietyCreationCheckout.d.ts +7 -0
- package/dist/api/resources/SocietyCreationCheckout.d.ts.map +1 -0
- package/dist/api/resources/SocietyCreationCheckout.js +10 -0
- package/dist/api/resources/SocietyCreationCheckout.js.map +1 -0
- package/dist/api/resources.d.ts +2 -0
- package/dist/api/resources.d.ts.map +1 -1
- package/dist/api/resources.js +2 -0
- package/dist/api/resources.js.map +1 -1
- package/dist/types/Enum/Constants.d.ts +2 -0
- package/dist/types/Enum/Constants.d.ts.map +1 -1
- package/dist/types/Enum/Constants.js +2 -0
- package/dist/types/Enum/Constants.js.map +1 -1
- package/dist/types/Enum/MailAuto.d.ts +2 -1
- package/dist/types/Enum/MailAuto.d.ts.map +1 -1
- package/dist/types/Enum/MailAuto.js +1 -0
- package/dist/types/Enum/MailAuto.js.map +1 -1
- package/dist/types/Enum/SocietyCreationCheckoutStatus.d.ts +9 -0
- package/dist/types/Enum/SocietyCreationCheckoutStatus.d.ts.map +1 -0
- package/dist/types/Enum/SocietyCreationCheckoutStatus.js +10 -0
- package/dist/types/Enum/SocietyCreationCheckoutStatus.js.map +1 -0
- package/dist/types/Interface/api/pappers/ReadPappers.d.ts +1 -0
- package/dist/types/Interface/api/pappers/ReadPappers.d.ts.map +1 -1
- package/dist/types/Interface/api/pappers/ReadPappers.js +1 -0
- package/dist/types/Interface/api/pappers/ReadPappers.js.map +1 -1
- package/dist/types/Interface/api/society/CreateSociety.d.ts +1 -0
- package/dist/types/Interface/api/society/CreateSociety.d.ts.map +1 -1
- package/dist/types/Interface/api/society/CreateSociety.js +5 -0
- package/dist/types/Interface/api/society/CreateSociety.js.map +1 -1
- package/dist/types/Interface/api/societyCreationCheckout/SocietyCreationCheckout.d.ts +32 -0
- package/dist/types/Interface/api/societyCreationCheckout/SocietyCreationCheckout.d.ts.map +1 -0
- package/dist/types/Interface/api/societyCreationCheckout/SocietyCreationCheckout.js +83 -0
- package/dist/types/Interface/api/societyCreationCheckout/SocietyCreationCheckout.js.map +1 -0
- package/dist/types/Interface/api/stripe/Create.d.ts +1 -0
- package/dist/types/Interface/api/stripe/Create.d.ts.map +1 -1
- package/dist/types/Interface/api/stripe/Create.js +7 -0
- package/dist/types/Interface/api/stripe/Create.js.map +1 -1
- package/dist/types/Interface/models/ISocietyCreationCheckout.d.ts +23 -0
- package/dist/types/Interface/models/ISocietyCreationCheckout.d.ts.map +1 -0
- package/dist/types/Interface/models/ISocietyCreationCheckout.js +2 -0
- package/dist/types/Interface/models/ISocietyCreationCheckout.js.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Search.ts +9 -1
- package/ts/api/resources/SocietyCreationCheckout.ts +16 -0
- package/ts/api/resources.ts +2 -0
- package/ts/types/Enum/Constants.ts +3 -0
- package/ts/types/Enum/MailAuto.ts +1 -0
- package/ts/types/Enum/SocietyCreationCheckoutStatus.ts +8 -0
- package/ts/types/Interface/api/pappers/ReadPappers.ts +1 -0
- package/ts/types/Interface/api/society/CreateSociety.ts +3 -0
- package/ts/types/Interface/api/societyCreationCheckout/SocietyCreationCheckout.ts +66 -0
- package/ts/types/Interface/api/stripe/Create.ts +5 -0
- package/ts/types/Interface/models/ISocietyCreationCheckout.ts +23 -0
- package/ts/types/index.ts +3 -0
package/package.json
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
QueryGetBusinessPappers,
|
|
3
|
+
QuerySearchBusinessPappers,
|
|
4
|
+
ReadBusinessPappers,
|
|
5
|
+
QueryGetBusinessDocumentPappers,
|
|
6
|
+
} from '../../types/index.js';
|
|
2
7
|
import { Resource } from '../Resource.js';
|
|
3
8
|
|
|
4
9
|
export class Search extends Resource {
|
|
5
10
|
getBusiness(query: QueryGetBusinessPappers): Promise<ReadBusinessPappers> {
|
|
6
11
|
return this.axios.$get('/search/business', { params: query });
|
|
7
12
|
}
|
|
13
|
+
searchBusiness(query: QuerySearchBusinessPappers): Promise<ReadBusinessPappers[]> {
|
|
14
|
+
return this.axios.$get('/search/businesses', { params: query });
|
|
15
|
+
}
|
|
8
16
|
getDocumentFromToken(query: QueryGetBusinessDocumentPappers): Promise<void> {
|
|
9
17
|
return this.axios.$get('/search/business/document', { params: query });
|
|
10
18
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CreateSocietyCreationCheckout,
|
|
3
|
+
CreateSocietyCreationCheckoutResponse,
|
|
4
|
+
ReadSocietyCreationCheckout,
|
|
5
|
+
} from '../../types/index.js';
|
|
6
|
+
import { Resource } from '../Resource.js';
|
|
7
|
+
|
|
8
|
+
export class SocietyCreationCheckout extends Resource {
|
|
9
|
+
create(payload: CreateSocietyCreationCheckout): Promise<CreateSocietyCreationCheckoutResponse> {
|
|
10
|
+
return this.axios.$post('/society-creation-checkouts', payload);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
get(token: string): Promise<ReadSocietyCreationCheckout> {
|
|
14
|
+
return this.axios.$get(`/society-creation-checkouts/${encodeURIComponent(token)}`);
|
|
15
|
+
}
|
|
16
|
+
}
|
package/ts/api/resources.ts
CHANGED
|
@@ -195,6 +195,7 @@ import { ZendeskTicket } from './resources/zendesk/Ticket.js';
|
|
|
195
195
|
import { Vialink } from './resources/Vialink.js';
|
|
196
196
|
import { KycMandate } from './resources/KycMandate.js';
|
|
197
197
|
import { PartneredAccountant } from './resources/PartneredAccountant.js';
|
|
198
|
+
import { SocietyCreationCheckout } from './resources/SocietyCreationCheckout.js';
|
|
198
199
|
|
|
199
200
|
export const resources = {
|
|
200
201
|
budgetInsight: BudgetInsight,
|
|
@@ -394,4 +395,5 @@ export const resources = {
|
|
|
394
395
|
vialink: Vialink,
|
|
395
396
|
kycMandate: KycMandate,
|
|
396
397
|
partneredAccountant: PartneredAccountant,
|
|
398
|
+
societyCreationCheckout: SocietyCreationCheckout,
|
|
397
399
|
};
|
|
@@ -35,3 +35,6 @@ export const ClementineSources = [
|
|
|
35
35
|
{ value: 9, text: 'Salon' },
|
|
36
36
|
{ value: 10, text: 'Kandbaz' },
|
|
37
37
|
];
|
|
38
|
+
|
|
39
|
+
export const SOCIETY_CREATION_CHECKOUT_METADATA_KEY = 'societyCreationCheckoutToken';
|
|
40
|
+
export const SOCIETY_CREATION_CHECKOUT_QUERY_PARAMETER = 'societyCreationCheckout';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { IsNotEmpty, IsOptional, IsString, Matches, MaxLength, ValidateNested } from 'class-validator';
|
|
2
|
+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
3
|
+
import { SocietyCreationCheckoutStatus } from '../../../Enum/SocietyCreationCheckoutStatus.js';
|
|
4
|
+
|
|
5
|
+
export class CreateSocietyCreationCheckoutCompany {
|
|
6
|
+
@ApiProperty()
|
|
7
|
+
@IsString()
|
|
8
|
+
@Matches(/^\d{9}$/)
|
|
9
|
+
siren: string;
|
|
10
|
+
|
|
11
|
+
@ApiPropertyOptional()
|
|
12
|
+
@IsOptional()
|
|
13
|
+
@IsString()
|
|
14
|
+
@Matches(/^\d{14}$/)
|
|
15
|
+
siret?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class CreateSocietyCreationCheckout {
|
|
19
|
+
@ApiProperty({ type: CreateSocietyCreationCheckoutCompany })
|
|
20
|
+
@ValidateNested()
|
|
21
|
+
company: CreateSocietyCreationCheckoutCompany;
|
|
22
|
+
|
|
23
|
+
@ApiProperty()
|
|
24
|
+
@IsString()
|
|
25
|
+
@IsNotEmpty()
|
|
26
|
+
@MaxLength(255)
|
|
27
|
+
stripePriceId: string;
|
|
28
|
+
|
|
29
|
+
@ApiProperty()
|
|
30
|
+
@IsString()
|
|
31
|
+
@Matches(/^\/(?!\/)/)
|
|
32
|
+
@MaxLength(1024)
|
|
33
|
+
returnPath: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class CreateSocietyCreationCheckoutResponse {
|
|
37
|
+
@ApiProperty()
|
|
38
|
+
token: string;
|
|
39
|
+
|
|
40
|
+
@ApiProperty()
|
|
41
|
+
url: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export class ReadSocietyCreationCheckout {
|
|
45
|
+
@ApiProperty()
|
|
46
|
+
token: string;
|
|
47
|
+
|
|
48
|
+
@ApiProperty({ enum: SocietyCreationCheckoutStatus })
|
|
49
|
+
status: SocietyCreationCheckoutStatus;
|
|
50
|
+
|
|
51
|
+
@ApiPropertyOptional()
|
|
52
|
+
idSociety: number | null;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface SocietyCreationData {
|
|
56
|
+
idUser: number;
|
|
57
|
+
idTypeCompta: number;
|
|
58
|
+
name: string;
|
|
59
|
+
siret: string;
|
|
60
|
+
nafCode?: string;
|
|
61
|
+
address?: string;
|
|
62
|
+
addressComplement?: string;
|
|
63
|
+
zipCode?: string;
|
|
64
|
+
city?: string;
|
|
65
|
+
idLegalForm?: number;
|
|
66
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { SocietyCreationCheckoutStatus } from '../../Enum/SocietyCreationCheckoutStatus.js';
|
|
2
|
+
import type { SocietyCreationData } from '../api/societyCreationCheckout/SocietyCreationCheckout.js';
|
|
3
|
+
import type { ISociety } from './ISociety.js';
|
|
4
|
+
import type { IUser } from './IUser.js';
|
|
5
|
+
|
|
6
|
+
export interface ISocietyCreationCheckout {
|
|
7
|
+
id?: number;
|
|
8
|
+
token: string;
|
|
9
|
+
idOwner: number;
|
|
10
|
+
societyData: SocietyCreationData;
|
|
11
|
+
stripePriceId: string;
|
|
12
|
+
stripeCheckoutSessionId?: string | null;
|
|
13
|
+
idSociety?: number | null;
|
|
14
|
+
status: SocietyCreationCheckoutStatus;
|
|
15
|
+
processingStartedAt?: Date | null;
|
|
16
|
+
attemptCount: number;
|
|
17
|
+
internalError?: string | null;
|
|
18
|
+
expiresAt: Date;
|
|
19
|
+
createdAt?: Date;
|
|
20
|
+
updatedAt?: Date;
|
|
21
|
+
owner?: IUser;
|
|
22
|
+
society?: ISociety | null;
|
|
23
|
+
}
|
package/ts/types/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './Interface/models/IBusinessLineUser.js';
|
|
|
4
4
|
export * from './Interface/models/IVisualizedInformation.js';
|
|
5
5
|
export * from './Interface/models/IApiError.js';
|
|
6
6
|
export * from './Interface/models/ILoginApproval.js';
|
|
7
|
+
export * from './Interface/models/ISocietyCreationCheckout.js';
|
|
7
8
|
export * from './Interface/models/ISms.js';
|
|
8
9
|
export * from './Interface/models/IAccessToken.js';
|
|
9
10
|
export * from './Interface/models/IAccountDetail.js';
|
|
@@ -311,6 +312,7 @@ export * from './Enum/AutomaticRegistration.js';
|
|
|
311
312
|
export * from './Enum/IntermediateManagementRebate.js';
|
|
312
313
|
export * from './Enum/Das.js';
|
|
313
314
|
export * from './Enum/LoginApprovalStatus.js';
|
|
315
|
+
export * from './Enum/SocietyCreationCheckoutStatus.js';
|
|
314
316
|
export * from './Enum/MfaMode.js';
|
|
315
317
|
export * from './Enum/ChangeLog.js';
|
|
316
318
|
export * from './Enum/VisualizedInformation.js';
|
|
@@ -993,6 +995,7 @@ export * from './Interface/api/qonto/Query.js';
|
|
|
993
995
|
export * from './Interface/api/qonto/Create.js';
|
|
994
996
|
export * from './Interface/api/stripe/Create.js';
|
|
995
997
|
export * from './Interface/api/stripe/Update.js';
|
|
998
|
+
export * from './Interface/api/societyCreationCheckout/SocietyCreationCheckout.js';
|
|
996
999
|
export * from './Interface/api/qonto/UpdateConnection.js';
|
|
997
1000
|
export * from './Interface/api/qonto/GetConnectionInformation.js';
|
|
998
1001
|
export * from './Interface/api/qonto/Read.js';
|