@acorex-platform/extension-project-management-fergus-client 0.0.21
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.
- package/fesm2022/acorex-platform-extension-project-management-fergus-client-complete-fergus-oauth.command-Cdw8Bola.mjs +50 -0
- package/fesm2022/acorex-platform-extension-project-management-fergus-client-complete-fergus-oauth.command-Cdw8Bola.mjs.map +1 -0
- package/fesm2022/acorex-platform-extension-project-management-fergus-client-connect-fergus.command-CIo20MSc.mjs +300 -0
- package/fesm2022/acorex-platform-extension-project-management-fergus-client-connect-fergus.command-CIo20MSc.mjs.map +1 -0
- package/fesm2022/acorex-platform-extension-project-management-fergus-client-contracts.mjs +115 -0
- package/fesm2022/acorex-platform-extension-project-management-fergus-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-extension-project-management-fergus-client-fergus-oauth-http.client-B_owd8Wu.mjs +36 -0
- package/fesm2022/acorex-platform-extension-project-management-fergus-client-fergus-oauth-http.client-B_owd8Wu.mjs.map +1 -0
- package/fesm2022/acorex-platform-extension-project-management-fergus-client.mjs +425 -0
- package/fesm2022/acorex-platform-extension-project-management-fergus-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-extension-project-management-fergus-client-contracts.d.ts +208 -0
- package/types/acorex-platform-extension-project-management-fergus-client.d.ts +23 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { AXEPMProjectSyncStrategy } from '@acorex-platform/extension-project-management-core-contracts';
|
|
2
|
+
export { AXEPMProjectSyncStrategy as AXEFergusProjectSyncStrategy, AXEPMProjectSyncStrategy, AXE_PM_PROJECT_SYNC_STRATEGIES as AXE_FERGUS_PROJECT_SYNC_STRATEGIES } from '@acorex-platform/extension-project-management-core-contracts';
|
|
3
|
+
|
|
4
|
+
declare const RootConfig: {
|
|
5
|
+
config: {
|
|
6
|
+
i18n: string;
|
|
7
|
+
};
|
|
8
|
+
module: {
|
|
9
|
+
name: string;
|
|
10
|
+
title: string;
|
|
11
|
+
icon: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
declare const AXEFergusCommandKeys: {
|
|
16
|
+
readonly ConnectionConnect: "fergus-extension.Connection:Connect";
|
|
17
|
+
readonly ConnectionCompleteOAuth: "fergus-extension.Connection:CompleteOAuth";
|
|
18
|
+
readonly OAuthStart: "fergus-extension.OAuth:Start";
|
|
19
|
+
readonly OAuthComplete: "fergus-extension.OAuth:Complete";
|
|
20
|
+
readonly OAuthValidate: "fergus-extension.OAuth:Validate";
|
|
21
|
+
readonly ProjectImportFromFergus: "fergus-extension.Project:ImportFromFergus";
|
|
22
|
+
readonly ProjectSync: "fergus-extension.Project:Sync";
|
|
23
|
+
readonly JobsPull: "fergus-extension.Jobs:Pull";
|
|
24
|
+
readonly JobsRefresh: "fergus-extension.Jobs:Refresh";
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
declare const AXEFergusMenuKeys: {
|
|
28
|
+
readonly FergusExtensionConfig: "fergus-extension:Menu:Configuration";
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Administration capabilities used by this extension.
|
|
33
|
+
* Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
|
|
34
|
+
*/
|
|
35
|
+
declare const AXPAdministrationPermissionKeys: {
|
|
36
|
+
readonly Access: "Administration:Permission:Access";
|
|
37
|
+
readonly MaintainUsersAndRoles: "Administration:Permission:MaintainUsersAndRoles";
|
|
38
|
+
readonly ManageSessions: "Administration:Permission:ManageSessions";
|
|
39
|
+
readonly MaintainPolicies: "Administration:Permission:MaintainPolicies";
|
|
40
|
+
readonly ViewIntegrations: "Administration:Permission:ViewIntegrations";
|
|
41
|
+
readonly MaintainConnections: "Administration:Permission:MaintainConnections";
|
|
42
|
+
readonly ManageIntegrationActions: "Administration:Permission:ManageIntegrationActions";
|
|
43
|
+
readonly MaintainWorkflows: "Administration:Permission:MaintainWorkflows";
|
|
44
|
+
readonly ManageWorkflowActions: "Administration:Permission:ManageWorkflowActions";
|
|
45
|
+
readonly ViewRules: "Administration:Permission:ViewRules";
|
|
46
|
+
readonly MaintainRules: "Administration:Permission:MaintainRules";
|
|
47
|
+
readonly ManageRuleActions: "Administration:Permission:ManageRuleActions";
|
|
48
|
+
readonly MaintainAi: "Administration:Permission:MaintainAi";
|
|
49
|
+
readonly UseAiAssist: "Administration:Permission:UseAiAssist";
|
|
50
|
+
readonly MaintainDashboards: "Administration:Permission:MaintainDashboards";
|
|
51
|
+
readonly ViewJobs: "Administration:Permission:ViewJobs";
|
|
52
|
+
readonly ManageJobActions: "Administration:Permission:ManageJobActions";
|
|
53
|
+
readonly ViewObservability: "Administration:Permission:ViewObservability";
|
|
54
|
+
readonly MaintainObservability: "Administration:Permission:MaintainObservability";
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated Prefer {@link AXPAdministrationPermissionKeys}.
|
|
58
|
+
* Legacy nested shape kept so existing imports compile during migration.
|
|
59
|
+
*/
|
|
60
|
+
declare const AXEFergusPermissions: {
|
|
61
|
+
readonly FergusExtension: {
|
|
62
|
+
readonly Management: "Administration:Permission:MaintainConnections";
|
|
63
|
+
readonly Catalog: {
|
|
64
|
+
readonly View: "Administration:Permission:ViewIntegrations";
|
|
65
|
+
};
|
|
66
|
+
readonly ProjectImport: {
|
|
67
|
+
readonly Execute: "Administration:Permission:ManageIntegrationActions";
|
|
68
|
+
};
|
|
69
|
+
readonly ProjectSync: {
|
|
70
|
+
readonly Execute: "Administration:Permission:ManageIntegrationActions";
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** Stored on IntegrationManagement connection `config` for tenant-scoped Fergus. */
|
|
76
|
+
interface AXEFergusConnectionConfig {
|
|
77
|
+
/** OAuth2 client ID from the Fergus developer application. */
|
|
78
|
+
clientId?: string;
|
|
79
|
+
/** OAuth2 client secret from the Fergus developer application. */
|
|
80
|
+
clientSecret?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Optional Personal Access Token (PAT).
|
|
83
|
+
* When set, API calls use this bearer token and OAuth refresh is skipped.
|
|
84
|
+
*/
|
|
85
|
+
personalAccessToken?: string;
|
|
86
|
+
/** Space-separated scopes granted at authorize time (often empty for Fergus). */
|
|
87
|
+
scope?: string;
|
|
88
|
+
/** Current bearer token (authorization-code flow or PAT copy). */
|
|
89
|
+
accessToken?: string;
|
|
90
|
+
/** Refresh token from Fergus token response. */
|
|
91
|
+
refreshToken?: string;
|
|
92
|
+
/** ISO timestamp when `accessToken` expires (omit / far-future for PAT). */
|
|
93
|
+
tokenExpiresAt?: string;
|
|
94
|
+
/** Full Fergus token JSON response. */
|
|
95
|
+
oauthTokenJson?: string;
|
|
96
|
+
/** Background job pull sync state (server-managed). */
|
|
97
|
+
jobsSync?: AXEFergusJobsSyncState;
|
|
98
|
+
}
|
|
99
|
+
/** Fergus job pull sync state stored on the tenant connection `config.jobsSync`. */
|
|
100
|
+
interface AXEFergusJobsSyncState {
|
|
101
|
+
/** ISO timestamp — last successful job pull (incremental sync watermark). */
|
|
102
|
+
lastSyncAt?: string;
|
|
103
|
+
/** ISO timestamp — last full snapshot reconcile (deactivation pass). */
|
|
104
|
+
lastFullReconcileAt?: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
interface AXEFergusOAuthStartRequest {
|
|
108
|
+
redirectUri: string;
|
|
109
|
+
connectionId?: string;
|
|
110
|
+
}
|
|
111
|
+
interface AXEFergusOAuthStartResponse {
|
|
112
|
+
redirectUrl: string;
|
|
113
|
+
state: string;
|
|
114
|
+
}
|
|
115
|
+
interface AXEFergusOAuthCompleteRequest {
|
|
116
|
+
state: string;
|
|
117
|
+
code: string;
|
|
118
|
+
}
|
|
119
|
+
interface AXEFergusOAuthCompleteResponse {
|
|
120
|
+
connectionId: string;
|
|
121
|
+
}
|
|
122
|
+
interface AXEFergusOAuthValidateRequest {
|
|
123
|
+
connectionId?: string;
|
|
124
|
+
}
|
|
125
|
+
interface AXEFergusOAuthValidateResponse {
|
|
126
|
+
valid: boolean;
|
|
127
|
+
message?: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** Subset of Fergus Open API `Job` fields used for cache / import / sync. */
|
|
131
|
+
interface AXEFergusRemoteJob {
|
|
132
|
+
id: number;
|
|
133
|
+
jobNo?: string | null;
|
|
134
|
+
jobNumber?: string | null;
|
|
135
|
+
description?: string | null;
|
|
136
|
+
longDescription?: string | null;
|
|
137
|
+
createdAt?: string | null;
|
|
138
|
+
lastModified?: string | null;
|
|
139
|
+
jobType?: string | null;
|
|
140
|
+
status?: string | null;
|
|
141
|
+
assignedGroups?: string[] | null;
|
|
142
|
+
customer?: {
|
|
143
|
+
id?: number;
|
|
144
|
+
customerFullName?: string | null;
|
|
145
|
+
} | null;
|
|
146
|
+
siteAddress?: {
|
|
147
|
+
id?: number;
|
|
148
|
+
name?: string | null;
|
|
149
|
+
address1?: string | null;
|
|
150
|
+
address2?: string | null;
|
|
151
|
+
addressSuburb?: string | null;
|
|
152
|
+
addressCity?: string | null;
|
|
153
|
+
addressRegion?: string | null;
|
|
154
|
+
addressCountry?: string | null;
|
|
155
|
+
addressPostcode?: string | null;
|
|
156
|
+
} | null;
|
|
157
|
+
customerReference?: string | null;
|
|
158
|
+
onHold?: boolean | null;
|
|
159
|
+
archived?: boolean | null;
|
|
160
|
+
parentJobId?: number | null;
|
|
161
|
+
}
|
|
162
|
+
interface AXEFergusPullJobsRequest {
|
|
163
|
+
/** Maximum Fergus jobs to pull into the cache (default 250, max 1000). */
|
|
164
|
+
maxJobs?: number;
|
|
165
|
+
/**
|
|
166
|
+
* When true, runs a full snapshot (no incremental watermark) and reconciles deactivations.
|
|
167
|
+
* When false (default for schedules), pulls newest jobs until the last-sync watermark.
|
|
168
|
+
*/
|
|
169
|
+
force?: boolean;
|
|
170
|
+
}
|
|
171
|
+
interface AXEFergusPullJobsResponse {
|
|
172
|
+
upserted: number;
|
|
173
|
+
deactivated: number;
|
|
174
|
+
/** True when incremental pull found no modified jobs in Fergus. */
|
|
175
|
+
skipped?: boolean;
|
|
176
|
+
/** Whether this run used incremental or full snapshot mode. */
|
|
177
|
+
syncMode?: 'incremental' | 'full';
|
|
178
|
+
}
|
|
179
|
+
interface AXEFergusImportJobRequest {
|
|
180
|
+
remoteRecordId: string;
|
|
181
|
+
projectTypeId: string;
|
|
182
|
+
syncStrategy: AXEPMProjectSyncStrategy;
|
|
183
|
+
}
|
|
184
|
+
interface AXEFergusImportJobResponse {
|
|
185
|
+
platformProjectId: string;
|
|
186
|
+
created: boolean;
|
|
187
|
+
}
|
|
188
|
+
interface AXEFergusSyncPlatformProjectRequest {
|
|
189
|
+
platformProjectId: string;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** Public OAuth authorize endpoint (Cognito-hosted). */
|
|
193
|
+
declare const AXE_FERGUS_OAUTH_AUTHORIZE_URL = "https://auth.fergus.com/oauth2/authorize";
|
|
194
|
+
/** Public OAuth token endpoint (authorization_code + refresh_token). */
|
|
195
|
+
declare const AXE_FERGUS_OAUTH_TOKEN_URL = "https://auth.fergus.com/oauth2/token";
|
|
196
|
+
/** REST API base URL stored on connection `instanceUrl`. */
|
|
197
|
+
declare const AXE_FERGUS_API_BASE_URL = "https://api.fergus.com";
|
|
198
|
+
/**
|
|
199
|
+
* OAuth scopes for connect.
|
|
200
|
+
* Fergus OpenAPI currently advertises an empty scope set; leave blank unless
|
|
201
|
+
* the registered application requires explicit scopes.
|
|
202
|
+
*/
|
|
203
|
+
declare const AXE_FERGUS_OAUTH_SCOPES = "";
|
|
204
|
+
/** Default page size for Fergus `GET /jobs` (API max is 100). */
|
|
205
|
+
declare const AXE_FERGUS_JOBS_PAGE_SIZE = 100;
|
|
206
|
+
|
|
207
|
+
export { AXEFergusCommandKeys, AXEFergusMenuKeys, AXEFergusPermissions, AXE_FERGUS_API_BASE_URL, AXE_FERGUS_JOBS_PAGE_SIZE, AXE_FERGUS_OAUTH_AUTHORIZE_URL, AXE_FERGUS_OAUTH_SCOPES, AXE_FERGUS_OAUTH_TOKEN_URL, AXPAdministrationPermissionKeys, RootConfig };
|
|
208
|
+
export type { AXEFergusConnectionConfig, AXEFergusImportJobRequest, AXEFergusImportJobResponse, AXEFergusJobsSyncState, AXEFergusOAuthCompleteRequest, AXEFergusOAuthCompleteResponse, AXEFergusOAuthStartRequest, AXEFergusOAuthStartResponse, AXEFergusOAuthValidateRequest, AXEFergusOAuthValidateResponse, AXEFergusPullJobsRequest, AXEFergusPullJobsResponse, AXEFergusRemoteJob, AXEFergusSyncPlatformProjectRequest };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import * as i1 from '@acorex-platform/module-integration-management-client';
|
|
3
|
+
import { AXPLogoProvider } from '@acorex-platform/framework-client/core';
|
|
4
|
+
|
|
5
|
+
declare class AXEFergusExtensionModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXEFergusExtensionModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXEFergusExtensionModule, never, [typeof i1.AXMIntegrationManagementModule], never>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AXEFergusExtensionModule>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare const axpFergusLogoKey: "fergus";
|
|
12
|
+
/** Mark artwork; consuming apps copy to `assets/images/brand/integrations/`. */
|
|
13
|
+
declare const AXE_FERGUS_MARK_SRC = "assets/images/brand/integrations/fergus-mark.png";
|
|
14
|
+
/** Source mark is 266×311. */
|
|
15
|
+
declare const AXE_FERGUS_MARK_ASPECT: number;
|
|
16
|
+
|
|
17
|
+
declare const AXE_FERGUS_LOGO_PROVIDER: {
|
|
18
|
+
readonly provide: i0.InjectionToken<AXPLogoProvider[]>;
|
|
19
|
+
readonly useValue: AXPLogoProvider;
|
|
20
|
+
readonly multi: true;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { AXEFergusExtensionModule, AXE_FERGUS_LOGO_PROVIDER, AXE_FERGUS_MARK_ASPECT, AXE_FERGUS_MARK_SRC, axpFergusLogoKey };
|