@wix/auto_sdk_containers_projects 1.0.8 → 1.0.9

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.
@@ -72,7 +72,7 @@ interface Project {
72
72
  * Platform that the project's app targets. Set when the project is created and can't be changed.
73
73
  * @immutable
74
74
  */
75
- platform?: PlatformWithLiterals;
75
+ platform?: V1PlatformWithLiterals;
76
76
  /**
77
77
  * URL of the app's icon.
78
78
  * @maxLength 2000
@@ -112,7 +112,7 @@ declare enum SandboxStatus {
112
112
  }
113
113
  /** @enumType */
114
114
  type SandboxStatusWithLiterals = SandboxStatus | 'NONE' | 'CREATING';
115
- declare enum Platform {
115
+ declare enum V1Platform {
116
116
  /** Native iOS app. Used by older projects. */
117
117
  IOS = "IOS",
118
118
  /** Native Android app. Used by older projects. */
@@ -124,7 +124,7 @@ declare enum Platform {
124
124
  HIMALAYA_MOBILE = "HIMALAYA_MOBILE"
125
125
  }
126
126
  /** @enumType */
127
- type PlatformWithLiterals = Platform | 'IOS' | 'ANDROID' | 'HIMALAYA_MOBILE';
127
+ type V1PlatformWithLiterals = V1Platform | 'IOS' | 'ANDROID' | 'HIMALAYA_MOBILE';
128
128
  /** Details of a request to start a project's remote development environment. */
129
129
  interface ProjectStartRequested {
130
130
  /**
@@ -1231,6 +1231,192 @@ interface GetHimalayaAuthorizationResponse {
1231
1231
  /** Whether the current user can save the project's design. */
1232
1232
  saveDesign?: boolean;
1233
1233
  }
1234
+ interface StartMobileBuildRequest {
1235
+ /**
1236
+ * ID of the project to build.
1237
+ * @format GUID
1238
+ */
1239
+ projectId: string;
1240
+ /**
1241
+ * Platforms to build. One build is started for each platform.
1242
+ * @minSize 1
1243
+ * @maxSize 2
1244
+ */
1245
+ platforms: PlatformWithLiterals[];
1246
+ /**
1247
+ * ID of the app release to build. When not specified, the app's live release is built.
1248
+ * @maxLength 200
1249
+ */
1250
+ releaseId?: string;
1251
+ /**
1252
+ * Version label for the builds, for example `1.2.0`. It's stored with the builds and returned by
1253
+ * Get Latest Mobile Builds. It isn't written into the app.
1254
+ * @maxLength 50
1255
+ */
1256
+ appVersion?: string;
1257
+ /**
1258
+ * Short-lived control credential for the project's app.
1259
+ *
1260
+ * Used for this call only. It isn't stored or returned.
1261
+ * @maxLength 4096
1262
+ */
1263
+ himalayaControlToken: string;
1264
+ /**
1265
+ * Canonical slug of the project's app, exactly as returned in `canonicalApp` by
1266
+ * [Get Himalaya Authorization](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/get-himalaya-authorization).
1267
+ *
1268
+ * Required when the project's `platform` is `HIMALAYA_MOBILE`. The value is verified on the server.
1269
+ * @maxLength 200
1270
+ */
1271
+ canonicalApp?: string;
1272
+ }
1273
+ /** Platform that an app-file build targets. */
1274
+ declare enum Platform {
1275
+ /** iOS. The build makes an `.ipa` file and an install page. */
1276
+ IOS = "IOS",
1277
+ /** Android. The build makes an `.apk` file. */
1278
+ ANDROID = "ANDROID"
1279
+ }
1280
+ /** @enumType */
1281
+ type PlatformWithLiterals = Platform | 'IOS' | 'ANDROID';
1282
+ interface StartMobileBuildResponse {
1283
+ /**
1284
+ * Started builds, one for each platform that was accepted.
1285
+ * @maxSize 2
1286
+ */
1287
+ builds?: MobileBuild[];
1288
+ /**
1289
+ * Platforms whose build couldn't be started. Empty when every platform was started.
1290
+ * @maxSize 2
1291
+ */
1292
+ failedPlatforms?: FailedMobileBuildPlatform[];
1293
+ }
1294
+ /** One build of a project's installable app files, for one platform. */
1295
+ interface MobileBuild {
1296
+ /**
1297
+ * Build ID.
1298
+ * @maxLength 200
1299
+ */
1300
+ jobId?: string;
1301
+ /** Platform that the build targets. */
1302
+ platform?: PlatformWithLiterals;
1303
+ /**
1304
+ * ID of the app release that was built.
1305
+ * @maxLength 200
1306
+ */
1307
+ releaseId?: string;
1308
+ /**
1309
+ * Version label that the owner gave the build when it was started. Can be empty.
1310
+ * @maxLength 50
1311
+ */
1312
+ appVersion?: string;
1313
+ /** Build status. */
1314
+ status?: StatusWithLiterals;
1315
+ /** Why the build failed. Returned only when `status` is `FAILED`. */
1316
+ failureKind?: FailureKindWithLiterals;
1317
+ /**
1318
+ * Status reported by the build system, for diagnostics only.
1319
+ * @maxLength 50
1320
+ */
1321
+ himalayaStatus?: string;
1322
+ /**
1323
+ * Error text reported by the build system, for diagnostics only. Don't parse it.
1324
+ * @maxLength 2000
1325
+ */
1326
+ errorMessage?: string;
1327
+ /**
1328
+ * URL of the built file: an `.ipa` file for iOS, or an `.apk` file for Android.
1329
+ * Returned only when `status` is `SUCCEEDED`. Can be empty for iOS.
1330
+ * @format WEB_URL
1331
+ */
1332
+ downloadUrl?: string;
1333
+ /**
1334
+ * iOS only. URL of the page that installs the app on an iPhone.
1335
+ * Returned only when `status` is `SUCCEEDED`. Can be empty.
1336
+ * @format WEB_URL
1337
+ */
1338
+ installPageUrl?: string;
1339
+ /** Date and time the download links expire, about 7 days after the build. */
1340
+ downloadExpiresDate?: Date | null;
1341
+ /** Whether the download links have expired. To get new links, start a new build. */
1342
+ downloadExpired?: boolean;
1343
+ /** Date and time the build was started. */
1344
+ _createdDate?: Date | null;
1345
+ /** Date and time the build was first seen as `SUCCEEDED`. */
1346
+ builtDate?: Date | null;
1347
+ /** Date and time the build last changed. */
1348
+ _updatedDate?: Date | null;
1349
+ }
1350
+ /** Status of an app-file build. */
1351
+ declare enum Status {
1352
+ /** The build is queued or running. */
1353
+ IN_PROGRESS = "IN_PROGRESS",
1354
+ /** The build finished and its files can be downloaded until `downloadExpiresDate`. */
1355
+ SUCCEEDED = "SUCCEEDED",
1356
+ /** The build failed. See `failureKind`. */
1357
+ FAILED = "FAILED",
1358
+ /** The build was canceled. */
1359
+ CANCELED = "CANCELED"
1360
+ }
1361
+ /** @enumType */
1362
+ type StatusWithLiterals = Status | 'IN_PROGRESS' | 'SUCCEEDED' | 'FAILED' | 'CANCELED';
1363
+ /** Why an app-file build failed. */
1364
+ declare enum FailureKind {
1365
+ /** The app couldn't be signed. */
1366
+ SIGNING = "SIGNING",
1367
+ /** The build failed for another reason. */
1368
+ BUILD = "BUILD"
1369
+ }
1370
+ /** @enumType */
1371
+ type FailureKindWithLiterals = FailureKind | 'SIGNING' | 'BUILD';
1372
+ /** A platform whose build couldn't be started. */
1373
+ interface FailedMobileBuildPlatform {
1374
+ /** Platform. */
1375
+ platform?: PlatformWithLiterals;
1376
+ /**
1377
+ * Error code reported by the build system.
1378
+ * @maxLength 200
1379
+ */
1380
+ errorCode?: string;
1381
+ /**
1382
+ * Error text reported by the build system, for diagnostics only.
1383
+ * @maxLength 2000
1384
+ */
1385
+ errorMessage?: string;
1386
+ }
1387
+ interface GetLatestMobileBuildsRequest {
1388
+ /**
1389
+ * ID of the project.
1390
+ * @format GUID
1391
+ */
1392
+ projectId: string;
1393
+ /**
1394
+ * Short-lived control credential for the project's app.
1395
+ *
1396
+ * When specified, builds in progress are refreshed before the response. Used for this call only.
1397
+ * It isn't stored or returned.
1398
+ * @maxLength 4096
1399
+ */
1400
+ himalayaControlToken?: string;
1401
+ }
1402
+ interface GetLatestMobileBuildsResponse {
1403
+ /**
1404
+ * Latest builds for each platform: iOS first, then Android.
1405
+ * @maxSize 2
1406
+ */
1407
+ platforms?: PlatformMobileBuilds[];
1408
+ /** Whether refreshing builds in progress failed. When `true`, the stored state is returned. */
1409
+ refreshFailed?: boolean;
1410
+ }
1411
+ /** The latest app-file builds of a project for one platform. */
1412
+ interface PlatformMobileBuilds {
1413
+ /** Platform. */
1414
+ platform?: PlatformWithLiterals;
1415
+ /** The last build that was started, in any status. Not returned when no build was started. */
1416
+ lastAttempt?: MobileBuild;
1417
+ /** The last build that succeeded. Its links can be expired. Not returned when no build succeeded. */
1418
+ lastSuccessfulBuild?: MobileBuild;
1419
+ }
1234
1420
  /**
1235
1421
  * Retrieves a project.
1236
1422
  * @param projectId - ID of the project to retrieve.
@@ -1310,7 +1496,7 @@ interface UpdateProject {
1310
1496
  * Platform that the project's app targets. Set when the project is created and can't be changed.
1311
1497
  * @immutable
1312
1498
  */
1313
- platform?: PlatformWithLiterals;
1499
+ platform?: V1PlatformWithLiterals;
1314
1500
  /**
1315
1501
  * URL of the app's icon.
1316
1502
  * @maxLength 2000
@@ -1477,5 +1663,81 @@ interface ListProjectsOptions {
1477
1663
  * @fqn wix.containers.projects.v1.ContainersProjects.GetHimalayaAuthorization
1478
1664
  */
1479
1665
  declare function getHimalayaAuthorization(projectId: string): Promise<NonNullablePaths<GetHimalayaAuthorizationResponse, `authorizationVersion` | `metaSiteId` | `projectId` | `canonicalApp` | `workerLaunch` | `saveDesign`, 0>>;
1666
+ /**
1667
+ * Starts building the installable app files of a project, one build for each platform.
1668
+ *
1669
+ * The builds run in the background and take several minutes. To follow them, call
1670
+ * [Get Latest Mobile Builds](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/get-latest-mobile-builds)
1671
+ * with `himalayaControlToken`.
1672
+ *
1673
+ * For projects whose `platform` is `HIMALAYA_MOBILE`, call
1674
+ * [Get Himalaya Authorization](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/get-himalaya-authorization)
1675
+ * first, and specify the returned `canonicalApp`.
1676
+ * @param projectId - ID of the project to build.
1677
+ * @param platforms - Platforms to build. One build is started for each platform.
1678
+ * @public
1679
+ * @documentationMaturity preview
1680
+ * @requiredField options.himalayaControlToken
1681
+ * @requiredField platforms
1682
+ * @requiredField projectId
1683
+ * @permissionId containers:projects:v1:project:start_mobile_build
1684
+ * @fqn wix.containers.projects.v1.ContainersProjects.StartMobileBuild
1685
+ */
1686
+ declare function startMobileBuild(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>>;
1687
+ interface StartMobileBuildOptions {
1688
+ /**
1689
+ * ID of the app release to build. When not specified, the app's live release is built.
1690
+ * @maxLength 200
1691
+ */
1692
+ releaseId?: string;
1693
+ /**
1694
+ * Version label for the builds, for example `1.2.0`. It's stored with the builds and returned by
1695
+ * Get Latest Mobile Builds. It isn't written into the app.
1696
+ * @maxLength 50
1697
+ */
1698
+ appVersion?: string;
1699
+ /**
1700
+ * Short-lived control credential for the project's app.
1701
+ *
1702
+ * Used for this call only. It isn't stored or returned.
1703
+ * @maxLength 4096
1704
+ */
1705
+ himalayaControlToken: string;
1706
+ /**
1707
+ * Canonical slug of the project's app, exactly as returned in `canonicalApp` by
1708
+ * [Get Himalaya Authorization](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/get-himalaya-authorization).
1709
+ *
1710
+ * Required when the project's `platform` is `HIMALAYA_MOBILE`. The value is verified on the server.
1711
+ * @maxLength 200
1712
+ */
1713
+ canonicalApp?: string;
1714
+ }
1715
+ /**
1716
+ * Retrieves the latest app-file builds of a project: for each platform, the last build that was
1717
+ * started and the last build that succeeded.
1718
+ *
1719
+ * The caller must be authorized to work on the project's app, as for
1720
+ * [Get Himalaya Authorization](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/get-himalaya-authorization).
1721
+ *
1722
+ * When `himalayaControlToken` is specified, builds that are still in progress are refreshed
1723
+ * before the response. Without it, the stored state is returned as is.
1724
+ * @param projectId - ID of the project.
1725
+ * @public
1726
+ * @documentationMaturity preview
1727
+ * @requiredField projectId
1728
+ * @permissionId containers:projects:v1:project:get_latest_mobile_builds
1729
+ * @fqn wix.containers.projects.v1.ContainersProjects.GetLatestMobileBuilds
1730
+ */
1731
+ declare function getLatestMobileBuilds(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>>;
1732
+ interface GetLatestMobileBuildsOptions {
1733
+ /**
1734
+ * Short-lived control credential for the project's app.
1735
+ *
1736
+ * When specified, builds in progress are refreshed before the response. Used for this call only.
1737
+ * It isn't stored or returned.
1738
+ * @maxLength 4096
1739
+ */
1740
+ himalayaControlToken?: string;
1741
+ }
1480
1742
 
1481
- export { type AccountInfo, type ActionEvent, type AdditionalDataFilterMismatchType, type AdditionalDataFilterMissingKey, type AdditionalDataFilterMustHaveKey, type AdditionalDataMissingValue, type AdditionalFilterCantBeEmpty, 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 FailedToFetchExperiment, type FailedToRunToss, type FilterNotImplemented, type FilterNotSupported, type FilterOperandEmpty, type GeneralError, type GetAgentConfigRequest, type GetAgentConfigResponse, type GetAgentExperimentsRequest, type GetAgentExperimentsResponse, type GetHimalayaAuthorizationRequest, type GetHimalayaAuthorizationResponse, 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 NoResultForConduction, type NotImplemented, Platform, 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 StartProjectRequest, type StartProjectResponse, 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, type V1PopulationError, type V1SuccessfulResult, Variant, type VariantValue, type VariantValueValueOneOf, type VariantWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, getHimalayaAuthorization, getProject, restoreRelease, resumeProject, saveProjectDesign };
1743
+ export { type AccountInfo, type ActionEvent, type AdditionalDataFilterMismatchType, type AdditionalDataFilterMissingKey, type AdditionalDataFilterMustHaveKey, type AdditionalDataMissingValue, type AdditionalFilterCantBeEmpty, 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 };
@@ -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,23 @@ 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 Status = /* @__PURE__ */ ((Status2) => {
465
+ Status2["IN_PROGRESS"] = "IN_PROGRESS";
466
+ Status2["SUCCEEDED"] = "SUCCEEDED";
467
+ Status2["FAILED"] = "FAILED";
468
+ Status2["CANCELED"] = "CANCELED";
469
+ return Status2;
470
+ })(Status || {});
471
+ var FailureKind = /* @__PURE__ */ ((FailureKind2) => {
472
+ FailureKind2["SIGNING"] = "SIGNING";
473
+ FailureKind2["BUILD"] = "BUILD";
474
+ return FailureKind2;
475
+ })(FailureKind || {});
389
476
  async function createProject2(project) {
390
477
  const { httpClient, sideEffects } = arguments[1];
391
478
  const payload = renameKeysFromSDKRequestToRESTRequest({ project });
@@ -680,15 +767,85 @@ async function getHimalayaAuthorization2(projectId) {
680
767
  throw transformedError;
681
768
  }
682
769
  }
770
+ async function startMobileBuild2(projectId, platforms, options) {
771
+ const { httpClient, sideEffects } = arguments[3];
772
+ const payload = renameKeysFromSDKRequestToRESTRequest({
773
+ projectId,
774
+ platforms,
775
+ releaseId: options?.releaseId,
776
+ appVersion: options?.appVersion,
777
+ himalayaControlToken: options?.himalayaControlToken,
778
+ canonicalApp: options?.canonicalApp
779
+ });
780
+ const reqOpts = startMobileBuild(payload);
781
+ sideEffects?.onSiteCall?.();
782
+ try {
783
+ const result = await httpClient.request(reqOpts);
784
+ sideEffects?.onSuccess?.(result);
785
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
786
+ } catch (err) {
787
+ const transformedError = sdkTransformError(
788
+ err,
789
+ {
790
+ spreadPathsToArguments: {},
791
+ explicitPathsToArguments: {
792
+ projectId: "$[0]",
793
+ platforms: "$[1]",
794
+ releaseId: "$[2].releaseId",
795
+ appVersion: "$[2].appVersion",
796
+ himalayaControlToken: "$[2].himalayaControlToken",
797
+ canonicalApp: "$[2].canonicalApp"
798
+ },
799
+ singleArgumentUnchanged: false
800
+ },
801
+ ["projectId", "platforms", "options"]
802
+ );
803
+ sideEffects?.onError?.(err);
804
+ throw transformedError;
805
+ }
806
+ }
807
+ async function getLatestMobileBuilds2(projectId, options) {
808
+ const { httpClient, sideEffects } = arguments[2];
809
+ const payload = renameKeysFromSDKRequestToRESTRequest({
810
+ projectId,
811
+ himalayaControlToken: options?.himalayaControlToken
812
+ });
813
+ const reqOpts = getLatestMobileBuilds(payload);
814
+ sideEffects?.onSiteCall?.();
815
+ try {
816
+ const result = await httpClient.request(reqOpts);
817
+ sideEffects?.onSuccess?.(result);
818
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
819
+ } catch (err) {
820
+ const transformedError = sdkTransformError(
821
+ err,
822
+ {
823
+ spreadPathsToArguments: {},
824
+ explicitPathsToArguments: {
825
+ projectId: "$[0]",
826
+ himalayaControlToken: "$[1].himalayaControlToken"
827
+ },
828
+ singleArgumentUnchanged: false
829
+ },
830
+ ["projectId", "options"]
831
+ );
832
+ sideEffects?.onError?.(err);
833
+ throw transformedError;
834
+ }
835
+ }
683
836
  export {
837
+ FailureKind,
684
838
  Platform,
685
839
  ProjectStatus,
686
840
  SandboxStatus,
841
+ Status,
842
+ V1Platform,
687
843
  Variant,
688
844
  WebhookIdentityType,
689
845
  createProject2 as createProject,
690
846
  deleteProject2 as deleteProject,
691
847
  getHimalayaAuthorization2 as getHimalayaAuthorization,
848
+ getLatestMobileBuilds2 as getLatestMobileBuilds,
692
849
  getProject2 as getProject,
693
850
  listProjects2 as listProjects,
694
851
  regenerateProjectIcon2 as regenerateProjectIcon,
@@ -696,6 +853,7 @@ export {
696
853
  restoreRelease2 as restoreRelease,
697
854
  resumeProject2 as resumeProject,
698
855
  saveProjectDesign2 as saveProjectDesign,
856
+ startMobileBuild2 as startMobileBuild,
699
857
  updateProject2 as updateProject
700
858
  };
701
859
  //# sourceMappingURL=index.typings.mjs.map