@sitepong/fastnode 0.2.0 → 0.2.2

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 (71) hide show
  1. package/dist/actions/index.cjs +70 -24
  2. package/dist/actions/index.cjs.map +1 -1
  3. package/dist/actions/index.mjs +70 -24
  4. package/dist/actions/index.mjs.map +1 -1
  5. package/dist/cert/index.cjs +17822 -24
  6. package/dist/cert/index.cjs.map +1 -1
  7. package/dist/cert/index.d.cts +3 -3
  8. package/dist/cert/index.d.ts +3 -3
  9. package/dist/cert/index.mjs +17807 -6
  10. package/dist/cert/index.mjs.map +1 -1
  11. package/dist/{cert-DtYDJBjG.d.ts → cert-Ddl7FpFT.d.ts} +1 -1
  12. package/dist/{cert-6m1R8UeW.d.cts → cert-FehieKeb.d.cts} +1 -1
  13. package/dist/cli/index.cjs +70 -24
  14. package/dist/cli/index.cjs.map +1 -1
  15. package/dist/cli/index.d.cts +1 -1
  16. package/dist/cli/index.d.ts +1 -1
  17. package/dist/cli/index.mjs +70 -24
  18. package/dist/cli/index.mjs.map +1 -1
  19. package/dist/client/index.cjs +64 -6
  20. package/dist/client/index.cjs.map +1 -1
  21. package/dist/client/index.d.cts +1 -1
  22. package/dist/client/index.d.ts +1 -1
  23. package/dist/client/index.mjs +64 -6
  24. package/dist/client/index.mjs.map +1 -1
  25. package/dist/deliver/index.d.cts +2 -2
  26. package/dist/deliver/index.d.ts +2 -2
  27. package/dist/{index-CojSGJ7m.d.ts → index-B8FOfxOw.d.ts} +1 -1
  28. package/dist/{index-CdYdwxpQ.d.cts → index-B9QeTpQK.d.cts} +1 -1
  29. package/dist/{index-AD8QXY1T.d.cts → index-BICa8odo.d.cts} +1 -1
  30. package/dist/{index-CMH_GpN9.d.cts → index-BKUapQP2.d.cts} +30 -0
  31. package/dist/{index-Ce-WMV7c.d.cts → index-BZWmOTWE.d.cts} +1 -1
  32. package/dist/{index-BWK-T2-S.d.cts → index-Bk1Gd-qE.d.cts} +1 -1
  33. package/dist/{index-D2z7RiAM.d.ts → index-CCtYhPN9.d.ts} +30 -0
  34. package/dist/{index-CCs5irG7.d.cts → index-CNHf7I4v.d.cts} +1 -1
  35. package/dist/{index-CQKpbHZt.d.ts → index-CplRWSUc.d.ts} +1 -1
  36. package/dist/{index-BpiEBPVd.d.ts → index-CtPyeMLH.d.ts} +1 -1
  37. package/dist/{index-BW8wQUGC.d.cts → index-D13sn8DO.d.cts} +1 -1
  38. package/dist/{index-Kq3rbG0u.d.ts → index-DFni8oZt.d.ts} +1 -1
  39. package/dist/{index-D82CmjMP.d.ts → index-DI1ZHr-3.d.ts} +1 -1
  40. package/dist/{index-DZaPkUnC.d.ts → index-DZoPGCbE.d.ts} +3 -3
  41. package/dist/{index-KCB2q1-8.d.cts → index-OelCoOth.d.cts} +1 -1
  42. package/dist/{index-CLsvyTkh.d.ts → index-YcKz4aRS.d.ts} +1 -1
  43. package/dist/{index-CQd4bo3G.d.cts → index-oVyLLIEK.d.cts} +3 -3
  44. package/dist/{index-CsFIp7OO.d.ts → index-xykpq6Lz.d.ts} +1 -1
  45. package/dist/index.cjs +18237 -202
  46. package/dist/index.cjs.map +1 -1
  47. package/dist/index.d.cts +81 -21
  48. package/dist/index.d.ts +81 -21
  49. package/dist/index.mjs +18237 -201
  50. package/dist/index.mjs.map +1 -1
  51. package/dist/lane/index.cjs +70 -24
  52. package/dist/lane/index.cjs.map +1 -1
  53. package/dist/lane/index.mjs +70 -24
  54. package/dist/lane/index.mjs.map +1 -1
  55. package/dist/match/index.d.cts +4 -4
  56. package/dist/match/index.d.ts +4 -4
  57. package/dist/pem/index.d.cts +2 -2
  58. package/dist/pem/index.d.ts +2 -2
  59. package/dist/pilot/index.d.cts +2 -2
  60. package/dist/pilot/index.d.ts +2 -2
  61. package/dist/precheck/index.d.cts +2 -2
  62. package/dist/precheck/index.d.ts +2 -2
  63. package/dist/produce/index.cjs +6 -18
  64. package/dist/produce/index.cjs.map +1 -1
  65. package/dist/produce/index.d.cts +2 -2
  66. package/dist/produce/index.d.ts +2 -2
  67. package/dist/produce/index.mjs +6 -18
  68. package/dist/produce/index.mjs.map +1 -1
  69. package/dist/sigh/index.d.cts +2 -2
  70. package/dist/sigh/index.d.ts +2 -2
  71. package/package.json +1 -1
package/dist/index.d.cts CHANGED
@@ -1,18 +1,18 @@
1
- import { A as AppleSession } from './index-CMH_GpN9.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-CMH_GpN9.cjs';
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
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-CCs5irG7.cjs';
5
- export { i as sigh } from './index-Ce-WMV7c.cjs';
6
- export { i as match } from './index-CQd4bo3G.cjs';
7
- export { i as produce } from './index-KCB2q1-8.cjs';
8
- export { i as pilot } from './index-AD8QXY1T.cjs';
9
- export { i as deliver } from './index-CdYdwxpQ.cjs';
10
- export { i as pem } from './index-BWK-T2-S.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
11
  export { i as gym } from './index-DrUpRXRG.cjs';
12
12
  export { i as scan } from './index-BimqCmY8.cjs';
13
13
  export { i as snapshot } from './index-CR3BFPIz.cjs';
14
14
  export { i as trainer } from './index-BoU8qt8r.cjs';
15
- export { i as precheck } from './index-BW8wQUGC.cjs';
15
+ export { i as precheck } from './index-D13sn8DO.cjs';
16
16
  export { i as frameit } from './index-BYonklf3.cjs';
17
17
  export { i as xcode } from './index-Cp6cjtd-.cjs';
18
18
  export { i as core } from './index-C2yG3wXA.cjs';
@@ -20,29 +20,27 @@ export { LaneCallback, LaneDefinition, RunLaneOptions, RunResult, afterAll, afte
20
20
  export { L as LaneContext } from './context-CymLkfrS.cjs';
21
21
  export { ActionDefinition, action, ensureActionsRegistered, getAction, listActions, registerAction } from './actions/index.cjs';
22
22
  export { createCli } from './cli/index.cjs';
23
- import './cert-6m1R8UeW.cjs';
23
+ import './cert-FehieKeb.cjs';
24
24
  import 'commander';
25
25
 
26
26
  /**
27
27
  * One-click Apple Developer setup — given an authenticated portal session,
28
28
  * provisions everything needed to code-sign and upload iOS builds:
29
29
  *
30
- * • Bundle ID (created or reused)
30
+ * • Bundle ID (Developer Portal App ID, created or reused)
31
31
  * • Distribution certificate + RSA private key bundled into a .p12
32
32
  * • App Store provisioning profile
33
- * • Optional APNs Production push certificate (.p12)
34
- * • Optional APNs Sandbox push certificate (.p12)
33
+ * • App Store Connect API key (.p8) for TestFlight uploads
34
+ * • APNs Authentication Key (.p8) for push notifications
35
+ * • Push / Sign in with Apple capabilities on the bundle
36
+ * • App Store Connect app record (the "My Apps" entry uploads need)
37
+ * • Optional legacy APNs Production / Sandbox push certificates (.p12)
35
38
  * • Optional revocation of existing distribution certificates first
36
39
  * (used when the team is at the 3-cert distribution limit)
37
40
  *
38
41
  * Returns values shaped to match the `apple_credentials` form in the
39
42
  * App Release product so an HTTP route or the in-page wizard can pre-fill
40
43
  * the existing form fields.
41
- *
42
- * Three fields are intentionally left empty (asc_key_id, asc_issuer_id,
43
- * asc_api_key_base64) — the App Store Connect API key still needs to be
44
- * uploaded manually. Auto-creating ASC API keys via the iris admin API
45
- * is a separate stretch goal.
46
44
  */
47
45
 
48
46
  interface OneClickInventory {
@@ -54,6 +52,7 @@ interface OneClickInventory {
54
52
  appIdId: string;
55
53
  identifier: string;
56
54
  name: string;
55
+ capabilities?: string[];
57
56
  }[];
58
57
  /** Active distribution certs. Apple caps a team at 3. */
59
58
  distributionCerts: {
@@ -68,6 +67,16 @@ interface OneClickInventory {
68
67
  used: number;
69
68
  max: number;
70
69
  };
70
+ /** Active APNs Authentication Keys. Apple caps a team at 2. */
71
+ apnsAuthKeys: {
72
+ keyId: string;
73
+ keyName: string;
74
+ dateCreated?: string;
75
+ }[];
76
+ apnsKeyCapacity: {
77
+ used: number;
78
+ max: number;
79
+ };
71
80
  pushCerts: {
72
81
  certificateId: string;
73
82
  name: string;
@@ -98,20 +107,51 @@ interface OneClickOptions {
98
107
  /**
99
108
  * Generate an APNs Authentication Key (.p8) for push notifications.
100
109
  * Default true. ONE key per team works for ALL apps and never expires.
101
- * Created via the developer portal's `account/auth/key/v2/create`
102
- * endpoint, downloaded immediately via `account/auth/key/download`.
110
+ * The modern replacement for the legacy per-app .p12 push certs.
103
111
  *
104
112
  * Apple allows multiple APNs keys per team — the wizard always
105
113
  * creates a new one when this flag is set, regardless of what's
106
114
  * already in the team. Unrelated existing keys are not affected.
107
115
  */
108
116
  generateApnsAuthKey?: boolean;
117
+ /**
118
+ * Generate an APNs **Production** push certificate (.p12). Default
119
+ * false — the modern APNs Auth Key (.p8) above replaces this and is
120
+ * generally preferred. Only enable if a downstream integration
121
+ * specifically requires the legacy cert-based APNs path.
122
+ *
123
+ * Apple caps these at 1 per bundle per environment, so existing
124
+ * production push certs for the bundle are left alone (the wizard
125
+ * skips with a warning rather than revoking).
126
+ */
127
+ generatePushProductionCert?: boolean;
128
+ /**
129
+ * Generate an APNs **Sandbox** (development) push certificate (.p12).
130
+ * Default false. Same caveats as `generatePushProductionCert`.
131
+ */
132
+ generatePushSandboxCert?: boolean;
109
133
  /** Enable Sign in with Apple capability on the bundle ID. Default true. */
110
134
  enableSignInWithApple?: boolean;
111
135
  /** Enable Push Notifications capability on the bundle ID. Default true. */
112
136
  enablePushNotifications?: boolean;
137
+ /** Enable Apple Pay capability on the bundle ID. Default false. Required for Stripe. */
138
+ enableApplePay?: boolean;
139
+ /** Merchant ID to register for Apple Pay (e.g. "merchant.com.example.app"). Required when enableApplePay is true. */
140
+ merchantId?: string;
141
+ /**
142
+ * Create the App Store Connect **app record** (the "My Apps" entry that
143
+ * TestFlight and App Store uploads require). Default true. Distinct
144
+ * from registering the bundle id in the Developer Portal — you need
145
+ * both. Requires an ASC API key to be created (step 7) since the call
146
+ * goes through the JWT-authenticated REST API. Non-fatal — if the app
147
+ * record can't be created (or already exists), the orchestrator
148
+ * records a warning and continues.
149
+ */
150
+ createAscAppRecord?: boolean;
113
151
  /** Distribution cert IDs to revoke before creating the new one (for the 3-cert limit). */
114
152
  revokeCertIds?: string[];
153
+ /** APNs auth key IDs to revoke before creating the new one (Apple caps APNs keys at 2/team). */
154
+ revokeApnsKeyIds?: string[];
115
155
  }
116
156
  interface OneClickInput {
117
157
  session: AppleSession;
@@ -121,6 +161,18 @@ interface OneClickInput {
121
161
  options?: OneClickOptions;
122
162
  /** Defaults to a random 32-char password. Override for deterministic tests. */
123
163
  certPassword?: string;
164
+ /**
165
+ * SKU for the App Store Connect app record. Arbitrary unique string
166
+ * Apple uses internally. Defaults to `<bundle_identifier>.<timestamp>`
167
+ * which is good enough for most automated flows.
168
+ */
169
+ sku?: string;
170
+ /**
171
+ * Primary locale for the App Store Connect app record. Defaults to
172
+ * `en-US`. Changing this after creation requires a support ticket so
173
+ * err on the side of sensible defaults.
174
+ */
175
+ primaryLocale?: string;
124
176
  /**
125
177
  * Structured progress callback invoked at every step transition. The
126
178
  * wizard UI uses this to render a live list of "in progress / done /
@@ -165,6 +217,13 @@ interface OneClickResult {
165
217
  asc_key_id: string;
166
218
  asc_issuer_id: string;
167
219
  asc_api_key_base64: string;
220
+ /**
221
+ * App Store Connect app-record id, populated when the record was
222
+ * created fresh OR already existed and we reused it. Empty string
223
+ * when creation was skipped or failed — check `warnings` for the
224
+ * reason in that case.
225
+ */
226
+ asc_app_id: string;
168
227
  /** Additional certs to write to apple_credential_certs after credential is created. */
169
228
  additional_certs: AdditionalCertResult[];
170
229
  /** IDs of resources created (for debugging / rollback) */
@@ -175,6 +234,7 @@ interface OneClickResult {
175
234
  profileUuid?: string;
176
235
  apnsAuthKeyId?: string;
177
236
  ascApiKeyId?: string;
237
+ ascAppId?: string;
178
238
  revokedCertIds: string[];
179
239
  };
180
240
  /** Non-fatal issues — e.g. "used existing bundle id" */
package/dist/index.d.ts CHANGED
@@ -1,18 +1,18 @@
1
- import { A as AppleSession } from './index-D2z7RiAM.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-D2z7RiAM.js';
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
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-CQKpbHZt.js';
5
- export { i as sigh } from './index-CojSGJ7m.js';
6
- export { i as match } from './index-DZaPkUnC.js';
7
- export { i as produce } from './index-BpiEBPVd.js';
8
- export { i as pilot } from './index-D82CmjMP.js';
9
- export { i as deliver } from './index-CsFIp7OO.js';
10
- export { i as pem } from './index-Kq3rbG0u.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
11
  export { i as gym } from './index-DImN9PWc.js';
12
12
  export { i as scan } from './index-BimqCmY8.js';
13
13
  export { i as snapshot } from './index-CR3BFPIz.js';
14
14
  export { i as trainer } from './index-BoU8qt8r.js';
15
- export { i as precheck } from './index-CLsvyTkh.js';
15
+ export { i as precheck } from './index-YcKz4aRS.js';
16
16
  export { i as frameit } from './index-BYonklf3.js';
17
17
  export { i as xcode } from './index-Cp6cjtd-.js';
18
18
  export { i as core } from './index-C2yG3wXA.js';
@@ -20,29 +20,27 @@ export { LaneCallback, LaneDefinition, RunLaneOptions, RunResult, afterAll, afte
20
20
  export { L as LaneContext } from './context-CymLkfrS.js';
21
21
  export { ActionDefinition, action, ensureActionsRegistered, getAction, listActions, registerAction } from './actions/index.js';
22
22
  export { createCli } from './cli/index.js';
23
- import './cert-DtYDJBjG.js';
23
+ import './cert-Ddl7FpFT.js';
24
24
  import 'commander';
25
25
 
26
26
  /**
27
27
  * One-click Apple Developer setup — given an authenticated portal session,
28
28
  * provisions everything needed to code-sign and upload iOS builds:
29
29
  *
30
- * • Bundle ID (created or reused)
30
+ * • Bundle ID (Developer Portal App ID, created or reused)
31
31
  * • Distribution certificate + RSA private key bundled into a .p12
32
32
  * • App Store provisioning profile
33
- * • Optional APNs Production push certificate (.p12)
34
- * • Optional APNs Sandbox push certificate (.p12)
33
+ * • App Store Connect API key (.p8) for TestFlight uploads
34
+ * • APNs Authentication Key (.p8) for push notifications
35
+ * • Push / Sign in with Apple capabilities on the bundle
36
+ * • App Store Connect app record (the "My Apps" entry uploads need)
37
+ * • Optional legacy APNs Production / Sandbox push certificates (.p12)
35
38
  * • Optional revocation of existing distribution certificates first
36
39
  * (used when the team is at the 3-cert distribution limit)
37
40
  *
38
41
  * Returns values shaped to match the `apple_credentials` form in the
39
42
  * App Release product so an HTTP route or the in-page wizard can pre-fill
40
43
  * the existing form fields.
41
- *
42
- * Three fields are intentionally left empty (asc_key_id, asc_issuer_id,
43
- * asc_api_key_base64) — the App Store Connect API key still needs to be
44
- * uploaded manually. Auto-creating ASC API keys via the iris admin API
45
- * is a separate stretch goal.
46
44
  */
47
45
 
48
46
  interface OneClickInventory {
@@ -54,6 +52,7 @@ interface OneClickInventory {
54
52
  appIdId: string;
55
53
  identifier: string;
56
54
  name: string;
55
+ capabilities?: string[];
57
56
  }[];
58
57
  /** Active distribution certs. Apple caps a team at 3. */
59
58
  distributionCerts: {
@@ -68,6 +67,16 @@ interface OneClickInventory {
68
67
  used: number;
69
68
  max: number;
70
69
  };
70
+ /** Active APNs Authentication Keys. Apple caps a team at 2. */
71
+ apnsAuthKeys: {
72
+ keyId: string;
73
+ keyName: string;
74
+ dateCreated?: string;
75
+ }[];
76
+ apnsKeyCapacity: {
77
+ used: number;
78
+ max: number;
79
+ };
71
80
  pushCerts: {
72
81
  certificateId: string;
73
82
  name: string;
@@ -98,20 +107,51 @@ interface OneClickOptions {
98
107
  /**
99
108
  * Generate an APNs Authentication Key (.p8) for push notifications.
100
109
  * Default true. ONE key per team works for ALL apps and never expires.
101
- * Created via the developer portal's `account/auth/key/v2/create`
102
- * endpoint, downloaded immediately via `account/auth/key/download`.
110
+ * The modern replacement for the legacy per-app .p12 push certs.
103
111
  *
104
112
  * Apple allows multiple APNs keys per team — the wizard always
105
113
  * creates a new one when this flag is set, regardless of what's
106
114
  * already in the team. Unrelated existing keys are not affected.
107
115
  */
108
116
  generateApnsAuthKey?: boolean;
117
+ /**
118
+ * Generate an APNs **Production** push certificate (.p12). Default
119
+ * false — the modern APNs Auth Key (.p8) above replaces this and is
120
+ * generally preferred. Only enable if a downstream integration
121
+ * specifically requires the legacy cert-based APNs path.
122
+ *
123
+ * Apple caps these at 1 per bundle per environment, so existing
124
+ * production push certs for the bundle are left alone (the wizard
125
+ * skips with a warning rather than revoking).
126
+ */
127
+ generatePushProductionCert?: boolean;
128
+ /**
129
+ * Generate an APNs **Sandbox** (development) push certificate (.p12).
130
+ * Default false. Same caveats as `generatePushProductionCert`.
131
+ */
132
+ generatePushSandboxCert?: boolean;
109
133
  /** Enable Sign in with Apple capability on the bundle ID. Default true. */
110
134
  enableSignInWithApple?: boolean;
111
135
  /** Enable Push Notifications capability on the bundle ID. Default true. */
112
136
  enablePushNotifications?: boolean;
137
+ /** Enable Apple Pay capability on the bundle ID. Default false. Required for Stripe. */
138
+ enableApplePay?: boolean;
139
+ /** Merchant ID to register for Apple Pay (e.g. "merchant.com.example.app"). Required when enableApplePay is true. */
140
+ merchantId?: string;
141
+ /**
142
+ * Create the App Store Connect **app record** (the "My Apps" entry that
143
+ * TestFlight and App Store uploads require). Default true. Distinct
144
+ * from registering the bundle id in the Developer Portal — you need
145
+ * both. Requires an ASC API key to be created (step 7) since the call
146
+ * goes through the JWT-authenticated REST API. Non-fatal — if the app
147
+ * record can't be created (or already exists), the orchestrator
148
+ * records a warning and continues.
149
+ */
150
+ createAscAppRecord?: boolean;
113
151
  /** Distribution cert IDs to revoke before creating the new one (for the 3-cert limit). */
114
152
  revokeCertIds?: string[];
153
+ /** APNs auth key IDs to revoke before creating the new one (Apple caps APNs keys at 2/team). */
154
+ revokeApnsKeyIds?: string[];
115
155
  }
116
156
  interface OneClickInput {
117
157
  session: AppleSession;
@@ -121,6 +161,18 @@ interface OneClickInput {
121
161
  options?: OneClickOptions;
122
162
  /** Defaults to a random 32-char password. Override for deterministic tests. */
123
163
  certPassword?: string;
164
+ /**
165
+ * SKU for the App Store Connect app record. Arbitrary unique string
166
+ * Apple uses internally. Defaults to `<bundle_identifier>.<timestamp>`
167
+ * which is good enough for most automated flows.
168
+ */
169
+ sku?: string;
170
+ /**
171
+ * Primary locale for the App Store Connect app record. Defaults to
172
+ * `en-US`. Changing this after creation requires a support ticket so
173
+ * err on the side of sensible defaults.
174
+ */
175
+ primaryLocale?: string;
124
176
  /**
125
177
  * Structured progress callback invoked at every step transition. The
126
178
  * wizard UI uses this to render a live list of "in progress / done /
@@ -165,6 +217,13 @@ interface OneClickResult {
165
217
  asc_key_id: string;
166
218
  asc_issuer_id: string;
167
219
  asc_api_key_base64: string;
220
+ /**
221
+ * App Store Connect app-record id, populated when the record was
222
+ * created fresh OR already existed and we reused it. Empty string
223
+ * when creation was skipped or failed — check `warnings` for the
224
+ * reason in that case.
225
+ */
226
+ asc_app_id: string;
168
227
  /** Additional certs to write to apple_credential_certs after credential is created. */
169
228
  additional_certs: AdditionalCertResult[];
170
229
  /** IDs of resources created (for debugging / rollback) */
@@ -175,6 +234,7 @@ interface OneClickResult {
175
234
  profileUuid?: string;
176
235
  apnsAuthKeyId?: string;
177
236
  ascApiKeyId?: string;
237
+ ascAppId?: string;
178
238
  revokedCertIds: string[];
179
239
  };
180
240
  /** Non-fatal issues — e.g. "used existing bundle id" */