@fungi.computer/puffball 0.0.0-stage → 0.0.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.
- package/LICENSE +21 -0
- package/README.md +443 -2
- package/dist/app-api.d.ts +7 -0
- package/dist/app-api.js +61 -0
- package/dist/app-backend-binding-vocabulary.d.ts +299 -0
- package/dist/app-backend-binding-vocabulary.js +257 -0
- package/dist/app-backend-bindings.d.ts +21 -0
- package/dist/app-backend-bindings.js +47 -0
- package/dist/app-declaration.d.ts +46 -0
- package/dist/app-declaration.js +115 -0
- package/dist/app-event-facts.d.ts +40 -0
- package/dist/app-event-facts.js +28 -0
- package/dist/app-method-context.d.ts +109 -0
- package/dist/app-method-context.js +9 -0
- package/dist/app-method-runtime.d.ts +86 -0
- package/dist/app-method-runtime.js +122 -0
- package/dist/app-origin-paths.d.ts +6 -0
- package/dist/app-origin-paths.js +6 -0
- package/dist/app-vocabulary.d.ts +189 -0
- package/dist/app-vocabulary.js +103 -0
- package/dist/app.d.ts +379 -0
- package/dist/app.js +71 -0
- package/dist/artifact-dispositions.d.ts +115 -0
- package/dist/artifact-dispositions.js +234 -0
- package/dist/assets.d.ts +54 -0
- package/dist/assets.js +89 -0
- package/dist/backend.d.ts +41 -0
- package/dist/backend.js +29 -0
- package/dist/background-replay.d.ts +115 -0
- package/dist/background-replay.js +175 -0
- package/dist/buyer-references.d.ts +69 -0
- package/dist/buyer-references.js +154 -0
- package/dist/cloudflare-assets.d.ts +48 -0
- package/dist/cloudflare-assets.js +105 -0
- package/dist/cloudflare.d.ts +254 -0
- package/dist/cloudflare.js +1619 -0
- package/dist/effect.d.ts +73 -0
- package/dist/effect.js +325 -0
- package/dist/git-representation.d.ts +13 -0
- package/dist/git-representation.js +16 -0
- package/dist/inbox.d.ts +132 -0
- package/dist/inbox.js +81 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +85 -0
- package/dist/internal/app-description.d.ts +14 -0
- package/dist/internal/app-description.js +98 -0
- package/dist/internal/app-release-artifact-reader.d.ts +26 -0
- package/dist/internal/app-release-artifact-reader.js +1 -0
- package/dist/internal/app-release-contract.d.ts +540 -0
- package/dist/internal/app-release-contract.js +169 -0
- package/dist/internal/app-release-schema.d.ts +1676 -0
- package/dist/internal/app-release-schema.js +386 -0
- package/dist/internal/app-release-store.d.ts +47 -0
- package/dist/internal/app-release-store.js +1 -0
- package/dist/internal/background-sync.d.ts +7 -0
- package/dist/internal/background-sync.js +10 -0
- package/dist/internal/deterministic-memory-app-release-store.d.ts +14 -0
- package/dist/internal/deterministic-memory-app-release-store.js +319 -0
- package/dist/internal/failure.d.ts +2 -0
- package/dist/internal/failure.js +9 -0
- package/dist/internal/immutable-release-material.d.ts +3 -0
- package/dist/internal/immutable-release-material.js +13 -0
- package/dist/internal/promise-app-release-store-adapter.d.ts +9 -0
- package/dist/internal/promise-app-release-store-adapter.js +65 -0
- package/dist/internal/promise-artifact-reader-adapter.d.ts +9 -0
- package/dist/internal/promise-artifact-reader-adapter.js +18 -0
- package/dist/internal/public-route-sql.d.ts +10 -0
- package/dist/internal/public-route-sql.js +239 -0
- package/dist/internal/public-website-authority.d.ts +338 -0
- package/dist/internal/public-website-authority.js +50 -0
- package/dist/internal/public-website-delivery.d.ts +59 -0
- package/dist/internal/public-website-delivery.js +232 -0
- package/dist/internal/public-website-fetch.d.ts +8 -0
- package/dist/internal/public-website-fetch.js +54 -0
- package/dist/internal/release-transition-material.d.ts +3 -0
- package/dist/internal/release-transition-material.js +11 -0
- package/dist/internal/verified-artifact-snapshot.d.ts +41 -0
- package/dist/internal/verified-artifact-snapshot.js +91 -0
- package/dist/public-route-moderation.d.ts +83 -0
- package/dist/public-route-moderation.js +236 -0
- package/dist/public-route-policy.d.ts +51 -0
- package/dist/public-route-policy.js +88 -0
- package/dist/public-routes.d.ts +34 -0
- package/dist/public-routes.js +136 -0
- package/dist/publisher.d.ts +61 -0
- package/dist/publisher.js +16 -0
- package/dist/safety-takedown.d.ts +56 -0
- package/dist/safety-takedown.js +146 -0
- package/dist/seller-closure-notice.d.ts +14 -0
- package/dist/seller-closure-notice.js +14 -0
- package/dist/seller-closure.d.ts +15 -0
- package/dist/seller-closure.js +31 -0
- package/dist/testing.d.ts +8 -0
- package/dist/testing.js +47 -0
- package/docs/api/README.md +26 -0
- package/docs/api/app-backend-binding-vocabulary.md +276 -0
- package/docs/api/app-backend-bindings.md +141 -0
- package/docs/api/app-event-facts.md +110 -0
- package/docs/api/app-method-context.md +166 -0
- package/docs/api/app-method-runtime.md +330 -0
- package/docs/api/backend.md +108 -0
- package/docs/api/background-replay.md +516 -0
- package/docs/api/cloudflare.md +1044 -0
- package/docs/api/effect.md +2429 -0
- package/docs/api/git-representation.md +56 -0
- package/docs/api/inbox.md +289 -0
- package/docs/api/index.md +2868 -0
- package/docs/api/publisher.md +147 -0
- package/docs/api/testing.md +31 -0
- package/package.json +158 -3
|
@@ -0,0 +1,1044 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/puffball**](README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/puffball](README.md) / cloudflare
|
|
8
|
+
|
|
9
|
+
# cloudflare
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### AssetR2Object
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type AssetR2Object = object;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Native R2 metadata: checksums are validated by R2, not custom metadata claims.
|
|
20
|
+
|
|
21
|
+
#### Properties
|
|
22
|
+
|
|
23
|
+
##### version
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
readonly version: string;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
##### size
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
readonly size: number;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
##### checksums
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
readonly checksums: object;
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
###### sha256?
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
readonly optional sha256?: ArrayBuffer;
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
### AssetR2Bucket
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
type AssetR2Bucket = object;
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Native R2 operations required to verify and serve one asset build.
|
|
56
|
+
|
|
57
|
+
#### Methods
|
|
58
|
+
|
|
59
|
+
##### head()
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
head(key): Promise<AssetR2Object | null>;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Read immutable object metadata without loading its body.
|
|
66
|
+
|
|
67
|
+
###### Parameters
|
|
68
|
+
|
|
69
|
+
| Parameter | Type |
|
|
70
|
+
| --------- | -------- |
|
|
71
|
+
| `key` | `string` |
|
|
72
|
+
|
|
73
|
+
###### Returns
|
|
74
|
+
|
|
75
|
+
`Promise`\<[`AssetR2Object`](#assetr2object) \| `null`\>
|
|
76
|
+
|
|
77
|
+
##### get()
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
get(key): Promise<AssetR2Object & object | null>;
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Read immutable object metadata and its streaming body.
|
|
84
|
+
|
|
85
|
+
###### Parameters
|
|
86
|
+
|
|
87
|
+
| Parameter | Type |
|
|
88
|
+
| --------- | -------- |
|
|
89
|
+
| `key` | `string` |
|
|
90
|
+
|
|
91
|
+
###### Returns
|
|
92
|
+
|
|
93
|
+
`Promise`\<[`AssetR2Object`](#assetr2object) & `object` \| `null`\>
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
### AppReleaseTransitionObligation
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
type AppReleaseTransitionObligation = object;
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Durable catalog-scoped fact awaiting delivery to a separately owned Team.
|
|
104
|
+
|
|
105
|
+
#### Properties
|
|
106
|
+
|
|
107
|
+
##### sequence
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
readonly sequence: number;
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
##### transition
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
readonly transition: ReleaseTransition;
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
##### transitionId
|
|
120
|
+
|
|
121
|
+
```ts
|
|
122
|
+
readonly transitionId: AppTransitionId;
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
##### affectedPublicSurfaceIds
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
readonly affectedPublicSurfaceIds: readonly PublicSurfaceId[];
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
##### affectedSurfaces
|
|
132
|
+
|
|
133
|
+
```ts
|
|
134
|
+
readonly affectedSurfaces: readonly AppReleaseAffectedSurface[];
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Catalog-owned material needed by a Team without a second catalog read.
|
|
138
|
+
|
|
139
|
+
##### affectedBuyerApps
|
|
140
|
+
|
|
141
|
+
```ts
|
|
142
|
+
readonly affectedBuyerApps: readonly AppId[];
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
##### enumeration
|
|
146
|
+
|
|
147
|
+
```ts
|
|
148
|
+
readonly enumeration: object;
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
The last opaque Global Team cursor and whether enumeration is complete.
|
|
152
|
+
|
|
153
|
+
###### cursor
|
|
154
|
+
|
|
155
|
+
```ts
|
|
156
|
+
readonly cursor: string | null;
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
###### complete
|
|
160
|
+
|
|
161
|
+
```ts
|
|
162
|
+
readonly complete: boolean;
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
##### state
|
|
166
|
+
|
|
167
|
+
```ts
|
|
168
|
+
readonly state: "pending" | "acknowledged";
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
### AppReleaseAffectedSurface
|
|
174
|
+
|
|
175
|
+
```ts
|
|
176
|
+
type AppReleaseAffectedSurface = object;
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Catalog-owned public-Surface material carried with a transition obligation.
|
|
180
|
+
|
|
181
|
+
#### Properties
|
|
182
|
+
|
|
183
|
+
##### publicSurfaceId
|
|
184
|
+
|
|
185
|
+
```ts
|
|
186
|
+
readonly publicSurfaceId: PublicSurfaceId;
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
##### appId
|
|
190
|
+
|
|
191
|
+
```ts
|
|
192
|
+
readonly appId: AppId;
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
##### stableRoute
|
|
196
|
+
|
|
197
|
+
```ts
|
|
198
|
+
readonly stableRoute: StableRoute;
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
### AppReleaseTeamRecipient
|
|
204
|
+
|
|
205
|
+
```ts
|
|
206
|
+
type AppReleaseTeamRecipient = object;
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Durable delivery state for one Team recipient of a transition obligation.
|
|
210
|
+
|
|
211
|
+
#### Properties
|
|
212
|
+
|
|
213
|
+
##### teamId
|
|
214
|
+
|
|
215
|
+
```ts
|
|
216
|
+
readonly teamId: string;
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
##### state
|
|
220
|
+
|
|
221
|
+
```ts
|
|
222
|
+
readonly state: "pending" | "applied" | "no-op" | "expired";
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
### AppReleaseTeamRecipientPage
|
|
228
|
+
|
|
229
|
+
```ts
|
|
230
|
+
type AppReleaseTeamRecipientPage = object;
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
One ordered page of Team IDs returned by the separately owned Team directory.
|
|
234
|
+
|
|
235
|
+
#### Properties
|
|
236
|
+
|
|
237
|
+
##### cursor?
|
|
238
|
+
|
|
239
|
+
```ts
|
|
240
|
+
readonly optional cursor?: string | null;
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Null identifies the first page; all later cursors remain opaque strings.
|
|
244
|
+
|
|
245
|
+
##### nextCursor?
|
|
246
|
+
|
|
247
|
+
```ts
|
|
248
|
+
readonly optional nextCursor?: string | null;
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
##### teamIds
|
|
252
|
+
|
|
253
|
+
```ts
|
|
254
|
+
readonly teamIds: readonly string[];
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
##### complete
|
|
258
|
+
|
|
259
|
+
```ts
|
|
260
|
+
readonly complete: boolean;
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
### AppReleaseTeamRecipientOutcome
|
|
266
|
+
|
|
267
|
+
```ts
|
|
268
|
+
type AppReleaseTeamRecipientOutcome = "applied" | "no-op" | "expired";
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Terminal delivery outcome recorded for one Team recipient.
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
### AppReleaseTransitionObligationStore
|
|
276
|
+
|
|
277
|
+
```ts
|
|
278
|
+
type AppReleaseTransitionObligationStore = object;
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
D1-only at-least-once read/ack seam; Team routing remains outside App Release.
|
|
282
|
+
|
|
283
|
+
#### Methods
|
|
284
|
+
|
|
285
|
+
##### readByTransitionId()
|
|
286
|
+
|
|
287
|
+
```ts
|
|
288
|
+
readByTransitionId(transitionId): Promise<AppReleaseStoreResult<
|
|
289
|
+
| AppReleaseTransitionObligation
|
|
290
|
+
| {
|
|
291
|
+
kind: "absent";
|
|
292
|
+
}>>;
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
Read one obligation by its immutable transition identity, or report it absent.
|
|
296
|
+
|
|
297
|
+
###### Parameters
|
|
298
|
+
|
|
299
|
+
| Parameter | Type |
|
|
300
|
+
| -------------- | --------------------------------------------- |
|
|
301
|
+
| `transitionId` | [`AppTransitionId`](index.md#apptransitionid) |
|
|
302
|
+
|
|
303
|
+
###### Returns
|
|
304
|
+
|
|
305
|
+
`Promise`\<[`AppReleaseStoreResult`](index.md#appreleasestoreresult)\< \|
|
|
306
|
+
[`AppReleaseTransitionObligation`](#appreleasetransitionobligation) \| \{
|
|
307
|
+
`kind`: `"absent"`; \}\>\>
|
|
308
|
+
|
|
309
|
+
##### read()
|
|
310
|
+
|
|
311
|
+
```ts
|
|
312
|
+
read(options): Promise<AppReleaseStoreResult<readonly AppReleaseTransitionObligation[]>>;
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Read pending obligations after a sequence cursor in ascending sequence order.
|
|
316
|
+
|
|
317
|
+
###### Parameters
|
|
318
|
+
|
|
319
|
+
| Parameter | Type |
|
|
320
|
+
| ------------------------ | ----------------------------------------------------- |
|
|
321
|
+
| `options` | \{ `afterSequence?`: `number`; `limit?`: `number`; \} |
|
|
322
|
+
| `options.afterSequence?` | `number` |
|
|
323
|
+
| `options.limit?` | `number` |
|
|
324
|
+
|
|
325
|
+
###### Returns
|
|
326
|
+
|
|
327
|
+
`Promise`\<[`AppReleaseStoreResult`](index.md#appreleasestoreresult)\<readonly
|
|
328
|
+
[`AppReleaseTransitionObligation`](#appreleasetransitionobligation)[]\>\>
|
|
329
|
+
|
|
330
|
+
##### recordTeamRecipientPage()
|
|
331
|
+
|
|
332
|
+
```ts
|
|
333
|
+
recordTeamRecipientPage(sequence, page): Promise<AppReleaseStoreResult<
|
|
334
|
+
| AppReleaseTransitionObligation
|
|
335
|
+
| {
|
|
336
|
+
kind: "absent";
|
|
337
|
+
}>>;
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
Persist the next ordered Team-recipient page; identical replays are idempotent.
|
|
341
|
+
|
|
342
|
+
###### Parameters
|
|
343
|
+
|
|
344
|
+
| Parameter | Type |
|
|
345
|
+
| ---------- | ------------------------------------------------------------- |
|
|
346
|
+
| `sequence` | `number` |
|
|
347
|
+
| `page` | [`AppReleaseTeamRecipientPage`](#appreleaseteamrecipientpage) |
|
|
348
|
+
|
|
349
|
+
###### Returns
|
|
350
|
+
|
|
351
|
+
`Promise`\<[`AppReleaseStoreResult`](index.md#appreleasestoreresult)\< \|
|
|
352
|
+
[`AppReleaseTransitionObligation`](#appreleasetransitionobligation) \| \{
|
|
353
|
+
`kind`: `"absent"`; \}\>\>
|
|
354
|
+
|
|
355
|
+
##### readPendingTeamRecipients()
|
|
356
|
+
|
|
357
|
+
```ts
|
|
358
|
+
readPendingTeamRecipients(options): Promise<AppReleaseStoreResult<readonly AppReleaseTeamRecipient[]>>;
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
Read pending recipients for one obligation in stable Team-ID order.
|
|
362
|
+
|
|
363
|
+
###### Parameters
|
|
364
|
+
|
|
365
|
+
| Parameter | Type |
|
|
366
|
+
| ------------------ | ----------------------------------------------- |
|
|
367
|
+
| `options` | \{ `sequence`: `number`; `limit?`: `number`; \} |
|
|
368
|
+
| `options.sequence` | `number` |
|
|
369
|
+
| `options.limit?` | `number` |
|
|
370
|
+
|
|
371
|
+
###### Returns
|
|
372
|
+
|
|
373
|
+
`Promise`\<[`AppReleaseStoreResult`](index.md#appreleasestoreresult)\<readonly
|
|
374
|
+
[`AppReleaseTeamRecipient`](#appreleaseteamrecipient)[]\>\>
|
|
375
|
+
|
|
376
|
+
##### recordTeamRecipientOutcome()
|
|
377
|
+
|
|
378
|
+
```ts
|
|
379
|
+
recordTeamRecipientOutcome(
|
|
380
|
+
sequence,
|
|
381
|
+
teamId,
|
|
382
|
+
outcome
|
|
383
|
+
): Promise<AppReleaseStoreResult<
|
|
384
|
+
| AppReleaseTeamRecipient
|
|
385
|
+
| {
|
|
386
|
+
kind: "absent";
|
|
387
|
+
}>>;
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
Record a pending recipient's terminal outcome; conflicting replays fail.
|
|
391
|
+
|
|
392
|
+
###### Parameters
|
|
393
|
+
|
|
394
|
+
| Parameter | Type |
|
|
395
|
+
| ---------- | ------------------------------------------------------------------- |
|
|
396
|
+
| `sequence` | `number` |
|
|
397
|
+
| `teamId` | `string` |
|
|
398
|
+
| `outcome` | [`AppReleaseTeamRecipientOutcome`](#appreleaseteamrecipientoutcome) |
|
|
399
|
+
|
|
400
|
+
###### Returns
|
|
401
|
+
|
|
402
|
+
`Promise`\<[`AppReleaseStoreResult`](index.md#appreleasestoreresult)\< \|
|
|
403
|
+
[`AppReleaseTeamRecipient`](#appreleaseteamrecipient) \| \{ `kind`: `"absent"`;
|
|
404
|
+
\}\>\>
|
|
405
|
+
|
|
406
|
+
##### acknowledge()
|
|
407
|
+
|
|
408
|
+
```ts
|
|
409
|
+
acknowledge(sequence): Promise<AppReleaseStoreResult<
|
|
410
|
+
| AppReleaseTransitionObligation
|
|
411
|
+
| {
|
|
412
|
+
kind: "absent";
|
|
413
|
+
}>>;
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
Acknowledge only after enumeration is complete and no recipients remain pending.
|
|
417
|
+
|
|
418
|
+
###### Parameters
|
|
419
|
+
|
|
420
|
+
| Parameter | Type |
|
|
421
|
+
| ---------- | -------- |
|
|
422
|
+
| `sequence` | `number` |
|
|
423
|
+
|
|
424
|
+
###### Returns
|
|
425
|
+
|
|
426
|
+
`Promise`\<[`AppReleaseStoreResult`](index.md#appreleasestoreresult)\< \|
|
|
427
|
+
[`AppReleaseTransitionObligation`](#appreleasetransitionobligation) \| \{
|
|
428
|
+
`kind`: `"absent"`; \}\>\>
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
432
|
+
### AppReleaseSurfaceTransitionBasis
|
|
433
|
+
|
|
434
|
+
```ts
|
|
435
|
+
type AppReleaseSurfaceTransitionBasis =
|
|
436
|
+
| {
|
|
437
|
+
kind: "absent";
|
|
438
|
+
}
|
|
439
|
+
| {
|
|
440
|
+
kind: "ambiguous";
|
|
441
|
+
}
|
|
442
|
+
| {
|
|
443
|
+
kind: "none";
|
|
444
|
+
appId: AppId;
|
|
445
|
+
publicSurfaceId: PublicSurfaceId;
|
|
446
|
+
}
|
|
447
|
+
| {
|
|
448
|
+
kind: "selected";
|
|
449
|
+
appId: AppId;
|
|
450
|
+
publicSurfaceId: PublicSurfaceId;
|
|
451
|
+
releaseId: ReleaseId;
|
|
452
|
+
sequence: number;
|
|
453
|
+
eligibility: "eligible" | "ineligible";
|
|
454
|
+
checkedAt: number;
|
|
455
|
+
};
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
Selected Release basis from the same D1 authority snapshot, including its
|
|
459
|
+
transition sequence.
|
|
460
|
+
|
|
461
|
+
#### Union Members
|
|
462
|
+
|
|
463
|
+
##### Type Literal
|
|
464
|
+
|
|
465
|
+
```ts
|
|
466
|
+
{
|
|
467
|
+
kind: "absent";
|
|
468
|
+
}
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
##### Type Literal
|
|
474
|
+
|
|
475
|
+
```ts
|
|
476
|
+
{
|
|
477
|
+
kind: "ambiguous";
|
|
478
|
+
}
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
---
|
|
482
|
+
|
|
483
|
+
##### Type Literal
|
|
484
|
+
|
|
485
|
+
```ts
|
|
486
|
+
{
|
|
487
|
+
kind: "none";
|
|
488
|
+
appId: AppId;
|
|
489
|
+
publicSurfaceId: PublicSurfaceId;
|
|
490
|
+
}
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
---
|
|
494
|
+
|
|
495
|
+
##### Type Literal
|
|
496
|
+
|
|
497
|
+
```ts
|
|
498
|
+
{
|
|
499
|
+
kind: "selected";
|
|
500
|
+
appId: AppId;
|
|
501
|
+
publicSurfaceId: PublicSurfaceId;
|
|
502
|
+
releaseId: ReleaseId;
|
|
503
|
+
sequence: number;
|
|
504
|
+
eligibility: "eligible" | "ineligible";
|
|
505
|
+
checkedAt: number;
|
|
506
|
+
}
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
| Name | Type | Description |
|
|
510
|
+
| ----------------- | --------------------------------------------- | ------------------------------------------------------------------ |
|
|
511
|
+
| `kind` | `"selected"` | - |
|
|
512
|
+
| `appId` | [`AppId`](index.md#appid) | - |
|
|
513
|
+
| `publicSurfaceId` | [`PublicSurfaceId`](index.md#publicsurfaceid) | - |
|
|
514
|
+
| `releaseId` | [`ReleaseId`](index.md#releaseid) | - |
|
|
515
|
+
| `sequence` | `number` | - |
|
|
516
|
+
| `eligibility` | `"eligible"` \| `"ineligible"` | - |
|
|
517
|
+
| `checkedAt` | `number` | Authority-read start time; consumers may only shorten its horizon. |
|
|
518
|
+
|
|
519
|
+
---
|
|
520
|
+
|
|
521
|
+
### AppReleaseD1QueryResult
|
|
522
|
+
|
|
523
|
+
```ts
|
|
524
|
+
type AppReleaseD1QueryResult = object;
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
Structural result returned by the D1 operations used by App Release.
|
|
528
|
+
|
|
529
|
+
#### Properties
|
|
530
|
+
|
|
531
|
+
##### success
|
|
532
|
+
|
|
533
|
+
```ts
|
|
534
|
+
readonly success: boolean;
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
Whether D1 completed the operation successfully.
|
|
538
|
+
|
|
539
|
+
##### results
|
|
540
|
+
|
|
541
|
+
```ts
|
|
542
|
+
readonly results: readonly unknown[];
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
Untrusted row values returned by the operation.
|
|
546
|
+
|
|
547
|
+
---
|
|
548
|
+
|
|
549
|
+
### AppReleaseD1PreparedStatement
|
|
550
|
+
|
|
551
|
+
```ts
|
|
552
|
+
type AppReleaseD1PreparedStatement = object;
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
Structural prepared-statement surface needed by the D1-backed store.
|
|
556
|
+
|
|
557
|
+
#### Methods
|
|
558
|
+
|
|
559
|
+
##### bind()
|
|
560
|
+
|
|
561
|
+
```ts
|
|
562
|
+
bind(...values): AppReleaseD1PreparedStatement;
|
|
563
|
+
```
|
|
564
|
+
|
|
565
|
+
Bind positional values and return the statement to execute.
|
|
566
|
+
|
|
567
|
+
###### Parameters
|
|
568
|
+
|
|
569
|
+
| Parameter | Type |
|
|
570
|
+
| ----------- | ----------- |
|
|
571
|
+
| ...`values` | `unknown`[] |
|
|
572
|
+
|
|
573
|
+
###### Returns
|
|
574
|
+
|
|
575
|
+
[`AppReleaseD1PreparedStatement`](#appreleased1preparedstatement)
|
|
576
|
+
|
|
577
|
+
##### first()
|
|
578
|
+
|
|
579
|
+
```ts
|
|
580
|
+
first(): Promise<object | null>;
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
Read the first untrusted row, or `null` when none exists.
|
|
584
|
+
|
|
585
|
+
###### Returns
|
|
586
|
+
|
|
587
|
+
`Promise`\<`object` \| `null`\>
|
|
588
|
+
|
|
589
|
+
##### all()
|
|
590
|
+
|
|
591
|
+
```ts
|
|
592
|
+
all(): Promise<AppReleaseD1QueryResult>;
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
Read all matching rows.
|
|
596
|
+
|
|
597
|
+
###### Returns
|
|
598
|
+
|
|
599
|
+
`Promise`\<[`AppReleaseD1QueryResult`](#appreleased1queryresult)\>
|
|
600
|
+
|
|
601
|
+
##### run()
|
|
602
|
+
|
|
603
|
+
```ts
|
|
604
|
+
run(): Promise<AppReleaseD1QueryResult>;
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
Execute a mutating statement.
|
|
608
|
+
|
|
609
|
+
###### Returns
|
|
610
|
+
|
|
611
|
+
`Promise`\<[`AppReleaseD1QueryResult`](#appreleased1queryresult)\>
|
|
612
|
+
|
|
613
|
+
---
|
|
614
|
+
|
|
615
|
+
### AppReleaseD1Database
|
|
616
|
+
|
|
617
|
+
```ts
|
|
618
|
+
type AppReleaseD1Database = object;
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
Structural D1 surface kept independent of Cloudflare vendor declarations.
|
|
622
|
+
|
|
623
|
+
#### Methods
|
|
624
|
+
|
|
625
|
+
##### prepare()
|
|
626
|
+
|
|
627
|
+
```ts
|
|
628
|
+
prepare(query): AppReleaseD1PreparedStatement;
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
Prepare one SQL statement for binding and execution.
|
|
632
|
+
|
|
633
|
+
###### Parameters
|
|
634
|
+
|
|
635
|
+
| Parameter | Type |
|
|
636
|
+
| --------- | -------- |
|
|
637
|
+
| `query` | `string` |
|
|
638
|
+
|
|
639
|
+
###### Returns
|
|
640
|
+
|
|
641
|
+
[`AppReleaseD1PreparedStatement`](#appreleased1preparedstatement)
|
|
642
|
+
|
|
643
|
+
##### batch()
|
|
644
|
+
|
|
645
|
+
```ts
|
|
646
|
+
batch(statements): Promise<readonly AppReleaseD1QueryResult[]>;
|
|
647
|
+
```
|
|
648
|
+
|
|
649
|
+
Execute a group of statements atomically in native D1.
|
|
650
|
+
|
|
651
|
+
###### Parameters
|
|
652
|
+
|
|
653
|
+
| Parameter | Type |
|
|
654
|
+
| ------------ | ---------------------------------------------------------------------------- |
|
|
655
|
+
| `statements` | readonly [`AppReleaseD1PreparedStatement`](#appreleased1preparedstatement)[] |
|
|
656
|
+
|
|
657
|
+
###### Returns
|
|
658
|
+
|
|
659
|
+
`Promise`\<readonly [`AppReleaseD1QueryResult`](#appreleased1queryresult)[]\>
|
|
660
|
+
|
|
661
|
+
---
|
|
662
|
+
|
|
663
|
+
### AppReleaseR2Object
|
|
664
|
+
|
|
665
|
+
```ts
|
|
666
|
+
type AppReleaseR2Object = object;
|
|
667
|
+
```
|
|
668
|
+
|
|
669
|
+
Structural R2 object surface needed by the artifact reader.
|
|
670
|
+
|
|
671
|
+
#### Properties
|
|
672
|
+
|
|
673
|
+
##### version
|
|
674
|
+
|
|
675
|
+
```ts
|
|
676
|
+
readonly version: string;
|
|
677
|
+
```
|
|
678
|
+
|
|
679
|
+
Native immutable object version checked for referenced App children.
|
|
680
|
+
|
|
681
|
+
##### size
|
|
682
|
+
|
|
683
|
+
```ts
|
|
684
|
+
readonly size: number;
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
Object size in bytes, checked before the body is buffered.
|
|
688
|
+
|
|
689
|
+
##### httpMetadata?
|
|
690
|
+
|
|
691
|
+
```ts
|
|
692
|
+
readonly optional httpMetadata?: object;
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
HTTP metadata retained with the object, when present.
|
|
696
|
+
|
|
697
|
+
###### contentType?
|
|
698
|
+
|
|
699
|
+
```ts
|
|
700
|
+
readonly optional contentType?: string;
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
Declared media type for the stored object.
|
|
704
|
+
|
|
705
|
+
#### Methods
|
|
706
|
+
|
|
707
|
+
##### arrayBuffer()
|
|
708
|
+
|
|
709
|
+
```ts
|
|
710
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
Read the immutable object body.
|
|
714
|
+
|
|
715
|
+
###### Returns
|
|
716
|
+
|
|
717
|
+
`Promise`\<`ArrayBuffer`\>
|
|
718
|
+
|
|
719
|
+
---
|
|
720
|
+
|
|
721
|
+
### AppReleaseR2Bucket
|
|
722
|
+
|
|
723
|
+
```ts
|
|
724
|
+
type AppReleaseR2Bucket = object;
|
|
725
|
+
```
|
|
726
|
+
|
|
727
|
+
Structural R2 surface kept independent of Cloudflare vendor declarations.
|
|
728
|
+
|
|
729
|
+
#### Methods
|
|
730
|
+
|
|
731
|
+
##### get()
|
|
732
|
+
|
|
733
|
+
```ts
|
|
734
|
+
get(key): Promise<AppReleaseR2Object | null>;
|
|
735
|
+
```
|
|
736
|
+
|
|
737
|
+
Read one object by its opaque storage key.
|
|
738
|
+
|
|
739
|
+
###### Parameters
|
|
740
|
+
|
|
741
|
+
| Parameter | Type |
|
|
742
|
+
| --------- | -------- |
|
|
743
|
+
| `key` | `string` |
|
|
744
|
+
|
|
745
|
+
###### Returns
|
|
746
|
+
|
|
747
|
+
`Promise`\<[`AppReleaseR2Object`](#appreleaser2object) \| `null`\>
|
|
748
|
+
|
|
749
|
+
---
|
|
750
|
+
|
|
751
|
+
### ErasureBucket
|
|
752
|
+
|
|
753
|
+
```ts
|
|
754
|
+
type ErasureBucket = AppReleaseR2Bucket & object;
|
|
755
|
+
```
|
|
756
|
+
|
|
757
|
+
R2 operations used by the scoped Team erasure owner.
|
|
758
|
+
|
|
759
|
+
#### Type Declaration
|
|
760
|
+
|
|
761
|
+
| Name | Type | Description |
|
|
762
|
+
| ---------- | ------------------------------------------ | ---------------------------------------------------------------- |
|
|
763
|
+
| `head()` | (`key`) => `Promise`\<`object` \| `null`\> | Read the metadata for an exact object key. |
|
|
764
|
+
| `delete()` | (`key`) => `Promise`\<`void`\> | Delete an exact object key after catalog references are checked. |
|
|
765
|
+
|
|
766
|
+
---
|
|
767
|
+
|
|
768
|
+
### ArtifactSnapshotPolicy
|
|
769
|
+
|
|
770
|
+
```ts
|
|
771
|
+
type ArtifactSnapshotPolicy = Readonly<{
|
|
772
|
+
maxBytes: number;
|
|
773
|
+
maxManifestBytes?: number;
|
|
774
|
+
}>;
|
|
775
|
+
```
|
|
776
|
+
|
|
777
|
+
Trusted composition limit for reading one immutable artifact.
|
|
778
|
+
|
|
779
|
+
## Variables
|
|
780
|
+
|
|
781
|
+
### appArtifactErasureReadbackSchema
|
|
782
|
+
|
|
783
|
+
```ts
|
|
784
|
+
const appArtifactErasureReadbackSchema: Struct<{
|
|
785
|
+
clear: Boolean;
|
|
786
|
+
personalClear: Boolean;
|
|
787
|
+
retainedArtifacts: $Array<
|
|
788
|
+
Struct<{
|
|
789
|
+
disposition_id: String;
|
|
790
|
+
app_id: refine<AppId, String>;
|
|
791
|
+
release_ids_json: String;
|
|
792
|
+
artifact_roots_json: String;
|
|
793
|
+
created_at: Number;
|
|
794
|
+
state: Literals<
|
|
795
|
+
readonly ["pending", "retaining", "retained", "revoking", "revoked"]
|
|
796
|
+
>;
|
|
797
|
+
request_id: NullOr<String>;
|
|
798
|
+
reason: NullOr<String>;
|
|
799
|
+
completed_at: NullOr<Number>;
|
|
800
|
+
releaseIds: $Array<refine<ReleaseId, String>>;
|
|
801
|
+
}>
|
|
802
|
+
>;
|
|
803
|
+
remaining: $Array<String>;
|
|
804
|
+
pending: $Array<String>;
|
|
805
|
+
obligationTeams: $Array<String>;
|
|
806
|
+
obligationPages: $Array<String>;
|
|
807
|
+
objects: $Array<String>;
|
|
808
|
+
}>;
|
|
809
|
+
```
|
|
810
|
+
|
|
811
|
+
The erasure coordinator consumes this owner-issued readback, including
|
|
812
|
+
outstanding buyer custody.
|
|
813
|
+
|
|
814
|
+
---
|
|
815
|
+
|
|
816
|
+
### APP\_RELEASE\_D1\_FRESH\_SCHEMA
|
|
817
|
+
|
|
818
|
+
```ts
|
|
819
|
+
const APP_RELEASE_D1_FRESH_SCHEMA: string;
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
The one current App Release D1 schema for an empty catalog.
|
|
823
|
+
|
|
824
|
+
## Functions
|
|
825
|
+
|
|
826
|
+
### createTeamAppReleaseErasure()
|
|
827
|
+
|
|
828
|
+
```ts
|
|
829
|
+
function createTeamAppReleaseErasure(
|
|
830
|
+
database,
|
|
831
|
+
bucket,
|
|
832
|
+
assetPolicy?,
|
|
833
|
+
now?,
|
|
834
|
+
): object;
|
|
835
|
+
```
|
|
836
|
+
|
|
837
|
+
Read every catalog reference before deleting content-addressed R2 objects.
|
|
838
|
+
|
|
839
|
+
#### Parameters
|
|
840
|
+
|
|
841
|
+
| Parameter | Type | Default value |
|
|
842
|
+
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ----------------- |
|
|
843
|
+
| `database` | [`AppReleaseD1Database`](#appreleased1database) | `undefined` |
|
|
844
|
+
| `bucket` | [`ErasureBucket`](#erasurebucket) | `undefined` |
|
|
845
|
+
| `assetPolicy?` | \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \} | `undefined` |
|
|
846
|
+
| `assetPolicy.maxManifestBytes?` | `number` | `positiveInteger` |
|
|
847
|
+
| `assetPolicy.maxObjects?` | `number` | `positiveInteger` |
|
|
848
|
+
| `assetPolicy.maxObjectBytes?` | `number` | `positiveInteger` |
|
|
849
|
+
| `assetPolicy.maxTotalBytes?` | `number` | `positiveInteger` |
|
|
850
|
+
| `now?` | () => `number` | `Date.now` |
|
|
851
|
+
|
|
852
|
+
#### Returns
|
|
853
|
+
|
|
854
|
+
| Name | Type | Description |
|
|
855
|
+
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
856
|
+
| `verifyManifest()` | ( `teamId`, `appIds`, `keys` ) => `Promise`\<\{ `teamId`: `string`; `apps`: `object`[]; `repositories`: `string`[]; \}\> | Reject any live App or R2 key outside this Team's current or retry scope. |
|
|
857
|
+
| `preflight()` | (`teamId`) => `Promise`\<\{ `teamId`: `string`; `apps`: `object`[]; `repositories`: `string`[]; \}\> | Inventory Team catalog rows, exclusive objects, and source repositories. |
|
|
858
|
+
| `erase()` | (`teamId`) => `Promise`\<\{ `apps`: `number`; \}\> | Remove one Team's catalog and exclusive objects, resuming pending jobs. |
|
|
859
|
+
| `readback()` | ( `teamId`, `appIds`, `keys` ) => `Promise`\<\{ `clear`: `boolean`; `personalClear`: `boolean`; `retainedArtifacts`: `object`[]; `remaining`: `string`[]; `pending`: `string`[]; `obligationTeams`: `string`[]; `obligationPages`: `string`[]; `objects`: `string`[]; \}\> | Verify the named Apps, pending jobs, obligations and exclusive objects. |
|
|
860
|
+
|
|
861
|
+
---
|
|
862
|
+
|
|
863
|
+
### createD1TeamAppPublisherRegistry()
|
|
864
|
+
|
|
865
|
+
```ts
|
|
866
|
+
function createD1TeamAppPublisherRegistry(database): TeamAppPublisherRegistry;
|
|
867
|
+
```
|
|
868
|
+
|
|
869
|
+
Create the native registry that joins a Team publisher to one App/source.
|
|
870
|
+
|
|
871
|
+
#### Parameters
|
|
872
|
+
|
|
873
|
+
| Parameter | Type |
|
|
874
|
+
| ---------- | ----------------------------------------------- |
|
|
875
|
+
| `database` | [`AppReleaseD1Database`](#appreleased1database) |
|
|
876
|
+
|
|
877
|
+
#### Returns
|
|
878
|
+
|
|
879
|
+
[`TeamAppPublisherRegistry`](publisher.md#teamapppublisherregistry)
|
|
880
|
+
|
|
881
|
+
---
|
|
882
|
+
|
|
883
|
+
### createD1AppReleaseStore()
|
|
884
|
+
|
|
885
|
+
```ts
|
|
886
|
+
function createD1AppReleaseStore(database): PromiseAppReleaseStore & object;
|
|
887
|
+
```
|
|
888
|
+
|
|
889
|
+
Create the D1-backed App Release store with private public-website authority.
|
|
890
|
+
|
|
891
|
+
#### Parameters
|
|
892
|
+
|
|
893
|
+
| Parameter | Type |
|
|
894
|
+
| ---------- | ----------------------------------------------- |
|
|
895
|
+
| `database` | [`AppReleaseD1Database`](#appreleased1database) |
|
|
896
|
+
|
|
897
|
+
#### Returns
|
|
898
|
+
|
|
899
|
+
[`PromiseAppReleaseStore`](index.md#promiseappreleasestore) & `object`
|
|
900
|
+
|
|
901
|
+
---
|
|
902
|
+
|
|
903
|
+
### createR2ArtifactReader()
|
|
904
|
+
|
|
905
|
+
```ts
|
|
906
|
+
function createR2ArtifactReader(bucket, policy?, assets?): ArtifactReader;
|
|
907
|
+
```
|
|
908
|
+
|
|
909
|
+
Create the R2-backed artifact reader for opaque artifact references.
|
|
910
|
+
|
|
911
|
+
Asset manifests are verified cheaply for delivery: the root bytes are
|
|
912
|
+
digest-checked here, while the asset handler checks the requested object.
|
|
913
|
+
Publication callers pass `verification: "publication"` to retain the complete
|
|
914
|
+
manifest object sweep.
|
|
915
|
+
|
|
916
|
+
#### Parameters
|
|
917
|
+
|
|
918
|
+
| Parameter | Type | Default value |
|
|
919
|
+
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
|
|
920
|
+
| `bucket` | [`AppReleaseR2Bucket`](#appreleaser2bucket) | `undefined` |
|
|
921
|
+
| `policy` | [`ArtifactSnapshotPolicy`](#artifactsnapshotpolicy) | `DEFAULT_ARTIFACT_SNAPSHOT_POLICY` |
|
|
922
|
+
| `assets?` | \{ `bucket`: `Pick`\<[`AssetR2Bucket`](#assetr2bucket), `"head"`\>; `policy`: \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \}; \} | `undefined` |
|
|
923
|
+
| `assets.bucket?` | `Pick`\<[`AssetR2Bucket`](#assetr2bucket), `"head"`\> | `undefined` |
|
|
924
|
+
| `assets.policy?` | \{ `maxManifestBytes`: `number`; `maxObjects`: `number`; `maxObjectBytes`: `number`; `maxTotalBytes`: `number`; \} | `undefined` |
|
|
925
|
+
| `assets.policy.maxManifestBytes?` | `number` | `positiveInteger` |
|
|
926
|
+
| `assets.policy.maxObjects?` | `number` | `positiveInteger` |
|
|
927
|
+
| `assets.policy.maxObjectBytes?` | `number` | `positiveInteger` |
|
|
928
|
+
| `assets.policy.maxTotalBytes?` | `number` | `positiveInteger` |
|
|
929
|
+
|
|
930
|
+
#### Returns
|
|
931
|
+
|
|
932
|
+
[`ArtifactReader`](index.md#artifactreader)
|
|
933
|
+
|
|
934
|
+
---
|
|
935
|
+
|
|
936
|
+
### createD1TransitionObligationStore()
|
|
937
|
+
|
|
938
|
+
```ts
|
|
939
|
+
function createD1TransitionObligationStore(
|
|
940
|
+
database,
|
|
941
|
+
): AppReleaseTransitionObligationStore;
|
|
942
|
+
```
|
|
943
|
+
|
|
944
|
+
Open the D1-only obligation adjunct for a future owner-driven dispatcher. The
|
|
945
|
+
ordinary App Release store contract intentionally does not expose it.
|
|
946
|
+
|
|
947
|
+
#### Parameters
|
|
948
|
+
|
|
949
|
+
| Parameter | Type |
|
|
950
|
+
| ---------- | ----------------------------------------------- |
|
|
951
|
+
| `database` | [`AppReleaseD1Database`](#appreleased1database) |
|
|
952
|
+
|
|
953
|
+
#### Returns
|
|
954
|
+
|
|
955
|
+
[`AppReleaseTransitionObligationStore`](#appreleasetransitionobligationstore)
|
|
956
|
+
|
|
957
|
+
---
|
|
958
|
+
|
|
959
|
+
### readD1SurfaceTransitionBasis()
|
|
960
|
+
|
|
961
|
+
```ts
|
|
962
|
+
function readD1SurfaceTransitionBasis(
|
|
963
|
+
database,
|
|
964
|
+
stableRoute,
|
|
965
|
+
releaseId,
|
|
966
|
+
now?,
|
|
967
|
+
): Promise<AppReleaseStoreResult<AppReleaseSurfaceTransitionBasis>>;
|
|
968
|
+
```
|
|
969
|
+
|
|
970
|
+
Resolve one previously selected Release on a Surface and retain the exact
|
|
971
|
+
transition sequence. The Release need not remain the Surface's current default,
|
|
972
|
+
but it must still be verified, active, and owned by that Surface.
|
|
973
|
+
|
|
974
|
+
#### Parameters
|
|
975
|
+
|
|
976
|
+
| Parameter | Type | Default value |
|
|
977
|
+
| ------------- | ----------------------------------------------- | ------------- |
|
|
978
|
+
| `database` | [`AppReleaseD1Database`](#appreleased1database) | `undefined` |
|
|
979
|
+
| `stableRoute` | [`StableRoute`](index.md#stableroute) | `undefined` |
|
|
980
|
+
| `releaseId` | [`ReleaseId`](index.md#releaseid) | `undefined` |
|
|
981
|
+
| `now` | () => `number` | `Date.now` |
|
|
982
|
+
|
|
983
|
+
#### Returns
|
|
984
|
+
|
|
985
|
+
`Promise`\<[`AppReleaseStoreResult`](index.md#appreleasestoreresult)\<[`AppReleaseSurfaceTransitionBasis`](#appreleasesurfacetransitionbasis)\>\>
|
|
986
|
+
|
|
987
|
+
---
|
|
988
|
+
|
|
989
|
+
### matchEligibleSurfaceTransitionBasis()
|
|
990
|
+
|
|
991
|
+
```ts
|
|
992
|
+
function matchEligibleSurfaceTransitionBasis(
|
|
993
|
+
result,
|
|
994
|
+
expected,
|
|
995
|
+
): {
|
|
996
|
+
kind: "selected";
|
|
997
|
+
appId: AppId;
|
|
998
|
+
publicSurfaceId: PublicSurfaceId;
|
|
999
|
+
releaseId: ReleaseId;
|
|
1000
|
+
sequence: number;
|
|
1001
|
+
eligibility: "eligible" | "ineligible";
|
|
1002
|
+
checkedAt: number;
|
|
1003
|
+
} | null;
|
|
1004
|
+
```
|
|
1005
|
+
|
|
1006
|
+
Match one eligible selected Release without leaking store-result branching to
|
|
1007
|
+
consumers.
|
|
1008
|
+
|
|
1009
|
+
#### Parameters
|
|
1010
|
+
|
|
1011
|
+
| Parameter | Type |
|
|
1012
|
+
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1013
|
+
| `result` | [`AppReleaseStoreResult`](index.md#appreleasestoreresult)\<[`AppReleaseSurfaceTransitionBasis`](#appreleasesurfacetransitionbasis)\> |
|
|
1014
|
+
| `expected` | `Readonly`\<\{ `appId`: [`AppId`](index.md#appid); `releaseId`: [`ReleaseId`](index.md#releaseid); `sequence?`: `number`; \}\> |
|
|
1015
|
+
|
|
1016
|
+
#### Returns
|
|
1017
|
+
|
|
1018
|
+
##### Type Literal
|
|
1019
|
+
|
|
1020
|
+
```ts
|
|
1021
|
+
{
|
|
1022
|
+
kind: "selected";
|
|
1023
|
+
appId: AppId;
|
|
1024
|
+
publicSurfaceId: PublicSurfaceId;
|
|
1025
|
+
releaseId: ReleaseId;
|
|
1026
|
+
sequence: number;
|
|
1027
|
+
eligibility: "eligible" | "ineligible";
|
|
1028
|
+
checkedAt: number;
|
|
1029
|
+
}
|
|
1030
|
+
```
|
|
1031
|
+
|
|
1032
|
+
| Name | Type | Description |
|
|
1033
|
+
| ----------------- | --------------------------------------------- | ------------------------------------------------------------------ |
|
|
1034
|
+
| `kind` | `"selected"` | - |
|
|
1035
|
+
| `appId` | [`AppId`](index.md#appid) | - |
|
|
1036
|
+
| `publicSurfaceId` | [`PublicSurfaceId`](index.md#publicsurfaceid) | - |
|
|
1037
|
+
| `releaseId` | [`ReleaseId`](index.md#releaseid) | - |
|
|
1038
|
+
| `sequence` | `number` | - |
|
|
1039
|
+
| `eligibility` | `"eligible"` \| `"ineligible"` | - |
|
|
1040
|
+
| `checkedAt` | `number` | Authority-read start time; consumers may only shorten its horizon. |
|
|
1041
|
+
|
|
1042
|
+
---
|
|
1043
|
+
|
|
1044
|
+
`null`
|