@ketab-ir/core 1.8.0 → 1.9.0

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.
Files changed (29) hide show
  1. package/esm2022/lib/contracts/association/association-panel.service.mjs +3 -0
  2. package/esm2022/lib/contracts/association/index.mjs +2 -0
  3. package/esm2022/lib/contracts/index.mjs +2 -1
  4. package/esm2022/lib/enums/index.mjs +2 -1
  5. package/esm2022/lib/enums/ktb-association.mjs +54 -0
  6. package/esm2022/lib/models/association/association-info.mjs +2 -0
  7. package/esm2022/lib/models/association/index.mjs +5 -0
  8. package/esm2022/lib/models/association/member.mjs +14 -0
  9. package/esm2022/lib/models/association/register-detail.mjs +2 -0
  10. package/esm2022/lib/models/association/secretary.mjs +2 -0
  11. package/esm2022/lib/models/base/ktb-config.mjs +1 -1
  12. package/esm2022/lib/models/file-download/ktb-file.mjs +14 -1
  13. package/esm2022/lib/models/index.mjs +2 -1
  14. package/fesm2022/ketab-ir-core.mjs +85 -1
  15. package/fesm2022/ketab-ir-core.mjs.map +1 -1
  16. package/lib/contracts/association/association-panel.service.d.ts +56 -0
  17. package/lib/contracts/association/index.d.ts +1 -0
  18. package/lib/contracts/index.d.ts +1 -0
  19. package/lib/enums/index.d.ts +1 -0
  20. package/lib/enums/ktb-association.d.ts +41 -0
  21. package/lib/models/association/association-info.d.ts +15 -0
  22. package/lib/models/association/index.d.ts +4 -0
  23. package/lib/models/association/member.d.ts +24 -0
  24. package/lib/models/association/register-detail.d.ts +23 -0
  25. package/lib/models/association/secretary.d.ts +23 -0
  26. package/lib/models/base/ktb-config.d.ts +1 -0
  27. package/lib/models/file-download/ktb-file.d.ts +23 -0
  28. package/lib/models/index.d.ts +1 -0
  29. package/package.json +1 -1
@@ -0,0 +1,56 @@
1
+ import { Observable } from 'rxjs';
2
+ import { AssociationRegisterStep, KtbAssociationFile, KtbAssociationMemberFile, KtbAssociationSecretaryFile, KtbAssociationStatus } from '../../enums';
3
+ import { IKtbNewFile } from '../../models';
4
+ import { IKtbAssociationSecretaryDocs, IKtbAssociationSecretatyFinancialInfo, IKtbSecretaryFilesDto } from '../../models/association/secretary';
5
+ import { IKtbAssociationMember } from '../../models/association/member';
6
+ import { IKtbAssocaitionFiles, IKtbAssociationInfo } from '../../models/association/association-info';
7
+ import { IKtbAssociationPanelDetail } from '../../models/association/register-detail';
8
+ export declare abstract class IKtbAssociationClientService {
9
+ abstract getAssociationRegisterStep(): Observable<{
10
+ step: AssociationRegisterStep;
11
+ status?: KtbAssociationStatus;
12
+ message?: string;
13
+ associationId?: number;
14
+ associationCode?: string;
15
+ }>;
16
+ abstract getAssociationInfo(): Observable<IKtbAssociationInfo>;
17
+ abstract getSecretaryDocsInfo(): Observable<IKtbAssociationSecretaryDocs>;
18
+ abstract getSecretaryBankInfo(): Observable<{
19
+ ibanNumber: string;
20
+ cardNumber: string;
21
+ }>;
22
+ abstract getSecretaryFinancialInfo(cardNumber: string): Observable<string>;
23
+ abstract getMemberInfo(): Observable<Array<IKtbAssociationMember>>;
24
+ abstract uploadAssociationFile(params: {
25
+ file: File;
26
+ fileType: KtbAssociationFile;
27
+ associationId: number;
28
+ }): Observable<IKtbNewFile>;
29
+ abstract uploadAssociationMemberFile(params: {
30
+ file: File;
31
+ fileType: KtbAssociationMemberFile;
32
+ }): Observable<IKtbNewFile>;
33
+ abstract inquerySecretaryBankInfo(cardNumber: string): Observable<{
34
+ isMatched: boolean;
35
+ errorMessage: string;
36
+ ibanNumber: string;
37
+ }>;
38
+ abstract submitAssociationInfo(params: IKtbAssociationInfo): Observable<number>;
39
+ abstract submitSecretaryDocsInfo(params: IKtbAssociationSecretaryDocs): Observable<IKtbSecretaryFilesDto>;
40
+ abstract uploadAssociationSecretaryFile(params: {
41
+ file: File;
42
+ fileType: KtbAssociationSecretaryFile;
43
+ }): Observable<IKtbNewFile>;
44
+ abstract submitSecretaryFinancialInfo(params: IKtbAssociationSecretatyFinancialInfo): Observable<boolean>;
45
+ abstract submitMemberInfo(params: IKtbAssociationMember): Observable<IKtbAssociationMember>;
46
+ abstract deleteAssociation(associationId: number): Observable<void>;
47
+ abstract deleteAssociationMember(memberId: number): Observable<void>;
48
+ abstract deleteFile(fileAddress: string): Observable<void>;
49
+ abstract finalizeAssociationRegisterRequest(): Observable<boolean>;
50
+ abstract downloadFileNew(params: {
51
+ fileAddress: string;
52
+ isThumb: boolean;
53
+ }): Observable<Blob>;
54
+ abstract getAssociationFiles(): Observable<IKtbAssocaitionFiles>;
55
+ abstract getAssociationCompleteInfo(associationId: number): Observable<IKtbAssociationPanelDetail>;
56
+ }
@@ -0,0 +1 @@
1
+ export * from './association-panel.service';
@@ -47,3 +47,4 @@ export * from './literature';
47
47
  export * from './auth';
48
48
  export * from './foreign-books';
49
49
  export * from './post-ketab';
50
+ export * from './association';
@@ -50,3 +50,4 @@ export * from './ktb-upload-file-type';
50
50
  export * from './ktb-article';
51
51
  export * from './ktb-literature-submission';
52
52
  export * from './ktb-post-ketab';
53
+ export * from './ktb-association';
@@ -0,0 +1,41 @@
1
+ export declare enum KtbAssociationField {
2
+ Poetry = 1,
3
+ Story = 2,
4
+ BookReading = 3,
5
+ ChildrenAndTeens = 4,
6
+ Promotional = 5
7
+ }
8
+ export declare enum KtbAssociationSecretaryFile {
9
+ NationalIdCard = 1,
10
+ Resume = 2,
11
+ BirthCertificatePage1 = 3,
12
+ BirthCertificatePage2 = 4,
13
+ BirthCertificatePage3 = 5,
14
+ BirthCertificatePage4 = 6,
15
+ EducationCertificate = 7
16
+ }
17
+ export declare enum KtbAssociationFile {
18
+ Logo = 1,
19
+ Statute = 2,
20
+ Report = 3
21
+ }
22
+ export declare enum KtbAssociationMemberFile {
23
+ NationalIdCard = 1,
24
+ Resume = 2
25
+ }
26
+ export declare enum KtbAssociationStatus {
27
+ Waiting = 1,
28
+ AcceptedByErshad = 2,
29
+ ReviewingByErshad = 3,
30
+ AcceptedByBookHouse = 4,
31
+ ReviewingByBookHouse = 5,
32
+ RejectedByBookHouse = 6
33
+ }
34
+ export declare enum AssociationRegisterStep {
35
+ AssociationInfo = "ASSOCIATION_INFO",
36
+ SecretaryDocuments = "SECRETARY_DOCUMENTS",
37
+ FinancialInfo = "FINANCIAL_INFO",
38
+ MembersInfo = "MEMBERS_INFO",
39
+ Complete = "COMPLETE_REQUEST"
40
+ }
41
+ export declare const AssociationRegisterStepTitle: Record<AssociationRegisterStep, string>;
@@ -0,0 +1,15 @@
1
+ import { KtbAssociationField } from '../../enums';
2
+ import { IKtbNewFile } from '../file-download';
3
+ export interface IKtbAssociationInfo {
4
+ id: number;
5
+ title: string;
6
+ address: string;
7
+ cityId: number;
8
+ provinceId: number;
9
+ fields: Array<KtbAssociationField>;
10
+ }
11
+ export interface IKtbAssocaitionFiles {
12
+ logo: IKtbNewFile | null;
13
+ statuteFile: IKtbNewFile | null;
14
+ report: IKtbNewFile | null;
15
+ }
@@ -0,0 +1,4 @@
1
+ export * from './association-info';
2
+ export * from './member';
3
+ export * from './register-detail';
4
+ export * from './secretary';
@@ -0,0 +1,24 @@
1
+ import { IKtbNewFile } from '../file-download';
2
+ export interface IKtbAssociationMember {
3
+ associationId?: number;
4
+ id?: number;
5
+ firstName?: string;
6
+ lastName?: string;
7
+ mobile: string;
8
+ nationalCode: string;
9
+ birthDate: string;
10
+ nationalIdCardImage: IKtbNewFile;
11
+ resumeFile: IKtbNewFile;
12
+ }
13
+ export declare class KtbAssociationMember implements IKtbAssociationMember {
14
+ associationId?: number;
15
+ id?: number;
16
+ firstName?: string;
17
+ lastName?: string;
18
+ mobile: string;
19
+ nationalCode: string;
20
+ birthDate: string;
21
+ nationalIdCardImage: IKtbNewFile;
22
+ resumeFile: IKtbNewFile;
23
+ constructor(data: IKtbAssociationMember);
24
+ }
@@ -0,0 +1,23 @@
1
+ import { IKtbNewFile } from '../file-download';
2
+ export interface IKtbAssociationPanelDetail {
3
+ associationId: number;
4
+ title: string;
5
+ workFields: string[];
6
+ provinceId: number;
7
+ provinceTitle: string;
8
+ cityId: number;
9
+ cityTitle: string;
10
+ address: string;
11
+ logoFile: IKtbNewFile;
12
+ statuteFile: IKtbNewFile;
13
+ activityReportFile: IKtbNewFile;
14
+ cardNumber: string;
15
+ iban: string;
16
+ birthCertificatePage1File: IKtbNewFile;
17
+ birthCertificatePage2File: IKtbNewFile;
18
+ birthCertificatePage3File: IKtbNewFile;
19
+ birthCertificatePage4File: IKtbNewFile;
20
+ educationCertificateFile: IKtbNewFile;
21
+ nationalIdFile: IKtbNewFile;
22
+ resumeFile: IKtbNewFile;
23
+ }
@@ -0,0 +1,23 @@
1
+ import { IKtbNewFile } from '../file-download';
2
+ export interface IKtbAssociationSecretaryDocs {
3
+ nationalIdCardImage: IKtbNewFile | null;
4
+ resume: IKtbNewFile | null;
5
+ birthCertificatePage1File: IKtbNewFile | null;
6
+ birthCertificatePage2File: IKtbNewFile | null;
7
+ birthCertificatePage3File: IKtbNewFile | null;
8
+ birthCertificatePage4File: IKtbNewFile | null;
9
+ educationCertificateImage: IKtbNewFile | null;
10
+ }
11
+ export interface IKtbAssociationSecretatyFinancialInfo {
12
+ cardNumber: string;
13
+ iban: string;
14
+ }
15
+ export interface IKtbSecretaryFilesDto {
16
+ birthCertificatePage1FileAddress?: string | null;
17
+ birthCertificatePage2FileAddress?: string | null;
18
+ birthCertificatePage3FileAddress?: string | null;
19
+ birthCertificatePage4FileAddress?: string | null;
20
+ educationCertificateFileAddress?: string | null;
21
+ nationalIdFileAddress?: string | null;
22
+ resumeFileAddress?: string | null;
23
+ }
@@ -2,6 +2,7 @@ export interface IKtbConfig {
2
2
  apiAddress?: string;
3
3
  newApiAddress?: string;
4
4
  IdentityApiAddress?: string;
5
+ associationApiAddress?: string;
5
6
  appName?: string;
6
7
  searchApiAddress?: string;
7
8
  minBuyAmount: number;
@@ -9,3 +9,26 @@ export declare class KtbFile implements IKtbFile {
9
9
  fileToken?: string;
10
10
  constructor(data?: IKtbFile);
11
11
  }
12
+ export interface IKtbNewFile {
13
+ id?: number;
14
+ file?: Blob;
15
+ address: string;
16
+ url?: string;
17
+ name: string;
18
+ size: number;
19
+ type: string;
20
+ fileType?: string;
21
+ token?: string;
22
+ }
23
+ export declare class KtbNewFile implements IKtbNewFile {
24
+ id?: number;
25
+ file?: Blob;
26
+ address: string;
27
+ url?: string;
28
+ name: string;
29
+ size: number;
30
+ type: string;
31
+ fileType?: string;
32
+ token?: string;
33
+ constructor(data: IKtbNewFile);
34
+ }
@@ -58,3 +58,4 @@ export * from './committee';
58
58
  export * from './news';
59
59
  export * from './literature';
60
60
  export * from './post-ketab';
61
+ export * from './association';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ketab-ir/core",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": ">=16.0.0",