@umbraco-deploy/backoffice 17.1.0-rc1

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 ADDED
@@ -0,0 +1,41 @@
1
+ # @umbraco-deploy/backoffice
2
+
3
+ TypeScript type definitions for extending the [Umbraco Deploy](https://umbraco.com/products/umbraco-deploy/)
4
+ backoffice. Install this package as a `devDependency` to get typings for Deploy's
5
+ extension manifests, base classes, context tokens, and referenced API models.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install -D @umbraco-deploy/backoffice
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```ts
16
+ import type { ManifestDeployEntityActionRegistrar } from "@umbraco-deploy/backoffice";
17
+ import {
18
+ DEPLOY_CONTEXT,
19
+ DeployEntityActionBase,
20
+ WorkStatusModel,
21
+ } from "@umbraco-deploy/backoffice";
22
+ ```
23
+
24
+ ## Runtime resolution
25
+
26
+ This package ships only TypeScript declarations (`.d.ts`). The runtime values
27
+ (classes, enums, context tokens) are provided by the Umbraco Deploy backoffice
28
+ bundle that ships with the Umbraco Deploy NuGet package, and are resolved via
29
+ the import map declared in Deploy's `umbraco-package.json`:
30
+
31
+ ```json
32
+ "importmap": {
33
+ "imports": {
34
+ "@umbraco-deploy/backoffice": "/App_Plugins/Deploy/umbraco-deploy.js"
35
+ }
36
+ }
37
+ ```
38
+
39
+ Your extension is loaded by the Umbraco backoffice at runtime, where this
40
+ mapping resolves `@umbraco-deploy/backoffice` to the Deploy bundle. No
41
+ additional runtime entry is shipped via npm.
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@umbraco-deploy/backoffice",
3
+ "version": "17.1.0-rc1",
4
+ "type": "module",
5
+ "author": {
6
+ "name": "Umbraco A/S",
7
+ "email": "dxp@umbraco.com",
8
+ "url": "https://umbraco.com"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/umbraco/Umbraco.Deploy.Issues/issues"
12
+ },
13
+ "types": "./types/umbraco-deploy-public.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./types/umbraco-deploy-public.d.ts"
17
+ }
18
+ },
19
+ "peerDependencies": {
20
+ "@umbraco-cms/backoffice": "17.0.0"
21
+ },
22
+ "publishConfig": {
23
+ "access": "public"
24
+ }
25
+ }
@@ -0,0 +1,386 @@
1
+ import type { ManifestBase } from '@umbraco-cms/backoffice/extension-api';
2
+ import { Observable } from 'rxjs';
3
+ import { UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal';
4
+ import type { UmbApiError } from '@umbraco-cms/backoffice/resources';
5
+ import type { UmbConditionConfigBase } from '@umbraco-cms/backoffice/extension-api';
6
+ import { UmbContextBase } from '@umbraco-cms/backoffice/class-api';
7
+ import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
8
+ import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
9
+ import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
10
+ import { UmbEntityActionBase } from '@umbraco-cms/backoffice/entity-action';
11
+ import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api';
12
+ import { UmbLocalizationSet } from '@umbraco-cms/backoffice/localization-api';
13
+
14
+ export declare type AddToQueueModel = {
15
+ id: string;
16
+ entityType: string;
17
+ culture?: string | null;
18
+ includeDescendants: boolean;
19
+ releaseDate?: string | null;
20
+ };
21
+
22
+ declare type ClientConfigurationInfoModel = {
23
+ currentWorkspaceType: string;
24
+ currentWorkspace: string;
25
+ target?: WorkspaceInfoModel | null;
26
+ allowRestoreOptions: boolean;
27
+ allowRestoreIgnoreDependencies: boolean;
28
+ allowDeployOptions: boolean;
29
+ allowDeployIgnoreDependencies: boolean;
30
+ debugEnabled: boolean;
31
+ isLocalWorkspace: boolean;
32
+ restoreWorkspaces: Array<WorkspaceInfoModel>;
33
+ workspaces: Array<WorkspaceInfoModel>;
34
+ };
35
+
36
+ export declare type ClientConfigurationModel = {
37
+ restoreHubUrl: string;
38
+ deployHubUrl: string;
39
+ clientConfiguration: ClientConfigurationInfoModel | UmbracoCloudClientConfigurationInfoModel;
40
+ registeredEntityOptions: {
41
+ [key: string]: DeployRegisteredEntityTypeDetailOptionsModel;
42
+ };
43
+ };
44
+
45
+ export declare type ConfigurationModel = {
46
+ excludedEntityTypes: Array<string>;
47
+ allowIgnoreDependenciesOperations: string;
48
+ ignoreBrokenDependenciesBehavior: string;
49
+ transferDictionaryAsContent: boolean;
50
+ ignoreMissingLanguagesForDictionaryItems: boolean;
51
+ exportMemberGroups: boolean;
52
+ allowMembersDeploymentOperations: string;
53
+ exportUserGroups: boolean;
54
+ transferMemberGroupsAsContent: boolean;
55
+ sessionTimeout: string;
56
+ httpClientTimeout: string;
57
+ databaseCommandTimeout: string;
58
+ sourceDeployTimeout: string;
59
+ diskOperationsTimeout: string;
60
+ allowDomainsDeploymentOperations: string;
61
+ allowPublicAccessDeploymentOperations: string;
62
+ allowWebhooksDeploymentOperations: string;
63
+ trashedContentDeploymentOperations: string;
64
+ postDeploySchemaOperation: string;
65
+ reloadMemoryCacheFollowingDiskReadOperation: boolean;
66
+ sourceDeployBatchSize?: number | null;
67
+ packageBatchSize?: number | null;
68
+ mediaFileChecksumCalculationMethod: string;
69
+ numberOfSignaturesToUseAllRelationCache: number;
70
+ continueOnMediaFilePathTooLongException: boolean;
71
+ suppressCacheRefresherNotifications: boolean;
72
+ hideVersionDetails: boolean;
73
+ hideConfigurationDetails: boolean;
74
+ resolveUserInTargetEnvironment: boolean;
75
+ setEmptyDictionaryItemsOnTransfer: boolean;
76
+ suspensions: SuspensionsConfigurationModel;
77
+ validateDependenciesOnImport: boolean;
78
+ importOnStartup: ImportOnStartupConfigurationModel;
79
+ };
80
+
81
+ declare interface DependencyModel {
82
+ Name?: string;
83
+ NodeId?: number;
84
+ Dependent?: DependencyModel;
85
+ Udi?: string;
86
+ Type?: string;
87
+ Reason?: string;
88
+ DependsOn?: Array<DependencyModel>;
89
+ }
90
+
91
+ export declare const DEPLOY_CONTEXT: UmbContextToken<DeployContext, DeployContext>;
92
+
93
+ export declare const DEPLOY_ENTITYTYPE_CONDITION_ALIAS = "Deploy.Condition.EntityType";
94
+
95
+ export declare const DEPLOY_SIGNALR_CONTEXT: UmbContextToken<DeploySignalRContext, DeploySignalRContext>;
96
+
97
+ export declare const DEPLOY_TRANSFER_QUEUE_MANAGER: UmbContextToken<DeployTransferQueueManagerContext, DeployTransferQueueManagerContext>;
98
+
99
+ export declare class DeployContext extends UmbControllerBase {
100
+ #private;
101
+ config: Observable<ConfigurationModel | undefined>;
102
+ clientConfig: Observable<ClientConfigurationModel | undefined>;
103
+ license: Observable<LicenseStatusResponseModel | undefined>;
104
+ hostConnected(): Promise<void>;
105
+ environments(): Array<EnvironmentInfoModel>;
106
+ restoreEnvironments(): WorkspaceInfoModel[];
107
+ getRegisteredEntity(value: string): DeployRegisteredEntity | undefined;
108
+ showProgress(workItemPromise: Promise<WorkItemDetailModel | UmbApiError | undefined>, progressModel: WorkDescriptionModel, completeModel: WorkDescriptionModel): Promise<void>;
109
+ }
110
+
111
+ export declare class DeployEntityActionBase extends UmbEntityActionBase<never> {
112
+ modalManager?: typeof UMB_MODAL_MANAGER_CONTEXT.TYPE;
113
+ deployContext?: typeof DEPLOY_CONTEXT.TYPE;
114
+ protected localize: UmbLocalizationController<UmbLocalizationSet>;
115
+ hostConnected(): void;
116
+ protected showProgress(workItemPromise: Promise<WorkItemDetailModel | UmbApiError | undefined>, progress: WorkDescriptionModel, complete: WorkDescriptionModel): Promise<void>;
117
+ protected requestReload(): Promise<void>;
118
+ }
119
+
120
+ export declare type DeployEntityTypeConditionConfig = UmbConditionConfigBase<typeof DEPLOY_ENTITYTYPE_CONDITION_ALIAS> & {
121
+ forEntityTypes?: {
122
+ [key: string]: Array<"default" | UmbExtensionConditionConfigMap[keyof UmbExtensionConditionConfigMap]>;
123
+ };
124
+ default: Array<UmbExtensionConditionConfigMap[keyof UmbExtensionConditionConfigMap]>;
125
+ };
126
+
127
+ export declare interface DeployErrorModel {
128
+ hasError: boolean;
129
+ comment?: string;
130
+ log?: string;
131
+ exception?: DeployExceptionModel;
132
+ exceptionMessage?: string;
133
+ }
134
+
135
+ export declare interface DeployExceptionModel {
136
+ hasError?: boolean;
137
+ EnvironmentName?: string;
138
+ Type?: DeployExceptionType;
139
+ Detail?: string;
140
+ Message?: string;
141
+ ExceptionMessage?: string;
142
+ HasMeaningForUi?: boolean;
143
+ InnerException?: DeployExceptionModel;
144
+ InnerExceptions?: Array<DeployExceptionModel>;
145
+ Error?: DeployExceptionModel;
146
+ FileName?: string;
147
+ Udi?: string;
148
+ ExceptionType?: string;
149
+ Mismatches?: Array<MismatchModel>;
150
+ IgnoredEntityTypes?: Array<string>;
151
+ NumberOfItemsAffected?: number;
152
+ NumberOfDependentItems?: number;
153
+ Dependencies?: Array<DependencyModel>;
154
+ Extensions?: {
155
+ UserName?: string;
156
+ UserEmail?: string;
157
+ };
158
+ }
159
+
160
+ export declare type DeployExceptionType = "ArtifactCollisionException" | "DeploySchemaMismatchException" | "RestoreSchemaMismatchException" | "ImportArtifactsException" | "ImportArtifactsUnhandledException" | "UnauthorizedClientException" | "ContentTypeChangedException" | "AggregateDependencyException" | "EnvironmentBusyException" | "ChunkedEncodingException" | "WebException" | "InvalidPathException" | "MergeConflictException" | "RemoteApiTimeoutException" | "RemoteApiException";
161
+
162
+ export declare class DeployExportBaseEntityAction extends DeployEntityActionBase implements EntityActionWithWorkDescription {
163
+ readonly _progressModel: WorkDescriptionModel;
164
+ readonly _completeModel: WorkDescriptionModel;
165
+ }
166
+
167
+ export declare type DeployItemModel = {
168
+ name: string;
169
+ culture?: string | null;
170
+ udi: UdiModel;
171
+ includeDescendants: boolean;
172
+ releaseDate?: string | null;
173
+ };
174
+
175
+ export declare interface DeployRegisteredEntity extends DeployRegisteredEntityTypeDetailOptionsModel {
176
+ entityType: string;
177
+ isRoot: boolean;
178
+ }
179
+
180
+ export declare type DeployRegisteredEntityTypeDetailOptionsModel = {
181
+ supportsQueueForTransfer: boolean;
182
+ supportsQueueForTransferOfDescendents: boolean;
183
+ supportsRestore: boolean;
184
+ supportsPartialRestore: boolean;
185
+ supportsImportExport: boolean;
186
+ supportsExportOfDescendants: boolean;
187
+ permittedToRestore: boolean;
188
+ };
189
+
190
+ export declare class DeployRestoreBaseEntityAction extends DeployEntityActionBase implements EntityActionWithWorkDescription {
191
+ protected _restoreModel?: void | DeployRestoreModalValue;
192
+ readonly _progressModel: WorkDescriptionModel;
193
+ readonly _completeModel: WorkDescriptionModel;
194
+ }
195
+
196
+ declare interface DeployRestoreModalValue {
197
+ restoreNodes?: [
198
+ {
199
+ unique: string;
200
+ id: string;
201
+ entityType: string;
202
+ includeDescendants: boolean;
203
+ selector: string;
204
+ }
205
+ ];
206
+ environment?: EnvironmentInfoModel;
207
+ ignoreDependencies?: boolean;
208
+ }
209
+
210
+ export declare class DeploySignalRContext extends UmbControllerBase {
211
+ #private;
212
+ readonly deploySessionUpdate: Observable<SessionUpdatedModel | null>;
213
+ readonly deployHeartbeat: Observable<HeartbeatModel | null>;
214
+ readonly restoreHeartbeat: Observable<HeartbeatModel | null>;
215
+ readonly restoreSessionUpdate: Observable<SessionUpdatedModel | null>;
216
+ readonly diskReadSessionUpdate: Observable<SessionUpdatedModel | null>;
217
+ sessionId?: string;
218
+ hostConnected(): void;
219
+ hostDisconnected(): void;
220
+ getDeployClientId(): string | null;
221
+ }
222
+
223
+ export declare class DeployTransferQueueManagerContext extends UmbContextBase {
224
+ #private;
225
+ queue: Observable<DeployItemModel[]>;
226
+ isInitialized: Observable<boolean>;
227
+ constructor(host: UmbControllerHost);
228
+ destroy(): void;
229
+ add(item: AddToQueueModel): Promise<DeployItemModel[]>;
230
+ clear(): Promise<void>;
231
+ remove(item: DeployItemModel): Promise<void>;
232
+ refresh(item?: AddToQueueModel): Promise<void>;
233
+ get allowDeployOptions(): boolean;
234
+ }
235
+
236
+ declare type DifferenceModel = {
237
+ title: string;
238
+ text?: string | null;
239
+ category?: string | null;
240
+ };
241
+
242
+ export declare type EntityActionType = "Deploy.EntityAction.EnvironmentRestore" | "Deploy.EntityAction.TreeRestore" | "Deploy.EntityAction.PartialRestore" | "Deploy.EntityAction.Queue" | "Deploy.EntityAction.Compare" | "Deploy.EntityAction.EnvironmentExport" | "Deploy.EntityAction.Export" | "Deploy.EntityAction.Import";
243
+
244
+ export declare interface EntityActionWithWorkDescription {
245
+ _progressModel: WorkDescriptionModel;
246
+ _completeModel: WorkDescriptionModel;
247
+ }
248
+
249
+ export declare type EnvironmentInfoModel = WorkspaceInfoModel;
250
+
251
+ declare type HeartbeatModel = {
252
+ sessionId: string;
253
+ serverTimeStamp: string;
254
+ workItem: string;
255
+ };
256
+
257
+ declare type ImportOnStartupConfigurationModel = {
258
+ enabled: boolean;
259
+ files: Array<string>;
260
+ fileAction: string;
261
+ warningsAsErrors: boolean;
262
+ entityTypes: Array<string>;
263
+ cultures: Array<string>;
264
+ username?: string | null;
265
+ };
266
+
267
+ export declare type LicenseStatusResponseModel = {
268
+ valid: boolean;
269
+ message?: string | null;
270
+ };
271
+
272
+ export declare interface ManifestDeployEntityActionRegistrar extends ManifestBase {
273
+ type: "deployEntityActionRegistrar";
274
+ actionAlias: EntityActionType;
275
+ forEntityTypes: Array<string | {
276
+ entityTypes: Array<string>;
277
+ conditions: Array<"default" | UmbExtensionConditionConfigMap[keyof UmbExtensionConditionConfigMap]>;
278
+ }>;
279
+ }
280
+
281
+ export declare interface ManifestDeployEntityTypeMapping extends ManifestBase {
282
+ type: "deployEntityTypeMapping";
283
+ entityTypes: Record<string, string>;
284
+ }
285
+
286
+ export declare type MismatchDetailsModel = {
287
+ udi: UdiModel;
288
+ name: string;
289
+ alias: string;
290
+ differences: Array<DifferenceModel>;
291
+ };
292
+
293
+ declare interface MismatchDiffModel {
294
+ Title: string;
295
+ Category?: string;
296
+ Text: string;
297
+ }
298
+
299
+ declare interface MismatchModel {
300
+ Udi: string;
301
+ Name: string;
302
+ Alias?: string;
303
+ Differences: Array<MismatchDiffModel>;
304
+ }
305
+
306
+ export declare interface ProgressModel {
307
+ status: WorkStatusModel;
308
+ message?: string;
309
+ progress?: number;
310
+ activity?: string;
311
+ timestamp?: string;
312
+ serverTimestamp?: string;
313
+ trace?: string;
314
+ showDebug?: boolean;
315
+ mismatches?: Array<MismatchDetailsModel>;
316
+ error?: DeployErrorModel;
317
+ }
318
+
319
+ declare type SessionUpdatedModel = {
320
+ sessionId: string;
321
+ serverTimeStamp: string;
322
+ workItem: string;
323
+ status: WorkStatusModel;
324
+ comment: string;
325
+ log: string;
326
+ exceptionJson: string;
327
+ percent: number;
328
+ mismatchList: Array<MismatchDetailsModel>;
329
+ };
330
+
331
+ declare type SuspensionsConfigurationModel = {
332
+ diskRead: string;
333
+ partialRestore: string;
334
+ restore: string;
335
+ deploy: string;
336
+ import: string;
337
+ export: string;
338
+ };
339
+
340
+ declare type UdiModel = {
341
+ readonly uriValue: string;
342
+ readonly entityType: string;
343
+ readonly isRoot: boolean;
344
+ };
345
+
346
+ declare type UmbracoCloudClientConfigurationInfoModel = ClientConfigurationInfoModel & {
347
+ isTrial: boolean;
348
+ trialExpireInDays: number;
349
+ projectName: string;
350
+ projectId: string;
351
+ projectAlias: string;
352
+ projectUrl: string;
353
+ };
354
+
355
+ export declare interface WorkDescriptionModel {
356
+ heading?: string;
357
+ description?: string;
358
+ elementName?: string;
359
+ }
360
+
361
+ export declare type WorkItemDetailModel = {
362
+ sessionId: string;
363
+ };
364
+
365
+ export declare type WorkspaceInfoModel = {
366
+ name: string;
367
+ type: string;
368
+ url: string;
369
+ umbracoUrl: string;
370
+ git: string;
371
+ current: boolean;
372
+ deployUrl: string;
373
+ };
374
+
375
+ export declare enum WorkStatusModel {
376
+ UNKNOWN = "Unknown",
377
+ NEW = "New",
378
+ EXECUTING = "Executing",
379
+ COMPLETED = "Completed",
380
+ FAILED = "Failed",
381
+ CANCELLED = "Cancelled",
382
+ TIMED_OUT = "TimedOut",
383
+ MISMATCH = "Mismatch"
384
+ }
385
+
386
+ export { }