@elaraai/e3-cloud-types 1.0.94 → 1.1.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/README.md CHANGED
@@ -5,8 +5,16 @@ shared by its clients (`@elaraai/e3-cloud-client`, the `e3-cloud` CLI and the
5
5
  web console).
6
6
 
7
7
  Every type is an East type (`StructType`, `VariantType`, …), sent as BEAST2,
8
- with its TypeScript type derived by `ValueTypeOf`. The version is the
9
- @elaraai lockstep it is built against, the same as east's and e3's.
8
+ with its TypeScript type derived by `ValueTypeOf`. Its version is e3 cloud's
9
+ own, shared by every `@elaraai/e3-cloud-*` package and independent of east's
10
+ and e3's; each release is built with one release of east and e3.
11
+
12
+ Every time is an East DateTime (`DateTimeType`, a `Date` in TypeScript), never
13
+ text: print one with east's `printFor(DateTimeType)` (`2026-11-02T08:01:52.123`,
14
+ in UTC) and order them with `compareFor(DateTimeType)`. Before 1.1.0 an
15
+ invitation's, a repository user's, a schedule's and Admin › Users' times were
16
+ ISO 8601 Strings: a client of 1.1.0 or later needs a platform of 1.1.0 or
17
+ later, and an older client an older platform.
10
18
 
11
19
  ## Installation
12
20
 
@@ -14,7 +22,9 @@ with its TypeScript type derived by `ValueTypeOf`. The version is the
14
22
  npm install @elaraai/e3-cloud-types
15
23
  ```
16
24
 
17
- Its peers are `@elaraai/east` and `@elaraai/e3-types` of the same lockstep.
25
+ Its peers are `@elaraai/east` and `@elaraai/e3-types` of the release it is
26
+ built with, which each version pins exactly (`npm view
27
+ @elaraai/e3-cloud-types peerDependencies` names them).
18
28
 
19
29
  ## Usage
20
30
 
@@ -51,7 +61,7 @@ const user: RepoUser = {
51
61
  name: some('Alice Smith'),
52
62
  role: variant('owner', null),
53
63
  addedBy: 'abc123-def456',
54
- addedAt: '2025-01-29T10:00:00Z',
64
+ addedAt: new Date(Date.UTC(2025, 0, 29, 10)),
55
65
  };
56
66
  ```
57
67
 
@@ -82,7 +92,7 @@ A user entry in a repository's ACL:
82
92
  - `name` - Optional display name (OptionType)
83
93
  - `role` - User's role on the repository (RepoRoleType)
84
94
  - `addedBy` - userId of who added this entry
85
- - `addedAt` - ISO 8601 timestamp
95
+ - `addedAt` - when they were added (a DateTime)
86
96
 
87
97
  `RepoInvitationType` is a person added who has not signed in yet: their email, the role they will get, and when they were invited.
88
98
 
@@ -109,7 +119,7 @@ A workspace schedule for recurring dataflow execution:
109
119
  - `enabled` - Whether schedule is active
110
120
  - `description` - Optional human-readable description (OptionType)
111
121
  - `createdBy` - userId who created the schedule
112
- - `createdAt` / `updatedAt` - ISO 8601 timestamps
122
+ - `createdAt` / `updatedAt` - when it was created and last changed (DateTimes)
113
123
  - `schedulerName` - the schedule's name with the deployment's scheduler
114
124
 
115
125
  ### ScheduleRequestType / ScheduleRequest
@@ -11,7 +11,7 @@
11
11
  * with no directory record yet is its own row (`status: invited`,
12
12
  * `sub: none`).
13
13
  */
14
- import { ArrayType, BooleanType, StructType, StringType, VariantType, NullType, OptionType, type ValueTypeOf } from '@elaraai/east';
14
+ import { ArrayType, BooleanType, DateTimeType, StructType, StringType, VariantType, NullType, OptionType, type ValueTypeOf } from '@elaraai/east';
15
15
  /** One repo membership shown on an admin user row. */
16
16
  export declare const AdminUserMembershipType: StructType<{
17
17
  readonly repo: StringType;
@@ -73,8 +73,8 @@ export declare const AdminUserType: StructType<{
73
73
  }>;
74
74
  }>>;
75
75
  readonly invitedBy: StringType;
76
- readonly invitedAt: StringType;
77
- readonly expiresAt: StringType;
76
+ readonly invitedAt: DateTimeType;
77
+ readonly expiresAt: DateTimeType;
78
78
  readonly status: VariantType<{
79
79
  readonly pending: NullType;
80
80
  readonly claimed: NullType;
@@ -87,15 +87,15 @@ export declare const AdminUserType: StructType<{
87
87
  readonly failed: NullType;
88
88
  }>;
89
89
  readonly detail: OptionType<StringType>;
90
- readonly at: StringType;
90
+ readonly at: DateTimeType;
91
91
  }>>;
92
92
  readonly claimedBy: OptionType<StringType>;
93
- readonly claimedAt: OptionType<StringType>;
93
+ readonly claimedAt: OptionType<DateTimeType>;
94
94
  }>>;
95
- /** ISO timestamp of the user's most recent authenticated request (sampled hourly) */
96
- readonly lastSeenAt: OptionType<StringType>;
97
- /** ISO timestamp the directory record was created */
98
- readonly createdAt: OptionType<StringType>;
95
+ /** When the user last made an authenticated request (sampled hourly) */
96
+ readonly lastSeenAt: OptionType<DateTimeType>;
97
+ /** When the directory record was created */
98
+ readonly createdAt: OptionType<DateTimeType>;
99
99
  }>;
100
100
  export type AdminUser = ValueTypeOf<typeof AdminUserType>;
101
101
  export declare const AdminUserListType: ArrayType<StructType<{
@@ -133,8 +133,8 @@ export declare const AdminUserListType: ArrayType<StructType<{
133
133
  }>;
134
134
  }>>;
135
135
  readonly invitedBy: StringType;
136
- readonly invitedAt: StringType;
137
- readonly expiresAt: StringType;
136
+ readonly invitedAt: DateTimeType;
137
+ readonly expiresAt: DateTimeType;
138
138
  readonly status: VariantType<{
139
139
  readonly pending: NullType;
140
140
  readonly claimed: NullType;
@@ -147,15 +147,15 @@ export declare const AdminUserListType: ArrayType<StructType<{
147
147
  readonly failed: NullType;
148
148
  }>;
149
149
  readonly detail: OptionType<StringType>;
150
- readonly at: StringType;
150
+ readonly at: DateTimeType;
151
151
  }>>;
152
152
  readonly claimedBy: OptionType<StringType>;
153
- readonly claimedAt: OptionType<StringType>;
153
+ readonly claimedAt: OptionType<DateTimeType>;
154
154
  }>>;
155
- /** ISO timestamp of the user's most recent authenticated request (sampled hourly) */
156
- readonly lastSeenAt: OptionType<StringType>;
157
- /** ISO timestamp the directory record was created */
158
- readonly createdAt: OptionType<StringType>;
155
+ /** When the user last made an authenticated request (sampled hourly) */
156
+ readonly lastSeenAt: OptionType<DateTimeType>;
157
+ /** When the directory record was created */
158
+ readonly createdAt: OptionType<DateTimeType>;
159
159
  }>>;
160
160
  export type AdminUserList = ValueTypeOf<typeof AdminUserListType>;
161
161
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"admin-user-types.d.ts","sourceRo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+BAA+B;;EAE/B,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,WAAW,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,cAAc;;;;IALzB,+BAA+B;;GAKkB,CAAC;AACpD,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,MAAM,CAAC"}
@@ -11,7 +11,7 @@
11
11
  * with no directory record yet is its own row (`status: invited`,
12
12
  * `sub: none`).
13
13
  */
14
- import { ArrayType, BooleanType, StructType, StringType, VariantType, NullType, OptionType, } from '@elaraai/east';
14
+ import { ArrayType, BooleanType, DateTimeType, StructType, StringType, VariantType, NullType, OptionType, } from '@elaraai/east';
15
15
  import { RepoRoleType } from './repo-role.js';
16
16
  import { InvitationType } from './invitation-types.js';
17
17
  /** One repo membership shown on an admin user row. */
@@ -45,10 +45,10 @@ export const AdminUserType = StructType({
45
45
  memberships: ArrayType(AdminUserMembershipType),
46
46
  /** The invitation for this email (any status), when one exists */
47
47
  invitation: OptionType(InvitationType),
48
- /** ISO timestamp of the user's most recent authenticated request (sampled hourly) */
49
- lastSeenAt: OptionType(StringType),
50
- /** ISO timestamp the directory record was created */
51
- createdAt: OptionType(StringType),
48
+ /** When the user last made an authenticated request (sampled hourly) */
49
+ lastSeenAt: OptionType(DateTimeType),
50
+ /** When the directory record was created */
51
+ createdAt: OptionType(DateTimeType),
52
52
  });
53
53
  export const AdminUserListType = ArrayType(AdminUserType);
54
54
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"admin-user-types.js","sourceRoot":"","sources":["../../src/admin-user-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;GAQG;AAEH,OAAO,EACL,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,UAAU,GAEX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,g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