@wix/auto_sdk_app-management_apps 1.0.0 → 1.0.1
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/build/cjs/index.d.ts +14 -14
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +161 -77
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +122 -56
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +14 -14
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +161 -77
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +122 -56
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +14 -14
- package/build/internal/cjs/index.typings.d.ts +161 -77
- package/build/internal/cjs/meta.d.ts +122 -56
- package/build/internal/es/index.d.mts +14 -14
- package/build/internal/es/index.typings.d.mts +161 -77
- package/build/internal/es/meta.d.mts +122 -56
- package/package.json +2 -2
|
@@ -12,7 +12,9 @@ interface V1App {
|
|
|
12
12
|
*/
|
|
13
13
|
_id?: string | null;
|
|
14
14
|
/**
|
|
15
|
-
* The display name
|
|
15
|
+
* The display name shown to users and in App Market after publication, separate from the namespace, slug, and code identifier.
|
|
16
|
+
* On creation and update, `<`, `>`, double quotes, and apostrophes are escaped as
|
|
17
|
+
* `<`, `>`, `"`, and `'`. Responses contain the escaped value, which can be longer than the submitted name.
|
|
16
18
|
* @maxLength 50
|
|
17
19
|
*/
|
|
18
20
|
name?: string;
|
|
@@ -22,16 +24,25 @@ interface V1App {
|
|
|
22
24
|
* @format GUID
|
|
23
25
|
*/
|
|
24
26
|
accountId?: string | null;
|
|
25
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Secrets for authentication and webhooks. Omitted from Get App responses by default.
|
|
29
|
+
* To retrieve them, include `APP_SECRETS` in Get App's `additionalFields`.
|
|
30
|
+
* Requires authorization to access the app's secrets.
|
|
31
|
+
*/
|
|
26
32
|
appSecrets?: AppSecrets;
|
|
27
33
|
/**
|
|
28
|
-
* App namespace, combining an account or company identifier with an app-name component.
|
|
34
|
+
* App namespace, combining an account or company identifier with an app-name component.
|
|
35
|
+
* For example, `@example-company/bookings-helper`.
|
|
36
|
+
* Assign it once through Set Namespace after creating the app. Don't supply it to Create App
|
|
37
|
+
* or Update App. Set Namespace fails if the app already has a namespace.
|
|
29
38
|
* @minLength 1
|
|
30
39
|
* @maxLength 150
|
|
31
40
|
*/
|
|
32
41
|
namespace?: string | null;
|
|
33
42
|
/**
|
|
34
|
-
*
|
|
43
|
+
* An identifier for referencing the app in code, separate from its display name, namespace, and slug.
|
|
44
|
+
* Must start with a letter, underscore, or dollar sign; remaining characters can also include digits.
|
|
45
|
+
* JavaScript reserved words aren't rejected. Choose a non-reserved identifier if using this value as a JavaScript variable name.
|
|
35
46
|
* Unique for non-companion apps. Companion apps return the shared value `companionApp`; use `id` to uniquely identify an app.
|
|
36
47
|
* For example, the namespace `@app-builder/my-cool-app` can be represented by the code identifier `AppBuilderMyCoolApp`.
|
|
37
48
|
* @minLength 3
|
|
@@ -40,7 +51,12 @@ interface V1App {
|
|
|
40
51
|
codeIdentifier?: string | null;
|
|
41
52
|
/** The state of the application. */
|
|
42
53
|
status?: StatusWithLiterals;
|
|
43
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Revision number, which increments by 1 each time the app is updated.
|
|
56
|
+
* To prevent conflicting changes, supply the current revision when calling Update App.
|
|
57
|
+
* Retrieve the latest revision through Get App before updating.
|
|
58
|
+
* Ignored when creating an app.
|
|
59
|
+
*/
|
|
44
60
|
revision?: string | null;
|
|
45
61
|
/**
|
|
46
62
|
* A human-readable, URL-friendly identifier for the app.
|
|
@@ -51,7 +67,9 @@ interface V1App {
|
|
|
51
67
|
/** URLs used by the app's OAuth flow. */
|
|
52
68
|
appUrls?: AppUrls;
|
|
53
69
|
/**
|
|
54
|
-
* Identity of the user or app that created the app, including its source template when applicable.
|
|
70
|
+
* Identity and creation channel of the user or app that created the app, including its source template when applicable.
|
|
71
|
+
* Create App derives `id` and `type` from the caller's identity, replacing any supplied values.
|
|
72
|
+
* You can supply `sourceTemplateId` during creation. Creator information can't be changed through Update App.
|
|
55
73
|
* @immutable
|
|
56
74
|
*/
|
|
57
75
|
createdBy?: CreatedBy;
|
|
@@ -67,7 +85,7 @@ interface V1App {
|
|
|
67
85
|
* @readonly
|
|
68
86
|
*/
|
|
69
87
|
_updatedDate?: Date | null;
|
|
70
|
-
/**
|
|
88
|
+
/** Event-based tracking of unreleased changes, grouped by type. Updates asynchronously; see each flag for its tracking scope. */
|
|
71
89
|
unreleasedChanges?: UnreleasedChanges;
|
|
72
90
|
/** Indicates whether this app is a companion app assigned to a specific site or account. */
|
|
73
91
|
companionApp?: boolean | null;
|
|
@@ -75,6 +93,8 @@ interface V1App {
|
|
|
75
93
|
interface AppSecrets {
|
|
76
94
|
/**
|
|
77
95
|
* App authentication secret. Keep this value in a secure backend secret store.
|
|
96
|
+
* During rotation, this field contains the previous secret while both secrets exist.
|
|
97
|
+
* After the previous secret is retired, this field contains the replacement secret.
|
|
78
98
|
* @readonly
|
|
79
99
|
* @format GUID
|
|
80
100
|
*/
|
|
@@ -86,7 +106,8 @@ interface AppSecrets {
|
|
|
86
106
|
*/
|
|
87
107
|
webhookPublicKey?: string;
|
|
88
108
|
/**
|
|
89
|
-
*
|
|
109
|
+
* Replacement authentication secret used during rotation. Present while the app has two secrets.
|
|
110
|
+
* After the previous secret is retired, this value moves to `appSecret` and this field is cleared.
|
|
90
111
|
* @readonly
|
|
91
112
|
* @format GUID
|
|
92
113
|
*/
|
|
@@ -132,44 +153,66 @@ interface AppUrls {
|
|
|
132
153
|
}
|
|
133
154
|
interface CreatedBy {
|
|
134
155
|
/**
|
|
135
|
-
* ID
|
|
156
|
+
* Creator ID derived from the caller's identity; a supplied value is replaced during creation.
|
|
157
|
+
* Identifies a user for `USER`, `CODE_GEN`, and `APP_BUILDER_SELF_HOSTED`, or an app for `APP`.
|
|
136
158
|
* @format GUID
|
|
137
159
|
*/
|
|
138
160
|
_id?: string;
|
|
139
|
-
/**
|
|
161
|
+
/** Creator identity or creation channel, derived from the caller's identity rather than a supplied value. */
|
|
140
162
|
type?: CreatedByTypeWithLiterals;
|
|
141
163
|
/**
|
|
142
|
-
* ID of the template
|
|
164
|
+
* ID of the source template, when applicable. Can be supplied to Create App.
|
|
143
165
|
* @format GUID
|
|
144
166
|
*/
|
|
145
167
|
sourceTemplateId?: string | null;
|
|
146
168
|
}
|
|
147
169
|
declare enum CreatedByType {
|
|
170
|
+
/** Created by a user; `id` is the user's ID. */
|
|
148
171
|
USER = "USER",
|
|
172
|
+
/** Created by an app; `id` is the app's ID. */
|
|
149
173
|
APP = "APP",
|
|
174
|
+
/** Created through code generation; `id` is the initiating user's ID. */
|
|
150
175
|
CODE_GEN = "CODE_GEN",
|
|
176
|
+
/** Created through the self-hosted app builder; `id` is the initiating user's ID. */
|
|
151
177
|
APP_BUILDER_SELF_HOSTED = "APP_BUILDER_SELF_HOSTED"
|
|
152
178
|
}
|
|
153
179
|
/** @enumType */
|
|
154
180
|
type CreatedByTypeWithLiterals = CreatedByType | 'USER' | 'APP' | 'CODE_GEN' | 'APP_BUILDER_SELF_HOSTED';
|
|
155
181
|
interface InstallationPreferences extends InstallationPreferencesOpenButtonOptionsOneOf {
|
|
156
|
-
/** Component to open when `openButtonAction` is `OPEN_COMPONENT_ID`. */
|
|
182
|
+
/** Component to open. Supply `componentId` when `openButtonAction` is `OPEN_COMPONENT_ID`. */
|
|
157
183
|
openComponentIdOptions?: OpenComponentId;
|
|
158
|
-
/**
|
|
184
|
+
/**
|
|
185
|
+
* Preferred destination after installing an app with both editor and dashboard components.
|
|
186
|
+
* A recognized dashboard page in `postInstallationComponentId` takes precedence over this preference.
|
|
187
|
+
* Otherwise, `DASHBOARD` selects the dashboard and `EDITOR` selects the editor.
|
|
188
|
+
* On sites without an editor, `EDITOR` falls back to the dashboard.
|
|
189
|
+
* `UNKNOWN_REDIRECT_TARGET` leaves the default installation navigation unchanged.
|
|
190
|
+
*/
|
|
159
191
|
overridePostInstallationRedirect?: RedirectTargetWithLiterals;
|
|
160
192
|
/**
|
|
161
|
-
* ID of the
|
|
193
|
+
* Optional ID of the app's dashboard page to open after installation.
|
|
194
|
+
* A recognized dashboard page takes precedence over `overridePostInstallationRedirect`.
|
|
195
|
+
* If omitted or not recognized as a dashboard page, navigation uses the redirect preference
|
|
196
|
+
* or the default installation flow. This field doesn't select an editor component.
|
|
162
197
|
* @format GUID
|
|
163
198
|
*/
|
|
164
199
|
postInstallationComponentId?: string | null;
|
|
165
|
-
/**
|
|
200
|
+
/**
|
|
201
|
+
* Action performed when the user selects the app's Open button after installation.
|
|
202
|
+
* For `OPEN_COMPONENT_ID`, supply `openComponentIdOptions.componentId`.
|
|
203
|
+
* `UNKNOWN_ACTION` means no explicit component-opening action is selected.
|
|
204
|
+
*/
|
|
166
205
|
openButtonAction?: OpenButtonActionWithLiterals;
|
|
167
|
-
/**
|
|
206
|
+
/**
|
|
207
|
+
* Custom warning shown when a user tries to uninstall the app.
|
|
208
|
+
* Select `NO_ACTION` for no custom warning; `NONE_ACTION` represents an unspecified preference.
|
|
209
|
+
* The product and shipping values select warning text, rather than performing cleanup.
|
|
210
|
+
*/
|
|
168
211
|
uninstallAction?: UninstallActionsWithLiterals;
|
|
169
212
|
}
|
|
170
213
|
/** @oneof */
|
|
171
214
|
interface InstallationPreferencesOpenButtonOptionsOneOf {
|
|
172
|
-
/** Component to open when `openButtonAction` is `OPEN_COMPONENT_ID`. */
|
|
215
|
+
/** Component to open. Supply `componentId` when `openButtonAction` is `OPEN_COMPONENT_ID`. */
|
|
173
216
|
openComponentIdOptions?: OpenComponentId;
|
|
174
217
|
}
|
|
175
218
|
declare enum ShowConsentBehaviour {
|
|
@@ -180,14 +223,19 @@ declare enum ShowConsentBehaviour {
|
|
|
180
223
|
/** @enumType */
|
|
181
224
|
type ShowConsentBehaviourWithLiterals = ShowConsentBehaviour | 'DEFAULT_BEHAVIOUR' | 'SHOW_CONSENT' | 'SKIP_CONSENT';
|
|
182
225
|
declare enum RedirectTarget {
|
|
226
|
+
/** Use the default installation navigation. */
|
|
183
227
|
UNKNOWN_REDIRECT_TARGET = "UNKNOWN_REDIRECT_TARGET",
|
|
228
|
+
/** Prefer the site dashboard for an app with editor and dashboard components. */
|
|
184
229
|
DASHBOARD = "DASHBOARD",
|
|
230
|
+
/** Prefer the editor; use the dashboard on sites without an editor. */
|
|
185
231
|
EDITOR = "EDITOR"
|
|
186
232
|
}
|
|
187
233
|
/** @enumType */
|
|
188
234
|
type RedirectTargetWithLiterals = RedirectTarget | 'UNKNOWN_REDIRECT_TARGET' | 'DASHBOARD' | 'EDITOR';
|
|
189
235
|
declare enum OpenButtonAction {
|
|
236
|
+
/** No explicit component-opening action is selected. */
|
|
190
237
|
UNKNOWN_ACTION = "UNKNOWN_ACTION",
|
|
238
|
+
/** Open the component specified by `openComponentIdOptions.componentId`. */
|
|
191
239
|
OPEN_COMPONENT_ID = "OPEN_COMPONENT_ID"
|
|
192
240
|
}
|
|
193
241
|
/** @enumType */
|
|
@@ -204,23 +252,41 @@ interface OpenComponentId {
|
|
|
204
252
|
componentId?: string;
|
|
205
253
|
}
|
|
206
254
|
declare enum UninstallActions {
|
|
255
|
+
/** Unspecified warning preference. Use `NO_ACTION` to explicitly select no custom warning. */
|
|
207
256
|
NONE_ACTION = "NONE_ACTION",
|
|
257
|
+
/** Show the standard uninstall message without a custom warning. Default when no preference is stored. */
|
|
208
258
|
NO_ACTION = "NO_ACTION",
|
|
259
|
+
/** Warn users to remove all products associated with the app from their store. */
|
|
209
260
|
REMOVE_ALL_PRODUCT = "REMOVE_ALL_PRODUCT",
|
|
261
|
+
/** Warn users that shipping to regions served only by the app will be removed from checkout. */
|
|
210
262
|
SHIPPING_RATES_REGION = "SHIPPING_RATES_REGION"
|
|
211
263
|
}
|
|
212
264
|
/** @enumType */
|
|
213
265
|
type UninstallActionsWithLiterals = UninstallActions | 'NONE_ACTION' | 'NO_ACTION' | 'REMOVE_ALL_PRODUCT' | 'SHIPPING_RATES_REGION';
|
|
266
|
+
/**
|
|
267
|
+
* Event-based tracking of changes not yet included in a released app version.
|
|
268
|
+
* Flags update asynchronously and reset when a production app version is created or updated.
|
|
269
|
+
*/
|
|
214
270
|
interface UnreleasedChanges {
|
|
215
|
-
/**
|
|
271
|
+
/** Whether components have unreleased creation, update, or deletion changes. */
|
|
216
272
|
componentsChanges?: boolean;
|
|
217
|
-
/**
|
|
273
|
+
/** Whether app translations have unreleased creation or update changes. */
|
|
218
274
|
appTranslationsChanges?: boolean;
|
|
219
|
-
/**
|
|
275
|
+
/**
|
|
276
|
+
* Whether component translations have unreleased update changes.
|
|
277
|
+
* Component-translation creation events currently aren't reflected in this flag.
|
|
278
|
+
*/
|
|
220
279
|
componentsTranslationChanges?: boolean;
|
|
221
|
-
/**
|
|
280
|
+
/**
|
|
281
|
+
* Whether app permissions have unreleased creation or update changes.
|
|
282
|
+
* Permission-deletion events currently aren't reflected in this flag.
|
|
283
|
+
*/
|
|
222
284
|
appPermissionsChanges?: boolean;
|
|
223
|
-
/**
|
|
285
|
+
/**
|
|
286
|
+
* Whether app identity fields have unreleased changes, such as `name`, `slug`, `namespace`, and `codeIdentifier`.
|
|
287
|
+
* Doesn't track changes to `appUrls` or `installationPreferences`.
|
|
288
|
+
* Updates asynchronously after the app's update event; the update response may not yet reflect this flag.
|
|
289
|
+
*/
|
|
224
290
|
appEntityChanges?: boolean;
|
|
225
291
|
}
|
|
226
292
|
interface AppComponentMetadata {
|
|
@@ -412,7 +478,7 @@ interface AccountInfo {
|
|
|
412
478
|
}
|
|
413
479
|
interface AppOwnerChangedEvent {
|
|
414
480
|
/**
|
|
415
|
-
*
|
|
481
|
+
* App ID.
|
|
416
482
|
* @format GUID
|
|
417
483
|
*/
|
|
418
484
|
appId?: string;
|
|
@@ -428,16 +494,16 @@ interface AppOwnerChangedEvent {
|
|
|
428
494
|
previousAccountId?: string;
|
|
429
495
|
}
|
|
430
496
|
interface CreateAppRequest {
|
|
431
|
-
/** App to
|
|
497
|
+
/** App to create. */
|
|
432
498
|
app: V1App;
|
|
433
499
|
}
|
|
434
500
|
interface CreateAppResponse {
|
|
435
|
-
/**
|
|
501
|
+
/** Created app. */
|
|
436
502
|
app?: V1App;
|
|
437
503
|
}
|
|
438
504
|
interface GetAppRequest {
|
|
439
505
|
/**
|
|
440
|
-
*
|
|
506
|
+
* App ID.
|
|
441
507
|
* @format GUID
|
|
442
508
|
*/
|
|
443
509
|
appId: string;
|
|
@@ -458,31 +524,31 @@ declare enum RequestedFields {
|
|
|
458
524
|
/** @enumType */
|
|
459
525
|
type RequestedFieldsWithLiterals = RequestedFields | 'APP_SECRETS';
|
|
460
526
|
interface GetAppResponse {
|
|
461
|
-
/**
|
|
527
|
+
/** Retrieved app. */
|
|
462
528
|
app?: V1App;
|
|
463
529
|
}
|
|
464
530
|
interface UpdateAppRequest {
|
|
465
|
-
/** App to
|
|
531
|
+
/** App to update. Specify the app ID, current revision, and fields to change. */
|
|
466
532
|
app: V1App;
|
|
467
533
|
}
|
|
468
534
|
interface UpdateAppResponse {
|
|
469
|
-
/**
|
|
535
|
+
/** Updated app. */
|
|
470
536
|
app?: V1App;
|
|
471
537
|
}
|
|
472
538
|
interface GenerateSlugRequest {
|
|
473
539
|
/**
|
|
474
|
-
*
|
|
540
|
+
* App ID.
|
|
475
541
|
* @format GUID
|
|
476
542
|
*/
|
|
477
543
|
appId: string;
|
|
478
544
|
}
|
|
479
545
|
interface GenerateSlugResponse {
|
|
480
|
-
/**
|
|
546
|
+
/** App with its generated or existing slug. */
|
|
481
547
|
app?: V1App;
|
|
482
548
|
}
|
|
483
549
|
interface RenameSlugRequest {
|
|
484
550
|
/**
|
|
485
|
-
*
|
|
551
|
+
* App ID.
|
|
486
552
|
* @format GUID
|
|
487
553
|
*/
|
|
488
554
|
appId?: string;
|
|
@@ -494,12 +560,12 @@ interface RenameSlugRequest {
|
|
|
494
560
|
newSlug?: string;
|
|
495
561
|
}
|
|
496
562
|
interface RenameSlugResponse {
|
|
497
|
-
/**
|
|
563
|
+
/** App with its slug updated to the requested `newSlug`. */
|
|
498
564
|
app?: V1App;
|
|
499
565
|
}
|
|
500
566
|
interface RenameCodeIdentifierRequest {
|
|
501
567
|
/**
|
|
502
|
-
*
|
|
568
|
+
* App ID.
|
|
503
569
|
* @format GUID
|
|
504
570
|
*/
|
|
505
571
|
appId?: string;
|
|
@@ -511,12 +577,12 @@ interface RenameCodeIdentifierRequest {
|
|
|
511
577
|
newCodeIdentifier?: string;
|
|
512
578
|
}
|
|
513
579
|
interface RenameCodeIdentifierResponse {
|
|
514
|
-
/**
|
|
580
|
+
/** App with its updated code identifier. */
|
|
515
581
|
app?: V1App;
|
|
516
582
|
}
|
|
517
583
|
interface GetNamespaceSuggestionRequest {
|
|
518
584
|
/**
|
|
519
|
-
*
|
|
585
|
+
* App ID.
|
|
520
586
|
* @format GUID
|
|
521
587
|
*/
|
|
522
588
|
appId: string;
|
|
@@ -532,12 +598,12 @@ declare enum NamespaceType {
|
|
|
532
598
|
/** @enumType */
|
|
533
599
|
type NamespaceTypeWithLiterals = NamespaceType | 'ACCOUNT' | 'COMPANY';
|
|
534
600
|
interface GetNamespaceSuggestionResponse {
|
|
535
|
-
/**
|
|
601
|
+
/** Suggested namespace. */
|
|
536
602
|
namespace?: string;
|
|
537
603
|
}
|
|
538
604
|
interface GetNamespaceSuggestionByNameRequest {
|
|
539
605
|
/**
|
|
540
|
-
*
|
|
606
|
+
* App display name used to derive a namespace suggestion.
|
|
541
607
|
* @maxLength 50
|
|
542
608
|
*/
|
|
543
609
|
name: string;
|
|
@@ -546,7 +612,7 @@ interface GetNamespaceSuggestionByNameRequest {
|
|
|
546
612
|
}
|
|
547
613
|
interface GetNamespaceSuggestionByNameResponse {
|
|
548
614
|
/**
|
|
549
|
-
*
|
|
615
|
+
* Suggested namespace.
|
|
550
616
|
* @minLength 1
|
|
551
617
|
* @maxLength 150
|
|
552
618
|
*/
|
|
@@ -554,12 +620,12 @@ interface GetNamespaceSuggestionByNameResponse {
|
|
|
554
620
|
}
|
|
555
621
|
interface SetNamespaceRequest {
|
|
556
622
|
/**
|
|
557
|
-
*
|
|
623
|
+
* App ID.
|
|
558
624
|
* @format GUID
|
|
559
625
|
*/
|
|
560
626
|
appId: string;
|
|
561
627
|
/**
|
|
562
|
-
* Name used to derive the app's namespace component
|
|
628
|
+
* Name used to derive the app's namespace component.
|
|
563
629
|
* Lowercased; runs of non-alphanumeric characters (including spaces and underscores) become hyphens, with leading/trailing separators removed.
|
|
564
630
|
* For example, `Bookings Helper` and `Bookings_Helper` become `bookings-helper`. If no letters or digits remain, uses `untitled`.
|
|
565
631
|
* Subject to the reserved-name restrictions documented on Set Namespace. For permitted Wix-owned apps, `wix` is removed before normalization.
|
|
@@ -595,7 +661,7 @@ interface SuggestCodeIdentifierResponse {
|
|
|
595
661
|
}
|
|
596
662
|
interface SetCodeIdentifierRequest {
|
|
597
663
|
/**
|
|
598
|
-
*
|
|
664
|
+
* App ID.
|
|
599
665
|
* @format GUID
|
|
600
666
|
*/
|
|
601
667
|
appId?: string;
|
|
@@ -775,7 +841,7 @@ interface Cursors {
|
|
|
775
841
|
}
|
|
776
842
|
interface SetPrivateAppRequest {
|
|
777
843
|
/**
|
|
778
|
-
*
|
|
844
|
+
* App ID.
|
|
779
845
|
* @format GUID
|
|
780
846
|
*/
|
|
781
847
|
appId?: string;
|
|
@@ -785,7 +851,7 @@ interface SetPrivateAppRequest {
|
|
|
785
851
|
revision?: string;
|
|
786
852
|
}
|
|
787
853
|
interface SetPrivateAppResponse {
|
|
788
|
-
/**
|
|
854
|
+
/** App with its `privateApp` setting updated to the requested value. */
|
|
789
855
|
app?: V1App;
|
|
790
856
|
}
|
|
791
857
|
interface AppChangedEvent {
|
|
@@ -874,7 +940,7 @@ interface AppSlugChanged {
|
|
|
874
940
|
}
|
|
875
941
|
interface SetAppOwnerRequest {
|
|
876
942
|
/**
|
|
877
|
-
*
|
|
943
|
+
* App ID.
|
|
878
944
|
* @format GUID
|
|
879
945
|
*/
|
|
880
946
|
appId?: string;
|
|
@@ -887,7 +953,7 @@ interface SetAppOwnerRequest {
|
|
|
887
953
|
revision?: string;
|
|
888
954
|
}
|
|
889
955
|
interface SetAppOwnerResponse {
|
|
890
|
-
/**
|
|
956
|
+
/** App owned by the requested `accountId`. */
|
|
891
957
|
app?: V1App;
|
|
892
958
|
}
|
|
893
959
|
interface AppUrlsChangedInOldServiceEvent extends AppUrlsChangedInOldServiceEventChangedUrlOneOf {
|
|
@@ -896,7 +962,7 @@ interface AppUrlsChangedInOldServiceEvent extends AppUrlsChangedInOldServiceEven
|
|
|
896
962
|
/** redirect uris */
|
|
897
963
|
redirectUriMessage?: RedirectUrlMessage;
|
|
898
964
|
/**
|
|
899
|
-
*
|
|
965
|
+
* App ID.
|
|
900
966
|
* @format GUID
|
|
901
967
|
*/
|
|
902
968
|
appId?: string;
|
|
@@ -918,7 +984,7 @@ interface RedirectUrlMessage {
|
|
|
918
984
|
}
|
|
919
985
|
interface CreateSecondarySecretRequest {
|
|
920
986
|
/**
|
|
921
|
-
*
|
|
987
|
+
* App ID.
|
|
922
988
|
* @format GUID
|
|
923
989
|
*/
|
|
924
990
|
appId: string;
|
|
@@ -942,7 +1008,7 @@ interface ActivateSecondarySecretResponse {
|
|
|
942
1008
|
}
|
|
943
1009
|
interface RotateSecretRequest {
|
|
944
1010
|
/**
|
|
945
|
-
*
|
|
1011
|
+
* App ID.
|
|
946
1012
|
* @format GUID
|
|
947
1013
|
*/
|
|
948
1014
|
appId?: string;
|
|
@@ -953,7 +1019,7 @@ interface RotateSecretResponse {
|
|
|
953
1019
|
}
|
|
954
1020
|
interface RollbackSecretRequest {
|
|
955
1021
|
/**
|
|
956
|
-
*
|
|
1022
|
+
* App ID.
|
|
957
1023
|
* @format GUID
|
|
958
1024
|
*/
|
|
959
1025
|
appId?: string;
|
|
@@ -964,24 +1030,24 @@ interface RollbackSecretResponse {
|
|
|
964
1030
|
}
|
|
965
1031
|
interface RevokeSecretRequest {
|
|
966
1032
|
/**
|
|
967
|
-
*
|
|
1033
|
+
* App ID.
|
|
968
1034
|
* @format GUID
|
|
969
1035
|
*/
|
|
970
1036
|
appId: string;
|
|
971
|
-
/**
|
|
1037
|
+
/** Credential to revoke. The app must have both a previous and a replacement secret. */
|
|
972
1038
|
secretToRevoke: SecretToRevokeWithLiterals;
|
|
973
1039
|
}
|
|
974
|
-
/**
|
|
1040
|
+
/** Credential to revoke during app-secret rotation. */
|
|
975
1041
|
declare enum SecretToRevoke {
|
|
976
|
-
/**
|
|
1042
|
+
/** Switch signing to the replacement secret and schedule retirement of the previous secret. */
|
|
977
1043
|
PREVIOUS_SECRET = "PREVIOUS_SECRET",
|
|
978
|
-
/**
|
|
1044
|
+
/** Discard the replacement secret and restore signing with the previous secret. */
|
|
979
1045
|
NEW_SECRET = "NEW_SECRET"
|
|
980
1046
|
}
|
|
981
1047
|
/** @enumType */
|
|
982
1048
|
type SecretToRevokeWithLiterals = SecretToRevoke | 'PREVIOUS_SECRET' | 'NEW_SECRET';
|
|
983
1049
|
interface RevokeSecretResponse {
|
|
984
|
-
/** Scheduled retirement time of the previous secret.
|
|
1050
|
+
/** Scheduled retirement time of the previous secret. Returned for `PREVIOUS_SECRET` and omitted for `NEW_SECRET`. Use the latest returned timestamp. */
|
|
985
1051
|
previousSecretRevokeAt?: Date | null;
|
|
986
1052
|
}
|
|
987
1053
|
/** payload for kafka event for this version on app submit */
|
|
@@ -1176,13 +1242,13 @@ interface AssociateServiceAppResponse {
|
|
|
1176
1242
|
* Setting `companionApp` to `true` is restricted to authorized companion-app provisioning services.
|
|
1177
1243
|
* A supplied `slug` is ignored except for authorized companion-app provisioning callers; use Generate Slug after creation.
|
|
1178
1244
|
* A supplied `codeIdentifier` must not contain `wix` (case-insensitive).
|
|
1179
|
-
* @param app - App to
|
|
1245
|
+
* @param app - App to create.
|
|
1180
1246
|
* @public
|
|
1181
1247
|
* @documentationMaturity preview
|
|
1182
1248
|
* @requiredField app
|
|
1183
1249
|
* @permissionId DEV_CENTER.MANAGE_APPS
|
|
1184
1250
|
* @permissionId DEV_CENTER.CREATE_APP
|
|
1185
|
-
* @returns
|
|
1251
|
+
* @returns Created app.
|
|
1186
1252
|
* @fqn wix.devcenter.apps.v1.AppsService.CreateApp
|
|
1187
1253
|
*/
|
|
1188
1254
|
declare function createApp(app: V1App): Promise<NonNullablePaths<V1App, `name` | `appSecrets.appSecret` | `appSecrets.webhookPublicKey` | `appSecrets.secondarySecretActive` | `status` | `appUrls.redirectUris` | `createdBy._id` | `createdBy.type` | `installationPreferences.openComponentIdOptions.componentId` | `installationPreferences.overridePostInstallationRedirect` | `installationPreferences.openButtonAction` | `installationPreferences.uninstallAction` | `unreleasedChanges.componentsChanges` | `unreleasedChanges.appTranslationsChanges` | `unreleasedChanges.componentsTranslationChanges` | `unreleasedChanges.appPermissionsChanges` | `unreleasedChanges.appEntityChanges`, 2>>;
|
|
@@ -1190,13 +1256,13 @@ declare function createApp(app: V1App): Promise<NonNullablePaths<V1App, `name` |
|
|
|
1190
1256
|
* Retrieves an app by ID. App secrets are omitted by default.
|
|
1191
1257
|
* To include `appSecrets`, add `APP_SECRETS` to `additionalFields`.
|
|
1192
1258
|
* Retrieving secrets requires authorization to access the app's secrets.
|
|
1193
|
-
* @param appId -
|
|
1259
|
+
* @param appId - App ID.
|
|
1194
1260
|
* @public
|
|
1195
1261
|
* @documentationMaturity preview
|
|
1196
1262
|
* @requiredField appId
|
|
1197
1263
|
* @permissionId WIX_DEVELOPERS.READ_APPS
|
|
1198
1264
|
* @permissionId DEV_CENTER.READ_APPS
|
|
1199
|
-
* @returns
|
|
1265
|
+
* @returns Retrieved app.
|
|
1200
1266
|
* @fqn wix.devcenter.apps.v1.AppsService.GetApp
|
|
1201
1267
|
*/
|
|
1202
1268
|
declare function getApp(appId: string, options?: GetAppOptions): Promise<NonNullablePaths<V1App, `name` | `appSecrets.appSecret` | `appSecrets.webhookPublicKey` | `appSecrets.secondarySecretActive` | `status` | `appUrls.redirectUris` | `createdBy._id` | `createdBy.type` | `installationPreferences.openComponentIdOptions.componentId` | `installationPreferences.overridePostInstallationRedirect` | `installationPreferences.openButtonAction` | `installationPreferences.uninstallAction` | `unreleasedChanges.componentsChanges` | `unreleasedChanges.appTranslationsChanges` | `unreleasedChanges.componentsTranslationChanges` | `unreleasedChanges.appPermissionsChanges` | `unreleasedChanges.appEntityChanges`, 2>>;
|
|
@@ -1219,7 +1285,7 @@ interface GetAppOptions {
|
|
|
1219
1285
|
*
|
|
1220
1286
|
* This method cannot update `appSecrets`, `accountId`, `namespace`, `slug`, `createdBy`,
|
|
1221
1287
|
* `companionApp`, or `codeIdentifier`. Including any of these fields or their nested fields in the
|
|
1222
|
-
*
|
|
1288
|
+
* request causes the entire request to fail; they aren't silently ignored.
|
|
1223
1289
|
* Use Set Namespace to assign a namespace and Generate Slug to generate a slug. To rotate app
|
|
1224
1290
|
* secrets, use Create Secondary Secret and Revoke Secret. This method does not support changing
|
|
1225
1291
|
* the owning account, creator, companion-app designation, or code identifier.
|
|
@@ -1234,7 +1300,7 @@ interface GetAppOptions {
|
|
|
1234
1300
|
* @permissionId DEV_CENTER.MODIFY_APP_PROPERTIES
|
|
1235
1301
|
* @permissionId DEV_CENTER.WIX_BLOCKS_REQUESTS
|
|
1236
1302
|
* @permissionId DEV_CENTER.WRITE_APP
|
|
1237
|
-
* @returns
|
|
1303
|
+
* @returns Updated app.
|
|
1238
1304
|
* @fqn wix.devcenter.apps.v1.AppsService.UpdateApp
|
|
1239
1305
|
*/
|
|
1240
1306
|
declare function updateApp(_id: string, app: NonNullablePaths<UpdateApp, `revision`, 0>): Promise<NonNullablePaths<V1App, `name` | `appSecrets.appSecret` | `appSecrets.webhookPublicKey` | `appSecrets.secondarySecretActive` | `status` | `appUrls.redirectUris` | `createdBy._id` | `createdBy.type` | `installationPreferences.openComponentIdOptions.componentId` | `installationPreferences.overridePostInstallationRedirect` | `installationPreferences.openButtonAction` | `installationPreferences.uninstallAction` | `unreleasedChanges.componentsChanges` | `unreleasedChanges.appTranslationsChanges` | `unreleasedChanges.componentsTranslationChanges` | `unreleasedChanges.appPermissionsChanges` | `unreleasedChanges.appEntityChanges`, 2>>;
|
|
@@ -1245,7 +1311,9 @@ interface UpdateApp {
|
|
|
1245
1311
|
*/
|
|
1246
1312
|
_id?: string | null;
|
|
1247
1313
|
/**
|
|
1248
|
-
* The display name
|
|
1314
|
+
* The display name shown to users and in App Market after publication, separate from the namespace, slug, and code identifier.
|
|
1315
|
+
* On creation and update, `<`, `>`, double quotes, and apostrophes are escaped as
|
|
1316
|
+
* `<`, `>`, `"`, and `'`. Responses contain the escaped value, which can be longer than the submitted name.
|
|
1249
1317
|
* @maxLength 50
|
|
1250
1318
|
*/
|
|
1251
1319
|
name?: string;
|
|
@@ -1255,16 +1323,25 @@ interface UpdateApp {
|
|
|
1255
1323
|
* @format GUID
|
|
1256
1324
|
*/
|
|
1257
1325
|
accountId?: string | null;
|
|
1258
|
-
/**
|
|
1326
|
+
/**
|
|
1327
|
+
* Secrets for authentication and webhooks. Omitted from Get App responses by default.
|
|
1328
|
+
* To retrieve them, include `APP_SECRETS` in Get App's `additionalFields`.
|
|
1329
|
+
* Requires authorization to access the app's secrets.
|
|
1330
|
+
*/
|
|
1259
1331
|
appSecrets?: AppSecrets;
|
|
1260
1332
|
/**
|
|
1261
|
-
* App namespace, combining an account or company identifier with an app-name component.
|
|
1333
|
+
* App namespace, combining an account or company identifier with an app-name component.
|
|
1334
|
+
* For example, `@example-company/bookings-helper`.
|
|
1335
|
+
* Assign it once through Set Namespace after creating the app. Don't supply it to Create App
|
|
1336
|
+
* or Update App. Set Namespace fails if the app already has a namespace.
|
|
1262
1337
|
* @minLength 1
|
|
1263
1338
|
* @maxLength 150
|
|
1264
1339
|
*/
|
|
1265
1340
|
namespace?: string | null;
|
|
1266
1341
|
/**
|
|
1267
|
-
*
|
|
1342
|
+
* An identifier for referencing the app in code, separate from its display name, namespace, and slug.
|
|
1343
|
+
* Must start with a letter, underscore, or dollar sign; remaining characters can also include digits.
|
|
1344
|
+
* JavaScript reserved words aren't rejected. Choose a non-reserved identifier if using this value as a JavaScript variable name.
|
|
1268
1345
|
* Unique for non-companion apps. Companion apps return the shared value `companionApp`; use `id` to uniquely identify an app.
|
|
1269
1346
|
* For example, the namespace `@app-builder/my-cool-app` can be represented by the code identifier `AppBuilderMyCoolApp`.
|
|
1270
1347
|
* @minLength 3
|
|
@@ -1273,7 +1350,12 @@ interface UpdateApp {
|
|
|
1273
1350
|
codeIdentifier?: string | null;
|
|
1274
1351
|
/** The state of the application. */
|
|
1275
1352
|
status?: StatusWithLiterals;
|
|
1276
|
-
/**
|
|
1353
|
+
/**
|
|
1354
|
+
* Revision number, which increments by 1 each time the app is updated.
|
|
1355
|
+
* To prevent conflicting changes, supply the current revision when calling Update App.
|
|
1356
|
+
* Retrieve the latest revision through Get App before updating.
|
|
1357
|
+
* Ignored when creating an app.
|
|
1358
|
+
*/
|
|
1277
1359
|
revision?: string | null;
|
|
1278
1360
|
/**
|
|
1279
1361
|
* A human-readable, URL-friendly identifier for the app.
|
|
@@ -1284,7 +1366,9 @@ interface UpdateApp {
|
|
|
1284
1366
|
/** URLs used by the app's OAuth flow. */
|
|
1285
1367
|
appUrls?: AppUrls;
|
|
1286
1368
|
/**
|
|
1287
|
-
* Identity of the user or app that created the app, including its source template when applicable.
|
|
1369
|
+
* Identity and creation channel of the user or app that created the app, including its source template when applicable.
|
|
1370
|
+
* Create App derives `id` and `type` from the caller's identity, replacing any supplied values.
|
|
1371
|
+
* You can supply `sourceTemplateId` during creation. Creator information can't be changed through Update App.
|
|
1288
1372
|
* @immutable
|
|
1289
1373
|
*/
|
|
1290
1374
|
createdBy?: CreatedBy;
|
|
@@ -1300,7 +1384,7 @@ interface UpdateApp {
|
|
|
1300
1384
|
* @readonly
|
|
1301
1385
|
*/
|
|
1302
1386
|
_updatedDate?: Date | null;
|
|
1303
|
-
/**
|
|
1387
|
+
/** Event-based tracking of unreleased changes, grouped by type. Updates asynchronously; see each flag for its tracking scope. */
|
|
1304
1388
|
unreleasedChanges?: UnreleasedChanges;
|
|
1305
1389
|
/** Indicates whether this app is a companion app assigned to a specific site or account. */
|
|
1306
1390
|
companionApp?: boolean | null;
|
|
@@ -1310,7 +1394,7 @@ interface UpdateApp {
|
|
|
1310
1394
|
* Does not generate a slug for companion apps; a companion app without a slug is returned unchanged.
|
|
1311
1395
|
* When generating a slug, the stored app name must not contain `wix` for non-Wix apps (case-insensitive).
|
|
1312
1396
|
* The exact names `google`, `facebook`, and `amazon` require privileged authorization (case-insensitive).
|
|
1313
|
-
* @param appId -
|
|
1397
|
+
* @param appId - App ID.
|
|
1314
1398
|
* @public
|
|
1315
1399
|
* @documentationMaturity preview
|
|
1316
1400
|
* @requiredField appId
|
|
@@ -1327,7 +1411,7 @@ declare function generateSlug(appId: string): Promise<NonNullablePaths<GenerateS
|
|
|
1327
1411
|
* The exact names `google`, `facebook`, and `amazon` require privileged authorization (case-insensitive).
|
|
1328
1412
|
* If the base namespace is already used, suggests an alternative with a numeric suffix. Suggestions do not reserve a namespace.
|
|
1329
1413
|
* Set Namespace derives its own namespace from `appName` without automatically adding a collision suffix. Choose a different `appName` and retry if it conflicts.
|
|
1330
|
-
* @param appId -
|
|
1414
|
+
* @param appId - App ID.
|
|
1331
1415
|
* @public
|
|
1332
1416
|
* @documentationMaturity preview
|
|
1333
1417
|
* @requiredField appId
|
|
@@ -1348,7 +1432,7 @@ interface GetNamespaceSuggestionOptions {
|
|
|
1348
1432
|
* The exact names `google`, `facebook`, and `amazon` require privileged authorization (case-insensitive).
|
|
1349
1433
|
* If the base namespace is already used, suggests an alternative with a numeric suffix. Suggestions do not reserve a namespace.
|
|
1350
1434
|
* Set Namespace derives its own namespace from `appName` without automatically adding a collision suffix. Choose a different `appName` and retry if it conflicts.
|
|
1351
|
-
* @param name -
|
|
1435
|
+
* @param name - App display name used to derive a namespace suggestion.
|
|
1352
1436
|
* @public
|
|
1353
1437
|
* @documentationMaturity preview
|
|
1354
1438
|
* @requiredField name
|
|
@@ -1367,8 +1451,8 @@ interface GetNamespaceSuggestionByNameOptions {
|
|
|
1367
1451
|
* The exact names `google`, `facebook`, and `amazon` require privileged authorization (case-insensitive).
|
|
1368
1452
|
* Unlike namespace suggestions, this method does not automatically add a suffix when the derived namespace is already used.
|
|
1369
1453
|
* Suggestions are not reservations; on a collision, choose a different `appName` and retry.
|
|
1370
|
-
* @param appId -
|
|
1371
|
-
* @param appName - Name used to derive the app's namespace component
|
|
1454
|
+
* @param appId - App ID.
|
|
1455
|
+
* @param appName - Name used to derive the app's namespace component.
|
|
1372
1456
|
* Lowercased; runs of non-alphanumeric characters (including spaces and underscores) become hyphens, with leading/trailing separators removed.
|
|
1373
1457
|
* For example, `Bookings Helper` and `Bookings_Helper` become `bookings-helper`. If no letters or digits remain, uses `untitled`.
|
|
1374
1458
|
* Subject to the reserved-name restrictions documented on Set Namespace. For permitted Wix-owned apps, `wix` is removed before normalization.
|
|
@@ -1391,7 +1475,7 @@ interface SetNamespaceOptions {
|
|
|
1391
1475
|
* (adding one here would break consistent-audience-for-shared-permission across all of them).
|
|
1392
1476
|
* Renaming the permission would change who is actually authorized, so it stays as-is —
|
|
1393
1477
|
* the real check is the MANUAL validateUpdateAppPermission(...) in code.
|
|
1394
|
-
* @param appId -
|
|
1478
|
+
* @param appId - App ID.
|
|
1395
1479
|
* @public
|
|
1396
1480
|
* @documentationMaturity preview
|
|
1397
1481
|
* @requiredField appId
|
|
@@ -1408,8 +1492,8 @@ interface CreateSecondarySecretOptions {
|
|
|
1408
1492
|
* (adding one here would break consistent-audience-for-shared-permission across all of them).
|
|
1409
1493
|
* Renaming the permission would change who is actually authorized, so it stays as-is —
|
|
1410
1494
|
* the real check is the MANUAL validateUpdateAppPermission(...) in code.
|
|
1411
|
-
* @param appId -
|
|
1412
|
-
* @param secretToRevoke -
|
|
1495
|
+
* @param appId - App ID.
|
|
1496
|
+
* @param secretToRevoke - Credential to revoke. The app must have both a previous and a replacement secret.
|
|
1413
1497
|
* @public
|
|
1414
1498
|
* @documentationMaturity preview
|
|
1415
1499
|
* @requiredField appId
|