@bitbitpress/client 1.1.0 → 1.1.2
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 +110 -19
- package/dist/data/assets.d.ts +11 -3
- package/dist/data/assets.d.ts.map +1 -1
- package/dist/data/assets.js +2 -2
- package/dist/data/assets.js.map +1 -1
- package/dist/data/index.d.ts +2 -2
- package/dist/generated/openapi.d.ts +503 -24
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/react/index.d.ts +29 -54
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +69 -81
- package/dist/react/index.js.map +1 -1
- package/dist/react-native-expo/index.d.ts +1 -52
- package/dist/react-native-expo/index.d.ts.map +1 -1
- package/dist/react-native-expo/index.js +1 -91
- package/dist/react-native-expo/index.js.map +1 -1
- package/dist/runtime/index.d.ts +60 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +84 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/synthesisUi/context.d.ts +18 -0
- package/dist/synthesisUi/context.d.ts.map +1 -0
- package/dist/synthesisUi/context.js +15 -0
- package/dist/synthesisUi/context.js.map +1 -0
- package/dist/synthesisUi/types.d.ts +30 -0
- package/dist/synthesisUi/types.d.ts.map +1 -0
- package/dist/{synthesisView → synthesisUi}/types.js.map +1 -1
- package/dist/user/index.d.ts +61 -13
- package/dist/user/index.d.ts.map +1 -1
- package/dist/user/index.js +12 -6
- package/dist/user/index.js.map +1 -1
- package/dist/user/interaction.d.ts +5 -0
- package/dist/user/interaction.d.ts.map +1 -1
- package/dist/user/interaction.js +5 -0
- package/dist/user/interaction.js.map +1 -1
- package/dist/user/submissions.d.ts +65 -0
- package/dist/user/submissions.d.ts.map +1 -1
- package/dist/user/submissions.js +57 -0
- package/dist/user/submissions.js.map +1 -1
- package/dist/user/synthesize-batch-manager.js +2 -0
- package/dist/user/synthesize-batch-manager.js.map +1 -1
- package/dist/user/synthesize.d.ts +29 -6
- package/dist/user/synthesize.d.ts.map +1 -1
- package/dist/user/synthesize.js +12 -3
- package/dist/user/synthesize.js.map +1 -1
- package/dist/user/synthesizeUi.d.ts +67 -0
- package/dist/user/synthesizeUi.d.ts.map +1 -0
- package/dist/user/synthesizeUi.js +51 -0
- package/dist/user/synthesizeUi.js.map +1 -0
- package/dist/user/track-batch-manager.d.ts +17 -0
- package/dist/user/track-batch-manager.d.ts.map +1 -0
- package/dist/user/track-batch-manager.js +52 -0
- package/dist/user/track-batch-manager.js.map +1 -0
- package/dist/user/track.d.ts +17 -0
- package/dist/user/track.d.ts.map +1 -0
- package/dist/user/track.js +24 -0
- package/dist/user/track.js.map +1 -0
- package/dist/user/typeDefs.d.ts +9 -3
- package/dist/user/typeDefs.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/react/primitives.d.ts +0 -54
- package/dist/react/primitives.d.ts.map +0 -1
- package/dist/react/primitives.js +0 -223
- package/dist/react/primitives.js.map +0 -1
- package/dist/react-native-expo/primitives.d.ts +0 -58
- package/dist/react-native-expo/primitives.d.ts.map +0 -1
- package/dist/react-native-expo/primitives.js +0 -218
- package/dist/react-native-expo/primitives.js.map +0 -1
- package/dist/synthesisView/context.d.ts +0 -18
- package/dist/synthesisView/context.d.ts.map +0 -1
- package/dist/synthesisView/context.js +0 -15
- package/dist/synthesisView/context.js.map +0 -1
- package/dist/synthesisView/createComponentMap.d.ts +0 -18
- package/dist/synthesisView/createComponentMap.d.ts.map +0 -1
- package/dist/synthesisView/createComponentMap.js +0 -40
- package/dist/synthesisView/createComponentMap.js.map +0 -1
- package/dist/synthesisView/devLog.d.ts +0 -10
- package/dist/synthesisView/devLog.d.ts.map +0 -1
- package/dist/synthesisView/devLog.js +0 -23
- package/dist/synthesisView/devLog.js.map +0 -1
- package/dist/synthesisView/engine.d.ts +0 -35
- package/dist/synthesisView/engine.d.ts.map +0 -1
- package/dist/synthesisView/engine.js +0 -139
- package/dist/synthesisView/engine.js.map +0 -1
- package/dist/synthesisView/primitives.d.ts +0 -180
- package/dist/synthesisView/primitives.d.ts.map +0 -1
- package/dist/synthesisView/primitives.js +0 -29
- package/dist/synthesisView/primitives.js.map +0 -1
- package/dist/synthesisView/resolve.d.ts +0 -17
- package/dist/synthesisView/resolve.d.ts.map +0 -1
- package/dist/synthesisView/resolve.js +0 -42
- package/dist/synthesisView/resolve.js.map +0 -1
- package/dist/synthesisView/types.d.ts +0 -121
- package/dist/synthesisView/types.d.ts.map +0 -1
- package/dist/synthesisView/useEventDrivenView.d.ts +0 -32
- package/dist/synthesisView/useEventDrivenView.d.ts.map +0 -1
- package/dist/synthesisView/useEventDrivenView.js +0 -157
- package/dist/synthesisView/useEventDrivenView.js.map +0 -1
- package/dist/synthesisView/useSynthesisView.d.ts +0 -13
- package/dist/synthesisView/useSynthesisView.d.ts.map +0 -1
- package/dist/synthesisView/useSynthesisView.js +0 -49
- package/dist/synthesisView/useSynthesisView.js.map +0 -1
- package/dist/user/synthesize-view-batch-manager.d.ts +0 -17
- package/dist/user/synthesize-view-batch-manager.d.ts.map +0 -1
- package/dist/user/synthesize-view-batch-manager.js +0 -52
- package/dist/user/synthesize-view-batch-manager.js.map +0 -1
- package/dist/user/synthesizeView.d.ts +0 -41
- package/dist/user/synthesizeView.d.ts.map +0 -1
- package/dist/user/synthesizeView.js +0 -26
- package/dist/user/synthesizeView.js.map +0 -1
- /package/dist/{synthesisView → synthesisUi}/types.js +0 -0
package/README.md
CHANGED
|
@@ -49,12 +49,15 @@ More details can also be found in your control room's API docs @ https://your-co
|
|
|
49
49
|
- [report](#report)
|
|
50
50
|
- [createSubmission](#createsubmission)
|
|
51
51
|
- [submissions](#submissions)
|
|
52
|
+
- [submit](#submit)
|
|
53
|
+
- [submissionState](#submissionstate)
|
|
54
|
+
- [submissionFeed](#submissionfeed)
|
|
52
55
|
- [signal](#signal)
|
|
53
56
|
- [signalItem](#signalitem)
|
|
54
57
|
- [synthesizeItem](#synthesizeitem)
|
|
55
58
|
- [synthesize](#synthesize)
|
|
56
|
-
- [interactions](#interactions)
|
|
57
|
-
- [respondToInteraction](#respondtointeraction)
|
|
59
|
+
- [interactions (deprecated)](#interactions)
|
|
60
|
+
- [respondToInteraction (deprecated)](#respondtointeraction)
|
|
58
61
|
- [Data Methods](#data-methods)
|
|
59
62
|
- [assets](#assets)
|
|
60
63
|
- [Types](#types)
|
|
@@ -428,6 +431,75 @@ console.log('Next cursor:', result.cursor);
|
|
|
428
431
|
|
|
429
432
|
---
|
|
430
433
|
|
|
434
|
+
#### submit
|
|
435
|
+
|
|
436
|
+
Submit content (a poll vote or a contest entry) tied to a synthesis output. One submission per user per piece — re-submitting overwrites the prior one. Get `synthesisOutputId` from the synthesize response (`result.synthesisOutputId`).
|
|
437
|
+
|
|
438
|
+
```typescript
|
|
439
|
+
client.user.submit(options: SubmitRequest): Promise<SubmitResponse>
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
##### Parameters
|
|
443
|
+
|
|
444
|
+
- `options.synthesisOutputId` (required): The output the submission attaches to
|
|
445
|
+
- `options.data` (required): Structured submission data (e.g. `{ response: 'yes' }` for a poll)
|
|
446
|
+
- `options.synthesisOutputContentKey` (optional): Defaults to `''` (one piece per output)
|
|
447
|
+
- `options.files` (optional): File descriptors for presigned uploads
|
|
448
|
+
|
|
449
|
+
##### Example
|
|
450
|
+
|
|
451
|
+
```typescript
|
|
452
|
+
const { synthesisOutputId } = await client.user.synthesizeItem(pollItem);
|
|
453
|
+
if (!synthesisOutputId) throw new Error('Poll output is missing synthesisOutputId');
|
|
454
|
+
await client.user.submit({ synthesisOutputId, data: { response: 'yes' } });
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
---
|
|
458
|
+
|
|
459
|
+
#### submissionState
|
|
460
|
+
|
|
461
|
+
Read one submittable piece: the public aggregate and this user's own submission (`null` if none). For a poll: results plus whether the user has voted.
|
|
462
|
+
|
|
463
|
+
```typescript
|
|
464
|
+
client.user.submissionState(options: {
|
|
465
|
+
synthesisOutputId: string;
|
|
466
|
+
synthesisOutputContentKey?: string;
|
|
467
|
+
}): Promise<SubmissionState>
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
##### Returns
|
|
471
|
+
|
|
472
|
+
- `aggregate`: `{ total, submissionCounts?, byState? }` — `submissionCounts` is keyed by the config's `aggregateField` value (e.g. a poll option)
|
|
473
|
+
- `ownSubmission`: this user's submission, or `null`
|
|
474
|
+
|
|
475
|
+
##### Example
|
|
476
|
+
|
|
477
|
+
```typescript
|
|
478
|
+
const { aggregate, ownSubmission } = await client.user.submissionState({ synthesisOutputId });
|
|
479
|
+
const hasVoted = ownSubmission != null;
|
|
480
|
+
const counts = aggregate.submissionCounts; // { yes: 12, no: 3 }
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
---
|
|
484
|
+
|
|
485
|
+
#### submissionFeed
|
|
486
|
+
|
|
487
|
+
List the public feed of LIVE submissions for a synthesis output (e.g. all contest entries), paginated.
|
|
488
|
+
|
|
489
|
+
```typescript
|
|
490
|
+
client.user.submissionFeed(options: {
|
|
491
|
+
synthesisOutputId: string;
|
|
492
|
+
first?: number;
|
|
493
|
+
after?: string;
|
|
494
|
+
}): Promise<SubmissionFeed>
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
##### Returns
|
|
498
|
+
|
|
499
|
+
- `SubmissionFeed`: `{ cursor, items }` — each item is `{ id, data, files, createdAt }`
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
431
503
|
#### signal
|
|
432
504
|
|
|
433
505
|
Record user signals (e.g., clicked topic, read article) to inform profile interests. Signals are used to power a user's recommendations.
|
|
@@ -554,12 +626,12 @@ client.user.synthesizeItem(
|
|
|
554
626
|
|
|
555
627
|
##### Parameters
|
|
556
628
|
|
|
557
|
-
- `item` (required): A single synthesize item (same shape as items in `synthesize`): `inputs`, `output` (schema as JSON string or Zod 4 schema), optional `configurationKeyName`, optional `synthesisHistoryLimit` (how many recent stored outputs to expose in `
|
|
629
|
+
- `item` (required): A single synthesize item (same shape as items in `synthesize`): `inputs`, `output` (schema as JSON string or Zod 4 schema), optional `configurationKeyName`, optional `synthesisHistoryLimit` (how many recent stored outputs to expose in `synthesisHistoryEntries`; defaults to `0` — no history emitted), optional `searchOptionsOverrides` (e.g. `{ lookbackMinutes: 1440 }` for 24-hour lookback)
|
|
558
630
|
- `onStreamingData` (optional): Callback invoked with streaming data whenever a stream event has `complete: false` for this item. Type: `(data: unknown) => void`.
|
|
559
631
|
|
|
560
632
|
##### Returns
|
|
561
633
|
|
|
562
|
-
- `Promise<SynthesizeItemResponse>`: Resolves with the final data event for this item — `data` is the synthesized object (keys match your output schema) when present; `
|
|
634
|
+
- `Promise<SynthesizeItemResponse>`: Resolves with the final data event for this item — `data` is the synthesized object (keys match your output schema) when present; `synthesisOutputId` identifies the current output for submissions; `synthesisHistoryEntries` is an array of recent stored `{ synthesisOutputId, data }` entries when `synthesisHistoryLimit > 0` (most-recent first; the first entry is the current synthesis itself); deprecated `synthesisHistory` may also be present as bare payloads; `error` is set on failure
|
|
563
635
|
|
|
564
636
|
##### Behavior
|
|
565
637
|
|
|
@@ -614,7 +686,7 @@ client.user.synthesize(
|
|
|
614
686
|
- `inputs` (optional): Context for synthesis — array of `{ type: "externalId" | "text" | "excludeExternalIds", value: string }` (article ID, freeform text, or comma-separated external IDs to exclude)
|
|
615
687
|
- `output`: `{ schema: string | ZodType }` — output schema as a JSON string or Zod 4 schema (top-level type must be `"object"`; supports object, string, number, boolean, array, and enum)
|
|
616
688
|
- `configurationKeyName` (optional): Key name for configuration
|
|
617
|
-
- `synthesisHistoryLimit` (optional): How many recent stored synthesis outputs to expose in the final data event's `
|
|
689
|
+
- `synthesisHistoryLimit` (optional): How many recent stored synthesis outputs to expose in the final data event's `synthesisHistoryEntries` field. Defaults to `0` (no history emitted). When `> 0`, the final event includes a `synthesisHistoryEntries` array of up to N `{ synthesisOutputId, data }` entries (most-recent first; first entry is the current synthesis itself). A deprecated `synthesisHistory` array of bare payloads may also be present for retrocompatibility.
|
|
618
690
|
- `searchOptionsOverrides` (optional): Per-request overrides, e.g. `{ lookbackMinutes: 1440 }` for 24-hour lookback.
|
|
619
691
|
- `options` (optional): `{ onStreamingData?: (index: number, data: unknown) => void }` — if provided, `onStreamingData` is called for each data event with `complete: false`, with the item's index and streaming data
|
|
620
692
|
|
|
@@ -626,7 +698,7 @@ client.user.synthesize(
|
|
|
626
698
|
|
|
627
699
|
- `{ type: "connected" }`: Connection established
|
|
628
700
|
- `{ type: "complete" }`: Stream complete
|
|
629
|
-
- `{ index, data?, synthesisHistory?, complete, error? }`: Data event for that item. Multiple events may be sent per index as partial updates; the final event has `complete: true` and the validated object. When `complete` is false, `data` is streaming data (partial object). `
|
|
701
|
+
- `{ index, data?, synthesisOutputId?, synthesisHistoryEntries?, synthesisHistory?, complete, error? }`: Data event for that item. Multiple events may be sent per index as partial updates; the final event has `complete: true` and the validated object. When `complete` is false, `data` is streaming data (partial object). `synthesisHistoryEntries` (only on the final event, only when `synthesisHistoryLimit > 0`) is an array of recent stored `{ synthesisOutputId, data }` entries, most-recent first. `synthesisHistory` is deprecated and contains the same entries as bare payloads. `error` is set on failure.
|
|
630
702
|
|
|
631
703
|
##### Example
|
|
632
704
|
|
|
@@ -682,6 +754,8 @@ for await (const event of stream) {
|
|
|
682
754
|
|
|
683
755
|
#### interactions
|
|
684
756
|
|
|
757
|
+
**Deprecated:** use `client.user.submissionState({ synthesisOutputId })`, keyed by the poll's synthesis output. This legacy method is kept for retrocompatibility.
|
|
758
|
+
|
|
685
759
|
Batch-resolve interaction state for items from a synthesis output. Returns aggregates and whether the current user has already responded to each.
|
|
686
760
|
|
|
687
761
|
```typescript
|
|
@@ -732,6 +806,8 @@ for (const item of interactions) {
|
|
|
732
806
|
|
|
733
807
|
#### respondToInteraction
|
|
734
808
|
|
|
809
|
+
**Deprecated:** use `client.user.submit({ synthesisOutputId, data })`, keyed by the poll's synthesis output. This legacy method is kept for retrocompatibility.
|
|
810
|
+
|
|
735
811
|
Submit or update a response to an interaction (e.g. a poll answer). Returns updated aggregates.
|
|
736
812
|
|
|
737
813
|
```typescript
|
|
@@ -778,7 +854,7 @@ Data methods require authentication. Call `client.user.authenticate()` before us
|
|
|
778
854
|
|
|
779
855
|
#### assets
|
|
780
856
|
|
|
781
|
-
Fetch assets by IDs and return requested fields.
|
|
857
|
+
Fetch assets by internal IDs or external IDs, and return requested fields.
|
|
782
858
|
|
|
783
859
|
```typescript
|
|
784
860
|
client.data.assets(options: AssetsRequest): Promise<AssetsResponse>
|
|
@@ -786,7 +862,8 @@ client.data.assets(options: AssetsRequest): Promise<AssetsResponse>
|
|
|
786
862
|
|
|
787
863
|
##### Parameters
|
|
788
864
|
|
|
789
|
-
- `options.assetIds` (required): List of asset IDs to fetch
|
|
865
|
+
- `options.assetIds` (required unless `externalIds` is provided): List of BitBitPress asset IDs to fetch
|
|
866
|
+
- `options.externalIds` (required unless `assetIds` is provided): List of source-system external IDs to fetch
|
|
790
867
|
- `options.assetFields` (required): Asset fields to return (dot or bracket notation, e.g. `tags[0]`, `images[1].src`). Allowed: `assetId`, `title`, `tags`, `images`, `videos`, `audios`, `publishedAt`, `externalId`, `externalData`, `assetType`, `sourceUrl`, `dataSource.name`, and subfields. Empty array returns objects with only `assetId`.
|
|
791
868
|
|
|
792
869
|
##### Returns
|
|
@@ -1001,7 +1078,7 @@ Request body for POST `/v1/user/synthesize` (from OpenAPI). Each item has `input
|
|
|
1001
1078
|
type SynthesizeRequest = {
|
|
1002
1079
|
items: Array<{
|
|
1003
1080
|
configurationKeyName?: string;
|
|
1004
|
-
synthesisHistoryLimit?: number; // how many recent stored outputs to include in
|
|
1081
|
+
synthesisHistoryLimit?: number; // how many recent stored outputs to include in synthesisHistoryEntries; defaults to 0 (no history emitted)
|
|
1005
1082
|
searchOptionsOverrides?: { lookbackMinutes?: number };
|
|
1006
1083
|
inputs?: Array<{ type: 'externalId' | 'text' | 'excludeExternalIds'; value: string }>;
|
|
1007
1084
|
output: {
|
|
@@ -1021,16 +1098,24 @@ Same shape as the request items above, but `output.schema` may be a **string or
|
|
|
1021
1098
|
|
|
1022
1099
|
#### SynthesizeEvent
|
|
1023
1100
|
|
|
1024
|
-
Stream events (SSE). Connection events use `type`; data events use `index`, optional `data`, required `complete`, and optional `error`. Multiple data events may be sent per index as partial object updates; the final event for an index has `complete: true` and the validated object.
|
|
1101
|
+
Stream events (SSE). Connection events use `type`; data events use `index`, optional `data`, optional `synthesisOutputId`, optional history fields, required `complete`, and optional `error`. Multiple data events may be sent per index as partial object updates; the final event for an index has `complete: true` and the validated object.
|
|
1025
1102
|
|
|
1026
1103
|
```typescript
|
|
1027
1104
|
type SynthesizeEvent =
|
|
1028
1105
|
| { type: 'connected' }
|
|
1029
1106
|
| { type: 'complete' }
|
|
1030
|
-
| {
|
|
1107
|
+
| {
|
|
1108
|
+
index: number;
|
|
1109
|
+
data?: unknown;
|
|
1110
|
+
synthesisOutputId?: string;
|
|
1111
|
+
synthesisHistoryEntries?: Array<{ synthesisOutputId: string; data: unknown }>;
|
|
1112
|
+
synthesisHistory?: unknown[]; // deprecated bare-payload history
|
|
1113
|
+
complete: boolean;
|
|
1114
|
+
error?: string;
|
|
1115
|
+
};
|
|
1031
1116
|
```
|
|
1032
1117
|
|
|
1033
|
-
When `complete` is true, `data` is the full synthesized object (keys match your output schema). When `complete` is false, `data` is streaming data (partial update). When the request set `synthesisHistoryLimit > 0`, the final event also includes `
|
|
1118
|
+
When `complete` is true, `data` is the full synthesized object (keys match your output schema). When `complete` is false, `data` is streaming data (partial update). `synthesisOutputId` identifies the current output and can be passed to `submit`, `submissionState`, or `submissionFeed`. When the request set `synthesisHistoryLimit > 0`, the final event also includes `synthesisHistoryEntries`: an array of recent stored `{ synthesisOutputId, data }` entries (most-recent first; first entry is the current synthesis itself). Deprecated `synthesisHistory` may also be present as index-aligned bare payloads. `error` is set on failure.
|
|
1034
1119
|
|
|
1035
1120
|
#### SynthesizeItemResponse
|
|
1036
1121
|
|
|
@@ -1038,9 +1123,11 @@ Return type of `synthesizeItem`. Same shape as a data event payload (without `in
|
|
|
1038
1123
|
|
|
1039
1124
|
```typescript
|
|
1040
1125
|
type SynthesizeItemResponse = {
|
|
1041
|
-
data?: unknown;
|
|
1042
|
-
|
|
1043
|
-
|
|
1126
|
+
data?: unknown; // synthesized object when present
|
|
1127
|
+
synthesisOutputId?: string; // current output id for submissions
|
|
1128
|
+
synthesisHistoryEntries?: Array<{ synthesisOutputId: string; data: unknown }>; // preferred history with output ids
|
|
1129
|
+
synthesisHistory?: unknown[]; // deprecated bare-payload history
|
|
1130
|
+
error?: string; // set on failure
|
|
1044
1131
|
};
|
|
1045
1132
|
```
|
|
1046
1133
|
|
|
@@ -1050,9 +1137,13 @@ Request body for POST `/v1/data/assets`.
|
|
|
1050
1137
|
|
|
1051
1138
|
```typescript
|
|
1052
1139
|
type AssetsRequest = {
|
|
1053
|
-
assetIds
|
|
1140
|
+
assetIds?: string[];
|
|
1141
|
+
externalIds?: string[];
|
|
1054
1142
|
assetFields: string[];
|
|
1055
|
-
}
|
|
1143
|
+
} & (
|
|
1144
|
+
| { assetIds: string[]; externalIds?: string[] }
|
|
1145
|
+
| { assetIds?: string[]; externalIds: string[] }
|
|
1146
|
+
);
|
|
1056
1147
|
```
|
|
1057
1148
|
|
|
1058
1149
|
#### AssetsResponse
|
|
@@ -1085,7 +1176,7 @@ interface SynthesizeOptions {
|
|
|
1085
1176
|
|
|
1086
1177
|
#### InteractionsRequest
|
|
1087
1178
|
|
|
1088
|
-
|
|
1179
|
+
Deprecated request body for POST `/v1/user/interactions`. Prefer `submissionState({ synthesisOutputId })`.
|
|
1089
1180
|
|
|
1090
1181
|
```typescript
|
|
1091
1182
|
type InteractionsRequest = {
|
|
@@ -1121,7 +1212,7 @@ type InteractionsResponse = InteractionItem[];
|
|
|
1121
1212
|
|
|
1122
1213
|
#### InteractionResponseRequest
|
|
1123
1214
|
|
|
1124
|
-
|
|
1215
|
+
Deprecated request body for POST `/v1/user/interactions/:interactionId/responses`. Prefer `submit({ synthesisOutputId, data })`.
|
|
1125
1216
|
|
|
1126
1217
|
```typescript
|
|
1127
1218
|
type InteractionResponseRequest = {
|
package/dist/data/assets.d.ts
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import type { paths } from '../generated/openapi.js';
|
|
2
2
|
import type { RequestConfig } from '../request.js';
|
|
3
|
-
|
|
3
|
+
type OpenApiAssetsRequest = paths['/v1/data/assets']['post']['requestBody']['content']['application/json'];
|
|
4
|
+
export type AssetsRequest = OpenApiAssetsRequest & ({
|
|
5
|
+
assetIds: string[];
|
|
6
|
+
externalIds?: string[];
|
|
7
|
+
} | {
|
|
8
|
+
assetIds?: string[];
|
|
9
|
+
externalIds: string[];
|
|
10
|
+
});
|
|
4
11
|
export type AssetsResponse = paths['/v1/data/assets']['post']['responses'][200]['content']['application/json']['data'];
|
|
5
12
|
/**
|
|
6
|
-
* Fetch assets by IDs and return requested fields.
|
|
13
|
+
* Fetch assets by internal and/or external IDs and return requested fields.
|
|
7
14
|
*
|
|
8
15
|
* @param config - Request configuration with base URL, timeout, fetch, and token
|
|
9
|
-
* @param options -
|
|
16
|
+
* @param options - assetFields and at least one of assetIds or externalIds
|
|
10
17
|
* @returns Promise that resolves with assets array
|
|
11
18
|
*/
|
|
12
19
|
export declare function assets(config: RequestConfig, options: AssetsRequest): Promise<AssetsResponse>;
|
|
20
|
+
export {};
|
|
13
21
|
//# sourceMappingURL=assets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/data/assets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAGnD,
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/data/assets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAGnD,KAAK,oBAAoB,GACvB,KAAK,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;AAEjF,MAAM,MAAM,aAAa,GAAG,oBAAoB,GAC9C,CAAC;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAAC;AAEpG,MAAM,MAAM,cAAc,GACxB,KAAK,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5F;;;;;;GAMG;AACH,wBAAsB,MAAM,CAC1B,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,cAAc,CAAC,CAYzB"}
|
package/dist/data/assets.js
CHANGED
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.assets = assets;
|
|
4
4
|
const request_js_1 = require("../request.js");
|
|
5
5
|
/**
|
|
6
|
-
* Fetch assets by IDs and return requested fields.
|
|
6
|
+
* Fetch assets by internal and/or external IDs and return requested fields.
|
|
7
7
|
*
|
|
8
8
|
* @param config - Request configuration with base URL, timeout, fetch, and token
|
|
9
|
-
* @param options -
|
|
9
|
+
* @param options - assetFields and at least one of assetIds or externalIds
|
|
10
10
|
* @returns Promise that resolves with assets array
|
|
11
11
|
*/
|
|
12
12
|
async function assets(config, options) {
|
package/dist/data/assets.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assets.js","sourceRoot":"","sources":["../../src/data/assets.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"assets.js","sourceRoot":"","sources":["../../src/data/assets.ts"],"names":[],"mappings":";;AAoBA,wBAeC;AAjCD,8CAA4C;AAW5C;;;;;;GAMG;AACI,KAAK,UAAU,MAAM,CAC1B,MAAqB,EACrB,OAAsB;IAEtB,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAAiB,MAAM,EAAE;QACzD,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,OAAO;KACd,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/data/index.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ import { type AssetsRequest, type AssetsResponse } from './assets.js';
|
|
|
5
5
|
*/
|
|
6
6
|
export interface DataMethods {
|
|
7
7
|
/**
|
|
8
|
-
* Fetch assets by IDs and return requested fields.
|
|
8
|
+
* Fetch assets by internal and/or external IDs and return requested fields.
|
|
9
9
|
*
|
|
10
|
-
* @param options -
|
|
10
|
+
* @param options - assetFields and at least one of assetIds or externalIds
|
|
11
11
|
* @returns Promise that resolves with assets array
|
|
12
12
|
*/
|
|
13
13
|
assets(options: AssetsRequest): Promise<AssetsResponse>;
|