@osdk/foundry.streams 2.51.0 → 2.52.0
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/CHANGELOG.md +13 -0
- package/build/browser/_components.d.ts +148 -1
- package/build/browser/_components.d.ts.map +1 -1
- package/build/browser/_errors.d.ts +126 -0
- package/build/browser/_errors.d.ts.map +1 -1
- package/build/browser/index.d.ts +3 -2
- package/build/browser/index.d.ts.map +1 -1
- package/build/browser/index.js +1 -0
- package/build/browser/index.js.map +1 -1
- package/build/browser/public/Subscriber.d.ts +131 -0
- package/build/browser/public/Subscriber.d.ts.map +1 -0
- package/build/browser/public/Subscriber.js +116 -0
- package/build/browser/public/Subscriber.js.map +1 -0
- package/build/esm/_components.d.ts +148 -1
- package/build/esm/_components.d.ts.map +1 -1
- package/build/esm/_errors.d.ts +126 -0
- package/build/esm/_errors.d.ts.map +1 -1
- package/build/esm/index.d.ts +3 -2
- package/build/esm/index.d.ts.map +1 -1
- package/build/esm/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/public/Subscriber.d.ts +131 -0
- package/build/esm/public/Subscriber.d.ts.map +1 -0
- package/build/esm/public/Subscriber.js +116 -0
- package/build/esm/public/Subscriber.js.map +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type * as _Core from "@osdk/foundry.core";
|
|
2
|
+
import type { SharedClient as $OldClient, SharedClientContext as $OldClientContext } from "@osdk/shared.client";
|
|
3
|
+
import type { SharedClient as $Client, SharedClientContext as $ClientContext } from "@osdk/shared.client2";
|
|
4
|
+
import type * as _Streams from "../_components.js";
|
|
5
|
+
/**
|
|
6
|
+
* Register a new subscriber for a stream. Subscribers maintain server-side offset tracking,
|
|
7
|
+
* allowing reliable consumption without client-side state management.
|
|
8
|
+
*
|
|
9
|
+
* If a subscriber with the same ID already exists for this stream, the existing registration
|
|
10
|
+
* is returned. If a subscriber with the same ID exists for a different stream, an error is returned.
|
|
11
|
+
*
|
|
12
|
+
* @alpha
|
|
13
|
+
*
|
|
14
|
+
* Required Scopes: [api:streams-write]
|
|
15
|
+
* URL: /v2/streams/datasets/{datasetRid}/streams/{streamBranchName}/subscribers
|
|
16
|
+
*/
|
|
17
|
+
export declare function create($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
18
|
+
datasetRid: _Core.DatasetRid,
|
|
19
|
+
streamBranchName: _Core.BranchName,
|
|
20
|
+
$body: _Streams.CreateSubscriberRequest,
|
|
21
|
+
$queryParams?: {
|
|
22
|
+
preview?: _Core.PreviewMode | undefined;
|
|
23
|
+
}
|
|
24
|
+
]): Promise<_Streams.Subscriber>;
|
|
25
|
+
/**
|
|
26
|
+
* Delete a subscriber and all its committed offset state. After deletion, the subscriber ID
|
|
27
|
+
* can be reused to create a new subscriber.
|
|
28
|
+
*
|
|
29
|
+
* @alpha
|
|
30
|
+
*
|
|
31
|
+
* Required Scopes: [api:streams-write]
|
|
32
|
+
* URL: /v2/streams/datasets/{datasetRid}/streams/{streamBranchName}/subscribers/{subscriberSubscriberId}
|
|
33
|
+
*/
|
|
34
|
+
export declare function deleteSubscriber($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
35
|
+
datasetRid: _Core.DatasetRid,
|
|
36
|
+
streamBranchName: _Core.BranchName,
|
|
37
|
+
subscriberSubscriberId: _Streams.SubscriberId,
|
|
38
|
+
$queryParams?: {
|
|
39
|
+
preview?: _Core.PreviewMode | undefined;
|
|
40
|
+
}
|
|
41
|
+
]): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Fetch records for a subscriber starting from their committed offset. Returns records
|
|
44
|
+
* grouped by partition.
|
|
45
|
+
*
|
|
46
|
+
* If `autoCommit` is true, offsets are automatically committed after the records are
|
|
47
|
+
* fetched, so the next read will start from where this one left off.
|
|
48
|
+
*
|
|
49
|
+
* If `autoCommit` is false, you must call `commitOffsets` to update the read position.
|
|
50
|
+
* Use manual commits for at-least-once processing where you need to ensure records are
|
|
51
|
+
* processed before acknowledging them.
|
|
52
|
+
*
|
|
53
|
+
* @alpha
|
|
54
|
+
*
|
|
55
|
+
* Required Scopes: [api:streams-read]
|
|
56
|
+
* URL: /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/subscribers/{subscriberSubscriberId}/readRecords
|
|
57
|
+
*/
|
|
58
|
+
export declare function readRecords($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
59
|
+
datasetRid: _Core.DatasetRid,
|
|
60
|
+
streamBranchName: _Core.BranchName,
|
|
61
|
+
subscriberSubscriberId: _Streams.SubscriberId,
|
|
62
|
+
$body: _Streams.ReadRecordsFromSubscriberRequest,
|
|
63
|
+
$queryParams?: {
|
|
64
|
+
preview?: _Core.PreviewMode | undefined;
|
|
65
|
+
}
|
|
66
|
+
]): Promise<_Streams.ReadSubscriberRecordsResponse>;
|
|
67
|
+
/**
|
|
68
|
+
* Explicitly commit offsets for a subscriber. Required when `autoCommit` is false.
|
|
69
|
+
*
|
|
70
|
+
* Pass the last offset you processed for each partition.
|
|
71
|
+
*
|
|
72
|
+
* For example, if you processed a record at offset 50, commit `{"0": 50}` and the next
|
|
73
|
+
* read from partition "0" will start at offset 51.
|
|
74
|
+
*
|
|
75
|
+
* @alpha
|
|
76
|
+
*
|
|
77
|
+
* Required Scopes: [api:streams-write]
|
|
78
|
+
* URL: /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/subscribers/{subscriberSubscriberId}/commitOffsets
|
|
79
|
+
*/
|
|
80
|
+
export declare function commitOffsets($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
81
|
+
datasetRid: _Core.DatasetRid,
|
|
82
|
+
streamBranchName: _Core.BranchName,
|
|
83
|
+
subscriberSubscriberId: _Streams.SubscriberId,
|
|
84
|
+
$body: _Streams.CommitSubscriberOffsetsRequest,
|
|
85
|
+
$queryParams?: {
|
|
86
|
+
preview?: _Core.PreviewMode | undefined;
|
|
87
|
+
}
|
|
88
|
+
]): Promise<_Streams.PartitionOffsets>;
|
|
89
|
+
/**
|
|
90
|
+
* Get the current read position for a subscriber. Returns the offset per partition where the next read
|
|
91
|
+
* will begin.
|
|
92
|
+
*
|
|
93
|
+
* @alpha
|
|
94
|
+
*
|
|
95
|
+
* Required Scopes: [api:streams-read]
|
|
96
|
+
* URL: /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/subscribers/{subscriberSubscriberId}/getReadPosition
|
|
97
|
+
*/
|
|
98
|
+
export declare function getReadPosition($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
99
|
+
datasetRid: _Core.DatasetRid,
|
|
100
|
+
streamBranchName: _Core.BranchName,
|
|
101
|
+
subscriberSubscriberId: _Streams.SubscriberId,
|
|
102
|
+
$queryParams?: {
|
|
103
|
+
viewRid?: _Streams.ViewRid | undefined;
|
|
104
|
+
preview?: _Core.PreviewMode | undefined;
|
|
105
|
+
}
|
|
106
|
+
]): Promise<_Streams.PartitionOffsets>;
|
|
107
|
+
/**
|
|
108
|
+
* Reset subscriber offsets to a specific position. Use this to replay data from the
|
|
109
|
+
* beginning, skip to the latest records, or jump to specific offsets.
|
|
110
|
+
*
|
|
111
|
+
* The `position` parameter determines where reading will resume:
|
|
112
|
+
*
|
|
113
|
+
* * `earliest`: Reset to the beginning of each partition (offset 0)
|
|
114
|
+
* * `latest`: Reset to the current end of each partition
|
|
115
|
+
* * `specific`: Reset to explicit offsets for each partition
|
|
116
|
+
*
|
|
117
|
+
* @alpha
|
|
118
|
+
*
|
|
119
|
+
* Required Scopes: [api:streams-write]
|
|
120
|
+
* URL: /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/subscribers/{subscriberSubscriberId}/resetOffsets
|
|
121
|
+
*/
|
|
122
|
+
export declare function resetOffsets($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
123
|
+
datasetRid: _Core.DatasetRid,
|
|
124
|
+
streamBranchName: _Core.BranchName,
|
|
125
|
+
subscriberSubscriberId: _Streams.SubscriberId,
|
|
126
|
+
$body: _Streams.ResetSubscriberOffsetsRequest,
|
|
127
|
+
$queryParams?: {
|
|
128
|
+
preview?: _Core.PreviewMode | undefined;
|
|
129
|
+
}
|
|
130
|
+
]): Promise<_Streams.PartitionOffsets>;
|
|
131
|
+
//# sourceMappingURL=Subscriber.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Subscriber.d.ts","sourceRoot":"","sources":["../../../src/public/Subscriber.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { foundryPlatformFetch as $foundryPlatformFetch } from "@osdk/shared.net.platformapi";
|
|
17
|
+
//
|
|
18
|
+
const _create = [1, "/v2/streams/datasets/{0}/streams/{1}/subscribers", 3];
|
|
19
|
+
/**
|
|
20
|
+
* Register a new subscriber for a stream. Subscribers maintain server-side offset tracking,
|
|
21
|
+
* allowing reliable consumption without client-side state management.
|
|
22
|
+
*
|
|
23
|
+
* If a subscriber with the same ID already exists for this stream, the existing registration
|
|
24
|
+
* is returned. If a subscriber with the same ID exists for a different stream, an error is returned.
|
|
25
|
+
*
|
|
26
|
+
* @alpha
|
|
27
|
+
*
|
|
28
|
+
* Required Scopes: [api:streams-write]
|
|
29
|
+
* URL: /v2/streams/datasets/{datasetRid}/streams/{streamBranchName}/subscribers
|
|
30
|
+
*/
|
|
31
|
+
export function create($ctx, ...args) {
|
|
32
|
+
return $foundryPlatformFetch($ctx, _create, ...args);
|
|
33
|
+
}
|
|
34
|
+
const _deleteSubscriber = [3, "/v2/streams/datasets/{0}/streams/{1}/subscribers/{2}", 2];
|
|
35
|
+
/**
|
|
36
|
+
* Delete a subscriber and all its committed offset state. After deletion, the subscriber ID
|
|
37
|
+
* can be reused to create a new subscriber.
|
|
38
|
+
*
|
|
39
|
+
* @alpha
|
|
40
|
+
*
|
|
41
|
+
* Required Scopes: [api:streams-write]
|
|
42
|
+
* URL: /v2/streams/datasets/{datasetRid}/streams/{streamBranchName}/subscribers/{subscriberSubscriberId}
|
|
43
|
+
*/
|
|
44
|
+
export function deleteSubscriber($ctx, ...args) {
|
|
45
|
+
return $foundryPlatformFetch($ctx, _deleteSubscriber, ...args);
|
|
46
|
+
}
|
|
47
|
+
const _readRecords = [1, "/v2/highScale/streams/datasets/{0}/streams/{1}/subscribers/{2}/readRecords", 3];
|
|
48
|
+
/**
|
|
49
|
+
* Fetch records for a subscriber starting from their committed offset. Returns records
|
|
50
|
+
* grouped by partition.
|
|
51
|
+
*
|
|
52
|
+
* If `autoCommit` is true, offsets are automatically committed after the records are
|
|
53
|
+
* fetched, so the next read will start from where this one left off.
|
|
54
|
+
*
|
|
55
|
+
* If `autoCommit` is false, you must call `commitOffsets` to update the read position.
|
|
56
|
+
* Use manual commits for at-least-once processing where you need to ensure records are
|
|
57
|
+
* processed before acknowledging them.
|
|
58
|
+
*
|
|
59
|
+
* @alpha
|
|
60
|
+
*
|
|
61
|
+
* Required Scopes: [api:streams-read]
|
|
62
|
+
* URL: /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/subscribers/{subscriberSubscriberId}/readRecords
|
|
63
|
+
*/
|
|
64
|
+
export function readRecords($ctx, ...args) {
|
|
65
|
+
return $foundryPlatformFetch($ctx, _readRecords, ...args);
|
|
66
|
+
}
|
|
67
|
+
const _commitOffsets = [1, "/v2/highScale/streams/datasets/{0}/streams/{1}/subscribers/{2}/commitOffsets", 3];
|
|
68
|
+
/**
|
|
69
|
+
* Explicitly commit offsets for a subscriber. Required when `autoCommit` is false.
|
|
70
|
+
*
|
|
71
|
+
* Pass the last offset you processed for each partition.
|
|
72
|
+
*
|
|
73
|
+
* For example, if you processed a record at offset 50, commit `{"0": 50}` and the next
|
|
74
|
+
* read from partition "0" will start at offset 51.
|
|
75
|
+
*
|
|
76
|
+
* @alpha
|
|
77
|
+
*
|
|
78
|
+
* Required Scopes: [api:streams-write]
|
|
79
|
+
* URL: /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/subscribers/{subscriberSubscriberId}/commitOffsets
|
|
80
|
+
*/
|
|
81
|
+
export function commitOffsets($ctx, ...args) {
|
|
82
|
+
return $foundryPlatformFetch($ctx, _commitOffsets, ...args);
|
|
83
|
+
}
|
|
84
|
+
const _getReadPosition = [0, "/v2/highScale/streams/datasets/{0}/streams/{1}/subscribers/{2}/getReadPosition", 2];
|
|
85
|
+
/**
|
|
86
|
+
* Get the current read position for a subscriber. Returns the offset per partition where the next read
|
|
87
|
+
* will begin.
|
|
88
|
+
*
|
|
89
|
+
* @alpha
|
|
90
|
+
*
|
|
91
|
+
* Required Scopes: [api:streams-read]
|
|
92
|
+
* URL: /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/subscribers/{subscriberSubscriberId}/getReadPosition
|
|
93
|
+
*/
|
|
94
|
+
export function getReadPosition($ctx, ...args) {
|
|
95
|
+
return $foundryPlatformFetch($ctx, _getReadPosition, ...args);
|
|
96
|
+
}
|
|
97
|
+
const _resetOffsets = [1, "/v2/highScale/streams/datasets/{0}/streams/{1}/subscribers/{2}/resetOffsets", 3];
|
|
98
|
+
/**
|
|
99
|
+
* Reset subscriber offsets to a specific position. Use this to replay data from the
|
|
100
|
+
* beginning, skip to the latest records, or jump to specific offsets.
|
|
101
|
+
*
|
|
102
|
+
* The `position` parameter determines where reading will resume:
|
|
103
|
+
*
|
|
104
|
+
* * `earliest`: Reset to the beginning of each partition (offset 0)
|
|
105
|
+
* * `latest`: Reset to the current end of each partition
|
|
106
|
+
* * `specific`: Reset to explicit offsets for each partition
|
|
107
|
+
*
|
|
108
|
+
* @alpha
|
|
109
|
+
*
|
|
110
|
+
* Required Scopes: [api:streams-write]
|
|
111
|
+
* URL: /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/subscribers/{subscriberSubscriberId}/resetOffsets
|
|
112
|
+
*/
|
|
113
|
+
export function resetOffsets($ctx, ...args) {
|
|
114
|
+
return $foundryPlatformFetch($ctx, _resetOffsets, ...args);
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=Subscriber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Subscriber.js","names":["foundryPlatformFetch","$foundryPlatformFetch","_create","create","$ctx","args","_deleteSubscriber","deleteSubscriber","_readRecords","readRecords","_commitOffsets","commitOffsets","_getReadPosition","getReadPosition","_resetOffsets","resetOffsets"],"sources":["Subscriber.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _create = [1, \"/v2/streams/datasets/{0}/streams/{1}/subscribers\", 3];\n/**\n * Register a new subscriber for a stream. Subscribers maintain server-side offset tracking,\n * allowing reliable consumption without client-side state management.\n *\n * If a subscriber with the same ID already exists for this stream, the existing registration\n * is returned. If a subscriber with the same ID exists for a different stream, an error is returned.\n *\n * @alpha\n *\n * Required Scopes: [api:streams-write]\n * URL: /v2/streams/datasets/{datasetRid}/streams/{streamBranchName}/subscribers\n */\nexport function create($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _create, ...args);\n}\nconst _deleteSubscriber = [3, \"/v2/streams/datasets/{0}/streams/{1}/subscribers/{2}\", 2];\n/**\n * Delete a subscriber and all its committed offset state. After deletion, the subscriber ID\n * can be reused to create a new subscriber.\n *\n * @alpha\n *\n * Required Scopes: [api:streams-write]\n * URL: /v2/streams/datasets/{datasetRid}/streams/{streamBranchName}/subscribers/{subscriberSubscriberId}\n */\nexport function deleteSubscriber($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _deleteSubscriber, ...args);\n}\nconst _readRecords = [\n 1,\n \"/v2/highScale/streams/datasets/{0}/streams/{1}/subscribers/{2}/readRecords\",\n 3,\n];\n/**\n * Fetch records for a subscriber starting from their committed offset. Returns records\n * grouped by partition.\n *\n * If `autoCommit` is true, offsets are automatically committed after the records are\n * fetched, so the next read will start from where this one left off.\n *\n * If `autoCommit` is false, you must call `commitOffsets` to update the read position.\n * Use manual commits for at-least-once processing where you need to ensure records are\n * processed before acknowledging them.\n *\n * @alpha\n *\n * Required Scopes: [api:streams-read]\n * URL: /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/subscribers/{subscriberSubscriberId}/readRecords\n */\nexport function readRecords($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _readRecords, ...args);\n}\nconst _commitOffsets = [\n 1,\n \"/v2/highScale/streams/datasets/{0}/streams/{1}/subscribers/{2}/commitOffsets\",\n 3,\n];\n/**\n * Explicitly commit offsets for a subscriber. Required when `autoCommit` is false.\n *\n * Pass the last offset you processed for each partition.\n *\n * For example, if you processed a record at offset 50, commit `{\"0\": 50}` and the next\n * read from partition \"0\" will start at offset 51.\n *\n * @alpha\n *\n * Required Scopes: [api:streams-write]\n * URL: /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/subscribers/{subscriberSubscriberId}/commitOffsets\n */\nexport function commitOffsets($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _commitOffsets, ...args);\n}\nconst _getReadPosition = [\n 0,\n \"/v2/highScale/streams/datasets/{0}/streams/{1}/subscribers/{2}/getReadPosition\",\n 2,\n];\n/**\n * Get the current read position for a subscriber. Returns the offset per partition where the next read\n * will begin.\n *\n * @alpha\n *\n * Required Scopes: [api:streams-read]\n * URL: /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/subscribers/{subscriberSubscriberId}/getReadPosition\n */\nexport function getReadPosition($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getReadPosition, ...args);\n}\nconst _resetOffsets = [\n 1,\n \"/v2/highScale/streams/datasets/{0}/streams/{1}/subscribers/{2}/resetOffsets\",\n 3,\n];\n/**\n * Reset subscriber offsets to a specific position. Use this to replay data from the\n * beginning, skip to the latest records, or jump to specific offsets.\n *\n * The `position` parameter determines where reading will resume:\n *\n * * `earliest`: Reset to the beginning of each partition (offset 0)\n * * `latest`: Reset to the current end of each partition\n * * `specific`: Reset to explicit offsets for each partition\n *\n * @alpha\n *\n * Required Scopes: [api:streams-write]\n * URL: /v2/highScale/streams/datasets/{datasetRid}/streams/{streamBranchName}/subscribers/{subscriberSubscriberId}/resetOffsets\n */\nexport function resetOffsets($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _resetOffsets, ...args);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,oBAAoB,IAAIC,qBAAqB,QAAQ,8BAA8B;AAC5F;AACA,MAAMC,OAAO,GAAG,CAAC,CAAC,EAAE,kDAAkD,EAAE,CAAC,CAAC;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,MAAMA,CAACC,IAAI,EAAE,GAAGC,IAAI,EAAE;EAClC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEF,OAAO,EAAE,GAAGG,IAAI,CAAC;AACxD;AACA,MAAMC,iBAAiB,GAAG,CAAC,CAAC,EAAE,sDAAsD,EAAE,CAAC,CAAC;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAACH,IAAI,EAAE,GAAGC,IAAI,EAAE;EAC5C,OAAOJ,qBAAqB,CAACG,IAAI,EAAEE,iBAAiB,EAAE,GAAGD,IAAI,CAAC;AAClE;AACA,MAAMG,YAAY,GAAG,CACjB,CAAC,EACD,4EAA4E,EAC5E,CAAC,CACJ;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAACL,IAAI,EAAE,GAAGC,IAAI,EAAE;EACvC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEI,YAAY,EAAE,GAAGH,IAAI,CAAC;AAC7D;AACA,MAAMK,cAAc,GAAG,CACnB,CAAC,EACD,8EAA8E,EAC9E,CAAC,CACJ;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAACP,IAAI,EAAE,GAAGC,IAAI,EAAE;EACzC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEM,cAAc,EAAE,GAAGL,IAAI,CAAC;AAC/D;AACA,MAAMO,gBAAgB,GAAG,CACrB,CAAC,EACD,gFAAgF,EAChF,CAAC,CACJ;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAACT,IAAI,EAAE,GAAGC,IAAI,EAAE;EAC3C,OAAOJ,qBAAqB,CAACG,IAAI,EAAEQ,gBAAgB,EAAE,GAAGP,IAAI,CAAC;AACjE;AACA,MAAMS,aAAa,GAAG,CAClB,CAAC,EACD,6EAA6E,EAC7E,CAAC,CACJ;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAACX,IAAI,EAAE,GAAGC,IAAI,EAAE;EACxC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEU,aAAa,EAAE,GAAGT,IAAI,CAAC;AAC9D","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/foundry.streams",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.52.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@osdk/shared.client": "^1.0.1",
|
|
23
23
|
"@osdk/shared.client2": "^1.0.0",
|
|
24
|
-
"@osdk/foundry.core": "2.
|
|
25
|
-
"@osdk/foundry.filesystem": "2.
|
|
26
|
-
"@osdk/
|
|
27
|
-
"@osdk/
|
|
24
|
+
"@osdk/foundry.core": "2.52.0",
|
|
25
|
+
"@osdk/foundry.filesystem": "2.52.0",
|
|
26
|
+
"@osdk/foundry.datasets": "2.52.0",
|
|
27
|
+
"@osdk/shared.net.platformapi": "~1.6.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"typescript": "^5.5.4",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"sls": {
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"com.palantir.foundry.api:api-gateway": {
|
|
50
|
-
"minVersion": "1.
|
|
50
|
+
"minVersion": "1.1496.0",
|
|
51
51
|
"maxVersion": "1.x.x",
|
|
52
52
|
"optional": false
|
|
53
53
|
}
|