@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
package/dist/index.d.cts CHANGED
@@ -1,26 +1,31 @@
1
- import { A as AppleSession } from './index-BKUapQP2.cjs';
2
- export { j as App, K as AppScreenshot, M as AppScreenshotSet, I as AppScreenshotsResource, a as AppStoreConnectClient, d as AppStoreConnectConfig, b as AppStoreConnectError, G as AppStoreVersion, H as AppStoreVersionLocalization, Q as AppStoreVersionSubmission, F as AppStoreVersionsResource, x as AppsResource, m as BetaBuildLocalization, l as BetaGroup, z as BetaGroupsResource, k as Build, n as BuildBetaDetail, y as BuildsResource, B as BundleId, p as BundleIdCapability, v as BundleIdsResource, E as CapabilitiesResource, s as CapabilityOption, r as CapabilitySetting, q as CapabilitySettingInput, C as Certificate, t as CertificatesResource, D as Device, w as DevicesResource, i as JsonApiError, h as JsonApiListResponse, J as JsonApiResource, g as JsonApiResponse, L as ListParams, o as PreReleaseVersion, P as Profile, u as ProfilesResource, c as RateLimitError, R as RequestClient, f as RequestOptions, O as ReviewSubmission, N as ReviewSubmissionsResource, e as TokenConfig, T as TokenManager, U as UploadOperation } from './index-BKUapQP2.cjs';
3
- export { A as AppStoreVersionState, i as BetaReviewState, h as BuildProcessingState, B as BundleIdPlatform, f as CapabilityOptionKey, e as CapabilitySettingsKey, d as CapabilityType, C as CertificateType, g as ContentRightsDeclaration, D as DeviceClass, c as DeviceStatus, E as ExportMethod, b as Platform, a as ProfileState, P as ProfileType, R as ReleaseType } from './enums-B609j2rb.cjs';
4
- export { i as cert } from './index-CNHf7I4v.cjs';
5
- export { i as sigh } from './index-BZWmOTWE.cjs';
6
- export { i as match } from './index-oVyLLIEK.cjs';
7
- export { i as produce } from './index-OelCoOth.cjs';
8
- export { i as pilot } from './index-BICa8odo.cjs';
9
- export { i as deliver } from './index-B9QeTpQK.cjs';
10
- export { i as pem } from './index-Bk1Gd-qE.cjs';
11
- export { i as gym } from './index-DrUpRXRG.cjs';
1
+ import { A as AppStoreConnectClient } from './index-CpGV1f0L.cjs';
2
+ export { i as App, Q as AppAssetLibrariesResource, S as AppAssetLibrary, Z as AppAssetLibraryDimensions, a0 as AppAssetLibraryImage, X as AppAssetLibraryImageSpec, _ as AppAssetLibraryImagesResource, a5 as AppAssetLibraryPlacement, a4 as AppAssetLibraryPlacementsResource, V as AppAssetLibraryRefDatum, W as AppAssetLibraryRefDatumAttributes, a1 as AppAssetLibraryVideo, Y as AppAssetLibraryVideoSpec, $ as AppAssetLibraryVideosResource, I as AppScreenshot, K as AppScreenshotSet, H as AppScreenshotsResource, c as AppStoreConnectConfig, a as AppStoreConnectError, F as AppStoreVersion, G as AppStoreVersionLocalization, O as AppStoreVersionSubmission, E as AppStoreVersionsResource, w as AppsResource, l as BetaBuildLocalization, k as BetaGroup, y as BetaGroupsResource, j as Build, m as BuildBetaDetail, x as BuildsResource, B as BundleId, o as BundleIdCapability, u as BundleIdsResource, z as CapabilitiesResource, r as CapabilityOption, q as CapabilitySetting, p as CapabilitySettingInput, C as Certificate, s as CertificatesResource, a2 as CreateAssetParams, D as Device, v as DevicesResource, h as JsonApiError, g as JsonApiListResponse, J as JsonApiResource, f as JsonApiResponse, L as ListParams, a6 as PlacementTarget, a7 as PlacementTargetKind, n as PreReleaseVersion, P as Profile, t as ProfilesResource, b as RateLimitError, R as RequestClient, e as RequestOptions, N as ReviewSubmission, M as ReviewSubmissionsResource, d as TokenConfig, T as TokenManager, a3 as UpdateAssetAttributes, U as UploadOperation } from './index-CpGV1f0L.cjs';
3
+ export { j as AppAssetLibraryAssetCategory, m as AppAssetLibraryAssetState, o as AppAssetLibraryFeature, k as AppAssetLibraryMediaType, p as AppAssetLibraryPlacementPlatform, n as AppAssetLibraryPlacementState, l as AppAssetLibraryPlacementType, A as AppStoreVersionState, i as BetaReviewState, h as BuildProcessingState, B as BundleIdPlatform, f as CapabilityOptionKey, e as CapabilitySettingsKey, d as CapabilityType, C as CertificateType, g as ContentRightsDeclaration, D as DeviceClass, c as DeviceStatus, E as ExportMethod, b as Platform, a as ProfileState, P as ProfileType, R as ReleaseType } from './enums-yXNVh3UI.cjs';
4
+ export { C as CertExpiryInfo, i as cert, p as parseCertificateExpiry } from './index-_24DRp3a.cjs';
5
+ export { i as sigh } from './index-isT08RuY.cjs';
6
+ export { i as match } from './index-O3EMrd5s.cjs';
7
+ export { i as produce } from './index-BbVQzSV1.cjs';
8
+ export { i as pilot } from './index-CmcFPn_G.cjs';
9
+ export { i as deliver } from './index-BhGaVlK1.cjs';
10
+ export { i as pem } from './index-925_Ov7X.cjs';
11
+ export { i as gym } from './index-B6-MJpO4.cjs';
12
+ export { i as gradle } from './index-Dv-Mek07.cjs';
13
+ export { i as playstore } from './index-CXJlvmB4.cjs';
12
14
  export { i as scan } from './index-BimqCmY8.cjs';
13
15
  export { i as snapshot } from './index-CR3BFPIz.cjs';
14
16
  export { i as trainer } from './index-BoU8qt8r.cjs';
15
- export { i as precheck } from './index-D13sn8DO.cjs';
17
+ export { i as precheck } from './index-on573dnO.cjs';
18
+ export { i as privacy } from './index-DnHQ2uT2.cjs';
19
+ export { i as review } from './index-DFstwgGK.cjs';
16
20
  export { i as frameit } from './index-BYonklf3.cjs';
17
21
  export { i as xcode } from './index-Cp6cjtd-.cjs';
18
22
  export { i as core } from './index-C2yG3wXA.cjs';
19
23
  export { LaneCallback, LaneDefinition, RunLaneOptions, RunResult, afterAll, afterEach, beforeAll, beforeEach, generateFastfileTemplate, lane, listAvailableLanes, loadFastfile, privateLane, runLane } from './lane/index.cjs';
20
24
  export { L as LaneContext } from './context-CymLkfrS.cjs';
21
25
  export { ActionDefinition, action, ensureActionsRegistered, getAction, listActions, registerAction } from './actions/index.cjs';
26
+ import { A as AppleSession } from './apple-session-jUzBrql5.cjs';
22
27
  export { createCli } from './cli/index.cjs';
23
- import './cert-FehieKeb.cjs';
28
+ import './cert-DffLKURp.cjs';
24
29
  import 'commander';
25
30
 
26
31
  /**
@@ -136,6 +141,13 @@ interface OneClickOptions {
136
141
  enablePushNotifications?: boolean;
137
142
  /** Enable Apple Pay capability on the bundle ID. Default false. Required for Stripe. */
138
143
  enableApplePay?: boolean;
144
+ /**
145
+ * Enable the Associated Domains capability on the bundle ID (universal
146
+ * links, passkeys / webcredentials, app clips). Default false. The domain
147
+ * list itself ships in the app's entitlements — Apple only stores the
148
+ * on/off switch. Requires the ASC API key (same JWT-only path as Push).
149
+ */
150
+ enableAssociatedDomains?: boolean;
139
151
  /** Merchant ID to register for Apple Pay (e.g. "merchant.com.example.app"). Required when enableApplePay is true. */
140
152
  merchantId?: string;
141
153
  /**
@@ -159,6 +171,17 @@ interface OneClickInput {
159
171
  bundleIdentifier: string;
160
172
  appName: string;
161
173
  options?: OneClickOptions;
174
+ /**
175
+ * Reuse an existing shared distribution certificate instead of minting a new
176
+ * one (Apple caps a team at 3). The provisioning profile is still created —
177
+ * against this cert's portal id (resolved by serial when only the serial is
178
+ * known). When set, the result's dist_cert / private_key / cert_password come
179
+ * back empty because the secret lives on the shared signing account, not here.
180
+ */
181
+ reuseDistributionCert?: {
182
+ certificateId?: string;
183
+ certSerial?: string;
184
+ };
162
185
  /** Defaults to a random 32-char password. Override for deterministic tests. */
163
186
  certPassword?: string;
164
187
  /**
@@ -212,6 +235,19 @@ interface OneClickResult {
212
235
  dist_cert_base64: string;
213
236
  private_key_base64: string;
214
237
  cert_password: string;
238
+ /**
239
+ * Serial of the distribution certificate this run MINTED, and when it
240
+ * expires. Empty when the run reused a shared certificate rather than
241
+ * minting one.
242
+ *
243
+ * The serial is the only handle a later run can reuse a certificate by:
244
+ * reuse matches on serialNumber, while creation returns a certificateId,
245
+ * and the two are different identifiers. Without this the caller has a p12
246
+ * and no way to name what is inside it, so it stores a certificate nothing
247
+ * can ever reuse — and the next "use existing" mints another.
248
+ */
249
+ dist_cert_serial: string;
250
+ dist_cert_expires_at: string;
215
251
  provisioning_profile_base64: string;
216
252
  profile_name: string;
217
253
  asc_key_id: string;
@@ -256,6 +292,43 @@ interface PortalTeam {
256
292
  * API calls (and is not what the legacy portal endpoints want).
257
293
  */
258
294
  declare function oneClickListTeams(session: AppleSession): Promise<PortalTeam[]>;
295
+ interface EnsureAppGroupInput {
296
+ session: AppleSession;
297
+ teamId: string;
298
+ /** The App Group identifier, e.g. `group.com.playspina.com`. */
299
+ groupIdentifier: string;
300
+ /** Human-readable name for the group. Defaults to the identifier. */
301
+ groupName?: string;
302
+ /**
303
+ * Bundle identifiers to associate the group with — typically the host
304
+ * app plus its extension(s), e.g. `["com.playspina.com",
305
+ * "com.playspina.com.MessagesExtension"]`. Each is resolved to its App ID
306
+ * (created if missing) before the group is enabled + associated.
307
+ */
308
+ bundleIdentifiers: string[];
309
+ onLog?: (msg: string) => void;
310
+ }
311
+ interface EnsureAppGroupResult {
312
+ /** Apple's internal handle for the group (used by profiles/association). */
313
+ appGroupId: string;
314
+ /** The `group.com.…` identifier. */
315
+ identifier: string;
316
+ /** Bundle identifiers successfully associated with the group. */
317
+ associated: string[];
318
+ /** Non-fatal issues (e.g. a capability toggle that Apple reported as already-on). */
319
+ warnings: string[];
320
+ }
321
+ /**
322
+ * Idempotently ensure an App Group exists and is associated with the given
323
+ * bundle identifiers, enabling the App Groups capability on each App ID
324
+ * first. This is the piece the `.p8` build pipeline cannot do — it requires
325
+ * the Apple ID session that onboarding already collects (see PortalClient's
326
+ * Application Groups section for why).
327
+ *
328
+ * Safe to re-run: the group is reused if it exists, capability-enable is
329
+ * best-effort (Apple no-ops when already on), and association is declarative.
330
+ */
331
+ declare function ensureAppGroup(input: EnsureAppGroupInput): Promise<EnsureAppGroupResult>;
259
332
  /**
260
333
  * Read the team's current state: bundle IDs, distribution cert capacity,
261
334
  * push certs, profiles. Used by the wizard to render the configure screen
@@ -269,4 +342,154 @@ declare function oneClickInventory(session: AppleSession, teamId: string): Promi
269
342
  */
270
343
  declare function oneClickSetup(input: OneClickInput): Promise<OneClickResult>;
271
344
 
272
- export { type AdditionalCertResult, type OneClickInput, type OneClickInventory, type OneClickOptions, type OneClickResult, type PortalTeam, type ProgressEvent, oneClickInventory, oneClickListTeams, oneClickSetup };
345
+ /**
346
+ * Apple Pay Payment Processing Certificate generation.
347
+ *
348
+ * The one manual Apple-portal step in wiring up in-app Apple Pay with a PSP
349
+ * (e.g. Stripe): the PSP hands you a CSR, which must be uploaded to the
350
+ * Merchant ID in Apple Developer to mint a Payment Processing Certificate, then
351
+ * the resulting `.cer` downloaded and given back to the PSP so it can decrypt
352
+ * payment tokens. This automates the Apple side end to end from the CSR.
353
+ *
354
+ * Merchant certs are created through the legacy session-cookie portal API
355
+ * (same as the merchant IDs themselves). Endpoint shapes are pinned in
356
+ * PortalClient (createApplePayCertificate / downloadApplePayCertificate),
357
+ * ported 1:1 from Spaceship.
358
+ */
359
+
360
+ interface ApplePayCertInput {
361
+ session: AppleSession;
362
+ /** The team the merchant ID lives on (the credential's team). */
363
+ teamId: string;
364
+ /** The merchant identifier (`merchant.…`) to mint the certificate on. */
365
+ merchantIdentifier: string;
366
+ /** PEM CSR string — the "Apple Pay CSR" the PSP (Stripe) gives you. */
367
+ csr: string;
368
+ onLog?: (m: string) => void;
369
+ }
370
+ interface ApplePayCertResult {
371
+ merchantIdentifier: string;
372
+ /** Apple's internal merchant id the cert was minted on. */
373
+ omcId: string;
374
+ /** Apple's certificate id (for later download / revoke). */
375
+ certificateId: string;
376
+ /** The DER `.cer` bytes, base64-encoded — upload this back to the PSP. */
377
+ certificateBase64: string;
378
+ }
379
+ /**
380
+ * Upload a CSR to a Merchant ID and return the minted Apple Pay Payment
381
+ * Processing Certificate. Idempotent-ish: Apple allows a small number of live
382
+ * certs per merchant; if you re-run with a new CSR it mints another.
383
+ *
384
+ * Throws a clear error if the merchant identifier doesn't exist on the team
385
+ * (the caller should add the Apple Pay capability first, which registers it).
386
+ */
387
+ declare function generateApplePayCertificate(input: ApplePayCertInput): Promise<ApplePayCertResult>;
388
+
389
+ /**
390
+ * Capability action registry — the individually-callable building blocks
391
+ * behind Apple credential provisioning.
392
+ *
393
+ * `oneClickSetup` composes these in sequence for first-time setup, but each
394
+ * action is also standalone and idempotent, so a "select → type → go" UI can
395
+ * add ONE capability (an app extension, an App Group, an APNs key, an extra
396
+ * cert) to an already-provisioned credential without re-running the whole
397
+ * flow — as long as it has a live Apple session (re-auth on demand when the
398
+ * server-side session has expired).
399
+ *
400
+ * Actions return portable `ProvisionArtifact`s (raw Apple bytes + ids). The
401
+ * API layer is responsible for persisting them (Vault + apple_credential_certs
402
+ * / credential patches) — this module stays free of any DB coupling.
403
+ */
404
+
405
+ interface ActionContext {
406
+ session: AppleSession;
407
+ teamId: string;
408
+ /** The primary app bundle id the credential is for (host app). */
409
+ bundleIdentifier: string;
410
+ /** Human-readable app name, used for cert/profile friendly names. */
411
+ appName: string;
412
+ /** Password to encrypt any generated .p12. Random if omitted. */
413
+ certPassword?: string;
414
+ /**
415
+ * Token-authenticated ASC REST client, when the credential has an ASC API
416
+ * key. Some capabilities (Associated Domains, Push, SIWA) can only be
417
+ * flipped via the ASC REST API — Apple removed their legacy portal
418
+ * endpoints — so actions that need it throw a clear error when absent.
419
+ */
420
+ ascClient?: AppStoreConnectClient;
421
+ onLog?: (m: string) => void;
422
+ }
423
+ type ArtifactKind = "apns_key" | "aps_production" | "aps_sandbox" | "distribution_cert" | "provisioning_profile" | "app_group" | "extension";
424
+ /**
425
+ * A portable provisioning result. `base64` holds the primary blob
426
+ * (.p8 / .p12), `secret` the secondary secret (a .p12 password, or an APNs
427
+ * Key ID), and `ids`/`meta` any Apple-side identifiers the caller may want
428
+ * to persist. The API layer maps each kind to its storage:
429
+ * apns_key / aps_* → apple_credential_certs
430
+ * distribution_cert → credential patch (dist/private-key/password secrets)
431
+ * app_group / extension → metadata / entitlements
432
+ */
433
+ interface ProvisionArtifact {
434
+ kind: ArtifactKind;
435
+ base64?: string;
436
+ secret?: string;
437
+ name?: string;
438
+ ids?: Record<string, string>;
439
+ meta?: Record<string, unknown>;
440
+ }
441
+ interface ActionResult {
442
+ artifacts: ProvisionArtifact[];
443
+ warnings: string[];
444
+ /** One-line human summary for the UI. */
445
+ summary: string;
446
+ }
447
+ interface ActionField {
448
+ key: string;
449
+ label: string;
450
+ type: "text" | "bundleId" | "select" | "boolean";
451
+ required?: boolean;
452
+ placeholder?: string;
453
+ help?: string;
454
+ options?: {
455
+ value: string;
456
+ label: string;
457
+ }[];
458
+ /** Default value the UI pre-fills. */
459
+ default?: string | boolean;
460
+ /**
461
+ * When set, the UI offers the team's existing values (fetched via
462
+ * listCapabilityInventory) as a pick-from-list-or-type-new combobox instead
463
+ * of a bare text input. `bundleIds` → existing App IDs; `appGroups` →
464
+ * existing App Groups.
465
+ */
466
+ source?: "bundleIds" | "appGroups";
467
+ }
468
+ interface CapabilityAction {
469
+ key: string;
470
+ label: string;
471
+ description: string;
472
+ fields: ActionField[];
473
+ run(ctx: ActionContext, params: Record<string, any>): Promise<ActionResult>;
474
+ }
475
+ declare const CAPABILITY_ACTIONS: Record<string, CapabilityAction>;
476
+ /** Serializable descriptors (no `run`) for a UI to render the action picker + forms. */
477
+ declare function listCapabilityActions(): Array<Omit<CapabilityAction, "run">>;
478
+ interface CapabilityInventory {
479
+ /** Existing App ID identifiers in the team, sorted. */
480
+ bundleIds: string[];
481
+ /** Existing App Groups in the team. */
482
+ appGroups: {
483
+ identifier: string;
484
+ name: string;
485
+ }[];
486
+ }
487
+ /**
488
+ * List the team's existing App IDs + App Groups, for the UI to offer as
489
+ * pick-from-existing options in fields tagged with a `source`. Read-only.
490
+ */
491
+ declare function listCapabilityInventory(session: AppleSession, teamId: string): Promise<CapabilityInventory>;
492
+ /** Run a single capability action by key. Throws on unknown key. */
493
+ declare function runCapabilityAction(key: string, ctx: ActionContext, params: Record<string, any>): Promise<ActionResult>;
494
+
495
+ export { type ActionContext, type ActionField, type ActionResult, type AdditionalCertResult, AppStoreConnectClient, type ApplePayCertInput, type ApplePayCertResult, type ArtifactKind, CAPABILITY_ACTIONS, type CapabilityAction, type CapabilityInventory, type EnsureAppGroupInput, type EnsureAppGroupResult, type OneClickInput, type OneClickInventory, type OneClickOptions, type OneClickResult, type PortalTeam, type ProgressEvent, type ProvisionArtifact, ensureAppGroup, generateApplePayCertificate, listCapabilityActions, listCapabilityInventory, oneClickInventory, oneClickListTeams, oneClickSetup, runCapabilityAction };
package/dist/index.d.ts CHANGED
@@ -1,26 +1,31 @@
1
- import { A as AppleSession } from './index-CCtYhPN9.js';
2
- export { j as App, K as AppScreenshot, M as AppScreenshotSet, I as AppScreenshotsResource, a as AppStoreConnectClient, d as AppStoreConnectConfig, b as AppStoreConnectError, G as AppStoreVersion, H as AppStoreVersionLocalization, Q as AppStoreVersionSubmission, F as AppStoreVersionsResource, x as AppsResource, m as BetaBuildLocalization, l as BetaGroup, z as BetaGroupsResource, k as Build, n as BuildBetaDetail, y as BuildsResource, B as BundleId, p as BundleIdCapability, v as BundleIdsResource, E as CapabilitiesResource, s as CapabilityOption, r as CapabilitySetting, q as CapabilitySettingInput, C as Certificate, t as CertificatesResource, D as Device, w as DevicesResource, i as JsonApiError, h as JsonApiListResponse, J as JsonApiResource, g as JsonApiResponse, L as ListParams, o as PreReleaseVersion, P as Profile, u as ProfilesResource, c as RateLimitError, R as RequestClient, f as RequestOptions, O as ReviewSubmission, N as ReviewSubmissionsResource, e as TokenConfig, T as TokenManager, U as UploadOperation } from './index-CCtYhPN9.js';
3
- export { A as AppStoreVersionState, i as BetaReviewState, h as BuildProcessingState, B as BundleIdPlatform, f as CapabilityOptionKey, e as CapabilitySettingsKey, d as CapabilityType, C as CertificateType, g as ContentRightsDeclaration, D as DeviceClass, c as DeviceStatus, E as ExportMethod, b as Platform, a as ProfileState, P as ProfileType, R as ReleaseType } from './enums-B609j2rb.js';
4
- export { i as cert } from './index-CplRWSUc.js';
5
- export { i as sigh } from './index-B8FOfxOw.js';
6
- export { i as match } from './index-DZoPGCbE.js';
7
- export { i as produce } from './index-CtPyeMLH.js';
8
- export { i as pilot } from './index-DI1ZHr-3.js';
9
- export { i as deliver } from './index-xykpq6Lz.js';
10
- export { i as pem } from './index-DFni8oZt.js';
11
- export { i as gym } from './index-DImN9PWc.js';
1
+ import { A as AppStoreConnectClient } from './index-CemR3UI9.js';
2
+ export { i as App, Q as AppAssetLibrariesResource, S as AppAssetLibrary, Z as AppAssetLibraryDimensions, a0 as AppAssetLibraryImage, X as AppAssetLibraryImageSpec, _ as AppAssetLibraryImagesResource, a5 as AppAssetLibraryPlacement, a4 as AppAssetLibraryPlacementsResource, V as AppAssetLibraryRefDatum, W as AppAssetLibraryRefDatumAttributes, a1 as AppAssetLibraryVideo, Y as AppAssetLibraryVideoSpec, $ as AppAssetLibraryVideosResource, I as AppScreenshot, K as AppScreenshotSet, H as AppScreenshotsResource, c as AppStoreConnectConfig, a as AppStoreConnectError, F as AppStoreVersion, G as AppStoreVersionLocalization, O as AppStoreVersionSubmission, E as AppStoreVersionsResource, w as AppsResource, l as BetaBuildLocalization, k as BetaGroup, y as BetaGroupsResource, j as Build, m as BuildBetaDetail, x as BuildsResource, B as BundleId, o as BundleIdCapability, u as BundleIdsResource, z as CapabilitiesResource, r as CapabilityOption, q as CapabilitySetting, p as CapabilitySettingInput, C as Certificate, s as CertificatesResource, a2 as CreateAssetParams, D as Device, v as DevicesResource, h as JsonApiError, g as JsonApiListResponse, J as JsonApiResource, f as JsonApiResponse, L as ListParams, a6 as PlacementTarget, a7 as PlacementTargetKind, n as PreReleaseVersion, P as Profile, t as ProfilesResource, b as RateLimitError, R as RequestClient, e as RequestOptions, N as ReviewSubmission, M as ReviewSubmissionsResource, d as TokenConfig, T as TokenManager, a3 as UpdateAssetAttributes, U as UploadOperation } from './index-CemR3UI9.js';
3
+ export { j as AppAssetLibraryAssetCategory, m as AppAssetLibraryAssetState, o as AppAssetLibraryFeature, k as AppAssetLibraryMediaType, p as AppAssetLibraryPlacementPlatform, n as AppAssetLibraryPlacementState, l as AppAssetLibraryPlacementType, A as AppStoreVersionState, i as BetaReviewState, h as BuildProcessingState, B as BundleIdPlatform, f as CapabilityOptionKey, e as CapabilitySettingsKey, d as CapabilityType, C as CertificateType, g as ContentRightsDeclaration, D as DeviceClass, c as DeviceStatus, E as ExportMethod, b as Platform, a as ProfileState, P as ProfileType, R as ReleaseType } from './enums-yXNVh3UI.js';
4
+ export { C as CertExpiryInfo, i as cert, p as parseCertificateExpiry } from './index-C18cijCd.js';
5
+ export { i as sigh } from './index-D9YQQ3FM.js';
6
+ export { i as match } from './index-Ol0RtbQA.js';
7
+ export { i as produce } from './index-C-EEYXSE.js';
8
+ export { i as pilot } from './index-N6eV5yym.js';
9
+ export { i as deliver } from './index-s2PigtDM.js';
10
+ export { i as pem } from './index-CBM5XZKC.js';
11
+ export { i as gym } from './index-mEEB7An6.js';
12
+ export { i as gradle } from './index-Dv-Mek07.js';
13
+ export { i as playstore } from './index-CXJlvmB4.js';
12
14
  export { i as scan } from './index-BimqCmY8.js';
13
15
  export { i as snapshot } from './index-CR3BFPIz.js';
14
16
  export { i as trainer } from './index-BoU8qt8r.js';
15
- export { i as precheck } from './index-YcKz4aRS.js';
17
+ export { i as precheck } from './index-Dkf5sH1E.js';
18
+ export { i as privacy } from './index-8djTPW8O.js';
19
+ export { i as review } from './index-BGhV0gS-.js';
16
20
  export { i as frameit } from './index-BYonklf3.js';
17
21
  export { i as xcode } from './index-Cp6cjtd-.js';
18
22
  export { i as core } from './index-C2yG3wXA.js';
19
23
  export { LaneCallback, LaneDefinition, RunLaneOptions, RunResult, afterAll, afterEach, beforeAll, beforeEach, generateFastfileTemplate, lane, listAvailableLanes, loadFastfile, privateLane, runLane } from './lane/index.js';
20
24
  export { L as LaneContext } from './context-CymLkfrS.js';
21
25
  export { ActionDefinition, action, ensureActionsRegistered, getAction, listActions, registerAction } from './actions/index.js';
26
+ import { A as AppleSession } from './apple-session-jUzBrql5.js';
22
27
  export { createCli } from './cli/index.js';
23
- import './cert-Ddl7FpFT.js';
28
+ import './cert-ClacRx9y.js';
24
29
  import 'commander';
25
30
 
26
31
  /**
@@ -136,6 +141,13 @@ interface OneClickOptions {
136
141
  enablePushNotifications?: boolean;
137
142
  /** Enable Apple Pay capability on the bundle ID. Default false. Required for Stripe. */
138
143
  enableApplePay?: boolean;
144
+ /**
145
+ * Enable the Associated Domains capability on the bundle ID (universal
146
+ * links, passkeys / webcredentials, app clips). Default false. The domain
147
+ * list itself ships in the app's entitlements — Apple only stores the
148
+ * on/off switch. Requires the ASC API key (same JWT-only path as Push).
149
+ */
150
+ enableAssociatedDomains?: boolean;
139
151
  /** Merchant ID to register for Apple Pay (e.g. "merchant.com.example.app"). Required when enableApplePay is true. */
140
152
  merchantId?: string;
141
153
  /**
@@ -159,6 +171,17 @@ interface OneClickInput {
159
171
  bundleIdentifier: string;
160
172
  appName: string;
161
173
  options?: OneClickOptions;
174
+ /**
175
+ * Reuse an existing shared distribution certificate instead of minting a new
176
+ * one (Apple caps a team at 3). The provisioning profile is still created —
177
+ * against this cert's portal id (resolved by serial when only the serial is
178
+ * known). When set, the result's dist_cert / private_key / cert_password come
179
+ * back empty because the secret lives on the shared signing account, not here.
180
+ */
181
+ reuseDistributionCert?: {
182
+ certificateId?: string;
183
+ certSerial?: string;
184
+ };
162
185
  /** Defaults to a random 32-char password. Override for deterministic tests. */
163
186
  certPassword?: string;
164
187
  /**
@@ -212,6 +235,19 @@ interface OneClickResult {
212
235
  dist_cert_base64: string;
213
236
  private_key_base64: string;
214
237
  cert_password: string;
238
+ /**
239
+ * Serial of the distribution certificate this run MINTED, and when it
240
+ * expires. Empty when the run reused a shared certificate rather than
241
+ * minting one.
242
+ *
243
+ * The serial is the only handle a later run can reuse a certificate by:
244
+ * reuse matches on serialNumber, while creation returns a certificateId,
245
+ * and the two are different identifiers. Without this the caller has a p12
246
+ * and no way to name what is inside it, so it stores a certificate nothing
247
+ * can ever reuse — and the next "use existing" mints another.
248
+ */
249
+ dist_cert_serial: string;
250
+ dist_cert_expires_at: string;
215
251
  provisioning_profile_base64: string;
216
252
  profile_name: string;
217
253
  asc_key_id: string;
@@ -256,6 +292,43 @@ interface PortalTeam {
256
292
  * API calls (and is not what the legacy portal endpoints want).
257
293
  */
258
294
  declare function oneClickListTeams(session: AppleSession): Promise<PortalTeam[]>;
295
+ interface EnsureAppGroupInput {
296
+ session: AppleSession;
297
+ teamId: string;
298
+ /** The App Group identifier, e.g. `group.com.playspina.com`. */
299
+ groupIdentifier: string;
300
+ /** Human-readable name for the group. Defaults to the identifier. */
301
+ groupName?: string;
302
+ /**
303
+ * Bundle identifiers to associate the group with — typically the host
304
+ * app plus its extension(s), e.g. `["com.playspina.com",
305
+ * "com.playspina.com.MessagesExtension"]`. Each is resolved to its App ID
306
+ * (created if missing) before the group is enabled + associated.
307
+ */
308
+ bundleIdentifiers: string[];
309
+ onLog?: (msg: string) => void;
310
+ }
311
+ interface EnsureAppGroupResult {
312
+ /** Apple's internal handle for the group (used by profiles/association). */
313
+ appGroupId: string;
314
+ /** The `group.com.…` identifier. */
315
+ identifier: string;
316
+ /** Bundle identifiers successfully associated with the group. */
317
+ associated: string[];
318
+ /** Non-fatal issues (e.g. a capability toggle that Apple reported as already-on). */
319
+ warnings: string[];
320
+ }
321
+ /**
322
+ * Idempotently ensure an App Group exists and is associated with the given
323
+ * bundle identifiers, enabling the App Groups capability on each App ID
324
+ * first. This is the piece the `.p8` build pipeline cannot do — it requires
325
+ * the Apple ID session that onboarding already collects (see PortalClient's
326
+ * Application Groups section for why).
327
+ *
328
+ * Safe to re-run: the group is reused if it exists, capability-enable is
329
+ * best-effort (Apple no-ops when already on), and association is declarative.
330
+ */
331
+ declare function ensureAppGroup(input: EnsureAppGroupInput): Promise<EnsureAppGroupResult>;
259
332
  /**
260
333
  * Read the team's current state: bundle IDs, distribution cert capacity,
261
334
  * push certs, profiles. Used by the wizard to render the configure screen
@@ -269,4 +342,154 @@ declare function oneClickInventory(session: AppleSession, teamId: string): Promi
269
342
  */
270
343
  declare function oneClickSetup(input: OneClickInput): Promise<OneClickResult>;
271
344
 
272
- export { type AdditionalCertResult, type OneClickInput, type OneClickInventory, type OneClickOptions, type OneClickResult, type PortalTeam, type ProgressEvent, oneClickInventory, oneClickListTeams, oneClickSetup };
345
+ /**
346
+ * Apple Pay Payment Processing Certificate generation.
347
+ *
348
+ * The one manual Apple-portal step in wiring up in-app Apple Pay with a PSP
349
+ * (e.g. Stripe): the PSP hands you a CSR, which must be uploaded to the
350
+ * Merchant ID in Apple Developer to mint a Payment Processing Certificate, then
351
+ * the resulting `.cer` downloaded and given back to the PSP so it can decrypt
352
+ * payment tokens. This automates the Apple side end to end from the CSR.
353
+ *
354
+ * Merchant certs are created through the legacy session-cookie portal API
355
+ * (same as the merchant IDs themselves). Endpoint shapes are pinned in
356
+ * PortalClient (createApplePayCertificate / downloadApplePayCertificate),
357
+ * ported 1:1 from Spaceship.
358
+ */
359
+
360
+ interface ApplePayCertInput {
361
+ session: AppleSession;
362
+ /** The team the merchant ID lives on (the credential's team). */
363
+ teamId: string;
364
+ /** The merchant identifier (`merchant.…`) to mint the certificate on. */
365
+ merchantIdentifier: string;
366
+ /** PEM CSR string — the "Apple Pay CSR" the PSP (Stripe) gives you. */
367
+ csr: string;
368
+ onLog?: (m: string) => void;
369
+ }
370
+ interface ApplePayCertResult {
371
+ merchantIdentifier: string;
372
+ /** Apple's internal merchant id the cert was minted on. */
373
+ omcId: string;
374
+ /** Apple's certificate id (for later download / revoke). */
375
+ certificateId: string;
376
+ /** The DER `.cer` bytes, base64-encoded — upload this back to the PSP. */
377
+ certificateBase64: string;
378
+ }
379
+ /**
380
+ * Upload a CSR to a Merchant ID and return the minted Apple Pay Payment
381
+ * Processing Certificate. Idempotent-ish: Apple allows a small number of live
382
+ * certs per merchant; if you re-run with a new CSR it mints another.
383
+ *
384
+ * Throws a clear error if the merchant identifier doesn't exist on the team
385
+ * (the caller should add the Apple Pay capability first, which registers it).
386
+ */
387
+ declare function generateApplePayCertificate(input: ApplePayCertInput): Promise<ApplePayCertResult>;
388
+
389
+ /**
390
+ * Capability action registry — the individually-callable building blocks
391
+ * behind Apple credential provisioning.
392
+ *
393
+ * `oneClickSetup` composes these in sequence for first-time setup, but each
394
+ * action is also standalone and idempotent, so a "select → type → go" UI can
395
+ * add ONE capability (an app extension, an App Group, an APNs key, an extra
396
+ * cert) to an already-provisioned credential without re-running the whole
397
+ * flow — as long as it has a live Apple session (re-auth on demand when the
398
+ * server-side session has expired).
399
+ *
400
+ * Actions return portable `ProvisionArtifact`s (raw Apple bytes + ids). The
401
+ * API layer is responsible for persisting them (Vault + apple_credential_certs
402
+ * / credential patches) — this module stays free of any DB coupling.
403
+ */
404
+
405
+ interface ActionContext {
406
+ session: AppleSession;
407
+ teamId: string;
408
+ /** The primary app bundle id the credential is for (host app). */
409
+ bundleIdentifier: string;
410
+ /** Human-readable app name, used for cert/profile friendly names. */
411
+ appName: string;
412
+ /** Password to encrypt any generated .p12. Random if omitted. */
413
+ certPassword?: string;
414
+ /**
415
+ * Token-authenticated ASC REST client, when the credential has an ASC API
416
+ * key. Some capabilities (Associated Domains, Push, SIWA) can only be
417
+ * flipped via the ASC REST API — Apple removed their legacy portal
418
+ * endpoints — so actions that need it throw a clear error when absent.
419
+ */
420
+ ascClient?: AppStoreConnectClient;
421
+ onLog?: (m: string) => void;
422
+ }
423
+ type ArtifactKind = "apns_key" | "aps_production" | "aps_sandbox" | "distribution_cert" | "provisioning_profile" | "app_group" | "extension";
424
+ /**
425
+ * A portable provisioning result. `base64` holds the primary blob
426
+ * (.p8 / .p12), `secret` the secondary secret (a .p12 password, or an APNs
427
+ * Key ID), and `ids`/`meta` any Apple-side identifiers the caller may want
428
+ * to persist. The API layer maps each kind to its storage:
429
+ * apns_key / aps_* → apple_credential_certs
430
+ * distribution_cert → credential patch (dist/private-key/password secrets)
431
+ * app_group / extension → metadata / entitlements
432
+ */
433
+ interface ProvisionArtifact {
434
+ kind: ArtifactKind;
435
+ base64?: string;
436
+ secret?: string;
437
+ name?: string;
438
+ ids?: Record<string, string>;
439
+ meta?: Record<string, unknown>;
440
+ }
441
+ interface ActionResult {
442
+ artifacts: ProvisionArtifact[];
443
+ warnings: string[];
444
+ /** One-line human summary for the UI. */
445
+ summary: string;
446
+ }
447
+ interface ActionField {
448
+ key: string;
449
+ label: string;
450
+ type: "text" | "bundleId" | "select" | "boolean";
451
+ required?: boolean;
452
+ placeholder?: string;
453
+ help?: string;
454
+ options?: {
455
+ value: string;
456
+ label: string;
457
+ }[];
458
+ /** Default value the UI pre-fills. */
459
+ default?: string | boolean;
460
+ /**
461
+ * When set, the UI offers the team's existing values (fetched via
462
+ * listCapabilityInventory) as a pick-from-list-or-type-new combobox instead
463
+ * of a bare text input. `bundleIds` → existing App IDs; `appGroups` →
464
+ * existing App Groups.
465
+ */
466
+ source?: "bundleIds" | "appGroups";
467
+ }
468
+ interface CapabilityAction {
469
+ key: string;
470
+ label: string;
471
+ description: string;
472
+ fields: ActionField[];
473
+ run(ctx: ActionContext, params: Record<string, any>): Promise<ActionResult>;
474
+ }
475
+ declare const CAPABILITY_ACTIONS: Record<string, CapabilityAction>;
476
+ /** Serializable descriptors (no `run`) for a UI to render the action picker + forms. */
477
+ declare function listCapabilityActions(): Array<Omit<CapabilityAction, "run">>;
478
+ interface CapabilityInventory {
479
+ /** Existing App ID identifiers in the team, sorted. */
480
+ bundleIds: string[];
481
+ /** Existing App Groups in the team. */
482
+ appGroups: {
483
+ identifier: string;
484
+ name: string;
485
+ }[];
486
+ }
487
+ /**
488
+ * List the team's existing App IDs + App Groups, for the UI to offer as
489
+ * pick-from-existing options in fields tagged with a `source`. Read-only.
490
+ */
491
+ declare function listCapabilityInventory(session: AppleSession, teamId: string): Promise<CapabilityInventory>;
492
+ /** Run a single capability action by key. Throws on unknown key. */
493
+ declare function runCapabilityAction(key: string, ctx: ActionContext, params: Record<string, any>): Promise<ActionResult>;
494
+
495
+ export { type ActionContext, type ActionField, type ActionResult, type AdditionalCertResult, AppStoreConnectClient, type ApplePayCertInput, type ApplePayCertResult, type ArtifactKind, CAPABILITY_ACTIONS, type CapabilityAction, type CapabilityInventory, type EnsureAppGroupInput, type EnsureAppGroupResult, type OneClickInput, type OneClickInventory, type OneClickOptions, type OneClickResult, type PortalTeam, type ProgressEvent, type ProvisionArtifact, ensureAppGroup, generateApplePayCertificate, listCapabilityActions, listCapabilityInventory, oneClickInventory, oneClickListTeams, oneClickSetup, runCapabilityAction };