@wix/auto_sdk_app-management_apps 0.0.0-stage → 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.
@@ -0,0 +1,142 @@
1
+ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { V1App, GetAppOptions, UpdateApp, GenerateSlugResponse, GetNamespaceSuggestionOptions, GetNamespaceSuggestionResponse, GetNamespaceSuggestionByNameOptions, GetNamespaceSuggestionByNameResponse, SetNamespaceOptions, SetNamespaceResponse, CreateSecondarySecretOptions, CreateSecondarySecretResponse, SecretToRevokeWithLiterals, RevokeSecretResponse } from './index.typings.js';
3
+ export { AccountInfo, Action, ActionEvent, ActionWithLiterals, ActivateSecondarySecretRequest, ActivateSecondarySecretResponse, AddressLocation, App, AppChangedEvent, AppComponentMetadata, AppOwnerChangedEvent, AppSecrets, AppSlugChanged, AppType, AppTypeWithLiterals, AppUriMessage, AppUrls, AppUrlsChangedInOldServiceEvent, AppUrlsChangedInOldServiceEventChangedUrlOneOf, AppVersionApproved, AppVersionArchived, AppVersionCreated, AppVersionDeclined, AppVersionDraftChanged, AppVersionPublished, AppVersionReleased, AppVersionStateChanged, AppVersionStateChangedStateOneOf, AppVersionSubmitted, AssociateServiceAppRequest, AssociateServiceAppResponse, ConsentOptions, ContactEmails, CreateAppRequest, CreateAppResponse, CreateSecondarySecretRequest, CreateServiceAppRequest, CreateServiceAppResponse, CreatedBy, CreatedByType, CreatedByTypeWithLiterals, CursorPaging, Cursors, DeleteAppRequest, DeleteAppResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ForceCascadeDeleteAppDecision, ForceCascadeDeleteAppDecisionWithLiterals, ForceCascadeDeleteAppRequest, ForceCascadeDeleteAppResponse, GenerateSlugRequest, GetAppRequest, GetAppResponse, GetNamespaceSuggestionByNameRequest, GetNamespaceSuggestionRequest, HostAppConfig, IdentificationData, IdentificationDataIdOneOf, InstallationPreferences, InstallationPreferencesOpenButtonOptionsOneOf, LoginPolicy, LoginPolicyWithLiterals, MessageEnvelope, NamespaceType, NamespaceTypeWithLiterals, OpenButtonAction, OpenButtonActionWithLiterals, OpenComponentId, Paging, PagingMetadataV2, PartialVersionOptions, PermissionLevel, PermissionLevelWithLiterals, QueryAppRequest, QueryAppResponse, QueryV2, QueryV2PagingMethodOneOf, RedirectTarget, RedirectTargetWithLiterals, RedirectUrlMessage, RenameCodeIdentifierRequest, RenameCodeIdentifierResponse, RenameSlugRequest, RenameSlugResponse, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, RevokeSecretRequest, RollbackSecretRequest, RollbackSecretResponse, RotateSecretRequest, RotateSecretResponse, SecretToRevoke, SetAppOwnerRequest, SetAppOwnerResponse, SetCacheableAppRequest, SetCacheableAppResponse, SetCodeIdentifierRequest, SetCodeIdentifierResponse, SetComponentsMetadataRequest, SetComponentsMetadataResponse, SetExceededSizeRequest, SetExceededSizeResponse, SetHipaaCompliantRequest, SetHipaaCompliantResponse, SetNamespaceRequest, SetOwnershipTagRequest, SetOwnershipTagResponse, SetPrivateAppRequest, SetPrivateAppResponse, ShowConsentBehaviour, ShowConsentBehaviourWithLiterals, SortOrder, SortOrderWithLiterals, Sorting, Status, StatusWithLiterals, SuggestCodeIdentifierRequest, SuggestCodeIdentifierResponse, UninstallActions, UninstallActionsWithLiterals, UnreleasedChanges, UpdateAppRequest, UpdateAppResponse, UpdateHostAppConfigRequest, UpdateHostAppConfigResponse, VersionStatus, VersionStatusWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
4
+
5
+ declare function createApp$1(httpClient: HttpClient): CreateAppSignature;
6
+ interface CreateAppSignature {
7
+ /**
8
+ * Creates an app.
9
+ *
10
+ * Don't include `namespace` in the request; use Set Namespace after creating the app.
11
+ * Setting `companionApp` to `true` is restricted to authorized companion-app provisioning services.
12
+ * A supplied `slug` is ignored except for authorized companion-app provisioning callers; use Generate Slug after creation.
13
+ * A supplied `codeIdentifier` must not contain `wix` (case-insensitive).
14
+ * @param - App to create.
15
+ * @returns Created app.
16
+ */
17
+ (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>>;
18
+ }
19
+ declare function getApp$1(httpClient: HttpClient): GetAppSignature;
20
+ interface GetAppSignature {
21
+ /**
22
+ * Retrieves an app by ID. App secrets are omitted by default.
23
+ * To include `appSecrets`, add `APP_SECRETS` to `additionalFields`.
24
+ * Retrieving secrets requires authorization to access the app's secrets.
25
+ * @param - App ID.
26
+ * @returns Retrieved app.
27
+ */
28
+ (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>>;
29
+ }
30
+ declare function updateApp$1(httpClient: HttpClient): UpdateAppSignature;
31
+ interface UpdateAppSignature {
32
+ /**
33
+ * Updates an app.
34
+ *
35
+ * Each time the app is updated, `revision` increments by 1. The current `revision` must be passed
36
+ * when updating the app. This ensures you're working with the latest app and prevents unintended overwrites.
37
+ * Supports partial updates; specify the app's ID and the fields to change.
38
+ *
39
+ * This method cannot update `appSecrets`, `accountId`, `namespace`, `slug`, `createdBy`,
40
+ * `companionApp`, or `codeIdentifier`. Including any of these fields or their nested fields in the
41
+ * request causes the entire request to fail; they aren't silently ignored.
42
+ * Use Set Namespace to assign a namespace and Generate Slug to generate a slug. To rotate app
43
+ * secrets, use Create Secondary Secret and Revoke Secret. This method does not support changing
44
+ * the owning account, creator, companion-app designation, or code identifier.
45
+ *
46
+ * Changing `status` requires additional status-change authorization beyond permission to update other fields.
47
+ * @param - App ID.
48
+ * @returns Updated app.
49
+ */
50
+ (_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>>;
51
+ }
52
+ declare function generateSlug$1(httpClient: HttpClient): GenerateSlugSignature;
53
+ interface GenerateSlugSignature {
54
+ /**
55
+ * Generates a slug for the app. If a slug already exists, returns the app with its existing slug.
56
+ * Does not generate a slug for companion apps; a companion app without a slug is returned unchanged.
57
+ * When generating a slug, the stored app name must not contain `wix` for non-Wix apps (case-insensitive).
58
+ * The exact names `google`, `facebook`, and `amazon` require privileged authorization (case-insensitive).
59
+ * @param - App ID.
60
+ */
61
+ (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>>;
62
+ }
63
+ declare function getNamespaceSuggestion$1(httpClient: HttpClient): GetNamespaceSuggestionSignature;
64
+ interface GetNamespaceSuggestionSignature {
65
+ /**
66
+ * Suggests a namespace using the app's stored name and its owning account's slug or company name.
67
+ * Falls back to the account slug when no company name is available.
68
+ * Non-Wix app names must not contain `wix` (case-insensitive).
69
+ * The exact names `google`, `facebook`, and `amazon` require privileged authorization (case-insensitive).
70
+ * If the base namespace is already used, suggests an alternative with a numeric suffix. Suggestions do not reserve a namespace.
71
+ * Set Namespace derives its own namespace from `appName` without automatically adding a collision suffix. Choose a different `appName` and retry if it conflicts.
72
+ * @param - App ID.
73
+ */
74
+ (appId: string, options?: GetNamespaceSuggestionOptions): Promise<NonNullablePaths<GetNamespaceSuggestionResponse, `namespace`, 0>>;
75
+ }
76
+ declare function getNamespaceSuggestionByName$1(httpClient: HttpClient): GetNamespaceSuggestionByNameSignature;
77
+ interface GetNamespaceSuggestionByNameSignature {
78
+ /**
79
+ * Suggests a namespace from the supplied app name and the caller's account or company context.
80
+ * No app ID is required, so this method can be used before creating an app.
81
+ * With `type` set to `COMPANY`, falls back to the account slug if no company name is available.
82
+ * To suggest a namespace for an existing app using its stored name and ownership context, use Get Namespace Suggestion.
83
+ * The supplied name must not contain `wix` (case-insensitive).
84
+ * The exact names `google`, `facebook`, and `amazon` require privileged authorization (case-insensitive).
85
+ * If the base namespace is already used, suggests an alternative with a numeric suffix. Suggestions do not reserve a namespace.
86
+ * Set Namespace derives its own namespace from `appName` without automatically adding a collision suffix. Choose a different `appName` and retry if it conflicts.
87
+ * @param - App display name used to derive a namespace suggestion.
88
+ */
89
+ (name: string, options?: GetNamespaceSuggestionByNameOptions): Promise<NonNullablePaths<GetNamespaceSuggestionByNameResponse, `namespace`, 0>>;
90
+ }
91
+ declare function setNamespace$1(httpClient: HttpClient): SetNamespaceSignature;
92
+ interface SetNamespaceSignature {
93
+ /**
94
+ * Sets the app namespace using the owning account's slug or company name and the supplied `appName`.
95
+ * Falls back to the account slug when no company name is available. A namespace can be set only once.
96
+ * For non-Wix apps, `appName` must not contain `wix` (case-insensitive).
97
+ * The exact names `google`, `facebook`, and `amazon` require privileged authorization (case-insensitive).
98
+ * Unlike namespace suggestions, this method does not automatically add a suffix when the derived namespace is already used.
99
+ * Suggestions are not reservations; on a collision, choose a different `appName` and retry.
100
+ * @param - App ID.
101
+ * @param - Name used to derive the app's namespace component.
102
+ * Lowercased; runs of non-alphanumeric characters (including spaces and underscores) become hyphens, with leading/trailing separators removed.
103
+ * For example, `Bookings Helper` and `Bookings_Helper` become `bookings-helper`. If no letters or digits remain, uses `untitled`.
104
+ * Subject to the reserved-name restrictions documented on Set Namespace. For permitted Wix-owned apps, `wix` is removed before normalization.
105
+ */
106
+ (appId: string, appName: string, options?: SetNamespaceOptions): Promise<NonNullablePaths<SetNamespaceResponse, `namespace`, 0>>;
107
+ }
108
+ declare function createSecondarySecret$1(httpClient: HttpClient): CreateSecondarySecretSignature;
109
+ interface CreateSecondarySecretSignature {
110
+ /**
111
+ * Shares WIX_DEVELOPERS.MODIFY_APP with the sibling app-write RPCs, which declare no audience
112
+ * (adding one here would break consistent-audience-for-shared-permission across all of them).
113
+ * Renaming the permission would change who is actually authorized, so it stays as-is —
114
+ * the real check is the MANUAL validateUpdateAppPermission(...) in code.
115
+ * @param - App ID.
116
+ */
117
+ (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>>;
118
+ }
119
+ declare function revokeSecret$1(httpClient: HttpClient): RevokeSecretSignature;
120
+ interface RevokeSecretSignature {
121
+ /**
122
+ * Shares WIX_DEVELOPERS.MODIFY_APP with the sibling app-write RPCs, which declare no audience
123
+ * (adding one here would break consistent-audience-for-shared-permission across all of them).
124
+ * Renaming the permission would change who is actually authorized, so it stays as-is —
125
+ * the real check is the MANUAL validateUpdateAppPermission(...) in code.
126
+ * @param - App ID.
127
+ * @param - Credential to revoke. The app must have both a previous and a replacement secret.
128
+ */
129
+ (appId: string, secretToRevoke: SecretToRevokeWithLiterals): Promise<RevokeSecretResponse>;
130
+ }
131
+
132
+ declare const createApp: MaybeContext<BuildRESTFunction<typeof createApp$1> & typeof createApp$1>;
133
+ declare const getApp: MaybeContext<BuildRESTFunction<typeof getApp$1> & typeof getApp$1>;
134
+ declare const updateApp: MaybeContext<BuildRESTFunction<typeof updateApp$1> & typeof updateApp$1>;
135
+ declare const generateSlug: MaybeContext<BuildRESTFunction<typeof generateSlug$1> & typeof generateSlug$1>;
136
+ declare const getNamespaceSuggestion: MaybeContext<BuildRESTFunction<typeof getNamespaceSuggestion$1> & typeof getNamespaceSuggestion$1>;
137
+ declare const getNamespaceSuggestionByName: MaybeContext<BuildRESTFunction<typeof getNamespaceSuggestionByName$1> & typeof getNamespaceSuggestionByName$1>;
138
+ declare const setNamespace: MaybeContext<BuildRESTFunction<typeof setNamespace$1> & typeof setNamespace$1>;
139
+ declare const createSecondarySecret: MaybeContext<BuildRESTFunction<typeof createSecondarySecret$1> & typeof createSecondarySecret$1>;
140
+ declare const revokeSecret: MaybeContext<BuildRESTFunction<typeof revokeSecret$1> & typeof revokeSecret$1>;
141
+
142
+ export { CreateSecondarySecretOptions, CreateSecondarySecretResponse, GenerateSlugResponse, GetAppOptions, GetNamespaceSuggestionByNameOptions, GetNamespaceSuggestionByNameResponse, GetNamespaceSuggestionOptions, GetNamespaceSuggestionResponse, RevokeSecretResponse, SecretToRevokeWithLiterals, SetNamespaceOptions, SetNamespaceResponse, UpdateApp, V1App, createApp, createSecondarySecret, generateSlug, getApp, getNamespaceSuggestion, getNamespaceSuggestionByName, revokeSecret, setNamespace, updateApp };