iii-browser-sdk 0.24.6 → 0.25.0-alpha.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/README.md +111 -11
- package/dist/helpers.cjs +3 -1
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.d.cts +3 -1
- package/dist/helpers.d.cts.map +1 -1
- package/dist/helpers.d.mts +3 -1
- package/dist/helpers.d.mts.map +1 -1
- package/dist/helpers.mjs +3 -1
- package/dist/helpers.mjs.map +1 -1
- package/dist/index.cjs +2872 -119
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +18 -4
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2871 -120
- package/dist/index.mjs.map +1 -1
- package/dist/stream.d.cts +87 -17
- package/dist/stream.d.cts.map +1 -1
- package/dist/stream.d.mts +87 -17
- package/dist/stream.d.mts.map +1 -1
- package/dist/{types-DeNafz-M.d.mts → types-BVi8fWCt.d.cts} +501 -7
- package/dist/types-BVi8fWCt.d.cts.map +1 -0
- package/dist/{types-fqr5SRfu.d.cts → types-D9XSr_QK.d.mts} +501 -7
- package/dist/types-D9XSr_QK.d.mts.map +1 -0
- package/dist/{utils-CJV1pMqe.cjs → utils-Cy-Lu8WQ.cjs} +60 -8
- package/dist/utils-Cy-Lu8WQ.cjs.map +1 -0
- package/dist/{utils-nQQPFFRM.mjs → utils-CyT9CwWA.mjs} +49 -9
- package/dist/utils-CyT9CwWA.mjs.map +1 -0
- package/package.json +3 -3
- package/dist/types-DeNafz-M.d.mts.map +0 -1
- package/dist/types-fqr5SRfu.d.cts.map +0 -1
- package/dist/utils-CJV1pMqe.cjs.map +0 -1
- package/dist/utils-nQQPFFRM.mjs.map +0 -1
package/dist/stream.d.cts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/stream.d.ts
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Input for stream authentication.
|
|
4
|
+
*
|
|
5
|
+
* @deprecated StreamAuthInput is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
6
|
+
*/
|
|
3
7
|
interface StreamAuthInput {
|
|
4
8
|
/** Request headers. */
|
|
5
9
|
headers: Record<string, string>;
|
|
@@ -10,14 +14,26 @@ interface StreamAuthInput {
|
|
|
10
14
|
/** Client address. */
|
|
11
15
|
addr: string;
|
|
12
16
|
}
|
|
13
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Result of stream authentication.
|
|
19
|
+
*
|
|
20
|
+
* @deprecated StreamAuthResult is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
21
|
+
*/
|
|
14
22
|
interface StreamAuthResult {
|
|
15
23
|
/** Arbitrary context passed to stream handlers after authentication. */
|
|
16
24
|
context?: any;
|
|
17
25
|
}
|
|
18
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Context type extracted from {@link StreamAuthResult}.
|
|
28
|
+
*
|
|
29
|
+
* @deprecated StreamContext is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
30
|
+
*/
|
|
19
31
|
type StreamContext = StreamAuthResult['context'];
|
|
20
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Event payload for stream join/leave events.
|
|
34
|
+
*
|
|
35
|
+
* @deprecated StreamJoinLeaveEvent is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
36
|
+
*/
|
|
21
37
|
interface StreamJoinLeaveEvent {
|
|
22
38
|
/** Unique subscription identifier. */
|
|
23
39
|
subscription_id: string;
|
|
@@ -30,45 +46,77 @@ interface StreamJoinLeaveEvent {
|
|
|
30
46
|
/** Auth context from {@link StreamAuthResult}. */
|
|
31
47
|
context?: StreamContext;
|
|
32
48
|
}
|
|
33
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Result of a stream join request.
|
|
51
|
+
*
|
|
52
|
+
* @deprecated StreamJoinResult is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
53
|
+
*/
|
|
34
54
|
interface StreamJoinResult {
|
|
35
55
|
/** Whether the join was unauthorized. */
|
|
36
56
|
unauthorized: boolean;
|
|
37
57
|
}
|
|
38
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Input for retrieving a single stream item.
|
|
60
|
+
*
|
|
61
|
+
* @deprecated StreamGetInput is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
62
|
+
*/
|
|
39
63
|
type StreamGetInput = {
|
|
40
64
|
/** Name of the stream. */stream_name: string; /** Group identifier. */
|
|
41
65
|
group_id: string; /** Item identifier. */
|
|
42
66
|
item_id: string;
|
|
43
67
|
};
|
|
44
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* Input for setting a stream item.
|
|
70
|
+
*
|
|
71
|
+
* @deprecated StreamSetInput is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
72
|
+
*/
|
|
45
73
|
type StreamSetInput = {
|
|
46
74
|
/** Name of the stream. */stream_name: string; /** Group identifier. */
|
|
47
75
|
group_id: string; /** Item identifier. */
|
|
48
76
|
item_id: string; /** Data to store. */
|
|
49
77
|
data: any;
|
|
50
78
|
};
|
|
51
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Input for deleting a stream item.
|
|
81
|
+
*
|
|
82
|
+
* @deprecated StreamDeleteInput is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
83
|
+
*/
|
|
52
84
|
type StreamDeleteInput = {
|
|
53
85
|
/** Name of the stream. */stream_name: string; /** Group identifier. */
|
|
54
86
|
group_id: string; /** Item identifier. */
|
|
55
87
|
item_id: string;
|
|
56
88
|
};
|
|
57
|
-
/**
|
|
89
|
+
/**
|
|
90
|
+
* Input for listing all items in a stream group.
|
|
91
|
+
*
|
|
92
|
+
* @deprecated StreamListInput is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
93
|
+
*/
|
|
58
94
|
type StreamListInput = {
|
|
59
95
|
/** Name of the stream. */stream_name: string; /** Group identifier. */
|
|
60
96
|
group_id: string;
|
|
61
97
|
};
|
|
62
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* Input for listing all groups in a stream.
|
|
100
|
+
*
|
|
101
|
+
* @deprecated StreamListGroupsInput is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
102
|
+
*/
|
|
63
103
|
type StreamListGroupsInput = {
|
|
64
104
|
/** Name of the stream. */stream_name: string;
|
|
65
105
|
};
|
|
66
|
-
/**
|
|
106
|
+
/**
|
|
107
|
+
* Result of a stream set operation.
|
|
108
|
+
*
|
|
109
|
+
* @deprecated StreamSetResult is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
110
|
+
*/
|
|
67
111
|
type StreamSetResult<TData> = {
|
|
68
112
|
/** Previous value (if it existed). */old_value?: TData; /** New value that was stored. */
|
|
69
113
|
new_value: TData;
|
|
70
114
|
};
|
|
71
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* Result of a stream update operation.
|
|
117
|
+
*
|
|
118
|
+
* @deprecated StreamUpdateResult is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
119
|
+
*/
|
|
72
120
|
type StreamUpdateResult<TData> = {
|
|
73
121
|
/** Previous value (if it existed). */old_value?: TData; /** New value after the update. */
|
|
74
122
|
new_value: TData;
|
|
@@ -162,7 +210,11 @@ type UpdateOpError = {
|
|
|
162
210
|
message: string; /** Optional documentation URL. */
|
|
163
211
|
doc_url?: string;
|
|
164
212
|
};
|
|
165
|
-
/**
|
|
213
|
+
/**
|
|
214
|
+
* Result of a stream delete operation.
|
|
215
|
+
*
|
|
216
|
+
* @deprecated DeleteResult is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
217
|
+
*/
|
|
166
218
|
type DeleteResult = {
|
|
167
219
|
/** Previous value (if it existed). */old_value?: any;
|
|
168
220
|
};
|
|
@@ -173,14 +225,22 @@ type DeleteResult = {
|
|
|
173
225
|
* {@link UpdateAppend}, {@link UpdateRemove}, {@link UpdateMerge}
|
|
174
226
|
*/
|
|
175
227
|
type UpdateOp = UpdateSet | UpdateIncrement | UpdateDecrement | UpdateAppend | UpdateRemove | UpdateMerge;
|
|
176
|
-
/**
|
|
228
|
+
/**
|
|
229
|
+
* Input for atomically updating a stream item.
|
|
230
|
+
*
|
|
231
|
+
* @deprecated StreamUpdateInput is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
232
|
+
*/
|
|
177
233
|
type StreamUpdateInput = {
|
|
178
234
|
/** Name of the stream. */stream_name: string; /** Group identifier. */
|
|
179
235
|
group_id: string; /** Item identifier. */
|
|
180
236
|
item_id: string; /** Ordered list of update operations to apply atomically. */
|
|
181
237
|
ops: UpdateOp[];
|
|
182
238
|
};
|
|
183
|
-
/**
|
|
239
|
+
/**
|
|
240
|
+
* Trigger config for `stream` triggers. Filters which item changes fire the handler.
|
|
241
|
+
*
|
|
242
|
+
* @deprecated StreamTriggerConfig is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
243
|
+
*/
|
|
184
244
|
interface StreamTriggerConfig {
|
|
185
245
|
/** Stream name to watch. Only changes on this stream fire the handler. */
|
|
186
246
|
stream_name: string;
|
|
@@ -191,12 +251,20 @@ interface StreamTriggerConfig {
|
|
|
191
251
|
/** Function ID for conditional execution. If it returns `false`, the handler is skipped. */
|
|
192
252
|
condition_function_id?: string;
|
|
193
253
|
}
|
|
194
|
-
/**
|
|
254
|
+
/**
|
|
255
|
+
* Trigger config for `stream:join` and `stream:leave` triggers.
|
|
256
|
+
*
|
|
257
|
+
* @deprecated StreamJoinLeaveTriggerConfig is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
258
|
+
*/
|
|
195
259
|
interface StreamJoinLeaveTriggerConfig {
|
|
196
260
|
/** Function ID for conditional execution. If it returns `false`, the handler is skipped. */
|
|
197
261
|
condition_function_id?: string;
|
|
198
262
|
}
|
|
199
|
-
/**
|
|
263
|
+
/**
|
|
264
|
+
* Handler input for `stream` triggers, fired when an item changes via `stream::set`, `stream::update`, or `stream::delete`.
|
|
265
|
+
*
|
|
266
|
+
* @deprecated StreamChangeEvent is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
267
|
+
*/
|
|
200
268
|
interface StreamChangeEvent {
|
|
201
269
|
/** The event type. */
|
|
202
270
|
type: 'stream';
|
|
@@ -219,6 +287,8 @@ interface StreamChangeEvent {
|
|
|
219
287
|
* to override the engine's built-in stream storage.
|
|
220
288
|
*
|
|
221
289
|
* @typeParam TData - Type of the data stored in the stream.
|
|
290
|
+
*
|
|
291
|
+
* @deprecated IStream is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
222
292
|
*/
|
|
223
293
|
interface IStream<TData> {
|
|
224
294
|
/** Retrieve a single item by group and item ID. */
|
package/dist/stream.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.cts","names":[],"sources":["../src/stream.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"stream.d.cts","names":[],"sources":["../src/stream.ts"],"mappings":";;AAKA;;;;UAAiB,eAAA;EAEN;EAAT,OAAA,EAAS,MAAA;EAIT;EAFA,IAAA;EAIA;EAFA,YAAA,EAAc,MAAA;EAEV;EAAJ,IAAA;AAAA;;;;AAmBF;;UAXiB,gBAAA;EAWW;EAR1B,OAAA;AAAA;;;;;;KAQU,aAAA,GAAgB,gBAAA;;;;;;UAOX,oBAAA;EAkBgB;EAhB/B,eAAA;EAkBA;EAhBA,WAAA;EAwBU;EAtBV,QAAA;;EAEA,EAAA;EAsBA;EApBA,OAAA,GAAU,aAAA;AAAA;;;AAgCZ;;;UAxBiB,gBAAA;EA0Bf;EAxBA,YAAA;AAAA;;;;AAuCF;;KA/BY,cAAA;EA+BiB,0BA7B3B,WAAA,UAiCA;EA/BA,QAAA,UAiCO;EA/BP,OAAA;AAAA;;;;;AAmDF;KA3CY,cAAA;4BAEV,WAAA,UA2CW;EAzCX,QAAA,UAiDyB;EA/CzB,OAAA,UAmDgB;EAhDhB,IAAA;AAAA;;;;;;KAQU,iBAAA;EAgDkB,0BA9C5B,WAAA,UAgDY;EA9CZ,QAAA,UAuDS;EArDT,OAAA;AAAA;;;;;;KAQU,eAAA;EA6CD,0BA3CT,WAAA,UA2CsB;EAzCtB,QAAA;AAAA;;;;;;KAQU,qBAAA;EA2CL,0BAzCL,WAAA;AAAA;;;;;;KAQU,eAAA;EA0CR,sCAxCF,SAAA,GAAY,KAAA,EA4Ca;EA1CzB,SAAA,EAAW,KAAA;AAAA;;;;;;KAQD,kBAAA;EAuDY,sCArDtB,SAAA,GAAY,KAAA,EA4DI;EA1DhB,SAAA,EAAW,KA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;;;;;;UAYa,OAAA;;EAEf,GAAA,CAAI,KAAA,EAAO,cAAA,GAAiB,OAAA,CAAQ,KAAA;;EAEpC,GAAA,CAAI,KAAA,EAAO,cAAA,GAAiB,OAAA,CAAQ,eAAA,CAAgB,KAAA;;EAEpD,MAAA,CAAO,KAAA,EAAO,iBAAA,GAAoB,OAAA,CAAQ,YAAA;;EAE1C,IAAA,CAAK,KAAA,EAAO,eAAA,GAAkB,OAAA,CAAQ,KAAA;;EAEtC,UAAA,CAAW,KAAA,EAAO,qBAAA,GAAwB,OAAA;;EAE1C,MAAA,CAAO,KAAA,EAAO,iBAAA,GAAoB,OAAA,CAAQ,kBAAA,CAAmB,KAAA;AAAA"}
|
package/dist/stream.d.mts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/stream.d.ts
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Input for stream authentication.
|
|
4
|
+
*
|
|
5
|
+
* @deprecated StreamAuthInput is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
6
|
+
*/
|
|
3
7
|
interface StreamAuthInput {
|
|
4
8
|
/** Request headers. */
|
|
5
9
|
headers: Record<string, string>;
|
|
@@ -10,14 +14,26 @@ interface StreamAuthInput {
|
|
|
10
14
|
/** Client address. */
|
|
11
15
|
addr: string;
|
|
12
16
|
}
|
|
13
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Result of stream authentication.
|
|
19
|
+
*
|
|
20
|
+
* @deprecated StreamAuthResult is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
21
|
+
*/
|
|
14
22
|
interface StreamAuthResult {
|
|
15
23
|
/** Arbitrary context passed to stream handlers after authentication. */
|
|
16
24
|
context?: any;
|
|
17
25
|
}
|
|
18
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Context type extracted from {@link StreamAuthResult}.
|
|
28
|
+
*
|
|
29
|
+
* @deprecated StreamContext is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
30
|
+
*/
|
|
19
31
|
type StreamContext = StreamAuthResult['context'];
|
|
20
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Event payload for stream join/leave events.
|
|
34
|
+
*
|
|
35
|
+
* @deprecated StreamJoinLeaveEvent is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
36
|
+
*/
|
|
21
37
|
interface StreamJoinLeaveEvent {
|
|
22
38
|
/** Unique subscription identifier. */
|
|
23
39
|
subscription_id: string;
|
|
@@ -30,45 +46,77 @@ interface StreamJoinLeaveEvent {
|
|
|
30
46
|
/** Auth context from {@link StreamAuthResult}. */
|
|
31
47
|
context?: StreamContext;
|
|
32
48
|
}
|
|
33
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Result of a stream join request.
|
|
51
|
+
*
|
|
52
|
+
* @deprecated StreamJoinResult is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
53
|
+
*/
|
|
34
54
|
interface StreamJoinResult {
|
|
35
55
|
/** Whether the join was unauthorized. */
|
|
36
56
|
unauthorized: boolean;
|
|
37
57
|
}
|
|
38
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Input for retrieving a single stream item.
|
|
60
|
+
*
|
|
61
|
+
* @deprecated StreamGetInput is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
62
|
+
*/
|
|
39
63
|
type StreamGetInput = {
|
|
40
64
|
/** Name of the stream. */stream_name: string; /** Group identifier. */
|
|
41
65
|
group_id: string; /** Item identifier. */
|
|
42
66
|
item_id: string;
|
|
43
67
|
};
|
|
44
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* Input for setting a stream item.
|
|
70
|
+
*
|
|
71
|
+
* @deprecated StreamSetInput is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
72
|
+
*/
|
|
45
73
|
type StreamSetInput = {
|
|
46
74
|
/** Name of the stream. */stream_name: string; /** Group identifier. */
|
|
47
75
|
group_id: string; /** Item identifier. */
|
|
48
76
|
item_id: string; /** Data to store. */
|
|
49
77
|
data: any;
|
|
50
78
|
};
|
|
51
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Input for deleting a stream item.
|
|
81
|
+
*
|
|
82
|
+
* @deprecated StreamDeleteInput is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
83
|
+
*/
|
|
52
84
|
type StreamDeleteInput = {
|
|
53
85
|
/** Name of the stream. */stream_name: string; /** Group identifier. */
|
|
54
86
|
group_id: string; /** Item identifier. */
|
|
55
87
|
item_id: string;
|
|
56
88
|
};
|
|
57
|
-
/**
|
|
89
|
+
/**
|
|
90
|
+
* Input for listing all items in a stream group.
|
|
91
|
+
*
|
|
92
|
+
* @deprecated StreamListInput is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
93
|
+
*/
|
|
58
94
|
type StreamListInput = {
|
|
59
95
|
/** Name of the stream. */stream_name: string; /** Group identifier. */
|
|
60
96
|
group_id: string;
|
|
61
97
|
};
|
|
62
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* Input for listing all groups in a stream.
|
|
100
|
+
*
|
|
101
|
+
* @deprecated StreamListGroupsInput is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
102
|
+
*/
|
|
63
103
|
type StreamListGroupsInput = {
|
|
64
104
|
/** Name of the stream. */stream_name: string;
|
|
65
105
|
};
|
|
66
|
-
/**
|
|
106
|
+
/**
|
|
107
|
+
* Result of a stream set operation.
|
|
108
|
+
*
|
|
109
|
+
* @deprecated StreamSetResult is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
110
|
+
*/
|
|
67
111
|
type StreamSetResult<TData> = {
|
|
68
112
|
/** Previous value (if it existed). */old_value?: TData; /** New value that was stored. */
|
|
69
113
|
new_value: TData;
|
|
70
114
|
};
|
|
71
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* Result of a stream update operation.
|
|
117
|
+
*
|
|
118
|
+
* @deprecated StreamUpdateResult is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
119
|
+
*/
|
|
72
120
|
type StreamUpdateResult<TData> = {
|
|
73
121
|
/** Previous value (if it existed). */old_value?: TData; /** New value after the update. */
|
|
74
122
|
new_value: TData;
|
|
@@ -162,7 +210,11 @@ type UpdateOpError = {
|
|
|
162
210
|
message: string; /** Optional documentation URL. */
|
|
163
211
|
doc_url?: string;
|
|
164
212
|
};
|
|
165
|
-
/**
|
|
213
|
+
/**
|
|
214
|
+
* Result of a stream delete operation.
|
|
215
|
+
*
|
|
216
|
+
* @deprecated DeleteResult is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
217
|
+
*/
|
|
166
218
|
type DeleteResult = {
|
|
167
219
|
/** Previous value (if it existed). */old_value?: any;
|
|
168
220
|
};
|
|
@@ -173,14 +225,22 @@ type DeleteResult = {
|
|
|
173
225
|
* {@link UpdateAppend}, {@link UpdateRemove}, {@link UpdateMerge}
|
|
174
226
|
*/
|
|
175
227
|
type UpdateOp = UpdateSet | UpdateIncrement | UpdateDecrement | UpdateAppend | UpdateRemove | UpdateMerge;
|
|
176
|
-
/**
|
|
228
|
+
/**
|
|
229
|
+
* Input for atomically updating a stream item.
|
|
230
|
+
*
|
|
231
|
+
* @deprecated StreamUpdateInput is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
232
|
+
*/
|
|
177
233
|
type StreamUpdateInput = {
|
|
178
234
|
/** Name of the stream. */stream_name: string; /** Group identifier. */
|
|
179
235
|
group_id: string; /** Item identifier. */
|
|
180
236
|
item_id: string; /** Ordered list of update operations to apply atomically. */
|
|
181
237
|
ops: UpdateOp[];
|
|
182
238
|
};
|
|
183
|
-
/**
|
|
239
|
+
/**
|
|
240
|
+
* Trigger config for `stream` triggers. Filters which item changes fire the handler.
|
|
241
|
+
*
|
|
242
|
+
* @deprecated StreamTriggerConfig is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
243
|
+
*/
|
|
184
244
|
interface StreamTriggerConfig {
|
|
185
245
|
/** Stream name to watch. Only changes on this stream fire the handler. */
|
|
186
246
|
stream_name: string;
|
|
@@ -191,12 +251,20 @@ interface StreamTriggerConfig {
|
|
|
191
251
|
/** Function ID for conditional execution. If it returns `false`, the handler is skipped. */
|
|
192
252
|
condition_function_id?: string;
|
|
193
253
|
}
|
|
194
|
-
/**
|
|
254
|
+
/**
|
|
255
|
+
* Trigger config for `stream:join` and `stream:leave` triggers.
|
|
256
|
+
*
|
|
257
|
+
* @deprecated StreamJoinLeaveTriggerConfig is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
258
|
+
*/
|
|
195
259
|
interface StreamJoinLeaveTriggerConfig {
|
|
196
260
|
/** Function ID for conditional execution. If it returns `false`, the handler is skipped. */
|
|
197
261
|
condition_function_id?: string;
|
|
198
262
|
}
|
|
199
|
-
/**
|
|
263
|
+
/**
|
|
264
|
+
* Handler input for `stream` triggers, fired when an item changes via `stream::set`, `stream::update`, or `stream::delete`.
|
|
265
|
+
*
|
|
266
|
+
* @deprecated StreamChangeEvent is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
267
|
+
*/
|
|
200
268
|
interface StreamChangeEvent {
|
|
201
269
|
/** The event type. */
|
|
202
270
|
type: 'stream';
|
|
@@ -219,6 +287,8 @@ interface StreamChangeEvent {
|
|
|
219
287
|
* to override the engine's built-in stream storage.
|
|
220
288
|
*
|
|
221
289
|
* @typeParam TData - Type of the data stored in the stream.
|
|
290
|
+
*
|
|
291
|
+
* @deprecated IStream is deprecated (iii-stream) and will be removed in an upcoming release. Behavior is unchanged for now. Migration guide: https://iii.dev/docs/upgrading/migrate-from-streams
|
|
222
292
|
*/
|
|
223
293
|
interface IStream<TData> {
|
|
224
294
|
/** Retrieve a single item by group and item ID. */
|
package/dist/stream.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.mts","names":[],"sources":["../src/stream.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"stream.d.mts","names":[],"sources":["../src/stream.ts"],"mappings":";;AAKA;;;;UAAiB,eAAA;EAEN;EAAT,OAAA,EAAS,MAAA;EAIT;EAFA,IAAA;EAIA;EAFA,YAAA,EAAc,MAAA;EAEV;EAAJ,IAAA;AAAA;;;;AAmBF;;UAXiB,gBAAA;EAWW;EAR1B,OAAA;AAAA;;;;;;KAQU,aAAA,GAAgB,gBAAA;;;;;;UAOX,oBAAA;EAkBgB;EAhB/B,eAAA;EAkBA;EAhBA,WAAA;EAwBU;EAtBV,QAAA;;EAEA,EAAA;EAsBA;EApBA,OAAA,GAAU,aAAA;AAAA;;;AAgCZ;;;UAxBiB,gBAAA;EA0Bf;EAxBA,YAAA;AAAA;;;;AAuCF;;KA/BY,cAAA;EA+BiB,0BA7B3B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