@wix/auto_sdk_containers_projects 1.0.10 → 1.0.12

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, AndroidFormat, AndroidFormatWithLiterals, 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 {
@@ -120,6 +120,24 @@ interface GetLatestMobileBuildsSignature {
120
120
  */
121
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
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>>;
140
+ }
123
141
 
124
142
  declare const getProject: MaybeContext<BuildRESTFunction<typeof getProject$1> & typeof getProject$1>;
125
143
  declare const resumeProject: MaybeContext<BuildRESTFunction<typeof resumeProject$1> & typeof resumeProject$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 };
@@ -50,6 +50,16 @@ function resolveWixContainersProjectsV1ContainersProjectsUrl(opts) {
50
50
  {
51
51
  srcPath: "/containers/projects",
52
52
  destPath: ""
53
+ },
54
+ {
55
+ srcPath: "/containers/projects/v1/projects",
56
+ destPath: "/v1/projects"
57
+ }
58
+ ],
59
+ _: [
60
+ {
61
+ srcPath: "/containers/projects/v1/projects",
62
+ destPath: "/v1/projects"
53
63
  }
54
64
  ]
55
65
  };
@@ -399,6 +409,27 @@ function getLatestMobileBuilds(payload) {
399
409
  }
400
410
  return __getLatestMobileBuilds;
401
411
  }
412
+ function claimHimalayaApp(payload) {
413
+ function __claimHimalayaApp({ host }) {
414
+ const metadata = {
415
+ entityFqdn: "wix.containers.projects.v1.project",
416
+ method: "POST",
417
+ methodFqn: "wix.containers.projects.v1.ContainersProjects.ClaimHimalayaApp",
418
+ packageName: PACKAGE_NAME,
419
+ migrationOptions: {
420
+ optInTransformResponse: true
421
+ },
422
+ url: resolveWixContainersProjectsV1ContainersProjectsUrl({
423
+ protoPath: "/v1/projects/{projectId}/himalaya-app-claim",
424
+ data: payload,
425
+ host
426
+ }),
427
+ data: payload
428
+ };
429
+ return metadata;
430
+ }
431
+ return __claimHimalayaApp;
432
+ }
402
433
 
403
434
  // src/containers-projects-v1-project-projects.universal.ts
404
435
  var ProjectStatus = /* @__PURE__ */ ((ProjectStatus2) => {
@@ -842,6 +873,31 @@ async function getLatestMobileBuilds2(projectId, options) {
842
873
  throw transformedError;
843
874
  }
844
875
  }
876
+ async function claimHimalayaApp2(projectId) {
877
+ const { httpClient, sideEffects } = arguments[1];
878
+ const payload = renameKeysFromSDKRequestToRESTRequest({
879
+ projectId
880
+ });
881
+ const reqOpts = claimHimalayaApp(payload);
882
+ sideEffects?.onSiteCall?.();
883
+ try {
884
+ const result = await httpClient.request(reqOpts);
885
+ sideEffects?.onSuccess?.(result);
886
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
887
+ } catch (err) {
888
+ const transformedError = sdkTransformError(
889
+ err,
890
+ {
891
+ spreadPathsToArguments: {},
892
+ explicitPathsToArguments: { projectId: "$[0]" },
893
+ singleArgumentUnchanged: false
894
+ },
895
+ ["projectId"]
896
+ );
897
+ sideEffects?.onError?.(err);
898
+ throw transformedError;
899
+ }
900
+ }
845
901
 
846
902
  // src/containers-projects-v1-project-projects.public.ts
847
903
  function createProject3(httpClient) {
@@ -945,6 +1001,13 @@ function getLatestMobileBuilds3(httpClient) {
945
1001
  { httpClient }
946
1002
  );
947
1003
  }
1004
+ function claimHimalayaApp3(httpClient) {
1005
+ return (projectId) => claimHimalayaApp2(
1006
+ projectId,
1007
+ // @ts-ignore
1008
+ { httpClient }
1009
+ );
1010
+ }
948
1011
 
949
1012
  // src/containers-projects-v1-project-projects.context.ts
950
1013
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
@@ -961,6 +1024,7 @@ var listProjects4 = /* @__PURE__ */ createRESTModule(listProjects3);
961
1024
  var getHimalayaAuthorization4 = /* @__PURE__ */ createRESTModule(getHimalayaAuthorization3);
962
1025
  var startMobileBuild4 = /* @__PURE__ */ createRESTModule(startMobileBuild3);
963
1026
  var getLatestMobileBuilds4 = /* @__PURE__ */ createRESTModule(getLatestMobileBuilds3);
1027
+ var claimHimalayaApp4 = /* @__PURE__ */ createRESTModule(claimHimalayaApp3);
964
1028
  export {
965
1029
  AndroidFormat,
966
1030
  FailureKind,
@@ -971,6 +1035,7 @@ export {
971
1035
  V1Platform,
972
1036
  Variant,
973
1037
  WebhookIdentityType,
1038
+ claimHimalayaApp4 as claimHimalayaApp,
974
1039
  createProject4 as createProject,
975
1040
  deleteProject4 as deleteProject,
976
1041
  getHimalayaAuthorization4 as getHimalayaAuthorization,