Skip to content

Commit

Permalink
Merge pull request #8666 from ever-co/stage
Browse files Browse the repository at this point in the history
Stage
  • Loading branch information
rahul-rocket authored Dec 31, 2024
2 parents b383d27 + 19a2d07 commit 665f12b
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 39 deletions.
25 changes: 0 additions & 25 deletions packages/plugins/integration-upwork/.eslintrc.json

This file was deleted.

19 changes: 19 additions & 0 deletions packages/plugins/integration-upwork/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const baseConfig = require('../../../.eslintrc.json');

module.exports = [
...baseConfig,
{
files: ['**/*.json'],
rules: {
'@nx/dependency-checks': [
'error',
{
ignoredFiles: ['{projectRoot}/eslint.config.{js,cjs,mjs}']
}
]
},
languageOptions: {
parser: require('jsonc-eslint-parser')
}
}
];
1 change: 0 additions & 1 deletion packages/plugins/integration-upwork/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable */
export default {
displayName: 'plugin-integration-upwork',
preset: '../../../jest.preset.js',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,35 @@
import * as chalk from 'chalk';
import { ApplicationPluginConfig } from '@gauzy/common';
import { GauzyCorePlugin as Plugin, IOnPluginBootstrap, IOnPluginDestroy } from '@gauzy/plugin';
import { UpworkModule } from './upwork.module';

@Plugin({
imports: [UpworkModule]
/**
* An array of modules that will be imported and registered with the plugin.
*/
imports: [UpworkModule],
/**
* An array of Entity classes. The plugin (or ORM) will
* register these entities for use within the application.
*/
entities: [],
/**
* A callback that receives the main plugin configuration object and allows
* custom modifications before returning the final configuration.
*
* @param {ApplicationPluginConfig} config - The initial plugin configuration object.
* @returns {ApplicationPluginConfig} - The modified plugin configuration object.
*
* In this example, we're adding a custom relation field (`proposals`) to the `Tag` entity.
*/
configuration: (config: ApplicationPluginConfig) => {
return config;
}
})
export class IntegrationUpworkPlugin implements IOnPluginBootstrap, IOnPluginDestroy {
// We disable by default additional logging for each event to avoid cluttering the logs
private logEnabled = true;

constructor() {}

/**
* Called when the plugin is being initialized.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { IUpworkApiConfig } from '@gauzy/contracts';

@Injectable()
export class UpworkJobService {
constructor() {}

/*
* Get job by key
* This call returns the complete job object by job key. It's only available for users with `manage_recruiting` permissions within the team that the job is posted in.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { IUpworkApiConfig, IUpworkProposalStatusEnum, IUpworkOfferStatusEnum } f

@Injectable()
export class UpworkOffersService {
constructor() {}

/**
* List freelancer’s offers
* This call retrieves a list of offers received by a freelancer.
Expand Down
15 changes: 13 additions & 2 deletions packages/plugins/integration-upwork/src/lib/upwork.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { CqrsModule } from '@nestjs/cqrs';
import { Module } from '@nestjs/common';
import { ConfigModule } from '@gauzy/config';
import {
EmployeeModule,
ExpenseCategoriesModule,
Expand Down Expand Up @@ -38,9 +39,19 @@ import { UpworkController } from './upwork.controller';
TimeSlotModule,
UserModule,
ProposalModule,
ConfigModule,
CqrsModule
],
controllers: [UpworkAuthorizationController, UpworkController],
providers: [UpworkJobService, UpworkOffersService, UpworkReportService, UpworkTransactionService, UpworkService]
controllers: [
UpworkAuthorizationController,
UpworkController
],
providers: [
UpworkJobService,
UpworkOffersService,
UpworkReportService,
UpworkTransactionService,
UpworkService
]
})
export class UpworkModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { Auth } from 'upwork-api/lib/routers/auth.js';
import { Users } from 'upwork-api/lib/routers/organization/users.js';
import { pluck, map, sortBy } from 'underscore';
import * as moment from 'moment';
import { environment } from '@gauzy/config';
import { isEmpty, isNotEmpty, isObject } from '@gauzy/common';
import { environment } from '@gauzy/config';
import {
IAccessTokenSecretPair,
IAccessToken,
Expand Down
5 changes: 2 additions & 3 deletions packages/plugins/integration-upwork/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"forceConsistentCasingInFileNames": true,
"strict": false,
"noImplicitOverride": false,
"noPropertyAccessFromIndexSignature": false,
"noImplicitReturns": false,
"noFallthroughCasesInSwitch": false
"noFallthroughCasesInSwitch": false,
"noPropertyAccessFromIndexSignature": false
},
"files": [],
"include": [],
Expand Down

0 comments on commit 665f12b

Please sign in to comment.