@hot-updater/plugin-core 1.2.0-rc.6 → 1.2.0-rc.60

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 (95) hide show
  1. package/dist/coreApi.d.cts +277 -10
  2. package/dist/coreApi.d.mts +277 -10
  3. package/dist/database/adapter.d.cts +24 -0
  4. package/dist/database/adapter.d.mts +24 -0
  5. package/dist/databaseRows.cjs +4 -2
  6. package/dist/databaseRows.mjs +4 -2
  7. package/dist/engine/core/schema.cjs +253 -6
  8. package/dist/engine/core/schema.d.cts +154 -1
  9. package/dist/engine/core/schema.d.mts +154 -1
  10. package/dist/engine/core/schema.mjs +252 -7
  11. package/dist/engine/createEngine.cjs +1 -2
  12. package/dist/engine/createEngine.d.cts +1 -6
  13. package/dist/engine/createEngine.d.mts +1 -6
  14. package/dist/engine/createEngine.mjs +1 -2
  15. package/dist/engine/database/aggregateBatching.cjs +87 -129
  16. package/dist/engine/database/aggregateBatching.mjs +87 -129
  17. package/dist/engine/database/database.cjs +1 -4
  18. package/dist/engine/database/database.mjs +1 -4
  19. package/dist/engine/database/engineTransaction.cjs +26 -2
  20. package/dist/engine/database/engineTransaction.d.cts +5 -1
  21. package/dist/engine/database/engineTransaction.d.mts +5 -1
  22. package/dist/engine/database/engineTransaction.mjs +26 -2
  23. package/dist/engine/database/fence.cjs +24 -2
  24. package/dist/engine/database/fence.d.cts +4 -1
  25. package/dist/engine/database/fence.d.mts +4 -1
  26. package/dist/engine/database/fence.mjs +24 -3
  27. package/dist/engine/database/kv/kvAdapter.cjs +80 -4
  28. package/dist/engine/database/kv/kvAdapter.mjs +80 -4
  29. package/dist/engine/database/resolveSchema.cjs +6 -3
  30. package/dist/engine/database/resolveSchema.mjs +6 -3
  31. package/dist/engine/database/sql/sqlAdapter.cjs +36 -12
  32. package/dist/engine/database/sql/sqlAdapter.mjs +37 -13
  33. package/dist/engine/database/sql/sqlSchema.cjs +24 -6
  34. package/dist/engine/database/sql/sqlSchema.d.cts +1 -1
  35. package/dist/engine/database/sql/sqlSchema.d.mts +1 -1
  36. package/dist/engine/database/sql/sqlSchema.mjs +24 -6
  37. package/dist/engine/db/coreDatabase.cjs +10 -5
  38. package/dist/engine/db/coreDatabase.d.cts +2 -1
  39. package/dist/engine/db/coreDatabase.d.mts +2 -1
  40. package/dist/engine/db/coreDatabase.mjs +10 -5
  41. package/dist/engine/db/engineMigrator.cjs +45 -17
  42. package/dist/engine/db/engineMigrator.mjs +46 -18
  43. package/dist/engine/db/engineSql.cjs +25 -0
  44. package/dist/engine/db/engineSql.d.cts +13 -1
  45. package/dist/engine/db/engineSql.d.mts +13 -1
  46. package/dist/engine/db/engineSql.mjs +26 -2
  47. package/dist/engine/db/engineSqlMigrator.cjs +60 -21
  48. package/dist/engine/db/engineSqlMigrator.d.cts +2 -0
  49. package/dist/engine/db/engineSqlMigrator.d.mts +2 -0
  50. package/dist/engine/db/engineSqlMigrator.mjs +62 -23
  51. package/dist/engine/db/schemaSettings.cjs +56 -5
  52. package/dist/engine/db/schemaSettings.d.cts +5 -2
  53. package/dist/engine/db/schemaSettings.d.mts +5 -2
  54. package/dist/engine/db/schemaSettings.mjs +55 -6
  55. package/dist/engine/db/settingsMigrator.cjs +113 -15
  56. package/dist/engine/db/settingsMigrator.d.cts +18 -8
  57. package/dist/engine/db/settingsMigrator.d.mts +18 -8
  58. package/dist/engine/db/settingsMigrator.mjs +111 -17
  59. package/dist/engine/db/sqlSchemaState.cjs +136 -0
  60. package/dist/engine/db/sqlSchemaState.mjs +131 -0
  61. package/dist/engine/db/types.d.cts +6 -0
  62. package/dist/engine/db/types.d.mts +6 -0
  63. package/dist/index.cjs +4 -8
  64. package/dist/index.d.cts +7 -8
  65. package/dist/index.d.mts +7 -8
  66. package/dist/index.mjs +5 -6
  67. package/dist/releaseCatalogCompiler.cjs +89 -7
  68. package/dist/releaseCatalogCompiler.d.cts +12 -1
  69. package/dist/releaseCatalogCompiler.d.mts +12 -1
  70. package/dist/releaseCatalogCompiler.mjs +89 -8
  71. package/dist/releaseCatalogMutation.d.cts +8 -2
  72. package/dist/releaseCatalogMutation.d.mts +8 -2
  73. package/dist/serverPlugin/coreReads.d.cts +10 -1
  74. package/dist/serverPlugin/coreReads.d.mts +10 -1
  75. package/dist/serverPlugin/definitions.d.cts +4 -0
  76. package/dist/serverPlugin/definitions.d.mts +4 -0
  77. package/dist/serverPlugin/schema.d.cts +4 -0
  78. package/dist/serverPlugin/schema.d.mts +4 -0
  79. package/dist/types/databaseConfig.d.cts +10 -20
  80. package/dist/types/databaseConfig.d.mts +10 -20
  81. package/dist/types/databaseRows.d.cts +77 -2
  82. package/dist/types/databaseRows.d.mts +77 -2
  83. package/dist/types/index.cjs +3 -0
  84. package/dist/types/index.d.cts +114 -56
  85. package/dist/types/index.d.mts +114 -56
  86. package/dist/types/index.mjs +3 -1
  87. package/dist/types/models.d.cts +9 -1
  88. package/dist/types/models.d.mts +9 -1
  89. package/dist/types/public.d.cts +3 -3
  90. package/dist/types/public.d.mts +3 -3
  91. package/package.json +3 -9
  92. package/dist/remoteBundleSigning.cjs +0 -357
  93. package/dist/remoteBundleSigning.d.cts +0 -38
  94. package/dist/remoteBundleSigning.d.mts +0 -38
  95. package/dist/remoteBundleSigning.mjs +0 -352
@@ -1,5 +1,5 @@
1
- import { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, NativeBuildArtifactKind, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.cjs";
2
- import { ChannelDeleteResult, NativeBuildDeleteResult } from "./types/models.cjs";
1
+ import { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, IosDeviceRow, IosDeviceStatus, NativeBuildArtifactKind, NativeBuildExportMethod, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.cjs";
2
+ import { ChannelDeleteResult, NativeBuildDeleteResult, NativeBuildMarkResult } from "./types/models.cjs";
3
3
  import { Bundle, Platform } from "./types/index.cjs";
4
4
  import { ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult } from "./releaseCatalogMutation.cjs";
5
5
  import { PromoteReleaseResult, ReleasePolicyPatch } from "./releaseManagement.cjs";
@@ -9,6 +9,8 @@ interface KeysetInput {
9
9
  readonly order?: "asc" | "desc";
10
10
  /** The last key a previous page returned. */
11
11
  readonly after?: string;
12
+ /** The last key this read may return: it ends with that key, if present. */
13
+ readonly through?: string;
12
14
  readonly limit: number;
13
15
  }
14
16
  /** A release list's filter: exactly the sets the release indexes serve. */
@@ -55,14 +57,39 @@ interface StoredBundleDeployment {
55
57
  readonly release: DeployReleasePolicy;
56
58
  }
57
59
  type Deployment = BundleDeployment | StoredBundleDeployment;
60
+ /**
61
+ * How a native build's artifact reaches a device: installed directly (an
62
+ * APK, a simulator `.app`, or an ad hoc, development or enterprise `.ipa`),
63
+ * or through a store (an AAB, or an App Store `.ipa`). Part of the core API
64
+ * a standalone server's client implements.
65
+ */
66
+ type NativeBuildDistribution = "direct" | "store";
67
+ /**
68
+ * What tells sandbox builds apart in place of the channel, which pull requests
69
+ * reuse a sandbox build across: the app ID its artifact reports (its bundle
70
+ * identifier or application ID, with Android's `.sandbox` suffix), the URL
71
+ * scheme its preview links open, its artifact's kind, and how that installs.
72
+ * Part of the core API a standalone server's client implements.
73
+ */
74
+ interface NativeBuildSandboxScope {
75
+ readonly appId: string;
76
+ readonly urlScheme: string;
77
+ readonly artifactKind: NativeBuildArtifactKind;
78
+ readonly distribution: NativeBuildDistribution;
79
+ }
58
80
  /**
59
81
  * A native build's scope: its platform, the default channel it compiled in,
60
82
  * and whichever of the fingerprint and the app version the update strategy
61
- * selects by.
83
+ * selects by. With `sandbox`, the scope of sandbox builds of that fingerprint
84
+ * or app version, on any channel: `channel` is then the one a new build would
85
+ * embed, and no lookup reads it. A registration ignores `sandbox`: its own
86
+ * `isSandbox`, `sandboxAppId`, `sandboxUrlScheme`, `exportMethod` and
87
+ * artifact decide its scope.
62
88
  */
63
89
  type NativeBuildScope = {
64
90
  readonly platform: Platform;
65
91
  readonly channel: string;
92
+ readonly sandbox?: NativeBuildSandboxScope | null;
66
93
  } & ({
67
94
  readonly fingerprintHash: string;
68
95
  readonly appVersion: null;
@@ -88,6 +115,35 @@ type NativeBuildRegistration = NativeBuildScope & {
88
115
  * `versionCode`, or null (or left out) when it can't be read.
89
116
  */
90
117
  readonly buildNumber?: string | null;
118
+ /**
119
+ * Whether the artifact is a sandbox build, as the artifact says; left out,
120
+ * it isn't. A sandbox build registers on any channel, and is found through
121
+ * its sandbox scope, never a normal one.
122
+ */
123
+ readonly isSandbox?: boolean;
124
+ /**
125
+ * The URL scheme a sandbox build's artifact registers, which its preview
126
+ * links open: required for a sandbox build, and null or left out for any
127
+ * other.
128
+ */
129
+ readonly sandboxUrlScheme?: string | null;
130
+ /**
131
+ * The app ID a sandbox build's artifact reports, its bundle identifier or
132
+ * application ID: required for a sandbox build, and null or left out for
133
+ * any other.
134
+ */
135
+ readonly sandboxAppId?: string | null;
136
+ /**
137
+ * How an `.ipa` was exported, read from its embedded profile; null or left
138
+ * out for any other artifact, or an `.ipa` whose profile wasn't read.
139
+ */
140
+ readonly exportMethod?: NativeBuildExportMethod | null;
141
+ /**
142
+ * The app version the artifact reports, its `CFBundleShortVersionString`
143
+ * or `versionName`, whatever the update strategy; null or left out when it
144
+ * wasn't read.
145
+ */
146
+ readonly nativeAppVersion?: string | null;
91
147
  readonly artifact: {
92
148
  readonly kind: NativeBuildArtifactKind;
93
149
  readonly storageUri: string;
@@ -104,6 +160,55 @@ type NativeBuildRegistration = NativeBuildScope & {
104
160
  readonly metadata?: DatabaseBundleMetadata;
105
161
  };
106
162
  };
163
+ /**
164
+ * What a build or `native-build devices add` learned from Apple about one
165
+ * registry row: Apple has it enabled (`registered`), refused to add it
166
+ * (`refused`), has it disabled (`disabled`), or no longer lists a device the
167
+ * row says it registered (`missing`).
168
+ */
169
+ type IosDeviceOutcome = "registered" | "refused" | "disabled" | "missing";
170
+ /** A device registry row's outcome at Apple, written only over the row the caller read. */
171
+ interface IosDeviceOutcomeInput {
172
+ readonly id: string;
173
+ /**
174
+ * The row as the caller read it before asking Apple: a row that changed
175
+ * since, such as one removed and requested again, is left alone.
176
+ */
177
+ readonly seen: {
178
+ readonly status: IosDeviceStatus;
179
+ readonly approvedAtMs: number | null;
180
+ };
181
+ /** The App Store Connect issuer of the key that asked Apple. */
182
+ readonly issuerId: string;
183
+ readonly outcome: IosDeviceOutcome;
184
+ /** Apple's words for `refused`, kept as the row's `apple_error`. */
185
+ readonly reason?: string;
186
+ }
187
+ /** The Apple account a device registry belongs to. */
188
+ interface IosDeviceAccount {
189
+ /** The App Store Connect issuer of the account. */
190
+ readonly issuerId: string;
191
+ }
192
+ /** The device registry's Apple account, after a build tried to claim it. */
193
+ interface IosDeviceAccountClaim {
194
+ /** The App Store Connect issuer the registry belongs to. */
195
+ readonly issuerId: string;
196
+ /** Whether that is the issuer that asked: false means another account's. */
197
+ readonly claimed: boolean;
198
+ }
199
+ /** A device request's row, and whether the request created it. */
200
+ interface IosDeviceRequestResult {
201
+ readonly device: IosDeviceRow;
202
+ /** False when the UDID was already in the registry, whose row is unchanged. */
203
+ readonly created: boolean;
204
+ }
205
+ /** What a release label fill labeled, or with `dryRun` would label. */
206
+ interface ReleaseLabelFill {
207
+ /** Releases that had no label. */
208
+ readonly releases: number;
209
+ /** Catalogs whose releases have labels they lack. */
210
+ readonly catalogs: number;
211
+ }
107
212
  interface ReleaseTarget {
108
213
  readonly releaseId: string;
109
214
  /** Refuses the change when the release is at another revision. */
@@ -136,23 +241,84 @@ interface HotUpdaterCoreApi {
136
241
  */
137
242
  findBaseBundleIds(candidateKey: string, bundleId: string, limit: number): Promise<string[]>;
138
243
  getRelease(id: string): Promise<ReleaseRow | null>;
244
+ /**
245
+ * The release a label names in a channel and platform, or null: one read
246
+ * of the label's unique index, and one of the release it names, which a
247
+ * key-value store's index copy may outlive.
248
+ */
249
+ getReleaseByLabel(input: {
250
+ readonly channel: string;
251
+ readonly platform: Platform;
252
+ readonly label: number;
253
+ }): Promise<ReleaseRow | null>;
139
254
  listReleases(input: KeysetInput & {
140
255
  readonly filter: ReleaseFilter;
141
256
  }): Promise<ReleaseRow[]>;
142
257
  getReleaseCatalogRow(scopeKey: string): Promise<ReleaseCatalogRow | null>;
143
258
  listReleaseCatalogs(input: KeysetInput): Promise<ReleaseCatalogRow[]>;
144
- listChannels(): Promise<ChannelRow[]>;
259
+ /**
260
+ * Up to `limit` scope keys that have releases, ascending after `after`,
261
+ * with or without a catalog row: one limit-1 seek per scope, so the reads
262
+ * grow with scopes, not with releases. Doctor walks them to find a scope
263
+ * whose catalog row was lost.
264
+ */
265
+ listReleaseScopeKeys(input: {
266
+ readonly after?: string;
267
+ readonly limit: number;
268
+ }): Promise<string[]>;
269
+ /**
270
+ * Every channel, by name. With `input`, one keyset page of them, whose
271
+ * cursor is the last channel's name.
272
+ */
273
+ listChannels(input?: KeysetInput): Promise<ChannelRow[]>;
274
+ /**
275
+ * The channels of these IDs, in their order, without the IDs no channel
276
+ * has: one batch read of their keys.
277
+ */
278
+ getChannels(ids: readonly string[]): Promise<ChannelRow[]>;
145
279
  findChannelByName(name: string): Promise<ChannelRow | null>;
146
280
  /** A native build by ID: one read of its key. */
147
281
  getNativeBuild(id: string): Promise<NativeBuildRow | null>;
148
282
  /**
149
- * The newest native build of a scope: one read of its index. With
150
- * `buildKey`, the newest of the scope registered with that native build
151
- * key, also one read.
283
+ * The native build whose built-in bundle is `bundleId`, the MIN_BUNDLE_ID
284
+ * it compiled in, or null: one read of its unique index.
285
+ */
286
+ findNativeBuildByBuiltInBundle(bundleId: string): Promise<NativeBuildRow | null>;
287
+ /**
288
+ * The newest native build of a scope: the one registered last, in one read
289
+ * of its index. With `buildKey`, the newest of the scope registered with that
290
+ * native build key, also one read. With `storeBuild`, the scope's marked
291
+ * build or null, also one read. With `builtInOlderThan`, the newest of the
292
+ * scope whose built-in bundle is older than that bundle: one read when the
293
+ * newest is, and then a page of 20 older builds per read until one is, when
294
+ * builds made after the bundle are in the way. It reads at most 5 such
295
+ * pages, and answers null when none of those 100 builds is older than the
296
+ * bundle, as when the scope has none. With `buildKey` too, only
297
+ * builds of that key. With `scope.sandbox`, sandbox builds on any channel;
298
+ * without it, never one. A sandbox build's built-in bundle is no patch
299
+ * base, so with `builtInOlderThan` a sandbox scope answers null without a
300
+ * read. With `artifactKind`, only a build of that kind, with any other
301
+ * option. Alone, it reads the scope's builds of that kind, so a newer
302
+ * `.app` doesn't hide the scope's `.ipa`: one read, and when that finds
303
+ * none, a second of the scope's newest, kept only when it is of the kind.
304
+ * A key-value store holds no index copy of this for a row written before
305
+ * it, so such a row is found only while it is its scope's newest.
152
306
  */
153
307
  findNativeBuild(scope: NativeBuildScope, options?: {
154
308
  readonly buildKey?: string;
309
+ readonly storeBuild?: true;
310
+ readonly builtInOlderThan?: string;
311
+ readonly artifactKind?: NativeBuildArtifactKind;
155
312
  }): Promise<NativeBuildRow | null>;
313
+ /**
314
+ * The newest build of the other install target of an iOS sandbox build's
315
+ * native code: its Simulator `.app` for a direct-install `.ipa`, or the
316
+ * reverse, of the same app ID, URL scheme and fingerprint or app version,
317
+ * on any channel. Null, with no read, for any other build, and for a store
318
+ * or store-marked build on either side. One read. The Console's build page
319
+ * offers it beside its install.
320
+ */
321
+ findNativeBuildSibling(build: NativeBuildRow): Promise<NativeBuildRow | null>;
156
322
  /**
157
323
  * One page of native builds, by ID: oldest or newest first. With
158
324
  * `channelId`, only the builds that embed that channel, also one read.
@@ -163,7 +329,9 @@ interface HotUpdaterCoreApi {
163
329
  /**
164
330
  * Writes each new bundle with its patches, and each release, with the next
165
331
  * catalog of each scope, in one transaction. A stored bundle's deployment
166
- * publishes a new release for it and writes no bundle.
332
+ * publishes a new release for it and writes no bundle. Like `updateBundle`,
333
+ * it refuses a patch from a sandbox build's built-in bundle: one read of
334
+ * each new bundle's patch base.
167
335
  */
168
336
  deploy(deployments: readonly Deployment[]): Promise<ReleaseCatalogMutationResult[]>;
169
337
  updateReleasePolicy(input: ReleaseTarget & {
@@ -181,12 +349,30 @@ interface HotUpdaterCoreApi {
181
349
  readonly action?: "copy" | "move";
182
350
  }): Promise<PromoteReleaseResult>;
183
351
  rebuildReleaseCatalog(scopeKey: string): Promise<ReleaseCatalogRebuildResult>;
352
+ /**
353
+ * Gives labels to the releases written before labels, or by a server of
354
+ * an earlier release, in the order they were created, per channel and
355
+ * platform; then, unless `catalogs` is false, rebuilds each catalog that
356
+ * differs from its releases only by their labels. With `dryRun`, it writes
357
+ * nothing and counts both. `hot-updater init` and `db migrate` run it.
358
+ * Reads: two per scope with releases and one per channel and platform,
359
+ * then each pending pair's releases, and for the catalog pass what a
360
+ * rebuild preflight reads per catalog.
361
+ */
362
+ fillReleaseLabels(input?: {
363
+ readonly dryRun?: boolean;
364
+ readonly catalogs?: boolean;
365
+ }): Promise<ReleaseLabelFill>;
184
366
  preflightReleaseCatalogRebuild(scopeKey: string): Promise<ReleaseCatalogRebuildPreflight>;
185
367
  /** The channel named `name`, created when missing. */
186
368
  ensureChannel(name: string): Promise<ChannelRow>;
187
369
  /** Deletes a channel no release uses. */
188
370
  deleteChannel(id: string): Promise<ChannelDeleteResult>;
189
- /** Changes a bundle's fields; `patches`, when given, replaces its patches. */
371
+ /**
372
+ * Changes a bundle's fields; `patches`, when given, replaces its patches.
373
+ * It refuses a new patch from a sandbox build's built-in bundle, which is
374
+ * no patch base: one read of each new patch's base.
375
+ */
190
376
  updateBundle(id: string, update: Partial<Omit<Bundle, "id" | "patches">> & {
191
377
  readonly patches?: Bundle["patches"];
192
378
  }): Promise<void>;
@@ -217,6 +403,87 @@ interface HotUpdaterCoreApi {
217
403
  * full bundles. Its artifact stays in storage for the caller to delete.
218
404
  */
219
405
  deleteNativeBuild(id: string): Promise<NativeBuildDeleteResult>;
406
+ /**
407
+ * Marks a build as what the store sells, replacing its scope's mark in one
408
+ * write, or clears the mark it holds. Running it again changes nothing. Null
409
+ * for an unknown ID. A sandbox build can't be marked.
410
+ */
411
+ markNativeBuild(id: string, mark: {
412
+ readonly storeBuild: boolean;
413
+ }): Promise<NativeBuildMarkResult | null>;
414
+ /**
415
+ * One page of the iOS device registry, by ID: oldest or newest first. With
416
+ * `status`, only the rows in it, also one read.
417
+ */
418
+ listIosDevices(input: KeysetInput & {
419
+ readonly status?: IosDeviceStatus;
420
+ }): Promise<IosDeviceRow[]>;
421
+ /** The registry's row of a UDID, in either case: one read. Null for none. */
422
+ findIosDevice(udid: string): Promise<IosDeviceRow | null>;
423
+ /**
424
+ * Adds a UDID to the registry as `pending`. A UDID already there keeps its
425
+ * row unchanged, so nobody takes over another person's request.
426
+ */
427
+ requestIosDevice(input: {
428
+ readonly udid: string;
429
+ readonly name: string;
430
+ /** Who asks, or null for the CLI. */
431
+ readonly requestedBy: string | null;
432
+ }): Promise<IosDeviceRequestResult>;
433
+ /**
434
+ * Approves a pending device, so the next ad hoc build registers it with
435
+ * Apple. A device past `pending` stays as it is. With `name`, renames it.
436
+ * Null for an unknown ID.
437
+ */
438
+ approveIosDevice(id: string, input: {
439
+ readonly name?: string;
440
+ /** Who approves: a Console email, or null for the CLI. */
441
+ readonly approvedBy: string | null;
442
+ }): Promise<IosDeviceRow | null>;
443
+ /** Renames a device in the registry, whatever its status. Null for an unknown ID. */
444
+ renameIosDevice(id: string, name: string): Promise<IosDeviceRow | null>;
445
+ /**
446
+ * Records what Apple said of a device, only over the row the caller read
447
+ * (`seen`) and only for the account that registered it: null, with nothing
448
+ * written, for a row that changed, is gone, or belongs to another issuer.
449
+ * It never creates a row.
450
+ */
451
+ recordIosDeviceOutcome(input: IosDeviceOutcomeInput): Promise<IosDeviceRow | null>;
452
+ /**
453
+ * Claims the device registry for an Apple account before a build records
454
+ * or sends anything at Apple: the first claim wins, atomically, and holds
455
+ * for good. A registry with no claim yet whose rows already name an account
456
+ * (any status) goes to the earliest of them, not to the caller. Answers the
457
+ * registry's account and whether it is `issuerId`'s; a build of another
458
+ * account registers nothing.
459
+ */
460
+ claimIosDeviceAccount(issuerId: string): Promise<IosDeviceAccountClaim>;
461
+ /**
462
+ * The Apple account the device registry belongs to, read without claiming
463
+ * it: the claimed account, or with no claim yet, the one
464
+ * `claimIosDeviceAccount` would give it, the earliest its rows name. Null
465
+ * while nothing names one, when the first claim takes it.
466
+ */
467
+ findIosDeviceAccount(): Promise<IosDeviceAccount | null>;
468
+ /**
469
+ * Records that a native build's .ipa lists these devices, one write per
470
+ * row: a row removed meanwhile is skipped.
471
+ */
472
+ markIosDevicesInBuild(input: {
473
+ readonly buildId: string;
474
+ readonly ids: readonly string[];
475
+ }): Promise<void>;
476
+ /**
477
+ * Deletes a device from the registry. Apple keeps it: a device enabled
478
+ * there stays in new ad hoc builds. With `only`, it deletes the row only
479
+ * while it still has that status and requester, read in the same
480
+ * transaction, such as a request its owner withdraws. Null, with nothing
481
+ * deleted, for an unknown ID or a row that no longer matches.
482
+ */
483
+ deleteIosDevice(id: string, only?: {
484
+ readonly status?: IosDeviceStatus;
485
+ readonly requestedBy?: string;
486
+ }): Promise<IosDeviceRow | null>;
220
487
  }
221
488
  //#endregion
222
- export { BundleDeployment, BundleDetail, DeployReleasePolicy, Deployment, HotUpdaterCoreApi, KeysetInput, NativeBuildRegistration, NativeBuildScope, ReleaseFilter, ReleaseTarget, StoredBundleDeployment };
489
+ export { BundleDeployment, BundleDetail, DeployReleasePolicy, Deployment, HotUpdaterCoreApi, IosDeviceAccount, IosDeviceAccountClaim, IosDeviceOutcome, IosDeviceOutcomeInput, IosDeviceRequestResult, KeysetInput, NativeBuildDistribution, NativeBuildRegistration, NativeBuildSandboxScope, NativeBuildScope, ReleaseFilter, ReleaseLabelFill, ReleaseTarget, StoredBundleDeployment };