@wix/auto_sdk_containers_projects 1.0.10 → 1.0.11

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.
@@ -1449,6 +1449,32 @@ interface PlatformMobileBuilds {
1449
1449
  /** The last build that succeeded. Its links can be expired. Not returned when no build succeeded. */
1450
1450
  lastSuccessfulBuild?: MobileBuild;
1451
1451
  }
1452
+ interface ClaimHimalayaAppRequest {
1453
+ /**
1454
+ * Site-tenanted Containers project to claim a Himalaya app for.
1455
+ * @format GUID
1456
+ */
1457
+ projectId: string;
1458
+ }
1459
+ interface ClaimHimalayaAppResponse {
1460
+ /** Version of the authorization capability contract. Matches GetHimalayaAuthorizationResponse. */
1461
+ authorizationVersion?: number;
1462
+ /**
1463
+ * Trusted MetaSite selected from request identity context, never from the request body.
1464
+ * @format GUID
1465
+ */
1466
+ metaSiteId?: string;
1467
+ /**
1468
+ * Site-tenanted Containers project the app is bound to.
1469
+ * @format GUID
1470
+ */
1471
+ projectId?: string;
1472
+ /**
1473
+ * Canonical Himalaya app slug, newly claimed or already bound.
1474
+ * @maxLength 200
1475
+ */
1476
+ canonicalApp?: string;
1477
+ }
1452
1478
  /**
1453
1479
  * Retrieves a project.
1454
1480
  * @param projectId - ID of the project to retrieve.
@@ -1786,5 +1812,25 @@ interface GetLatestMobileBuildsOptions {
1786
1812
  */
1787
1813
  himalayaControlToken?: string;
1788
1814
  }
1815
+ /**
1816
+ * Claims the canonical Himalaya app for a NEW site-tenanted project, or returns the one already
1817
+ * bound to it.
1818
+ *
1819
+ * This exists so the BROWSER never asserts the (MetaSite, project) pair to Himalaya. Containers
1820
+ * is the authority on project -> MetaSite: it reads the project from its own store with a
1821
+ * consistent read and takes the MetaSite from this call's identity context, then claims
1822
+ * server-to-server with a site USER token minted for the initiating collaborator. Himalaya
1823
+ * recognises that token as minted by THIS service and trusts the pair on that basis. A dashboard
1824
+ * calling Himalaya directly could name another site's project UUID and reserve its global slug.
1825
+ *
1826
+ * Idempotent per pair: an already-claimed project returns its existing canonical app.
1827
+ * @param projectId - Site-tenanted Containers project to claim a Himalaya app for.
1828
+ * @public
1829
+ * @documentationMaturity preview
1830
+ * @requiredField projectId
1831
+ * @permissionId containers:projects:v1:project:claim_himalaya_app
1832
+ * @fqn wix.containers.projects.v1.ContainersProjects.ClaimHimalayaApp
1833
+ */
1834
+ declare function claimHimalayaApp(projectId: string): Promise<NonNullablePaths<ClaimHimalayaAppResponse, `authorizationVersion` | `metaSiteId` | `projectId` | `canonicalApp`, 0>>;
1789
1835
 
1790
- export { type AccountInfo, type ActionEvent, type AdditionalDataFilterMismatchType, type AdditionalDataFilterMissingKey, type AdditionalDataFilterMustHaveKey, type AdditionalDataMissingValue, type AdditionalFilterCantBeEmpty, AndroidFormat, type AndroidFormatWithLiterals, type ConductByScopeResponse, type ConductByScopesResponse, type ConductResponse, type ConductionException, type ConductionResult, type ConductionStatus, type ConductionStatusStatusOneOf, type CreateAgentSessionRequest, type CreateAgentSessionResponse, type CreateProjectRequest, type CreateProjectResponse, type CursorPaging, type CursorPagingMetadata, type Cursors, type DeleteProjectRequest, type DeleteProjectResponse, type DidNotFindEligibleFilter, type DomainEvent, type DomainEventBodyOneOf, type DynamicConfigConductionResult, type DynamicConfigStatus, type DynamicConfigStatusStatusOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type FailedMobileBuildPlatform, type FailedToFetchExperiment, type FailedToRunToss, FailureKind, type FailureKindWithLiterals, type FilterNotImplemented, type FilterNotSupported, type FilterOperandEmpty, type GeneralError, type GetAgentConfigRequest, type GetAgentConfigResponse, type GetAgentExperimentsRequest, type GetAgentExperimentsResponse, type GetHimalayaAuthorizationRequest, type GetHimalayaAuthorizationResponse, type GetLatestMobileBuildsOptions, type GetLatestMobileBuildsRequest, type GetLatestMobileBuildsResponse, type GetProjectRequest, type GetProjectResponse, type IdentificationData, type IdentificationDataIdOneOf, type InvalidLibraryConfiguration, type IsEnabledFieldNotFound, type IsEnabledFieldNotOfTypeBoolean, type ListProjectsForCurrentUserRequest, type ListProjectsForCurrentUserResponse, type ListProjectsOptions, type ListProjectsRequest, type ListProjectsResponse, type MessageEnvelope, type MissingElementInContextForBiProfileError, type MissingExperimentId, type MissingFilterTarget, type MissingPlugins, type MissingSeed, type MissingSeedKeyType, type MissingSeedType, type MobileBuild, type NoResultForConduction, type NotImplemented, Platform, type PlatformMobileBuilds, type PlatformWithLiterals, type PopulationError, type Project, type ProjectPlanReady, type ProjectResumeRequested, type ProjectStartRequested, ProjectStatus, type ProjectStatusWithLiterals, type RefreshAgentSiteTokenRequest, type RefreshAgentSiteTokenResponse, type RegenerateProjectIconRequest, type RegenerateProjectIconResponse, type RegenerateProjectNameRequest, type RegenerateProjectNameResponse, type RestoreInfo, type RestoreReleaseOptions, type RestoreReleaseRequest, type RestoreReleaseResponse, type ResumeProjectRequest, type ResumeProjectResponse, SandboxStatus, type SandboxStatusWithLiterals, type SaveProjectDesignOptions, type SaveProjectDesignRequest, type SaveProjectDesignResponse, type StartMobileBuildOptions, type StartMobileBuildRequest, type StartMobileBuildResponse, type StartProjectRequest, type StartProjectResponse, Status, type StatusWithLiterals, type SuccessfulResult, type UpdateProject, type UpdateProjectRequest, type UpdateProjectResponse, type V1AdditionalDataFilterMismatchType, type V1AdditionalDataFilterMissingKey, type V1AdditionalDataFilterMustHaveKey, type V1AdditionalDataMissingValue, type V1AdditionalFilterCantBeEmpty, type V1ConductionException, type V1DidNotFindEligibleFilter, type V1FailedToFetchExperiment, type V1FailedToRunToss, type V1FilterNotImplemented, type V1FilterNotSupported, type V1FilterOperandEmpty, type V1GeneralError, type V1MissingElementInContextForBiProfileError, type V1MissingExperimentId, type V1MissingFilterTarget, type V1MissingPlugins, type V1MissingSeed, type V1MissingSeedKeyType, type V1MissingSeedType, type V1NoResultForConduction, V1Platform, type V1PlatformWithLiterals, type V1PopulationError, type V1SuccessfulResult, Variant, type VariantValue, type VariantValueValueOneOf, type VariantWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, getHimalayaAuthorization, getLatestMobileBuilds, getProject, restoreRelease, resumeProject, saveProjectDesign, startMobileBuild };
1836
+ export { type AccountInfo, type ActionEvent, type AdditionalDataFilterMismatchType, type AdditionalDataFilterMissingKey, type AdditionalDataFilterMustHaveKey, type AdditionalDataMissingValue, type AdditionalFilterCantBeEmpty, AndroidFormat, type AndroidFormatWithLiterals, type ClaimHimalayaAppRequest, type ClaimHimalayaAppResponse, type ConductByScopeResponse, type ConductByScopesResponse, type ConductResponse, type ConductionException, type ConductionResult, type ConductionStatus, type ConductionStatusStatusOneOf, type CreateAgentSessionRequest, type CreateAgentSessionResponse, type CreateProjectRequest, type CreateProjectResponse, type CursorPaging, type CursorPagingMetadata, type Cursors, type DeleteProjectRequest, type DeleteProjectResponse, type DidNotFindEligibleFilter, type DomainEvent, type DomainEventBodyOneOf, type DynamicConfigConductionResult, type DynamicConfigStatus, type DynamicConfigStatusStatusOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type FailedMobileBuildPlatform, type FailedToFetchExperiment, type FailedToRunToss, FailureKind, type FailureKindWithLiterals, type FilterNotImplemented, type FilterNotSupported, type FilterOperandEmpty, type GeneralError, type GetAgentConfigRequest, type GetAgentConfigResponse, type GetAgentExperimentsRequest, type GetAgentExperimentsResponse, type GetHimalayaAuthorizationRequest, type GetHimalayaAuthorizationResponse, type GetLatestMobileBuildsOptions, type GetLatestMobileBuildsRequest, type GetLatestMobileBuildsResponse, type GetProjectRequest, type GetProjectResponse, type IdentificationData, type IdentificationDataIdOneOf, type InvalidLibraryConfiguration, type IsEnabledFieldNotFound, type IsEnabledFieldNotOfTypeBoolean, type ListProjectsForCurrentUserRequest, type ListProjectsForCurrentUserResponse, type ListProjectsOptions, type ListProjectsRequest, type ListProjectsResponse, type MessageEnvelope, type MissingElementInContextForBiProfileError, type MissingExperimentId, type MissingFilterTarget, type MissingPlugins, type MissingSeed, type MissingSeedKeyType, type MissingSeedType, type MobileBuild, type NoResultForConduction, type NotImplemented, Platform, type PlatformMobileBuilds, type PlatformWithLiterals, type PopulationError, type Project, type ProjectPlanReady, type ProjectResumeRequested, type ProjectStartRequested, ProjectStatus, type ProjectStatusWithLiterals, type RefreshAgentSiteTokenRequest, type RefreshAgentSiteTokenResponse, type RegenerateProjectIconRequest, type RegenerateProjectIconResponse, type RegenerateProjectNameRequest, type RegenerateProjectNameResponse, type RestoreInfo, type RestoreReleaseOptions, type RestoreReleaseRequest, type RestoreReleaseResponse, type ResumeProjectRequest, type ResumeProjectResponse, SandboxStatus, type SandboxStatusWithLiterals, type SaveProjectDesignOptions, type SaveProjectDesignRequest, type SaveProjectDesignResponse, type StartMobileBuildOptions, type StartMobileBuildRequest, type StartMobileBuildResponse, type StartProjectRequest, type StartProjectResponse, Status, type StatusWithLiterals, type SuccessfulResult, type UpdateProject, type UpdateProjectRequest, type UpdateProjectResponse, type V1AdditionalDataFilterMismatchType, type V1AdditionalDataFilterMissingKey, type V1AdditionalDataFilterMustHaveKey, type V1AdditionalDataMissingValue, type V1AdditionalFilterCantBeEmpty, type V1ConductionException, type V1DidNotFindEligibleFilter, type V1FailedToFetchExperiment, type V1FailedToRunToss, type V1FilterNotImplemented, type V1FilterNotSupported, type V1FilterOperandEmpty, type V1GeneralError, type V1MissingElementInContextForBiProfileError, type V1MissingExperimentId, type V1MissingFilterTarget, type V1MissingPlugins, type V1MissingSeed, type V1MissingSeedKeyType, type V1MissingSeedType, type V1NoResultForConduction, V1Platform, type V1PlatformWithLiterals, type V1PopulationError, type V1SuccessfulResult, Variant, type VariantValue, type VariantValueValueOneOf, type VariantWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, claimHimalayaApp, getHimalayaAuthorization, getLatestMobileBuilds, getProject, restoreRelease, resumeProject, saveProjectDesign, startMobileBuild };
@@ -399,6 +399,27 @@ function getLatestMobileBuilds(payload) {
399
399
  }
400
400
  return __getLatestMobileBuilds;
401
401
  }
402
+ function claimHimalayaApp(payload) {
403
+ function __claimHimalayaApp({ host }) {
404
+ const metadata = {
405
+ entityFqdn: "wix.containers.projects.v1.project",
406
+ method: "POST",
407
+ methodFqn: "wix.containers.projects.v1.ContainersProjects.ClaimHimalayaApp",
408
+ packageName: PACKAGE_NAME,
409
+ migrationOptions: {
410
+ optInTransformResponse: true
411
+ },
412
+ url: resolveWixContainersProjectsV1ContainersProjectsUrl({
413
+ protoPath: "/v1/projects/{projectId}/himalaya-app-claim",
414
+ data: payload,
415
+ host
416
+ }),
417
+ data: payload
418
+ };
419
+ return metadata;
420
+ }
421
+ return __claimHimalayaApp;
422
+ }
402
423
 
403
424
  // src/containers-projects-v1-project-projects.universal.ts
404
425
  var ProjectStatus = /* @__PURE__ */ ((ProjectStatus2) => {
@@ -842,6 +863,31 @@ async function getLatestMobileBuilds2(projectId, options) {
842
863
  throw transformedError;
843
864
  }
844
865
  }
866
+ async function claimHimalayaApp2(projectId) {
867
+ const { httpClient, sideEffects } = arguments[1];
868
+ const payload = renameKeysFromSDKRequestToRESTRequest({
869
+ projectId
870
+ });
871
+ const reqOpts = claimHimalayaApp(payload);
872
+ sideEffects?.onSiteCall?.();
873
+ try {
874
+ const result = await httpClient.request(reqOpts);
875
+ sideEffects?.onSuccess?.(result);
876
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
877
+ } catch (err) {
878
+ const transformedError = sdkTransformError(
879
+ err,
880
+ {
881
+ spreadPathsToArguments: {},
882
+ explicitPathsToArguments: { projectId: "$[0]" },
883
+ singleArgumentUnchanged: false
884
+ },
885
+ ["projectId"]
886
+ );
887
+ sideEffects?.onError?.(err);
888
+ throw transformedError;
889
+ }
890
+ }
845
891
  export {
846
892
  AndroidFormat,
847
893
  FailureKind,
@@ -852,6 +898,7 @@ export {
852
898
  V1Platform,
853
899
  Variant,
854
900
  WebhookIdentityType,
901
+ claimHimalayaApp2 as claimHimalayaApp,
855
902
  createProject2 as createProject,
856
903
  deleteProject2 as deleteProject,
857
904
  getHimalayaAuthorization2 as getHimalayaAuthorization,