@relayfile/sdk 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +3 -2
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +14 -0
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -214,7 +214,7 @@ export class RelayFileClient {
|
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
216
|
async writeFile(input) {
|
|
217
|
-
const { workspaceId, path, correlationId, baseRevision, content, contentType, encoding,
|
|
217
|
+
const { workspaceId, path, correlationId, baseRevision, content, contentType, encoding, contentIdentity, signal } = input;
|
|
218
218
|
const query = buildQuery({ path });
|
|
219
219
|
return this.request({
|
|
220
220
|
method: "PUT",
|
|
@@ -228,7 +228,8 @@ export class RelayFileClient {
|
|
|
228
228
|
contentType: contentType ?? "text/markdown",
|
|
229
229
|
content,
|
|
230
230
|
encoding,
|
|
231
|
-
semantics: input.semantics
|
|
231
|
+
semantics: input.semantics,
|
|
232
|
+
...(contentIdentity ? { contentIdentity } : {})
|
|
232
233
|
},
|
|
233
234
|
signal
|
|
234
235
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { InvalidStateError, PayloadTooLargeError, QueueFullError, RelayFileApiEr
|
|
|
4
4
|
export { IntegrationProvider, computeCanonicalPath } from "./provider.js";
|
|
5
5
|
export type { WebhookInput, ListProviderFilesOptions, WatchProviderEventsOptions } from "./provider.js";
|
|
6
6
|
export type { ConnectionProvider, NormalizedWebhook, ProxyHeaders, ProxyMethod, ProxyQuery, ProxyRequest, ProxyResponse, } from "./connection.js";
|
|
7
|
-
export type { AckResponse, AckWritebackInput, AckWritebackResponse, AdminIngressAlert, AdminIngressAlertProfile, AdminIngressEffectiveAlertProfile, AdminIngressAlertSeverity, AdminIngressAlertThresholds, AdminIngressAlertTotals, AdminIngressAlertType, AdminIngressStatusResponse, AdminSyncAlert, AdminSyncAlertSeverity, AdminSyncAlertThresholds, AdminSyncAlertTotals, AdminSyncAlertType, AdminSyncStatusResponse, BackendStatusResponse, BulkWriteFile, BulkWriteInput, BulkWriteResponse, ConflictErrorResponse, DeleteFileInput, DeadLetterFeedResponse, DeadLetterItem, ErrorResponse, EventFeedResponse, ExportFormat, ExportJsonResponse, ExportOptions, FileQueryItem, FileQueryResponse, FileReadResponse, FileSemantics, FileWriteRequest, FilesystemEvent, FilesystemEventType, EventOrigin, GetEventsOptions, GetAdminSyncStatusOptions, GetAdminIngressStatusOptions, GetOperationsOptions, GetSyncDeadLettersOptions, GetSyncIngressStatusOptions, GetSyncStatusOptions, IngestWebhookInput, ListTreeOptions, OperationFeedResponse, OperationStatus, OperationStatusResponse, QueuedResponse, QueryFilesOptions, RelayFileJwtClaims, SyncIngressStatusResponse, SyncProviderStatus, SyncProviderStatusState, SyncRefreshRequest, SyncStatusResponse, TreeEntry, TreeResponse, WritebackActionType, WritebackState, WritebackItem, WriteFileInput, WriteQueuedResponse } from "./types.js";
|
|
7
|
+
export type { AckResponse, AckWritebackInput, AckWritebackResponse, AdminIngressAlert, AdminIngressAlertProfile, AdminIngressEffectiveAlertProfile, AdminIngressAlertSeverity, AdminIngressAlertThresholds, AdminIngressAlertTotals, AdminIngressAlertType, AdminIngressStatusResponse, AdminSyncAlert, AdminSyncAlertSeverity, AdminSyncAlertThresholds, AdminSyncAlertTotals, AdminSyncAlertType, AdminSyncStatusResponse, BackendStatusResponse, BulkWriteFile, BulkWriteInput, BulkWriteResponse, ConflictErrorResponse, ContentIdentity, DeleteFileInput, DeadLetterFeedResponse, DeadLetterItem, ErrorResponse, EventFeedResponse, ExportFormat, ExportJsonResponse, ExportOptions, FileQueryItem, FileQueryResponse, FileReadResponse, FileSemantics, FileWriteRequest, FilesystemEvent, FilesystemEventType, EventOrigin, GetEventsOptions, GetAdminSyncStatusOptions, GetAdminIngressStatusOptions, GetOperationsOptions, GetSyncDeadLettersOptions, GetSyncIngressStatusOptions, GetSyncStatusOptions, IngestWebhookInput, ListTreeOptions, OperationFeedResponse, OperationStatus, OperationStatusResponse, QueuedResponse, QueryFilesOptions, RelayFileJwtClaims, SyncIngressStatusResponse, SyncProviderStatus, SyncProviderStatusState, SyncRefreshRequest, SyncStatusResponse, TreeEntry, TreeResponse, WritebackActionType, WritebackState, WritebackItem, WriteFileInput, WriteQueuedResponse } from "./types.js";
|
|
8
8
|
export { WritebackConsumer } from "./writeback-consumer.js";
|
|
9
9
|
export type { WritebackHandler, WritebackConsumerOptions } from "./writeback-consumer.js";
|
|
10
10
|
export * from "./integration-adapter.js";
|
package/dist/types.d.ts
CHANGED
|
@@ -44,6 +44,17 @@ export interface FileSemantics {
|
|
|
44
44
|
permissions?: string[];
|
|
45
45
|
comments?: string[];
|
|
46
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Stable identity for an idempotent write, used by the server to coalesce
|
|
49
|
+
* duplicate deliveries (webhook retries, cross-product fan-in). Two writes
|
|
50
|
+
* with equal `(kind, key)` in the same workspace within the dedup window
|
|
51
|
+
* resolve to the same op. Callers typically derive `key` from the upstream
|
|
52
|
+
* event id, e.g. `github:push:<sha>`.
|
|
53
|
+
*/
|
|
54
|
+
export interface ContentIdentity {
|
|
55
|
+
kind: string;
|
|
56
|
+
key: string;
|
|
57
|
+
}
|
|
47
58
|
export interface FileReadResponse {
|
|
48
59
|
path: string;
|
|
49
60
|
revision: string;
|
|
@@ -60,12 +71,14 @@ export interface FileWriteRequest {
|
|
|
60
71
|
content: string;
|
|
61
72
|
encoding?: "utf-8" | "base64";
|
|
62
73
|
semantics?: FileSemantics;
|
|
74
|
+
contentIdentity?: ContentIdentity;
|
|
63
75
|
}
|
|
64
76
|
export interface BulkWriteFile {
|
|
65
77
|
path: string;
|
|
66
78
|
contentType?: string;
|
|
67
79
|
content: string;
|
|
68
80
|
encoding?: "utf-8" | "base64";
|
|
81
|
+
contentIdentity?: ContentIdentity;
|
|
69
82
|
}
|
|
70
83
|
export interface BulkWriteInput {
|
|
71
84
|
workspaceId: string;
|
|
@@ -435,6 +448,7 @@ export interface WriteFileInput {
|
|
|
435
448
|
contentType?: string;
|
|
436
449
|
encoding?: "utf-8" | "base64";
|
|
437
450
|
semantics?: FileSemantics;
|
|
451
|
+
contentIdentity?: ContentIdentity;
|
|
438
452
|
correlationId?: string;
|
|
439
453
|
signal?: AbortSignal;
|
|
440
454
|
}
|