@acorex-platform/extension-project-management-fergus-client 0.0.70 → 2.0.0-next.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-extension-project-management-fergus-client-contracts.mjs","sources":["../../../../libs/extensions/project-management/fergus/contracts/src/root-config.ts","../../../../libs/extensions/project-management/fergus/contracts/src/manifest.ts","../../../../libs/extensions/project-management/fergus/contracts/src/commands.keys.ts","../../../../libs/extensions/project-management/fergus/contracts/src/menu.keys.ts","../../../../libs/extensions/project-management/fergus/contracts/src/permission.keys.ts","../../../../libs/extensions/project-management/fergus/contracts/src/connection.types.ts","../../../../libs/extensions/project-management/fergus/contracts/src/oauth.api.types.ts","../../../../libs/extensions/project-management/fergus/contracts/src/project-sync.api.types.ts","../../../../libs/extensions/project-management/fergus/contracts/src/fergus.constants.ts","../../../../libs/extensions/project-management/fergus/contracts/src/acorex-platform-extension-project-management-fergus-client-contracts.ts"],"sourcesContent":["//#region ---- Module Config ----\n\nconst config = {\n i18n: 'extensions-fergus',\n};\n\nconst MODULE_NAME = 'FergusExtension';\n\nexport const RootConfig = {\n config,\n module: {\n name: MODULE_NAME,\n title: `@${config.i18n}:integration.display-name`,\n icon: 'fa-light fa-briefcase',\n },\n};\n\n//#endregion\n","//#region ---- Manifest ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from './root-config';\n\nexport const FergusExtensionManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'integration',\n domain: 'project-management',\n dependencies: [],\n};\n\n//#endregion\n","//#region ---- Command Keys ----\n\nexport const AXEFergusCommandKeys = {\n ConnectionConnect: 'fergus-extension.Connection:Connect',\n ConnectionCompleteOAuth: 'fergus-extension.Connection:CompleteOAuth',\n ConnectionLifecycle: 'fergus-extension.Connection:Lifecycle',\n OAuthStart: 'fergus-extension.OAuth:Start',\n OAuthComplete: 'fergus-extension.OAuth:Complete',\n OAuthValidate: 'fergus-extension.OAuth:Validate',\n ProjectImportFromFergus: 'fergus-extension.Project:ImportFromFergus',\n CustomerImportFromFergus: 'fergus-extension.Customer:ImportFromFergus',\n ProjectSync: 'fergus-extension.Project:Sync',\n JobsPull: 'fergus-extension.Jobs:Pull',\n JobsRefresh: 'fergus-extension.Jobs:Refresh',\n} as const;\n\n//#endregion\n","//#region ---- Menu Keys ----\n\nexport const AXEFergusMenuKeys = {\n FergusExtensionConfig: 'fergus-extension:Menu:Configuration',\n} as const;\n\n//#endregion\n","//#region ---- Permission Keys ----\n\n/**\n * Administration capabilities used by this extension.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPAdministrationPermissionKeys = {\n Access: 'Administration:Permission:Access',\n MaintainUsersAndRoles: 'Administration:Permission:MaintainUsersAndRoles',\n ManageSessions: 'Administration:Permission:ManageSessions',\n MaintainPolicies: 'Administration:Permission:MaintainPolicies',\n ViewIntegrations: 'Administration:Permission:ViewIntegrations',\n MaintainConnections: 'Administration:Permission:MaintainConnections',\n ManageIntegrationActions: 'Administration:Permission:ManageIntegrationActions',\n MaintainWorkflows: 'Administration:Permission:MaintainWorkflows',\n ManageWorkflowActions: 'Administration:Permission:ManageWorkflowActions',\n ViewRules: 'Administration:Permission:ViewRules',\n MaintainRules: 'Administration:Permission:MaintainRules',\n ManageRuleActions: 'Administration:Permission:ManageRuleActions',\n MaintainAi: 'Administration:Permission:MaintainAi',\n UseAiAssist: 'Administration:Permission:UseAiAssist',\n MaintainDashboards: 'Administration:Permission:MaintainDashboards',\n ViewJobs: 'Administration:Permission:ViewJobs',\n ManageJobActions: 'Administration:Permission:ManageJobActions',\n ViewObservability: 'Administration:Permission:ViewObservability',\n MaintainObservability: 'Administration:Permission:MaintainObservability',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPAdministrationPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXEFergusPermissions = {\n FergusExtension: {\n Management: AXPAdministrationPermissionKeys.MaintainConnections,\n Catalog: {\n View: AXPAdministrationPermissionKeys.ViewIntegrations,\n },\n ProjectImport: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n CustomerImport: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n ProjectSync: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n },\n} as const;\n\n//#endregion\n","//#region ---- Fergus tenant connection config ----\n\n/** Stored on IntegrationManagement connection `config` for tenant-scoped Fergus. */\nexport interface AXEFergusConnectionConfig {\n /** OAuth2 client ID from the Fergus developer application. */\n clientId?: string;\n /** OAuth2 client secret from the Fergus developer application. */\n clientSecret?: string;\n /**\n * Optional Personal Access Token (PAT).\n * When set, API calls use this bearer token and OAuth refresh is skipped.\n */\n personalAccessToken?: string;\n /** Space-separated scopes granted at authorize time (often empty for Fergus). */\n scope?: string;\n /** Current bearer token (authorization-code flow or PAT copy). */\n accessToken?: string;\n /** Refresh token from Fergus token response. */\n refreshToken?: string;\n /** ISO timestamp when `accessToken` expires (omit / far-future for PAT). */\n tokenExpiresAt?: string;\n /** Full Fergus token JSON response. */\n oauthTokenJson?: string;\n /** Background job pull sync state (server-managed). */\n jobsSync?: AXEFergusJobsSyncState;\n}\n\n/** Fergus job pull sync state stored on the tenant connection `config.jobsSync`. */\nexport interface AXEFergusJobsSyncState {\n /** ISO timestamp — last successful job pull (incremental sync watermark). */\n lastSyncAt?: string;\n /** ISO timestamp — last full snapshot reconcile (deactivation pass). */\n lastFullReconcileAt?: string;\n}\n\n//#endregion\n","//#region ---- Fergus OAuth API (client ↔ server) ----\n\nexport interface AXEFergusOAuthStartRequest {\n redirectUri: string;\n connectionId?: string;\n}\n\nexport interface AXEFergusOAuthStartResponse {\n redirectUrl: string;\n state: string;\n}\n\nexport interface AXEFergusOAuthCompleteRequest {\n state: string;\n code: string;\n}\n\nexport interface AXEFergusOAuthCompleteResponse {\n connectionId: string;\n}\n\nexport interface AXEFergusOAuthValidateRequest {\n connectionId?: string;\n}\n\nexport interface AXEFergusOAuthValidateResponse {\n valid: boolean;\n message?: string;\n}\n\n//#endregion\n","//#region ---- Remote Fergus DTOs ----\n\nimport type { AXEFergusProjectSyncStrategy } from './sync.types';\n\n/** Shared address subset used on Fergus customer / site payloads. */\nexport interface AXEFergusRemoteAddress {\n id?: number;\n address1?: string | null;\n address2?: string | null;\n addressSuburb?: string | null;\n addressCity?: string | null;\n addressRegion?: string | null;\n addressPostcode?: string | null;\n addressCountry?: string | null;\n}\n\nexport interface AXEFergusRemoteContactItem {\n id?: number;\n contactType?: string | null;\n contactValue?: string | null;\n}\n\nexport interface AXEFergusRemoteContact {\n id?: number;\n firstName?: string | null;\n lastName?: string | null;\n position?: string | null;\n company?: string | null;\n contactItems?: AXEFergusRemoteContactItem[] | null;\n}\n\nexport interface AXEFergusRemoteSitePrimaryContact {\n CellPhone?: string | null;\n Email?: string | null;\n Contact?: { ID?: number } | null;\n}\n\n/** Subset of Fergus Open API `Job` fields used for cache / import / sync. */\nexport interface AXEFergusRemoteJob {\n id: number;\n jobNo?: string | null;\n jobNumber?: string | null;\n description?: string | null;\n longDescription?: string | null;\n /** Display name when Fergus returns one (optional). */\n name?: string | null;\n Name?: string | null;\n createdAt?: string | null;\n lastModified?: string | null;\n jobType?: string | null;\n status?: string | null;\n assignedGroups?: string[] | null;\n customer?: {\n id?: number;\n customerFullName?: string | null;\n } | null;\n siteAddress?: {\n id?: number;\n name?: string | null;\n address1?: string | null;\n address2?: string | null;\n addressSuburb?: string | null;\n addressCity?: string | null;\n addressRegion?: string | null;\n addressCountry?: string | null;\n addressPostcode?: string | null;\n } | null;\n customerReference?: string | null;\n onHold?: boolean | null;\n archived?: boolean | null;\n parentJobId?: number | null;\n}\n\nexport interface AXEFergusRemoteCustomer {\n id: number;\n companyId?: number | null;\n customerFullName?: string | null;\n mainContact?: AXEFergusRemoteContact | null;\n physicalAddress?: AXEFergusRemoteAddress | null;\n postalAddress?: AXEFergusRemoteAddress | null;\n customerSource?: string | null;\n}\n\nexport interface AXEFergusRemoteSite {\n id: number;\n companyId?: number | null;\n name?: string | null;\n physicalAddress?: AXEFergusRemoteAddress | null;\n postalAddress?: AXEFergusRemoteAddress | null;\n PrimaryContact?: AXEFergusRemoteSitePrimaryContact | null;\n isArchived?: boolean | null;\n defaultContact?: AXEFergusRemoteContact | null;\n}\n\n//#endregion\n\n//#region ---- API request / response ----\n\nexport interface AXEFergusPullJobsRequest {\n /** When set, pulls for this Fergus connection (required for multi-connection schedules). */\n connectionId?: string;\n /** Maximum Fergus jobs to pull into the cache (default 250, max 1000). */\n maxJobs?: number;\n /**\n * When true, runs a full snapshot (no incremental watermark) and reconciles deactivations.\n * When false (default for schedules), pulls newest jobs until the last-sync watermark.\n */\n force?: boolean;\n}\n\nexport interface AXEFergusPullJobsResponse {\n upserted: number;\n deactivated: number;\n /** True when incremental pull found no modified jobs in Fergus. */\n skipped?: boolean;\n /** Whether this run used incremental or full snapshot mode. */\n syncMode?: 'incremental' | 'full';\n /** Per data-type upsert counts (jobs / customers / sites). */\n byResourceType?: {\n job?: { upserted: number; deactivated: number };\n customer?: { upserted: number; deactivated: number };\n site?: { upserted: number; deactivated: number };\n };\n}\n\nexport interface AXEFergusImportJobRequest {\n remoteRecordId: string;\n projectTypeId: string;\n syncStrategy: AXEFergusProjectSyncStrategy;\n}\n\nexport interface AXEFergusImportJobResponse {\n platformProjectId: string;\n created: boolean;\n}\n\nexport interface AXEFergusImportCustomerRequest {\n remoteRecordId: string;\n}\n\nexport interface AXEFergusImportCustomerResponse {\n platformCustomerId: string;\n created: boolean;\n}\n\nexport interface AXEFergusSyncPlatformProjectRequest {\n platformProjectId: string;\n}\n\nexport interface AXEFergusConnectionLifecycleRequest {\n connectionId: string;\n action: 'connected' | 'disconnected' | 'deleted' | 'enabled' | 'disabled';\n}\n\nexport interface AXEFergusConnectionLifecycleResponse {\n ok: true;\n}\n\n//#endregion\n","//#region ---- Fergus API / OAuth constants ----\n\n/** Public OAuth authorize endpoint (Cognito-hosted). */\nexport const AXE_FERGUS_OAUTH_AUTHORIZE_URL = 'https://auth.fergus.com/oauth2/authorize';\n\n/** Public OAuth token endpoint (authorization_code + refresh_token). */\nexport const AXE_FERGUS_OAUTH_TOKEN_URL = 'https://auth.fergus.com/oauth2/token';\n\n/** REST API base URL stored on connection `instanceUrl`. */\nexport const AXE_FERGUS_API_BASE_URL = 'https://api.fergus.com';\n\n/**\n * OAuth scopes for connect.\n * Fergus OpenAPI currently advertises an empty scope set; leave blank unless\n * the registered application requires explicit scopes.\n */\nexport const AXE_FERGUS_OAUTH_SCOPES = '';\n\n/** Default page size for Fergus `GET /jobs` (API max is 100). */\nexport const AXE_FERGUS_JOBS_PAGE_SIZE = 100;\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;AAEA,MAAM,MAAM,GAAG;AACb,IAAA,IAAI,EAAE,mBAAmB;CAC1B;AAED,MAAM,WAAW,GAAG,iBAAiB;AAE9B,MAAM,UAAU,GAAG;IACxB,MAAM;AACN,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,KAAK,EAAE,CAAA,CAAA,EAAI,MAAM,CAAC,IAAI,CAAA,yBAAA,CAA2B;AACjD,QAAA,IAAI,EAAE,uBAAuB;AAC9B,KAAA;;AAGH;;ACjBA;AAKO,MAAM,uBAAuB,GAAsB;AACxD,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK;AAC9B,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,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E,4CAA4C;AAC9D,IAAA,iBAAiB,EAAE,6CAA6C;AAChE,IAAA,qBAAqB,EAAE,iDAAiD;;AAG1E;;;AAGG;AACI,MAAM,oBAAoB,GAAG;AAClC,IAAA,eAAe,EAAE;QACf,UAAU,EAAE,+BAA+B,CAAC,mBAAmB;AAC/D,QAAA,OAAO,EAAE;YACP,IAAI,EAAE,+BAA+B,CAAC,gBAAgB;AACvD,SAAA;AACD,QAAA,aAAa,EAAE;YACb,OAAO,EAAE,+BAA+B,CAAC,wBAAwB;AAClE,SAAA;AACD,QAAA,cAAc,EAAE;YACd,OAAO,EAAE,+BAA+B,CAAC,wBAAwB;AAClE,SAAA;AACD,QAAA,WAAW,EAAE;YACX,OAAO,EAAE,+BAA+B,CAAC,wBAAwB;AAClE,SAAA;AACF,KAAA;;AAGH;;AClDA;AAmCA;;ACnCA;AA8BA;;AC9BA;AA8JA;;AC9JA;AAEA;AACO,MAAM,8BAA8B,GAAG;AAE9C;AACO,MAAM,0BAA0B,GAAG;AAE1C;AACO,MAAM,uBAAuB,GAAG;AAEvC;;;;AAIG;AACI,MAAM,uBAAuB,GAAG;AAEvC;AACO,MAAM,yBAAyB,GAAG;AAEzC;;ACrBA;;AAEG;;"}
1
+ {"version":3,"file":"acorex-platform-extension-project-management-fergus-client-contracts.mjs","sources":["../../../../libs/extensions/project-management/fergus/contracts/src/root-config.ts","../../../../libs/extensions/project-management/fergus/contracts/src/manifest.ts","../../../../libs/extensions/project-management/fergus/contracts/src/commands.keys.ts","../../../../libs/extensions/project-management/fergus/contracts/src/menu.keys.ts","../../../../libs/extensions/project-management/fergus/contracts/src/permission.keys.ts","../../../../libs/extensions/project-management/fergus/contracts/src/connection.types.ts","../../../../libs/extensions/project-management/fergus/contracts/src/oauth.api.types.ts","../../../../libs/extensions/project-management/fergus/contracts/src/project-sync.api.types.ts","../../../../libs/extensions/project-management/fergus/contracts/src/fergus.constants.ts","../../../../libs/extensions/project-management/fergus/contracts/src/acorex-platform-extension-project-management-fergus-client-contracts.ts"],"sourcesContent":["//#region ---- Module Config ----\n\nconst config = {\n i18n: 'extensions-fergus',\n};\n\nconst MODULE_NAME = 'FergusExtension';\n\nexport const RootConfig = {\n config,\n module: {\n name: MODULE_NAME,\n title: `@${config.i18n}:integration.display-name`,\n icon: 'fa-light fa-briefcase',\n },\n};\n\n//#endregion\n","//#region ---- Manifest ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from './root-config';\n\nexport const FergusExtensionManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'integration',\n domain: 'project-management',\n dependencies: [],\n};\n\n//#endregion\n","//#region ---- Command Keys ----\n\nexport const AXEFergusCommandKeys = {\n ConnectionConnect: 'fergus-extension.Connection:Connect',\n ConnectionCompleteOAuth: 'fergus-extension.Connection:CompleteOAuth',\n ConnectionLifecycle: 'fergus-extension.Connection:Lifecycle',\n OAuthStart: 'fergus-extension.OAuth:Start',\n OAuthComplete: 'fergus-extension.OAuth:Complete',\n OAuthValidate: 'fergus-extension.OAuth:Validate',\n ProjectImportFromFergus: 'fergus-extension.Project:ImportFromFergus',\n CustomerImportFromFergus: 'fergus-extension.Customer:ImportFromFergus',\n ProjectSync: 'fergus-extension.Project:Sync',\n JobsPull: 'fergus-extension.Jobs:Pull',\n JobsRefresh: 'fergus-extension.Jobs:Refresh',\n} as const;\n\n//#endregion\n","//#region ---- Menu Keys ----\n\nexport const AXEFergusMenuKeys = {\n FergusExtensionConfig: 'fergus-extension:Menu:Configuration',\n} as const;\n\n//#endregion\n","//#region ---- Permission Keys ----\n\n/**\n * Administration capabilities used by this extension.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPAdministrationPermissionKeys = {\n Access: 'Administration:Permission:Access',\n MaintainUsersAndRoles: 'Administration:Permission:MaintainUsersAndRoles',\n ManageSessions: 'Administration:Permission:ManageSessions',\n MaintainPolicies: 'Administration:Permission:MaintainPolicies',\n ViewIntegrations: 'Administration:Permission:ViewIntegrations',\n MaintainConnections: 'Administration:Permission:MaintainConnections',\n ManageIntegrationActions: 'Administration:Permission:ManageIntegrationActions',\n MaintainWorkflows: 'Administration:Permission:MaintainWorkflows',\n ManageWorkflowActions: 'Administration:Permission:ManageWorkflowActions',\n ViewRules: 'Administration:Permission:ViewRules',\n MaintainRules: 'Administration:Permission:MaintainRules',\n ManageRuleActions: 'Administration:Permission:ManageRuleActions',\n MaintainAi: 'Administration:Permission:MaintainAi',\n UseAiAssist: 'Administration:Permission:UseAiAssist',\n MaintainDashboards: 'Administration:Permission:MaintainDashboards',\n ViewJobs: 'Administration:Permission:ViewJobs',\n ManageJobActions: 'Administration:Permission:ManageJobActions',\n ViewObservability: 'Administration:Permission:ViewObservability',\n MaintainObservability: 'Administration:Permission:MaintainObservability',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPAdministrationPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXEFergusPermissions = {\n FergusExtension: {\n Management: AXPAdministrationPermissionKeys.MaintainConnections,\n Catalog: {\n View: AXPAdministrationPermissionKeys.ViewIntegrations,\n },\n ProjectImport: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n CustomerImport: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n ProjectSync: {\n Execute: AXPAdministrationPermissionKeys.ManageIntegrationActions,\n },\n },\n} as const;\n\n//#endregion\n","//#region ---- Fergus tenant connection config ----\n\n/** Stored on IntegrationManagement connection `config` for tenant-scoped Fergus. */\nexport interface AXEFergusConnectionConfig {\n /** OAuth2 client ID from the Fergus developer application. */\n clientId?: string;\n /** OAuth2 client secret from the Fergus developer application. */\n clientSecret?: string;\n /**\n * Optional Personal Access Token (PAT).\n * When set, API calls use this bearer token and OAuth refresh is skipped.\n */\n personalAccessToken?: string;\n /** Space-separated scopes granted at authorize time (often empty for Fergus). */\n scope?: string;\n /** Current bearer token (authorization-code flow or PAT copy). */\n accessToken?: string;\n /** Refresh token from Fergus token response. */\n refreshToken?: string;\n /** ISO timestamp when `accessToken` expires (omit / far-future for PAT). */\n tokenExpiresAt?: string;\n /** Full Fergus token JSON response. */\n oauthTokenJson?: string;\n /** Background job pull sync state (server-managed). */\n jobsSync?: AXEFergusJobsSyncState;\n}\n\n/** Fergus job pull sync state stored on the tenant connection `config.jobsSync`. */\nexport interface AXEFergusJobsSyncState {\n /** ISO timestamp — last successful job pull (incremental sync watermark). */\n lastSyncAt?: string;\n /** ISO timestamp — last full snapshot reconcile (deactivation pass). */\n lastFullReconcileAt?: string;\n}\n\n//#endregion\n","//#region ---- Fergus OAuth API (client ↔ server) ----\n\nexport interface AXEFergusOAuthStartRequest {\n redirectUri: string;\n connectionId?: string;\n}\n\nexport interface AXEFergusOAuthStartResponse {\n redirectUrl: string;\n state: string;\n}\n\nexport interface AXEFergusOAuthCompleteRequest {\n state: string;\n code: string;\n}\n\nexport interface AXEFergusOAuthCompleteResponse {\n connectionId: string;\n}\n\nexport interface AXEFergusOAuthValidateRequest {\n connectionId?: string;\n}\n\nexport interface AXEFergusOAuthValidateResponse {\n valid: boolean;\n message?: string;\n}\n\n//#endregion\n","//#region ---- Remote Fergus DTOs ----\n\nimport type { AXEFergusProjectSyncStrategy } from './sync.types';\n\n/** Shared address subset used on Fergus customer / site payloads. */\nexport interface AXEFergusRemoteAddress {\n id?: number;\n address1?: string | null;\n address2?: string | null;\n addressSuburb?: string | null;\n addressCity?: string | null;\n addressRegion?: string | null;\n addressPostcode?: string | null;\n addressCountry?: string | null;\n}\n\nexport interface AXEFergusRemoteContactItem {\n id?: number;\n contactType?: string | null;\n contactValue?: string | null;\n}\n\nexport interface AXEFergusRemoteContact {\n id?: number;\n firstName?: string | null;\n lastName?: string | null;\n position?: string | null;\n company?: string | null;\n contactItems?: AXEFergusRemoteContactItem[] | null;\n}\n\nexport interface AXEFergusRemoteSitePrimaryContact {\n CellPhone?: string | null;\n Email?: string | null;\n Contact?: { ID?: number } | null;\n}\n\n/** Subset of Fergus Open API `Job` fields used for cache / import / sync. */\nexport interface AXEFergusRemoteJob {\n id: number;\n jobNo?: string | null;\n jobNumber?: string | null;\n description?: string | null;\n longDescription?: string | null;\n /** Display name when Fergus returns one (optional). */\n name?: string | null;\n Name?: string | null;\n createdAt?: string | null;\n lastModified?: string | null;\n jobType?: string | null;\n status?: string | null;\n assignedGroups?: string[] | null;\n customer?: {\n id?: number;\n customerFullName?: string | null;\n } | null;\n siteAddress?: {\n id?: number;\n name?: string | null;\n address1?: string | null;\n address2?: string | null;\n addressSuburb?: string | null;\n addressCity?: string | null;\n addressRegion?: string | null;\n addressCountry?: string | null;\n addressPostcode?: string | null;\n } | null;\n customerReference?: string | null;\n onHold?: boolean | null;\n archived?: boolean | null;\n parentJobId?: number | null;\n}\n\nexport interface AXEFergusRemoteCustomer {\n id: number;\n companyId?: number | null;\n customerFullName?: string | null;\n mainContact?: AXEFergusRemoteContact | null;\n physicalAddress?: AXEFergusRemoteAddress | null;\n postalAddress?: AXEFergusRemoteAddress | null;\n customerSource?: string | null;\n}\n\nexport interface AXEFergusRemoteSite {\n id: number;\n companyId?: number | null;\n name?: string | null;\n physicalAddress?: AXEFergusRemoteAddress | null;\n postalAddress?: AXEFergusRemoteAddress | null;\n PrimaryContact?: AXEFergusRemoteSitePrimaryContact | null;\n isArchived?: boolean | null;\n defaultContact?: AXEFergusRemoteContact | null;\n}\n\n/** Fergus `/users` — cached as `resourceType=employee` (`status=active` only). */\nexport interface AXEFergusRemoteEmployee {\n id: number;\n companyId?: number | null;\n firstName?: string | null;\n lastName?: string | null;\n email?: string | null;\n userType?: string | null;\n address?: AXEFergusRemoteAddress | Record<string, unknown> | null;\n status?: string | null;\n}\n\n//#endregion\n\n//#region ---- API request / response ----\n\nexport interface AXEFergusPullJobsRequest {\n /** When set, pulls for this Fergus connection (required for multi-connection schedules). */\n connectionId?: string;\n /** Maximum Fergus jobs to pull into the cache (default 250, max 1000). */\n maxJobs?: number;\n /**\n * When true, runs a full snapshot (no incremental watermark) and reconciles deactivations.\n * When false (default for schedules), pulls newest jobs until the last-sync watermark.\n */\n force?: boolean;\n}\n\nexport interface AXEFergusPullJobsResponse {\n upserted: number;\n deactivated: number;\n /** True when incremental pull found no modified jobs in Fergus. */\n skipped?: boolean;\n /** Whether this run used incremental or full snapshot mode. */\n syncMode?: 'incremental' | 'full';\n /** Per data-type upsert counts (jobs / customers / sites / employees). */\n byResourceType?: {\n job?: { upserted: number; deactivated: number };\n customer?: { upserted: number; deactivated: number };\n site?: { upserted: number; deactivated: number };\n employee?: { upserted: number; deactivated: number };\n };\n}\n\nexport interface AXEFergusImportJobRequest {\n remoteRecordId: string;\n projectTypeId: string;\n syncStrategy: AXEFergusProjectSyncStrategy;\n}\n\nexport interface AXEFergusImportJobResponse {\n platformProjectId: string;\n created: boolean;\n}\n\nexport interface AXEFergusImportCustomerRequest {\n remoteRecordId: string;\n}\n\nexport interface AXEFergusImportCustomerResponse {\n platformCustomerId: string;\n created: boolean;\n}\n\nexport interface AXEFergusSyncPlatformProjectRequest {\n platformProjectId: string;\n}\n\nexport interface AXEFergusConnectionLifecycleRequest {\n connectionId: string;\n action: 'connected' | 'disconnected' | 'deleted' | 'enabled' | 'disabled';\n}\n\nexport interface AXEFergusConnectionLifecycleResponse {\n ok: true;\n}\n\n//#endregion\n","//#region ---- Fergus API / OAuth constants ----\n\n/** Public OAuth authorize endpoint (Cognito-hosted). */\nexport const AXE_FERGUS_OAUTH_AUTHORIZE_URL = 'https://auth.fergus.com/oauth2/authorize';\n\n/** Public OAuth token endpoint (authorization_code + refresh_token). */\nexport const AXE_FERGUS_OAUTH_TOKEN_URL = 'https://auth.fergus.com/oauth2/token';\n\n/** REST API base URL stored on connection `instanceUrl`. */\nexport const AXE_FERGUS_API_BASE_URL = 'https://api.fergus.com';\n\n/**\n * OAuth scopes for connect.\n * Fergus OpenAPI currently advertises an empty scope set; leave blank unless\n * the registered application requires explicit scopes.\n */\nexport const AXE_FERGUS_OAUTH_SCOPES = '';\n\n/** Default page size for Fergus `GET /jobs` (API max is 100). */\nexport const AXE_FERGUS_JOBS_PAGE_SIZE = 100;\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;AAEA,MAAM,MAAM,GAAG;AACb,IAAA,IAAI,EAAE,mBAAmB;CAC1B;AAED,MAAM,WAAW,GAAG,iBAAiB;AAE9B,MAAM,UAAU,GAAG;IACxB,MAAM;AACN,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,KAAK,EAAE,CAAA,CAAA,EAAI,MAAM,CAAC,IAAI,CAAA,yBAAA,CAA2B;AACjD,QAAA,IAAI,EAAE,uBAAuB;AAC9B,KAAA;;AAGH;;ACjBA;AAKO,MAAM,uBAAuB,GAAsB;AACxD,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK;AAC9B,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,IAAI,EAAE,aAAa;AACnB,IAAA,MAAM,EAAE,oBAAoB;AAC5B,IAAA,YAAY,EAAE,EAAE;;AAGlB;;AChBA;AAEO,MAAM,oBAAoB,GAAG;AAClC,IAAA,iBAAiB,EAAE,qCAAqC;AACxD,IAAA,uBAAuB,EAAE,2CAA2C;AACpE,IAAA,mBAAmB,EAAE,uCAAuC;AAC5D,IAAA,UAAU,EAAE,8BAA8B;AAC1C,IAAA,aAAa,EAAE,iCAAiC;AAChD,IAAA,aAAa,EAAE,iCAAiC;AAChD,IAAA,uBAAuB,EAAE,2CAA2C;AACpE,IAA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wB;AAClE,SAAA;AACD,QAAA,WAAW,EAAE;YACX,OAAO,EAAE,+BAA+B,CAAC,wBAAwB;AAClE,SAAA;AACF,KAAA;;AAGH;;AClDA;AAmCA;;ACnCA;AA8BA;;AC9BA;AA2KA;;AC3KA;AAEA;AACO,MAAM,8BAA8B,GAAG;AAE9C;AACO,MAAM,0BAA0B,GAAG;AAE1C;AACO,MAAM,uBAAuB,GAAG;AAEvC;;;;AAIG;AACI,MAAM,uBAAuB,GAAG;AAEvC;AACO,MAAM,yBAAyB,GAAG;AAEzC;;ACrBA;;AAEG;;"}
@@ -171,12 +171,13 @@
171
171
  "pull": {
172
172
  "progress": {
173
173
  "starting": "Starting Fergus Job Pull.",
174
- "fetching": "Fetching Jobs, Customers, and Sites.",
174
+ "fetching": "Fetching Jobs, Customers, Sites, and Employees.",
175
175
  "related-customers": "Loading Related Customers.",
176
176
  "related-sites": "Loading Related Sites.",
177
177
  "saving-jobs": "Saving Jobs.",
178
178
  "saving-customers": "Saving Customers.",
179
179
  "saving-sites": "Saving Sites.",
180
+ "saving-employees": "Saving Employees.",
180
181
  "finishing": "Finishing Sync.",
181
182
  "skipped": "No Modified Data Since Last Sync.",
182
183
  "complete-full": "Full Sync Finished.",
@@ -171,12 +171,13 @@
171
171
  "pull": {
172
172
  "progress": {
173
173
  "starting": "Starting Fergus job pull.",
174
- "fetching": "Fetching jobs, customers, and sites.",
174
+ "fetching": "Fetching jobs, customers, sites, and employees.",
175
175
  "related-customers": "Loading related customers.",
176
176
  "related-sites": "Loading related sites.",
177
177
  "saving-jobs": "Saving jobs.",
178
178
  "saving-customers": "Saving customers.",
179
179
  "saving-sites": "Saving sites.",
180
+ "saving-employees": "Saving employees.",
180
181
  "finishing": "Finishing sync.",
181
182
  "skipped": "No modified data since last sync.",
182
183
  "complete-full": "Full sync finished.",
@@ -171,12 +171,13 @@
171
171
  "pull": {
172
172
  "progress": {
173
173
  "starting": "در حال شروع دریافت کارها از Fergus.",
174
- "fetching": "در حال دریافت کارها، مشتری‌ها و سایت‌ها.",
174
+ "fetching": "در حال دریافت کارها، مشتری‌ها، سایت‌ها و کارکنان.",
175
175
  "related-customers": "در حال بارگذاری مشتری‌های مرتبط.",
176
176
  "related-sites": "در حال بارگذاری سایت‌های مرتبط.",
177
177
  "saving-jobs": "در حال ذخیره کارها.",
178
178
  "saving-customers": "در حال ذخیره مشتری‌ها.",
179
179
  "saving-sites": "در حال ذخیره سایت‌ها.",
180
+ "saving-employees": "در حال ذخیره کارکنان.",
180
181
  "finishing": "در حال نهایی‌سازی همگام‌سازی.",
181
182
  "skipped": "از همگام‌سازی قبلی تغییری نبود.",
182
183
  "complete-full": "همگام‌سازی کامل تمام شد.",
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@acorex-platform/extension-project-management-fergus-client",
3
- "version": "0.0.70",
3
+ "version": "2.0.0-next.0",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
- "@acorex-platform/extension-project-management-core-client": "0.0.70",
6
+ "@acorex-platform/extension-project-management-core-client": "2.0.0-next.0",
7
7
  "@angular/common": "^21.0.0 || ^22.0.0",
8
8
  "@angular/core": "^21.0.0 || ^22.0.0"
9
9
  },
@@ -220,6 +220,17 @@ interface AXEFergusRemoteSite {
220
220
  isArchived?: boolean | null;
221
221
  defaultContact?: AXEFergusRemoteContact | null;
222
222
  }
223
+ /** Fergus `/users` — cached as `resourceType=employee` (`status=active` only). */
224
+ interface AXEFergusRemoteEmployee {
225
+ id: number;
226
+ companyId?: number | null;
227
+ firstName?: string | null;
228
+ lastName?: string | null;
229
+ email?: string | null;
230
+ userType?: string | null;
231
+ address?: AXEFergusRemoteAddress | Record<string, unknown> | null;
232
+ status?: string | null;
233
+ }
223
234
  interface AXEFergusPullJobsRequest {
224
235
  /** When set, pulls for this Fergus connection (required for multi-connection schedules). */
225
236
  connectionId?: string;
@@ -238,7 +249,7 @@ interface AXEFergusPullJobsResponse {
238
249
  skipped?: boolean;
239
250
  /** Whether this run used incremental or full snapshot mode. */
240
251
  syncMode?: 'incremental' | 'full';
241
- /** Per data-type upsert counts (jobs / customers / sites). */
252
+ /** Per data-type upsert counts (jobs / customers / sites / employees). */
242
253
  byResourceType?: {
243
254
  job?: {
244
255
  upserted: number;
@@ -252,6 +263,10 @@ interface AXEFergusPullJobsResponse {
252
263
  upserted: number;
253
264
  deactivated: number;
254
265
  };
266
+ employee?: {
267
+ upserted: number;
268
+ deactivated: number;
269
+ };
255
270
  };
256
271
  }
257
272
  interface AXEFergusImportJobRequest {
@@ -297,4 +312,4 @@ declare const AXE_FERGUS_OAUTH_SCOPES = "";
297
312
  declare const AXE_FERGUS_JOBS_PAGE_SIZE = 100;
298
313
 
299
314
  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, FergusExtensionManifest, RootConfig };
300
- export type { AXEFergusConnectionConfig, AXEFergusConnectionLifecycleRequest, AXEFergusConnectionLifecycleResponse, AXEFergusImportCustomerRequest, AXEFergusImportCustomerResponse, AXEFergusImportJobRequest, AXEFergusImportJobResponse, AXEFergusJobsSyncState, AXEFergusOAuthCompleteRequest, AXEFergusOAuthCompleteResponse, AXEFergusOAuthStartRequest, AXEFergusOAuthStartResponse, AXEFergusOAuthValidateRequest, AXEFergusOAuthValidateResponse, AXEFergusPullJobsRequest, AXEFergusPullJobsResponse, AXEFergusRemoteAddress, AXEFergusRemoteContact, AXEFergusRemoteContactItem, AXEFergusRemoteCustomer, AXEFergusRemoteJob, AXEFergusRemoteSite, AXEFergusRemoteSitePrimaryContact, AXEFergusSyncPlatformProjectRequest };
315
+ export type { AXEFergusConnectionConfig, AXEFergusConnectionLifecycleRequest, AXEFergusConnectionLifecycleResponse, AXEFergusImportCustomerRequest, AXEFergusImportCustomerResponse, AXEFergusImportJobRequest, AXEFergusImportJobResponse, AXEFergusJobsSyncState, AXEFergusOAuthCompleteRequest, AXEFergusOAuthCompleteResponse, AXEFergusOAuthStartRequest, AXEFergusOAuthStartResponse, AXEFergusOAuthValidateRequest, AXEFergusOAuthValidateResponse, AXEFergusPullJobsRequest, AXEFergusPullJobsResponse, AXEFergusRemoteAddress, AXEFergusRemoteContact, AXEFergusRemoteContactItem, AXEFergusRemoteCustomer, AXEFergusRemoteEmployee, AXEFergusRemoteJob, AXEFergusRemoteSite, AXEFergusRemoteSitePrimaryContact, AXEFergusSyncPlatformProjectRequest };