@sitepong/fastnode 0.2.2 → 0.3.0

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 +58 -1
  2. package/dist/actions/index.cjs +848 -54
  3. package/dist/actions/index.cjs.map +1 -1
  4. package/dist/actions/index.mjs +849 -55
  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-RvXmdMke.d.ts} +2 -2
  15. package/dist/{cert-FehieKeb.d.cts → cert-eOoxGMN1.d.cts} +2 -2
  16. package/dist/cli/index.cjs +1321 -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 +1322 -61
  21. package/dist/cli/index.mjs.map +1 -1
  22. package/dist/client/index.cjs +443 -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 +443 -31
  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-DrUpRXRG.d.cts → index-B6-MJpO4.d.cts} +1 -1
  46. package/dist/{index-D13sn8DO.d.cts → index-BE7bwNff.d.cts} +1 -1
  47. package/dist/index-BGhV0gS-.d.ts +65 -0
  48. package/dist/index-BaNcf7jt.d.cts +201 -0
  49. package/dist/{index-DZoPGCbE.d.ts → index-BvyZ4uiw.d.ts} +3 -3
  50. package/dist/{index-B8FOfxOw.d.ts → index-C01Rkrir.d.ts} +2 -2
  51. package/dist/{index-YcKz4aRS.d.ts → index-C9mHBJED.d.ts} +1 -1
  52. package/dist/{index-BICa8odo.d.cts → index-CAEiXVWd.d.ts} +9 -1
  53. package/dist/index-CBf0-NUQ.d.ts +201 -0
  54. package/dist/index-CXJlvmB4.d.cts +63 -0
  55. package/dist/index-CXJlvmB4.d.ts +63 -0
  56. package/dist/{index-CNHf7I4v.d.cts → index-D1GHEM3c.d.ts} +32 -3
  57. package/dist/index-DFstwgGK.d.cts +65 -0
  58. package/dist/{index-Bk1Gd-qE.d.cts → index-DGkgRnZp.d.cts} +2 -2
  59. package/dist/{index-CplRWSUc.d.ts → index-DLJso7Vs.d.cts} +32 -3
  60. package/dist/{index-BZWmOTWE.d.cts → index-DWOLZNlz.d.cts} +2 -2
  61. package/dist/{index-OelCoOth.d.cts → index-DfkIz7i0.d.cts} +18 -4
  62. package/dist/{index-CtPyeMLH.d.ts → index-DjC_gmnL.d.ts} +18 -4
  63. package/dist/index-DnHQ2uT2.d.cts +104 -0
  64. package/dist/{index-CCtYhPN9.d.ts → index-DrmS802s.d.cts} +331 -130
  65. package/dist/index-Dv-Mek07.d.cts +84 -0
  66. package/dist/index-Dv-Mek07.d.ts +84 -0
  67. package/dist/{index-oVyLLIEK.d.cts → index-icIH5e5V.d.cts} +3 -3
  68. package/dist/{index-DI1ZHr-3.d.ts → index-laE3_wm9.d.cts} +9 -1
  69. package/dist/{index-BKUapQP2.d.cts → index-lsuS2R1T.d.ts} +331 -130
  70. package/dist/{index-DImN9PWc.d.ts → index-mEEB7An6.d.ts} +1 -1
  71. package/dist/{index-DFni8oZt.d.ts → index-rTZOdMRE.d.ts} +2 -2
  72. package/dist/index.cjs +3342 -959
  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 +3335 -963
  77. package/dist/index.mjs.map +1 -1
  78. package/dist/lane/index.cjs +848 -54
  79. package/dist/lane/index.cjs.map +1 -1
  80. package/dist/lane/index.mjs +849 -55
  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
@@ -0,0 +1,84 @@
1
+ type AndroidOutputType = "aab" | "apk" | "both";
2
+ interface GradleBuildOptions {
3
+ /** The android/ dir or app root containing `gradlew`. */
4
+ projectDir: string;
5
+ /** Which artifact(s) to produce. */
6
+ outputType: AndroidOutputType;
7
+ /** Product flavor (e.g. "prod") — capitalized into the Gradle task name. */
8
+ flavor?: string;
9
+ /** Build type, defaults to "Release". */
10
+ buildType?: string;
11
+ /**
12
+ * JVM args for the Gradle daemon. Defaults to a raised heap/metaspace
13
+ * (`-Xmx3072m -XX:MaxMetaspaceSize=1024m`) because Expo's generated
14
+ * `gradle.properties` caps metaspace at 512m, which OOMs on large RN
15
+ * module graphs (Kotlin/AGP class metadata). Set to `null` to leave the
16
+ * project's `gradle.properties` untouched.
17
+ */
18
+ jvmArgs?: string | null;
19
+ /** Absolute (or resolvable) path to the keystore file. */
20
+ keystorePath: string;
21
+ keystorePassword: string;
22
+ keyAlias: string;
23
+ keyPassword: string;
24
+ onOutput?: (chunk: string) => void;
25
+ /** When aborted, the gradlew process group is killed to stop the build. */
26
+ signal?: AbortSignal;
27
+ }
28
+ interface GradleBuildResult {
29
+ success: boolean;
30
+ exitCode: number;
31
+ aabPath?: string;
32
+ apkPath?: string;
33
+ logContent: string;
34
+ }
35
+ /**
36
+ * Rewrite `versionCode` (and `versionName`, when given) in an app module's
37
+ * Gradle file, Groovy (`versionCode 1`) or Kotlin DSL (`versionCode = 1`).
38
+ * Returns the new source and whether each value was found.
39
+ */
40
+ declare function stampAndroidVersion(source: string, versionCode: number, versionName?: string | null): {
41
+ source: string;
42
+ versionCode: boolean;
43
+ versionName: boolean;
44
+ };
45
+ /**
46
+ * Stamp the build's version into `android/app/build.gradle(.kts)`. Play refuses
47
+ * a versionCode it has seen, so each build must carry its own.
48
+ */
49
+ declare function setAndroidVersion(projectDir: string, versionCode: number, versionName?: string | null): Promise<{
50
+ file: string;
51
+ versionCode: boolean;
52
+ versionName: boolean;
53
+ }>;
54
+ /**
55
+ * Resolve the directory that contains `gradlew`. Accepts either the app root
56
+ * (which contains an `android/` subdirectory) or the `android/` dir itself.
57
+ */
58
+ declare function detectAndroidDir(rootDir: string): Promise<string>;
59
+ /**
60
+ * Build an Android app using Gradle (`./gradlew`).
61
+ * This is the Android-side equivalent of `gym` (iOS).
62
+ *
63
+ * Steps:
64
+ * 1. Resolve the gradlew directory.
65
+ * 2. chmod +x gradlew so it's executable on fresh checkouts.
66
+ * 3. Run the appropriate task(s) (bundle/assemble), injecting the signing
67
+ * config via standard AGP `-Pandroid.injected.signing.*` properties.
68
+ * 4. Locate produced AAB/APK artifacts by globbing standard output paths.
69
+ * 5. Return a GradleBuildResult.
70
+ */
71
+ declare function buildAndroid(options: GradleBuildOptions): Promise<GradleBuildResult>;
72
+
73
+ type index_AndroidOutputType = AndroidOutputType;
74
+ type index_GradleBuildOptions = GradleBuildOptions;
75
+ type index_GradleBuildResult = GradleBuildResult;
76
+ declare const index_buildAndroid: typeof buildAndroid;
77
+ declare const index_detectAndroidDir: typeof detectAndroidDir;
78
+ declare const index_setAndroidVersion: typeof setAndroidVersion;
79
+ declare const index_stampAndroidVersion: typeof stampAndroidVersion;
80
+ declare namespace index {
81
+ export { type index_AndroidOutputType as AndroidOutputType, type index_GradleBuildOptions as GradleBuildOptions, type index_GradleBuildResult as GradleBuildResult, index_buildAndroid as buildAndroid, index_detectAndroidDir as detectAndroidDir, index_setAndroidVersion as setAndroidVersion, index_stampAndroidVersion as stampAndroidVersion };
82
+ }
83
+
84
+ export { type AndroidOutputType as A, type GradleBuildOptions as G, type GradleBuildResult as a, setAndroidVersion as b, buildAndroid as c, detectAndroidDir as d, index as i, stampAndroidVersion as s };
@@ -1,6 +1,6 @@
1
- import { a as AppStoreConnectClient } from './index-BKUapQP2.cjs';
2
- import { a as CertResult } from './cert-FehieKeb.cjs';
3
- import { S as SighResult } from './index-BZWmOTWE.cjs';
1
+ import { A as AppStoreConnectClient } from './index-DrmS802s.cjs';
2
+ import { a as CertResult } from './cert-eOoxGMN1.cjs';
3
+ import { S as SighResult } from './index-DWOLZNlz.cjs';
4
4
 
5
5
  type StorageMode = "git" | "s3" | "local";
6
6
 
@@ -1,4 +1,4 @@
1
- import { a as AppStoreConnectClient, k as Build } from './index-CCtYhPN9.js';
1
+ import { A as AppStoreConnectClient, j as Build } from './index-DrmS802s.cjs';
2
2
 
3
3
  /**
4
4
  * Shared types for the pilot module's upload backends.
@@ -15,6 +15,14 @@ interface PilotUploadOptions {
15
15
  timeout?: number;
16
16
  /** Stream callback for upload progress / log lines. */
17
17
  onOutput?: (chunk: string) => void;
18
+ /**
19
+ * Absolute path to an AppStoreInfo.plist ("asset description"). iTMSTransporter
20
+ * cannot run its software-analysis phase on Linux, so the descriptor must be
21
+ * generated on macOS (via xcodebuild's generateAppStoreInformation export
22
+ * option) and passed here via -assetDescription. Ignored by the altool backend
23
+ * (macOS analyzes the binary natively).
24
+ */
25
+ assetDescriptionPath?: string;
18
26
  /**
19
27
  * Which backend to use. Defaults to "auto":
20
28
  * - altool on macOS (requires Xcode CLI)
@@ -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.cjs';
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.js';
2
+ import { A as AppleSession } from './apple-session-jUzBrql5.js';
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,226 @@ 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.
1461
- */
1462
- declare function checkPortalResponse(body: any, session?: AppleSession): void;
1463
- /**
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.
1467
- */
1468
- declare function beginLogin(config: {
1469
- email: string;
1470
- password: string;
1471
- onLog?: (msg: string) => void;
1472
- }): Promise<BeginLoginResult>;
1473
- /**
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.
1476
- */
1477
- declare function requestSmsCode(input: {
1478
- pending: PendingLogin;
1479
- phoneId: number;
1480
- mode?: "sms" | "voice";
1481
- }): Promise<void>;
1482
- /**
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
1487
+ * Images and videos in an app's asset library share one lifecycle:
1488
+ * reserve (POST) → run uploadOperations → PATCH uploaded:true → poll state.
1488
1489
  */
1489
- declare function submitTwoFactorCode(input: {
1490
- pending: PendingLogin;
1491
- code: string;
1492
- source: "device" | "phone";
1493
- phoneId?: number;
1494
- mode?: "sms" | "voice";
1495
- onLog?: (msg: string) => void;
1496
- }): Promise<AppleSession>;
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
+
1497
1516
  /**
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.
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.
1502
1521
  */
1503
- declare function loginWithAppleId(config: AppleSessionConfig): Promise<AppleSession>;
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
+ }
1504
1602
 
1505
1603
  /**
1506
1604
  * Apple Developer Portal Client
@@ -1668,6 +1766,105 @@ declare class PortalClient {
1668
1766
  featureType: string;
1669
1767
  enabled: boolean;
1670
1768
  }): Promise<void>;
1769
+ /** Apple's internal feature code for the App Groups capability. */
1770
+ static readonly APP_GROUPS_FEATURE = "APG3427HIY";
1771
+ /** List all app groups in the team. */
1772
+ listAppGroups(): Promise<any[]>;
1773
+ /**
1774
+ * Create an app group, returning the raw group record. Idempotent —
1775
+ * Apple rejects a duplicate group identifier ("Multiple App Groups may
1776
+ * not have the same identifier"), so we list first and reuse an existing
1777
+ * group when the identifier already exists in the team.
1778
+ *
1779
+ * Note the two ids on the returned record: `identifier` is the
1780
+ * `group.com.…` string you type, while `applicationGroup` is Apple's
1781
+ * opaque internal handle that association actually requires — do NOT pass
1782
+ * the human identifier to assignAppGroups.
1783
+ */
1784
+ createAppGroup(params: {
1785
+ identifier: string;
1786
+ name: string;
1787
+ }): Promise<any>;
1788
+ /**
1789
+ * Enable the App Groups capability on an App ID. Required before an
1790
+ * App ID can have a group associated with it — mirrors Spaceship
1791
+ * enabling `AppService::AppGroup` before `associate_groups`.
1792
+ */
1793
+ enableAppGroups(appIdId: string): Promise<void>;
1794
+ /**
1795
+ * Associate one or more app groups with an App ID. `appGroupIds` are the
1796
+ * internal ids (Spaceship's `app_group_id`), NOT the `group.com.…`
1797
+ * identifiers. Apple wants both `appIdId` and `displayId` set to the
1798
+ * App ID's internal id, per Spaceship's associate_groups_with_app.
1799
+ */
1800
+ assignAppGroups(params: {
1801
+ appIdId: string;
1802
+ appGroupIds: string[];
1803
+ }): Promise<void>;
1804
+ /** Apple's internal feature code for the Apple Pay capability. */
1805
+ static readonly APPLE_PAY_FEATURE = "OM633U5T5G";
1806
+ /**
1807
+ * List all Apple Pay merchant IDs in the team. Each record maps
1808
+ * (per Spaceship's merchant.rb attr_mapping): `omcId` = internal id,
1809
+ * `identifier` = the human `merchant.com.…` string, `name` = display name.
1810
+ */
1811
+ listMerchants(): Promise<any[]>;
1812
+ /**
1813
+ * Register (or reuse) a merchant ID, returning its INTERNAL id (`omcId`) —
1814
+ * Apple's opaque handle that association requires, NOT the human
1815
+ * `merchant.com.…` identifier. Idempotent: lists first and reuses an
1816
+ * existing merchant with the same identifier. Endpoint + params ported 1:1
1817
+ * from Spaceship's create_merchant! (addOMC.action).
1818
+ */
1819
+ createMerchant(params: {
1820
+ identifier: string;
1821
+ name: string;
1822
+ }): Promise<string>;
1823
+ /**
1824
+ * Enable the Apple Pay capability on an App ID. Apple Pay is a standard
1825
+ * AppService (service_id OM633U5T5G) whose service_uri is the default
1826
+ * `updateService.action` — confirmed in Spaceship's app_service.rb.
1827
+ */
1828
+ enableApplePay(appIdId: string): Promise<void>;
1829
+ /**
1830
+ * Associate merchant IDs with an App ID's Apple Pay capability. `omcIds`
1831
+ * are the internal ids (each merchant record's `omcId`), NOT the
1832
+ * `merchant.com.…` identifiers. Endpoint + params ported 1:1 from
1833
+ * Spaceship's associate_merchants_with_app (assignOMCToAppId.action — note
1834
+ * the singular "OMC", and NO displayId param).
1835
+ */
1836
+ assignMerchants(params: {
1837
+ appIdId: string;
1838
+ omcIds: string[];
1839
+ }): Promise<void>;
1840
+ /**
1841
+ * Create an Apple Pay **Payment Processing Certificate** on a merchant ID
1842
+ * from a CSR — the certificate a PSP (e.g. Stripe) hands you as a CSR, which
1843
+ * must be uploaded to the Merchant ID in Apple Developer, then the resulting
1844
+ * `.cer` downloaded and given back to the PSP so it can decrypt payment
1845
+ * tokens. This is the one manual Apple-portal step in wiring up Apple Pay.
1846
+ *
1847
+ * Ported 1:1 from Spaceship's create_certificate! (submitCertificateRequest
1848
+ * .action): the merchant's INTERNAL id (`omcId`) is passed as BOTH `appIdId`
1849
+ * and `specialIdentifierDisplayId` — the latter is how the portal scopes a
1850
+ * cert to a merchant/special identifier rather than an App ID. The cert type
1851
+ * is APPLE_PAY (`4APLUP237T`). Returns the created certRequest (its
1852
+ * `certificateId` feeds `downloadApplePayCertificate`).
1853
+ *
1854
+ * @param omcId the merchant's internal id (from createMerchant/listMerchants)
1855
+ * @param csrContent the PEM CSR string (Stripe's "Apple Pay CSR")
1856
+ */
1857
+ createApplePayCertificate(params: {
1858
+ omcId: string;
1859
+ csrContent: string;
1860
+ }): Promise<any>;
1861
+ /**
1862
+ * Download an Apple Pay Payment Processing Certificate's raw bytes by its
1863
+ * certificate id (from `createApplePayCertificate`). Thin wrapper over
1864
+ * `downloadCertificate` pinned to the APPLE_PAY type — the DER `.cer` you
1865
+ * upload back into Stripe.
1866
+ */
1867
+ downloadApplePayCertificate(certificateId: string): Promise<Buffer>;
1671
1868
  listCertificates(types?: string[]): Promise<any[]>;
1672
1869
  listPushCertificates(): Promise<any[]>;
1673
1870
  createCertificate(params: {
@@ -1892,8 +2089,12 @@ declare class AppStoreConnectClient {
1892
2089
  readonly inAppPurchases: InAppPurchasesResource;
1893
2090
  readonly gameCenterDetail: GameCenterDetailResource;
1894
2091
  readonly xcodeMetrics: XcodeMetricsResource;
2092
+ readonly appAssetLibraries: AppAssetLibrariesResource;
2093
+ readonly appAssetLibraryImages: AppAssetLibraryImagesResource;
2094
+ readonly appAssetLibraryVideos: AppAssetLibraryVideosResource;
2095
+ readonly appAssetLibraryPlacements: AppAssetLibraryPlacementsResource;
1895
2096
  constructor(config: AppStoreConnectConfig);
1896
2097
  request<T>(path: string, options?: RequestOptions): Promise<T>;
1897
2098
  }
1898
2099
 
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 };
2100
+ 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, IrisClient as a9, IrisAuthError as aa, type IrisApiKey as ab, type ApiKeyRole as ac, type JsonApiRelationship as ad, type JsonApiErrorResponse as ae, 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,4 +1,4 @@
1
- import { E as ExportMethod } from './enums-B609j2rb.js';
1
+ import { E as ExportMethod } from './enums-yXNVh3UI.js';
2
2
 
3
3
  interface DetectedValues {
4
4
  workspace: string | null;
@@ -1,5 +1,5 @@
1
- import { a as AppStoreConnectClient } from './index-CCtYhPN9.js';
2
- import { C as CertificateType } from './enums-B609j2rb.js';
1
+ import { A as AppStoreConnectClient } from './index-lsuS2R1T.js';
2
+ import { C as CertificateType } from './enums-yXNVh3UI.js';
3
3
 
4
4
  type PushCertKind = "development" | "production" | "website" | "voip" | "passbook";
5
5
  interface PemOptions {