@wix/auto_sdk_app-management_apps 1.0.0 → 1.0.2

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.
@@ -13,7 +13,9 @@ interface V1App {
13
13
  */
14
14
  id?: string | null;
15
15
  /**
16
- * The display name of the application, shown to users and in App Market after publication. This is separate from the app namespace, slug, and code identifier.
16
+ * The display name shown to users and in App Market after publication, separate from the namespace, slug, and code identifier.
17
+ * On creation and update, `<`, `>`, double quotes, and apostrophes are escaped as
18
+ * `&lt;`, `&gt;`, `&quot;`, and `&apos;`. Responses contain the escaped value, which can be longer than the submitted name.
17
19
  * @maxLength 50
18
20
  */
19
21
  name?: string;
@@ -23,16 +25,25 @@ interface V1App {
23
25
  * @format GUID
24
26
  */
25
27
  accountId?: string | null;
26
- /** Secrets for authentication and webhooks. */
28
+ /**
29
+ * Secrets for authentication and webhooks. Omitted from Get App responses by default.
30
+ * To retrieve them, include `APP_SECRETS` in Get App's `additionalFields`.
31
+ * Requires authorization to access the app's secrets.
32
+ */
27
33
  appSecrets?: AppSecrets;
28
34
  /**
29
- * App namespace, combining an account or company identifier with an app-name component. For example, `@example-company/bookings-helper`.
35
+ * App namespace, combining an account or company identifier with an app-name component.
36
+ * For example, `@example-company/bookings-helper`.
37
+ * Assign it once through Set Namespace after creating the app. Don't supply it to Create App
38
+ * or Update App. Set Namespace fails if the app already has a namespace.
30
39
  * @minLength 1
31
40
  * @maxLength 150
32
41
  */
33
42
  namespace?: string | null;
34
43
  /**
35
- * A JavaScript-compatible name for referencing the app in code, separate from its display name, namespace, and slug.
44
+ * An identifier for referencing the app in code, separate from its display name, namespace, and slug.
45
+ * Must start with a letter, underscore, or dollar sign; remaining characters can also include digits.
46
+ * JavaScript reserved words aren't rejected. Choose a non-reserved identifier if using this value as a JavaScript variable name.
36
47
  * Unique for non-companion apps. Companion apps return the shared value `companionApp`; use `id` to uniquely identify an app.
37
48
  * For example, the namespace `@app-builder/my-cool-app` can be represented by the code identifier `AppBuilderMyCoolApp`.
38
49
  * @minLength 3
@@ -41,7 +52,12 @@ interface V1App {
41
52
  codeIdentifier?: string | null;
42
53
  /** The state of the application. */
43
54
  status?: StatusWithLiterals;
44
- /** Revision of the app. Changes each time the app is modified. */
55
+ /**
56
+ * Revision number, which increments by 1 each time the app is updated.
57
+ * To prevent conflicting changes, supply the current revision when calling Update App.
58
+ * Retrieve the latest revision through Get App before updating.
59
+ * Ignored when creating an app.
60
+ */
45
61
  revision?: string | null;
46
62
  /**
47
63
  * A human-readable, URL-friendly identifier for the app.
@@ -52,7 +68,9 @@ interface V1App {
52
68
  /** URLs used by the app's OAuth flow. */
53
69
  appUrls?: AppUrls;
54
70
  /**
55
- * Identity of the user or app that created the app, including its source template when applicable.
71
+ * Identity and creation channel of the user or app that created the app, including its source template when applicable.
72
+ * Create App derives `id` and `type` from the caller's identity, replacing any supplied values.
73
+ * You can supply `sourceTemplateId` during creation. Creator information can't be changed through Update App.
56
74
  * @immutable
57
75
  */
58
76
  createdBy?: CreatedBy;
@@ -68,7 +86,7 @@ interface V1App {
68
86
  * @readonly
69
87
  */
70
88
  updatedDate?: Date | null;
71
- /** Changes not yet included in a released app version, grouped by type. */
89
+ /** Event-based tracking of unreleased changes, grouped by type. Updates asynchronously; see each flag for its tracking scope. */
72
90
  unreleasedChanges?: UnreleasedChanges;
73
91
  /** Indicates whether this app is a companion app assigned to a specific site or account. */
74
92
  companionApp?: boolean | null;
@@ -76,6 +94,8 @@ interface V1App {
76
94
  interface AppSecrets {
77
95
  /**
78
96
  * App authentication secret. Keep this value in a secure backend secret store.
97
+ * During rotation, this field contains the previous secret while both secrets exist.
98
+ * After the previous secret is retired, this field contains the replacement secret.
79
99
  * @readonly
80
100
  * @format GUID
81
101
  */
@@ -87,7 +107,8 @@ interface AppSecrets {
87
107
  */
88
108
  webhookPublicKey?: string;
89
109
  /**
90
- * Additional authentication secret used during rotation. Present while the app has two secrets.
110
+ * Replacement authentication secret used during rotation. Present while the app has two secrets.
111
+ * After the previous secret is retired, this value moves to `appSecret` and this field is cleared.
91
112
  * @readonly
92
113
  * @format GUID
93
114
  */
@@ -130,47 +151,76 @@ interface AppUrls {
130
151
  * @maxSize 100
131
152
  */
132
153
  redirectUris?: string[];
154
+ /**
155
+ * Allowed post-installation URLs, where Wix redirects the user after installing the app from an external install link.
156
+ * A `postInstallationUrl` matches an entry when they are equal, ignoring the query string.
157
+ * @format WEB_URL
158
+ * @maxSize 100
159
+ */
160
+ postInstallationUrls?: string[];
133
161
  }
134
162
  interface CreatedBy {
135
163
  /**
136
- * ID of the user or app that created the app.
164
+ * Creator ID derived from the caller's identity; a supplied value is replaced during creation.
165
+ * Identifies a user for `USER`, `CODE_GEN`, and `APP_BUILDER_SELF_HOSTED`, or an app for `APP`.
137
166
  * @format GUID
138
167
  */
139
168
  id?: string;
140
- /** Type of identity that created the app. */
169
+ /** Creator identity or creation channel, derived from the caller's identity rather than a supplied value. */
141
170
  type?: CreatedByTypeWithLiterals;
142
171
  /**
143
- * ID of the template used to create the app, when applicable.
172
+ * ID of the source template, when applicable. Can be supplied to Create App.
144
173
  * @format GUID
145
174
  */
146
175
  sourceTemplateId?: string | null;
147
176
  }
148
177
  declare enum CreatedByType {
178
+ /** Created by a user; `id` is the user's ID. */
149
179
  USER = "USER",
180
+ /** Created by an app; `id` is the app's ID. */
150
181
  APP = "APP",
182
+ /** Created through code generation; `id` is the initiating user's ID. */
151
183
  CODE_GEN = "CODE_GEN",
184
+ /** Created through the self-hosted app builder; `id` is the initiating user's ID. */
152
185
  APP_BUILDER_SELF_HOSTED = "APP_BUILDER_SELF_HOSTED"
153
186
  }
154
187
  /** @enumType */
155
188
  type CreatedByTypeWithLiterals = CreatedByType | 'USER' | 'APP' | 'CODE_GEN' | 'APP_BUILDER_SELF_HOSTED';
156
189
  interface InstallationPreferences extends InstallationPreferencesOpenButtonOptionsOneOf {
157
- /** Component to open when `openButtonAction` is `OPEN_COMPONENT_ID`. */
190
+ /** Component to open. Supply `componentId` when `openButtonAction` is `OPEN_COMPONENT_ID`. */
158
191
  openComponentIdOptions?: OpenComponentId;
159
- /** Destination for the user after installing the app. */
192
+ /**
193
+ * Preferred destination after installing an app with both editor and dashboard components.
194
+ * A recognized dashboard page in `postInstallationComponentId` takes precedence over this preference.
195
+ * Otherwise, `DASHBOARD` selects the dashboard and `EDITOR` selects the editor.
196
+ * On sites without an editor, `EDITOR` falls back to the dashboard.
197
+ * `UNKNOWN_REDIRECT_TARGET` leaves the default installation navigation unchanged.
198
+ */
160
199
  overridePostInstallationRedirect?: RedirectTargetWithLiterals;
161
200
  /**
162
- * ID of the component the user is redirected to after installing the app.
201
+ * Optional ID of the app's dashboard page to open after installation.
202
+ * A recognized dashboard page takes precedence over `overridePostInstallationRedirect`.
203
+ * If omitted or not recognized as a dashboard page, navigation uses the redirect preference
204
+ * or the default installation flow. This field doesn't select an editor component.
163
205
  * @format GUID
164
206
  */
165
207
  postInstallationComponentId?: string | null;
166
- /** Action performed when the user selects the app's Open button after installation. */
208
+ /**
209
+ * Action performed when the user selects the app's Open button after installation.
210
+ * For `OPEN_COMPONENT_ID`, supply `openComponentIdOptions.componentId`.
211
+ * `UNKNOWN_ACTION` means no explicit component-opening action is selected.
212
+ */
167
213
  openButtonAction?: OpenButtonActionWithLiterals;
168
- /** Action required before the app can be uninstalled. */
214
+ /**
215
+ * Custom warning shown when a user tries to uninstall the app.
216
+ * Select `NO_ACTION` for no custom warning; `NONE_ACTION` represents an unspecified preference.
217
+ * The product and shipping values select warning text, rather than performing cleanup.
218
+ */
169
219
  uninstallAction?: UninstallActionsWithLiterals;
170
220
  }
171
221
  /** @oneof */
172
222
  interface InstallationPreferencesOpenButtonOptionsOneOf {
173
- /** Component to open when `openButtonAction` is `OPEN_COMPONENT_ID`. */
223
+ /** Component to open. Supply `componentId` when `openButtonAction` is `OPEN_COMPONENT_ID`. */
174
224
  openComponentIdOptions?: OpenComponentId;
175
225
  }
176
226
  declare enum ShowConsentBehaviour {
@@ -181,14 +231,19 @@ declare enum ShowConsentBehaviour {
181
231
  /** @enumType */
182
232
  type ShowConsentBehaviourWithLiterals = ShowConsentBehaviour | 'DEFAULT_BEHAVIOUR' | 'SHOW_CONSENT' | 'SKIP_CONSENT';
183
233
  declare enum RedirectTarget {
234
+ /** Use the default installation navigation. */
184
235
  UNKNOWN_REDIRECT_TARGET = "UNKNOWN_REDIRECT_TARGET",
236
+ /** Prefer the site dashboard for an app with editor and dashboard components. */
185
237
  DASHBOARD = "DASHBOARD",
238
+ /** Prefer the editor; use the dashboard on sites without an editor. */
186
239
  EDITOR = "EDITOR"
187
240
  }
188
241
  /** @enumType */
189
242
  type RedirectTargetWithLiterals = RedirectTarget | 'UNKNOWN_REDIRECT_TARGET' | 'DASHBOARD' | 'EDITOR';
190
243
  declare enum OpenButtonAction {
244
+ /** No explicit component-opening action is selected. */
191
245
  UNKNOWN_ACTION = "UNKNOWN_ACTION",
246
+ /** Open the component specified by `openComponentIdOptions.componentId`. */
192
247
  OPEN_COMPONENT_ID = "OPEN_COMPONENT_ID"
193
248
  }
194
249
  /** @enumType */
@@ -205,23 +260,41 @@ interface OpenComponentId {
205
260
  componentId?: string;
206
261
  }
207
262
  declare enum UninstallActions {
263
+ /** Unspecified warning preference. Use `NO_ACTION` to explicitly select no custom warning. */
208
264
  NONE_ACTION = "NONE_ACTION",
265
+ /** Show the standard uninstall message without a custom warning. Default when no preference is stored. */
209
266
  NO_ACTION = "NO_ACTION",
267
+ /** Warn users to remove all products associated with the app from their store. */
210
268
  REMOVE_ALL_PRODUCT = "REMOVE_ALL_PRODUCT",
269
+ /** Warn users that shipping to regions served only by the app will be removed from checkout. */
211
270
  SHIPPING_RATES_REGION = "SHIPPING_RATES_REGION"
212
271
  }
213
272
  /** @enumType */
214
273
  type UninstallActionsWithLiterals = UninstallActions | 'NONE_ACTION' | 'NO_ACTION' | 'REMOVE_ALL_PRODUCT' | 'SHIPPING_RATES_REGION';
274
+ /**
275
+ * Event-based tracking of changes not yet included in a released app version.
276
+ * Flags update asynchronously and reset when a production app version is created or updated.
277
+ */
215
278
  interface UnreleasedChanges {
216
- /** Indicate components changes (create, update, delete) */
279
+ /** Whether components have unreleased creation, update, or deletion changes. */
217
280
  componentsChanges?: boolean;
218
- /** Indicate app translations changes (create, update) */
281
+ /** Whether app translations have unreleased creation or update changes. */
219
282
  appTranslationsChanges?: boolean;
220
- /** Indicate components translations changes (create, update) */
283
+ /**
284
+ * Whether component translations have unreleased update changes.
285
+ * Component-translation creation events currently aren't reflected in this flag.
286
+ */
221
287
  componentsTranslationChanges?: boolean;
222
- /** Indicate app permissions changes (create, update, delete) */
288
+ /**
289
+ * Whether app permissions have unreleased creation or update changes.
290
+ * Permission-deletion events currently aren't reflected in this flag.
291
+ */
223
292
  appPermissionsChanges?: boolean;
224
- /** Indicate app entity field changes (name, slug, namespace, codeIdentifier, partiallyConsumable) */
293
+ /**
294
+ * Whether app identity fields have unreleased changes, such as `name`, `slug`, `namespace`, and `codeIdentifier`.
295
+ * Doesn't track changes to `appUrls` or `installationPreferences`.
296
+ * Updates asynchronously after the app's update event; the update response may not yet reflect this flag.
297
+ */
225
298
  appEntityChanges?: boolean;
226
299
  }
227
300
  interface AppComponentMetadata {
@@ -415,7 +488,7 @@ interface AccountInfo {
415
488
  }
416
489
  interface AppOwnerChangedEvent {
417
490
  /**
418
- * Id of the App to update
491
+ * App ID.
419
492
  * @format GUID
420
493
  */
421
494
  appId?: string;
@@ -431,16 +504,16 @@ interface AppOwnerChangedEvent {
431
504
  previousAccountId?: string;
432
505
  }
433
506
  interface CreateAppRequest {
434
- /** App to be created */
507
+ /** App to create. */
435
508
  app: V1App;
436
509
  }
437
510
  interface CreateAppResponse {
438
- /** The created App */
511
+ /** Created app. */
439
512
  app?: V1App;
440
513
  }
441
514
  interface GetAppRequest {
442
515
  /**
443
- * Id of the App to retrieve
516
+ * App ID.
444
517
  * @format GUID
445
518
  */
446
519
  appId: string;
@@ -461,31 +534,31 @@ declare enum RequestedFields {
461
534
  /** @enumType */
462
535
  type RequestedFieldsWithLiterals = RequestedFields | 'APP_SECRETS';
463
536
  interface GetAppResponse {
464
- /** The retrieved App */
537
+ /** Retrieved app. */
465
538
  app?: V1App;
466
539
  }
467
540
  interface UpdateAppRequest {
468
- /** App to be updated, may be partial */
541
+ /** App to update. Specify the app ID, current revision, and fields to change. */
469
542
  app: V1App;
470
543
  }
471
544
  interface UpdateAppResponse {
472
- /** The updated App */
545
+ /** Updated app. */
473
546
  app?: V1App;
474
547
  }
475
548
  interface GenerateSlugRequest {
476
549
  /**
477
- * Id of the App to update
550
+ * App ID.
478
551
  * @format GUID
479
552
  */
480
553
  appId: string;
481
554
  }
482
555
  interface GenerateSlugResponse {
483
- /** The modified app */
556
+ /** App with its generated or existing slug. */
484
557
  app?: V1App;
485
558
  }
486
559
  interface RenameSlugRequest {
487
560
  /**
488
- * Id of the App to update
561
+ * App ID.
489
562
  * @format GUID
490
563
  */
491
564
  appId?: string;
@@ -497,12 +570,12 @@ interface RenameSlugRequest {
497
570
  newSlug?: string;
498
571
  }
499
572
  interface RenameSlugResponse {
500
- /** The modified app */
573
+ /** App with its slug updated to the requested `newSlug`. */
501
574
  app?: V1App;
502
575
  }
503
576
  interface RenameCodeIdentifierRequest {
504
577
  /**
505
- * Id of the App to update
578
+ * App ID.
506
579
  * @format GUID
507
580
  */
508
581
  appId?: string;
@@ -514,12 +587,12 @@ interface RenameCodeIdentifierRequest {
514
587
  newCodeIdentifier?: string;
515
588
  }
516
589
  interface RenameCodeIdentifierResponse {
517
- /** The modified app */
590
+ /** App with its updated code identifier. */
518
591
  app?: V1App;
519
592
  }
520
593
  interface GetNamespaceSuggestionRequest {
521
594
  /**
522
- * The id of the application
595
+ * App ID.
523
596
  * @format GUID
524
597
  */
525
598
  appId: string;
@@ -535,12 +608,12 @@ declare enum NamespaceType {
535
608
  /** @enumType */
536
609
  type NamespaceTypeWithLiterals = NamespaceType | 'ACCOUNT' | 'COMPANY';
537
610
  interface GetNamespaceSuggestionResponse {
538
- /** The suggested namespace */
611
+ /** Suggested namespace. */
539
612
  namespace?: string;
540
613
  }
541
614
  interface GetNamespaceSuggestionByNameRequest {
542
615
  /**
543
- * The name of the application
616
+ * App display name used to derive a namespace suggestion.
544
617
  * @maxLength 50
545
618
  */
546
619
  name: string;
@@ -549,7 +622,7 @@ interface GetNamespaceSuggestionByNameRequest {
549
622
  }
550
623
  interface GetNamespaceSuggestionByNameResponse {
551
624
  /**
552
- * The suggested namespace
625
+ * Suggested namespace.
553
626
  * @minLength 1
554
627
  * @maxLength 150
555
628
  */
@@ -557,12 +630,12 @@ interface GetNamespaceSuggestionByNameResponse {
557
630
  }
558
631
  interface SetNamespaceRequest {
559
632
  /**
560
- * Id of the App to update
633
+ * App ID.
561
634
  * @format GUID
562
635
  */
563
636
  appId: string;
564
637
  /**
565
- * Name used to derive the app's namespace component, at most 50 characters before normalization.
638
+ * Name used to derive the app's namespace component.
566
639
  * Lowercased; runs of non-alphanumeric characters (including spaces and underscores) become hyphens, with leading/trailing separators removed.
567
640
  * For example, `Bookings Helper` and `Bookings_Helper` become `bookings-helper`. If no letters or digits remain, uses `untitled`.
568
641
  * Subject to the reserved-name restrictions documented on Set Namespace. For permitted Wix-owned apps, `wix` is removed before normalization.
@@ -598,7 +671,7 @@ interface SuggestCodeIdentifierResponse {
598
671
  }
599
672
  interface SetCodeIdentifierRequest {
600
673
  /**
601
- * Id of the App to update
674
+ * App ID.
602
675
  * @format GUID
603
676
  */
604
677
  appId?: string;
@@ -778,7 +851,7 @@ interface Cursors {
778
851
  }
779
852
  interface SetPrivateAppRequest {
780
853
  /**
781
- * Id of the App to update
854
+ * App ID.
782
855
  * @format GUID
783
856
  */
784
857
  appId?: string;
@@ -788,7 +861,7 @@ interface SetPrivateAppRequest {
788
861
  revision?: string;
789
862
  }
790
863
  interface SetPrivateAppResponse {
791
- /** The modified app */
864
+ /** App with its `privateApp` setting updated to the requested value. */
792
865
  app?: V1App;
793
866
  }
794
867
  interface AppChangedEvent {
@@ -877,7 +950,7 @@ interface AppSlugChanged {
877
950
  }
878
951
  interface SetAppOwnerRequest {
879
952
  /**
880
- * Id of the App to update
953
+ * App ID.
881
954
  * @format GUID
882
955
  */
883
956
  appId?: string;
@@ -890,7 +963,7 @@ interface SetAppOwnerRequest {
890
963
  revision?: string;
891
964
  }
892
965
  interface SetAppOwnerResponse {
893
- /** The modified app */
966
+ /** App owned by the requested `accountId`. */
894
967
  app?: V1App;
895
968
  }
896
969
  interface AppUrlsChangedInOldServiceEvent extends AppUrlsChangedInOldServiceEventChangedUrlOneOf {
@@ -899,7 +972,7 @@ interface AppUrlsChangedInOldServiceEvent extends AppUrlsChangedInOldServiceEven
899
972
  /** redirect uris */
900
973
  redirectUriMessage?: RedirectUrlMessage;
901
974
  /**
902
- * Id of the App to update
975
+ * App ID.
903
976
  * @format GUID
904
977
  */
905
978
  appId?: string;
@@ -921,7 +994,7 @@ interface RedirectUrlMessage {
921
994
  }
922
995
  interface CreateSecondarySecretRequest {
923
996
  /**
924
- * ID of the App to update
997
+ * App ID.
925
998
  * @format GUID
926
999
  */
927
1000
  appId: string;
@@ -945,7 +1018,7 @@ interface ActivateSecondarySecretResponse {
945
1018
  }
946
1019
  interface RotateSecretRequest {
947
1020
  /**
948
- * ID of the App to update
1021
+ * App ID.
949
1022
  * @format GUID
950
1023
  */
951
1024
  appId?: string;
@@ -956,7 +1029,7 @@ interface RotateSecretResponse {
956
1029
  }
957
1030
  interface RollbackSecretRequest {
958
1031
  /**
959
- * ID of the App to update
1032
+ * App ID.
960
1033
  * @format GUID
961
1034
  */
962
1035
  appId?: string;
@@ -967,24 +1040,24 @@ interface RollbackSecretResponse {
967
1040
  }
968
1041
  interface RevokeSecretRequest {
969
1042
  /**
970
- * ID of the App to update
1043
+ * App ID.
971
1044
  * @format GUID
972
1045
  */
973
1046
  appId: string;
974
- /** Which of the two secrets to get rid of */
1047
+ /** Credential to revoke. The app must have both a previous and a replacement secret. */
975
1048
  secretToRevoke: SecretToRevokeWithLiterals;
976
1049
  }
977
- /** Which of the App's two secrets to get rid of */
1050
+ /** Credential to revoke during app-secret rotation. */
978
1051
  declare enum SecretToRevoke {
979
- /** The secret the App had before the second one was created */
1052
+ /** Switch signing to the replacement secret and schedule retirement of the previous secret. */
980
1053
  PREVIOUS_SECRET = "PREVIOUS_SECRET",
981
- /** The second secret that was created most recently */
1054
+ /** Discard the replacement secret and restore signing with the previous secret. */
982
1055
  NEW_SECRET = "NEW_SECRET"
983
1056
  }
984
1057
  /** @enumType */
985
1058
  type SecretToRevokeWithLiterals = SecretToRevoke | 'PREVIOUS_SECRET' | 'NEW_SECRET';
986
1059
  interface RevokeSecretResponse {
987
- /** Scheduled retirement time of the previous secret. Set only for PREVIOUS_SECRET; omitted for NEW_SECRET. */
1060
+ /** Scheduled retirement time of the previous secret. Returned for `PREVIOUS_SECRET` and omitted for `NEW_SECRET`. Use the latest returned timestamp. */
988
1061
  previousSecretRevokeAt?: Date | null;
989
1062
  }
990
1063
  /** payload for kafka event for this version on app submit */