@wix/auto_sdk_containers_projects 1.0.9 → 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.
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { Project, ResumeProjectResponse, SaveProjectDesignOptions, SaveProjectDesignResponse, RestoreReleaseOptions, RestoreReleaseResponse, GetHimalayaAuthorizationResponse, PlatformWithLiterals, StartMobileBuildOptions, StartMobileBuildResponse, GetLatestMobileBuildsOptions, GetLatestMobileBuildsResponse } from './index.typings.mjs';
3
- export { AccountInfo, ActionEvent, AdditionalDataFilterMismatchType, AdditionalDataFilterMissingKey, AdditionalDataFilterMustHaveKey, AdditionalDataMissingValue, AdditionalFilterCantBeEmpty, ConductByScopeResponse, ConductByScopesResponse, ConductResponse, ConductionException, ConductionResult, ConductionStatus, ConductionStatusStatusOneOf, CreateAgentSessionRequest, CreateAgentSessionResponse, CreateProjectRequest, CreateProjectResponse, CursorPaging, CursorPagingMetadata, Cursors, DeleteProjectRequest, DeleteProjectResponse, DidNotFindEligibleFilter, DomainEvent, DomainEventBodyOneOf, DynamicConfigConductionResult, DynamicConfigStatus, DynamicConfigStatusStatusOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, FailedMobileBuildPlatform, FailedToFetchExperiment, FailedToRunToss, FailureKind, FailureKindWithLiterals, FilterNotImplemented, FilterNotSupported, FilterOperandEmpty, GeneralError, GetAgentConfigRequest, GetAgentConfigResponse, GetAgentExperimentsRequest, GetAgentExperimentsResponse, GetHimalayaAuthorizationRequest, GetLatestMobileBuildsRequest, GetProjectRequest, GetProjectResponse, IdentificationData, IdentificationDataIdOneOf, InvalidLibraryConfiguration, IsEnabledFieldNotFound, IsEnabledFieldNotOfTypeBoolean, ListProjectsForCurrentUserRequest, ListProjectsForCurrentUserResponse, ListProjectsOptions, ListProjectsRequest, ListProjectsResponse, MessageEnvelope, MissingElementInContextForBiProfileError, MissingExperimentId, MissingFilterTarget, MissingPlugins, MissingSeed, MissingSeedKeyType, MissingSeedType, MobileBuild, NoResultForConduction, NotImplemented, Platform, PlatformMobileBuilds, PopulationError, ProjectPlanReady, ProjectResumeRequested, ProjectStartRequested, ProjectStatus, ProjectStatusWithLiterals, RefreshAgentSiteTokenRequest, RefreshAgentSiteTokenResponse, RegenerateProjectIconRequest, RegenerateProjectIconResponse, RegenerateProjectNameRequest, RegenerateProjectNameResponse, RestoreInfo, RestoreReleaseRequest, ResumeProjectRequest, SandboxStatus, SandboxStatusWithLiterals, SaveProjectDesignRequest, StartMobileBuildRequest, StartProjectRequest, StartProjectResponse, Status, StatusWithLiterals, SuccessfulResult, UpdateProject, UpdateProjectRequest, UpdateProjectResponse, V1AdditionalDataFilterMismatchType, V1AdditionalDataFilterMissingKey, V1AdditionalDataFilterMustHaveKey, V1AdditionalDataMissingValue, V1AdditionalFilterCantBeEmpty, V1ConductionException, V1DidNotFindEligibleFilter, V1FailedToFetchExperiment, V1FailedToRunToss, V1FilterNotImplemented, V1FilterNotSupported, V1FilterOperandEmpty, V1GeneralError, V1MissingElementInContextForBiProfileError, V1MissingExperimentId, V1MissingFilterTarget, V1MissingPlugins, V1MissingSeed, V1MissingSeedKeyType, V1MissingSeedType, V1NoResultForConduction, V1Platform, V1PlatformWithLiterals, V1PopulationError, V1SuccessfulResult, Variant, VariantValue, VariantValueValueOneOf, VariantWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
2
+ import { Project, ResumeProjectResponse, SaveProjectDesignOptions, SaveProjectDesignResponse, RestoreReleaseOptions, RestoreReleaseResponse, GetHimalayaAuthorizationResponse, PlatformWithLiterals, StartMobileBuildOptions, StartMobileBuildResponse, GetLatestMobileBuildsOptions, GetLatestMobileBuildsResponse, ClaimHimalayaAppResponse } from './index.typings.mjs';
3
+ export { AccountInfo, ActionEvent, AdditionalDataFilterMismatchType, AdditionalDataFilterMissingKey, AdditionalDataFilterMustHaveKey, AdditionalDataMissingValue, AdditionalFilterCantBeEmpty, AndroidFormat, AndroidFormatWithLiterals, ClaimHimalayaAppRequest, ConductByScopeResponse, ConductByScopesResponse, ConductResponse, ConductionException, ConductionResult, ConductionStatus, ConductionStatusStatusOneOf, CreateAgentSessionRequest, CreateAgentSessionResponse, CreateProjectRequest, CreateProjectResponse, CursorPaging, CursorPagingMetadata, Cursors, DeleteProjectRequest, DeleteProjectResponse, DidNotFindEligibleFilter, DomainEvent, DomainEventBodyOneOf, DynamicConfigConductionResult, DynamicConfigStatus, DynamicConfigStatusStatusOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, FailedMobileBuildPlatform, FailedToFetchExperiment, FailedToRunToss, FailureKind, FailureKindWithLiterals, FilterNotImplemented, FilterNotSupported, FilterOperandEmpty, GeneralError, GetAgentConfigRequest, GetAgentConfigResponse, GetAgentExperimentsRequest, GetAgentExperimentsResponse, GetHimalayaAuthorizationRequest, GetLatestMobileBuildsRequest, GetProjectRequest, GetProjectResponse, IdentificationData, IdentificationDataIdOneOf, InvalidLibraryConfiguration, IsEnabledFieldNotFound, IsEnabledFieldNotOfTypeBoolean, ListProjectsForCurrentUserRequest, ListProjectsForCurrentUserResponse, ListProjectsOptions, ListProjectsRequest, ListProjectsResponse, MessageEnvelope, MissingElementInContextForBiProfileError, MissingExperimentId, MissingFilterTarget, MissingPlugins, MissingSeed, MissingSeedKeyType, MissingSeedType, MobileBuild, NoResultForConduction, NotImplemented, Platform, PlatformMobileBuilds, PopulationError, ProjectPlanReady, ProjectResumeRequested, ProjectStartRequested, ProjectStatus, ProjectStatusWithLiterals, RefreshAgentSiteTokenRequest, RefreshAgentSiteTokenResponse, RegenerateProjectIconRequest, RegenerateProjectIconResponse, RegenerateProjectNameRequest, RegenerateProjectNameResponse, RestoreInfo, RestoreReleaseRequest, ResumeProjectRequest, SandboxStatus, SandboxStatusWithLiterals, SaveProjectDesignRequest, StartMobileBuildRequest, StartProjectRequest, StartProjectResponse, Status, StatusWithLiterals, SuccessfulResult, UpdateProject, UpdateProjectRequest, UpdateProjectResponse, V1AdditionalDataFilterMismatchType, V1AdditionalDataFilterMissingKey, V1AdditionalDataFilterMustHaveKey, V1AdditionalDataMissingValue, V1AdditionalFilterCantBeEmpty, V1ConductionException, V1DidNotFindEligibleFilter, V1FailedToFetchExperiment, V1FailedToRunToss, V1FilterNotImplemented, V1FilterNotSupported, V1FilterOperandEmpty, V1GeneralError, V1MissingElementInContextForBiProfileError, V1MissingExperimentId, V1MissingFilterTarget, V1MissingPlugins, V1MissingSeed, V1MissingSeedKeyType, V1MissingSeedType, V1NoResultForConduction, V1Platform, V1PlatformWithLiterals, V1PopulationError, V1SuccessfulResult, Variant, VariantValue, VariantValueValueOneOf, VariantWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
4
4
 
5
5
  declare function getProject$1(httpClient: HttpClient): GetProjectSignature;
6
6
  interface GetProjectSignature {
@@ -103,7 +103,7 @@ interface StartMobileBuildSignature {
103
103
  * @param - ID of the project to build.
104
104
  * @param - Platforms to build. One build is started for each platform.
105
105
  */
106
- (projectId: string, platforms: PlatformWithLiterals[], options?: NonNullablePaths<StartMobileBuildOptions, `himalayaControlToken`, 0>): Promise<NonNullablePaths<StartMobileBuildResponse, `builds` | `builds.${number}.jobId` | `builds.${number}.platform` | `builds.${number}.releaseId` | `builds.${number}.appVersion` | `builds.${number}.status` | `builds.${number}.failureKind` | `builds.${number}.himalayaStatus` | `builds.${number}.errorMessage` | `builds.${number}.downloadUrl` | `builds.${number}.installPageUrl` | `builds.${number}.downloadExpired` | `failedPlatforms` | `failedPlatforms.${number}.platform` | `failedPlatforms.${number}.errorCode` | `failedPlatforms.${number}.errorMessage`, 2>>;
106
+ (projectId: string, platforms: PlatformWithLiterals[], options?: NonNullablePaths<StartMobileBuildOptions, `himalayaControlToken`, 0>): Promise<NonNullablePaths<StartMobileBuildResponse, `builds` | `builds.${number}.jobId` | `builds.${number}.platform` | `builds.${number}.releaseId` | `builds.${number}.appVersion` | `builds.${number}.status` | `builds.${number}.failureKind` | `builds.${number}.himalayaStatus` | `builds.${number}.errorMessage` | `builds.${number}.downloadUrl` | `builds.${number}.installPageUrl` | `builds.${number}.downloadExpired` | `builds.${number}.androidFormat` | `builds.${number}.apkDownloadUrl` | `failedPlatforms` | `failedPlatforms.${number}.platform` | `failedPlatforms.${number}.errorCode` | `failedPlatforms.${number}.errorMessage`, 2>>;
107
107
  }
108
108
  declare function getLatestMobileBuilds$1(httpClient: HttpClient): GetLatestMobileBuildsSignature;
109
109
  interface GetLatestMobileBuildsSignature {
@@ -118,7 +118,25 @@ interface GetLatestMobileBuildsSignature {
118
118
  * before the response. Without it, the stored state is returned as is.
119
119
  * @param - ID of the project.
120
120
  */
121
- (projectId: string, options?: GetLatestMobileBuildsOptions): Promise<NonNullablePaths<GetLatestMobileBuildsResponse, `platforms` | `platforms.${number}.platform` | `platforms.${number}.lastAttempt.jobId` | `platforms.${number}.lastAttempt.platform` | `platforms.${number}.lastAttempt.releaseId` | `platforms.${number}.lastAttempt.appVersion` | `platforms.${number}.lastAttempt.status` | `platforms.${number}.lastAttempt.failureKind` | `platforms.${number}.lastAttempt.himalayaStatus` | `platforms.${number}.lastAttempt.errorMessage` | `platforms.${number}.lastAttempt.downloadUrl` | `platforms.${number}.lastAttempt.installPageUrl` | `platforms.${number}.lastAttempt.downloadExpired` | `refreshFailed`, 3>>;
121
+ (projectId: string, options?: GetLatestMobileBuildsOptions): Promise<NonNullablePaths<GetLatestMobileBuildsResponse, `platforms` | `platforms.${number}.platform` | `platforms.${number}.lastAttempt.jobId` | `platforms.${number}.lastAttempt.platform` | `platforms.${number}.lastAttempt.releaseId` | `platforms.${number}.lastAttempt.appVersion` | `platforms.${number}.lastAttempt.status` | `platforms.${number}.lastAttempt.failureKind` | `platforms.${number}.lastAttempt.himalayaStatus` | `platforms.${number}.lastAttempt.errorMessage` | `platforms.${number}.lastAttempt.downloadUrl` | `platforms.${number}.lastAttempt.installPageUrl` | `platforms.${number}.lastAttempt.downloadExpired` | `platforms.${number}.lastAttempt.androidFormat` | `platforms.${number}.lastAttempt.apkDownloadUrl` | `refreshFailed`, 3>>;
122
+ }
123
+ declare function claimHimalayaApp$1(httpClient: HttpClient): ClaimHimalayaAppSignature;
124
+ interface ClaimHimalayaAppSignature {
125
+ /**
126
+ * Claims the canonical Himalaya app for a NEW site-tenanted project, or returns the one already
127
+ * bound to it.
128
+ *
129
+ * This exists so the BROWSER never asserts the (MetaSite, project) pair to Himalaya. Containers
130
+ * is the authority on project -> MetaSite: it reads the project from its own store with a
131
+ * consistent read and takes the MetaSite from this call's identity context, then claims
132
+ * server-to-server with a site USER token minted for the initiating collaborator. Himalaya
133
+ * recognises that token as minted by THIS service and trusts the pair on that basis. A dashboard
134
+ * calling Himalaya directly could name another site's project UUID and reserve its global slug.
135
+ *
136
+ * Idempotent per pair: an already-claimed project returns its existing canonical app.
137
+ * @param - Site-tenanted Containers project to claim a Himalaya app for.
138
+ */
139
+ (projectId: string): Promise<NonNullablePaths<ClaimHimalayaAppResponse, `authorizationVersion` | `metaSiteId` | `projectId` | `canonicalApp`, 0>>;
122
140
  }
123
141
 
124
142
  declare const getProject: MaybeContext<BuildRESTFunction<typeof getProject$1> & typeof getProject$1>;
@@ -128,5 +146,6 @@ declare const restoreRelease: MaybeContext<BuildRESTFunction<typeof restoreRelea
128
146
  declare const getHimalayaAuthorization: MaybeContext<BuildRESTFunction<typeof getHimalayaAuthorization$1> & typeof getHimalayaAuthorization$1>;
129
147
  declare const startMobileBuild: MaybeContext<BuildRESTFunction<typeof startMobileBuild$1> & typeof startMobileBuild$1>;
130
148
  declare const getLatestMobileBuilds: MaybeContext<BuildRESTFunction<typeof getLatestMobileBuilds$1> & typeof getLatestMobileBuilds$1>;
149
+ declare const claimHimalayaApp: MaybeContext<BuildRESTFunction<typeof claimHimalayaApp$1> & typeof claimHimalayaApp$1>;
131
150
 
132
- export { GetHimalayaAuthorizationResponse, GetLatestMobileBuildsOptions, GetLatestMobileBuildsResponse, PlatformWithLiterals, Project, RestoreReleaseOptions, RestoreReleaseResponse, ResumeProjectResponse, SaveProjectDesignOptions, SaveProjectDesignResponse, StartMobileBuildOptions, StartMobileBuildResponse, getHimalayaAuthorization, getLatestMobileBuilds, getProject, restoreRelease, resumeProject, saveProjectDesign, startMobileBuild };
151
+ export { ClaimHimalayaAppResponse, GetHimalayaAuthorizationResponse, GetLatestMobileBuildsOptions, GetLatestMobileBuildsResponse, PlatformWithLiterals, Project, RestoreReleaseOptions, RestoreReleaseResponse, ResumeProjectResponse, SaveProjectDesignOptions, SaveProjectDesignResponse, StartMobileBuildOptions, StartMobileBuildResponse, 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) => {
@@ -461,6 +482,11 @@ var Platform = /* @__PURE__ */ ((Platform2) => {
461
482
  Platform2["ANDROID"] = "ANDROID";
462
483
  return Platform2;
463
484
  })(Platform || {});
485
+ var AndroidFormat = /* @__PURE__ */ ((AndroidFormat2) => {
486
+ AndroidFormat2["APK"] = "APK";
487
+ AndroidFormat2["AAB"] = "AAB";
488
+ return AndroidFormat2;
489
+ })(AndroidFormat || {});
464
490
  var Status = /* @__PURE__ */ ((Status2) => {
465
491
  Status2["IN_PROGRESS"] = "IN_PROGRESS";
466
492
  Status2["SUCCEEDED"] = "SUCCEEDED";
@@ -775,7 +801,9 @@ async function startMobileBuild2(projectId, platforms, options) {
775
801
  releaseId: options?.releaseId,
776
802
  appVersion: options?.appVersion,
777
803
  himalayaControlToken: options?.himalayaControlToken,
778
- canonicalApp: options?.canonicalApp
804
+ canonicalApp: options?.canonicalApp,
805
+ androidFormat: options?.androidFormat,
806
+ ownerAuthorization: options?.ownerAuthorization
779
807
  });
780
808
  const reqOpts = startMobileBuild(payload);
781
809
  sideEffects?.onSiteCall?.();
@@ -794,7 +822,9 @@ async function startMobileBuild2(projectId, platforms, options) {
794
822
  releaseId: "$[2].releaseId",
795
823
  appVersion: "$[2].appVersion",
796
824
  himalayaControlToken: "$[2].himalayaControlToken",
797
- canonicalApp: "$[2].canonicalApp"
825
+ canonicalApp: "$[2].canonicalApp",
826
+ androidFormat: "$[2].androidFormat",
827
+ ownerAuthorization: "$[2].ownerAuthorization"
798
828
  },
799
829
  singleArgumentUnchanged: false
800
830
  },
@@ -833,6 +863,31 @@ async function getLatestMobileBuilds2(projectId, options) {
833
863
  throw transformedError;
834
864
  }
835
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
+ }
836
891
 
837
892
  // src/containers-projects-v1-project-projects.public.ts
838
893
  function createProject3(httpClient) {
@@ -936,6 +991,13 @@ function getLatestMobileBuilds3(httpClient) {
936
991
  { httpClient }
937
992
  );
938
993
  }
994
+ function claimHimalayaApp3(httpClient) {
995
+ return (projectId) => claimHimalayaApp2(
996
+ projectId,
997
+ // @ts-ignore
998
+ { httpClient }
999
+ );
1000
+ }
939
1001
 
940
1002
  // src/containers-projects-v1-project-projects.context.ts
941
1003
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
@@ -952,7 +1014,9 @@ var listProjects4 = /* @__PURE__ */ createRESTModule(listProjects3);
952
1014
  var getHimalayaAuthorization4 = /* @__PURE__ */ createRESTModule(getHimalayaAuthorization3);
953
1015
  var startMobileBuild4 = /* @__PURE__ */ createRESTModule(startMobileBuild3);
954
1016
  var getLatestMobileBuilds4 = /* @__PURE__ */ createRESTModule(getLatestMobileBuilds3);
1017
+ var claimHimalayaApp4 = /* @__PURE__ */ createRESTModule(claimHimalayaApp3);
955
1018
  export {
1019
+ AndroidFormat,
956
1020
  FailureKind,
957
1021
  Platform,
958
1022
  ProjectStatus,
@@ -961,6 +1025,7 @@ export {
961
1025
  V1Platform,
962
1026
  Variant,
963
1027
  WebhookIdentityType,
1028
+ claimHimalayaApp4 as claimHimalayaApp,
964
1029
  createProject4 as createProject,
965
1030
  deleteProject4 as deleteProject,
966
1031
  getHimalayaAuthorization4 as getHimalayaAuthorization,