@wix/auto_sdk_containers_projects 1.0.8 → 1.0.10

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.
@@ -22,6 +22,22 @@ var TRANSFORM_PATHS_3 = [
22
22
  { path: "projects.createdDate" },
23
23
  { path: "projects.updatedDate" }
24
24
  ];
25
+ var TRANSFORM_PATHS_4 = [
26
+ { path: "builds.downloadExpiresDate" },
27
+ { path: "builds.createdDate" },
28
+ { path: "builds.builtDate" },
29
+ { path: "builds.updatedDate" }
30
+ ];
31
+ var TRANSFORM_PATHS_5 = [
32
+ { path: "platforms.lastAttempt.downloadExpiresDate" },
33
+ { path: "platforms.lastAttempt.createdDate" },
34
+ { path: "platforms.lastAttempt.builtDate" },
35
+ { path: "platforms.lastAttempt.updatedDate" },
36
+ { path: "platforms.lastSuccessfulBuild.downloadExpiresDate" },
37
+ { path: "platforms.lastSuccessfulBuild.createdDate" },
38
+ { path: "platforms.lastSuccessfulBuild.builtDate" },
39
+ { path: "platforms.lastSuccessfulBuild.updatedDate" }
40
+ ];
25
41
  function resolveWixContainersProjectsV1ContainersProjectsUrl(opts) {
26
42
  const domainToMappings = {
27
43
  "manage._base_domain_": [
@@ -329,6 +345,60 @@ function getHimalayaAuthorization(payload) {
329
345
  }
330
346
  return __getHimalayaAuthorization;
331
347
  }
348
+ function startMobileBuild(payload) {
349
+ function __startMobileBuild({ host }) {
350
+ const metadata = {
351
+ entityFqdn: "wix.containers.projects.v1.project",
352
+ method: "POST",
353
+ methodFqn: "wix.containers.projects.v1.ContainersProjects.StartMobileBuild",
354
+ packageName: PACKAGE_NAME,
355
+ migrationOptions: {
356
+ optInTransformResponse: true
357
+ },
358
+ url: resolveWixContainersProjectsV1ContainersProjectsUrl({
359
+ protoPath: "/v1/projects/{projectId}/mobile-builds",
360
+ data: payload,
361
+ host
362
+ }),
363
+ data: payload,
364
+ transformResponse: (payload2) => transformPaths(payload2, [
365
+ {
366
+ transformFn: transformRESTTimestampToSDKTimestamp,
367
+ paths: TRANSFORM_PATHS_4
368
+ }
369
+ ])
370
+ };
371
+ return metadata;
372
+ }
373
+ return __startMobileBuild;
374
+ }
375
+ function getLatestMobileBuilds(payload) {
376
+ function __getLatestMobileBuilds({ host }) {
377
+ const metadata = {
378
+ entityFqdn: "wix.containers.projects.v1.project",
379
+ method: "POST",
380
+ methodFqn: "wix.containers.projects.v1.ContainersProjects.GetLatestMobileBuilds",
381
+ packageName: PACKAGE_NAME,
382
+ migrationOptions: {
383
+ optInTransformResponse: true
384
+ },
385
+ url: resolveWixContainersProjectsV1ContainersProjectsUrl({
386
+ protoPath: "/v1/projects/{projectId}/mobile-builds/latest",
387
+ data: payload,
388
+ host
389
+ }),
390
+ data: payload,
391
+ transformResponse: (payload2) => transformPaths(payload2, [
392
+ {
393
+ transformFn: transformRESTTimestampToSDKTimestamp,
394
+ paths: TRANSFORM_PATHS_5
395
+ }
396
+ ])
397
+ };
398
+ return metadata;
399
+ }
400
+ return __getLatestMobileBuilds;
401
+ }
332
402
 
333
403
  // src/containers-projects-v1-project-projects.universal.ts
334
404
  var ProjectStatus = /* @__PURE__ */ ((ProjectStatus2) => {
@@ -342,12 +412,12 @@ var SandboxStatus = /* @__PURE__ */ ((SandboxStatus2) => {
342
412
  SandboxStatus2["CREATING"] = "CREATING";
343
413
  return SandboxStatus2;
344
414
  })(SandboxStatus || {});
345
- var Platform = /* @__PURE__ */ ((Platform2) => {
346
- Platform2["IOS"] = "IOS";
347
- Platform2["ANDROID"] = "ANDROID";
348
- Platform2["HIMALAYA_MOBILE"] = "HIMALAYA_MOBILE";
349
- return Platform2;
350
- })(Platform || {});
415
+ var V1Platform = /* @__PURE__ */ ((V1Platform2) => {
416
+ V1Platform2["IOS"] = "IOS";
417
+ V1Platform2["ANDROID"] = "ANDROID";
418
+ V1Platform2["HIMALAYA_MOBILE"] = "HIMALAYA_MOBILE";
419
+ return V1Platform2;
420
+ })(V1Platform || {});
351
421
  var Variant = /* @__PURE__ */ ((Variant2) => {
352
422
  Variant2["VARIANT_UNSPECIFIED"] = "VARIANT_UNSPECIFIED";
353
423
  Variant2["A"] = "A";
@@ -386,6 +456,28 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
386
456
  WebhookIdentityType2["APP"] = "APP";
387
457
  return WebhookIdentityType2;
388
458
  })(WebhookIdentityType || {});
459
+ var Platform = /* @__PURE__ */ ((Platform2) => {
460
+ Platform2["IOS"] = "IOS";
461
+ Platform2["ANDROID"] = "ANDROID";
462
+ return Platform2;
463
+ })(Platform || {});
464
+ var AndroidFormat = /* @__PURE__ */ ((AndroidFormat2) => {
465
+ AndroidFormat2["APK"] = "APK";
466
+ AndroidFormat2["AAB"] = "AAB";
467
+ return AndroidFormat2;
468
+ })(AndroidFormat || {});
469
+ var Status = /* @__PURE__ */ ((Status2) => {
470
+ Status2["IN_PROGRESS"] = "IN_PROGRESS";
471
+ Status2["SUCCEEDED"] = "SUCCEEDED";
472
+ Status2["FAILED"] = "FAILED";
473
+ Status2["CANCELED"] = "CANCELED";
474
+ return Status2;
475
+ })(Status || {});
476
+ var FailureKind = /* @__PURE__ */ ((FailureKind2) => {
477
+ FailureKind2["SIGNING"] = "SIGNING";
478
+ FailureKind2["BUILD"] = "BUILD";
479
+ return FailureKind2;
480
+ })(FailureKind || {});
389
481
  async function createProject2(project) {
390
482
  const { httpClient, sideEffects } = arguments[1];
391
483
  const payload = renameKeysFromSDKRequestToRESTRequest({ project });
@@ -680,6 +772,76 @@ async function getHimalayaAuthorization2(projectId) {
680
772
  throw transformedError;
681
773
  }
682
774
  }
775
+ async function startMobileBuild2(projectId, platforms, options) {
776
+ const { httpClient, sideEffects } = arguments[3];
777
+ const payload = renameKeysFromSDKRequestToRESTRequest({
778
+ projectId,
779
+ platforms,
780
+ releaseId: options?.releaseId,
781
+ appVersion: options?.appVersion,
782
+ himalayaControlToken: options?.himalayaControlToken,
783
+ canonicalApp: options?.canonicalApp,
784
+ androidFormat: options?.androidFormat,
785
+ ownerAuthorization: options?.ownerAuthorization
786
+ });
787
+ const reqOpts = startMobileBuild(payload);
788
+ sideEffects?.onSiteCall?.();
789
+ try {
790
+ const result = await httpClient.request(reqOpts);
791
+ sideEffects?.onSuccess?.(result);
792
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
793
+ } catch (err) {
794
+ const transformedError = sdkTransformError(
795
+ err,
796
+ {
797
+ spreadPathsToArguments: {},
798
+ explicitPathsToArguments: {
799
+ projectId: "$[0]",
800
+ platforms: "$[1]",
801
+ releaseId: "$[2].releaseId",
802
+ appVersion: "$[2].appVersion",
803
+ himalayaControlToken: "$[2].himalayaControlToken",
804
+ canonicalApp: "$[2].canonicalApp",
805
+ androidFormat: "$[2].androidFormat",
806
+ ownerAuthorization: "$[2].ownerAuthorization"
807
+ },
808
+ singleArgumentUnchanged: false
809
+ },
810
+ ["projectId", "platforms", "options"]
811
+ );
812
+ sideEffects?.onError?.(err);
813
+ throw transformedError;
814
+ }
815
+ }
816
+ async function getLatestMobileBuilds2(projectId, options) {
817
+ const { httpClient, sideEffects } = arguments[2];
818
+ const payload = renameKeysFromSDKRequestToRESTRequest({
819
+ projectId,
820
+ himalayaControlToken: options?.himalayaControlToken
821
+ });
822
+ const reqOpts = getLatestMobileBuilds(payload);
823
+ sideEffects?.onSiteCall?.();
824
+ try {
825
+ const result = await httpClient.request(reqOpts);
826
+ sideEffects?.onSuccess?.(result);
827
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
828
+ } catch (err) {
829
+ const transformedError = sdkTransformError(
830
+ err,
831
+ {
832
+ spreadPathsToArguments: {},
833
+ explicitPathsToArguments: {
834
+ projectId: "$[0]",
835
+ himalayaControlToken: "$[1].himalayaControlToken"
836
+ },
837
+ singleArgumentUnchanged: false
838
+ },
839
+ ["projectId", "options"]
840
+ );
841
+ sideEffects?.onError?.(err);
842
+ throw transformedError;
843
+ }
844
+ }
683
845
 
684
846
  // src/containers-projects-v1-project-projects.public.ts
685
847
  function createProject3(httpClient) {
@@ -766,6 +928,23 @@ function getHimalayaAuthorization3(httpClient) {
766
928
  { httpClient }
767
929
  );
768
930
  }
931
+ function startMobileBuild3(httpClient) {
932
+ return (projectId, platforms, options) => startMobileBuild2(
933
+ projectId,
934
+ platforms,
935
+ options,
936
+ // @ts-ignore
937
+ { httpClient }
938
+ );
939
+ }
940
+ function getLatestMobileBuilds3(httpClient) {
941
+ return (projectId, options) => getLatestMobileBuilds2(
942
+ projectId,
943
+ options,
944
+ // @ts-ignore
945
+ { httpClient }
946
+ );
947
+ }
769
948
 
770
949
  // src/containers-projects-v1-project-projects.context.ts
771
950
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
@@ -780,15 +959,22 @@ var saveProjectDesign4 = /* @__PURE__ */ createRESTModule(saveProjectDesign3);
780
959
  var restoreRelease4 = /* @__PURE__ */ createRESTModule(restoreRelease3);
781
960
  var listProjects4 = /* @__PURE__ */ createRESTModule(listProjects3);
782
961
  var getHimalayaAuthorization4 = /* @__PURE__ */ createRESTModule(getHimalayaAuthorization3);
962
+ var startMobileBuild4 = /* @__PURE__ */ createRESTModule(startMobileBuild3);
963
+ var getLatestMobileBuilds4 = /* @__PURE__ */ createRESTModule(getLatestMobileBuilds3);
783
964
  export {
965
+ AndroidFormat,
966
+ FailureKind,
784
967
  Platform,
785
968
  ProjectStatus,
786
969
  SandboxStatus,
970
+ Status,
971
+ V1Platform,
787
972
  Variant,
788
973
  WebhookIdentityType,
789
974
  createProject4 as createProject,
790
975
  deleteProject4 as deleteProject,
791
976
  getHimalayaAuthorization4 as getHimalayaAuthorization,
977
+ getLatestMobileBuilds4 as getLatestMobileBuilds,
792
978
  getProject4 as getProject,
793
979
  listProjects4 as listProjects,
794
980
  regenerateProjectIcon4 as regenerateProjectIcon,
@@ -796,6 +982,7 @@ export {
796
982
  restoreRelease4 as restoreRelease,
797
983
  resumeProject4 as resumeProject,
798
984
  saveProjectDesign4 as saveProjectDesign,
985
+ startMobileBuild4 as startMobileBuild,
799
986
  updateProject4 as updateProject
800
987
  };
801
988
  //# sourceMappingURL=index.mjs.map