@contentchef/contentchef-types 10.1.0-alpha.10 → 10.1.0-alpha.11

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.
@@ -240,3 +240,107 @@ export type UpdateSpacePublishingLocalesRequest = {
240
240
  * Return type of `updateSpacePublishingLocales`
241
241
  */
242
242
  export type UpdateSpacePublishingLocalesResponse = SpaceLocale;
243
+ /**
244
+ * This enum represent the lifecycle of a space deletion. A freshly requested deletion is
245
+ * `requested` and stays revocable until [[SpaceDeletionResponse.deleteAfter]], after which it
246
+ * becomes `running` and can no longer be withdrawn
247
+ */
248
+ export declare enum SpaceDeletionStatus {
249
+ /**
250
+ * Asked for, inside the revocation window, still revocable
251
+ */
252
+ REQUESTED = "requested",
253
+ /**
254
+ * Withdrawn inside the revocation window, nothing has been deleted
255
+ */
256
+ REVOKED = "revoked",
257
+ RUNNING = "running",
258
+ DELETED = "deleted",
259
+ FAILED = "failed",
260
+ /**
261
+ * A dry run, only started by hand: it reports what it would delete and changes nothing
262
+ */
263
+ INSPECTED = "inspected"
264
+ }
265
+ /**
266
+ * This type represent the model of a space deletion, the only record that outlives a deleted space
267
+ */
268
+ export type SpaceDeletionResponse = {
269
+ /**
270
+ * The space the deletion refers to
271
+ */
272
+ spaceId: string;
273
+ /**
274
+ * The current status of the deletion
275
+ */
276
+ status: SpaceDeletionStatus;
277
+ /**
278
+ * The name the space had, captured when the deletion was requested because deleting the space
279
+ * destroys it
280
+ */
281
+ spaceName?: string;
282
+ /**
283
+ * The subscription the space was claimed under, preserved for the same reason as [[spaceName]]
284
+ */
285
+ subscriptionId?: string;
286
+ /**
287
+ * The account that requested the deletion
288
+ */
289
+ requestedBy?: string;
290
+ /**
291
+ * The account that withdrew the deletion, only set when [[status]] is `revoked`
292
+ */
293
+ revokedBy?: string;
294
+ /**
295
+ * The ISO date the revocation window shuts at: until then the deletion can be withdrawn with
296
+ * [[SystemFacade.revokeSpaceDeletion]], after it the deletion starts
297
+ */
298
+ deleteAfter?: string;
299
+ /**
300
+ * The arn of the workflow execution performing the deletion
301
+ */
302
+ executionArn?: string;
303
+ /**
304
+ * Whether the deletion only reported what it would delete, without deleting anything
305
+ */
306
+ dryRun?: boolean;
307
+ /**
308
+ * How many rows have been deleted, per domain and per table. Written when the deletion ends
309
+ */
310
+ counts?: {
311
+ [domain: string]: {
312
+ [table: string]: number;
313
+ };
314
+ };
315
+ /**
316
+ * The message describing why the deletion failed, only set when [[status]] is `failed`
317
+ */
318
+ error?: string;
319
+ /**
320
+ * The ISO date the deletion record was last written at
321
+ */
322
+ updatedAt?: string;
323
+ };
324
+ /**
325
+ * This type represent the response of a delete space API request. The deletion has not happened
326
+ * yet: it is only requested, and stays revocable for [[revocableForHours]]
327
+ */
328
+ export type DeleteSpaceResponse = {
329
+ /**
330
+ * Always true, the request has been accepted
331
+ */
332
+ requested: boolean;
333
+ /**
334
+ * How long the deletion stays revocable, in hours
335
+ */
336
+ revocableForHours: number;
337
+ };
338
+ /**
339
+ * Return type of `revokeSpaceDeletion`, the withdrawn deletion record
340
+ */
341
+ export type RevokeSpaceDeletionResponse = SpaceDeletionResponse;
342
+ /**
343
+ * Return type of `getSpaceDeletionStatus`. It is null when the space has never had a deletion
344
+ * requested: no request is a normal answer, not a missing resource
345
+ */
346
+ export type GetSpaceDeletionStatusResponse = SpaceDeletionResponse | null;
package/dist/api/Space.js CHANGED
@@ -1,2 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SpaceDeletionStatus = void 0;
4
+ /**
5
+ * This enum represent the lifecycle of a space deletion. A freshly requested deletion is
6
+ * `requested` and stays revocable until [[SpaceDeletionResponse.deleteAfter]], after which it
7
+ * becomes `running` and can no longer be withdrawn
8
+ */
9
+ var SpaceDeletionStatus;
10
+ (function (SpaceDeletionStatus) {
11
+ /**
12
+ * Asked for, inside the revocation window, still revocable
13
+ */
14
+ SpaceDeletionStatus["REQUESTED"] = "requested";
15
+ /**
16
+ * Withdrawn inside the revocation window, nothing has been deleted
17
+ */
18
+ SpaceDeletionStatus["REVOKED"] = "revoked";
19
+ SpaceDeletionStatus["RUNNING"] = "running";
20
+ SpaceDeletionStatus["DELETED"] = "deleted";
21
+ SpaceDeletionStatus["FAILED"] = "failed";
22
+ /**
23
+ * A dry run, only started by hand: it reports what it would delete and changes nothing
24
+ */
25
+ SpaceDeletionStatus["INSPECTED"] = "inspected";
26
+ })(SpaceDeletionStatus || (exports.SpaceDeletionStatus = SpaceDeletionStatus = {}));
package/lib/api/Space.ts CHANGED
@@ -258,3 +258,108 @@ export type UpdateSpacePublishingLocalesRequest = {
258
258
  * Return type of `updateSpacePublishingLocales`
259
259
  */
260
260
  export type UpdateSpacePublishingLocalesResponse = SpaceLocale;
261
+
262
+ /**
263
+ * This enum represent the lifecycle of a space deletion. A freshly requested deletion is
264
+ * `requested` and stays revocable until [[SpaceDeletionResponse.deleteAfter]], after which it
265
+ * becomes `running` and can no longer be withdrawn
266
+ */
267
+ export enum SpaceDeletionStatus {
268
+ /**
269
+ * Asked for, inside the revocation window, still revocable
270
+ */
271
+ REQUESTED = 'requested',
272
+ /**
273
+ * Withdrawn inside the revocation window, nothing has been deleted
274
+ */
275
+ REVOKED = 'revoked',
276
+ RUNNING = 'running',
277
+ DELETED = 'deleted',
278
+ FAILED = 'failed',
279
+ /**
280
+ * A dry run, only started by hand: it reports what it would delete and changes nothing
281
+ */
282
+ INSPECTED = 'inspected'
283
+ }
284
+
285
+ /**
286
+ * This type represent the model of a space deletion, the only record that outlives a deleted space
287
+ */
288
+ export type SpaceDeletionResponse = {
289
+ /**
290
+ * The space the deletion refers to
291
+ */
292
+ spaceId: string;
293
+ /**
294
+ * The current status of the deletion
295
+ */
296
+ status: SpaceDeletionStatus;
297
+ /**
298
+ * The name the space had, captured when the deletion was requested because deleting the space
299
+ * destroys it
300
+ */
301
+ spaceName?: string;
302
+ /**
303
+ * The subscription the space was claimed under, preserved for the same reason as [[spaceName]]
304
+ */
305
+ subscriptionId?: string;
306
+ /**
307
+ * The account that requested the deletion
308
+ */
309
+ requestedBy?: string;
310
+ /**
311
+ * The account that withdrew the deletion, only set when [[status]] is `revoked`
312
+ */
313
+ revokedBy?: string;
314
+ /**
315
+ * The ISO date the revocation window shuts at: until then the deletion can be withdrawn with
316
+ * [[SystemFacade.revokeSpaceDeletion]], after it the deletion starts
317
+ */
318
+ deleteAfter?: string;
319
+ /**
320
+ * The arn of the workflow execution performing the deletion
321
+ */
322
+ executionArn?: string;
323
+ /**
324
+ * Whether the deletion only reported what it would delete, without deleting anything
325
+ */
326
+ dryRun?: boolean;
327
+ /**
328
+ * How many rows have been deleted, per domain and per table. Written when the deletion ends
329
+ */
330
+ counts?: { [domain: string]: { [table: string]: number; }; };
331
+ /**
332
+ * The message describing why the deletion failed, only set when [[status]] is `failed`
333
+ */
334
+ error?: string;
335
+ /**
336
+ * The ISO date the deletion record was last written at
337
+ */
338
+ updatedAt?: string;
339
+ };
340
+
341
+ /**
342
+ * This type represent the response of a delete space API request. The deletion has not happened
343
+ * yet: it is only requested, and stays revocable for [[revocableForHours]]
344
+ */
345
+ export type DeleteSpaceResponse = {
346
+ /**
347
+ * Always true, the request has been accepted
348
+ */
349
+ requested: boolean;
350
+ /**
351
+ * How long the deletion stays revocable, in hours
352
+ */
353
+ revocableForHours: number;
354
+ };
355
+
356
+ /**
357
+ * Return type of `revokeSpaceDeletion`, the withdrawn deletion record
358
+ */
359
+ export type RevokeSpaceDeletionResponse = SpaceDeletionResponse;
360
+
361
+ /**
362
+ * Return type of `getSpaceDeletionStatus`. It is null when the space has never had a deletion
363
+ * requested: no request is a normal answer, not a missing resource
364
+ */
365
+ export type GetSpaceDeletionStatusResponse = SpaceDeletionResponse | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentchef/contentchef-types",
3
- "version": "10.1.0-alpha.10",
3
+ "version": "10.1.0-alpha.11",
4
4
  "description": "ContentChef types",
5
5
  "author": "PierpaoloIannone <piannone@byte-code.com>",
6
6
  "homepage": "https://github.com/ContentChef/contentchef-management-js-client#readme",
@@ -34,5 +34,5 @@
34
34
  "devDependencies": {
35
35
  "typescript": "^5.9.3"
36
36
  },
37
- "gitHead": "0cc1e6b2a9468100a09fed18ab3ffaca0bcb53e8"
37
+ "gitHead": "ea72e6f60f7e98e9b54477fc72ec7673502d9e93"
38
38
  }