@atlaskit/teams-client 5.6.0 → 6.1.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.
Files changed (86) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/cjs/common/utils/error/index.js +2 -94
  3. package/dist/cjs/common/utils/permissions/has-permission.js +2 -23
  4. package/dist/cjs/common/utils/ufo/index.js +2 -2
  5. package/dist/cjs/services/agg-client/index.js +2 -6
  6. package/dist/cjs/services/hooks/use-teams-client-setup.js +2 -12
  7. package/dist/cjs/services/legion-client/index.js +20 -17
  8. package/dist/cjs/services/main.js +4 -4
  9. package/dist/cjs/services/public-api-client/index.js +1 -12
  10. package/dist/cjs/services/sentry/utils/get-sentry-config.js +1 -1
  11. package/dist/cjs/services/use-query-light/types.js +1 -22
  12. package/dist/es2019/common/utils/error/index.js +1 -39
  13. package/dist/es2019/common/utils/permissions/has-permission.js +2 -11
  14. package/dist/es2019/common/utils/ufo/index.js +2 -2
  15. package/dist/es2019/services/agg-client/index.js +1 -7
  16. package/dist/es2019/services/hooks/use-teams-client-setup.js +2 -7
  17. package/dist/es2019/services/legion-client/index.js +4 -2
  18. package/dist/es2019/services/main.js +2 -2
  19. package/dist/es2019/services/public-api-client/index.js +1 -8
  20. package/dist/es2019/services/sentry/utils/get-sentry-config.js +1 -1
  21. package/dist/es2019/services/use-query-light/types.js +1 -11
  22. package/dist/esm/common/utils/error/index.js +1 -39
  23. package/dist/esm/common/utils/permissions/has-permission.js +2 -11
  24. package/dist/esm/common/utils/ufo/index.js +2 -2
  25. package/dist/esm/services/agg-client/index.js +1 -7
  26. package/dist/esm/services/hooks/use-teams-client-setup.js +2 -7
  27. package/dist/esm/services/legion-client/index.js +20 -17
  28. package/dist/esm/services/main.js +4 -4
  29. package/dist/esm/services/public-api-client/index.js +1 -8
  30. package/dist/esm/services/sentry/utils/get-sentry-config.js +1 -1
  31. package/dist/esm/services/use-query-light/types.js +1 -11
  32. package/dist/types/common/utils/error/index.d.ts +1 -36
  33. package/dist/types/common/utils/permissions/has-permission.d.ts +0 -8
  34. package/dist/types/services/agg-client/index.d.ts +0 -4
  35. package/dist/types/services/hooks/use-teams-client-setup.d.ts +0 -4
  36. package/dist/types/services/legion-client/index.d.ts +1 -1
  37. package/dist/types/services/main.d.ts +1 -1
  38. package/dist/types/services/public-api-client/index.d.ts +0 -4
  39. package/dist/types/services/use-query-light/types.d.ts +0 -8
  40. package/package.json +7 -4
  41. package/scripts/generate-docs.ts +1 -1
  42. package/ari/package.json +0 -8
  43. package/dist/cjs/common/utils/ari.js +0 -47
  44. package/dist/cjs/common/utils/index.js +0 -40
  45. package/dist/cjs/common/utils/team.js +0 -33
  46. package/dist/cjs/mocks/endpoints.js +0 -40
  47. package/dist/cjs/mocks/generate-data.js +0 -40
  48. package/dist/cjs/mocks/index.js +0 -68
  49. package/dist/cjs/services/sentry/main.js +0 -68
  50. package/dist/cjs/services/use-query-light/index.js +0 -26
  51. package/dist/cjs/services/use-query-light/main.js +0 -19
  52. package/dist/es2019/common/utils/ari.js +0 -26
  53. package/dist/es2019/common/utils/index.js +0 -22
  54. package/dist/es2019/common/utils/team.js +0 -18
  55. package/dist/es2019/mocks/endpoints.js +0 -23
  56. package/dist/es2019/mocks/generate-data.js +0 -23
  57. package/dist/es2019/mocks/index.js +0 -39
  58. package/dist/es2019/services/sentry/main.js +0 -40
  59. package/dist/es2019/services/use-query-light/index.js +0 -22
  60. package/dist/es2019/services/use-query-light/main.js +0 -11
  61. package/dist/esm/common/utils/ari.js +0 -26
  62. package/dist/esm/common/utils/index.js +0 -22
  63. package/dist/esm/common/utils/team.js +0 -18
  64. package/dist/esm/mocks/endpoints.js +0 -23
  65. package/dist/esm/mocks/generate-data.js +0 -23
  66. package/dist/esm/mocks/index.js +0 -39
  67. package/dist/esm/services/sentry/main.js +0 -40
  68. package/dist/esm/services/use-query-light/index.js +0 -22
  69. package/dist/esm/services/use-query-light/main.js +0 -11
  70. package/dist/types/common/utils/ari.d.ts +0 -24
  71. package/dist/types/common/utils/index.d.ts +0 -20
  72. package/dist/types/common/utils/team.d.ts +0 -16
  73. package/dist/types/mocks/endpoints.d.ts +0 -20
  74. package/dist/types/mocks/generate-data.d.ts +0 -20
  75. package/dist/types/mocks/index.d.ts +0 -36
  76. package/dist/types/services/sentry/main.d.ts +0 -36
  77. package/dist/types/services/use-query-light/index.d.ts +0 -20
  78. package/dist/types/services/use-query-light/main.d.ts +0 -8
  79. package/endpoints/package.json +0 -8
  80. package/generate-data/package.json +0 -8
  81. package/mocks/package.json +0 -8
  82. package/sentry/main/package.json +0 -8
  83. package/team/package.json +0 -8
  84. package/use-query-light/main/package.json +0 -8
  85. package/use-query-light/package.json +0 -8
  86. package/utils/package.json +0 -8
@@ -28,7 +28,7 @@ export function getSentryConfig(options) {
28
28
  ...DEFAULT_SENTRY_CONFIG,
29
29
  // Standalone __VERSION__ is set from `bin/set-release-version.sh`
30
30
  // when building to deploy to production
31
- release: `${"@atlaskit/teams-client"}@${"5.5.0"}` ||
31
+ release: `${"@atlaskit/teams-client"}@${"6.0.0"}` ||
32
32
  // @ts-ignore Jira - window.BUILD_KEY
33
33
  window.BUILD_KEY || ( // @ts-ignore Confluence - window.__buildInfo
34
34
  (_window$__buildInfo = window.__buildInfo) === null || _window$__buildInfo === void 0 ? void 0 : _window$__buildInfo.FRONTEND_VERSION) || '---',
@@ -1,17 +1,7 @@
1
- /* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
2
-
3
1
  export let ErrorCategory = /*#__PURE__*/function (ErrorCategory) {
4
2
  ErrorCategory["NotFound"] = "NotFound";
5
3
  ErrorCategory["NotPermitted"] = "NotPermitted";
6
4
  ErrorCategory["MalformedInput"] = "MalformedInput";
7
5
  ErrorCategory["Internal"] = "Internal";
8
6
  return ErrorCategory;
9
- }({});
10
- /**
11
- * @deprecated Use `import { ActualGraphQLError } from '@atlaskit/teams-client/actual-graph-ql-error'` instead.
12
- */
13
- export { ActualGraphQLError } from './ActualGraphQLError';
14
- /**
15
- * @deprecated Use `import { UseQueryLightError } from '@atlaskit/teams-client/use-query-light-error'` instead.
16
- */
17
- export { UseQueryLightError } from './UseQueryLightError';
7
+ }({});
@@ -1,5 +1,3 @@
1
- /* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
2
-
3
1
  export var ErrorCategory = /*#__PURE__*/function (ErrorCategory) {
4
2
  ErrorCategory["NotFound"] = "NotFound";
5
3
  ErrorCategory["NotPermitted"] = "NotPermitted";
@@ -18,40 +16,4 @@ export var StatusCode = /*#__PURE__*/function (StatusCode) {
18
16
  export var TeamErrorType = /*#__PURE__*/function (TeamErrorType) {
19
17
  TeamErrorType["TEAM_NOT_ACTIVE"] = "Team must be active";
20
18
  return TeamErrorType;
21
- }({});
22
- /**
23
- * @deprecated Use `import { isAuthError } from '@atlaskit/teams-client/is-auth-error'` instead.
24
- */
25
- export { isAuthError } from './isAuthError';
26
- /**
27
- * @deprecated Use `import { isErrorStatusCode } from '@atlaskit/teams-client/is-error-status-code'` instead.
28
- */
29
- export { isErrorStatusCode } from './isErrorStatusCode';
30
- /**
31
- * @deprecated Use `import { doesErrorContainStatus } from '@atlaskit/teams-client/does-error-contain-status'` instead.
32
- */
33
- export { doesErrorContainStatus } from './doesErrorContainStatus';
34
- /**
35
- * @deprecated Use `import { DefaultError } from '@atlaskit/teams-client/default-error'` instead.
36
- */
37
- export { DefaultError } from './DefaultError';
38
- /**
39
- * @deprecated Use `import { SLOIgnoreError } from '@atlaskit/teams-client/slo-ignore-error'` instead.
40
- */
41
- export { SLOIgnoreError } from './SLOIgnoreError';
42
- /**
43
- * @deprecated Use `import { HttpError } from '@atlaskit/teams-client/http-error'` instead.
44
- */
45
- export { HttpError } from './HttpError';
46
- /**
47
- * @deprecated Use `import { SLOIgnoreHttpError } from '@atlaskit/teams-client/slo-ignore-http-error'` instead.
48
- */
49
- export { SLOIgnoreHttpError } from './SLOIgnoreHttpError';
50
- /**
51
- * @deprecated Use `import { GraphQLError } from '@atlaskit/teams-client/graph-ql-error'` instead.
52
- */
53
- export { GraphQLError } from './GraphQLError';
54
- /**
55
- * @deprecated Use `import { isNetworkError } from '@atlaskit/teams-client/is-network-error'` instead.
56
- */
57
- export { isNetworkError } from './isNetworkError';
19
+ }({});
@@ -1,4 +1,4 @@
1
- /* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
1
+ /* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of this deprecated API. */
2
2
 
3
3
  import { isMember } from '../is-member';
4
4
  import { vanityActions } from './constants';
@@ -21,13 +21,4 @@ export function hasPermission(action, settings, permission, isPeopleBrowseEnable
21
21
  source: source,
22
22
  state: state
23
23
  });
24
- }
25
-
26
- /**
27
- * @deprecated Use `import { hasPermissionForAction } from '@atlaskit/teams-client/has-permission-for-action'` instead.
28
- */
29
- export { hasPermissionForAction } from './has-permission-for-action';
30
- /**
31
- * @deprecated Use `import { userCan } from '@atlaskit/teams-client/user-can'` instead.
32
- */
33
- export { userCan } from './user-can';
24
+ }
@@ -49,7 +49,7 @@ export var TeamsUFOExperience = /*#__PURE__*/function (_UFOExperience) {
49
49
  return _superPropGet(TeamsUFOExperience, "failure", this, 3)([{
50
50
  metadata: {
51
51
  error: createErrorMetadata(error),
52
- packageVersion: "5.5.0",
52
+ packageVersion: "6.0.0",
53
53
  packageName: "@atlaskit/teams-client"
54
54
  }
55
55
  }]);
@@ -57,7 +57,7 @@ export var TeamsUFOExperience = /*#__PURE__*/function (_UFOExperience) {
57
57
  return _superPropGet(TeamsUFOExperience, "failure", this, 3)([{
58
58
  metadata: {
59
59
  error: 'unknown error',
60
- packageVersion: "5.5.0",
60
+ packageVersion: "6.0.0",
61
61
  packageName: "@atlaskit/teams-client"
62
62
  }
63
63
  }]);
@@ -10,8 +10,6 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
10
10
  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; }
11
11
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
12
12
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
- /* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
14
-
15
13
  import { toTeamARI } from '../../common/utils/to-team-ari';
16
14
  import { toUserId } from '../../common/utils/to-user-id';
17
15
  import { DEFAULT_CONFIG } from '../constants';
@@ -399,8 +397,4 @@ export var AGGClient = /*#__PURE__*/function (_BaseGraphQlClient) {
399
397
  }(BaseGraphQlClient);
400
398
  export var aggClient = new AGGClient(DEFAULT_CONFIG.stargateRoot, {
401
399
  logException: logException
402
- });
403
-
404
- /**
405
- * @deprecated Use `import type { TeamContainers } from '@atlaskit/teams-client/team-containers'` instead.
406
- */
400
+ });
@@ -1,4 +1,4 @@
1
- /* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
1
+ /* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of this deprecated API. */
2
2
 
3
3
  import { useTeamsClientSetupNext } from './use-teams-client-setup-next';
4
4
 
@@ -12,9 +12,4 @@ export var useTeamsClientSetup = function useTeamsClientSetup(stargateRoot, clou
12
12
  orgId: orgId,
13
13
  principalUserId: principalUserId
14
14
  });
15
- };
16
-
17
- /**
18
- * @deprecated Use `import { useTeamsClientSetupNext } from '@atlaskit/teams-client/use-teams-client-setup-next'` instead.
19
- */
20
- export { useTeamsClientSetupNext } from './use-teams-client-setup-next';
15
+ };
@@ -13,6 +13,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
13
13
  import _regeneratorRuntime from "@babel/runtime/regenerator";
14
14
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
15
15
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
16
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
16
17
  import { DEFAULT_CONFIG } from '../constants';
17
18
  import { RestClient } from '../rest-client';
18
19
 
@@ -897,11 +898,13 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
897
898
  }, {
898
899
  key: "getWriteMediaToken",
899
900
  value: function () {
900
- var _getWriteMediaToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29() {
901
+ var _getWriteMediaToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(teamId) {
902
+ var path;
901
903
  return _regeneratorRuntime.wrap(function (_context29) {
902
904
  while (1) switch (_context29.prev = _context29.next) {
903
905
  case 0:
904
- return _context29.abrupt("return", this.getResource('/v4/teams/header-image/media-upload').then(function (response) {
906
+ path = fg('ptc-enable-team-scoped-header-image-media-upload') && teamId ? "".concat(v4UrlPath, "/").concat(this.trimTeamARI(teamId), "/header-image/media-upload") : "".concat(v4UrlPath, "/header-image/media-upload");
907
+ return _context29.abrupt("return", this.getResource(path).then(function (response) {
905
908
  var _response$baseUrl;
906
909
  return _objectSpread(_objectSpread({}, response), {}, {
907
910
  baseUrl: (_response$baseUrl = response.baseUrl) !== null && _response$baseUrl !== void 0 && _response$baseUrl.endsWith('/') ? response.baseUrl.slice(0, -1) : response.baseUrl
@@ -913,7 +916,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
913
916
  }
914
917
  }, _callee29, this);
915
918
  }));
916
- function getWriteMediaToken() {
919
+ function getWriteMediaToken(_x53) {
917
920
  return _getWriteMediaToken.apply(this, arguments);
918
921
  }
919
922
  return getWriteMediaToken;
@@ -939,7 +942,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
939
942
  }
940
943
  }, _callee30, this);
941
944
  }));
942
- function getSoftDeletedTeamById(_x53) {
945
+ function getSoftDeletedTeamById(_x54) {
943
946
  return _getSoftDeletedTeamById.apply(this, arguments);
944
947
  }
945
948
  return getSoftDeletedTeamById;
@@ -968,7 +971,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
968
971
  }
969
972
  }, _callee31, this);
970
973
  }));
971
- function getUserInSiteUserBase(_x54) {
974
+ function getUserInSiteUserBase(_x55) {
972
975
  return _getUserInSiteUserBase.apply(this, arguments);
973
976
  }
974
977
  return getUserInSiteUserBase;
@@ -991,7 +994,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
991
994
  }
992
995
  }, _callee32, this);
993
996
  }));
994
- function retrieveBrowseUserPermission(_x55) {
997
+ function retrieveBrowseUserPermission(_x56) {
995
998
  return _retrieveBrowseUserPermission.apply(this, arguments);
996
999
  }
997
1000
  return retrieveBrowseUserPermission;
@@ -1058,7 +1061,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
1058
1061
  }
1059
1062
  }, _callee34, this);
1060
1063
  }));
1061
- function getLinkedTeamsBulk(_x56) {
1064
+ function getLinkedTeamsBulk(_x57) {
1062
1065
  return _getLinkedTeamsBulk.apply(this, arguments);
1063
1066
  }
1064
1067
  return getLinkedTeamsBulk;
@@ -1091,7 +1094,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
1091
1094
  }
1092
1095
  }, _callee35, this);
1093
1096
  }));
1094
- function getTeamProfileDetails(_x57, _x58) {
1097
+ function getTeamProfileDetails(_x58, _x59) {
1095
1098
  return _getTeamProfileDetails.apply(this, arguments);
1096
1099
  }
1097
1100
  return getTeamProfileDetails;
@@ -1151,7 +1154,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
1151
1154
  }
1152
1155
  }, _callee37, this);
1153
1156
  }));
1154
- function restoreTeamToSyncedGroup(_x59, _x60) {
1157
+ function restoreTeamToSyncedGroup(_x60, _x61) {
1155
1158
  return _restoreTeamToSyncedGroup.apply(this, arguments);
1156
1159
  }
1157
1160
  return restoreTeamToSyncedGroup;
@@ -1170,7 +1173,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
1170
1173
  }
1171
1174
  }, _callee38, this);
1172
1175
  }));
1173
- function createTeamContainers(_x61) {
1176
+ function createTeamContainers(_x62) {
1174
1177
  return _createTeamContainers.apply(this, arguments);
1175
1178
  }
1176
1179
  return createTeamContainers;
@@ -1194,7 +1197,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
1194
1197
  }
1195
1198
  }, _callee39, this);
1196
1199
  }));
1197
- function getTeamEnabledSites(_x62) {
1200
+ function getTeamEnabledSites(_x63) {
1198
1201
  return _getTeamEnabledSites.apply(this, arguments);
1199
1202
  }
1200
1203
  return getTeamEnabledSites;
@@ -1221,7 +1224,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
1221
1224
  }
1222
1225
  }, _callee40, this);
1223
1226
  }));
1224
- function assignTeamsToSites(_x63) {
1227
+ function assignTeamsToSites(_x64) {
1225
1228
  return _assignTeamsToSites.apply(this, arguments);
1226
1229
  }
1227
1230
  return assignTeamsToSites;
@@ -1243,7 +1246,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
1243
1246
  }
1244
1247
  }, _callee41, this);
1245
1248
  }));
1246
- function getTeamsToBeClonedToJsmSites(_x64) {
1249
+ function getTeamsToBeClonedToJsmSites(_x65) {
1247
1250
  return _getTeamsToBeClonedToJsmSites.apply(this, arguments);
1248
1251
  }
1249
1252
  return getTeamsToBeClonedToJsmSites;
@@ -1265,7 +1268,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
1265
1268
  }
1266
1269
  }, _callee42, this);
1267
1270
  }));
1268
- function setTeamSiteAssignmentPermission(_x65, _x66) {
1271
+ function setTeamSiteAssignmentPermission(_x66, _x67) {
1269
1272
  return _setTeamSiteAssignmentPermission.apply(this, arguments);
1270
1273
  }
1271
1274
  return setTeamSiteAssignmentPermission;
@@ -1294,7 +1297,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
1294
1297
  }
1295
1298
  }, _callee43, this);
1296
1299
  }));
1297
- function getAssignedTeams(_x67, _x68, _x69, _x70) {
1300
+ function getAssignedTeams(_x68, _x69, _x70, _x71) {
1298
1301
  return _getAssignedTeams.apply(this, arguments);
1299
1302
  }
1300
1303
  return getAssignedTeams;
@@ -1323,7 +1326,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
1323
1326
  }
1324
1327
  }, _callee44, this);
1325
1328
  }));
1326
- function getUnassignedTeams(_x71, _x72, _x73, _x74) {
1329
+ function getUnassignedTeams(_x72, _x73, _x74, _x75) {
1327
1330
  return _getUnassignedTeams.apply(this, arguments);
1328
1331
  }
1329
1332
  return getUnassignedTeams;
@@ -1525,7 +1528,7 @@ export var LegionClient = /*#__PURE__*/function (_RestClient) {
1525
1528
  }
1526
1529
  }, _callee46, this, [[0, 1]]);
1527
1530
  }));
1528
- function getTeamStatesInBulk(_x75, _x76) {
1531
+ function getTeamStatesInBulk(_x76, _x77) {
1529
1532
  return _getTeamStatesInBulk.apply(this, arguments);
1530
1533
  }
1531
1534
  return getTeamStatesInBulk;
@@ -2079,13 +2079,13 @@ export var TeamsClient = /*#__PURE__*/function () {
2079
2079
  }, {
2080
2080
  key: "getWriteTeamMediaToken",
2081
2081
  value: (function () {
2082
- var _getWriteTeamMediaToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58() {
2082
+ var _getWriteTeamMediaToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(teamId) {
2083
2083
  var _this53 = this;
2084
2084
  return _regeneratorRuntime.wrap(function (_context58) {
2085
2085
  while (1) switch (_context58.prev = _context58.next) {
2086
2086
  case 0:
2087
2087
  return _context58.abrupt("return", this.measurePerformance('getWriteTeamMediaToken', function () {
2088
- return _this53._legionClient.getWriteMediaToken();
2088
+ return _this53._legionClient.getWriteMediaToken(teamId);
2089
2089
  }));
2090
2090
  case 1:
2091
2091
  case "end":
@@ -2093,7 +2093,7 @@ export var TeamsClient = /*#__PURE__*/function () {
2093
2093
  }
2094
2094
  }, _callee58, this);
2095
2095
  }));
2096
- function getWriteTeamMediaToken() {
2096
+ function getWriteTeamMediaToken(_x24) {
2097
2097
  return _getWriteTeamMediaToken.apply(this, arguments);
2098
2098
  }
2099
2099
  return getWriteTeamMediaToken;
@@ -2179,7 +2179,7 @@ export var TeamsClient = /*#__PURE__*/function () {
2179
2179
  }
2180
2180
  }, _callee61, this);
2181
2181
  }));
2182
- function updateUserHeaderImage(_x24) {
2182
+ function updateUserHeaderImage(_x25) {
2183
2183
  return _updateUserHeaderImage.apply(this, arguments);
2184
2184
  }
2185
2185
  return updateUserHeaderImage;
@@ -1,13 +1,6 @@
1
- /* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
2
-
3
1
  import { DEFAULT_CONFIG } from '../constants';
4
2
  import { PublicApiClient } from './PublicApiClient';
5
3
 
6
4
  // eslint-disable-next-line import/no-anonymous-default-export
7
5
  var _default_1 = new PublicApiClient(DEFAULT_CONFIG.publicApiRoot);
8
- export default _default_1;
9
-
10
- /**
11
- * @deprecated Use `import { PublicApiClient } from '@atlaskit/teams-client/public-api-client'` instead.
12
- */
13
- export { PublicApiClient } from './PublicApiClient';
6
+ export default _default_1;
@@ -29,7 +29,7 @@ export function getSentryConfig(options) {
29
29
  return _objectSpread(_objectSpread(_objectSpread({}, otherOptions), DEFAULT_SENTRY_CONFIG), {}, {
30
30
  // Standalone __VERSION__ is set from `bin/set-release-version.sh`
31
31
  // when building to deploy to production
32
- release: "".concat("@atlaskit/teams-client", "@").concat("5.5.0") ||
32
+ release: "".concat("@atlaskit/teams-client", "@").concat("6.0.0") ||
33
33
  // @ts-ignore Jira - window.BUILD_KEY
34
34
  window.BUILD_KEY || ( // @ts-ignore Confluence - window.__buildInfo
35
35
  (_window$__buildInfo = window.__buildInfo) === null || _window$__buildInfo === void 0 ? void 0 : _window$__buildInfo.FRONTEND_VERSION) || '---',
@@ -1,17 +1,7 @@
1
- /* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
2
-
3
1
  export var ErrorCategory = /*#__PURE__*/function (ErrorCategory) {
4
2
  ErrorCategory["NotFound"] = "NotFound";
5
3
  ErrorCategory["NotPermitted"] = "NotPermitted";
6
4
  ErrorCategory["MalformedInput"] = "MalformedInput";
7
5
  ErrorCategory["Internal"] = "Internal";
8
6
  return ErrorCategory;
9
- }({});
10
- /**
11
- * @deprecated Use `import { ActualGraphQLError } from '@atlaskit/teams-client/actual-graph-ql-error'` instead.
12
- */
13
- export { ActualGraphQLError } from './ActualGraphQLError';
14
- /**
15
- * @deprecated Use `import { UseQueryLightError } from '@atlaskit/teams-client/use-query-light-error'` instead.
16
- */
17
- export { UseQueryLightError } from './UseQueryLightError';
7
+ }({});
@@ -36,39 +36,4 @@ export interface ErrorData {
36
36
  message: string;
37
37
  fields?: FieldError[];
38
38
  }
39
- /**
40
- * @deprecated Use `import { isAuthError } from '@atlaskit/teams-client/is-auth-error'` instead.
41
- */
42
- export { isAuthError } from './isAuthError';
43
- /**
44
- * @deprecated Use `import { isErrorStatusCode } from '@atlaskit/teams-client/is-error-status-code'` instead.
45
- */
46
- export { isErrorStatusCode } from './isErrorStatusCode';
47
- /**
48
- * @deprecated Use `import { doesErrorContainStatus } from '@atlaskit/teams-client/does-error-contain-status'` instead.
49
- */
50
- export { doesErrorContainStatus } from './doesErrorContainStatus';
51
- /**
52
- * @deprecated Use `import { DefaultError } from '@atlaskit/teams-client/default-error'` instead.
53
- */
54
- export { DefaultError } from './DefaultError';
55
- /**
56
- * @deprecated Use `import { SLOIgnoreError } from '@atlaskit/teams-client/slo-ignore-error'` instead.
57
- */
58
- export { SLOIgnoreError } from './SLOIgnoreError';
59
- /**
60
- * @deprecated Use `import { HttpError } from '@atlaskit/teams-client/http-error'` instead.
61
- */
62
- export { HttpError } from './HttpError';
63
- /**
64
- * @deprecated Use `import { SLOIgnoreHttpError } from '@atlaskit/teams-client/slo-ignore-http-error'` instead.
65
- */
66
- export { SLOIgnoreHttpError } from './SLOIgnoreHttpError';
67
- /**
68
- * @deprecated Use `import { GraphQLError } from '@atlaskit/teams-client/graph-ql-error'` instead.
69
- */
70
- export { GraphQLError } from './GraphQLError';
71
- /**
72
- * @deprecated Use `import { isNetworkError } from '@atlaskit/teams-client/is-network-error'` instead.
73
- */
74
- export { isNetworkError } from './isNetworkError';
39
+ export {};
@@ -5,11 +5,3 @@ import { type TeamAction, type TeamPermissions } from './types';
5
5
  * @deprecated use import { userCan } from '@atlassian/teams-app-internal-user-permissions';
6
6
  */
7
7
  export declare function hasPermission(action: TeamAction, settings: TeamMembershipSettings, permission: TeamPermission | undefined, isPeopleBrowseEnabled: boolean, currentUserMembership: TeamMembership | undefined, teamVisibilityPermissions?: TeamPermissions, source?: ExternalReferenceSource, state?: TeamState): boolean;
8
- /**
9
- * @deprecated Use `import { hasPermissionForAction } from '@atlaskit/teams-client/has-permission-for-action'` instead.
10
- */
11
- export { hasPermissionForAction } from './has-permission-for-action';
12
- /**
13
- * @deprecated Use `import { userCan } from '@atlaskit/teams-client/user-can'` instead.
14
- */
15
- export { userCan } from './user-can';
@@ -20,7 +20,3 @@ export declare class AGGClient extends BaseGraphQlClient {
20
20
  queryTeamsConnectedToContainer(containerId: string): Promise<TeamWithMemberships[]>;
21
21
  }
22
22
  export declare const aggClient: AGGClient;
23
- /**
24
- * @deprecated Use `import type { TeamContainers } from '@atlaskit/teams-client/team-containers'` instead.
25
- */
26
- export type { TeamContainers } from './TeamContainers';
@@ -2,7 +2,3 @@
2
2
  * @deprecated use useTeamsClientSetupNext for named parameters
3
3
  */
4
4
  export declare const useTeamsClientSetup: (stargateRoot?: string, cloudId?: string | null, orgId?: string, principalUserId?: string) => void;
5
- /**
6
- * @deprecated Use `import { useTeamsClientSetupNext } from '@atlaskit/teams-client/use-teams-client-setup-next'` instead.
7
- */
8
- export { useTeamsClientSetupNext } from './use-teams-client-setup-next';
@@ -139,7 +139,7 @@ export declare class LegionClient extends RestClient implements LegionClient {
139
139
  unlinkTeamFromGroup(teamId: string, membershipSettings: TeamMembershipSettings): Promise<void>;
140
140
  getTeamAndGroupDiff(teamId: string, externalReference: ExternalReference): Promise<LegionTeamAndGroupDifferenceResponse>;
141
141
  linkExistingTeamToGroup(teamId: string, externalReference: ExternalReference): Promise<void>;
142
- getWriteMediaToken(): Promise<ReadMediaTokenResponse>;
142
+ getWriteMediaToken(teamId?: string): Promise<ReadMediaTokenResponse>;
143
143
  getSoftDeletedTeamById(teamId: string): Promise<SoftDeletedTeam>;
144
144
  /**
145
145
  * Shoud only be used within Teams (P&T) packages
@@ -373,7 +373,7 @@ export declare class TeamsClient {
373
373
  /**
374
374
  * Get token to upload media for a team
375
375
  */
376
- getWriteTeamMediaToken(): Promise<AwaitedReturn<typeof userPreferencesClient.getReadMediaToken>>;
376
+ getWriteTeamMediaToken(teamId?: string): Promise<AwaitedReturn<typeof userPreferencesClient.getReadMediaToken>>;
377
377
  /**
378
378
  * Get token to read media for a user
379
379
  */
@@ -1,7 +1,3 @@
1
1
  import { PublicApiClient } from './PublicApiClient';
2
2
  declare const _default_1: PublicApiClient;
3
3
  export default _default_1;
4
- /**
5
- * @deprecated Use `import { PublicApiClient } from '@atlaskit/teams-client/public-api-client'` instead.
6
- */
7
- export { PublicApiClient } from './PublicApiClient';
@@ -36,11 +36,3 @@ export interface FetchMoreArgs<TParams, TResult> {
36
36
  variables: Partial<TParams>;
37
37
  handleDataMerge: (prevData: TResult | undefined, newData: TResult | undefined) => TResult | undefined;
38
38
  }
39
- /**
40
- * @deprecated Use `import { ActualGraphQLError } from '@atlaskit/teams-client/actual-graph-ql-error'` instead.
41
- */
42
- export { ActualGraphQLError } from './ActualGraphQLError';
43
- /**
44
- * @deprecated Use `import { UseQueryLightError } from '@atlaskit/teams-client/use-query-light-error'` instead.
45
- */
46
- export { UseQueryLightError } from './UseQueryLightError';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/teams-client",
3
- "version": "5.6.0",
3
+ "version": "6.1.0",
4
4
  "description": "A client to retrieve team related data",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -30,10 +30,10 @@
30
30
  "test:coverage": "(cd ../../.. && yarn test 'packages/people-and-teams/teams-client/src' --coverage --coverageProvider=v8 --collectCoverageFrom='[\"packages/people-and-teams/teams-client/src/**\", \"!packages/people-and-teams/teams-client/src/**/**/types.ts\", \"!packages/people-and-teams/teams-client/src/ui/**/styled.tsx\"]')"
31
31
  },
32
32
  "dependencies": {
33
- "@atlaskit/atlassian-context": "^1.2.0",
33
+ "@atlaskit/atlassian-context": "^2.0.0",
34
34
  "@atlaskit/platform-feature-flags": "^2.2.0",
35
35
  "@atlaskit/react-compiler-gating": "^0.2.0",
36
- "@atlaskit/ufo": "^1.2.0",
36
+ "@atlaskit/ufo": "^2.0.0",
37
37
  "@babel/runtime": "^7.0.0",
38
38
  "@sentry/browser": "^6.18.2",
39
39
  "date-fns-tz": "^2.0.0",
@@ -46,7 +46,7 @@
46
46
  "react": "^18.2.0 || ^19.2.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@atlaskit/feature-gate-js-client": "^6.0.0",
49
+ "@atlaskit/feature-gate-js-client": "^7.0.0",
50
50
  "@atlassian/codegen": "^0.3.0",
51
51
  "@atlassian/ptc-test-utils": "^0.15.0",
52
52
  "@testing-library/react": "^16.3.0",
@@ -62,6 +62,9 @@
62
62
  "enable_edit_team_name_external_type_teams": {
63
63
  "type": "boolean"
64
64
  },
65
+ "ptc-enable-team-scoped-header-image-media-upload": {
66
+ "type": "boolean"
67
+ },
65
68
  "ptc-enable-team-type-permission-enabled": {
66
69
  "type": "boolean"
67
70
  },
@@ -22,7 +22,7 @@ export default md\`
22
22
 
23
23
  const signed_content = createSignedArtifact(
24
24
  content,
25
- 'yarn workspace @atlaskit/teams-client generate:docs:teams-client',
25
+ 'afm workspace @atlaskit/teams-client generate:docs:teams-client',
26
26
  );
27
27
 
28
28
  writeFileSync(filePath, signed_content);
package/ari/package.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "name": "@atlaskit/teams-client/ari",
3
- "main": "../dist/cjs/common/utils/ari.js",
4
- "module": "../dist/esm/common/utils/ari.js",
5
- "module:es2019": "../dist/es2019/common/utils/ari.js",
6
- "sideEffects": false,
7
- "types": "../dist/types/common/utils/ari.d.ts"
8
- }
@@ -1,47 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "isTeamARI", {
7
- enumerable: true,
8
- get: function get() {
9
- return _isTeamAri.isTeamARI;
10
- }
11
- });
12
- Object.defineProperty(exports, "isUserARI", {
13
- enumerable: true,
14
- get: function get() {
15
- return _isUserAri.isUserARI;
16
- }
17
- });
18
- Object.defineProperty(exports, "toTeamARI", {
19
- enumerable: true,
20
- get: function get() {
21
- return _toTeamAri.toTeamARI;
22
- }
23
- });
24
- Object.defineProperty(exports, "toTeamId", {
25
- enumerable: true,
26
- get: function get() {
27
- return _toTeamId.toTeamId;
28
- }
29
- });
30
- Object.defineProperty(exports, "toUserARI", {
31
- enumerable: true,
32
- get: function get() {
33
- return _toUserAri.toUserARI;
34
- }
35
- });
36
- Object.defineProperty(exports, "toUserId", {
37
- enumerable: true,
38
- get: function get() {
39
- return _toUserId.toUserId;
40
- }
41
- });
42
- var _isUserAri = require("./is-user-ari");
43
- var _toUserId = require("./to-user-id");
44
- var _toUserAri = require("./to-user-ari");
45
- var _isTeamAri = require("./is-team-ari");
46
- var _toTeamId = require("./to-team-id");
47
- var _toTeamAri = require("./to-team-ari");