@abyss-project/main 1.0.107 → 1.0.108

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.
@@ -24,4 +24,4 @@ export * from './board-column-type.enum';
24
24
  export * from './board-activity.enum';
25
25
  export * from './user-agent.enum';
26
26
  export * from './measurement-unit.enum';
27
- export * from './integration-type.enum';
27
+ export * from './organization-integration-type.enum';
@@ -40,4 +40,4 @@ __exportStar(require("./board-column-type.enum"), exports);
40
40
  __exportStar(require("./board-activity.enum"), exports);
41
41
  __exportStar(require("./user-agent.enum"), exports);
42
42
  __exportStar(require("./measurement-unit.enum"), exports);
43
- __exportStar(require("./integration-type.enum"), exports);
43
+ __exportStar(require("./organization-integration-type.enum"), exports);
@@ -0,0 +1,4 @@
1
+ export declare enum OrganizationIntegrationType {
2
+ SLACK = "SLACK",
3
+ DISCORD = "DISCORD"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrganizationIntegrationType = void 0;
4
+ var OrganizationIntegrationType;
5
+ (function (OrganizationIntegrationType) {
6
+ OrganizationIntegrationType["SLACK"] = "SLACK";
7
+ OrganizationIntegrationType["DISCORD"] = "DISCORD";
8
+ })(OrganizationIntegrationType || (exports.OrganizationIntegrationType = OrganizationIntegrationType = {}));
@@ -1,6 +1,7 @@
1
+ import { OrganizationIntegrationType } from '../../../enum';
1
2
  export interface IGetOrganizationIntegrationAdminParams {
2
3
  organizationId: string;
3
- type: string;
4
+ type: OrganizationIntegrationType;
4
5
  }
5
6
  export interface IGetUserOAuthMetadataAdminParams {
6
7
  userId: string;
@@ -1,3 +1,5 @@
1
+ import { OrganizationIntegrationType } from '../../../enum';
2
+ import { OrganizationIntegrationConfig } from '../../models/organization.model';
1
3
  export interface ICreateOrganizationBody {
2
4
  name: string;
3
5
  description?: string | null;
@@ -19,13 +21,13 @@ export interface ICreateOrganizationIntegrationParams {
19
21
  organizationId: string;
20
22
  }
21
23
  export interface ICreateOrganizationIntegrationBody {
22
- type: string;
24
+ type: OrganizationIntegrationType;
23
25
  botToken: string;
24
26
  teamId?: string | null;
25
27
  guildId?: string | null;
26
- config?: Record<string, any> | null;
28
+ config?: OrganizationIntegrationConfig | null;
27
29
  }
28
30
  export interface IDeleteOrganizationIntegrationParams {
29
31
  organizationId: string;
30
- type: string;
32
+ type: OrganizationIntegrationType;
31
33
  }
@@ -1,13 +1,15 @@
1
+ import { OrganizationIntegrationType } from '../../../enum';
2
+ import { OrganizationIntegrationConfig } from '../../models/organization.model';
1
3
  import { IResponse } from '../type-message/response';
2
4
  export interface IGetOrganizationIntegrationAdminData {
3
5
  integration: {
4
6
  id: string;
5
7
  organizationId: string;
6
- type: string;
8
+ type: OrganizationIntegrationType;
7
9
  botToken: string;
8
10
  teamId: string | null;
9
11
  guildId: string | null;
10
- config: Record<string, any> | null;
12
+ config: OrganizationIntegrationConfig | null;
11
13
  } | null;
12
14
  }
13
15
  export type IGetOrganizationIntegrationAdminResponse = IResponse<IGetOrganizationIntegrationAdminData>;
@@ -1,4 +1,5 @@
1
1
  import { IProject } from './project.model';
2
+ import { OrganizationIntegrationType } from '../../enum';
2
3
  export interface IOrganization {
3
4
  id?: string;
4
5
  name: string;
@@ -8,17 +9,25 @@ export interface IOrganization {
8
9
  pictureThumbnailId: string | null;
9
10
  updatedAt?: Date;
10
11
  createdAt?: Date;
11
- project?: IProject[];
12
- organizationIntegration?: IOrganizationIntegration[];
12
+ projects?: IProject[];
13
+ integrations?: IOrganizationIntegration[];
13
14
  }
15
+ export interface ISlackOrganizationIntegrationConfig {
16
+ teamName: string;
17
+ scope: string;
18
+ }
19
+ export interface IDiscordOrganizationIntegrationConfig {
20
+ guildName?: string;
21
+ }
22
+ export type OrganizationIntegrationConfig = ISlackOrganizationIntegrationConfig | IDiscordOrganizationIntegrationConfig;
14
23
  export interface IOrganizationIntegration {
15
24
  id?: string;
16
25
  organizationId: string;
17
- type: string;
26
+ type: OrganizationIntegrationType;
18
27
  botToken: string;
19
28
  teamId: string | null;
20
29
  guildId: string | null;
21
- config: Record<string, any> | null;
30
+ config: OrganizationIntegrationConfig | null;
22
31
  updatedAt?: Date;
23
32
  createdAt?: Date;
24
33
  organization?: IOrganization;
@@ -15,7 +15,7 @@ export interface IProject {
15
15
  id?: string;
16
16
  name: string;
17
17
  description: string | null;
18
- organizationId: string | null;
18
+ organizationId: string;
19
19
  userId: string;
20
20
  pictureId: string | null;
21
21
  pictureThumbnailId: string | null;
@@ -23,7 +23,7 @@ export interface IProject {
23
23
  ownerSettings: IProjectAccessSettings;
24
24
  updatedAt?: Date;
25
25
  createdAt?: Date;
26
- organization?: IOrganization | null;
26
+ organization?: IOrganization;
27
27
  user?: IUser;
28
28
  projectAccess?: IProjectAccess[];
29
29
  projectAuthentication?: IProjectAuthentication[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abyss-project/main",
3
- "version": "1.0.107",
3
+ "version": "1.0.108",
4
4
  "description": "Core package to interact with Abyss-Project",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",