@gitpod/gitpod-protocol 0.1.5-upgrade-code.5 → 0.1.5-vn-implement-jetbrains-terminals.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/data/builtin-theia-plugins.json +9 -9
- package/data/gitpod-schema.json +25 -24
- package/lib/accounting-protocol.d.ts +155 -0
- package/lib/accounting-protocol.d.ts.map +1 -0
- package/lib/accounting-protocol.js +109 -0
- package/lib/accounting-protocol.js.map +1 -0
- package/lib/admin-protocol.d.ts +31 -4
- package/lib/admin-protocol.d.ts.map +1 -1
- package/lib/admin-protocol.js +15 -0
- package/lib/admin-protocol.js.map +1 -1
- package/lib/analytics.d.ts +45 -0
- package/lib/analytics.d.ts.map +1 -0
- package/lib/analytics.js +10 -0
- package/lib/analytics.js.map +1 -0
- package/lib/auth.d.ts +25 -0
- package/lib/auth.d.ts.map +1 -0
- package/lib/auth.js +16 -0
- package/lib/auth.js.map +1 -0
- package/lib/context-url.d.ts +31 -0
- package/lib/context-url.d.ts.map +1 -0
- package/lib/context-url.js +102 -0
- package/lib/context-url.js.map +1 -0
- package/lib/context-url.spec.d.ts +14 -0
- package/lib/context-url.spec.d.ts.map +1 -0
- package/lib/context-url.spec.js +94 -0
- package/lib/context-url.spec.js.map +1 -0
- package/lib/email-protocol.d.ts +1 -2
- package/lib/email-protocol.d.ts.map +1 -1
- package/lib/email-protocol.js +4 -4
- package/lib/email-protocol.js.map +1 -1
- package/lib/encryption/container-module.js +5 -4
- package/lib/encryption/container-module.js.map +1 -1
- package/lib/encryption/encryption-engine.js +19 -20
- package/lib/encryption/encryption-engine.js.map +1 -1
- package/lib/encryption/encryption-engine.spec.js +29 -36
- package/lib/encryption/encryption-engine.spec.js.map +1 -1
- package/lib/encryption/encryption-service.js +29 -43
- package/lib/encryption/encryption-service.js.map +1 -1
- package/lib/encryption/key-provider.js +25 -30
- package/lib/encryption/key-provider.js.map +1 -1
- package/lib/env.d.ts +1 -2
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +20 -21
- package/lib/env.js.map +1 -1
- package/lib/gitpod-file-parser.js +25 -41
- package/lib/gitpod-file-parser.js.map +1 -1
- package/lib/gitpod-file-parser.spec.js +116 -116
- package/lib/gitpod-file-parser.spec.js.map +1 -1
- package/lib/gitpod-service.d.ts +162 -20
- package/lib/gitpod-service.d.ts.map +1 -1
- package/lib/gitpod-service.js +170 -256
- package/lib/gitpod-service.js.map +1 -1
- package/lib/headless-workspace-log.d.ts +8 -11
- package/lib/headless-workspace-log.d.ts.map +1 -1
- package/lib/headless-workspace-log.js +4 -7
- package/lib/headless-workspace-log.js.map +1 -1
- package/lib/ide-frontend-service.d.ts +4 -0
- package/lib/ide-frontend-service.d.ts.map +1 -1
- package/lib/ide-protocol.d.ts +105 -0
- package/lib/ide-protocol.d.ts.map +1 -0
- package/lib/ide-protocol.js +8 -0
- package/lib/ide-protocol.js.map +1 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -1
- package/lib/index.js.map +1 -1
- package/lib/installation-admin-protocol.d.ts +21 -0
- package/lib/installation-admin-protocol.d.ts.map +1 -0
- package/lib/installation-admin-protocol.js +30 -0
- package/lib/installation-admin-protocol.js.map +1 -0
- package/lib/messaging/browser/connection.d.ts +5 -3
- package/lib/messaging/browser/connection.d.ts.map +1 -1
- package/lib/messaging/browser/connection.js +183 -33
- package/lib/messaging/browser/connection.js.map +1 -1
- package/lib/messaging/browser/window-connection.js +35 -55
- package/lib/messaging/browser/window-connection.js.map +1 -1
- package/lib/messaging/client-call-metrics.d.ts +35 -0
- package/lib/messaging/client-call-metrics.d.ts.map +1 -0
- package/lib/messaging/client-call-metrics.js +83 -0
- package/lib/messaging/client-call-metrics.js.map +1 -0
- package/lib/messaging/error.d.ts +5 -1
- package/lib/messaging/error.d.ts.map +1 -1
- package/lib/messaging/error.js +10 -2
- package/lib/messaging/error.js.map +1 -1
- package/lib/messaging/handler.d.ts +10 -0
- package/lib/messaging/handler.d.ts.map +1 -1
- package/lib/messaging/node/connection.d.ts +1 -17
- package/lib/messaging/node/connection.d.ts.map +1 -1
- package/lib/messaging/node/connection.js +23 -59
- package/lib/messaging/node/connection.js.map +1 -1
- package/lib/messaging/proxy-factory.d.ts +2 -0
- package/lib/messaging/proxy-factory.d.ts.map +1 -1
- package/lib/messaging/proxy-factory.js +74 -159
- package/lib/messaging/proxy-factory.js.map +1 -1
- package/lib/oss-allowlist.d.ts +14 -0
- package/lib/oss-allowlist.d.ts.map +1 -0
- package/lib/oss-allowlist.js +8 -0
- package/lib/oss-allowlist.js.map +1 -0
- package/lib/payment-protocol.d.ts +18 -0
- package/lib/payment-protocol.d.ts.map +1 -0
- package/lib/payment-protocol.js +13 -0
- package/lib/payment-protocol.js.map +1 -0
- package/lib/permission.d.ts +5 -3
- package/lib/permission.d.ts.map +1 -1
- package/lib/permission.js +18 -17
- package/lib/permission.js.map +1 -1
- package/lib/plans.d.ts +210 -0
- package/lib/plans.d.ts.map +1 -0
- package/lib/plans.js +570 -0
- package/lib/plans.js.map +1 -0
- package/lib/protocol.d.ts +120 -58
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +116 -130
- package/lib/protocol.js.map +1 -1
- package/lib/snapshot-url.d.ts +14 -0
- package/lib/snapshot-url.d.ts.map +1 -0
- package/lib/snapshot-url.js +26 -0
- package/lib/snapshot-url.js.map +1 -0
- package/{src/util/without.ts → lib/snapshot-url.spec.d.ts} +2 -3
- package/lib/snapshot-url.spec.d.ts.map +1 -0
- package/lib/snapshot-url.spec.js +41 -0
- package/lib/snapshot-url.spec.js.map +1 -0
- package/lib/team-subscription-protocol.d.ts +73 -0
- package/lib/team-subscription-protocol.d.ts.map +1 -0
- package/lib/team-subscription-protocol.js +63 -0
- package/lib/team-subscription-protocol.js.map +1 -0
- package/lib/teams-projects-protocol.d.ts +113 -0
- package/lib/teams-projects-protocol.d.ts.map +1 -0
- package/lib/teams-projects-protocol.js +30 -0
- package/lib/teams-projects-protocol.js.map +1 -0
- package/lib/util/analytics.d.ts +8 -0
- package/lib/util/analytics.d.ts.map +1 -0
- package/lib/util/analytics.js +79 -0
- package/lib/util/analytics.js.map +1 -0
- package/lib/util/async-iterator.js +55 -133
- package/lib/util/async-iterator.js.map +1 -1
- package/lib/util/cancelable.js +17 -59
- package/lib/util/cancelable.js.map +1 -1
- package/lib/util/date-time.js +8 -8
- package/lib/util/date-time.js.map +1 -1
- package/lib/util/deferred.js +10 -12
- package/lib/util/deferred.js.map +1 -1
- package/lib/util/disposable.js +26 -39
- package/lib/util/disposable.js.map +1 -1
- package/lib/util/event.js +58 -74
- package/lib/util/event.js.map +1 -1
- package/lib/util/garbage-collected-cache.d.ts +1 -0
- package/lib/util/garbage-collected-cache.d.ts.map +1 -1
- package/lib/util/garbage-collected-cache.js +26 -46
- package/lib/util/garbage-collected-cache.js.map +1 -1
- package/lib/util/generate-workspace-id.d.ts +4 -0
- package/lib/util/generate-workspace-id.d.ts.map +1 -0
- package/lib/util/generate-workspace-id.js +487 -0
- package/lib/util/generate-workspace-id.js.map +1 -0
- package/lib/util/{without.d.ts → generate-workspace-id.spec.d.ts} +2 -2
- package/lib/util/generate-workspace-id.spec.d.ts.map +1 -0
- package/lib/util/generate-workspace-id.spec.js +87 -0
- package/lib/util/generate-workspace-id.spec.js.map +1 -0
- package/lib/util/gitpod-cookie.d.ts +20 -0
- package/lib/util/gitpod-cookie.d.ts.map +1 -0
- package/lib/util/gitpod-cookie.js +44 -0
- package/lib/util/gitpod-cookie.js.map +1 -0
- package/lib/util/gitpod-host-url.d.ts +1 -2
- package/lib/util/gitpod-host-url.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.js +96 -98
- package/lib/util/gitpod-host-url.js.map +1 -1
- package/lib/util/gitpod-host-url.spec.d.ts +8 -1
- package/lib/util/gitpod-host-url.spec.d.ts.map +1 -1
- package/lib/util/gitpod-host-url.spec.js +104 -22
- package/lib/util/gitpod-host-url.spec.js.map +1 -1
- package/lib/util/grpc.d.ts +15 -0
- package/lib/util/grpc.d.ts.map +1 -0
- package/lib/util/grpc.js +18 -0
- package/lib/util/grpc.js.map +1 -0
- package/lib/util/jaeger-client-types.d.ts +68 -0
- package/lib/util/jaeger-client-types.d.ts.map +1 -0
- package/lib/util/{without.js → jaeger-client-types.js} +1 -1
- package/lib/util/jaeger-client-types.js.map +1 -0
- package/lib/util/logging.d.ts +49 -33
- package/lib/util/logging.d.ts.map +1 -1
- package/lib/util/logging.js +107 -110
- package/lib/util/logging.js.map +1 -1
- package/lib/util/make-link.js +2 -2
- package/lib/util/make-link.js.map +1 -1
- package/lib/util/parse-workspace-id.d.ts +13 -3
- package/lib/util/parse-workspace-id.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.js +38 -8
- package/lib/util/parse-workspace-id.js.map +1 -1
- package/lib/util/parse-workspace-id.spec.d.ts +8 -0
- package/lib/util/parse-workspace-id.spec.d.ts.map +1 -1
- package/lib/util/parse-workspace-id.spec.js +127 -47
- package/lib/util/parse-workspace-id.spec.js.map +1 -1
- package/lib/util/queue.js +16 -55
- package/lib/util/queue.js.map +1 -1
- package/lib/util/queue.spec.js +144 -288
- package/lib/util/queue.spec.js.map +1 -1
- package/lib/util/repeat.d.ts +15 -0
- package/lib/util/repeat.d.ts.map +1 -0
- package/lib/util/repeat.js +55 -0
- package/lib/util/repeat.js.map +1 -0
- package/lib/util/semaphore.js +15 -46
- package/lib/util/semaphore.js.map +1 -1
- package/lib/util/skip-if.js +6 -6
- package/lib/util/skip-if.js.map +1 -1
- package/lib/util/timeutil.js +28 -16
- package/lib/util/timeutil.js.map +1 -1
- package/lib/util/timeutil.spec.js +21 -24
- package/lib/util/timeutil.spec.js.map +1 -1
- package/lib/util/tracing.d.ts +51 -5
- package/lib/util/tracing.d.ts.map +1 -1
- package/lib/util/tracing.js +197 -62
- package/lib/util/tracing.js.map +1 -1
- package/lib/util/tracing.spec.d.ts +7 -0
- package/lib/util/tracing.spec.d.ts.map +1 -0
- package/lib/util/tracing.spec.js +121 -0
- package/lib/util/tracing.spec.js.map +1 -0
- package/lib/util/workspace-port-authentication.js +3 -2
- package/lib/util/workspace-port-authentication.js.map +1 -1
- package/lib/workspace-cluster.d.ts +71 -0
- package/lib/workspace-cluster.d.ts.map +1 -0
- package/lib/workspace-cluster.js +16 -0
- package/lib/workspace-cluster.js.map +1 -0
- package/lib/workspace-instance.d.ts +26 -2
- package/lib/workspace-instance.d.ts.map +1 -1
- package/lib/wsready.d.ts +1 -1
- package/lib/wsready.js +2 -2
- package/package.json +33 -17
- package/pkg-yarn.lock +18 -9
- package/provenance-bundle.jsonl +2 -0
- package/src/accounting-protocol.ts +229 -0
- package/src/admin-protocol.ts +53 -5
- package/src/analytics.ts +54 -0
- package/src/auth.ts +27 -0
- package/src/context-url.spec.ts +53 -0
- package/src/context-url.ts +107 -0
- package/src/email-protocol.ts +2 -3
- package/src/env.ts +10 -10
- package/src/gitpod-service.ts +237 -38
- package/src/headless-workspace-log.ts +7 -11
- package/src/ide-frontend-service.ts +5 -1
- package/src/ide-protocol.ts +119 -0
- package/src/index.ts +7 -1
- package/src/installation-admin-protocol.ts +35 -0
- package/src/messaging/browser/connection.ts +195 -14
- package/src/messaging/client-call-metrics.ts +97 -0
- package/src/messaging/error.ts +14 -2
- package/src/messaging/handler.ts +12 -0
- package/src/messaging/node/connection.ts +21 -68
- package/src/messaging/proxy-factory.ts +14 -6
- package/src/oss-allowlist.ts +15 -0
- package/src/payment-protocol.ts +20 -0
- package/src/permission.ts +7 -6
- package/src/plans.ts +632 -0
- package/src/protocol.ts +194 -87
- package/src/snapshot-url.spec.ts +25 -0
- package/src/snapshot-url.ts +27 -0
- package/src/team-subscription-protocol.ts +113 -0
- package/src/teams-projects-protocol.ts +147 -0
- package/src/util/analytics.ts +87 -0
- package/src/util/deferred.ts +1 -1
- package/src/util/garbage-collected-cache.ts +9 -3
- package/src/util/generate-workspace-id.spec.ts +48 -0
- package/src/util/generate-workspace-id.ts +475 -0
- package/src/util/gitpod-cookie.ts +39 -0
- package/src/util/gitpod-host-url.spec.ts +30 -1
- package/src/util/gitpod-host-url.ts +23 -13
- package/src/util/grpc.ts +15 -0
- package/src/util/jaeger-client-types.ts +102 -0
- package/src/util/logging.ts +102 -38
- package/src/util/parse-workspace-id.spec.ts +45 -4
- package/src/util/parse-workspace-id.ts +38 -7
- package/src/util/queue.spec.ts +1 -1
- package/src/util/repeat.ts +45 -0
- package/src/util/semaphore.ts +2 -2
- package/src/util/skip-if.ts +1 -1
- package/src/util/timeutil.ts +4 -4
- package/src/util/tracing.spec.ts +83 -0
- package/src/util/tracing.ts +183 -17
- package/src/workspace-cluster.ts +91 -0
- package/src/workspace-instance.ts +51 -13
- package/src/wsready.ts +2 -2
- package/lib/messaging/connection-error-handler.d.ts +0 -27
- package/lib/messaging/connection-error-handler.d.ts.map +0 -1
- package/lib/messaging/connection-error-handler.js +0 -46
- package/lib/messaging/connection-error-handler.js.map +0 -1
- package/lib/util/repeater.d.ts +0 -22
- package/lib/util/repeater.d.ts.map +0 -1
- package/lib/util/repeater.js +0 -118
- package/lib/util/repeater.js.map +0 -1
- package/lib/util/safe-promise.d.ts +0 -11
- package/lib/util/safe-promise.d.ts.map +0 -1
- package/lib/util/safe-promise.js +0 -34
- package/lib/util/safe-promise.js.map +0 -1
- package/lib/util/without.d.ts.map +0 -1
- package/lib/util/without.js.map +0 -1
- package/src/messaging/connection-error-handler.ts +0 -62
- package/src/util/jaeger-client.d.ts +0 -105
- package/src/util/repeater.ts +0 -49
- package/src/util/safe-promise.ts +0 -26
package/lib/plans.d.ts
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2021 Gitpod GmbH. All rights reserved.
|
|
3
|
+
* Licensed under the GNU Affero General Public License (AGPL).
|
|
4
|
+
* See License-AGPL.txt in the project root for license information.
|
|
5
|
+
*/
|
|
6
|
+
export declare type Currency = 'USD' | 'EUR';
|
|
7
|
+
export declare namespace Currency {
|
|
8
|
+
const getAll: () => Currency[];
|
|
9
|
+
const getSymbol: (c: Currency) => "$" | "€";
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Different plans of the same type MAY have different prices ($/€, for example) but MUST have the same feature set.
|
|
13
|
+
*/
|
|
14
|
+
export declare type PlanType = 'free' | 'free-50' | 'free-open-source' | 'student' | 'basic' | 'personal' | 'professional' | 'professional-new';
|
|
15
|
+
export declare type HoursPerMonthType = number | 'unlimited';
|
|
16
|
+
export interface Plan {
|
|
17
|
+
chargebeeId: string;
|
|
18
|
+
githubId?: number;
|
|
19
|
+
githubPlanNumber?: number;
|
|
20
|
+
name: string;
|
|
21
|
+
currency: Currency;
|
|
22
|
+
/** In full currencies (Euro, US Dollar, ...) */
|
|
23
|
+
pricePerMonth: number;
|
|
24
|
+
hoursPerMonth: HoursPerMonthType;
|
|
25
|
+
type: PlanType;
|
|
26
|
+
team?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare namespace Plan {
|
|
29
|
+
const is: (o: any) => o is Plan;
|
|
30
|
+
}
|
|
31
|
+
export declare const MAX_PARALLEL_WORKSPACES = 16;
|
|
32
|
+
export interface Coupon {
|
|
33
|
+
id: string;
|
|
34
|
+
isGithubStudentCoupon?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare namespace Coupon {
|
|
37
|
+
const is: (o: any) => o is Coupon;
|
|
38
|
+
}
|
|
39
|
+
export declare namespace Coupons {
|
|
40
|
+
const INTERNAL_GITPOD_GHSP: Coupon;
|
|
41
|
+
const INTERNAL_GITPOD_GHSP_2: Coupon;
|
|
42
|
+
const GITHUBSTUDENTPACKFORFACULTY: Coupon;
|
|
43
|
+
const isGithubStudentCoupon: (id: string) => boolean | undefined;
|
|
44
|
+
const getAllCoupons: () => Coupon[];
|
|
45
|
+
}
|
|
46
|
+
export declare const ABSOLUTE_MAX_USAGE: number;
|
|
47
|
+
/**
|
|
48
|
+
* Version history:
|
|
49
|
+
* - v1:
|
|
50
|
+
* - Free
|
|
51
|
+
* - Basic
|
|
52
|
+
* - Professional
|
|
53
|
+
* - Team Professional
|
|
54
|
+
* - v2:
|
|
55
|
+
* - Free
|
|
56
|
+
* - Personal
|
|
57
|
+
* - Unlimited: rebranded professional with unlimited hours
|
|
58
|
+
* - Team Unlimited: rebranded professional with unlimited hours
|
|
59
|
+
* - dropped: Basic
|
|
60
|
+
* - v2.5:
|
|
61
|
+
* + Student Unlimited
|
|
62
|
+
* + Team Unlimited Student
|
|
63
|
+
* - V3:
|
|
64
|
+
* - Free: reduced to 50h (stays default, but not advertised directly anymore)
|
|
65
|
+
* - Personal (8/9)
|
|
66
|
+
* - Professional (23/25)
|
|
67
|
+
* - Unlimited (35/39)
|
|
68
|
+
* - v4:
|
|
69
|
+
* - Professional Open Source (free)
|
|
70
|
+
* - v5:
|
|
71
|
+
* - Unleashed: rebranded Unlimited
|
|
72
|
+
*/
|
|
73
|
+
export declare namespace Plans {
|
|
74
|
+
/**
|
|
75
|
+
* The old default plan (v1): 100h hours for public repos
|
|
76
|
+
*/
|
|
77
|
+
const FREE: Plan;
|
|
78
|
+
/**
|
|
79
|
+
* The new default plan (v3): 50h hours for public repos
|
|
80
|
+
*/
|
|
81
|
+
const FREE_50: Plan;
|
|
82
|
+
/**
|
|
83
|
+
* Users created after this date get the FREE_50 plan (v3) instead of the (old) FREE plan (v1)
|
|
84
|
+
*/
|
|
85
|
+
const FREE_50_START_DATE = "2019-12-19T00:00:00.000Z";
|
|
86
|
+
/**
|
|
87
|
+
* The 'Professional Open Source' plan was introduced to offer professional open-souce developers unlimited hours.
|
|
88
|
+
*/
|
|
89
|
+
const FREE_OPEN_SOURCE: Plan;
|
|
90
|
+
/**
|
|
91
|
+
* The 'Student Unleashed' plans were introduced to give students access to the highly-priced unlimited plans.
|
|
92
|
+
*/
|
|
93
|
+
const PROFESSIONAL_STUDENT_EUR: Plan;
|
|
94
|
+
/**
|
|
95
|
+
* The 'Student Unleashed' plans were introduced to give students access to the highly-priced unlimited plans.
|
|
96
|
+
*/
|
|
97
|
+
const PROFESSIONAL_STUDENT_USD: Plan;
|
|
98
|
+
/**
|
|
99
|
+
* The 'Student Unleashed' plans were introduced to give students access to the highly-priced unlimited plans.
|
|
100
|
+
*/
|
|
101
|
+
const TEAM_PROFESSIONAL_STUDENT_EUR: Plan;
|
|
102
|
+
/**
|
|
103
|
+
* The 'Student Unleashed' plans were introduced to give students access to the highly-priced unlimited plans.
|
|
104
|
+
*/
|
|
105
|
+
const TEAM_PROFESSIONAL_STUDENT_USD: Plan;
|
|
106
|
+
/**
|
|
107
|
+
* The 'basic' plan was the original differentiator between FREE and Professional (v1) but got discarded soon.
|
|
108
|
+
*/
|
|
109
|
+
const BASIC_EUR: Plan;
|
|
110
|
+
/**
|
|
111
|
+
* The 'basic' plan was the original differentiator between FREE and Professional (v1) but got discarded soon.
|
|
112
|
+
*/
|
|
113
|
+
const BASIC_USD: Plan;
|
|
114
|
+
/**
|
|
115
|
+
* The 'personal' plan was introduced to superseed the 'basic' plan (introduced with v2) to be more attractive to hobbyists.
|
|
116
|
+
*/
|
|
117
|
+
const PERSONAL_EUR: Plan;
|
|
118
|
+
/**
|
|
119
|
+
* The 'personal' plan was introduced to superseed the 'basic' plan (introduced with v2) to be more attractive to hobbyists.
|
|
120
|
+
*/
|
|
121
|
+
const PERSONAL_USD: Plan;
|
|
122
|
+
/**
|
|
123
|
+
* This is the 'new' Professional plan (v3), which is meant to fit well between Personal (9$/8€) on the left and
|
|
124
|
+
* Unleashed (39$/35€) on the right.
|
|
125
|
+
*/
|
|
126
|
+
const PROFESSIONAL_NEW_EUR: Plan;
|
|
127
|
+
/**
|
|
128
|
+
* This is the 'new' Professional plan (v3), which is meant to fit well between Personal (9$/8€) on the left and
|
|
129
|
+
* Unleashed (39$/35€) on the right.
|
|
130
|
+
*/
|
|
131
|
+
const PROFESSIONAL_NEW_USD: Plan;
|
|
132
|
+
/**
|
|
133
|
+
* This is the 'new' Team Professional plan (v3), which is meant to fit well between Personal (9$/8€) on the left and
|
|
134
|
+
* Unleashed (39$/35€) on the right.
|
|
135
|
+
*/
|
|
136
|
+
const TEAM_PROFESSIONAL_NEW_EUR: Plan;
|
|
137
|
+
/**
|
|
138
|
+
* This is the 'new' Team Professional plan (v3), which is meant to fit well between Personal (9$/8€) on the left and
|
|
139
|
+
* Unleashed (39$/35€) on the right.
|
|
140
|
+
*/
|
|
141
|
+
const TEAM_PROFESSIONAL_NEW_USD: Plan;
|
|
142
|
+
/**
|
|
143
|
+
* This is the 'Unleashed' plan (v1, rebranded v2, v5)
|
|
144
|
+
* It was originally introduced as 'Professional', and we cannot update the ids, so it stays that way in the code.
|
|
145
|
+
*/
|
|
146
|
+
const PROFESSIONAL_EUR: Plan;
|
|
147
|
+
/**
|
|
148
|
+
* This is the 'Unleashed' plan (v1, rebranded v2, v5)
|
|
149
|
+
* It was originally introduced as 'Professional', and we cannot update the ids, so it stays that way in the code.
|
|
150
|
+
*/
|
|
151
|
+
const PROFESSIONAL_USD: Plan;
|
|
152
|
+
/**
|
|
153
|
+
* This is the Team-'Unleashed' plan (v1, rebranded v2, v5)
|
|
154
|
+
* It was originally introduced as 'Professional', and we cannot update the ids, so it stays that way in the code.
|
|
155
|
+
*/
|
|
156
|
+
const TEAM_PROFESSIONAL_USD: Plan;
|
|
157
|
+
/**
|
|
158
|
+
* This is the Team-'Unleashed' plan (v1, rebranded v2, v5)
|
|
159
|
+
* It was originally introduced as 'Professional', and we cannot update the ids, so it stays that way in the code.
|
|
160
|
+
*/
|
|
161
|
+
const TEAM_PROFESSIONAL_EUR: Plan;
|
|
162
|
+
/**
|
|
163
|
+
* This function returns all individual plans that might be active (= we have subscriptions for) at the moment
|
|
164
|
+
*/
|
|
165
|
+
function getAvailablePlans(currency: Currency): Plan[];
|
|
166
|
+
const getAvailableTeamPlans: (currency?: Currency | undefined) => Plan[];
|
|
167
|
+
function getById(id: string | undefined): Plan | undefined;
|
|
168
|
+
function getByTypeAndCurrency(type: PlanType, currency: Currency): Plan | undefined;
|
|
169
|
+
function getProPlan(currency: Currency): Plan;
|
|
170
|
+
function getNewProPlan(currency: Currency): Plan;
|
|
171
|
+
function getStudentProPlan(currency: Currency): Plan;
|
|
172
|
+
function getBasicPlan(currency: Currency): Plan;
|
|
173
|
+
function getPersonalPlan(currency: Currency): Plan;
|
|
174
|
+
function getFreePlan(userCreationDate: string): Plan;
|
|
175
|
+
function isFreePlan(chargebeeId: string | undefined): boolean;
|
|
176
|
+
function isFreeNonTransientPlan(chargebeeId: string | undefined): boolean;
|
|
177
|
+
function getHoursPerMonth(plan: Plan): number;
|
|
178
|
+
/**
|
|
179
|
+
* Returns the maximum number of parallel workspaces for the given plan
|
|
180
|
+
* @param plan
|
|
181
|
+
*/
|
|
182
|
+
function getParallelWorkspacesById(planId: string | undefined): number;
|
|
183
|
+
/**
|
|
184
|
+
* Returns the maximum number of parallel workspaces for the given plan
|
|
185
|
+
* @param plan
|
|
186
|
+
*/
|
|
187
|
+
function getParallelWorkspaces(plan: Plan | undefined): number;
|
|
188
|
+
/**
|
|
189
|
+
* Returns the preferred plan type with the next higher arity
|
|
190
|
+
* @param type
|
|
191
|
+
*/
|
|
192
|
+
function getNextHigherPlanType(type: PlanType): PlanType;
|
|
193
|
+
/**
|
|
194
|
+
* This imposes a partial order on the plan types
|
|
195
|
+
* @param planTypeA
|
|
196
|
+
* @param planTypeB
|
|
197
|
+
*/
|
|
198
|
+
function compareTypes(planTypeA: PlanType, planTypeB: PlanType): 0 | 1 | -1;
|
|
199
|
+
function subscriptionChange(fromType: PlanType, toType: PlanType): "upgrade" | "downgrade" | "none";
|
|
200
|
+
interface Feature {
|
|
201
|
+
title: string;
|
|
202
|
+
emph?: boolean;
|
|
203
|
+
link?: string;
|
|
204
|
+
tooltip?: string;
|
|
205
|
+
}
|
|
206
|
+
namespace Feature {
|
|
207
|
+
const getFeaturesFor: (p: Plan) => Feature[];
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
//# sourceMappingURL=plans.d.ts.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