@tinycloud/sdk-services 3.8.0-beta.18 → 3.8.0-beta.22

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.
@@ -3,6 +3,46 @@ import { I as IHooksService, H as HookSubscription } from '../IHooksService-CvTp
3
3
  import { f as Result } from '../types-CSd0RYir.js';
4
4
  import { z } from 'zod';
5
5
 
6
+ /** Provenance only; these client fields do not grant database authority. */
7
+ interface FeedRestoreOrigin {
8
+ sourceSpaceId: string;
9
+ namespace: string;
10
+ snapshotId: string;
11
+ sourceKey: string;
12
+ eventKey?: string;
13
+ }
14
+ interface FeedRestoreDeliveryPolicy {
15
+ recipient: string;
16
+ state: "pending" | "held" | "delivered" | "unconfirmed" | "refused" | "unknown";
17
+ dispatch: "never" | "resolved-pending" | "held";
18
+ resolvedOwnerMapping: boolean;
19
+ /** Required: null explicitly means there is no absolute execution cutoff. */
20
+ dispatchBefore: string | null;
21
+ source: FeedRestoreOrigin;
22
+ }
23
+ interface FeedRestoreResponse {
24
+ response: NewFeedResponse | NewFeedMessage;
25
+ payload?: FeedResponsePayload;
26
+ origin: FeedRestoreOrigin;
27
+ deliveries?: FeedRestoreDeliveryPolicy[];
28
+ }
29
+ interface FeedRestoreRecords {
30
+ cards: FeedCard[];
31
+ responses: FeedRestoreResponse[];
32
+ }
33
+ /** Cursor covers every verified header, including imported rows denied dispatch. */
34
+ interface FeedResponseDeliveryPage {
35
+ responses: FeedResponse[];
36
+ nextSequence: number;
37
+ hasMore: boolean;
38
+ }
39
+
40
+ interface FeedCardHistoryPage {
41
+ cards: FeedCard[];
42
+ nextIdentity: FeedCardIdentity | null;
43
+ hasMore: boolean;
44
+ }
45
+
6
46
  type FeedDatabase = Pick<IDatabaseHandle, "query" | "execute" | "batch">;
7
47
  type FeedReadDatabase = Pick<IDatabaseHandle, "query">;
8
48
  type JSONValue = null | boolean | number | string | JSONValue[] | {
@@ -52,6 +92,8 @@ interface FeedResponse extends Omit<NewFeedResponse, "kind"> {
52
92
  sequence: number;
53
93
  payloadType?: string;
54
94
  payloadVersion?: number;
95
+ /** Added only by verified imported delivery policy; undefined retains ordinary live behavior. */
96
+ dispatchBefore?: string | null;
55
97
  }
56
98
  interface FeedHandling extends FeedCardIdentity {
57
99
  handlingId: string;
@@ -129,11 +171,25 @@ interface FeedApi {
129
171
  readFeedResponsePayload(responses: FeedReadDatabase, identity: FeedResponseIdentity): Promise<Result<FeedResponsePayload | undefined>>;
130
172
  projectFeedResponseNotification(response: FeedResponse): FeedResponse;
131
173
  listFeedCards(output: FeedReadDatabase): Promise<Result<FeedCard[]>>;
174
+ listFeedCardHistory(output: FeedReadDatabase, options?: {
175
+ afterIdentity?: FeedCardIdentity;
176
+ limit?: number;
177
+ signal?: AbortSignal;
178
+ }): Promise<Result<FeedCardHistoryPage>>;
132
179
  listFeedResponses(responses: FeedReadDatabase, options?: {
133
180
  afterSequence?: number;
134
181
  limit?: number;
135
182
  signal?: AbortSignal;
136
183
  }): Promise<Result<FeedResponse[]>>;
184
+ restoreFeedRecords(ownerPair: FeedDatabases, records: FeedRestoreRecords, options?: {
185
+ signal?: AbortSignal;
186
+ }): Promise<Result<void>>;
187
+ listFeedResponseDeliveries(responses: FeedReadDatabase, options: {
188
+ recipient: string;
189
+ afterSequence?: number;
190
+ limit?: number;
191
+ signal?: AbortSignal;
192
+ }): Promise<Result<FeedResponseDeliveryPage>>;
137
193
  recordFeedHandling(output: FeedDatabase, handling: FeedHandling): Promise<Result<FeedHandling>>;
138
194
  readFeedResponseHandling(output: FeedReadDatabase, identity: FeedResponseIdentity): Promise<Result<FeedResponseHandling>>;
139
195
  getFeedCardState(output: FeedReadDatabase, responses: FeedReadDatabase, identity: FeedCardIdentity): Promise<Result<FeedCardState>>;
@@ -173,4 +229,10 @@ declare const feedHandlingSchema: z.ZodType<FeedHandling>;
173
229
  /** A notification is an allowlisted header, never a copy of private payload data. */
174
230
  declare const projectFeedResponseNotification: FeedApi["projectFeedResponseNotification"];
175
231
 
176
- export { type FeedApi, type FeedCard, type FeedCardIdentity, type FeedCardState, type FeedChoice, type FeedDatabase, type FeedDatabases, type FeedDeliveryOptions, type FeedHandling, type FeedHandoff, type FeedHooks, type FeedListenerOptions, type FeedOwnerSettings, type FeedOwnerView, type FeedReadDatabase, type FeedResponse, type FeedResponseHandling, type FeedResponseIdentity, type FeedResponsePayload, type FeedSelector, type FeedSource, type JSONValue, type NewFeedMessage, type NewFeedResponse, appendFeedMessage, appendFeedResponse, deliverFeedResponse, feedCardSchema, feedHandlingSchema, feedResourceNames, feedResponsePayloadSchema, getFeedCardState, getFeedHandoff, initializeFeedDatabases, initializeFeedHandoff, listFeedCards, listFeedResponses, listenFeedResponses, newFeedMessageSchema, newFeedResponseSchema, projectFeedResponseNotification, publishFeedCard, readFeedResponseHandling, readFeedResponsePayload, recordFeedHandling, resolveFeedCard };
232
+ declare const restoreFeedRecords: FeedApi["restoreFeedRecords"];
233
+
234
+ declare const listFeedResponseDeliveries: FeedApi["listFeedResponseDeliveries"];
235
+
236
+ declare const listFeedCardHistory: FeedApi["listFeedCardHistory"];
237
+
238
+ export { type FeedApi, type FeedCard, type FeedCardHistoryPage, type FeedCardIdentity, type FeedCardState, type FeedChoice, type FeedDatabase, type FeedDatabases, type FeedDeliveryOptions, type FeedHandling, type FeedHandoff, type FeedHooks, type FeedListenerOptions, type FeedOwnerSettings, type FeedOwnerView, type FeedReadDatabase, type FeedResponse, type FeedResponseDeliveryPage, type FeedResponseHandling, type FeedResponseIdentity, type FeedResponsePayload, type FeedRestoreDeliveryPolicy, type FeedRestoreOrigin, type FeedRestoreRecords, type FeedRestoreResponse, type FeedSelector, type FeedSource, type JSONValue, type NewFeedMessage, type NewFeedResponse, appendFeedMessage, appendFeedResponse, deliverFeedResponse, feedCardSchema, feedHandlingSchema, feedResourceNames, feedResponsePayloadSchema, getFeedCardState, getFeedHandoff, initializeFeedDatabases, initializeFeedHandoff, listFeedCardHistory, listFeedCards, listFeedResponseDeliveries, listFeedResponses, listenFeedResponses, newFeedMessageSchema, newFeedResponseSchema, projectFeedResponseNotification, publishFeedCard, readFeedResponseHandling, readFeedResponsePayload, recordFeedHandling, resolveFeedCard, restoreFeedRecords };