@api-client/core 0.12.11 → 0.12.13

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.
@@ -4,6 +4,7 @@ import { Person } from '@pawel-up/data-mock/Person.js';
4
4
  import { Internet } from '@pawel-up/data-mock/Internet.js';
5
5
  import { Random } from '@pawel-up/data-mock/Random.js';
6
6
  import { IUser } from '../../models/store/User.js';
7
+ import { Time } from '@pawel-up/data-mock/Time.js';
7
8
  export interface IUserInit {
8
9
  noEmail?: boolean;
9
10
  noPicture?: boolean;
@@ -14,6 +15,7 @@ export declare class User {
14
15
  types: Types;
15
16
  internet: Internet;
16
17
  random: Random;
18
+ time: Time;
17
19
  constructor(init?: IDataMockInit);
18
20
  user(init?: IUserInit): IUser;
19
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../../src/mocking/lib/User.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AACtD,OAAO,EAAE,KAAK,EAAoB,MAAM,4BAA4B,CAAA;AAEpE,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,qBAAa,IAAI;IACf,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,KAAK,CAAA;IACZ,QAAQ,EAAE,QAAQ,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;gBAEF,IAAI,GAAE,aAAkB;IAOpC,IAAI,CAAC,IAAI,GAAE,SAAc,GAAG,KAAK;CA2BlC"}
1
+ {"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../../src/mocking/lib/User.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AACtD,OAAO,EAAE,KAAK,EAAoB,MAAM,4BAA4B,CAAA;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAElD,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,qBAAa,IAAI;IACf,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,KAAK,CAAA;IACZ,QAAQ,EAAE,QAAQ,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,IAAI,CAAA;gBAEE,IAAI,GAAE,aAAkB;IAQpC,IAAI,CAAC,IAAI,GAAE,SAAc,GAAG,KAAK;CA8BlC"}
@@ -3,16 +3,19 @@ import { Person } from '@pawel-up/data-mock/Person.js';
3
3
  import { Internet } from '@pawel-up/data-mock/Internet.js';
4
4
  import { Random } from '@pawel-up/data-mock/Random.js';
5
5
  import { Kind as UserKind } from '../../models/store/User.js';
6
+ import { Time } from '@pawel-up/data-mock/Time.js';
6
7
  export class User {
7
8
  person;
8
9
  types;
9
10
  internet;
10
11
  random;
12
+ time;
11
13
  constructor(init = {}) {
12
14
  this.person = new Person(init);
13
15
  this.types = new Types(init.seed);
14
16
  this.internet = new Internet(init);
15
17
  this.random = new Random(init.seed);
18
+ this.time = new Time(init);
16
19
  }
17
20
  user(init = {}) {
18
21
  const result = {
@@ -20,6 +23,9 @@ export class User {
20
23
  key: this.types.string(21),
21
24
  name: this.person.name(),
22
25
  status: this.random.pickOne(['active', 'deleted', 'suspended', 'pending']),
26
+ email: [],
27
+ created: this.time.timestamp(),
28
+ updated: this.time.timestamp(),
23
29
  };
24
30
  if (!init.noEmail) {
25
31
  result.email = [
@@ -1 +1 @@
1
- {"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../src/mocking/lib/User.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AACtD,OAAO,EAAS,IAAI,IAAI,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAQpE,MAAM,OAAO,IAAI;IACf,MAAM,CAAQ;IACd,KAAK,CAAO;IACZ,QAAQ,CAAU;IAClB,MAAM,CAAQ;IAEd,YAAY,OAAsB,EAAE;QAClC,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAAA;QAC9B,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACjC,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAA;QAClC,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACrC,CAAC;IAED,IAAI,CAAC,OAAkB,EAAE;QACvB,MAAM,MAAM,GAAU;YACpB,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;YACxB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;SAC3E,CAAA;QACD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,MAAM,CAAC,KAAK,GAAG;gBACb;oBACE,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;oBAC5B,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;iBAC/B;aACF,CAAA;QACH,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,MAAM,CAAC,OAAO,GAAG;gBACf,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;aAC5B,CAAA;QACH,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,MAAM,CAAC,QAAQ,GAAG;gBAChB,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;aACpC,CAAA;QACH,CAAC;QACD,OAAO,MAAM,CAAA;IACf,CAAC;CACF","sourcesContent":["import type { IDataMockInit } from '@pawel-up/data-mock/types.js'\nimport { Types } from '@pawel-up/data-mock/Types.js'\nimport { Person } from '@pawel-up/data-mock/Person.js'\nimport { Internet } from '@pawel-up/data-mock/Internet.js'\nimport { Random } from '@pawel-up/data-mock/Random.js'\nimport { IUser, Kind as UserKind } from '../../models/store/User.js'\n\nexport interface IUserInit {\n noEmail?: boolean\n noPicture?: boolean\n noProvider?: boolean\n}\n\nexport class User {\n person: Person\n types: Types\n internet: Internet\n random: Random\n\n constructor(init: IDataMockInit = {}) {\n this.person = new Person(init)\n this.types = new Types(init.seed)\n this.internet = new Internet(init)\n this.random = new Random(init.seed)\n }\n\n user(init: IUserInit = {}): IUser {\n const result: IUser = {\n kind: UserKind,\n key: this.types.string(21),\n name: this.person.name(),\n status: this.random.pickOne(['active', 'deleted', 'suspended', 'pending']),\n }\n if (!init.noEmail) {\n result.email = [\n {\n email: this.internet.email(),\n verified: this.types.boolean(),\n },\n ]\n }\n if (!init.noPicture) {\n result.picture = {\n url: this.internet.avatar(),\n }\n }\n if (!init.noProvider) {\n result.provider = {\n refreshToken: this.types.string(21),\n }\n }\n return result\n }\n}\n"]}
1
+ {"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../src/mocking/lib/User.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AACtD,OAAO,EAAS,IAAI,IAAI,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAQlD,MAAM,OAAO,IAAI;IACf,MAAM,CAAQ;IACd,KAAK,CAAO;IACZ,QAAQ,CAAU;IAClB,MAAM,CAAQ;IACd,IAAI,CAAM;IAEV,YAAY,OAAsB,EAAE;QAClC,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,CAAA;QAC9B,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACjC,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAA;QAClC,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAA;IAC5B,CAAC;IAED,IAAI,CAAC,OAAkB,EAAE;QACvB,MAAM,MAAM,GAAU;YACpB,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;YACxB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;YAC1E,KAAK,EAAE,EAAE;YACT,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YAC9B,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;SAC/B,CAAA;QACD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,MAAM,CAAC,KAAK,GAAG;gBACb;oBACE,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;oBAC5B,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;iBAC/B;aACF,CAAA;QACH,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,MAAM,CAAC,OAAO,GAAG;gBACf,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;aAC5B,CAAA;QACH,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,MAAM,CAAC,QAAQ,GAAG;gBAChB,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;aACpC,CAAA;QACH,CAAC;QACD,OAAO,MAAM,CAAA;IACf,CAAC;CACF","sourcesContent":["import type { IDataMockInit } from '@pawel-up/data-mock/types.js'\nimport { Types } from '@pawel-up/data-mock/Types.js'\nimport { Person } from '@pawel-up/data-mock/Person.js'\nimport { Internet } from '@pawel-up/data-mock/Internet.js'\nimport { Random } from '@pawel-up/data-mock/Random.js'\nimport { IUser, Kind as UserKind } from '../../models/store/User.js'\nimport { Time } from '@pawel-up/data-mock/Time.js'\n\nexport interface IUserInit {\n noEmail?: boolean\n noPicture?: boolean\n noProvider?: boolean\n}\n\nexport class User {\n person: Person\n types: Types\n internet: Internet\n random: Random\n time: Time\n\n constructor(init: IDataMockInit = {}) {\n this.person = new Person(init)\n this.types = new Types(init.seed)\n this.internet = new Internet(init)\n this.random = new Random(init.seed)\n this.time = new Time(init)\n }\n\n user(init: IUserInit = {}): IUser {\n const result: IUser = {\n kind: UserKind,\n key: this.types.string(21),\n name: this.person.name(),\n status: this.random.pickOne(['active', 'deleted', 'suspended', 'pending']),\n email: [],\n created: this.time.timestamp(),\n updated: this.time.timestamp(),\n }\n if (!init.noEmail) {\n result.email = [\n {\n email: this.internet.email(),\n verified: this.types.boolean(),\n },\n ]\n }\n if (!init.noPicture) {\n result.picture = {\n url: this.internet.avatar(),\n }\n }\n if (!init.noProvider) {\n result.provider = {\n refreshToken: this.types.string(21),\n }\n }\n return result\n }\n}\n"]}
@@ -171,7 +171,7 @@ export interface ServerEvent {
171
171
  kind: string;
172
172
  }
173
173
  /**
174
- * A broadcast event dispatched by the server when a file was patched.
174
+ * A broadcast event dispatched by the server when an object was patched.
175
175
  */
176
176
  export interface ServerPatchEvent extends ServerEvent {
177
177
  /**
@@ -179,7 +179,7 @@ export interface ServerPatchEvent extends ServerEvent {
179
179
  */
180
180
  kind: 'patch';
181
181
  /**
182
- * Whether the file meta data were patched or the media (the content).
182
+ * Whether the object meta data were patched or the media (the content).
183
183
  * Note, folders are always meta.
184
184
  */
185
185
  type: 'media' | 'meta';
@@ -192,4 +192,17 @@ export interface ServerPatchEvent extends ServerEvent {
192
192
  */
193
193
  uid: string;
194
194
  }
195
+ /**
196
+ * A broadcast event dispatched by the server when an object was deleted.
197
+ */
198
+ export interface ServerDeleteEvent extends ServerEvent {
199
+ /**
200
+ * Describes this event.
201
+ */
202
+ kind: 'delete';
203
+ /**
204
+ * The id of the user deleting the object.
205
+ */
206
+ uid: string;
207
+ }
195
208
  //# sourceMappingURL=Backend.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Backend.d.ts","sourceRoot":"","sources":["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C,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,cAAc;IAC3D,SAAS,EAAE,SAAS,CAAA;CAErB;AAED;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,qBAAqB,EAAE,iBAAiB;IACzF;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,MAAM,WAAW,oCAAqC,SAAQ,qBAAqB;IACjF,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,qBAAqB;IACzE,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD;;OAEG;IACH,IAAI,EAAE,OAAO,CAAA;IACb;;;OAGG;IACH,IAAI,EAAE,OAAO,GAAG,MAAM,CAAA;IACtB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAA;IAChB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAA;IACd;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;CACZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"Backend.js","sourceRoot":"","sources":["../../../../src/models/store/Backend.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,iEAAO,CAAA;IACP,qEAAS,CAAA;AACX,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AACD;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,qBAAqB,CAAA","sourcesContent":["import type { PatchInfo } from '../../patch/types.js'\nimport { type IPatchRevision } from '../../events/BaseEvents.js'\nimport { type IHttpHistory, Kind as HttpHistoryKind } from '../HttpHistory.js'\nimport { Kind as ProjectExecutionKind } from '../ProjectExecution.js'\nimport type { IFile } from './File.js'\nimport type { IPermission } from './Permission.js'\nimport type { IRevision } from './Revision.js'\n/**\n * @deprecated\n */\nexport enum BackendCommandType {\n observe,\n unobserve,\n}\n/**\n * @deprecated\n */\nexport const BackendCommandKind = 'Core#BackendCommand'\n/**\n * @deprecated\n */\nexport interface IBackendCommand {\n kind: typeof BackendCommandKind\n cmd: BackendCommandType\n}\n/**\n * @deprecated\n */\nexport interface IBackendObserveCommand extends IBackendCommand {\n path: string // includes query parameters\n}\n/**\n * @deprecated\n */\nexport interface BroadcastEvent {\n type: 'event'\n operation: string\n kind: string\n key: string\n path: string\n organization: string // empty string for `/organizations`\n}\n/**\n * @deprecated\n */\nexport interface BackendErrorEvent {\n type: 'error'\n cause: string\n time: number\n}\n/**\n * @deprecated\n */\nexport interface ClearedBroadcastEvent {\n type: 'event'\n operation: 'cleared'\n name: string\n organization: string\n path: string\n}\n/**\n * @deprecated\n */\nexport interface BroadcastFileData {\n parent?: string\n}\n/**\n * @deprecated\n */\nexport interface BroadcastCreatedEvent extends BroadcastEvent {\n operation: 'created'\n data: unknown\n // path: string; -> /files, /certificates, /history, /project/executions, /organizations, /trash\n}\n/**\n * @deprecated\n */\nexport interface FileCreatedBroadcastEvent extends BroadcastCreatedEvent, BroadcastFileData {}\n/**\n * @deprecated\n */\nexport interface FileMetaCreatedBroadcastEvent extends FileCreatedBroadcastEvent {\n data: IFile\n alt: 'meta'\n}\n/**\n * @deprecated\n */\nexport interface FileMediaCreatedBroadcastEvent extends FileCreatedBroadcastEvent {\n alt: 'media'\n}\n/**\n * @deprecated\n */\nexport interface HistoryCreatedBroadcastEvent extends BroadcastCreatedEvent {\n project: string\n request: string\n app: string\n kind: typeof HttpHistoryKind\n data: IHttpHistory\n}\n/**\n * @deprecated\n */\nexport interface FileRevisionCreatedBroadcastEvent extends BroadcastCreatedEvent, BroadcastFileData {\n parent: string\n data: IRevision\n}\n/**\n * @deprecated\n */\nexport interface ProjectExecutionCreatedBroadcastEvent extends BroadcastCreatedEvent {\n project: string\n kind: typeof ProjectExecutionKind\n}\n/**\n * @deprecated\n */\nexport interface BroadcastPatchEvent extends BroadcastEvent {\n operation: 'patch'\n data: IPatchRevision\n // path: string; -> /files, /organizations\n}\n/**\n * @deprecated\n */\nexport interface FilePatchBroadcastEvent extends BroadcastPatchEvent, BroadcastFileData {}\n\n/**\n * @deprecated\n */\nexport interface AccessBroadcastEvent extends BroadcastEvent {\n operation: 'access-granted' | 'access-removed'\n data?: IPermission\n // path: string; -> /files, /organizations, /organizations\n}\n\n/**\n * @deprecated\n */\nexport interface FileAccessBroadcastEvent extends AccessBroadcastEvent {\n parent?: string\n}\n\n/**\n * @deprecated\n */\nexport interface DeletedBroadcastEvent extends BroadcastEvent {\n operation: 'deleted'\n // path: string; -> /files, /certificates, /history, /project/executions, /organizations, /trash\n}\n\n/**\n * @deprecated\n */\nexport interface FileDeletedBroadcastEvent extends DeletedBroadcastEvent, BroadcastFileData {\n /**\n * The key of the created trash entry for the deleted object.\n * This is **always** populated when the file alt is `meta`.\n */\n trash?: string\n}\n\n/**\n * @deprecated\n */\nexport interface ProjectExecutionDeleteBroadcastEvent extends DeletedBroadcastEvent {\n project: string\n}\n\n/**\n * @deprecated\n */\nexport interface HistoryDeletedBroadcastEvent extends DeletedBroadcastEvent {\n project: string\n request: string\n}\n\nexport interface ServerEvent {\n kind: string\n}\n\n/**\n * A broadcast event dispatched by the server when a file was patched.\n */\nexport interface ServerPatchEvent extends ServerEvent {\n /**\n * Describes this event.\n */\n kind: 'patch'\n /**\n * Whether the file meta data were patched or the media (the content).\n * Note, folders are always meta.\n */\n type: 'media' | 'meta'\n /**\n * The patch information. The exact type depends on the `type` property.\n */\n value: PatchInfo\n /**\n * The id of the user who patched the document.\n */\n uid: string\n}\n"]}
1
+ {"version":3,"file":"Backend.js","sourceRoot":"","sources":["../../../../src/models/store/Backend.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,iEAAO,CAAA;IACP,qEAAS,CAAA;AACX,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AACD;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,qBAAqB,CAAA","sourcesContent":["import type { PatchInfo } from '../../patch/types.js'\nimport { type IPatchRevision } from '../../events/BaseEvents.js'\nimport { type IHttpHistory, Kind as HttpHistoryKind } from '../HttpHistory.js'\nimport { Kind as ProjectExecutionKind } from '../ProjectExecution.js'\nimport type { IFile } from './File.js'\nimport type { IPermission } from './Permission.js'\nimport type { IRevision } from './Revision.js'\n/**\n * @deprecated\n */\nexport enum BackendCommandType {\n observe,\n unobserve,\n}\n/**\n * @deprecated\n */\nexport const BackendCommandKind = 'Core#BackendCommand'\n/**\n * @deprecated\n */\nexport interface IBackendCommand {\n kind: typeof BackendCommandKind\n cmd: BackendCommandType\n}\n/**\n * @deprecated\n */\nexport interface IBackendObserveCommand extends IBackendCommand {\n path: string // includes query parameters\n}\n/**\n * @deprecated\n */\nexport interface BroadcastEvent {\n type: 'event'\n operation: string\n kind: string\n key: string\n path: string\n organization: string // empty string for `/organizations`\n}\n/**\n * @deprecated\n */\nexport interface BackendErrorEvent {\n type: 'error'\n cause: string\n time: number\n}\n/**\n * @deprecated\n */\nexport interface ClearedBroadcastEvent {\n type: 'event'\n operation: 'cleared'\n name: string\n organization: string\n path: string\n}\n/**\n * @deprecated\n */\nexport interface BroadcastFileData {\n parent?: string\n}\n/**\n * @deprecated\n */\nexport interface BroadcastCreatedEvent extends BroadcastEvent {\n operation: 'created'\n data: unknown\n // path: string; -> /files, /certificates, /history, /project/executions, /organizations, /trash\n}\n/**\n * @deprecated\n */\nexport interface FileCreatedBroadcastEvent extends BroadcastCreatedEvent, BroadcastFileData {}\n/**\n * @deprecated\n */\nexport interface FileMetaCreatedBroadcastEvent extends FileCreatedBroadcastEvent {\n data: IFile\n alt: 'meta'\n}\n/**\n * @deprecated\n */\nexport interface FileMediaCreatedBroadcastEvent extends FileCreatedBroadcastEvent {\n alt: 'media'\n}\n/**\n * @deprecated\n */\nexport interface HistoryCreatedBroadcastEvent extends BroadcastCreatedEvent {\n project: string\n request: string\n app: string\n kind: typeof HttpHistoryKind\n data: IHttpHistory\n}\n/**\n * @deprecated\n */\nexport interface FileRevisionCreatedBroadcastEvent extends BroadcastCreatedEvent, BroadcastFileData {\n parent: string\n data: IRevision\n}\n/**\n * @deprecated\n */\nexport interface ProjectExecutionCreatedBroadcastEvent extends BroadcastCreatedEvent {\n project: string\n kind: typeof ProjectExecutionKind\n}\n/**\n * @deprecated\n */\nexport interface BroadcastPatchEvent extends BroadcastEvent {\n operation: 'patch'\n data: IPatchRevision\n // path: string; -> /files, /organizations\n}\n/**\n * @deprecated\n */\nexport interface FilePatchBroadcastEvent extends BroadcastPatchEvent, BroadcastFileData {}\n\n/**\n * @deprecated\n */\nexport interface AccessBroadcastEvent extends BroadcastEvent {\n operation: 'access-granted' | 'access-removed'\n data?: IPermission\n // path: string; -> /files, /organizations, /organizations\n}\n\n/**\n * @deprecated\n */\nexport interface FileAccessBroadcastEvent extends AccessBroadcastEvent {\n parent?: string\n}\n\n/**\n * @deprecated\n */\nexport interface DeletedBroadcastEvent extends BroadcastEvent {\n operation: 'deleted'\n // path: string; -> /files, /certificates, /history, /project/executions, /organizations, /trash\n}\n\n/**\n * @deprecated\n */\nexport interface FileDeletedBroadcastEvent extends DeletedBroadcastEvent, BroadcastFileData {\n /**\n * The key of the created trash entry for the deleted object.\n * This is **always** populated when the file alt is `meta`.\n */\n trash?: string\n}\n\n/**\n * @deprecated\n */\nexport interface ProjectExecutionDeleteBroadcastEvent extends DeletedBroadcastEvent {\n project: string\n}\n\n/**\n * @deprecated\n */\nexport interface HistoryDeletedBroadcastEvent extends DeletedBroadcastEvent {\n project: string\n request: string\n}\n\nexport interface ServerEvent {\n kind: string\n}\n\n/**\n * A broadcast event dispatched by the server when an object was patched.\n */\nexport interface ServerPatchEvent extends ServerEvent {\n /**\n * Describes this event.\n */\n kind: 'patch'\n /**\n * Whether the object meta data were patched or the media (the content).\n * Note, folders are always meta.\n */\n type: 'media' | 'meta'\n /**\n * The patch information. The exact type depends on the `type` property.\n */\n value: PatchInfo\n /**\n * The id of the user who patched the document.\n */\n uid: string\n}\n\n/**\n * A broadcast event dispatched by the server when an object was deleted.\n */\nexport interface ServerDeleteEvent extends ServerEvent {\n /**\n * Describes this event.\n */\n kind: 'delete'\n /**\n * The id of the user deleting the object.\n */\n uid: string\n}\n"]}
@@ -1,9 +1,10 @@
1
+ import type { IDeletion } from './Deletion.js';
1
2
  import type { UserOrganizationGrantType } from './Organization.js';
2
3
  export interface IEmail {
3
4
  /**
4
5
  * When available the email of the user.
5
6
  */
6
- email?: string;
7
+ email: string;
7
8
  /**
8
9
  * Whether the `email` was verified.
9
10
  * Not verified emails should have limited use in the system.
@@ -43,7 +44,7 @@ export interface IUser {
43
44
  /**
44
45
  * When available the email of the user.
45
46
  */
46
- email?: IEmail[];
47
+ email: IEmail[];
47
48
  /**
48
49
  * The user picture to render.
49
50
  */
@@ -67,10 +68,12 @@ export interface IUser {
67
68
  deleted?: boolean;
68
69
  /**
69
70
  * The timestamp of when the user was deleted.
71
+ * @deprecated
70
72
  */
71
73
  deletedTime?: number;
72
74
  /**
73
75
  * The id of the user that deleted the user.
76
+ * @deprecated
74
77
  */
75
78
  deletingUser?: string;
76
79
  /**
@@ -84,5 +87,23 @@ export interface IUser {
84
87
  * This is used to determine the user's role in the organization.
85
88
  */
86
89
  grantType?: UserOrganizationGrantType;
90
+ /**
91
+ * Populated when the user object is considered in the context of an organization.
92
+ * The timestamp of when the user joined the organization.
93
+ */
94
+ joined?: number;
95
+ /**
96
+ * The timestamp of when the user was created.
97
+ */
98
+ created: number;
99
+ /**
100
+ * The timestamp of when the user was last updated.
101
+ */
102
+ updated: number;
103
+ /**
104
+ * The information about the delete information.
105
+ * Always set when the `delete` is true.
106
+ */
107
+ deletedInfo?: IDeletion;
87
108
  }
88
109
  //# sourceMappingURL=User.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../../src/models/store/User.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAElE,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,IAAI,cAAc,CAAA;AAE/B,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAA;AAEvE;;;;;;;GAOG;AACH,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,OAAO,IAAI,CAAA;IACjB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;OAIG;IACH,M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UAAU,CAAA;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,yBAAyB,CAAA;IACrC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAA;CACxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../src/models/store/User.ts"],"names":[],"mappings":"AAyBA,MAAM,CAAC,MAAM,IAAI,GAAG,WAAW,CAAA","sourcesContent":["import type { UserOrganizationGrantType } from './Organization.js'\n\nexport interface IEmail {\n /**\n * When available the email of the user.\n */\n email?: string\n /**\n * Whether the `email` was verified.\n * Not verified emails should have limited use in the system.\n */\n verified?: boolean\n}\n\nexport interface IUserPicture {\n /**\n * When available, the URL to the user's picture image.\n */\n url?: string\n /**\n * Alternative to the `url`. When set it is a data URL value of the image.\n */\n data?: string\n}\n\nexport const Kind = 'Core#User'\n\nexport type UserStatus = 'active' | 'deleted' | 'suspended' | 'pending'\n\n/**\n * Represents a user in the system.\n * This can be embedded in various situations like project's revision history,\n * ACL, Authorization, etc.\n *\n * Note, the store implementation may have additional fields that support external\n * identity providers. However, this is not exposed to the user through the API.\n */\nexport interface IUser {\n kind: typeof Kind\n /**\n * The data store key of the user.\n */\n key: string\n /**\n * The display name of the user.\n */\n name: string\n /**\n * When available the email of the user.\n */\n email?: IEmail[]\n /**\n * The user picture to render.\n */\n picture?: IUserPicture\n /**\n * A general purpose tags field.\n */\n tags?: string[]\n /**\n * Optional user locale information.\n */\n locale?: string\n /**\n * Optional metadata related to the auth provider.\n */\n provider?: unknown\n /**\n * Whether the user is deleted from the system.\n * @deprecated Use `status` instead.\n */\n deleted?: boolean\n /**\n * The timestamp of when the user was deleted.\n */\n deletedTime?: number\n /**\n * The id of the user that deleted the user.\n */\n deletingUser?: string\n /**\n * The status of the user.\n * May not be populated in all cases.\n * @default 'active'\n */\n status?: UserStatus\n /**\n * Populated when the user object is considered in the context of an organization.\n * This is used to determine the user's role in the organization.\n */\n grantType?: UserOrganizationGrantType\n}\n"]}
1
+ {"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../src/models/store/User.ts"],"names":[],"mappings":"AA0BA,MAAM,CAAC,MAAM,IAAI,GAAG,WAAW,CAAA","sourcesContent":["import type { IDeletion } from './Deletion.js'\nimport type { UserOrganizationGrantType } from './Organization.js'\n\nexport interface IEmail {\n /**\n * When available the email of the user.\n */\n email: string\n /**\n * Whether the `email` was verified.\n * Not verified emails should have limited use in the system.\n */\n verified?: boolean\n}\n\nexport interface IUserPicture {\n /**\n * When available, the URL to the user's picture image.\n */\n url?: string\n /**\n * Alternative to the `url`. When set it is a data URL value of the image.\n */\n data?: string\n}\n\nexport const Kind = 'Core#User'\n\nexport type UserStatus = 'active' | 'deleted' | 'suspended' | 'pending'\n\n/**\n * Represents a user in the system.\n * This can be embedded in various situations like project's revision history,\n * ACL, Authorization, etc.\n *\n * Note, the store implementation may have additional fields that support external\n * identity providers. However, this is not exposed to the user through the API.\n */\nexport interface IUser {\n kind: typeof Kind\n /**\n * The data store key of the user.\n */\n key: string\n /**\n * The display name of the user.\n */\n name: string\n /**\n * When available the email of the user.\n */\n email: IEmail[]\n /**\n * The user picture to render.\n */\n picture?: IUserPicture\n /**\n * A general purpose tags field.\n */\n tags?: string[]\n /**\n * Optional user locale information.\n */\n locale?: string\n /**\n * Optional metadata related to the auth provider.\n */\n provider?: unknown\n /**\n * Whether the user is deleted from the system.\n * @deprecated Use `status` instead.\n */\n deleted?: boolean\n /**\n * The timestamp of when the user was deleted.\n * @deprecated\n */\n deletedTime?: number\n /**\n * The id of the user that deleted the user.\n * @deprecated\n */\n deletingUser?: string\n /**\n * The status of the user.\n * May not be populated in all cases.\n * @default 'active'\n */\n status?: UserStatus\n /**\n * Populated when the user object is considered in the context of an organization.\n * This is used to determine the user's role in the organization.\n */\n grantType?: UserOrganizationGrantType\n /**\n * Populated when the user object is considered in the context of an organization.\n * The timestamp of when the user joined the organization.\n */\n joined?: number\n /**\n * The timestamp of when the user was created.\n */\n created: number\n /**\n * The timestamp of when the user was last updated.\n */\n updated: number\n /**\n * The information about the delete information.\n * Always set when the `delete` is true.\n */\n deletedInfo?: IDeletion\n}\n"]}
@@ -9,78 +9,109 @@ export declare class OrganizationsSdk extends SdkBase {
9
9
  * Lists all user organizations.
10
10
  */
11
11
  list(request?: SdkOptions): Promise<ContextListResult<IOrganization>>;
12
- create(orgName: string, request?: SdkOptions): Promise<IOrganization>;
13
- /**
14
- * Lists all invitations for a given organization.
15
- * @param oid The organization ID.
16
- * @param request The request options.
17
- * @returns A promise that resolves to a list of invitations.
18
- */
19
- listInvitations(oid: string, request?: SdkOptions): Promise<ContextListResult<InvitationSchema>>;
20
12
  /**
21
- * Creates an invitation for a user to join an organization.
22
- * @param oid The organization ID.
23
- * @param email The email address of the user to invite.
24
- * @param grant_type The type of grant for the user.
25
- * @param name The name of the user (optional).
13
+ * Creates a new organization.
14
+ * @param orgName The name of the organization to create.
26
15
  * @param request The request options.
27
- * @returns A promise that resolves to the created invitation.
16
+ * @returns A promise that resolves to the created organization.
28
17
  */
29
- createInvitation(oid: string, email: string, grant_type: UserOrganizationGrantType, name?: string, request?: SdkOptions): Promise<InvitationSchema>;
30
- /**
31
- * Finds an invitation by its token.
32
- * @param oid The organization ID.
33
- * @param token The invitation token.
34
- * @param request The request options.
35
- * @returns A promise that resolves to the found invitation.
36
- */
37
- findInvitationByToken(oid: string, token: string, request?: SdkOptions): Promise<InvitationSchema>;
38
- /**
39
- * Declines an invitation.
40
- * @param oid The organization ID.
41
- * @param id The invitation ID.
42
- * @param request The request options.
43
- * @returns A promise that resolves when the invitation is declined.
44
- */
45
- declineInvitation(oid: string, id: string, request?: SdkOptions): Promise<InvitationSchema>;
46
- /**
47
- * Soft-deletes an invitation.
48
- * @param oid The organization ID.
49
- * @param id The invitation ID.
50
- * @param request The request options.
51
- * @returns A promise that resolves to the deleted invitation.
52
- */
53
- deleteInvitation(oid: string, id: string, request?: SdkOptions): Promise<InvitationSchema>;
54
- /**
55
- * Patches an invitation. The server performs the patch validation.
56
- * The API only allows to patch some of the invitation properties:
57
- * - name
58
- * - expires_at
59
- * - grant_type
60
- * @param oid The organization ID.
61
- * @param id The invitation ID.
62
- * @param info The patch information.
63
- * @param request The request options.
64
- * @returns A promise that resolves to the patched invitation.
65
- */
66
- patchInvitation(oid: string, id: string, info: PatchInfo, request?: SdkOptions): Promise<InvitationSchema>;
67
- /**
68
- * Lists users in the organization.
69
- *
70
- * @param oid The key of the organization we want to read the user from.
71
- * @param options Optional query options.
72
- * @param request Optional request options.
73
- */
74
- listUsers(oid: string, options?: ContextListOptions, request?: SdkOptions): Promise<ContextListResult<IUser>>;
75
- /**
76
- * Gets a user by its key in the organization.
77
- *
78
- * @param oid The key of the organization parent organization.
79
- * @param key The user key.
80
- * @param request Optional request options.
81
- * @returns The user object
82
- * @deprecated Use `organizations.readUser()` instead.
83
- */
84
- getUser(oid: string, key: string, request?: SdkOptions): Promise<IUser>;
18
+ create(orgName: string, request?: SdkOptions): Promise<IOrganization>;
19
+ invitations: {
20
+ /**
21
+ * Lists all invitations for a given organization.
22
+ * @param oid The organization ID.
23
+ * @param request The request options.
24
+ * @returns A promise that resolves to a list of invitations.
25
+ */
26
+ list: (oid: string, request?: SdkOptions) => Promise<ContextListResult<InvitationSchema>>;
27
+ /**
28
+ * Creates an invitation for a user to join an organization.
29
+ * @param oid The organization ID.
30
+ * @param email The email address of the user to invite.
31
+ * @param grant_type The type of grant for the user.
32
+ * @param name The name of the user (optional).
33
+ * @param request The request options.
34
+ * @returns A promise that resolves to the created invitation.
35
+ */
36
+ create: (oid: string, email: string, grant_type: UserOrganizationGrantType, name?: string, request?: SdkOptions) => Promise<InvitationSchema>;
37
+ /**
38
+ * Finds an invitation by its token.
39
+ * @param oid The organization ID.
40
+ * @param token The invitation token.
41
+ * @param request The request options.
42
+ * @returns A promise that resolves to the found invitation.
43
+ */
44
+ findByToken: (oid: string, token: string, request?: SdkOptions) => Promise<InvitationSchema>;
45
+ /**
46
+ * Declines an invitation.
47
+ * @param oid The organization ID.
48
+ * @param id The invitation ID.
49
+ * @param request The request options.
50
+ * @returns A promise that resolves when the invitation is declined.
51
+ */
52
+ decline: (oid: string, id: string, request?: SdkOptions) => Promise<InvitationSchema>;
53
+ /**
54
+ * Soft-deletes an invitation.
55
+ * @param oid The organization ID.
56
+ * @param id The invitation ID.
57
+ * @param request The request options.
58
+ * @returns A promise that resolves to the deleted invitation.
59
+ */
60
+ delete: (oid: string, id: string, request?: SdkOptions) => Promise<InvitationSchema>;
61
+ /**
62
+ * Patches an invitation. The server performs the patch validation.
63
+ * The API only allows to patch some of the invitation properties:
64
+ * - name
65
+ * - expires_at
66
+ * - grant_type
67
+ * @param oid The organization ID.
68
+ * @param id The invitation ID.
69
+ * @param info The patch information.
70
+ * @param request The request options.
71
+ * @returns A promise that resolves to the patched invitation.
72
+ */
73
+ patch: (oid: string, id: string, info: PatchInfo, request?: SdkOptions) => Promise<InvitationSchema>;
74
+ };
75
+ users: {
76
+ /**
77
+ * Lists users in the organization.
78
+ *
79
+ * @param oid The key of the organization we want to read the user from.
80
+ * @param options Optional query options.
81
+ * @param request Optional request options.
82
+ */
83
+ list: (oid: string, options?: ContextListOptions, request?: SdkOptions) => Promise<ContextListResult<IUser>>;
84
+ /**
85
+ * Gets a user by its key in the organization.
86
+ *
87
+ * @param oid The key of the organization parent organization.
88
+ * @param key The user key.
89
+ * @param request Optional request options.
90
+ * @returns The user object
91
+ */
92
+ read: (oid: string, key: string, request?: SdkOptions) => Promise<IUser>;
93
+ /**
94
+ * Activates a user in the organization.
95
+ * If the user is already active the API will respond with an error.
96
+ * @param oid The key of the organization parent organization.
97
+ * @param key The user key.
98
+ */
99
+ activate: (oid: string, key: string, request?: SdkOptions) => Promise<IUser>;
100
+ /**
101
+ * Deactivates a user in the organization.
102
+ * If the user is already deactivated the API will respond with an error.
103
+ * @param oid The key of the organization parent organization.
104
+ * @param key The user key.
105
+ */
106
+ deactivate: (oid: string, key: string, request?: SdkOptions) => Promise<IUser>;
107
+ /**
108
+ * Deletes a user from the organization.
109
+ * @param oid The key of the organization parent organization.
110
+ * @param key The user
111
+ * @param request Optional request options.
112
+ * @returns A promise that resolves when the user is deleted.
113
+ */
114
+ delete: (oid: string, key: string, request?: SdkOptions) => Promise<void>;
115
+ };
85
116
  }
86
117
  //# sourceMappingURL=OrganizationsSdk.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OrganizationsSdk.d.ts","sourceRoot":"","sources":["../../../../src/runtime/store/OrganizationsSdk.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAKP,UAAU,EACX,MAAM,cAAc,CAAA;AAErB,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACvF,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAA;AAClG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAGvD,qBAAa,gBAAiB,SAAQ,OAAO;IAC3C;;OAEG;IACG,IAAI,CAAC,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC;IAyBzE,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,aAAa,CAAC;IAkC/E;;;;;OAKG;IACG,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IAyB1G;;;;;;;;OAQG;IACG,gBAAgB,CACpB,GAAG,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