@sitepong/fastnode 0.2.2 → 0.3.1

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.
Files changed (126) hide show
  1. package/README.md +64 -1
  2. package/dist/actions/index.cjs +928 -54
  3. package/dist/actions/index.cjs.map +1 -1
  4. package/dist/actions/index.mjs +930 -56
  5. package/dist/actions/index.mjs.map +1 -1
  6. package/dist/apple-session-jUzBrql5.d.cts +122 -0
  7. package/dist/apple-session-jUzBrql5.d.ts +122 -0
  8. package/dist/cert/index.cjs +782 -736
  9. package/dist/cert/index.cjs.map +1 -1
  10. package/dist/cert/index.d.cts +5 -4
  11. package/dist/cert/index.d.ts +5 -4
  12. package/dist/cert/index.mjs +782 -737
  13. package/dist/cert/index.mjs.map +1 -1
  14. package/dist/{cert-Ddl7FpFT.d.ts → cert-ClacRx9y.d.ts} +2 -2
  15. package/dist/{cert-FehieKeb.d.cts → cert-DffLKURp.d.cts} +2 -2
  16. package/dist/cli/index.cjs +1408 -60
  17. package/dist/cli/index.cjs.map +1 -1
  18. package/dist/cli/index.d.cts +3 -2
  19. package/dist/cli/index.d.ts +3 -2
  20. package/dist/cli/index.mjs +1410 -62
  21. package/dist/cli/index.mjs.map +1 -1
  22. package/dist/client/index.cjs +519 -31
  23. package/dist/client/index.cjs.map +1 -1
  24. package/dist/client/index.d.cts +3 -2
  25. package/dist/client/index.d.ts +3 -2
  26. package/dist/client/index.mjs +514 -32
  27. package/dist/client/index.mjs.map +1 -1
  28. package/dist/deliver/index.cjs +334 -13
  29. package/dist/deliver/index.cjs.map +1 -1
  30. package/dist/deliver/index.d.cts +4 -3
  31. package/dist/deliver/index.d.ts +4 -3
  32. package/dist/deliver/index.mjs +330 -15
  33. package/dist/deliver/index.mjs.map +1 -1
  34. package/dist/{enums-B609j2rb.d.cts → enums-yXNVh3UI.d.cts} +8 -1
  35. package/dist/{enums-B609j2rb.d.ts → enums-yXNVh3UI.d.ts} +8 -1
  36. package/dist/gradle/index.cjs +222 -0
  37. package/dist/gradle/index.cjs.map +1 -0
  38. package/dist/gradle/index.d.cts +1 -0
  39. package/dist/gradle/index.d.ts +1 -0
  40. package/dist/gradle/index.mjs +217 -0
  41. package/dist/gradle/index.mjs.map +1 -0
  42. package/dist/gym/index.d.cts +2 -2
  43. package/dist/gym/index.d.ts +2 -2
  44. package/dist/index-8djTPW8O.d.ts +104 -0
  45. package/dist/{index-Bk1Gd-qE.d.cts → index-925_Ov7X.d.cts} +2 -2
  46. package/dist/{index-DrUpRXRG.d.cts → index-B6-MJpO4.d.cts} +1 -1
  47. package/dist/index-BGhV0gS-.d.ts +65 -0
  48. package/dist/{index-OelCoOth.d.cts → index-BbVQzSV1.d.cts} +18 -4
  49. package/dist/index-BhGaVlK1.d.cts +201 -0
  50. package/dist/{index-CtPyeMLH.d.ts → index-C-EEYXSE.d.ts} +18 -4
  51. package/dist/{index-CNHf7I4v.d.cts → index-C18cijCd.d.ts} +32 -3
  52. package/dist/{index-DFni8oZt.d.ts → index-CBM5XZKC.d.ts} +2 -2
  53. package/dist/index-CXJlvmB4.d.cts +63 -0
  54. package/dist/index-CXJlvmB4.d.ts +63 -0
  55. package/dist/{index-BKUapQP2.d.cts → index-CemR3UI9.d.ts} +356 -124
  56. package/dist/{index-DI1ZHr-3.d.ts → index-CmcFPn_G.d.cts} +9 -1
  57. package/dist/{index-CCtYhPN9.d.ts → index-CpGV1f0L.d.cts} +356 -124
  58. package/dist/{index-B8FOfxOw.d.ts → index-D9YQQ3FM.d.ts} +2 -2
  59. package/dist/index-DFstwgGK.d.cts +65 -0
  60. package/dist/{index-YcKz4aRS.d.ts → index-Dkf5sH1E.d.ts} +1 -1
  61. package/dist/index-DnHQ2uT2.d.cts +104 -0
  62. package/dist/index-Dv-Mek07.d.cts +84 -0
  63. package/dist/index-Dv-Mek07.d.ts +84 -0
  64. package/dist/{index-BICa8odo.d.cts → index-N6eV5yym.d.ts} +9 -1
  65. package/dist/{index-oVyLLIEK.d.cts → index-O3EMrd5s.d.cts} +3 -3
  66. package/dist/{index-DZoPGCbE.d.ts → index-Ol0RtbQA.d.ts} +3 -3
  67. package/dist/{index-CplRWSUc.d.ts → index-_24DRp3a.d.cts} +32 -3
  68. package/dist/{index-BZWmOTWE.d.cts → index-isT08RuY.d.cts} +2 -2
  69. package/dist/{index-DImN9PWc.d.ts → index-mEEB7An6.d.ts} +1 -1
  70. package/dist/{index-D13sn8DO.d.cts → index-on573dnO.d.cts} +1 -1
  71. package/dist/index-s2PigtDM.d.ts +201 -0
  72. package/dist/index.cjs +3425 -955
  73. package/dist/index.cjs.map +1 -1
  74. package/dist/index.d.cts +237 -14
  75. package/dist/index.d.ts +237 -14
  76. package/dist/index.mjs +3417 -958
  77. package/dist/index.mjs.map +1 -1
  78. package/dist/lane/index.cjs +928 -54
  79. package/dist/lane/index.cjs.map +1 -1
  80. package/dist/lane/index.mjs +930 -56
  81. package/dist/lane/index.mjs.map +1 -1
  82. package/dist/match/index.d.cts +6 -5
  83. package/dist/match/index.d.ts +6 -5
  84. package/dist/pem/index.d.cts +4 -3
  85. package/dist/pem/index.d.ts +4 -3
  86. package/dist/pilot/index.cjs +8 -4
  87. package/dist/pilot/index.cjs.map +1 -1
  88. package/dist/pilot/index.d.cts +4 -3
  89. package/dist/pilot/index.d.ts +4 -3
  90. package/dist/pilot/index.mjs +10 -6
  91. package/dist/pilot/index.mjs.map +1 -1
  92. package/dist/playstore/index.cjs +207 -0
  93. package/dist/playstore/index.cjs.map +1 -0
  94. package/dist/playstore/index.d.cts +1 -0
  95. package/dist/playstore/index.d.ts +1 -0
  96. package/dist/playstore/index.mjs +203 -0
  97. package/dist/playstore/index.mjs.map +1 -0
  98. package/dist/precheck/index.d.cts +4 -3
  99. package/dist/precheck/index.d.ts +4 -3
  100. package/dist/privacy/index.cjs +207 -0
  101. package/dist/privacy/index.cjs.map +1 -0
  102. package/dist/privacy/index.d.cts +2 -0
  103. package/dist/privacy/index.d.ts +2 -0
  104. package/dist/privacy/index.mjs +195 -0
  105. package/dist/privacy/index.mjs.map +1 -0
  106. package/dist/produce/index.cjs +32 -0
  107. package/dist/produce/index.cjs.map +1 -1
  108. package/dist/produce/index.d.cts +4 -3
  109. package/dist/produce/index.d.ts +4 -3
  110. package/dist/produce/index.mjs +32 -1
  111. package/dist/produce/index.mjs.map +1 -1
  112. package/dist/review/index.cjs +141 -0
  113. package/dist/review/index.cjs.map +1 -0
  114. package/dist/review/index.d.cts +2 -0
  115. package/dist/review/index.d.ts +2 -0
  116. package/dist/review/index.mjs +137 -0
  117. package/dist/review/index.mjs.map +1 -0
  118. package/dist/sigh/index.d.cts +4 -3
  119. package/dist/sigh/index.d.ts +4 -3
  120. package/dist/xcode/index.cjs +1 -1
  121. package/dist/xcode/index.cjs.map +1 -1
  122. package/dist/xcode/index.mjs +1 -1
  123. package/dist/xcode/index.mjs.map +1 -1
  124. package/package.json +27 -1
  125. package/dist/index-B9QeTpQK.d.cts +0 -99
  126. package/dist/index-xykpq6Lz.d.ts +0 -99
@@ -1,4 +1,5 @@
1
- import { b as Platform, C as CertificateType, a as ProfileState, P as ProfileType, D as DeviceClass, c as DeviceStatus, B as BundleIdPlatform, d as CapabilityType, g as ContentRightsDeclaration, h as BuildProcessingState, A as AppStoreVersionState, R as ReleaseType } from './enums-B609j2rb.js';
1
+ import { b as Platform, C as CertificateType, a as ProfileState, P as ProfileType, D as DeviceClass, c as DeviceStatus, B as BundleIdPlatform, d as CapabilityType, g as ContentRightsDeclaration, h as BuildProcessingState, A as AppStoreVersionState, R as ReleaseType, k as AppAssetLibraryMediaType, l as AppAssetLibraryPlacementType, n as AppAssetLibraryPlacementState, j as AppAssetLibraryAssetCategory, m as AppAssetLibraryAssetState, o as AppAssetLibraryFeature, p as AppAssetLibraryPlacementPlatform } from './enums-yXNVh3UI.cjs';
2
+ import { A as AppleSession } from './apple-session-jUzBrql5.cjs';
2
3
 
3
4
  interface TokenConfig {
4
5
  keyId: string;
@@ -1231,11 +1232,24 @@ declare class ReviewSubmissionItemsResource {
1231
1232
  limit?: number;
1232
1233
  }): Promise<ReviewSubmissionItem[]>;
1233
1234
  get(id: string): Promise<ReviewSubmissionItem>;
1235
+ /**
1236
+ * Add one item to a review submission. Besides versions, asset library
1237
+ * images and videos can be submitted on their own (ASC API 4.5.1) so
1238
+ * creative assets are approved ahead of a campaign.
1239
+ */
1234
1240
  create(params: {
1235
1241
  reviewSubmissionId: string;
1236
1242
  appStoreVersionId?: string;
1237
1243
  appCustomProductPageVersionId?: string;
1238
1244
  appStoreVersionExperimentId?: string;
1245
+ appStoreVersionExperimentV2Id?: string;
1246
+ appEventId?: string;
1247
+ appAssetLibraryImageId?: string;
1248
+ appAssetLibraryVideoId?: string;
1249
+ backgroundAssetVersionId?: string;
1250
+ inAppPurchaseVersionId?: string;
1251
+ subscriptionVersionId?: string;
1252
+ subscriptionGroupVersionId?: string;
1239
1253
  }): Promise<ReviewSubmissionItem>;
1240
1254
  update(id: string, attributes: {
1241
1255
  removed?: boolean;
@@ -1365,142 +1379,257 @@ declare class XcodeMetricsResource {
1365
1379
  getDiagnosticSignature(id: string): Promise<DiagnosticSignature>;
1366
1380
  }
1367
1381
 
1368
- /**
1369
- * Apple ID Session Authentication
1370
- * 1:1 port of Fastlane Spaceship client.rb + two_step_or_factor_client.rb
1371
- *
1372
- * Two flows:
1373
- *
1374
- * loginWithAppleId({ email, password, onPrompt })
1375
- * - blocking, CLI-style. onPrompt is awaited to collect 2FA codes.
1376
- *
1377
- * beginLogin({ email, password }) → { kind: "logged_in" | "needs_2fa", ... }
1378
- * submitTwoFactorCode({ pending, code, source, ... }) → AppleSession
1379
- * requestSmsCode({ pending, phoneId, mode })
1380
- * - HTTP-resumable. Used by the App Release wizard, where the 2FA
1381
- * challenge is rendered in a browser modal and the code arrives in
1382
- * a separate request.
1383
- */
1384
- interface AppleSessionConfig {
1385
- email: string;
1386
- password: string;
1387
- onLog?: (msg: string) => void;
1388
- onPrompt?: (msg: string) => Promise<string>;
1389
- }
1390
- interface ContractMessage {
1382
+ interface AppAssetLibraryPlacementAttributes {
1383
+ mediaType?: AppAssetLibraryMediaType;
1384
+ placementType?: AppAssetLibraryPlacementType;
1385
+ placementGroup?: string;
1386
+ state?: AppAssetLibraryPlacementState;
1387
+ stateDetails?: Array<{
1388
+ code?: string;
1389
+ message?: string;
1390
+ }> | null;
1391
+ createdDate?: string;
1392
+ lastModifiedDate?: string;
1393
+ }
1394
+ type AppAssetLibraryPlacement = JsonApiResource<"appAssetLibraryPlacements", AppAssetLibraryPlacementAttributes>;
1395
+ /** The localization a placement puts an asset on. */
1396
+ type PlacementTargetKind = "appStoreVersionLocalization" | "appCustomProductPageLocalization" | "appEventLocalization" | "appStoreVersionExperimentTreatmentLocalization";
1397
+ interface PlacementTarget {
1398
+ kind: PlacementTargetKind;
1391
1399
  id: string;
1392
- group: string;
1393
- subject: string;
1394
- message: string;
1395
- }
1396
- interface AppleSession {
1397
- cookies: Record<string, string>;
1398
- sessionId: string;
1399
- scnt: string;
1400
- serviceKey: string;
1401
- userEmail: string;
1402
- teamId?: string;
1403
- pendingAgreements: ContractMessage[];
1404
1400
  }
1405
- /**
1406
- * State held between beginLogin() and submitTwoFactorCode() — captures
1407
- * everything needed to resume an in-progress 2FA flow across HTTP requests.
1408
- * Stored server-side keyed by an opaque session id; never sent to the
1409
- * browser (the browser only sees the opaque id).
1410
- */
1411
- interface PendingLogin {
1412
- cookies: Record<string, string>;
1413
- sessionId: string;
1414
- scnt: string;
1415
- serviceKey: string;
1416
- userEmail: string;
1401
+ declare class AppAssetLibraryPlacementsResource {
1402
+ private http;
1403
+ constructor(http: RequestClient);
1404
+ /**
1405
+ * Place an image or video on one localization. Placements cannot be edited —
1406
+ * delete and recreate. The parent version/page must be editable.
1407
+ */
1408
+ create(params: {
1409
+ placementType: AppAssetLibraryPlacementType;
1410
+ placementGroup: string;
1411
+ imageId?: string;
1412
+ videoId?: string;
1413
+ target: PlacementTarget;
1414
+ }): Promise<AppAssetLibraryPlacement>;
1415
+ get(id: string, params?: {
1416
+ include?: string;
1417
+ }): Promise<AppAssetLibraryPlacement>;
1418
+ delete(id: string): Promise<void>;
1419
+ /** Placements on one localization, in display order by default. */
1420
+ listForTarget(target: PlacementTarget, params?: {
1421
+ placementType?: AppAssetLibraryPlacementType;
1422
+ placementGroup?: string;
1423
+ include?: string;
1424
+ }): Promise<AppAssetLibraryPlacement[]>;
1425
+ /** Set the display order of a placement group. In-app event localizations cannot be ordered. */
1426
+ order(params: {
1427
+ placementGroup: string;
1428
+ placementIds: string[];
1429
+ target: PlacementTarget;
1430
+ }): Promise<void>;
1417
1431
  }
1418
- /**
1419
- * Description of the 2FA challenge presented to the user.
1420
- *
1421
- * Modern 2FA accounts (the default for everyone) have `kind: "device"` —
1422
- * Apple pushes the 6-digit code to all the user's trusted Apple devices
1423
- * (iPhone, Mac, etc.) and the user types it into our wizard. The legacy
1424
- * `trustedDevices` field is empty in this case; that field only ever
1425
- * populates for old "two-step verification" accounts which are
1426
- * essentially extinct.
1427
- *
1428
- * `kind: "phone_only"` is reserved for accounts that have no real Apple
1429
- * devices (Apple's `noTrustedDevices === true` flag) — those accounts
1430
- * must use SMS to a trusted phone number.
1431
- *
1432
- * Either way, the user can opt to receive the code via SMS instead by
1433
- * picking from `trustedPhoneNumbers` and calling requestSmsCode().
1434
- */
1435
- interface TwoFactorChallenge {
1436
- kind: "device" | "phone_only";
1437
- codeLength: number;
1438
- trustedPhoneNumbers: {
1439
- id: number;
1440
- numberWithDialCode: string;
1441
- pushMode?: string;
1442
- }[];
1443
- }
1444
- type BeginLoginResult = {
1445
- kind: "logged_in";
1446
- session: AppleSession;
1447
- } | {
1448
- kind: "needs_2fa";
1449
- pending: PendingLogin;
1450
- challenge: TwoFactorChallenge;
1451
- };
1452
- /** Thrown when an Apple Developer Program agreement needs to be accepted */
1453
- declare class ProgramLicenseAgreementError extends Error {
1454
- agreements: ContractMessage[];
1455
- constructor(message: string, agreements: ContractMessage[]);
1432
+
1433
+ interface AssetAttributes {
1434
+ category?: AppAssetLibraryAssetCategory;
1435
+ fileName?: string;
1436
+ fileSize?: number;
1437
+ referenceName?: string | null;
1438
+ specId?: string | null;
1439
+ state?: AppAssetLibraryAssetState;
1440
+ stateDetails?: Array<{
1441
+ code?: string;
1442
+ message?: string;
1443
+ }> | null;
1444
+ uploadOperations?: UploadOperation[] | null;
1445
+ createdDate?: string;
1446
+ lastModifiedDate?: string;
1447
+ }
1448
+ interface AppAssetLibraryImageAttributes extends AssetAttributes {
1449
+ imageAsset?: {
1450
+ templateUrl: string;
1451
+ width: number;
1452
+ height: number;
1453
+ } | null;
1454
+ }
1455
+ interface AppAssetLibraryVideoAttributes extends AssetAttributes {
1456
+ previewFrameTimeCode?: string | null;
1457
+ videoAsset?: {
1458
+ url?: string;
1459
+ width?: number;
1460
+ height?: number;
1461
+ duration?: string;
1462
+ } | null;
1463
+ previewFrameImage?: {
1464
+ templateUrl: string;
1465
+ width: number;
1466
+ height: number;
1467
+ } | null;
1468
+ }
1469
+ type AppAssetLibraryImage = JsonApiResource<"appAssetLibraryImages", AppAssetLibraryImageAttributes>;
1470
+ type AppAssetLibraryVideo = JsonApiResource<"appAssetLibraryVideos", AppAssetLibraryVideoAttributes>;
1471
+ interface CreateAssetParams {
1472
+ libraryId: string;
1473
+ fileName: string;
1474
+ fileSize: number;
1475
+ /** Fixed at upload. Headers, search results and event assets need CREATIVE_ASSETS. */
1476
+ category: AppAssetLibraryAssetCategory;
1477
+ referenceName?: string;
1478
+ }
1479
+ interface UpdateAssetAttributes {
1480
+ /** Commit after every upload operation has succeeded. No checksum is sent. */
1481
+ uploaded?: boolean;
1482
+ referenceName?: string;
1483
+ /** Only an APPROVED asset can be archived (409 STATE_ERROR.INVALID_ASSET_STATE otherwise). */
1484
+ archived?: boolean;
1456
1485
  }
1457
1486
  /**
1458
- * Check a portal API response for agreement/license errors.
1459
- * Throws ProgramLicenseAgreementError if detected.
1460
- * Call this after any portal API call. Mirrors Spaceship::Client#handle_itc_response.
1487
+ * Images and videos in an app's asset library share one lifecycle:
1488
+ * reserve (POST) → run uploadOperations → PATCH uploaded:true → poll state.
1461
1489
  */
1462
- declare function checkPortalResponse(body: any, session?: AppleSession): void;
1490
+ declare abstract class AssetLibraryMediaResource<T extends "appAssetLibraryImages" | "appAssetLibraryVideos", R extends JsonApiResource<T, AssetAttributes>> {
1491
+ protected http: RequestClient;
1492
+ protected abstract readonly type: T;
1493
+ constructor(http: RequestClient);
1494
+ get(id: string): Promise<R>;
1495
+ protected reserve(params: CreateAssetParams, extra?: Record<string, unknown>): Promise<R>;
1496
+ protected patch(id: string, attributes: Record<string, unknown>): Promise<R>;
1497
+ /** Fails with 409 STATE_ERROR.ASSET_HAS_PLACEMENTS while the asset is still placed. */
1498
+ delete(id: string): Promise<void>;
1499
+ listPlacements(id: string, params?: ListParams): Promise<AppAssetLibraryPlacement[]>;
1500
+ }
1501
+ declare class AppAssetLibraryImagesResource extends AssetLibraryMediaResource<"appAssetLibraryImages", AppAssetLibraryImage> {
1502
+ protected readonly type: "appAssetLibraryImages";
1503
+ create(params: CreateAssetParams): Promise<AppAssetLibraryImage>;
1504
+ update(id: string, attributes: UpdateAssetAttributes): Promise<AppAssetLibraryImage>;
1505
+ }
1506
+ declare class AppAssetLibraryVideosResource extends AssetLibraryMediaResource<"appAssetLibraryVideos", AppAssetLibraryVideo> {
1507
+ protected readonly type: "appAssetLibraryVideos";
1508
+ create(params: CreateAssetParams & {
1509
+ previewFrameTimeCode?: string;
1510
+ }): Promise<AppAssetLibraryVideo>;
1511
+ update(id: string, attributes: UpdateAssetAttributes & {
1512
+ previewFrameTimeCode?: string;
1513
+ }): Promise<AppAssetLibraryVideo>;
1514
+ }
1515
+
1463
1516
  /**
1464
- * Step 1 of HTTP-resumable login: do the SIRP exchange and detect whether
1465
- * 2FA is required. Returns either a fully-established session (no 2FA) or
1466
- * a pending state + a description of the 2FA challenge.
1517
+ * The App Asset Library (ASC API 4.5.1) — one per app. Images and videos are
1518
+ * uploaded into it once, then placed on any number of App Store surfaces
1519
+ * (version, custom product page, in-app event, product page test
1520
+ * localizations). Replaces the deprecated screenshot/preview sets.
1467
1521
  */
1468
- declare function beginLogin(config: {
1469
- email: string;
1470
- password: string;
1471
- onLog?: (msg: string) => void;
1472
- }): Promise<BeginLoginResult>;
1522
+ type AppAssetLibrary = JsonApiResource<"appAssetLibraries", Record<string, never>>;
1523
+ interface AppAssetLibraryDimensions {
1524
+ minWidth: number;
1525
+ maxWidth: number;
1526
+ minHeight: number;
1527
+ maxHeight: number;
1528
+ }
1529
+ interface AppAssetLibraryImageSpec {
1530
+ specId: string;
1531
+ shortName?: string;
1532
+ aspectRatio?: string;
1533
+ dimensions: AppAssetLibraryDimensions;
1534
+ compatiblePlacementTypes: AppAssetLibraryPlacementType[];
1535
+ alphaAllowed?: boolean;
1536
+ fileExtensions?: string[];
1537
+ mimeTypes?: string[];
1538
+ maxFileSize?: number;
1539
+ universalAsset?: boolean;
1540
+ }
1541
+ interface AppAssetLibraryVideoSpec extends AppAssetLibraryImageSpec {
1542
+ audioRequired?: boolean;
1543
+ duration?: {
1544
+ min?: string;
1545
+ max?: string;
1546
+ };
1547
+ frameRates?: Array<{
1548
+ minFps?: number;
1549
+ maxFps?: number;
1550
+ }>;
1551
+ }
1552
+ interface AppAssetLibraryRefDatumAttributes {
1553
+ features?: Array<{
1554
+ featureId: AppAssetLibraryFeature;
1555
+ placementPolicies?: Array<{
1556
+ placementType: AppAssetLibraryPlacementType;
1557
+ groupLimits?: Array<{
1558
+ groupIds: string[];
1559
+ maxCount: number;
1560
+ }>;
1561
+ }>;
1562
+ }>;
1563
+ placementProfileGroups?: Array<{
1564
+ placementProfileGroupId: string;
1565
+ platform?: AppAssetLibraryPlacementPlatform;
1566
+ displayClassId?: string;
1567
+ }>;
1568
+ imageSpecs?: AppAssetLibraryImageSpec[];
1569
+ videoSpecs?: AppAssetLibraryVideoSpec[];
1570
+ placementTypes?: Array<{
1571
+ placementTypeId: AppAssetLibraryPlacementType;
1572
+ acceptsAssetCategories?: AppAssetLibraryAssetCategory[];
1573
+ specMappings?: Array<{
1574
+ placementGroupId: string;
1575
+ specs: string[];
1576
+ }>;
1577
+ }>;
1578
+ displayClasses?: Array<{
1579
+ displayClassId: string;
1580
+ deviceFamily?: string;
1581
+ screenDimensions?: string[];
1582
+ }>;
1583
+ }
1584
+ type AppAssetLibraryRefDatum = JsonApiResource<"appAssetLibraryRefData", AppAssetLibraryRefDatumAttributes>;
1585
+ declare class AppAssetLibrariesResource {
1586
+ private http;
1587
+ constructor(http: RequestClient);
1588
+ getForApp(appId: string): Promise<AppAssetLibrary>;
1589
+ listImages(libraryId: string, params?: ListParams): Promise<AppAssetLibraryImage[]>;
1590
+ listVideos(libraryId: string, params?: ListParams): Promise<AppAssetLibraryVideo[]>;
1591
+ /**
1592
+ * Specs, placement groups and limits. Apple adds placement groups (new
1593
+ * devices) without an API version bump, so read them from here rather than
1594
+ * hard-coding display types.
1595
+ */
1596
+ refData(params?: {
1597
+ features?: AppAssetLibraryFeature[];
1598
+ placementTypes?: AppAssetLibraryPlacementType[];
1599
+ placementProfileGroups?: string[];
1600
+ }): Promise<AppAssetLibraryRefDatumAttributes>;
1601
+ }
1602
+
1473
1603
  /**
1474
- * Ask Apple to send an SMS / voice code to the chosen trusted phone.
1475
- * Used by the wizard's "Send code via text instead" affordance.
1604
+ * Keeps an Apple ID session between runs, like Spaceship's cookie in
1605
+ * ~/.fastlane/spaceship/<user>/cookie — one password + 2FA covers every
1606
+ * command (and every app on that Apple ID) until Apple expires the session.
1607
+ *
1608
+ * Files live in ~/.fastnode/sessions (or FASTNODE_SESSION_DIR), one per
1609
+ * Apple ID, directory 0700 and files 0600: they are as good as a signed-in
1610
+ * App Store Connect browser. A cached session is checked against olympus
1611
+ * before use, so an expired one just falls through to a fresh sign-in.
1476
1612
  */
1477
- declare function requestSmsCode(input: {
1478
- pending: PendingLogin;
1479
- phoneId: number;
1480
- mode?: "sms" | "voice";
1481
- }): Promise<void>;
1613
+
1614
+ declare function sessionDir(): string;
1615
+ declare function saveAppleSession(session: AppleSession): void;
1616
+ declare function clearAppleSession(email: string): void;
1617
+ /** The Apple ID the last session was saved for, so a re-run needs no prompt at all. */
1618
+ declare function lastAppleId(): string | null;
1619
+ /** A saved session for this Apple ID that Apple still accepts, or null. */
1620
+ declare function loadAppleSession(email: string, fetchImpl?: typeof fetch): Promise<AppleSession | null>;
1482
1621
  /**
1483
- * Step 2 of HTTP-resumable login: submit the 2FA code the user typed.
1484
- * Returns a fully-established AppleSession on success.
1485
- *
1486
- * source = "device" → 4-digit code from a trusted Apple device
1487
- * source = "phone" → 6-digit code from SMS / push to trusted phone
1622
+ * Reuse the saved session for this Apple ID, or sign in (password + 2FA) and
1623
+ * save the new one. The password is only asked for when a sign-in is needed.
1488
1624
  */
1489
- declare function submitTwoFactorCode(input: {
1490
- pending: PendingLogin;
1491
- code: string;
1492
- source: "device" | "phone";
1493
- phoneId?: number;
1494
- mode?: "sms" | "voice";
1625
+ declare function signInWithAppleId(options: {
1626
+ email?: string | null;
1627
+ askEmail: () => Promise<string>;
1628
+ askPassword: (email: string) => Promise<string>;
1629
+ /** Ignore any saved session and sign in again. */
1630
+ fresh?: boolean;
1495
1631
  onLog?: (msg: string) => void;
1496
1632
  }): Promise<AppleSession>;
1497
- /**
1498
- * Backward-compatible CLI-style login. Internally uses beginLogin +
1499
- * submitTwoFactorCode but routes 2FA through the synchronous onPrompt
1500
- * callback so existing scripts (test-login.ts, test-full-workflow.ts)
1501
- * keep working.
1502
- */
1503
- declare function loginWithAppleId(config: AppleSessionConfig): Promise<AppleSession>;
1504
1633
 
1505
1634
  /**
1506
1635
  * Apple Developer Portal Client
@@ -1668,6 +1797,105 @@ declare class PortalClient {
1668
1797
  featureType: string;
1669
1798
  enabled: boolean;
1670
1799
  }): Promise<void>;
1800
+ /** Apple's internal feature code for the App Groups capability. */
1801
+ static readonly APP_GROUPS_FEATURE = "APG3427HIY";
1802
+ /** List all app groups in the team. */
1803
+ listAppGroups(): Promise<any[]>;
1804
+ /**
1805
+ * Create an app group, returning the raw group record. Idempotent —
1806
+ * Apple rejects a duplicate group identifier ("Multiple App Groups may
1807
+ * not have the same identifier"), so we list first and reuse an existing
1808
+ * group when the identifier already exists in the team.
1809
+ *
1810
+ * Note the two ids on the returned record: `identifier` is the
1811
+ * `group.com.…` string you type, while `applicationGroup` is Apple's
1812
+ * opaque internal handle that association actually requires — do NOT pass
1813
+ * the human identifier to assignAppGroups.
1814
+ */
1815
+ createAppGroup(params: {
1816
+ identifier: string;
1817
+ name: string;
1818
+ }): Promise<any>;
1819
+ /**
1820
+ * Enable the App Groups capability on an App ID. Required before an
1821
+ * App ID can have a group associated with it — mirrors Spaceship
1822
+ * enabling `AppService::AppGroup` before `associate_groups`.
1823
+ */
1824
+ enableAppGroups(appIdId: string): Promise<void>;
1825
+ /**
1826
+ * Associate one or more app groups with an App ID. `appGroupIds` are the
1827
+ * internal ids (Spaceship's `app_group_id`), NOT the `group.com.…`
1828
+ * identifiers. Apple wants both `appIdId` and `displayId` set to the
1829
+ * App ID's internal id, per Spaceship's associate_groups_with_app.
1830
+ */
1831
+ assignAppGroups(params: {
1832
+ appIdId: string;
1833
+ appGroupIds: string[];
1834
+ }): Promise<void>;
1835
+ /** Apple's internal feature code for the Apple Pay capability. */
1836
+ static readonly APPLE_PAY_FEATURE = "OM633U5T5G";
1837
+ /**
1838
+ * List all Apple Pay merchant IDs in the team. Each record maps
1839
+ * (per Spaceship's merchant.rb attr_mapping): `omcId` = internal id,
1840
+ * `identifier` = the human `merchant.com.…` string, `name` = display name.
1841
+ */
1842
+ listMerchants(): Promise<any[]>;
1843
+ /**
1844
+ * Register (or reuse) a merchant ID, returning its INTERNAL id (`omcId`) —
1845
+ * Apple's opaque handle that association requires, NOT the human
1846
+ * `merchant.com.…` identifier. Idempotent: lists first and reuses an
1847
+ * existing merchant with the same identifier. Endpoint + params ported 1:1
1848
+ * from Spaceship's create_merchant! (addOMC.action).
1849
+ */
1850
+ createMerchant(params: {
1851
+ identifier: string;
1852
+ name: string;
1853
+ }): Promise<string>;
1854
+ /**
1855
+ * Enable the Apple Pay capability on an App ID. Apple Pay is a standard
1856
+ * AppService (service_id OM633U5T5G) whose service_uri is the default
1857
+ * `updateService.action` — confirmed in Spaceship's app_service.rb.
1858
+ */
1859
+ enableApplePay(appIdId: string): Promise<void>;
1860
+ /**
1861
+ * Associate merchant IDs with an App ID's Apple Pay capability. `omcIds`
1862
+ * are the internal ids (each merchant record's `omcId`), NOT the
1863
+ * `merchant.com.…` identifiers. Endpoint + params ported 1:1 from
1864
+ * Spaceship's associate_merchants_with_app (assignOMCToAppId.action — note
1865
+ * the singular "OMC", and NO displayId param).
1866
+ */
1867
+ assignMerchants(params: {
1868
+ appIdId: string;
1869
+ omcIds: string[];
1870
+ }): Promise<void>;
1871
+ /**
1872
+ * Create an Apple Pay **Payment Processing Certificate** on a merchant ID
1873
+ * from a CSR — the certificate a PSP (e.g. Stripe) hands you as a CSR, which
1874
+ * must be uploaded to the Merchant ID in Apple Developer, then the resulting
1875
+ * `.cer` downloaded and given back to the PSP so it can decrypt payment
1876
+ * tokens. This is the one manual Apple-portal step in wiring up Apple Pay.
1877
+ *
1878
+ * Ported 1:1 from Spaceship's create_certificate! (submitCertificateRequest
1879
+ * .action): the merchant's INTERNAL id (`omcId`) is passed as BOTH `appIdId`
1880
+ * and `specialIdentifierDisplayId` — the latter is how the portal scopes a
1881
+ * cert to a merchant/special identifier rather than an App ID. The cert type
1882
+ * is APPLE_PAY (`4APLUP237T`). Returns the created certRequest (its
1883
+ * `certificateId` feeds `downloadApplePayCertificate`).
1884
+ *
1885
+ * @param omcId the merchant's internal id (from createMerchant/listMerchants)
1886
+ * @param csrContent the PEM CSR string (Stripe's "Apple Pay CSR")
1887
+ */
1888
+ createApplePayCertificate(params: {
1889
+ omcId: string;
1890
+ csrContent: string;
1891
+ }): Promise<any>;
1892
+ /**
1893
+ * Download an Apple Pay Payment Processing Certificate's raw bytes by its
1894
+ * certificate id (from `createApplePayCertificate`). Thin wrapper over
1895
+ * `downloadCertificate` pinned to the APPLE_PAY type — the DER `.cer` you
1896
+ * upload back into Stripe.
1897
+ */
1898
+ downloadApplePayCertificate(certificateId: string): Promise<Buffer>;
1671
1899
  listCertificates(types?: string[]): Promise<any[]>;
1672
1900
  listPushCertificates(): Promise<any[]>;
1673
1901
  createCertificate(params: {
@@ -1892,8 +2120,12 @@ declare class AppStoreConnectClient {
1892
2120
  readonly inAppPurchases: InAppPurchasesResource;
1893
2121
  readonly gameCenterDetail: GameCenterDetailResource;
1894
2122
  readonly xcodeMetrics: XcodeMetricsResource;
2123
+ readonly appAssetLibraries: AppAssetLibrariesResource;
2124
+ readonly appAssetLibraryImages: AppAssetLibraryImagesResource;
2125
+ readonly appAssetLibraryVideos: AppAssetLibraryVideosResource;
2126
+ readonly appAssetLibraryPlacements: AppAssetLibraryPlacementsResource;
1895
2127
  constructor(config: AppStoreConnectConfig);
1896
2128
  request<T>(path: string, options?: RequestOptions): Promise<T>;
1897
2129
  }
1898
2130
 
1899
- export { type ContractMessage as $, type AppleSession as A, type BundleId as B, type Certificate as C, type Device as D, CapabilitiesResource as E, AppStoreVersionsResource as F, type AppStoreVersion as G, type AppStoreVersionLocalization as H, AppScreenshotsResource as I, type JsonApiResource as J, type AppScreenshot as K, type ListParams as L, type AppScreenshotSet as M, ReviewSubmissionsResource as N, type ReviewSubmission as O, type Profile as P, type AppStoreVersionSubmission as Q, RequestClient as R, loginWithAppleId as S, TokenManager as T, type UploadOperation as U, beginLogin as V, submitTwoFactorCode as W, requestSmsCode as X, checkPortalResponse as Y, ProgramLicenseAgreementError as Z, type AppleSessionConfig as _, AppStoreConnectClient as a, type PendingLogin as a0, type TwoFactorChallenge as a1, type BeginLoginResult as a2, PortalClient as a3, IrisClient as a4, IrisAuthError as a5, type IrisApiKey as a6, type ApiKeyRole as a7, type JsonApiRelationship as a8, type JsonApiErrorResponse as a9, AppStoreConnectError as b, RateLimitError as c, type AppStoreConnectConfig as d, type TokenConfig as e, type RequestOptions as f, type JsonApiResponse as g, type JsonApiListResponse as h, type JsonApiError as i, type App as j, type Build as k, type BetaGroup as l, type BetaBuildLocalization as m, type BuildBetaDetail as n, type PreReleaseVersion$1 as o, type BundleIdCapability as p, type CapabilitySettingInput as q, type CapabilitySetting as r, type CapabilityOption as s, CertificatesResource as t, ProfilesResource as u, BundleIdsResource as v, DevicesResource as w, AppsResource as x, BuildsResource as y, BetaGroupsResource as z };
2131
+ export { AppAssetLibraryVideosResource as $, AppStoreConnectClient as A, type BundleId as B, type Certificate as C, type Device as D, AppStoreVersionsResource as E, type AppStoreVersion as F, type AppStoreVersionLocalization as G, AppScreenshotsResource as H, type AppScreenshot as I, type JsonApiResource as J, type AppScreenshotSet as K, type ListParams as L, ReviewSubmissionsResource as M, type ReviewSubmission as N, type AppStoreVersionSubmission as O, type Profile as P, AppAssetLibrariesResource as Q, RequestClient as R, type AppAssetLibrary as S, TokenManager as T, type UploadOperation as U, type AppAssetLibraryRefDatum as V, type AppAssetLibraryRefDatumAttributes as W, type AppAssetLibraryImageSpec as X, type AppAssetLibraryVideoSpec as Y, type AppAssetLibraryDimensions as Z, AppAssetLibraryImagesResource as _, AppStoreConnectError as a, type AppAssetLibraryImage as a0, type AppAssetLibraryVideo as a1, type CreateAssetParams as a2, type UpdateAssetAttributes as a3, AppAssetLibraryPlacementsResource as a4, type AppAssetLibraryPlacement as a5, type PlacementTarget as a6, type PlacementTargetKind as a7, PortalClient as a8, signInWithAppleId as a9, loadAppleSession as aa, saveAppleSession as ab, clearAppleSession as ac, lastAppleId as ad, sessionDir as ae, IrisClient as af, IrisAuthError as ag, type IrisApiKey as ah, type ApiKeyRole as ai, type JsonApiRelationship as aj, type JsonApiErrorResponse as ak, RateLimitError as b, type AppStoreConnectConfig as c, type TokenConfig as d, type RequestOptions as e, type JsonApiResponse as f, type JsonApiListResponse as g, type JsonApiError as h, type App as i, type Build as j, type BetaGroup as k, type BetaBuildLocalization as l, type BuildBetaDetail as m, type PreReleaseVersion$1 as n, type BundleIdCapability as o, type CapabilitySettingInput as p, type CapabilitySetting as q, type CapabilityOption as r, CertificatesResource as s, ProfilesResource as t, BundleIdsResource as u, DevicesResource as v, AppsResource as w, BuildsResource as x, BetaGroupsResource as y, CapabilitiesResource as z };
@@ -1,5 +1,5 @@
1
- import { a as AppStoreConnectClient, P as Profile } from './index-CCtYhPN9.js';
2
- import { P as ProfileType } from './enums-B609j2rb.js';
1
+ import { A as AppStoreConnectClient, P as Profile } from './index-CemR3UI9.js';
2
+ import { P as ProfileType } from './enums-yXNVh3UI.js';
3
3
 
4
4
  interface SighOptions {
5
5
  client: AppStoreConnectClient;
@@ -0,0 +1,65 @@
1
+ import { A as AppleSession } from './apple-session-jUzBrql5.cjs';
2
+
3
+ /**
4
+ * App Review rejections: what App Review said, from the Resolution Center.
5
+ * Port of Spaceship's ResolutionCenterThread / ResolutionCenterMessage /
6
+ * ReviewRejection models (connect_api/tunes).
7
+ *
8
+ * Like App Privacy, this is not in the public App Store Connect API — with an
9
+ * API key, /v1/resolutionCenterThreads answers "resource does not exist".
10
+ * Spaceship reaches it through its Tunes client, whose host is
11
+ * appstoreconnect.apple.com/iris/, i.e. an Apple ID session. So does this.
12
+ */
13
+
14
+ interface RejectionReason {
15
+ section?: string;
16
+ description?: string;
17
+ code?: string;
18
+ }
19
+ interface ResolutionMessage {
20
+ id: string;
21
+ createdDate: string | null;
22
+ from: string | null;
23
+ /** The message as App Review wrote it, HTML reduced to text. */
24
+ body: string;
25
+ reasons: RejectionReason[];
26
+ }
27
+ interface ResolutionThread {
28
+ id: string;
29
+ threadType: string | null;
30
+ state: string | null;
31
+ createdDate: string | null;
32
+ messages: ResolutionMessage[];
33
+ }
34
+ interface SubmissionReview {
35
+ submissionId: string;
36
+ state: string;
37
+ submittedDate: string | null;
38
+ threads: ResolutionThread[];
39
+ }
40
+ /** App Review writes HTML; keep paragraphs and list items, drop the markup. */
41
+ declare function htmlToText(html: string | null | undefined): string;
42
+ /** The messages in one thread, each with the guideline reasons App Review attached. */
43
+ declare function getThreadMessages(session: AppleSession, threadId: string): Promise<ResolutionMessage[]>;
44
+ /**
45
+ * Every review submission for the app that App Review has answered, with its
46
+ * Resolution Center threads and messages. `onlyOpen` keeps the ones still
47
+ * waiting on the developer (UNRESOLVED_ISSUES).
48
+ */
49
+ declare function getReviewFeedback(session: AppleSession, appId: string, opts?: {
50
+ onlyOpen?: boolean;
51
+ onLog?: (m: string) => void;
52
+ }): Promise<SubmissionReview[]>;
53
+
54
+ type index_RejectionReason = RejectionReason;
55
+ type index_ResolutionMessage = ResolutionMessage;
56
+ type index_ResolutionThread = ResolutionThread;
57
+ type index_SubmissionReview = SubmissionReview;
58
+ declare const index_getReviewFeedback: typeof getReviewFeedback;
59
+ declare const index_getThreadMessages: typeof getThreadMessages;
60
+ declare const index_htmlToText: typeof htmlToText;
61
+ declare namespace index {
62
+ export { type index_RejectionReason as RejectionReason, type index_ResolutionMessage as ResolutionMessage, type index_ResolutionThread as ResolutionThread, type index_SubmissionReview as SubmissionReview, index_getReviewFeedback as getReviewFeedback, index_getThreadMessages as getThreadMessages, index_htmlToText as htmlToText };
63
+ }
64
+
65
+ export { type RejectionReason as R, type SubmissionReview as S, type ResolutionMessage as a, type ResolutionThread as b, getReviewFeedback as c, getThreadMessages as g, htmlToText as h, index as i };
@@ -1,4 +1,4 @@
1
- import { a as AppStoreConnectClient } from './index-CCtYhPN9.js';
1
+ import { A as AppStoreConnectClient } from './index-CemR3UI9.js';
2
2
 
3
3
  interface RuleResult {
4
4
  passed: boolean;