Skip to content

Commit

Permalink
🐛 Fix things
Browse files Browse the repository at this point in the history
  • Loading branch information
naelob committed Jul 7, 2024
1 parent 3c8005b commit 926a05a
Show file tree
Hide file tree
Showing 89 changed files with 1,357 additions and 284 deletions.
4 changes: 2 additions & 2 deletions ngrok.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
version: 2
authtoken: NGROK_TOKEN
authtoken: 2huTZnkO3YRlTiOAQCGT8BnN6LH_kq8QUdFZN7KDimhvj3K8
log_level: debug
log: stdout

tunnels:
api-tunnel:
proto: http
addr: 3000
domain: NGROK_DOMAIN
domain: prepared-wildcat-infinitely.ngrok-free.app
708 changes: 665 additions & 43 deletions packages/api/prisma/schema.prisma

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions packages/api/src/@core/utils/types/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ export interface IUnification {
}): Promise<UnifyReturnType>;
}

export type SyncLinkedUserType = {
integrationId: string;
linkedUserId: string;
[key: string]: any;
};

export interface IBaseSync {
saveToDb(
connection_id: string,
Expand All @@ -51,6 +57,10 @@ export interface IBaseSync {
...rest: any
): Promise<any[]>;

kickstartSync?(...params: any[]): Promise<void>;

syncForLinkedUser?(param: SyncLinkedUserType): Promise<void>;

removeInDb?(connection_id: string, remote_id: string): Promise<void>;
}

Expand Down
13 changes: 13 additions & 0 deletions packages/api/src/accounting/address/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@ export class SyncService implements OnModuleInit, IBaseSync {
) {
this.logger.setContext(SyncService.name);
}
saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}
removeInDb?(connection_id: string, remote_id: string): Promise<void> {
throw new Error('Method not implemented.');
}

async onModuleInit() {
// Initialization logic
Expand Down
13 changes: 13 additions & 0 deletions packages/api/src/accounting/attachment/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@ export class SyncService implements OnModuleInit, IBaseSync {
) {
this.logger.setContext(SyncService.name);
}
saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}
removeInDb?(connection_id: string, remote_id: string): Promise<void> {
throw new Error('Method not implemented.');
}

async onModuleInit() {
// Initialization logic
Expand Down
11 changes: 10 additions & 1 deletion packages/api/src/accounting/balancesheet/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ export class SyncService implements OnModuleInit, IBaseSync {
async onModuleInit() {
// Initialization logic
}

saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}
// Additional methods and logic
}
11 changes: 11 additions & 0 deletions packages/api/src/accounting/cashflowstatement/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,16 @@ export class SyncService implements OnModuleInit, IBaseSync {
// Initialization logic
}

saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}

// Additional methods and logic
}
11 changes: 11 additions & 0 deletions packages/api/src/accounting/companyinfo/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,16 @@ export class SyncService implements OnModuleInit, IBaseSync {
// Initialization logic
}

saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}

// Additional methods and logic
}
11 changes: 11 additions & 0 deletions packages/api/src/accounting/contact/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,16 @@ export class SyncService implements OnModuleInit, IBaseSync {
// Initialization logic
}

saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}

// Additional methods and logic
}
11 changes: 11 additions & 0 deletions packages/api/src/accounting/creditnote/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,16 @@ export class SyncService implements OnModuleInit, IBaseSync {
// Initialization logic
}

saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}

// Additional methods and logic
}
11 changes: 11 additions & 0 deletions packages/api/src/accounting/expense/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,16 @@ export class SyncService implements OnModuleInit, IBaseSync {
// Initialization logic
}

saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}

// Additional methods and logic
}
10 changes: 10 additions & 0 deletions packages/api/src/accounting/incomestatement/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ export class SyncService implements OnModuleInit, IBaseSync {
async onModuleInit() {
// Initialization logic
}
saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}

// Additional methods and logic
}
11 changes: 10 additions & 1 deletion packages/api/src/accounting/invoice/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ export class SyncService implements OnModuleInit, IBaseSync {
async onModuleInit() {
// Initialization logic
}

saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}
// Additional methods and logic
}
10 changes: 10 additions & 0 deletions packages/api/src/accounting/item/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ export class SyncService implements OnModuleInit, IBaseSync {
async onModuleInit() {
// Initialization logic
}
saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}

// Additional methods and logic
}
10 changes: 10 additions & 0 deletions packages/api/src/accounting/journalentry/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ export class SyncService implements OnModuleInit, IBaseSync {
async onModuleInit() {
// Initialization logic
}
saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}

// Additional methods and logic
}
10 changes: 10 additions & 0 deletions packages/api/src/accounting/payment/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ export class SyncService implements OnModuleInit, IBaseSync {
async onModuleInit() {
// Initialization logic
}
saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}

// Additional methods and logic
}
10 changes: 10 additions & 0 deletions packages/api/src/accounting/phonenumber/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,15 @@ export class SyncService implements OnModuleInit, IBaseSync {
// Initialization logic
}

saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}
// Additional methods and logic
}
11 changes: 10 additions & 1 deletion packages/api/src/accounting/purchaseorder/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ export class SyncService implements OnModuleInit, IBaseSync {
async onModuleInit() {
// Initialization logic
}

saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}
// Additional methods and logic
}
11 changes: 10 additions & 1 deletion packages/api/src/accounting/taxrate/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ export class SyncService implements OnModuleInit, IBaseSync {
async onModuleInit() {
// Initialization logic
}

saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}
// Additional methods and logic
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ export class SyncService implements OnModuleInit, IBaseSync {
async onModuleInit() {
// Initialization logic
}

saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}
// Additional methods and logic
}
10 changes: 10 additions & 0 deletions packages/api/src/accounting/transaction/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ export class SyncService implements OnModuleInit, IBaseSync {
async onModuleInit() {
// Initialization logic
}
saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}

// Additional methods and logic
}
11 changes: 10 additions & 1 deletion packages/api/src/accounting/vendorcredit/sync/sync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ export class SyncService implements OnModuleInit, IBaseSync {
async onModuleInit() {
// Initialization logic
}

saveToDb(
connection_id: string,
linkedUserId: string,
data: any[],
originSource: string,
remote_data: Record<string, any>[],
...rest: any
): Promise<any[]> {
throw new Error('Method not implemented.');
}
// Additional methods and logic
}
Loading

0 comments on commit 926a05a

Please sign in to comment.