@gitpod/gitpod-protocol 0.1.5-mp-remove-slow-server-proxy.0 → 0.1.5-mp-db-sync-remove-refs.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/src/protocol.ts CHANGED
@@ -153,12 +153,21 @@ export namespace User {
153
153
  user.additionalData.ideSettings = newIDESettings;
154
154
  }
155
155
 
156
+ // TODO: make it more explicit that these field names are relied for our tracking purposes
157
+ // and decouple frontend from relying on them - instead use user.additionalData.profile object directly in FE
156
158
  export function getProfile(user: User): Profile {
157
159
  return {
158
160
  name: User.getName(user!) || "",
159
161
  email: User.getPrimaryEmail(user!) || "",
160
162
  company: user?.additionalData?.profile?.companyName,
161
163
  avatarURL: user?.avatarUrl,
164
+ companyWebsite: user?.additionalData?.profile?.companyWebsite,
165
+ jobRole: user?.additionalData?.profile?.jobRole,
166
+ jobRoleOther: user?.additionalData?.profile?.jobRoleOther,
167
+ explorationReasons: user?.additionalData?.profile?.explorationReasons,
168
+ signupGoals: user?.additionalData?.profile?.signupGoals,
169
+ signupGoalsOther: user?.additionalData?.profile?.signupGoalsOther,
170
+ onboardedTimestamp: user?.additionalData?.profile?.onboardedTimestamp,
162
171
  };
163
172
  }
164
173
 
@@ -190,12 +199,21 @@ export namespace User {
190
199
  return AttributionId.create(user);
191
200
  }
192
201
 
202
+ // TODO: refactor where this is referenced so it's more clearly tied to just analytics-tracking
203
+ // Let other places rely on the ProfileDetails type since that's what we store
193
204
  // The actual Profile of a User
194
205
  export interface Profile {
195
206
  name: string;
196
207
  email: string;
197
208
  company?: string;
198
209
  avatarURL?: string;
210
+ companyWebsite?: string;
211
+ jobRole?: string;
212
+ jobRoleOther?: string;
213
+ explorationReasons?: string[];
214
+ signupGoals?: string[];
215
+ signupGoalsOther?: string;
216
+ onboardedTimestamp?: string;
199
217
  }
200
218
  export namespace Profile {
201
219
  export function hasChanges(before: Profile, after: Profile) {
@@ -203,7 +221,13 @@ export namespace User {
203
221
  before.name !== after.name ||
204
222
  before.email !== after.email ||
205
223
  before.company !== after.company ||
206
- before.avatarURL !== after.avatarURL
224
+ before.avatarURL !== after.avatarURL ||
225
+ before.companyWebsite !== after.companyWebsite ||
226
+ before.jobRole !== after.jobRole ||
227
+ before.jobRoleOther !== after.jobRoleOther ||
228
+ // not checking explorationReasons or signupGoals atm as it's an array - need to check deep equality
229
+ before.signupGoalsOther !== after.signupGoalsOther ||
230
+ before.onboardedTimestamp !== after.onboardedTimestamp
207
231
  );
208
232
  }
209
233
  }
@@ -254,6 +278,20 @@ export interface ProfileDetails {
254
278
  companyName?: string;
255
279
  // the user's email
256
280
  emailAddress?: string;
281
+ // the user's company website
282
+ companyWebsite?: string;
283
+ // type of role user has in their job
284
+ jobRole?: string;
285
+ // freeform entry for job role user works in (when jobRole is "other")
286
+ jobRoleOther?: string;
287
+ // Reasons user is exploring Gitpod when they signed up
288
+ explorationReasons?: string[];
289
+ // what user hopes to accomplish when they signed up
290
+ signupGoals?: string[];
291
+ // freeform entry for signup goals (when signupGoals is "other")
292
+ signupGoalsOther?: string;
293
+ // Set after a user completes the onboarding flow
294
+ onboardedTimestamp?: string;
257
295
  }
258
296
 
259
297
  export interface EmailNotificationSettings {
@@ -323,6 +361,8 @@ export namespace NamedWorkspaceFeatureFlag {
323
361
  }
324
362
  }
325
363
 
364
+ export type EnvVar = UserEnvVar | ProjectEnvVarWithValue | EnvVarWithValue;
365
+
326
366
  export interface EnvVarWithValue {
327
367
  name: string;
328
368
  value: string;
@@ -552,7 +592,7 @@ export interface GitpodToken {
552
592
  /** Created timestamp */
553
593
  created: string;
554
594
 
555
- // token is deleted on the database and about to be collected by db-sync
595
+ // token is deleted on the database and about to be collected by periodic deleter
556
596
  deleted?: boolean;
557
597
  }
558
598
 
@@ -703,7 +743,7 @@ export interface Workspace {
703
743
  shareable?: boolean;
704
744
  pinned?: boolean;
705
745
 
706
- // workspace is hard-deleted on the database and about to be collected by db-sync
746
+ // workspace is hard-deleted on the database and about to be collected by periodic deleter
707
747
  readonly deleted?: boolean;
708
748
 
709
749
  /**
@@ -1417,6 +1457,7 @@ export interface AuthProviderInfo {
1417
1457
  readonly authProviderType: string;
1418
1458
  readonly host: string;
1419
1459
  readonly ownerId?: string;
1460
+ readonly organizationId?: string;
1420
1461
  readonly verified: boolean;
1421
1462
  readonly isReadonly?: boolean;
1422
1463
  readonly hiddenOnDashboard?: boolean;
@@ -49,7 +49,7 @@ export interface WorkspaceInstance {
49
49
  // values here.
50
50
  configuration?: WorkspaceInstanceConfiguration;
51
51
 
52
- // instance is hard-deleted on the database and about to be collected by db-sync
52
+ // instance is hard-deleted on the database and about to be collected by periodic deleter
53
53
  readonly deleted?: boolean;
54
54
 
55
55
  /**