@todesktop/shared 7.189.22 → 7.189.23

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.
@@ -0,0 +1,24 @@
1
+ export type PatStatus = 'active' | 'revoked' | 'expired';
2
+ export type PatPermissionSource = 'owner' | 'delegate';
3
+ export interface PatAppScope {
4
+ ownerUserId: string;
5
+ applicationId: string;
6
+ permissionSource: PatPermissionSource;
7
+ }
8
+ export interface PatUsageApp {
9
+ ownerUserId: string;
10
+ applicationId: string;
11
+ }
12
+ export interface PatSummary {
13
+ tokenId: string;
14
+ tokenPrefix: string;
15
+ description: string;
16
+ createdAt: string | null;
17
+ expiresAt: string | null;
18
+ revokedAt: string | null;
19
+ lastUsedAt: string | null;
20
+ lastUsedByApp: PatUsageApp | null;
21
+ appScopes: PatAppScope[];
22
+ status: PatStatus;
23
+ }
24
+ export type PatListItem = PatSummary;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,6 @@
1
1
  import { BaseApp, Schemable } from './base';
2
2
  import { IAppBuilderLib } from './desktopify';
3
+ import { PatSummary } from './personalAccessTokens';
3
4
  export type IUploadFileStatus = 'error' | 'success' | 'done' | 'uploading' | 'removed';
4
5
  export interface IUploadFile {
5
6
  uid: string;
@@ -139,6 +140,7 @@ export interface IUser extends Schemable {
139
140
  stripeCustomerId?: string;
140
141
  isOldAccountThatNeedsNewPassword?: boolean;
141
142
  accessToken?: string;
143
+ cliAccessTokens?: PatSummary[];
142
144
  isAdmin?: boolean;
143
145
  isImpersonator?: boolean;
144
146
  featureFlags?: FeatureFlags;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todesktop/shared",
3
- "version": "7.189.22",
3
+ "version": "7.189.23",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -0,0 +1,29 @@
1
+ export type PatStatus = 'active' | 'revoked' | 'expired';
2
+
3
+ export type PatPermissionSource = 'owner' | 'delegate';
4
+
5
+ export interface PatAppScope {
6
+ ownerUserId: string;
7
+ applicationId: string;
8
+ permissionSource: PatPermissionSource;
9
+ }
10
+
11
+ export interface PatUsageApp {
12
+ ownerUserId: string;
13
+ applicationId: string;
14
+ }
15
+
16
+ export interface PatSummary {
17
+ tokenId: string;
18
+ tokenPrefix: string;
19
+ description: string;
20
+ createdAt: string | null;
21
+ expiresAt: string | null;
22
+ revokedAt: string | null;
23
+ lastUsedAt: string | null;
24
+ lastUsedByApp: PatUsageApp | null;
25
+ appScopes: PatAppScope[];
26
+ status: PatStatus;
27
+ }
28
+
29
+ export type PatListItem = PatSummary;
package/src/toDesktop.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { BaseApp, Schemable } from './base';
2
2
  import { IAppBuilderLib } from './desktopify';
3
+ import { PatSummary } from './personalAccessTokens';
3
4
 
4
5
  export type IUploadFileStatus =
5
6
  | 'error'
@@ -155,6 +156,7 @@ export interface IUser extends Schemable {
155
156
  stripeCustomerId?: string;
156
157
  isOldAccountThatNeedsNewPassword?: boolean;
157
158
  accessToken?: string;
159
+ cliAccessTokens?: PatSummary[];
158
160
  isAdmin?: boolean;
159
161
  isImpersonator?: boolean;
160
162
  featureFlags?: FeatureFlags;