Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/base/common/defaultAccount.ts
5241 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
export interface IQuotaSnapshotData {
7
readonly entitlement: number;
8
readonly overage_count: number;
9
readonly overage_permitted: boolean;
10
readonly percent_remaining: number;
11
readonly remaining: number;
12
readonly unlimited: boolean;
13
}
14
15
export interface ILegacyQuotaSnapshotData {
16
readonly limited_user_quotas?: {
17
readonly chat: number;
18
readonly completions: number;
19
};
20
readonly monthly_quotas?: {
21
readonly chat: number;
22
readonly completions: number;
23
};
24
}
25
26
export interface IEntitlementsData extends ILegacyQuotaSnapshotData {
27
readonly access_type_sku: string;
28
readonly assigned_date: string;
29
readonly can_signup_for_limited: boolean;
30
readonly copilot_plan: string;
31
readonly organization_login_list: string[];
32
readonly analytics_tracking_id: string;
33
readonly limited_user_reset_date?: string; // for Copilot Free
34
readonly quota_reset_date?: string; // for all other Copilot SKUs
35
readonly quota_reset_date_utc?: string; // for all other Copilot SKUs (includes time)
36
readonly quota_snapshots?: {
37
chat?: IQuotaSnapshotData;
38
completions?: IQuotaSnapshotData;
39
premium_interactions?: IQuotaSnapshotData;
40
};
41
}
42
43
export interface IPolicyData {
44
readonly mcp?: boolean;
45
readonly chat_preview_features_enabled?: boolean;
46
readonly chat_agent_enabled?: boolean;
47
readonly mcpRegistryUrl?: string;
48
readonly mcpAccess?: 'allow_all' | 'registry_only';
49
}
50
51
export interface IDefaultAccountAuthenticationProvider {
52
readonly id: string;
53
readonly name: string;
54
readonly enterprise: boolean;
55
}
56
57
export interface IDefaultAccount {
58
readonly authenticationProvider: IDefaultAccountAuthenticationProvider;
59
readonly sessionId: string;
60
readonly enterprise: boolean;
61
readonly entitlementsData?: IEntitlementsData | null;
62
}
63
64