@atlaskit/share 3.2.4 → 3.3.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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/share
2
2
 
3
+ ## 3.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`3f35716fe41`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3f35716fe41) - [ux] changed share dialogue button to 'share' from 'send'
8
+
9
+ ## 3.2.6
10
+
11
+ ### Patch Changes
12
+
13
+ - [`c58555a28e7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c58555a28e7) - Make the share component a functional component to work with storybook
14
+
15
+ ## 3.2.5
16
+
17
+ ### Patch Changes
18
+
19
+ - [`0a61837e1ff`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0a61837e1ff) - Bump patch version of smart-user-picker to support right context key for org ID
20
+
3
21
  ## 3.2.4
4
22
 
5
23
  ### Patch Changes
@@ -195,7 +195,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
195
195
  var buttonAppearance = !shouldShowWarning ? 'primary' : 'warning';
196
196
  var tabMode = integrationMode === 'tabs';
197
197
  var formPublicLabel = tabMode ? _i18n.messages.formSharePublic : _i18n.messages.formSendPublic;
198
- var formSendLabel = tabMode ? _i18n.messages.formShare : _i18n.messages.formSend;
198
+ var formSendLabel = _i18n.messages.formShare;
199
199
  var sendLabel = isPublicLink ? formPublicLabel : formSendLabel;
200
200
  var buttonLabel = shareError ? _i18n.messages.formRetry : sendLabel;
201
201
  var ButtonLabelWrapper = buttonAppearance === 'warning' ? 'strong' : _react.default.Fragment;
@@ -19,7 +19,7 @@ var buildAttributes = function buildAttributes() {
19
19
  var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
20
20
  return _objectSpread({
21
21
  packageName: "@atlaskit/share",
22
- packageVersion: "3.2.4"
22
+ packageVersion: "3.3.0"
23
23
  }, attributes);
24
24
  };
25
25
 
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "3.2.4"
3
+ "version": "3.3.0"
4
4
  }
@@ -147,7 +147,7 @@ class InternalForm extends React.PureComponent {
147
147
  const buttonAppearance = !shouldShowWarning ? 'primary' : 'warning';
148
148
  const tabMode = integrationMode === 'tabs';
149
149
  const formPublicLabel = tabMode ? messages.formSharePublic : messages.formSendPublic;
150
- const formSendLabel = tabMode ? messages.formShare : messages.formSend;
150
+ const formSendLabel = messages.formShare;
151
151
  const sendLabel = isPublicLink ? formPublicLabel : formSendLabel;
152
152
  const buttonLabel = shareError ? messages.formRetry : sendLabel;
153
153
  const ButtonLabelWrapper = buttonAppearance === 'warning' ? 'strong' : React.Fragment;
@@ -2,7 +2,7 @@ import { isEmail, isTeam, isUser } from '@atlaskit/smart-user-picker';
2
2
 
3
3
  const buildAttributes = (attributes = {}) => ({
4
4
  packageName: "@atlaskit/share",
5
- packageVersion: "3.2.4",
5
+ packageVersion: "3.3.0",
6
6
  ...attributes
7
7
  });
8
8
 
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "3.2.4"
3
+ "version": "3.3.0"
4
4
  }
@@ -1,7 +1,7 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
5
5
  export var AtlassianUrlShortenerClient = /*#__PURE__*/function () {
6
6
  function AtlassianUrlShortenerClient() {
7
7
  _classCallCheck(this, AtlassianUrlShortenerClient);
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _extends from "@babel/runtime/helpers/extends";
3
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
3
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
@@ -8,6 +7,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
8
7
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
9
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
10
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
11
11
 
12
12
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
13
13
 
@@ -145,7 +145,7 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
145
145
  var buttonAppearance = !shouldShowWarning ? 'primary' : 'warning';
146
146
  var tabMode = integrationMode === 'tabs';
147
147
  var formPublicLabel = tabMode ? messages.formSharePublic : messages.formSendPublic;
148
- var formSendLabel = tabMode ? messages.formShare : messages.formSend;
148
+ var formSendLabel = messages.formShare;
149
149
  var sendLabel = isPublicLink ? formPublicLabel : formSendLabel;
150
150
  var buttonLabel = shareError ? messages.formRetry : sendLabel;
151
151
  var ButtonLabelWrapper = buttonAppearance === 'warning' ? 'strong' : React.Fragment;
@@ -10,7 +10,7 @@ var buildAttributes = function buildAttributes() {
10
10
  var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
11
11
  return _objectSpread({
12
12
  packageName: "@atlaskit/share",
13
- packageVersion: "3.2.4"
13
+ packageVersion: "3.3.0"
14
14
  }, attributes);
15
15
  };
16
16
 
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "3.2.4"
3
+ "version": "3.3.0"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "3.2.4",
3
+ "version": "3.3.0",
4
4
  "description": "Fabric Share Element",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -37,7 +37,7 @@
37
37
  "@atlaskit/icon": "^21.10.0",
38
38
  "@atlaskit/popup": "^1.3.0",
39
39
  "@atlaskit/portal": "^4.0.0",
40
- "@atlaskit/smart-user-picker": "^5.1.0",
40
+ "@atlaskit/smart-user-picker": "^5.1.2",
41
41
  "@atlaskit/spinner": "^15.1.4",
42
42
  "@atlaskit/tabs": "^13.2.3",
43
43
  "@atlaskit/textarea": "^4.3.0",
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/tokens": "^0.10.0",
46
46
  "@atlaskit/tooltip": "^17.5.0",
47
47
  "@atlaskit/ufo": "^0.1.0",
48
- "@atlaskit/user-picker": "^9.1.0",
48
+ "@atlaskit/user-picker": "^9.3.0",
49
49
  "@atlaskit/util-service-support": "^6.1.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "fast-deep-equal": "^3.1.1",
@@ -60,12 +60,12 @@
60
60
  },
61
61
  "devDependencies": {
62
62
  "@atlaskit/docs": "^9.0.0",
63
- "@atlaskit/editor-test-helpers": "^17.0.0",
64
- "@atlaskit/flag": "^14.5.0",
63
+ "@atlaskit/editor-test-helpers": "^17.1.0",
64
+ "@atlaskit/flag": "^14.6.0",
65
65
  "@atlaskit/section-message": "^6.0.0",
66
- "@atlaskit/select": "^15.3.0",
66
+ "@atlaskit/select": "^15.4.0",
67
67
  "@atlaskit/toggle": "^12.4.0",
68
- "@atlaskit/util-data-test": "^17.3.0",
68
+ "@atlaskit/util-data-test": "^17.5.0",
69
69
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
70
70
  "enzyme": "^3.10.0",
71
71
  "enzyme-adapter-react-16": "^1.15.1",
package/report.api.md ADDED
@@ -0,0 +1,420 @@
1
+ ## API Report File for "@atlaskit/share"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+ /// <reference types="react" />
7
+
8
+ import type { Appearance } from '@atlaskit/button/types';
9
+ import type { IconProps } from '@atlaskit/icon';
10
+ import type { LoadOptions } from '@atlaskit/smart-user-picker';
11
+ import { OptionData } from '@atlaskit/smart-user-picker';
12
+ import type { Placement } from '@atlaskit/popper';
13
+ import { default as React_2 } from 'react';
14
+ import type { TriggerProps } from '@atlaskit/popup';
15
+ import type { Value } from '@atlaskit/smart-user-picker';
16
+ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
17
+
18
+ export declare const ADMIN_NOTIFIED = 'admin-notified';
19
+
20
+ declare type Comment_2 = {
21
+ format: 'plain_text' | 'adf';
22
+ value: string;
23
+ };
24
+ export { Comment_2 as Comment };
25
+
26
+ export declare type ConfigResponse = {
27
+ disableSharingToEmails?: boolean;
28
+ };
29
+
30
+ export declare type Content = {
31
+ ari: string;
32
+ link: string;
33
+ title: string;
34
+ type: string;
35
+ };
36
+
37
+ export declare type DialogContentState = {
38
+ users: OptionData[];
39
+ comment: Comment_2;
40
+ };
41
+
42
+ export declare type DialogPlacement = Placement;
43
+
44
+ export declare type Flag = {
45
+ appearance: 'success';
46
+ title: MessageDescriptor;
47
+ type: FlagType;
48
+ };
49
+
50
+ export declare type FlagType = 'object-shared' | 'admin-notified';
51
+
52
+ export declare type FormChildrenArgs<T> = {
53
+ formProps: React.DetailedHTMLProps<
54
+ React.FormHTMLAttributes<HTMLFormElement>,
55
+ HTMLFormElement
56
+ >;
57
+ getValues: () => T;
58
+ };
59
+
60
+ declare type Integration = {
61
+ type: string;
62
+ Icon: React.ComponentType;
63
+ Content: React.ComponentType<IntegrationContentProps>;
64
+ };
65
+
66
+ declare type IntegrationContentProps = {
67
+ onClose: () => void;
68
+ changeTab?: (index: TabType) => void;
69
+ };
70
+
71
+ declare type IntegrationMode = 'tabs' | 'split' | 'off';
72
+
73
+ export declare type KeysOfType<T, TProp> = {
74
+ [P in keyof T]: T[P] extends TProp ? P : never;
75
+ }[keyof T];
76
+
77
+ export declare type MessageDescriptor = {
78
+ id: string;
79
+ description: string;
80
+ defaultMessage: string;
81
+ };
82
+
83
+ export declare type MetaData = {
84
+ productId: string;
85
+ atlOriginId: string;
86
+ shareeAction?: 'view' | 'edit';
87
+ };
88
+
89
+ export declare const OBJECT_SHARED = 'object-shared';
90
+
91
+ export declare type OriginAnalyticAttributes = {
92
+ hasGeneratedId: boolean;
93
+ };
94
+
95
+ export declare type OriginTracing = {
96
+ id: string;
97
+ addToUrl: (link: string) => string;
98
+ toAnalyticsAttributes: (
99
+ attrs: OriginAnalyticAttributes,
100
+ ) => OriginTracingWithIdGenerated | OriginTracingForSubSequentEvents;
101
+ };
102
+
103
+ export declare type OriginTracingFactory = () => OriginTracing;
104
+
105
+ export declare type OriginTracingForSubSequentEvents = {
106
+ originId: string;
107
+ originProduct: string;
108
+ };
109
+
110
+ export declare type OriginTracingWithIdGenerated = {
111
+ originIdGenerated: string;
112
+ originProduct: string;
113
+ };
114
+
115
+ /** Product ID (Canonical ID) in ARI of the share request */
116
+ export declare type ProductId =
117
+ | 'bitbucket'
118
+ | 'confluence'
119
+ | 'jira-addon'
120
+ | 'jira-core'
121
+ | 'jira-platform'
122
+ | 'jira-polaris'
123
+ | 'jira-portfolio'
124
+ | 'jira-servicedesk'
125
+ | 'jira-software'
126
+ | 'jira-unknown'
127
+ | 'trello';
128
+
129
+ export declare type ProductName = 'jira' | 'confluence';
130
+
131
+ export declare type RenderCustomTriggerButton = (
132
+ args: {
133
+ error?: ShareError;
134
+ isDisabled?: boolean;
135
+ isSelected?: boolean;
136
+ onClick: () => void;
137
+ },
138
+ triggerProps: TriggerProps,
139
+ ) => React.ReactNode;
140
+
141
+ export declare type ShareButtonStyle =
142
+ | 'icon-only'
143
+ | 'icon-with-text'
144
+ | 'text-only';
145
+
146
+ declare interface ShareClient {
147
+ share(
148
+ content: Content,
149
+ recipients: User[],
150
+ metadata: MetaData,
151
+ comment?: Comment_2,
152
+ ): Promise<ShareResponse>;
153
+ getConfig(cloudId: string): Promise<ConfigResponse>;
154
+ }
155
+
156
+ export declare type ShareContentState = {
157
+ users: User[];
158
+ comment?: Comment_2;
159
+ };
160
+
161
+ export declare const ShareDialogContainer: React_2.ForwardRefExoticComponent<
162
+ Pick<
163
+ Omit<
164
+ WithAnalyticsEventsProps & ShareDialogContainerProps,
165
+ keyof WithAnalyticsEventsProps
166
+ >,
167
+ | 'onTriggerButtonClick'
168
+ | 'isAutoOpenDialog'
169
+ | 'shouldCloseOnEscapePress'
170
+ | 'dialogPlacement'
171
+ | 'loadUserOptions'
172
+ | 'onDialogOpen'
173
+ | 'onDialogClose'
174
+ | 'onUserSelectionChange'
175
+ | 'renderCustomTriggerButton'
176
+ | 'shareContentType'
177
+ | 'shareFormTitle'
178
+ | 'shareFormHelperMessage'
179
+ | 'showFlags'
180
+ | 'loggedInAccountId'
181
+ | 'triggerButtonAppearance'
182
+ | 'triggerButtonIcon'
183
+ | 'triggerButtonStyle'
184
+ | 'triggerButtonTooltipPosition'
185
+ | 'triggerButtonTooltipText'
186
+ | 'cloudId'
187
+ | 'bottomMessage'
188
+ | 'customFooter'
189
+ | 'isCopyDisabled'
190
+ | 'isPublicLink'
191
+ | 'integrationMode'
192
+ | 'shareFieldsFooter'
193
+ | 'shareIntegrations'
194
+ | 'shareAri'
195
+ | 'tabIndex'
196
+ | 'copyTooltipText'
197
+ | 'dialogZIndex'
198
+ | 'orgId'
199
+ | 'shareClient'
200
+ | 'urlShortenerClient'
201
+ | 'shortLinkData'
202
+ | 'formatCopyLink'
203
+ | 'originTracingFactory'
204
+ | 'productId'
205
+ | 'shareLink'
206
+ | 'shareTitle'
207
+ | 'useUrlShortener'
208
+ > &
209
+ Partial<
210
+ Pick<
211
+ Omit<
212
+ WithAnalyticsEventsProps & ShareDialogContainerProps,
213
+ keyof WithAnalyticsEventsProps
214
+ >,
215
+ 'enableSmartUserPicker' | 'product' | 'shareeAction'
216
+ >
217
+ > &
218
+ Partial<
219
+ Pick<
220
+ {
221
+ enableSmartUserPicker: boolean;
222
+ shareeAction: 'view' | 'edit';
223
+ product: string;
224
+ },
225
+ never
226
+ >
227
+ > &
228
+ React_2.RefAttributes<any>
229
+ >;
230
+
231
+ export declare type ShareDialogContainerProps = {
232
+ onTriggerButtonClick?: () => void;
233
+ onDialogOpen?: () => void;
234
+ onDialogClose?: () => void;
235
+ isAutoOpenDialog?: boolean;
236
+ /** Share service client implementation that gets share configs and performs share.
237
+ * Optional, a default one is provided. */
238
+ shareClient?: ShareClient;
239
+ /** URL Shortener service client implementation that may shorten links for copy.
240
+ * Optional, a default one is provided. */
241
+ urlShortenerClient?: UrlShortenerClient;
242
+ /** Data provided to the `urlShortenerClient` to shorten the shared URL.
243
+ * If it is not provided, the link will not be shortened.
244
+ * If link shortening fails, the full URL will be shared instead. */
245
+ shortLinkData?: ShortenRequest;
246
+ /** Cloud ID of the instance.
247
+ * Note: we assume this props is stable. */
248
+ cloudId: string;
249
+ /** Organisation ID of the instance. */
250
+ orgId?: string;
251
+ /** Placement of the modal to the trigger button. */
252
+ dialogPlacement?: DialogPlacement;
253
+ /**
254
+ * Z-index that the popup should be displayed in.
255
+ * This is passed to the portal component.
256
+ * Defaults to `layers.modal()` from `@atlaskit/theme`.
257
+ */
258
+ dialogZIndex?: number;
259
+ /** Transform function to provide custom formatted copy link.
260
+ * Optional, a default one is provided. */
261
+ formatCopyLink?: (origin: OriginTracing, link: string) => string;
262
+ /** Function used to load users options asynchronously. Not needed if smart user picker is enabled. */
263
+ loadUserOptions?: LoadOptions;
264
+ /** Factory function to generate new Origin Tracing instance. */
265
+ originTracingFactory: OriginTracingFactory;
266
+ /** Product ID (Canonical ID) in ARI of the share request.
267
+ * Note: we assume this props is stable. */
268
+ productId: ProductId;
269
+ /** Render function for a custom Share Dialog Trigger Button. */
270
+ renderCustomTriggerButton?: RenderCustomTriggerButton;
271
+ /** Atlassian Resource Identifier of a Site resource to be shared. */
272
+ shareAri: string;
273
+ /** Content Type of the resource to be shared. It will also affect on the successful share message in the flag. A pre-defined list as follows:*/
274
+ /** blogpost */
275
+ /** board */
276
+ /** calendar */
277
+ /** draft */
278
+ /** filter */
279
+ /** issue */
280
+ /** media */
281
+ /** page */
282
+ /** project */
283
+ /** pullrequest */
284
+ /** question */
285
+ /** report */
286
+ /** repository */
287
+ /** request */
288
+ /** roadmap */
289
+ /** site */
290
+ /** space */
291
+ /** Any other unlisted type will have a default message of "Link shared". */
292
+ shareContentType: string;
293
+ /** Link of the resource to be shared (should NOT includes origin tracing).
294
+ * Optional, the current page URL is used by default. */
295
+ shareLink?: string;
296
+ /** Title of the resource to be shared that will be sent in notifications. */
297
+ shareTitle: string;
298
+ /** Title of the share modal. */
299
+ shareFormTitle?: React.ReactNode;
300
+ /** Copy for helper message to be displayed under share form input box. */
301
+ shareFormHelperMessage?: string;
302
+ /** To enable closing the modal on escape key press. */
303
+ shouldCloseOnEscapePress?: boolean;
304
+ /**
305
+ * Callback function for showing successful share flag(s) with a parameter providing details of the flag, including the type of the message with a localized default title
306
+ * This package has an opinion on showing flag(s) upon successful share, and Flag system is NOT provided. Instead, showFlag prop is available for this purpose.
307
+ */
308
+ showFlags: (flags: Array<Flag>) => void;
309
+ /**
310
+ * Power the user picker with smarts. To enable smart user picker, the following props are used:
311
+ * - `product`: 'jira' or 'confluence'
312
+ * - `loggedInAccountId`: if not provided, defaults to obtaining from request context
313
+ * - `cloudId`
314
+ */
315
+ enableSmartUserPicker?: boolean;
316
+ /**
317
+ * The userId of the sharer. If not provided, smart user picker
318
+ * defaults it to the value 'Context'
319
+ * which will tell the recommendation service to extract the
320
+ * value from the request context.
321
+ */
322
+ loggedInAccountId?: string;
323
+ /** Appearance of the share modal trigger button */
324
+ triggerButtonAppearance?: Appearance;
325
+ /** Share button Icon */
326
+ triggerButtonIcon?: React.ComponentType<IconProps>;
327
+ /** Style of the share modal trigger button. */
328
+ triggerButtonStyle?: ShareButtonStyle;
329
+ /** Position of the tooltip on share modal trigger button. */
330
+ triggerButtonTooltipPosition?: TooltipPosition;
331
+ /** Custom text of the tooltip on share modal trigger button. */
332
+ triggerButtonTooltipText?: React.ReactNode;
333
+ /** Message to be appended to the modal. */
334
+ bottomMessage?: React.ReactNode;
335
+ /** @deprecated Use the `shortLinkData` prop instead.
336
+ *
337
+ * Whether we should use the Atlassian Url Shortener or not.
338
+ * Note that all products may not be supported. */
339
+ useUrlShortener?: boolean;
340
+ /** Action that will be performed by the recipient when he/she receives the notification. */
341
+ shareeAction?: 'view' | 'edit';
342
+ /**
343
+ * Optional, this prop can be `jira` or `confluence`. Default value is `confluence`.
344
+ * We use this prop to control different text messages in UI.
345
+ */
346
+ product?: ProductName;
347
+ /**
348
+ * Footer for the share dialog.
349
+ */
350
+ customFooter?: React.ReactNode;
351
+ onUserSelectionChange?: (value: Value) => void;
352
+ shareFieldsFooter?: React.ReactNode;
353
+ isCopyDisabled?: boolean;
354
+ isPublicLink?: boolean;
355
+ integrationMode?: IntegrationMode;
356
+ shareIntegrations?: Array<Integration>;
357
+ /**
358
+ * Optionally sets a tabIndex value if you need to set focus
359
+ */
360
+ tabIndex?: number;
361
+ copyTooltipText?: string;
362
+ };
363
+
364
+ export declare type ShareError = {
365
+ message: string;
366
+ };
367
+
368
+ export declare type ShareRequest = (
369
+ content: Content,
370
+ recipients: User[],
371
+ metadata: MetaData,
372
+ comment?: Comment_2,
373
+ ) => Promise<ShareResponse>;
374
+
375
+ export declare type ShareResponse = {
376
+ shareRequestId: string;
377
+ };
378
+
379
+ declare interface ShortenRequest {
380
+ cloudId?: string;
381
+ product: string;
382
+ type: string;
383
+ params: Record<string, string>;
384
+ query?: string;
385
+ }
386
+
387
+ declare interface ShortenResponse {
388
+ shortUrl: string;
389
+ }
390
+
391
+ declare enum TabType {
392
+ default = 0,
393
+ Slack = 1,
394
+ }
395
+
396
+ export declare type TooltipPosition =
397
+ | 'top'
398
+ | 'right'
399
+ | 'bottom'
400
+ | 'left'
401
+ | 'mouse';
402
+
403
+ declare interface UrlShortenerClient {
404
+ shorten(data: ShortenRequest): Promise<ShortenResponse>;
405
+ }
406
+
407
+ export declare type User = UserWithId | UserWithEmail;
408
+
409
+ export declare type UserWithEmail = {
410
+ type: 'user';
411
+ email: string;
412
+ };
413
+
414
+ export declare type UserWithId = {
415
+ type: 'user' | 'group' | 'team';
416
+ id: string;
417
+ };
418
+
419
+ export {};
420
+ ```