@atlaskit/profilecard 26.19.8 → 26.20.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.
- package/CHANGELOG.md +72 -0
- package/build-agg-user-query/package.json +10 -0
- package/dist/cjs/client/AGGQuery.js +37 -0
- package/dist/cjs/client/AgentForbiddenError.js +28 -0
- package/dist/cjs/client/HeaderProcessor.js +1 -0
- package/dist/cjs/client/ProfileCardClient.js +11 -20
- package/dist/cjs/client/Query.js +1 -0
- package/dist/cjs/client/RovoAgentCardClient.js +38 -50
- package/dist/cjs/client/TeamCentralCardClient.js +5 -12
- package/dist/cjs/client/TeamProfileCardClient.js +2 -2
- package/dist/cjs/client/UserProfileCardClient.js +30 -54
- package/dist/cjs/client/addHeaders.js +16 -0
- package/dist/cjs/client/aggUserQuery.js +11 -0
- package/dist/cjs/client/aggUserQueryString.js +7 -0
- package/dist/cjs/client/ariPrefix.js +7 -0
- package/dist/cjs/client/buildAggUserQuery.js +18 -0
- package/dist/cjs/client/buildGatewayQuery.js +22 -0
- package/dist/cjs/client/buildHeaders.js +11 -0
- package/dist/cjs/client/buildReportingLinesQuery.js +14 -0
- package/dist/cjs/client/convertTeam.js +27 -0
- package/dist/cjs/client/defaultConfig.js +9 -0
- package/dist/cjs/client/directoryGraphqlQuery.js +37 -0
- package/dist/cjs/client/extractIdFromAri.js +14 -0
- package/dist/cjs/client/gatewayQueryV2.js +11 -0
- package/dist/cjs/client/{errorUtils.js → getErrorAttributes.js} +12 -15
- package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +3 -3
- package/dist/cjs/client/getTeamFromAGG.js +8 -64
- package/dist/cjs/client/graphQLQuery.js +66 -0
- package/dist/cjs/client/graphqlUtils.js +1 -125
- package/dist/cjs/client/handleAGGErrors.js +10 -0
- package/dist/cjs/client/handleDirectoryGraphQLErrors.js +10 -0
- package/dist/cjs/client/id.js +9 -0
- package/dist/cjs/client/idToAri.js +15 -0
- package/dist/cjs/client/idToAriSafe.js +14 -0
- package/dist/cjs/client/index.js +17 -4
- package/dist/cjs/client/maybeCreateTeamCentralClient.js +22 -0
- package/dist/cjs/client/modifyResponse.js +40 -0
- package/dist/cjs/components/Agent/AgentProfileCard.js +4 -4
- package/dist/cjs/components/Agent/AgentProfileCardResourced.js +2 -2
- package/dist/cjs/components/Agent/hooks/duplicateFetch.js +2 -169
- package/dist/cjs/components/Agent/hooks/fetchActivationId.js +57 -0
- package/dist/cjs/components/Agent/hooks/fetchDuplicateAgentMutation.js +74 -0
- package/dist/cjs/components/Agent/hooks/fetchHasVersionCapability.js +60 -0
- package/dist/cjs/components/Agent/hooks/firstCharUpper.js +9 -0
- package/dist/cjs/components/Agent/hooks/useAgentActions.js +2 -212
- package/dist/cjs/components/Agent/hooks/useAgentUrlActions.js +219 -0
- package/dist/cjs/components/Agent/utils/getAtlassianStudioAgentDuplicateUrl.js +10 -0
- package/dist/cjs/components/Agent/utils/getAtlassianStudioAgentEditUrl.js +10 -0
- package/dist/cjs/components/Agent/utils/getStudioHost.js +14 -0
- package/dist/cjs/components/Agent/utils/getStudioPath.js +19 -0
- package/dist/cjs/components/Agent/utils/index.js +3 -28
- package/dist/cjs/components/Team/TeamProfileCard.js +2 -2
- package/dist/cjs/components/Team/index.js +5 -0
- package/dist/cjs/components/User/LoadingView.js +31 -0
- package/dist/cjs/components/User/ProfileCard.js +21 -242
- package/dist/cjs/components/User/ProfileCardDetails.js +6 -6
- package/dist/cjs/components/User/ProfileCardResourced.js +2 -2
- package/dist/cjs/components/User/ProfilecardInternal.js +234 -0
- package/dist/cjs/components/User/index.js +7 -0
- package/dist/cjs/components/common/LoadingState.js +2 -1
- package/dist/cjs/components/common/ProfileCardTrigger.js +2 -1
- package/dist/cjs/components/team-profile-card/main.js +9 -3
- package/dist/cjs/components/team-profile-card/team-actions/index.js +2 -2
- package/dist/cjs/index.js +5 -6
- package/dist/cjs/internal/isValidDate.js +12 -0
- package/dist/cjs/internal/relative-date.js +2 -7
- package/dist/cjs/mocks/get-time-string.js +16 -0
- package/dist/cjs/mocks/get-weekday.js +15 -0
- package/dist/cjs/mocks/mock-profile-client.js +7 -5
- package/dist/cjs/mocks/mock-team-client.js +2 -2
- package/dist/cjs/mocks/profile-data.js +32 -31
- package/dist/cjs/mocks/random.js +9 -0
- package/dist/cjs/mocks/simple-mock-clients.js +4 -3
- package/dist/cjs/mocks/static-team-data.js +33 -0
- package/dist/cjs/mocks/team-data.js +8 -33
- package/dist/cjs/styled/Card.js +1 -0
- package/dist/cjs/styled/Error.js +1 -0
- package/dist/cjs/styled/ReportingLines.js +1 -0
- package/dist/cjs/styled/TeamCard.js +1 -0
- package/dist/cjs/styled/TeamTrigger.js +1 -0
- package/dist/cjs/styled/UserTrigger.js +1 -0
- package/dist/cjs/util/AGGError.js +37 -0
- package/dist/cjs/util/AGGErrors.js +34 -0
- package/dist/cjs/util/AnalyticsEventPayload.js +1 -0
- package/dist/cjs/util/DirectoryGraphQLError.js +36 -0
- package/dist/cjs/util/DirectoryGraphQLErrors.js +34 -0
- package/dist/cjs/util/GenericAttributes.js +1 -0
- package/dist/cjs/util/HttpError.js +27 -0
- package/dist/cjs/util/actionClicked.js +15 -0
- package/dist/cjs/util/agentRequestAnalytics.js +15 -0
- package/dist/cjs/util/analytics.js +5 -134
- package/dist/cjs/util/cardTriggered.js +23 -0
- package/dist/cjs/util/createEvent.js +30 -0
- package/dist/cjs/util/errorRetryClicked.js +15 -0
- package/dist/cjs/util/getActionSubject.js +19 -0
- package/dist/cjs/util/moreActionsClicked.js +15 -0
- package/dist/cjs/util/moreMembersClicked.js +15 -0
- package/dist/cjs/util/profileCardRendered.js +15 -0
- package/dist/cjs/util/reportingLinesClicked.js +15 -0
- package/dist/cjs/util/teamAvatarClicked.js +15 -0
- package/dist/cjs/util/teamRequestAnalytics.js +15 -0
- package/dist/cjs/util/userRequestAnalytics.js +15 -0
- package/dist/es2019/client/AGGQuery.js +12 -0
- package/dist/es2019/client/AgentForbiddenError.js +8 -0
- package/dist/es2019/client/HeaderProcessor.js +0 -0
- package/dist/es2019/client/ProfileCardClient.js +10 -19
- package/dist/es2019/client/Query.js +0 -0
- package/dist/es2019/client/RovoAgentCardClient.js +3 -10
- package/dist/es2019/client/TeamCentralCardClient.js +2 -31
- package/dist/es2019/client/TeamProfileCardClient.js +1 -1
- package/dist/es2019/client/UserProfileCardClient.js +15 -102
- package/dist/es2019/client/addHeaders.js +10 -0
- package/dist/es2019/client/aggUserQuery.js +31 -0
- package/dist/es2019/client/aggUserQueryString.js +28 -0
- package/dist/es2019/client/ariPrefix.js +1 -0
- package/dist/es2019/client/buildAggUserQuery.js +10 -0
- package/dist/es2019/client/buildGatewayQuery.js +15 -0
- package/dist/es2019/client/buildHeaders.js +5 -0
- package/dist/es2019/client/buildReportingLinesQuery.js +30 -0
- package/dist/es2019/client/convertTeam.js +21 -0
- package/dist/es2019/client/defaultConfig.js +3 -0
- package/dist/es2019/client/directoryGraphqlQuery.js +12 -0
- package/dist/es2019/client/extractIdFromAri.js +8 -0
- package/dist/es2019/client/gatewayQueryV2.js +30 -0
- package/dist/es2019/client/{errorUtils.js → getErrorAttributes.js} +4 -7
- package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +2 -2
- package/dist/es2019/client/getTeamFromAGG.js +4 -80
- package/dist/es2019/client/graphQLQuery.js +24 -0
- package/dist/es2019/client/graphqlUtils.js +0 -47
- package/dist/es2019/client/handleAGGErrors.js +4 -0
- package/dist/es2019/client/handleDirectoryGraphQLErrors.js +4 -0
- package/dist/es2019/client/id.js +1 -0
- package/dist/es2019/client/idToAri.js +9 -0
- package/dist/es2019/client/idToAriSafe.js +6 -0
- package/dist/es2019/client/index.js +22 -2
- package/dist/es2019/client/maybeCreateTeamCentralClient.js +14 -0
- package/dist/es2019/client/modifyResponse.js +32 -0
- package/dist/es2019/components/Agent/AgentProfileCard.js +2 -2
- package/dist/es2019/components/Agent/AgentProfileCardResourced.js +1 -1
- package/dist/es2019/components/Agent/hooks/duplicateFetch.js +1 -121
- package/dist/es2019/components/Agent/hooks/fetchActivationId.js +35 -0
- package/dist/es2019/components/Agent/hooks/fetchDuplicateAgentMutation.js +49 -0
- package/dist/es2019/components/Agent/hooks/fetchHasVersionCapability.js +39 -0
- package/dist/es2019/components/Agent/hooks/firstCharUpper.js +1 -0
- package/dist/es2019/components/Agent/hooks/useAgentActions.js +1 -182
- package/dist/es2019/components/Agent/hooks/useAgentUrlActions.js +186 -0
- package/dist/es2019/components/Agent/utils/getAtlassianStudioAgentDuplicateUrl.js +2 -0
- package/dist/es2019/components/Agent/utils/getAtlassianStudioAgentEditUrl.js +2 -0
- package/dist/es2019/components/Agent/utils/getStudioHost.js +8 -0
- package/dist/es2019/components/Agent/utils/getStudioPath.js +13 -0
- package/dist/es2019/components/Agent/utils/index.js +2 -23
- package/dist/es2019/components/Team/TeamProfileCard.js +1 -1
- package/dist/es2019/components/Team/index.js +6 -0
- package/dist/es2019/components/User/LoadingView.js +19 -0
- package/dist/es2019/components/User/ProfileCard.js +12 -221
- package/dist/es2019/components/User/ProfileCardDetails.js +1 -1
- package/dist/es2019/components/User/ProfileCardResourced.js +1 -1
- package/dist/es2019/components/User/ProfilecardInternal.js +207 -0
- package/dist/es2019/components/User/index.js +8 -0
- package/dist/es2019/components/common/LoadingState.js +2 -1
- package/dist/es2019/components/common/ProfileCardTrigger.js +2 -1
- package/dist/es2019/components/team-profile-card/main.js +8 -1
- package/dist/es2019/components/team-profile-card/team-actions/index.js +1 -1
- package/dist/es2019/i18n/index.js +91 -0
- package/dist/es2019/index.js +4 -2
- package/dist/es2019/internal/isValidDate.js +4 -0
- package/dist/es2019/internal/relative-date.js +1 -4
- package/dist/es2019/mocks/{util.js → get-time-string.js} +1 -9
- package/dist/es2019/mocks/get-weekday.js +9 -0
- package/dist/es2019/mocks/index.js +13 -0
- package/dist/es2019/mocks/mock-profile-client.js +4 -2
- package/dist/es2019/mocks/mock-team-client.js +1 -1
- package/dist/es2019/mocks/profile-data.js +2 -1
- package/dist/es2019/mocks/random.js +1 -0
- package/dist/es2019/mocks/simple-mock-clients.js +3 -2
- package/dist/es2019/mocks/static-team-data.js +21 -0
- package/dist/es2019/mocks/team-data.js +6 -26
- package/dist/es2019/styled/Card.js +1 -0
- package/dist/es2019/styled/Error.js +1 -0
- package/dist/es2019/styled/ReportingLines.js +1 -0
- package/dist/es2019/styled/TeamCard.js +1 -0
- package/dist/es2019/styled/TeamTrigger.js +1 -0
- package/dist/es2019/styled/UserTrigger.js +1 -0
- package/dist/es2019/util/AGGError.js +16 -0
- package/dist/es2019/util/AGGErrors.js +12 -0
- package/dist/es2019/util/AnalyticsEventPayload.js +0 -0
- package/dist/es2019/util/DirectoryGraphQLError.js +14 -0
- package/dist/es2019/util/DirectoryGraphQLErrors.js +12 -0
- package/dist/es2019/util/GenericAttributes.js +0 -0
- package/dist/es2019/util/HttpError.js +7 -0
- package/dist/es2019/util/actionClicked.js +8 -0
- package/dist/es2019/util/agentRequestAnalytics.js +7 -0
- package/dist/es2019/util/analytics.js +4 -107
- package/dist/es2019/util/cardTriggered.js +15 -0
- package/dist/es2019/util/createEvent.js +18 -0
- package/dist/es2019/util/errorRetryClicked.js +8 -0
- package/dist/es2019/util/getActionSubject.js +13 -0
- package/dist/es2019/util/moreActionsClicked.js +8 -0
- package/dist/es2019/util/moreMembersClicked.js +8 -0
- package/dist/es2019/util/profileCardRendered.js +8 -0
- package/dist/es2019/util/reportingLinesClicked.js +8 -0
- package/dist/es2019/util/teamAvatarClicked.js +8 -0
- package/dist/es2019/util/teamRequestAnalytics.js +7 -0
- package/dist/es2019/util/userRequestAnalytics.js +7 -0
- package/dist/esm/client/AGGQuery.js +31 -0
- package/dist/esm/client/AgentForbiddenError.js +21 -0
- package/dist/esm/client/HeaderProcessor.js +0 -0
- package/dist/esm/client/ProfileCardClient.js +10 -17
- package/dist/esm/client/Query.js +0 -0
- package/dist/esm/client/RovoAgentCardClient.js +27 -39
- package/dist/esm/client/TeamCentralCardClient.js +2 -9
- package/dist/esm/client/TeamProfileCardClient.js +1 -1
- package/dist/esm/client/UserProfileCardClient.js +17 -51
- package/dist/esm/client/addHeaders.js +10 -0
- package/dist/esm/client/aggUserQuery.js +4 -0
- package/dist/esm/client/aggUserQueryString.js +1 -0
- package/dist/esm/client/ariPrefix.js +1 -0
- package/dist/esm/client/buildAggUserQuery.js +12 -0
- package/dist/esm/client/buildGatewayQuery.js +16 -0
- package/dist/esm/client/buildHeaders.js +5 -0
- package/dist/esm/client/buildReportingLinesQuery.js +8 -0
- package/dist/esm/client/convertTeam.js +22 -0
- package/dist/esm/client/defaultConfig.js +3 -0
- package/dist/esm/client/directoryGraphqlQuery.js +31 -0
- package/dist/esm/client/extractIdFromAri.js +8 -0
- package/dist/esm/client/gatewayQueryV2.js +5 -0
- package/dist/esm/client/{errorUtils.js → getErrorAttributes.js} +5 -8
- package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +2 -2
- package/dist/esm/client/getTeamFromAGG.js +4 -59
- package/dist/esm/client/graphQLQuery.js +59 -0
- package/dist/esm/client/graphqlUtils.js +0 -118
- package/dist/esm/client/handleAGGErrors.js +4 -0
- package/dist/esm/client/handleDirectoryGraphQLErrors.js +4 -0
- package/dist/esm/client/id.js +3 -0
- package/dist/esm/client/idToAri.js +9 -0
- package/dist/esm/client/idToAriSafe.js +8 -0
- package/dist/esm/client/index.js +22 -2
- package/dist/esm/client/maybeCreateTeamCentralClient.js +15 -0
- package/dist/esm/client/modifyResponse.js +33 -0
- package/dist/esm/components/Agent/AgentProfileCard.js +2 -2
- package/dist/esm/components/Agent/AgentProfileCardResourced.js +1 -1
- package/dist/esm/components/Agent/hooks/duplicateFetch.js +1 -167
- package/dist/esm/components/Agent/hooks/fetchActivationId.js +51 -0
- package/dist/esm/components/Agent/hooks/fetchDuplicateAgentMutation.js +68 -0
- package/dist/esm/components/Agent/hooks/fetchHasVersionCapability.js +54 -0
- package/dist/esm/components/Agent/hooks/firstCharUpper.js +3 -0
- package/dist/esm/components/Agent/hooks/useAgentActions.js +1 -210
- package/dist/esm/components/Agent/hooks/useAgentUrlActions.js +212 -0
- package/dist/esm/components/Agent/utils/getAtlassianStudioAgentDuplicateUrl.js +4 -0
- package/dist/esm/components/Agent/utils/getAtlassianStudioAgentEditUrl.js +4 -0
- package/dist/esm/components/Agent/utils/getStudioHost.js +8 -0
- package/dist/esm/components/Agent/utils/getStudioPath.js +13 -0
- package/dist/esm/components/Agent/utils/index.js +2 -27
- package/dist/esm/components/Team/TeamProfileCard.js +1 -1
- package/dist/esm/components/Team/index.js +6 -0
- package/dist/esm/components/User/LoadingView.js +22 -0
- package/dist/esm/components/User/ProfileCard.js +12 -239
- package/dist/esm/components/User/ProfileCardDetails.js +1 -1
- package/dist/esm/components/User/ProfileCardResourced.js +1 -1
- package/dist/esm/components/User/ProfilecardInternal.js +225 -0
- package/dist/esm/components/User/index.js +8 -0
- package/dist/esm/components/common/LoadingState.js +2 -1
- package/dist/esm/components/common/ProfileCardTrigger.js +2 -1
- package/dist/esm/components/team-profile-card/main.js +8 -1
- package/dist/esm/components/team-profile-card/team-actions/index.js +1 -1
- package/dist/esm/i18n/index.js +91 -0
- package/dist/esm/index.js +4 -2
- package/dist/esm/internal/isValidDate.js +5 -0
- package/dist/esm/internal/relative-date.js +1 -5
- package/dist/esm/mocks/{util.js → get-time-string.js} +1 -11
- package/dist/esm/mocks/get-weekday.js +9 -0
- package/dist/esm/mocks/index.js +13 -0
- package/dist/esm/mocks/mock-profile-client.js +4 -2
- package/dist/esm/mocks/mock-team-client.js +1 -1
- package/dist/esm/mocks/profile-data.js +2 -1
- package/dist/esm/mocks/random.js +3 -0
- package/dist/esm/mocks/simple-mock-clients.js +3 -2
- package/dist/esm/mocks/static-team-data.js +27 -0
- package/dist/esm/mocks/team-data.js +6 -32
- package/dist/esm/styled/Card.js +1 -0
- package/dist/esm/styled/Error.js +1 -0
- package/dist/esm/styled/ReportingLines.js +1 -0
- package/dist/esm/styled/TeamCard.js +1 -0
- package/dist/esm/styled/TeamTrigger.js +1 -0
- package/dist/esm/styled/UserTrigger.js +1 -0
- package/dist/esm/util/AGGError.js +30 -0
- package/dist/esm/util/AGGErrors.js +27 -0
- package/dist/esm/util/AnalyticsEventPayload.js +0 -0
- package/dist/esm/util/DirectoryGraphQLError.js +29 -0
- package/dist/esm/util/DirectoryGraphQLErrors.js +27 -0
- package/dist/esm/util/GenericAttributes.js +0 -0
- package/dist/esm/util/HttpError.js +20 -0
- package/dist/esm/util/actionClicked.js +10 -0
- package/dist/esm/util/agentRequestAnalytics.js +9 -0
- package/dist/esm/util/analytics.js +4 -132
- package/dist/esm/util/cardTriggered.js +17 -0
- package/dist/esm/util/createEvent.js +24 -0
- package/dist/esm/util/errorRetryClicked.js +10 -0
- package/dist/esm/util/getActionSubject.js +13 -0
- package/dist/esm/util/moreActionsClicked.js +10 -0
- package/dist/esm/util/moreMembersClicked.js +10 -0
- package/dist/esm/util/profileCardRendered.js +10 -0
- package/dist/esm/util/reportingLinesClicked.js +10 -0
- package/dist/esm/util/teamAvatarClicked.js +10 -0
- package/dist/esm/util/teamRequestAnalytics.js +9 -0
- package/dist/esm/util/userRequestAnalytics.js +9 -0
- package/dist/types/client/AGGQuery.d.ts +8 -0
- package/dist/types/client/AgentForbiddenError.d.ts +4 -0
- package/dist/types/client/HeaderProcessor.d.ts +1 -0
- package/dist/types/client/ProfileCardClient.d.ts +8 -3
- package/dist/types/client/Query.d.ts +4 -0
- package/dist/types/client/RovoAgentCardClient.d.ts +0 -4
- package/dist/types/client/TeamCentralCardClient.d.ts +0 -6
- package/dist/types/client/UserProfileCardClient.d.ts +9 -16
- package/dist/types/client/addHeaders.d.ts +1 -0
- package/dist/types/client/aggUserQuery.d.ts +2 -0
- package/dist/types/client/aggUserQueryString.d.ts +1 -0
- package/dist/types/client/ariPrefix.d.ts +1 -0
- package/dist/types/client/buildAggUserQuery.d.ts +6 -0
- package/dist/types/client/buildGatewayQuery.d.ts +12 -0
- package/dist/types/client/buildHeaders.d.ts +1 -0
- package/dist/types/client/buildReportingLinesQuery.d.ts +6 -0
- package/dist/types/client/convertTeam.d.ts +3 -0
- package/dist/types/client/defaultConfig.d.ts +3 -0
- package/dist/types/client/directoryGraphqlQuery.d.ts +8 -0
- package/dist/types/client/extractIdFromAri.d.ts +1 -0
- package/dist/types/client/gatewayQueryV2.d.ts +1 -0
- package/dist/types/client/getErrorAttributes.d.ts +6 -0
- package/dist/types/client/getTeamFromAGG.d.ts +1 -21
- package/dist/types/client/graphQLQuery.d.ts +3 -0
- package/dist/types/client/graphqlUtils.d.ts +0 -18
- package/dist/types/client/handleAGGErrors.d.ts +1 -0
- package/dist/types/client/handleDirectoryGraphQLErrors.d.ts +1 -0
- package/dist/types/client/id.d.ts +2 -0
- package/dist/types/client/idToAri.d.ts +4 -0
- package/dist/types/client/idToAriSafe.d.ts +1 -0
- package/dist/types/client/index.d.ts +18 -2
- package/dist/types/client/maybeCreateTeamCentralClient.d.ts +3 -0
- package/dist/types/client/modifyResponse.d.ts +10 -0
- package/dist/types/components/Agent/hooks/duplicateFetch.d.ts +1 -24
- package/dist/types/components/Agent/hooks/fetchActivationId.d.ts +5 -0
- package/dist/types/components/Agent/hooks/fetchDuplicateAgentMutation.d.ts +11 -0
- package/dist/types/components/Agent/hooks/fetchHasVersionCapability.d.ts +8 -0
- package/dist/types/components/Agent/hooks/firstCharUpper.d.ts +1 -0
- package/dist/types/components/Agent/hooks/useAgentActions.d.ts +1 -16
- package/dist/types/components/Agent/hooks/useAgentUrlActions.d.ts +15 -0
- package/dist/types/components/Agent/utils/getAtlassianStudioAgentDuplicateUrl.d.ts +1 -0
- package/dist/types/components/Agent/utils/getAtlassianStudioAgentEditUrl.d.ts +1 -0
- package/dist/types/components/Agent/utils/getStudioHost.d.ts +1 -0
- package/dist/types/components/Agent/utils/getStudioPath.d.ts +1 -0
- package/dist/types/components/Agent/utils/index.d.ts +2 -4
- package/dist/types/components/Team/index.d.ts +3 -0
- package/dist/types/components/User/LoadingView.d.ts +3 -0
- package/dist/types/components/User/ProfileCard.d.ts +9 -4
- package/dist/types/components/User/ProfilecardInternal.d.ts +3 -0
- package/dist/types/components/User/index.d.ts +6 -0
- package/dist/types/components/team-profile-card/main.d.ts +5 -0
- package/dist/types/i18n/index.d.ts +90 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/internal/isValidDate.d.ts +1 -0
- package/dist/types/internal/relative-date.d.ts +0 -1
- package/dist/types/mocks/get-time-string.d.ts +1 -0
- package/dist/types/mocks/get-weekday.d.ts +4 -0
- package/dist/types/mocks/index.d.ts +12 -0
- package/dist/types/mocks/random.d.ts +1 -0
- package/dist/types/mocks/simple-mock-clients.d.ts +1 -1
- package/dist/types/mocks/static-team-data.d.ts +8 -0
- package/dist/types/mocks/team-data.d.ts +10 -7
- package/dist/types/types.d.ts +1 -1
- package/dist/types/util/AGGError.d.ts +15 -0
- package/dist/types/util/AGGErrors.d.ts +6 -0
- package/dist/types/util/AnalyticsEventPayload.d.ts +1 -0
- package/dist/types/util/DirectoryGraphQLError.d.ts +14 -0
- package/dist/types/util/DirectoryGraphQLErrors.d.ts +6 -0
- package/dist/types/util/GenericAttributes.d.ts +1 -0
- package/dist/types/util/HttpError.d.ts +5 -0
- package/dist/types/util/actionClicked.d.ts +13 -0
- package/dist/types/util/agentRequestAnalytics.d.ts +9 -0
- package/dist/types/util/analytics.d.ts +3 -97
- package/dist/types/util/cardTriggered.d.ts +7 -0
- package/dist/types/util/createEvent.d.ts +7 -0
- package/dist/types/util/errorRetryClicked.d.ts +8 -0
- package/dist/types/util/getActionSubject.d.ts +1 -0
- package/dist/types/util/moreActionsClicked.d.ts +10 -0
- package/dist/types/util/moreMembersClicked.d.ts +9 -0
- package/dist/types/util/profileCardRendered.d.ts +16 -0
- package/dist/types/util/reportingLinesClicked.d.ts +9 -0
- package/dist/types/util/teamAvatarClicked.d.ts +11 -0
- package/dist/types/util/teamRequestAnalytics.d.ts +9 -0
- package/dist/types/util/userRequestAnalytics.d.ts +9 -0
- package/loading-view/package.json +10 -0
- package/main/package.json +4 -4
- package/modify-response/package.json +10 -0
- package/package.json +2 -2
- package/profile-card-client/package.json +4 -4
- package/profile-card-resourced/package.json +10 -0
- package/profilecard-internal/package.json +10 -0
- package/dist/cjs/components/Error/index.js +0 -27
- package/dist/cjs/components/Icon/index.js +0 -13
- package/dist/cjs/components/team-profile-card/index.js +0 -12
- package/dist/cjs/entry-points/ProfileCardClient.js +0 -13
- package/dist/cjs/entry-points/main.js +0 -12
- package/dist/cjs/mocks/util.js +0 -26
- package/dist/cjs/util/errors.js +0 -105
- package/dist/es2019/components/Error/index.js +0 -3
- package/dist/es2019/components/Icon/index.js +0 -1
- package/dist/es2019/components/team-profile-card/index.js +0 -1
- package/dist/es2019/entry-points/ProfileCardClient.js +0 -1
- package/dist/es2019/entry-points/main.js +0 -1
- package/dist/es2019/util/errors.js +0 -59
- package/dist/esm/components/Error/index.js +0 -3
- package/dist/esm/components/Icon/index.js +0 -1
- package/dist/esm/components/team-profile-card/index.js +0 -1
- package/dist/esm/entry-points/ProfileCardClient.js +0 -1
- package/dist/esm/entry-points/main.js +0 -1
- package/dist/esm/util/errors.js +0 -98
- package/dist/types/client/errorUtils.d.ts +0 -5
- package/dist/types/components/Error/index.d.ts +0 -3
- package/dist/types/components/Icon/index.d.ts +0 -1
- package/dist/types/components/team-profile-card/index.d.ts +0 -1
- package/dist/types/entry-points/ProfileCardClient.d.ts +0 -1
- package/dist/types/entry-points/main.d.ts +0 -1
- package/dist/types/mocks/util.d.ts +0 -6
- package/dist/types/util/errors.d.ts +0 -43
|
@@ -1,136 +1,8 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
1
|
var _process$env$_PACKAGE, _process$env$_PACKAGE2;
|
|
3
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
-
import { getPageTime } from './performance';
|
|
6
2
|
export var PACKAGE_META_DATA = {
|
|
7
3
|
packageName: (_process$env$_PACKAGE = "@atlaskit/profilecard") !== null && _process$env$_PACKAGE !== void 0 ? _process$env$_PACKAGE : '',
|
|
8
|
-
packageVersion: (_process$env$_PACKAGE2 = "26.19.
|
|
4
|
+
packageVersion: (_process$env$_PACKAGE2 = "26.19.9") !== null && _process$env$_PACKAGE2 !== void 0 ? _process$env$_PACKAGE2 : ''
|
|
9
5
|
};
|
|
10
|
-
var TEAM_SUBJECT = 'teamProfileCard';
|
|
11
|
-
var USER_SUBJECT = 'profilecard';
|
|
12
|
-
var AGENT_SUBJECT = 'rovoAgentProfilecard';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @private
|
|
16
|
-
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
17
|
-
*/
|
|
18
|
-
var createEvent = function createEvent(eventType, action, actionSubject, actionSubjectId) {
|
|
19
|
-
var attributes = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
20
|
-
return {
|
|
21
|
-
eventType: eventType,
|
|
22
|
-
action: action,
|
|
23
|
-
actionSubject: actionSubject,
|
|
24
|
-
actionSubjectId: actionSubjectId,
|
|
25
|
-
attributes: _objectSpread(_objectSpread({
|
|
26
|
-
packageName: "@atlaskit/profilecard",
|
|
27
|
-
packageVersion: "26.19.7"
|
|
28
|
-
}, attributes), {}, {
|
|
29
|
-
firedAt: Math.round(getPageTime())
|
|
30
|
-
})
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
export var getActionSubject = function getActionSubject(type) {
|
|
34
|
-
switch (type) {
|
|
35
|
-
case 'user':
|
|
36
|
-
return USER_SUBJECT;
|
|
37
|
-
case 'team':
|
|
38
|
-
return TEAM_SUBJECT;
|
|
39
|
-
case 'agent':
|
|
40
|
-
return AGENT_SUBJECT;
|
|
41
|
-
default:
|
|
42
|
-
return 'user';
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* @private
|
|
48
|
-
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
49
|
-
*/
|
|
50
|
-
export var cardTriggered = function cardTriggered(type, method, teamId) {
|
|
51
|
-
return createEvent('ui', 'triggered', getActionSubject(type), undefined, _objectSpread({
|
|
52
|
-
method: method
|
|
53
|
-
}, type === 'team' && teamId ? {
|
|
54
|
-
teamId: teamId
|
|
55
|
-
} : {}));
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* @private
|
|
60
|
-
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
61
|
-
*/
|
|
62
|
-
export var teamRequestAnalytics = function teamRequestAnalytics(action, attributes) {
|
|
63
|
-
return createEvent('operational', action, TEAM_SUBJECT, 'request', attributes);
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @private
|
|
68
|
-
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
69
|
-
*/
|
|
70
|
-
export var userRequestAnalytics = function userRequestAnalytics(action, attributes) {
|
|
71
|
-
return createEvent('operational', action, USER_SUBJECT, 'request', attributes);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* @private
|
|
76
|
-
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
77
|
-
*/
|
|
78
|
-
export var profileCardRendered = function profileCardRendered(type, actionSubjectId, attributes) {
|
|
79
|
-
return createEvent('ui', 'rendered', getActionSubject(type), actionSubjectId, attributes);
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @private
|
|
84
|
-
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
85
|
-
*/
|
|
86
|
-
export var actionClicked = function actionClicked(type, attributes) {
|
|
87
|
-
return createEvent('ui', 'clicked', getActionSubject(type), 'action', attributes);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* @private
|
|
92
|
-
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
93
|
-
*/
|
|
94
|
-
export var reportingLinesClicked = function reportingLinesClicked(attributes) {
|
|
95
|
-
return createEvent('ui', 'clicked', USER_SUBJECT, 'reportingLines', attributes);
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* @private
|
|
100
|
-
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
101
|
-
*/
|
|
102
|
-
export var moreActionsClicked = function moreActionsClicked(type, attributes) {
|
|
103
|
-
return createEvent('ui', 'clicked', getActionSubject(type), 'moreActions', attributes);
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* @private
|
|
108
|
-
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
109
|
-
*/
|
|
110
|
-
export var teamAvatarClicked = function teamAvatarClicked(attributes) {
|
|
111
|
-
return createEvent('ui', 'clicked', TEAM_SUBJECT, 'avatar', attributes);
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* @private
|
|
116
|
-
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
117
|
-
*/
|
|
118
|
-
export var moreMembersClicked = function moreMembersClicked(attributes) {
|
|
119
|
-
return createEvent('ui', 'clicked', TEAM_SUBJECT, 'moreMembers', attributes);
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* @private
|
|
124
|
-
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
125
|
-
*/
|
|
126
|
-
export var errorRetryClicked = function errorRetryClicked(attributes) {
|
|
127
|
-
return createEvent('ui', 'clicked', TEAM_SUBJECT, 'errorRetry', attributes);
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* @private
|
|
132
|
-
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
133
|
-
*/
|
|
134
|
-
export var agentRequestAnalytics = function agentRequestAnalytics(action, actionSubjectId, attributes) {
|
|
135
|
-
return createEvent('operational', action, AGENT_SUBJECT, actionSubjectId || 'request', attributes);
|
|
136
|
-
};
|
|
6
|
+
export var TEAM_SUBJECT = 'teamProfileCard';
|
|
7
|
+
export var USER_SUBJECT = 'profilecard';
|
|
8
|
+
export var AGENT_SUBJECT = 'rovoAgentProfilecard';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
import { createEvent } from './createEvent';
|
|
5
|
+
import { getActionSubject } from './getActionSubject';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @private
|
|
9
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
10
|
+
*/
|
|
11
|
+
export var cardTriggered = function cardTriggered(type, method, teamId) {
|
|
12
|
+
return createEvent('ui', 'triggered', getActionSubject(type), undefined, _objectSpread({
|
|
13
|
+
method: method
|
|
14
|
+
}, type === 'team' && teamId ? {
|
|
15
|
+
teamId: teamId
|
|
16
|
+
} : {}));
|
|
17
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
import { getPageTime } from './performance';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @private
|
|
8
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
9
|
+
*/
|
|
10
|
+
export var createEvent = function createEvent(eventType, action, actionSubject, actionSubjectId) {
|
|
11
|
+
var attributes = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
12
|
+
return {
|
|
13
|
+
eventType: eventType,
|
|
14
|
+
action: action,
|
|
15
|
+
actionSubject: actionSubject,
|
|
16
|
+
actionSubjectId: actionSubjectId,
|
|
17
|
+
attributes: _objectSpread(_objectSpread({
|
|
18
|
+
packageName: "@atlaskit/profilecard",
|
|
19
|
+
packageVersion: "26.19.9"
|
|
20
|
+
}, attributes), {}, {
|
|
21
|
+
firedAt: Math.round(getPageTime())
|
|
22
|
+
})
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TEAM_SUBJECT } from './analytics';
|
|
2
|
+
import { createEvent } from './createEvent';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
7
|
+
*/
|
|
8
|
+
export var errorRetryClicked = function errorRetryClicked(attributes) {
|
|
9
|
+
return createEvent('ui', 'clicked', TEAM_SUBJECT, 'errorRetry', attributes);
|
|
10
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AGENT_SUBJECT, TEAM_SUBJECT, USER_SUBJECT } from './analytics';
|
|
2
|
+
export var getActionSubject = function getActionSubject(type) {
|
|
3
|
+
switch (type) {
|
|
4
|
+
case 'user':
|
|
5
|
+
return USER_SUBJECT;
|
|
6
|
+
case 'team':
|
|
7
|
+
return TEAM_SUBJECT;
|
|
8
|
+
case 'agent':
|
|
9
|
+
return AGENT_SUBJECT;
|
|
10
|
+
default:
|
|
11
|
+
return 'user';
|
|
12
|
+
}
|
|
13
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createEvent } from './createEvent';
|
|
2
|
+
import { getActionSubject } from './getActionSubject';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
7
|
+
*/
|
|
8
|
+
export var moreActionsClicked = function moreActionsClicked(type, attributes) {
|
|
9
|
+
return createEvent('ui', 'clicked', getActionSubject(type), 'moreActions', attributes);
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TEAM_SUBJECT } from './analytics';
|
|
2
|
+
import { createEvent } from './createEvent';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
7
|
+
*/
|
|
8
|
+
export var moreMembersClicked = function moreMembersClicked(attributes) {
|
|
9
|
+
return createEvent('ui', 'clicked', TEAM_SUBJECT, 'moreMembers', attributes);
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createEvent } from './createEvent';
|
|
2
|
+
import { getActionSubject } from './getActionSubject';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
7
|
+
*/
|
|
8
|
+
export var profileCardRendered = function profileCardRendered(type, actionSubjectId, attributes) {
|
|
9
|
+
return createEvent('ui', 'rendered', getActionSubject(type), actionSubjectId, attributes);
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { USER_SUBJECT } from './analytics';
|
|
2
|
+
import { createEvent } from './createEvent';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
7
|
+
*/
|
|
8
|
+
export var reportingLinesClicked = function reportingLinesClicked(attributes) {
|
|
9
|
+
return createEvent('ui', 'clicked', USER_SUBJECT, 'reportingLines', attributes);
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TEAM_SUBJECT } from './analytics';
|
|
2
|
+
import { createEvent } from './createEvent';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
7
|
+
*/
|
|
8
|
+
export var teamAvatarClicked = function teamAvatarClicked(attributes) {
|
|
9
|
+
return createEvent('ui', 'clicked', TEAM_SUBJECT, 'avatar', attributes);
|
|
10
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TEAM_SUBJECT } from './analytics';
|
|
2
|
+
import { createEvent } from './createEvent';
|
|
3
|
+
/**
|
|
4
|
+
* @private
|
|
5
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
6
|
+
*/
|
|
7
|
+
export var teamRequestAnalytics = function teamRequestAnalytics(action, attributes) {
|
|
8
|
+
return createEvent('operational', action, TEAM_SUBJECT, 'request', attributes);
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { USER_SUBJECT } from './analytics';
|
|
2
|
+
import { createEvent } from './createEvent';
|
|
3
|
+
/**
|
|
4
|
+
* @private
|
|
5
|
+
* @deprecated Analytics events should be fired using the `@atlaskit/teams-app-internal-analytics` package.
|
|
6
|
+
*/
|
|
7
|
+
export var userRequestAnalytics = function userRequestAnalytics(action, attributes) {
|
|
8
|
+
return createEvent('operational', action, USER_SUBJECT, 'request', attributes);
|
|
9
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HeaderProcessor } from './HeaderProcessor';
|
|
2
|
+
import type { Query } from './Query';
|
|
3
|
+
/**
|
|
4
|
+
* @param {string} serviceUrl - GraphQL service endpoint
|
|
5
|
+
* @param {Query} query - GraphQL query
|
|
6
|
+
* @param {HeaderProcessor} processHeaders - a function to add extra headers to the request
|
|
7
|
+
*/
|
|
8
|
+
export declare function AGGQuery<D>(serviceUrl: string, query: Query, processHeaders?: HeaderProcessor): Promise<D>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type HeaderProcessor = (headers: Headers) => Headers;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { FireEventType } from '@atlaskit/teams-app-internal-analytics/types';
|
|
2
2
|
import { type AgentIdType, type AgentPermissions, type ClientOverrides, type ProfileClient, type ProfileClientOptions, type RovoAgentCardClientResult, type Team, type TeamCentralReportingLinesData } from '../types';
|
|
3
|
-
import RovoAgentCardClient from './RovoAgentCardClient';
|
|
4
|
-
import TeamCentralCardClient from './TeamCentralCardClient';
|
|
3
|
+
import { default as RovoAgentCardClient } from './RovoAgentCardClient';
|
|
4
|
+
import { type default as TeamCentralCardClient } from './TeamCentralCardClient';
|
|
5
5
|
import TeamProfileCardClient from './TeamProfileCardClient';
|
|
6
6
|
import UserProfileCardClient from './UserProfileCardClient';
|
|
7
7
|
export type TeamCentralScopes = {
|
|
8
8
|
withOrgContext: true;
|
|
9
9
|
withSiteContext: boolean;
|
|
10
10
|
};
|
|
11
|
-
declare class ProfileCardClient implements ProfileClient {
|
|
11
|
+
export declare class ProfileCardClient implements ProfileClient {
|
|
12
12
|
userClient: UserProfileCardClient;
|
|
13
13
|
teamClient: TeamProfileCardClient;
|
|
14
14
|
tcClient?: TeamCentralCardClient;
|
|
@@ -25,4 +25,9 @@ declare class ProfileCardClient implements ProfileClient {
|
|
|
25
25
|
deleteAgent(id: string, analytics?: FireEventType): Promise<void>;
|
|
26
26
|
setFavouriteAgent(id: string, isFavourite: boolean, analytics?: FireEventType): Promise<void>;
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Use the `ProfileCardClient` export from
|
|
30
|
+
* `@atlaskit/profilecard/profile-card-client` instead.
|
|
31
|
+
*/
|
|
32
|
+
export { ProfileCardClient as ProfileClient };
|
|
28
33
|
export default ProfileCardClient;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import type { FireEventType } from '@atlaskit/teams-app-internal-analytics/types';
|
|
2
2
|
import type { AgentIdType, AgentPermissions, ProfileClientOptions, RovoAgentCardClientResult } from '../types';
|
|
3
3
|
import CachingClient from './CachingClient';
|
|
4
|
-
export declare class AgentForbiddenError extends Error {
|
|
5
|
-
status: number;
|
|
6
|
-
constructor();
|
|
7
|
-
}
|
|
8
4
|
export default class RovoAgentCardClient extends CachingClient<RovoAgentCardClientResult> {
|
|
9
5
|
options: ProfileClientOptions;
|
|
10
6
|
constructor(options: ProfileClientOptions);
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { type TeamCentralReportingLinesData } from '../types';
|
|
2
2
|
import CachingClient, { type CacheConfig } from './CachingClient';
|
|
3
|
-
export declare const buildReportingLinesQuery: (aaid: string) => {
|
|
4
|
-
query: string;
|
|
5
|
-
variables: {
|
|
6
|
-
aaid: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
3
|
export type TeamCentralCardClientOptions = CacheConfig & {
|
|
10
4
|
cloudId?: string;
|
|
11
5
|
gatewayGraphqlUrl: string;
|
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
import type { FireEventType } from '@atlaskit/teams-app-internal-analytics/types';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ProfileCardClientData, ProfileClientOptions } from '../types';
|
|
3
3
|
import CachingClient from './CachingClient';
|
|
4
|
-
/**
|
|
5
|
-
* Transform response from GraphQL
|
|
6
|
-
* - Prefix `timestring` with `remoteWeekdayString` depending on `remoteWeekdayIndex`
|
|
7
|
-
* - Remove properties which will be not used later
|
|
8
|
-
* @ignore
|
|
9
|
-
* @param {object} response
|
|
10
|
-
* @return {object}
|
|
11
|
-
*/
|
|
12
|
-
export declare const modifyResponse: (response: ApiClientResponse) => ProfileCardClientData;
|
|
13
|
-
export declare const buildAggUserQuery: (userId: string) => {
|
|
14
|
-
query: string;
|
|
15
|
-
variables: {
|
|
16
|
-
userId: string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
4
|
export default class UserProfileCardClient extends CachingClient<any> {
|
|
20
5
|
options: ProfileClientOptions;
|
|
21
6
|
constructor(options: ProfileClientOptions);
|
|
22
7
|
makeRequest(cloudId: string, userId: string): Promise<ProfileCardClientData>;
|
|
23
8
|
getProfile(cloudId: string, userId: string, analytics?: FireEventType): Promise<any>;
|
|
24
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use `import { modifyResponse } from '@atlaskit/profilecard/modify-response'` instead.
|
|
12
|
+
*/
|
|
13
|
+
export { modifyResponse } from './modifyResponse';
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use `import { buildAggUserQuery } from '@atlaskit/profilecard/build-agg-user-query'` instead.
|
|
16
|
+
*/
|
|
17
|
+
export { buildAggUserQuery } from './buildAggUserQuery';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const addHeaders: (headers: Headers) => Headers;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const aggUserQueryString = "query user($userId: ID!) {\n\t\tuser(accountId: $userId) {\n\t\t\tid\n\t\t\tname\n\t\t\tpicture\n\t\t\taccountStatus\n\t\t\t__typename\n\t\t\t... on AtlassianAccountUser {\n\t\t\t\temail\n\t\t\t\tnickname\n\t\t\t\tzoneinfo\n\t\t\t\textendedProfile {\n\t\t\t\t\tjobTitle\n\t\t\t\t\torganization\n\t\t\t\t\tlocation\n\t\t\t\t\tclosedDate\n\t\t\t\t\tinactiveDate\n\t\t\t\t}\n\t\t\t}\n\t\t\t... on CustomerUser {\n\t\t\t\temail\n\t\t\t\tzoneinfo\n\t\t\t}\n\t\t\t... on AppUser {\n \t\t\tappType\n \t\t}\n\t\t}\n\t}";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ARI_PREFIX = "ari:cloud:identity::team/";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildHeaders: () => Headers;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HeaderProcessor } from './HeaderProcessor';
|
|
2
|
+
import type { Query } from './Query';
|
|
3
|
+
/**
|
|
4
|
+
* @param {string} serviceUrl - GraphQL service endpoint
|
|
5
|
+
* @param {Query} query - GraphQL query
|
|
6
|
+
* @param {HeaderProcessor} processHeaders - a function to add extra headers to the request
|
|
7
|
+
*/
|
|
8
|
+
export declare function directoryGraphqlQuery<D>(serviceUrl: string, query: Query, processHeaders?: HeaderProcessor): Promise<D>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const extractIdFromAri: (ari: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GATEWAY_QUERY_V2: 'query TeamCard($teamId: ID!, $siteId: String!) {\n Team: team {\n team: teamV2(id: $teamId, siteId: $siteId) @optIn(to: "Team-v2") {\n \n id\n displayName\n description\n smallHeaderImageUrl\n largeHeaderImageUrl\n smallAvatarImageUrl\n largeAvatarImageUrl\n\t isVerified\n\t state\n members {\n nodes {\n member {\n accountId\n name\n picture\n }\n }\n }\n\n }\n }\n}';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AGGError } from '../util/AGGError';
|
|
2
|
+
import { AGGErrors } from '../util/AGGErrors';
|
|
3
|
+
import { DirectoryGraphQLError } from '../util/DirectoryGraphQLError';
|
|
4
|
+
import { DirectoryGraphQLErrors } from '../util/DirectoryGraphQLErrors';
|
|
5
|
+
import { type ErrorAttributes } from './types';
|
|
6
|
+
export declare const getErrorAttributes: (error?: DirectoryGraphQLErrors | Error | unknown | DirectoryGraphQLError | AGGError | AGGErrors) => ErrorAttributes;
|
|
@@ -11,28 +11,8 @@ interface AGGMember {
|
|
|
11
11
|
picture: string;
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
interface AGGResult {
|
|
14
|
+
export interface AGGResult {
|
|
15
15
|
team: AGGTeam;
|
|
16
16
|
}
|
|
17
|
-
export declare const extractIdFromAri: (ari: string) => string;
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated Use idToAriSafe instead
|
|
20
|
-
*/
|
|
21
|
-
export declare const idToAri: (teamId: string) => string;
|
|
22
|
-
export declare const idToAriSafe: (teamIdOrTeamAri: string) => string;
|
|
23
|
-
export declare const convertTeam: (result: AGGResult) => Team;
|
|
24
|
-
export declare const GATEWAY_QUERY_V2: 'query TeamCard($teamId: ID!, $siteId: String!) {\n Team: team {\n team: teamV2(id: $teamId, siteId: $siteId) @optIn(to: "Team-v2") {\n \n id\n displayName\n description\n smallHeaderImageUrl\n largeHeaderImageUrl\n smallAvatarImageUrl\n largeAvatarImageUrl\n\t isVerified\n\t state\n members {\n nodes {\n member {\n accountId\n name\n picture\n }\n }\n }\n\n }\n }\n}';
|
|
25
|
-
type TeamQueryVariables = {
|
|
26
|
-
teamId: string;
|
|
27
|
-
siteId?: string;
|
|
28
|
-
};
|
|
29
|
-
export declare const buildGatewayQuery: ({ teamId, siteId, }: TeamQueryVariables) => {
|
|
30
|
-
query: string;
|
|
31
|
-
variables: {
|
|
32
|
-
teamId: string;
|
|
33
|
-
siteId: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
export declare const addHeaders: (headers: Headers) => Headers;
|
|
37
17
|
export declare function getTeamFromAGG(url: string, teamId: string, siteId?: string): Promise<Team>;
|
|
38
18
|
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { HeaderProcessor } from './HeaderProcessor';
|
|
2
|
+
import type { Query } from './Query';
|
|
3
|
+
export declare function graphQLQuery(serviceUrl: string, query: Query, processHeaders: HeaderProcessor | undefined, handleErrors: (errors: any, traceId: string | null) => void): Promise<any>;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
interface Query {
|
|
2
|
-
query: string;
|
|
3
|
-
variables: Record<string, any>;
|
|
4
|
-
}
|
|
5
1
|
export interface GraphQLError {
|
|
6
2
|
code?: number;
|
|
7
3
|
reason?: string;
|
|
@@ -15,17 +11,3 @@ export interface GraphQLError {
|
|
|
15
11
|
errorNumber: number;
|
|
16
12
|
} & Record<string, any>;
|
|
17
13
|
}
|
|
18
|
-
type HeaderProcessor = (headers: Headers) => Headers;
|
|
19
|
-
/**
|
|
20
|
-
* @param {string} serviceUrl - GraphQL service endpoint
|
|
21
|
-
* @param {Query} query - GraphQL query
|
|
22
|
-
* @param {HeaderProcessor} processHeaders - a function to add extra headers to the request
|
|
23
|
-
*/
|
|
24
|
-
export declare function directoryGraphqlQuery<D>(serviceUrl: string, query: Query, processHeaders?: HeaderProcessor): Promise<D>;
|
|
25
|
-
/**
|
|
26
|
-
* @param {string} serviceUrl - GraphQL service endpoint
|
|
27
|
-
* @param {Query} query - GraphQL query
|
|
28
|
-
* @param {HeaderProcessor} processHeaders - a function to add extra headers to the request
|
|
29
|
-
*/
|
|
30
|
-
export declare function AGGQuery<D>(serviceUrl: string, query: Query, processHeaders?: HeaderProcessor): Promise<D>;
|
|
31
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const handleAGGErrors: (errors: unknown, traceId: string | null) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const handleDirectoryGraphQLErrors: (errors: unknown, traceId: string | null) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const idToAriSafe: (teamIdOrTeamAri: string) => string;
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import CachingClient from './CachingClient';
|
|
2
2
|
import ProfileCardClient from './ProfileCardClient';
|
|
3
3
|
import TeamProfileClient from './TeamProfileCardClient';
|
|
4
|
-
import UserProfileClient
|
|
5
|
-
|
|
4
|
+
import UserProfileClient from './UserProfileCardClient';
|
|
5
|
+
import { modifyResponse } from './modifyResponse';
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use `import CachingClient from '@atlaskit/profilecard/caching-client'` instead.
|
|
8
|
+
*/
|
|
9
|
+
export { CachingClient };
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use `import { modifyResponse } from '@atlaskit/profilecard/modify-response'` instead.
|
|
12
|
+
*/
|
|
13
|
+
export { modifyResponse };
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use `import TeamProfileClient from '@atlaskit/profilecard/team-profile-card-client'` instead.
|
|
16
|
+
*/
|
|
17
|
+
export { TeamProfileClient };
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use `import UserProfileClient from '@atlaskit/profilecard/user-profile-card-client'` instead.
|
|
20
|
+
*/
|
|
21
|
+
export { UserProfileClient };
|
|
6
22
|
export default ProfileCardClient;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type ClientOverrides } from '../types';
|
|
2
|
+
import { default as TeamCentralCardClient, type TeamCentralCardClientOptions } from './TeamCentralCardClient';
|
|
3
|
+
export declare function maybeCreateTeamCentralClient(config: TeamCentralCardClientOptions, clients?: ClientOverrides): TeamCentralCardClient | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ApiClientResponse, ProfileCardClientData } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Transform response from GraphQL
|
|
4
|
+
* - Prefix `timestring` with `remoteWeekdayString` depending on `remoteWeekdayIndex`
|
|
5
|
+
* - Remove properties which will be not used later
|
|
6
|
+
* @ignore
|
|
7
|
+
* @param {object} response
|
|
8
|
+
* @return {object}
|
|
9
|
+
*/
|
|
10
|
+
export declare const modifyResponse: (response: ApiClientResponse) => ProfileCardClientData;
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Fetches version capability for a site via raw GraphQL fetch.
|
|
3
|
-
* Returns true only if versioning migration has completed.
|
|
4
|
-
*
|
|
5
|
-
* TODO remove after versioning rollout complete
|
|
6
|
-
* See: https://product-fabric.atlassian.net/browse/RAGE-2822
|
|
7
|
-
*/
|
|
8
|
-
export declare const fetchHasVersionCapability: (cloudId: string) => Promise<boolean>;
|
|
9
|
-
/**
|
|
10
|
-
* Fetches the Rovo activation ID for a given cloud ID.
|
|
11
|
-
* Used to construct the agent ARI when not available.
|
|
12
|
-
*/
|
|
13
|
-
export declare const fetchActivationId: (cloudId: string) => Promise<string | null>;
|
|
14
|
-
/**
|
|
15
|
-
* Calls the agentStudio_duplicateAgent mutation via raw GraphQL fetch.
|
|
16
|
-
*
|
|
17
|
-
* TODO: Add SLO tracking and Sentry error reporting.
|
|
18
|
-
* See: https://product-fabric.atlassian.net/browse/RAGE-2822
|
|
19
|
-
*/
|
|
20
|
-
export declare const fetchDuplicateAgentMutation: (agentAri: string) => Promise<{
|
|
21
|
-
success: boolean;
|
|
22
|
-
newAgentAri?: string;
|
|
23
|
-
errorMessage?: string;
|
|
24
|
-
}>;
|
|
1
|
+
export declare const GRAPHQL_ENDPOINT = "/gateway/api/graphql";
|