@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.js';
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.js';
2
+ import { Project, ResumeProjectResponse, SaveProjectDesignOptions, SaveProjectDesignResponse, RestoreReleaseOptions, RestoreReleaseResponse, GetHimalayaAuthorizationResponse, PlatformWithLiterals, StartMobileBuildOptions, StartMobileBuildResponse, GetLatestMobileBuildsOptions, GetLatestMobileBuildsResponse, ClaimHimalayaAppResponse } from './index.typings.js';
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.js';
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 };
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ AndroidFormat: () => AndroidFormat,
23
24
  FailureKind: () => FailureKind,
24
25
  Platform: () => Platform,
25
26
  ProjectStatus: () => ProjectStatus,
@@ -28,6 +29,7 @@ __export(index_exports, {
28
29
  V1Platform: () => V1Platform,
29
30
  Variant: () => Variant,
30
31
  WebhookIdentityType: () => WebhookIdentityType,
32
+ claimHimalayaApp: () => claimHimalayaApp4,
31
33
  createProject: () => createProject4,
32
34
  deleteProject: () => deleteProject4,
33
35
  getHimalayaAuthorization: () => getHimalayaAuthorization4,
@@ -442,6 +444,27 @@ function getLatestMobileBuilds(payload) {
442
444
  }
443
445
  return __getLatestMobileBuilds;
444
446
  }
447
+ function claimHimalayaApp(payload) {
448
+ function __claimHimalayaApp({ host }) {
449
+ const metadata = {
450
+ entityFqdn: "wix.containers.projects.v1.project",
451
+ method: "POST",
452
+ methodFqn: "wix.containers.projects.v1.ContainersProjects.ClaimHimalayaApp",
453
+ packageName: PACKAGE_NAME,
454
+ migrationOptions: {
455
+ optInTransformResponse: true
456
+ },
457
+ url: resolveWixContainersProjectsV1ContainersProjectsUrl({
458
+ protoPath: "/v1/projects/{projectId}/himalaya-app-claim",
459
+ data: payload,
460
+ host
461
+ }),
462
+ data: payload
463
+ };
464
+ return metadata;
465
+ }
466
+ return __claimHimalayaApp;
467
+ }
445
468
 
446
469
  // src/containers-projects-v1-project-projects.universal.ts
447
470
  var ProjectStatus = /* @__PURE__ */ ((ProjectStatus2) => {
@@ -504,6 +527,11 @@ var Platform = /* @__PURE__ */ ((Platform2) => {
504
527
  Platform2["ANDROID"] = "ANDROID";
505
528
  return Platform2;
506
529
  })(Platform || {});
530
+ var AndroidFormat = /* @__PURE__ */ ((AndroidFormat2) => {
531
+ AndroidFormat2["APK"] = "APK";
532
+ AndroidFormat2["AAB"] = "AAB";
533
+ return AndroidFormat2;
534
+ })(AndroidFormat || {});
507
535
  var Status = /* @__PURE__ */ ((Status2) => {
508
536
  Status2["IN_PROGRESS"] = "IN_PROGRESS";
509
537
  Status2["SUCCEEDED"] = "SUCCEEDED";
@@ -818,7 +846,9 @@ async function startMobileBuild2(projectId, platforms, options) {
818
846
  releaseId: options?.releaseId,
819
847
  appVersion: options?.appVersion,
820
848
  himalayaControlToken: options?.himalayaControlToken,
821
- canonicalApp: options?.canonicalApp
849
+ canonicalApp: options?.canonicalApp,
850
+ androidFormat: options?.androidFormat,
851
+ ownerAuthorization: options?.ownerAuthorization
822
852
  });
823
853
  const reqOpts = startMobileBuild(payload);
824
854
  sideEffects?.onSiteCall?.();
@@ -837,7 +867,9 @@ async function startMobileBuild2(projectId, platforms, options) {
837
867
  releaseId: "$[2].releaseId",
838
868
  appVersion: "$[2].appVersion",
839
869
  himalayaControlToken: "$[2].himalayaControlToken",
840
- canonicalApp: "$[2].canonicalApp"
870
+ canonicalApp: "$[2].canonicalApp",
871
+ androidFormat: "$[2].androidFormat",
872
+ ownerAuthorization: "$[2].ownerAuthorization"
841
873
  },
842
874
  singleArgumentUnchanged: false
843
875
  },
@@ -876,6 +908,31 @@ async function getLatestMobileBuilds2(projectId, options) {
876
908
  throw transformedError;
877
909
  }
878
910
  }
911
+ async function claimHimalayaApp2(projectId) {
912
+ const { httpClient, sideEffects } = arguments[1];
913
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
914
+ projectId
915
+ });
916
+ const reqOpts = claimHimalayaApp(payload);
917
+ sideEffects?.onSiteCall?.();
918
+ try {
919
+ const result = await httpClient.request(reqOpts);
920
+ sideEffects?.onSuccess?.(result);
921
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
922
+ } catch (err) {
923
+ const transformedError = (0, import_transform_error.transformError)(
924
+ err,
925
+ {
926
+ spreadPathsToArguments: {},
927
+ explicitPathsToArguments: { projectId: "$[0]" },
928
+ singleArgumentUnchanged: false
929
+ },
930
+ ["projectId"]
931
+ );
932
+ sideEffects?.onError?.(err);
933
+ throw transformedError;
934
+ }
935
+ }
879
936
 
880
937
  // src/containers-projects-v1-project-projects.public.ts
881
938
  function createProject3(httpClient) {
@@ -979,6 +1036,13 @@ function getLatestMobileBuilds3(httpClient) {
979
1036
  { httpClient }
980
1037
  );
981
1038
  }
1039
+ function claimHimalayaApp3(httpClient) {
1040
+ return (projectId) => claimHimalayaApp2(
1041
+ projectId,
1042
+ // @ts-ignore
1043
+ { httpClient }
1044
+ );
1045
+ }
982
1046
 
983
1047
  // src/containers-projects-v1-project-projects.context.ts
984
1048
  var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
@@ -995,8 +1059,10 @@ var listProjects4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(l
995
1059
  var getHimalayaAuthorization4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getHimalayaAuthorization3);
996
1060
  var startMobileBuild4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(startMobileBuild3);
997
1061
  var getLatestMobileBuilds4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getLatestMobileBuilds3);
1062
+ var claimHimalayaApp4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(claimHimalayaApp3);
998
1063
  // Annotate the CommonJS export names for ESM import in node:
999
1064
  0 && (module.exports = {
1065
+ AndroidFormat,
1000
1066
  FailureKind,
1001
1067
  Platform,
1002
1068
  ProjectStatus,
@@ -1005,6 +1071,7 @@ var getLatestMobileBuilds4 = /* @__PURE__ */ (0, import_rest_modules3.createREST
1005
1071
  V1Platform,
1006
1072
  Variant,
1007
1073
  WebhookIdentityType,
1074
+ claimHimalayaApp,
1008
1075
  createProject,
1009
1076
  deleteProject,
1010
1077
  getHimalayaAuthorization,