@wix/auto_sdk_app-management_apps 1.0.1 → 1.0.3

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.
@@ -150,6 +150,13 @@ interface AppUrls {
150
150
  * @maxSize 100
151
151
  */
152
152
  redirectUris?: string[];
153
+ /**
154
+ * Allowed post-installation URLs, where Wix redirects the user after installing the app from an external install link.
155
+ * A `postInstallationUrl` matches an entry when they are equal, ignoring the query string.
156
+ * @format WEB_URL
157
+ * @maxSize 100
158
+ */
159
+ postInstallationUrls?: string[];
153
160
  }
154
161
  interface CreatedBy {
155
162
  /**
@@ -323,6 +330,21 @@ declare enum LoginPolicy {
323
330
  }
324
331
  /** @enumType */
325
332
  type LoginPolicyWithLiterals = LoginPolicy | 'LOGIN_POLICY_UNKNOWN' | 'LOGIN_POLICY_REQUIRED' | 'LOGIN_POLICY_OPTIONAL';
333
+ interface CompanionAppOptions {
334
+ /**
335
+ * ID of the site or account that owns the companion app.
336
+ * @format GUID
337
+ */
338
+ tenantId?: string;
339
+ /** Type of tenant that owns the companion app. */
340
+ tenantType?: TenantTypeWithLiterals;
341
+ }
342
+ declare enum TenantType {
343
+ SITE = "SITE",
344
+ ACCOUNT = "ACCOUNT"
345
+ }
346
+ /** @enumType */
347
+ type TenantTypeWithLiterals = TenantType | 'SITE' | 'ACCOUNT';
326
348
  interface DomainEvent extends DomainEventBodyOneOf {
327
349
  createdEvent?: EntityCreatedEvent;
328
350
  updatedEvent?: EntityUpdatedEvent;
@@ -1166,6 +1188,19 @@ interface SetCacheableAppResponse {
1166
1188
  /** The updated app */
1167
1189
  app?: V1App;
1168
1190
  }
1191
+ interface SetCompanionAppOptionsRequest {
1192
+ /**
1193
+ * ID of the companion app to update.
1194
+ * @format GUID
1195
+ */
1196
+ appId?: string;
1197
+ /** Owning site or account of the companion app. */
1198
+ companionAppOptions?: CompanionAppOptions;
1199
+ }
1200
+ interface SetCompanionAppOptionsResponse {
1201
+ /** Updated app. */
1202
+ app?: V1App;
1203
+ }
1169
1204
  interface SetComponentsMetadataRequest {
1170
1205
  /**
1171
1206
  * App id of the app to update
@@ -1251,7 +1286,7 @@ interface AssociateServiceAppResponse {
1251
1286
  * @returns Created app.
1252
1287
  * @fqn wix.devcenter.apps.v1.AppsService.CreateApp
1253
1288
  */
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>>;
1289
+ declare function createApp(app: V1App): Promise<NonNullablePaths<V1App, `name` | `appSecrets.appSecret` | `appSecrets.webhookPublicKey` | `appSecrets.secondarySecretActive` | `status` | `appUrls.redirectUris` | `appUrls.postInstallationUrls` | `createdBy._id` | `createdBy.type` | `installationPreferences.openComponentIdOptions.componentId` | `installationPreferences.overridePostInstallationRedirect` | `installationPreferences.openButtonAction` | `installationPreferences.uninstallAction` | `unreleasedChanges.componentsChanges` | `unreleasedChanges.appTranslationsChanges` | `unreleasedChanges.componentsTranslationChanges` | `unreleasedChanges.appPermissionsChanges` | `unreleasedChanges.appEntityChanges`, 2>>;
1255
1290
  /**
1256
1291
  * Retrieves an app by ID. App secrets are omitted by default.
1257
1292
  * To include `appSecrets`, add `APP_SECRETS` to `additionalFields`.
@@ -1265,7 +1300,7 @@ declare function createApp(app: V1App): Promise<NonNullablePaths<V1App, `name` |
1265
1300
  * @returns Retrieved app.
1266
1301
  * @fqn wix.devcenter.apps.v1.AppsService.GetApp
1267
1302
  */
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>>;
1303
+ declare function getApp(appId: string, options?: GetAppOptions): Promise<NonNullablePaths<V1App, `name` | `appSecrets.appSecret` | `appSecrets.webhookPublicKey` | `appSecrets.secondarySecretActive` | `status` | `appUrls.redirectUris` | `appUrls.postInstallationUrls` | `createdBy._id` | `createdBy.type` | `installationPreferences.openComponentIdOptions.componentId` | `installationPreferences.overridePostInstallationRedirect` | `installationPreferences.openButtonAction` | `installationPreferences.uninstallAction` | `unreleasedChanges.componentsChanges` | `unreleasedChanges.appTranslationsChanges` | `unreleasedChanges.componentsTranslationChanges` | `unreleasedChanges.appPermissionsChanges` | `unreleasedChanges.appEntityChanges`, 2>>;
1269
1304
  interface GetAppOptions {
1270
1305
  /** Whether to use a consistent read to retrieve the latest stored app data. Default: `false`. */
1271
1306
  consistent?: boolean;
@@ -1303,7 +1338,7 @@ interface GetAppOptions {
1303
1338
  * @returns Updated app.
1304
1339
  * @fqn wix.devcenter.apps.v1.AppsService.UpdateApp
1305
1340
  */
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>>;
1341
+ declare function updateApp(_id: string, app: NonNullablePaths<UpdateApp, `revision`, 0>): Promise<NonNullablePaths<V1App, `name` | `appSecrets.appSecret` | `appSecrets.webhookPublicKey` | `appSecrets.secondarySecretActive` | `status` | `appUrls.redirectUris` | `appUrls.postInstallationUrls` | `createdBy._id` | `createdBy.type` | `installationPreferences.openComponentIdOptions.componentId` | `installationPreferences.overridePostInstallationRedirect` | `installationPreferences.openButtonAction` | `installationPreferences.uninstallAction` | `unreleasedChanges.componentsChanges` | `unreleasedChanges.appTranslationsChanges` | `unreleasedChanges.componentsTranslationChanges` | `unreleasedChanges.appPermissionsChanges` | `unreleasedChanges.appEntityChanges`, 2>>;
1307
1342
  interface UpdateApp {
1308
1343
  /**
1309
1344
  * App ID.
@@ -1403,7 +1438,7 @@ interface UpdateApp {
1403
1438
  * @permissionId DEV_CENTER.WRITE_APP
1404
1439
  * @fqn wix.devcenter.apps.v1.AppsService.GenerateSlug
1405
1440
  */
1406
- declare function generateSlug(appId: string): Promise<NonNullablePaths<GenerateSlugResponse, `app.name` | `app.appSecrets.appSecret` | `app.appSecrets.webhookPublicKey` | `app.appSecrets.secondarySecretActive` | `app.status` | `app.appUrls.redirectUris` | `app.createdBy._id` | `app.createdBy.type` | `app.installationPreferences.openComponentIdOptions.componentId` | `app.installationPreferences.overridePostInstallationRedirect` | `app.installationPreferences.openButtonAction` | `app.installationPreferences.uninstallAction` | `app.unreleasedChanges.componentsChanges` | `app.unreleasedChanges.appTranslationsChanges` | `app.unreleasedChanges.componentsTranslationChanges` | `app.unreleasedChanges.appPermissionsChanges` | `app.unreleasedChanges.appEntityChanges`, 3>>;
1441
+ declare function generateSlug(appId: string): Promise<NonNullablePaths<GenerateSlugResponse, `app.name` | `app.appSecrets.appSecret` | `app.appSecrets.webhookPublicKey` | `app.appSecrets.secondarySecretActive` | `app.status` | `app.appUrls.redirectUris` | `app.appUrls.postInstallationUrls` | `app.createdBy._id` | `app.createdBy.type` | `app.installationPreferences.openComponentIdOptions.componentId` | `app.installationPreferences.overridePostInstallationRedirect` | `app.installationPreferences.openButtonAction` | `app.installationPreferences.uninstallAction` | `app.unreleasedChanges.componentsChanges` | `app.unreleasedChanges.appTranslationsChanges` | `app.unreleasedChanges.componentsTranslationChanges` | `app.unreleasedChanges.appPermissionsChanges` | `app.unreleasedChanges.appEntityChanges`, 3>>;
1407
1442
  /**
1408
1443
  * Suggests a namespace using the app's stored name and its owning account's slug or company name.
1409
1444
  * Falls back to the account slug when no company name is available.
@@ -1482,7 +1517,7 @@ interface SetNamespaceOptions {
1482
1517
  * @permissionId WIX_DEVELOPERS.MODIFY_APP
1483
1518
  * @fqn wix.devcenter.apps.v1.AppsService.CreateSecondarySecret
1484
1519
  */
1485
- declare function createSecondarySecret(appId: string, options?: CreateSecondarySecretOptions): Promise<NonNullablePaths<CreateSecondarySecretResponse, `app.name` | `app.appSecrets.appSecret` | `app.appSecrets.webhookPublicKey` | `app.appSecrets.secondarySecretActive` | `app.status` | `app.appUrls.redirectUris` | `app.createdBy._id` | `app.createdBy.type` | `app.installationPreferences.openComponentIdOptions.componentId` | `app.installationPreferences.overridePostInstallationRedirect` | `app.installationPreferences.openButtonAction` | `app.installationPreferences.uninstallAction` | `app.unreleasedChanges.componentsChanges` | `app.unreleasedChanges.appTranslationsChanges` | `app.unreleasedChanges.componentsTranslationChanges` | `app.unreleasedChanges.appPermissionsChanges` | `app.unreleasedChanges.appEntityChanges`, 3>>;
1520
+ declare function createSecondarySecret(appId: string, options?: CreateSecondarySecretOptions): Promise<NonNullablePaths<CreateSecondarySecretResponse, `app.name` | `app.appSecrets.appSecret` | `app.appSecrets.webhookPublicKey` | `app.appSecrets.secondarySecretActive` | `app.status` | `app.appUrls.redirectUris` | `app.appUrls.postInstallationUrls` | `app.createdBy._id` | `app.createdBy.type` | `app.installationPreferences.openComponentIdOptions.componentId` | `app.installationPreferences.overridePostInstallationRedirect` | `app.installationPreferences.openButtonAction` | `app.installationPreferences.uninstallAction` | `app.unreleasedChanges.componentsChanges` | `app.unreleasedChanges.appTranslationsChanges` | `app.unreleasedChanges.componentsTranslationChanges` | `app.unreleasedChanges.appPermissionsChanges` | `app.unreleasedChanges.appEntityChanges`, 3>>;
1486
1521
  interface CreateSecondarySecretOptions {
1487
1522
  /** Latest app revision, available from Get App. An outdated revision is rejected. */
1488
1523
  revision?: string;
@@ -1503,4 +1538,4 @@ interface CreateSecondarySecretOptions {
1503
1538
  */
1504
1539
  declare function revokeSecret(appId: string, secretToRevoke: SecretToRevokeWithLiterals): Promise<RevokeSecretResponse>;
1505
1540
 
1506
- export { type AccountInfo, Action, type ActionEvent, type ActionWithLiterals, type ActivateSecondarySecretRequest, type ActivateSecondarySecretResponse, type AddressLocation, type App, type AppChangedEvent, type AppComponentMetadata, type AppOwnerChangedEvent, type AppSecrets, type AppSlugChanged, AppType, type AppTypeWithLiterals, type AppUriMessage, type AppUrls, type AppUrlsChangedInOldServiceEvent, type AppUrlsChangedInOldServiceEventChangedUrlOneOf, type AppVersionApproved, type AppVersionArchived, type AppVersionCreated, type AppVersionDeclined, type AppVersionDraftChanged, type AppVersionPublished, type AppVersionReleased, type AppVersionStateChanged, type AppVersionStateChangedStateOneOf, type AppVersionSubmitted, type AssociateServiceAppRequest, type AssociateServiceAppResponse, type ConsentOptions, type ContactEmails, type CreateAppRequest, type CreateAppResponse, type CreateSecondarySecretOptions, type CreateSecondarySecretRequest, type CreateSecondarySecretResponse, type CreateServiceAppRequest, type CreateServiceAppResponse, type CreatedBy, CreatedByType, type CreatedByTypeWithLiterals, type CursorPaging, type Cursors, type DeleteAppRequest, type DeleteAppResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, ForceCascadeDeleteAppDecision, type ForceCascadeDeleteAppDecisionWithLiterals, type ForceCascadeDeleteAppRequest, type ForceCascadeDeleteAppResponse, type GenerateSlugRequest, type GenerateSlugResponse, type GetAppOptions, type GetAppRequest, type GetAppResponse, type GetNamespaceSuggestionByNameOptions, type GetNamespaceSuggestionByNameRequest, type GetNamespaceSuggestionByNameResponse, type GetNamespaceSuggestionOptions, type GetNamespaceSuggestionRequest, type GetNamespaceSuggestionResponse, type HostAppConfig, type IdentificationData, type IdentificationDataIdOneOf, type InstallationPreferences, type InstallationPreferencesOpenButtonOptionsOneOf, LoginPolicy, type LoginPolicyWithLiterals, type MessageEnvelope, NamespaceType, type NamespaceTypeWithLiterals, OpenButtonAction, type OpenButtonActionWithLiterals, type OpenComponentId, type Paging, type PagingMetadataV2, type PartialVersionOptions, PermissionLevel, type PermissionLevelWithLiterals, type QueryAppRequest, type QueryAppResponse, type QueryV2, type QueryV2PagingMethodOneOf, RedirectTarget, type RedirectTargetWithLiterals, type RedirectUrlMessage, type RenameCodeIdentifierRequest, type RenameCodeIdentifierResponse, type RenameSlugRequest, type RenameSlugResponse, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type RevokeSecretRequest, type RevokeSecretResponse, type RollbackSecretRequest, type RollbackSecretResponse, type RotateSecretRequest, type RotateSecretResponse, SecretToRevoke, type SecretToRevokeWithLiterals, type SetAppOwnerRequest, type SetAppOwnerResponse, type SetCacheableAppRequest, type SetCacheableAppResponse, type SetCodeIdentifierRequest, type SetCodeIdentifierResponse, type SetComponentsMetadataRequest, type SetComponentsMetadataResponse, type SetExceededSizeRequest, type SetExceededSizeResponse, type SetHipaaCompliantRequest, type SetHipaaCompliantResponse, type SetNamespaceOptions, type SetNamespaceRequest, type SetNamespaceResponse, type SetOwnershipTagRequest, type SetOwnershipTagResponse, type SetPrivateAppRequest, type SetPrivateAppResponse, ShowConsentBehaviour, type ShowConsentBehaviourWithLiterals, SortOrder, type SortOrderWithLiterals, type Sorting, Status, type StatusWithLiterals, type SuggestCodeIdentifierRequest, type SuggestCodeIdentifierResponse, UninstallActions, type UninstallActionsWithLiterals, type UnreleasedChanges, type UpdateApp, type UpdateAppRequest, type UpdateAppResponse, type UpdateHostAppConfigRequest, type UpdateHostAppConfigResponse, type V1App, VersionStatus, type VersionStatusWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createApp, createSecondarySecret, generateSlug, getApp, getNamespaceSuggestion, getNamespaceSuggestionByName, revokeSecret, setNamespace, updateApp };
1541
+ export { type AccountInfo, Action, type ActionEvent, type ActionWithLiterals, type ActivateSecondarySecretRequest, type ActivateSecondarySecretResponse, type AddressLocation, type App, type AppChangedEvent, type AppComponentMetadata, type AppOwnerChangedEvent, type AppSecrets, type AppSlugChanged, AppType, type AppTypeWithLiterals, type AppUriMessage, type AppUrls, type AppUrlsChangedInOldServiceEvent, type AppUrlsChangedInOldServiceEventChangedUrlOneOf, type AppVersionApproved, type AppVersionArchived, type AppVersionCreated, type AppVersionDeclined, type AppVersionDraftChanged, type AppVersionPublished, type AppVersionReleased, type AppVersionStateChanged, type AppVersionStateChangedStateOneOf, type AppVersionSubmitted, type AssociateServiceAppRequest, type AssociateServiceAppResponse, type CompanionAppOptions, type ConsentOptions, type ContactEmails, type CreateAppRequest, type CreateAppResponse, type CreateSecondarySecretOptions, type CreateSecondarySecretRequest, type CreateSecondarySecretResponse, type CreateServiceAppRequest, type CreateServiceAppResponse, type CreatedBy, CreatedByType, type CreatedByTypeWithLiterals, type CursorPaging, type Cursors, type DeleteAppRequest, type DeleteAppResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, ForceCascadeDeleteAppDecision, type ForceCascadeDeleteAppDecisionWithLiterals, type ForceCascadeDeleteAppRequest, type ForceCascadeDeleteAppResponse, type GenerateSlugRequest, type GenerateSlugResponse, type GetAppOptions, type GetAppRequest, type GetAppResponse, type GetNamespaceSuggestionByNameOptions, type GetNamespaceSuggestionByNameRequest, type GetNamespaceSuggestionByNameResponse, type GetNamespaceSuggestionOptions, type GetNamespaceSuggestionRequest, type GetNamespaceSuggestionResponse, type HostAppConfig, type IdentificationData, type IdentificationDataIdOneOf, type InstallationPreferences, type InstallationPreferencesOpenButtonOptionsOneOf, LoginPolicy, type LoginPolicyWithLiterals, type MessageEnvelope, NamespaceType, type NamespaceTypeWithLiterals, OpenButtonAction, type OpenButtonActionWithLiterals, type OpenComponentId, type Paging, type PagingMetadataV2, type PartialVersionOptions, PermissionLevel, type PermissionLevelWithLiterals, type QueryAppRequest, type QueryAppResponse, type QueryV2, type QueryV2PagingMethodOneOf, RedirectTarget, type RedirectTargetWithLiterals, type RedirectUrlMessage, type RenameCodeIdentifierRequest, type RenameCodeIdentifierResponse, type RenameSlugRequest, type RenameSlugResponse, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type RevokeSecretRequest, type RevokeSecretResponse, type RollbackSecretRequest, type RollbackSecretResponse, type RotateSecretRequest, type RotateSecretResponse, SecretToRevoke, type SecretToRevokeWithLiterals, type SetAppOwnerRequest, type SetAppOwnerResponse, type SetCacheableAppRequest, type SetCacheableAppResponse, type SetCodeIdentifierRequest, type SetCodeIdentifierResponse, type SetCompanionAppOptionsRequest, type SetCompanionAppOptionsResponse, type SetComponentsMetadataRequest, type SetComponentsMetadataResponse, type SetExceededSizeRequest, type SetExceededSizeResponse, type SetHipaaCompliantRequest, type SetHipaaCompliantResponse, type SetNamespaceOptions, type SetNamespaceRequest, type SetNamespaceResponse, type SetOwnershipTagRequest, type SetOwnershipTagResponse, type SetPrivateAppRequest, type SetPrivateAppResponse, ShowConsentBehaviour, type ShowConsentBehaviourWithLiterals, SortOrder, type SortOrderWithLiterals, type Sorting, Status, type StatusWithLiterals, type SuggestCodeIdentifierRequest, type SuggestCodeIdentifierResponse, TenantType, type TenantTypeWithLiterals, UninstallActions, type UninstallActionsWithLiterals, type UnreleasedChanges, type UpdateApp, type UpdateAppRequest, type UpdateAppResponse, type UpdateHostAppConfigRequest, type UpdateHostAppConfigResponse, type V1App, VersionStatus, type VersionStatusWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createApp, createSecondarySecret, generateSlug, getApp, getNamespaceSuggestion, getNamespaceSuggestionByName, revokeSecret, setNamespace, updateApp };
@@ -34,6 +34,7 @@ __export(index_typings_exports, {
34
34
  ShowConsentBehaviour: () => ShowConsentBehaviour,
35
35
  SortOrder: () => SortOrder,
36
36
  Status: () => Status,
37
+ TenantType: () => TenantType,
37
38
  UninstallActions: () => UninstallActions,
38
39
  VersionStatus: () => VersionStatus,
39
40
  WebhookIdentityType: () => WebhookIdentityType,
@@ -465,6 +466,11 @@ var LoginPolicy = /* @__PURE__ */ ((LoginPolicy2) => {
465
466
  LoginPolicy2["LOGIN_POLICY_OPTIONAL"] = "LOGIN_POLICY_OPTIONAL";
466
467
  return LoginPolicy2;
467
468
  })(LoginPolicy || {});
469
+ var TenantType = /* @__PURE__ */ ((TenantType2) => {
470
+ TenantType2["SITE"] = "SITE";
471
+ TenantType2["ACCOUNT"] = "ACCOUNT";
472
+ return TenantType2;
473
+ })(TenantType || {});
468
474
  var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
469
475
  WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
470
476
  WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
@@ -771,6 +777,7 @@ async function revokeSecret2(appId, secretToRevoke) {
771
777
  ShowConsentBehaviour,
772
778
  SortOrder,
773
779
  Status,
780
+ TenantType,
774
781
  UninstallActions,
775
782
  VersionStatus,
776
783
  WebhookIdentityType,