@metad/contracts 0.0.1

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 (59) hide show
  1. package/README.md +1 -0
  2. package/analytics/business-area-user.model.d.ts +29 -0
  3. package/analytics/business-area.d.ts +16 -0
  4. package/analytics/business-group.d.ts +12 -0
  5. package/analytics/data-source-type.d.ts +12 -0
  6. package/analytics/data-source.d.ts +43 -0
  7. package/analytics/favorite.d.ts +14 -0
  8. package/analytics/features.d.ts +19 -0
  9. package/analytics/feed-model.d.ts +13 -0
  10. package/analytics/index.d.ts +20 -0
  11. package/analytics/indicator-market.d.ts +4 -0
  12. package/analytics/indicator.d.ts +31 -0
  13. package/analytics/insight-model.d.ts +14 -0
  14. package/analytics/model-query.d.ts +12 -0
  15. package/analytics/notification-destination.d.ts +10 -0
  16. package/analytics/role-permissions.d.ts +19 -0
  17. package/analytics/semantic-model.d.ts +42 -0
  18. package/analytics/story-point.d.ts +10 -0
  19. package/analytics/story-widget.d.ts +11 -0
  20. package/analytics/story.d.ts +18 -0
  21. package/analytics/subscription.d.ts +38 -0
  22. package/analytics/user-business-group.model.d.ts +29 -0
  23. package/analytics/visit.model.d.ts +27 -0
  24. package/analytics/webSocket.d.ts +40 -0
  25. package/base-entity.model.d.ts +21 -0
  26. package/contact.model.d.ts +41 -0
  27. package/core.model.d.ts +25 -0
  28. package/country.model.d.ts +5 -0
  29. package/currency.model.d.ts +579 -0
  30. package/email-template.model.d.ts +47 -0
  31. package/email.model.d.ts +36 -0
  32. package/employee.model.d.ts +128 -0
  33. package/entity-with-members.model.d.ts +13 -0
  34. package/feature.model.d.ts +134 -0
  35. package/file-provider.d.ts +31 -0
  36. package/help-center-article.model.d.ts +27 -0
  37. package/help-center.model.d.ts +28 -0
  38. package/http-status.enum.d.ts +57 -0
  39. package/import-export.model.d.ts +36 -0
  40. package/index.cjs +1283 -0
  41. package/index.d.ts +33 -0
  42. package/index.js +1272 -0
  43. package/language.model.d.ts +19 -0
  44. package/organization-contact.model.d.ts +73 -0
  45. package/organization-department.model.d.ts +20 -0
  46. package/organization-language.model.d.ts +18 -0
  47. package/organization-team-employee-model.d.ts +12 -0
  48. package/organization-team-model.d.ts +19 -0
  49. package/organization.model.d.ts +227 -0
  50. package/package.json +8 -0
  51. package/role-permission.model.d.ts +63 -0
  52. package/role.model.d.ts +21 -0
  53. package/seed.model.d.ts +38 -0
  54. package/tag-entity.model.d.ts +10 -0
  55. package/tenant.model.d.ts +24 -0
  56. package/translation.model.d.ts +20 -0
  57. package/user-organization.model.d.ts +24 -0
  58. package/user.model.d.ts +117 -0
  59. package/visibility.model.d.ts +5 -0
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # Pangolin
@@ -0,0 +1,29 @@
1
+ import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
2
+ import { LanguagesEnum, IUser } from '../user.model';
3
+ import { IBusinessArea } from './business-area';
4
+ export interface IBusinessAreaUser extends IBasePerTenantAndOrganizationEntityModel {
5
+ businessAreaId: string;
6
+ businessArea?: IBusinessArea;
7
+ userId: string;
8
+ isDefault: boolean;
9
+ isActive: boolean;
10
+ user?: IUser;
11
+ }
12
+ export interface IBusinessAreaUserFindInput extends IBasePerTenantAndOrganizationEntityModel {
13
+ businessAreaId?: string;
14
+ id?: string;
15
+ userId?: string;
16
+ isDefault?: boolean;
17
+ isActive?: boolean;
18
+ }
19
+ export interface IBusinessAreaUserCreateInput extends IBasePerTenantAndOrganizationEntityModel {
20
+ businessAreaId: string;
21
+ userId: string;
22
+ isDefault?: boolean;
23
+ isActive?: boolean;
24
+ }
25
+ export interface IBusinessAreaUserDeleteInput {
26
+ userbusinessAreaId: string;
27
+ requestingUser: IUser;
28
+ language?: LanguagesEnum;
29
+ }
@@ -0,0 +1,16 @@
1
+ import { IBasePerTenantEntityModel } from "../base-entity.model";
2
+ import { ITag } from "../tag-entity.model";
3
+ import { IStory } from "./story";
4
+ export interface IBusinessArea extends IBasePerTenantEntityModel {
5
+ type?: BusinessType;
6
+ name?: string;
7
+ parentId?: string;
8
+ level?: number;
9
+ tags?: ITag[];
10
+ stories?: Array<IStory>;
11
+ }
12
+ export declare enum BusinessType {
13
+ SEMANTIC_MODEL = "SEMANTIC_MODEL",
14
+ STORY = "STORY",
15
+ INDICATOR = "INDICATOR"
16
+ }
@@ -0,0 +1,12 @@
1
+ import { IBasePerTenantEntityModel } from "../base-entity.model";
2
+ import { ITag } from "../tag-entity.model";
3
+ import { BusinessType } from "./business-area";
4
+ import { IStory } from "./story";
5
+ export interface IBusinessGroup1 extends IBasePerTenantEntityModel {
6
+ type?: BusinessType;
7
+ name?: string;
8
+ parentId?: string;
9
+ level?: number;
10
+ tags?: ITag[];
11
+ stories?: Array<IStory>;
12
+ }
@@ -0,0 +1,12 @@
1
+ import { IBasePerTenantEntityModel } from "../base-entity.model";
2
+ export interface IDataSourceType extends IBasePerTenantEntityModel {
3
+ name?: string;
4
+ type?: string;
5
+ syntax?: string;
6
+ protocol?: string;
7
+ configuration?: Record<string, unknown>;
8
+ }
9
+ export declare enum DataSourceSyntaxEnum {
10
+ }
11
+ export declare enum DataSourceProtocolEnum {
12
+ }
@@ -0,0 +1,43 @@
1
+ import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
2
+ import { IDataSourceType } from './data-source-type';
3
+ import { ISemanticModel } from './semantic-model';
4
+ export interface IDataSource extends IBasePerTenantAndOrganizationEntityModel {
5
+ name?: string;
6
+ typeId?: string;
7
+ type?: IDataSourceType;
8
+ useLocalAgent?: boolean;
9
+ options?: Record<string, unknown>;
10
+ models?: ISemanticModel[];
11
+ }
12
+ export declare enum DataSourceTypeEnum {
13
+ NONE = "NONE",
14
+ BI_WEEKLY = "BI_WEEKLY",
15
+ WEEKLY = "WEEKLY",
16
+ TWICE_PER_MONTH = "TWICE_PER_MONTH",
17
+ MONTHLY = "MONTHLY"
18
+ }
19
+ export interface IDSSchema {
20
+ catalog?: string;
21
+ schema?: string;
22
+ name: string;
23
+ label?: string;
24
+ type?: string;
25
+ tables?: Array<IDSTable>;
26
+ }
27
+ export interface IDSTable {
28
+ schema?: string;
29
+ name?: string;
30
+ label?: string;
31
+ columns?: Array<IColumnDef>;
32
+ }
33
+ export interface IColumnDef {
34
+ name: string;
35
+ label?: string;
36
+ type: string;
37
+ nullable?: boolean;
38
+ position?: number;
39
+ /**
40
+ * 应该等同于 label
41
+ */
42
+ comment?: string;
43
+ }
@@ -0,0 +1,14 @@
1
+ import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
2
+ import { BusinessType } from './business-area';
3
+ import { IIndicator } from './indicator';
4
+ import { ISemanticModel } from './semantic-model';
5
+ import { IStory } from './story';
6
+ export interface IFavorite extends IBasePerTenantAndOrganizationEntityModel {
7
+ type?: BusinessType;
8
+ modelId?: string;
9
+ model?: ISemanticModel;
10
+ storyId?: string;
11
+ story?: IStory;
12
+ indicatorId?: string;
13
+ indicator?: IIndicator;
14
+ }
@@ -0,0 +1,19 @@
1
+ export declare enum AnalyticsFeatures {
2
+ FEATURE_BUSINESS_GROUP = "FEATURE_BUSINESS_GROUP",
3
+ FEATURE_INDICATOR = "FEATURE_INDICATOR",
4
+ FEATURE_INDICATOR_MARKET = "FEATURE_INDICATOR_MARKET",
5
+ FEATURE_INDICATOR_REGISTER = "FEATURE_INDICATOR_REGISTER",
6
+ FEATURE_INDICATOR_MY = "FEATURE_INDICATOR_MY",
7
+ FEATURE_INDICATOR_VIEWER = "FEATURE_INDICATOR_VIEWER",
8
+ FEATURE_STORY = "FEATURE_STORY",
9
+ FEATURE_STORY_CREATION = "FEATURE_STORY_CREATION",
10
+ FEATURE_STORY_VIEWER = "FEATURE_STORY_VIEWER",
11
+ FEATURE_STORY_MARKET = "FEATURE_STORY_MARKET",
12
+ FEATURE_MODEL = "FEATURE_MODEL",
13
+ FEATURE_MODEL_CREATION = "FEATURE_MODEL_CREATION",
14
+ FEATURE_MODEL_VIEWER = "FEATURE_MODEL_VIEWER",
15
+ FEATURE_SUBSCRIPTION = "FEATURE_SUBSCRIPTION",
16
+ FEATURE_INSIGHT = "FEATURE_INSIGHT",
17
+ FEATURE_INSIGHT_ADMIN = "FEATURE_INSIGHT_ADMIN",
18
+ FEATURE_INSIGHT_VIEWER = "FEATURE_INSIGHT_VIEWER"
19
+ }
@@ -0,0 +1,13 @@
1
+ import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
2
+ export interface IFeed extends IBasePerTenantAndOrganizationEntityModel {
3
+ type: FeedTypeEnum;
4
+ entityId?: string;
5
+ hidden?: boolean;
6
+ options?: any;
7
+ }
8
+ export declare enum FeedTypeEnum {
9
+ StoryWidget = "StoryWidget",
10
+ IndicatorWidget = "IndicatorWidget",
11
+ Recents = "Recents",
12
+ Ranking = "Ranking"
13
+ }
@@ -0,0 +1,20 @@
1
+ export * from './business-area';
2
+ export * from './business-area-user.model';
3
+ export * from './data-source';
4
+ export * from './data-source-type';
5
+ export * from './favorite';
6
+ export * from './features';
7
+ export * from './feed-model';
8
+ export * from './indicator';
9
+ export * from './indicator-market';
10
+ export * from './insight-model';
11
+ export * from './model-query';
12
+ export * from './notification-destination';
13
+ export * from './role-permissions';
14
+ export * from './semantic-model';
15
+ export * from './story';
16
+ export * from './story-point';
17
+ export * from './story-widget';
18
+ export * from './subscription';
19
+ export * from './visit.model';
20
+ export * from './webSocket';
@@ -0,0 +1,4 @@
1
+ import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
2
+ export interface IIndicatorMarket extends IBasePerTenantAndOrganizationEntityModel {
3
+ options?: Record<string, unknown>;
4
+ }
@@ -0,0 +1,31 @@
1
+ import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
2
+ import { ITag } from '../tag-entity.model';
3
+ import { IBusinessArea } from './business-area';
4
+ import { ISemanticModel } from './semantic-model';
5
+ export interface IIndicator extends IBasePerTenantAndOrganizationEntityModel {
6
+ code?: string;
7
+ name?: string;
8
+ type?: IndicatorType;
9
+ modelId?: string;
10
+ model?: ISemanticModel;
11
+ entity?: string;
12
+ unit?: string;
13
+ principal?: string;
14
+ authentication?: string;
15
+ validity?: string;
16
+ business?: string;
17
+ status?: string;
18
+ options?: {
19
+ dimensions?: Array<string>;
20
+ filters?: Array<any>;
21
+ formula?: string;
22
+ measure?: string;
23
+ };
24
+ businessAreaId?: string;
25
+ businessArea?: IBusinessArea;
26
+ tags?: ITag[];
27
+ }
28
+ export declare enum IndicatorType {
29
+ BASIC = "BASIC",
30
+ DERIVE = "DERIVE"
31
+ }
@@ -0,0 +1,14 @@
1
+ import { IBasePerTenantEntityModel } from '../base-entity.model';
2
+ import { ITag } from '../tag-entity.model';
3
+ import { IBusinessArea } from './business-area';
4
+ import { ISemanticModel } from './semantic-model';
5
+ export interface IInsightModel extends IBasePerTenantEntityModel {
6
+ name?: string;
7
+ entity?: string;
8
+ options?: Record<string, unknown>;
9
+ modelId?: string;
10
+ model?: ISemanticModel;
11
+ businessAreaId?: string;
12
+ businessArea?: IBusinessArea;
13
+ tags?: ITag[];
14
+ }
@@ -0,0 +1,12 @@
1
+ import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
2
+ import { ISemanticModel } from './semantic-model';
3
+ export interface IModelQuery extends IBasePerTenantAndOrganizationEntityModel {
4
+ key: string;
5
+ modelId: string;
6
+ model?: ISemanticModel;
7
+ name: string;
8
+ options: {
9
+ entities: string[];
10
+ statement?: string;
11
+ };
12
+ }
@@ -0,0 +1,10 @@
1
+ import { IBasePerTenantEntityModel } from "../base-entity.model";
2
+ export interface INotificationDestinationType {
3
+ name: string;
4
+ type: string;
5
+ icon?: string;
6
+ schema?: Record<string, unknown>;
7
+ }
8
+ export interface INotificationDestination extends IBasePerTenantEntityModel, INotificationDestinationType {
9
+ options?: Record<string, unknown>;
10
+ }
@@ -0,0 +1,19 @@
1
+ export declare enum AnalyticsPermissionsEnum {
2
+ DATA_SOURCE_VIEW = "DATA_SOURCE_VIEW",
3
+ DATA_SOURCE_EDIT = "DATA_SOURCE_EDIT",
4
+ NOTIFICATION_DESTINATION_VIEW = "NOTIFICATION_DESTINATION_VIEW",
5
+ NOTIFICATION_DESTINATION_EDIT = "NOTIFICATION_DESTINATION_EDIT",
6
+ SUBSCRIPTION_VIEW = "SUBSCRIPTION_VIEW",
7
+ SUBSCRIPTION_EDIT = "SUBSCRIPTION_EDIT",
8
+ MODELS_VIEW = "MODELS_VIEW",
9
+ MODELS_EDIT = "MODELS_EDIT",
10
+ STORIES_VIEW = "STORIES_VIEW",
11
+ STORIES_EDIT = "STORIES_EDIT",
12
+ BUSINESS_GROUP_VIEW = "BUSINESS_GROUP_VIEW",
13
+ BUSINESS_GROUP_EDIT = "BUSINESS_GROUP_EDIT",
14
+ INDICATOR_VIEW = "INDICATOR_VIEW",
15
+ INDICATOR_MARTKET_VIEW = "INDICATOR_MARTKET_VIEW",
16
+ INDICATOR_EDIT = "INDICATOR_EDIT",
17
+ INSIGHT_VIEW = "INSIGHT_VIEW",
18
+ INSIGHT_EDIT = "INSIGHT_EDIT"
19
+ }
@@ -0,0 +1,42 @@
1
+ import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
2
+ import { ITag } from '../tag-entity.model';
3
+ import { IBusinessArea } from './business-area';
4
+ import { IDataSource } from './data-source';
5
+ import { IIndicator } from './indicator';
6
+ import { IModelQuery } from './model-query';
7
+ import { IStory } from './story';
8
+ export declare enum AgentType {
9
+ Local = "local",
10
+ Browser = "browser",
11
+ Server = "server",
12
+ Wasm = "wasm"
13
+ }
14
+ export interface ISemanticModelPreferences {
15
+ enableCache?: boolean;
16
+ expires?: number;
17
+ language?: string;
18
+ }
19
+ export interface ISemanticModel extends IBasePerTenantAndOrganizationEntityModel {
20
+ name?: string;
21
+ type?: string;
22
+ agentType?: AgentType;
23
+ tags?: ITag[];
24
+ dataSourceId?: string;
25
+ dataSource?: IDataSource;
26
+ businessAreaId?: string;
27
+ businessArea?: IBusinessArea;
28
+ catalog?: string;
29
+ cube?: string;
30
+ options?: Record<string, unknown>;
31
+ preferences?: ISemanticModelPreferences;
32
+ stories?: Array<IStory>;
33
+ indicators?: Array<IIndicator>;
34
+ queries?: Array<IModelQuery>;
35
+ }
36
+ export declare enum ModelTypeEnum {
37
+ NONE = "NONE",
38
+ BI_WEEKLY = "BI_WEEKLY",
39
+ WEEKLY = "WEEKLY",
40
+ TWICE_PER_MONTH = "TWICE_PER_MONTH",
41
+ MONTHLY = "MONTHLY"
42
+ }
@@ -0,0 +1,10 @@
1
+ import { IStoryWidget } from './story-widget';
2
+ import { IBasePerTenantEntityModel } from '../base-entity.model';
3
+ import { IStory } from './story';
4
+ export interface IStoryPoint extends IBasePerTenantEntityModel {
5
+ name?: string;
6
+ storyId: string;
7
+ story?: IStory;
8
+ options?: Record<string, unknown>;
9
+ widgets?: IStoryWidget[];
10
+ }
@@ -0,0 +1,11 @@
1
+ import { IBasePerTenantEntityModel } from '../base-entity.model';
2
+ import { IStory } from './story';
3
+ import { IStoryPoint } from './story-point';
4
+ export interface IStoryWidget extends IBasePerTenantEntityModel {
5
+ name?: string;
6
+ storyId: string;
7
+ story?: IStory;
8
+ pointId: string;
9
+ point?: IStoryPoint;
10
+ options?: Record<string, unknown>;
11
+ }
@@ -0,0 +1,18 @@
1
+ import { IBasePerTenantEntityModel } from '../base-entity.model';
2
+ import { ITag } from '../tag-entity.model';
3
+ import { Visibility } from '../visibility.model';
4
+ import { IBusinessArea } from './business-area';
5
+ import { ISemanticModel } from './semantic-model';
6
+ import { IStoryPoint } from './story-point';
7
+ export interface IStory extends IBasePerTenantEntityModel {
8
+ name?: string;
9
+ description?: string;
10
+ tags?: ITag[];
11
+ businessAreaId?: string;
12
+ businessArea?: IBusinessArea;
13
+ modelId?: string;
14
+ model?: ISemanticModel;
15
+ visibility?: Visibility;
16
+ points?: IStoryPoint[];
17
+ options?: Record<string, unknown>;
18
+ }
@@ -0,0 +1,38 @@
1
+ import { IBasePerTenantEntityModel } from "../base-entity.model";
2
+ import { INotificationDestination } from "./notification-destination";
3
+ import { IStory } from "./story";
4
+ export interface ISubscription extends IBasePerTenantEntityModel {
5
+ name: string;
6
+ type: SubscriptionType;
7
+ description?: string;
8
+ /**
9
+ * 启动订阅
10
+ */
11
+ enable?: boolean;
12
+ storyId?: string;
13
+ story?: IStory;
14
+ pointId?: string;
15
+ widgetId?: string;
16
+ destinationId?: string;
17
+ /**
18
+ * 目的地
19
+ */
20
+ destination?: INotificationDestination;
21
+ selectedDateType?: string;
22
+ sendDate?: string;
23
+ sendTime?: string;
24
+ miOffice?: boolean;
25
+ selectedUser?: string;
26
+ selectedGroup?: string;
27
+ notifyEveryone?: boolean;
28
+ subscriptionDetail?: string;
29
+ navigationButton?: boolean;
30
+ buttonDesc?: string;
31
+ linkSetting?: string;
32
+ linkUrl?: string;
33
+ options?: Record<string, unknown>;
34
+ }
35
+ export declare enum SubscriptionType {
36
+ CHART = "CHART",
37
+ INDICATOR = "INDICATOR"
38
+ }
@@ -0,0 +1,29 @@
1
+ import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
2
+ import { LanguagesEnum, IUser } from '../user.model';
3
+ import { IBusinessGroup1 } from './business-group';
4
+ export interface IUserBusinessGroup1 extends IBasePerTenantAndOrganizationEntityModel {
5
+ businessGroupId: string;
6
+ businessGroup?: IBusinessGroup1;
7
+ userId: string;
8
+ isDefault: boolean;
9
+ isActive: boolean;
10
+ user?: IUser;
11
+ }
12
+ export interface IUserBusinessGroupFindInput extends IBasePerTenantAndOrganizationEntityModel {
13
+ businessGroupId?: string;
14
+ id?: string;
15
+ userId?: string;
16
+ isDefault?: boolean;
17
+ isActive?: boolean;
18
+ }
19
+ export interface IUserBusinessGroupCreateInput extends IBasePerTenantAndOrganizationEntityModel {
20
+ businessGroupId: string;
21
+ userId: string;
22
+ isDefault?: boolean;
23
+ isActive?: boolean;
24
+ }
25
+ export interface IUserBusinessGroupDeleteInput {
26
+ userBusinessGroupId: string;
27
+ requestingUser: IUser;
28
+ language?: LanguagesEnum;
29
+ }
@@ -0,0 +1,27 @@
1
+ import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
2
+ export interface IVisit extends IBasePerTenantAndOrganizationEntityModel {
3
+ type: VisitTypeEnum;
4
+ entity: VisitEntityEnum;
5
+ entityId: string;
6
+ entityName?: string;
7
+ businessAreaId?: string;
8
+ visitAt?: number;
9
+ visits?: number;
10
+ }
11
+ export declare enum VisitEntityEnum {
12
+ DataSource = "DataSource",
13
+ SemanticModel = "SemanticModel",
14
+ Story = "Story",
15
+ Widget = "Widget"
16
+ }
17
+ export declare enum VisitTypeEnum {
18
+ View = "View",
19
+ Data = "Data"
20
+ }
21
+ export interface IEntityVisits {
22
+ entity?: VisitEntityEnum;
23
+ entityId: string;
24
+ entityName: string;
25
+ pv?: number;
26
+ uv?: number;
27
+ }
@@ -0,0 +1,40 @@
1
+ export interface AgentEventRequest {
2
+ url?: string;
3
+ headers: {
4
+ [key: string]: string[];
5
+ };
6
+ body?: any;
7
+ catalog?: string;
8
+ table?: string;
9
+ forceRefresh?: boolean;
10
+ }
11
+ export interface AgentEventResponse extends AgentEventRequest {
12
+ status: number;
13
+ statusText: string;
14
+ }
15
+ export declare enum AgentEventType {
16
+ request = "request",
17
+ response = "response",
18
+ error = "error"
19
+ }
20
+ export interface AgentEvent {
21
+ id: string;
22
+ event: AgentEventType;
23
+ data: {
24
+ organizationId?: string;
25
+ dataSource?: {
26
+ id: string;
27
+ type: string;
28
+ updatedAt?: Date;
29
+ };
30
+ modelId?: string;
31
+ request: AgentEventRequest;
32
+ response?: AgentEventResponse;
33
+ error?: string;
34
+ };
35
+ }
36
+ export declare enum LocalAgentType {
37
+ TENANT = 0,
38
+ USER = 1
39
+ }
40
+ export declare const TENANT_AGENT_LOCAL_URL = "agent-local-url";
@@ -0,0 +1,21 @@
1
+ import { ITenant } from './tenant.model';
2
+ import { IOrganization } from './organization.model';
3
+ import { IUser } from './user.model';
4
+ export declare type ID = string;
5
+ export interface IBaseEntityModel {
6
+ id?: ID;
7
+ createdById?: ID;
8
+ createdBy?: IUser;
9
+ updatedById?: ID;
10
+ updatedBy?: IUser;
11
+ readonly createdAt?: Date;
12
+ readonly updatedAt?: Date;
13
+ }
14
+ export interface IBasePerTenantEntityModel extends IBaseEntityModel {
15
+ tenantId?: string;
16
+ tenant?: ITenant;
17
+ }
18
+ export interface IBasePerTenantAndOrganizationEntityModel extends IBasePerTenantEntityModel {
19
+ organizationId?: string;
20
+ organization?: IOrganization;
21
+ }
@@ -0,0 +1,41 @@
1
+ import { IOrganizationContact } from './organization-contact.model';
2
+ import { IBasePerTenantAndOrganizationEntityModel } from './base-entity.model';
3
+ import { IEmployee } from './employee.model';
4
+ export interface IContact extends IBasePerTenantAndOrganizationEntityModel {
5
+ id?: string;
6
+ name?: string;
7
+ firstName?: string;
8
+ lastName?: string;
9
+ country?: string;
10
+ city?: string;
11
+ address?: string;
12
+ address2?: string;
13
+ postcode?: string;
14
+ latitude?: number;
15
+ longitude?: number;
16
+ regionCode?: string;
17
+ fax?: string;
18
+ fiscalInformation?: string;
19
+ website?: string;
20
+ organization_contacts?: IOrganizationContact[];
21
+ employees?: IEmployee[];
22
+ }
23
+ export interface IContactFindInput extends IContactCreateInput {
24
+ id?: string;
25
+ }
26
+ export interface IContactCreateInput extends IBasePerTenantAndOrganizationEntityModel {
27
+ name?: string;
28
+ firstName?: string;
29
+ lastName?: string;
30
+ country?: string;
31
+ city?: string;
32
+ address?: string;
33
+ address2?: string;
34
+ postcode?: string;
35
+ latitude?: number;
36
+ longitude?: number;
37
+ regionCode?: string;
38
+ fax?: string;
39
+ fiscalInformation?: string;
40
+ website?: string;
41
+ }
@@ -0,0 +1,25 @@
1
+ export interface IPaginationInput {
2
+ limit?: number;
3
+ page?: number;
4
+ }
5
+ /**
6
+ * Generic pagination interface
7
+ */
8
+ export interface IPagination<T> {
9
+ /**
10
+ * Items included in the current listing
11
+ */
12
+ readonly items: T[];
13
+ /**
14
+ * Total number of available items
15
+ */
16
+ readonly total: number;
17
+ }
18
+ export interface IListQueryInput<T> {
19
+ /**
20
+ * Model entity defined relations
21
+ */
22
+ readonly relations?: string[];
23
+ readonly findInput?: T | any;
24
+ readonly where?: any;
25
+ }
@@ -0,0 +1,5 @@
1
+ import { IBaseEntityModel } from './base-entity.model';
2
+ export interface ICountry extends IBaseEntityModel {
3
+ isoCode: string;
4
+ country: string;
5
+ }