@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
|
@@ -160,10 +160,10 @@ export interface paths {
|
|
|
160
160
|
* ]
|
|
161
161
|
*/
|
|
162
162
|
suggestedInterestTags: string[];
|
|
163
|
-
/** @description
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
/** @description Customer-defined profile attributes for this user (shape governed by the deployment's active app-user profile schema). */
|
|
164
|
+
customAttributes?: {
|
|
165
|
+
[key: string]: unknown;
|
|
166
|
+
};
|
|
167
167
|
};
|
|
168
168
|
};
|
|
169
169
|
};
|
|
@@ -213,7 +213,7 @@ export interface paths {
|
|
|
213
213
|
};
|
|
214
214
|
/**
|
|
215
215
|
* Profile - Update User Profile
|
|
216
|
-
* @description **PUT** `/v1/user/profile` Updates the user's profile. Supports interest tags (full replace via `interestTags`, or add/remove via `addInterestTags` / `removeInterestTags`) and
|
|
216
|
+
* @description **PUT** `/v1/user/profile` Updates the user's profile. Supports interest tags (full replace via `interestTags`, or add/remove via `addInterestTags` / `removeInterestTags`) and `customAttributes` (validated against this deployment's active app-user profile schema).
|
|
217
217
|
*/
|
|
218
218
|
put: {
|
|
219
219
|
parameters: {
|
|
@@ -234,10 +234,10 @@ export interface paths {
|
|
|
234
234
|
addInterestTags?: string[];
|
|
235
235
|
/** @description Remove these tags from the current list (ignored if interestTags is provided). */
|
|
236
236
|
removeInterestTags?: string[];
|
|
237
|
-
/** @description
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
237
|
+
/** @description Customer-defined profile attributes. Validated against the deployment's active app-user profile schema before persisting. */
|
|
238
|
+
customAttributes?: {
|
|
239
|
+
[key: string]: unknown;
|
|
240
|
+
};
|
|
241
241
|
};
|
|
242
242
|
};
|
|
243
243
|
};
|
|
@@ -651,6 +651,122 @@ export interface paths {
|
|
|
651
651
|
patch?: never;
|
|
652
652
|
trace?: never;
|
|
653
653
|
};
|
|
654
|
+
"/v1/user/events": {
|
|
655
|
+
parameters: {
|
|
656
|
+
query?: never;
|
|
657
|
+
header?: never;
|
|
658
|
+
path?: never;
|
|
659
|
+
cookie?: never;
|
|
660
|
+
};
|
|
661
|
+
get?: never;
|
|
662
|
+
put?: never;
|
|
663
|
+
/**
|
|
664
|
+
* Synthesis - Record UI Events
|
|
665
|
+
* @description **POST** `/v1/user/events` Records behavioral events (views, clicks) for synthesis UIs. Batched by the SDK; powers UI analytics.
|
|
666
|
+
*/
|
|
667
|
+
post: {
|
|
668
|
+
parameters: {
|
|
669
|
+
query?: never;
|
|
670
|
+
header: {
|
|
671
|
+
/** @description Bearer token for authentication */
|
|
672
|
+
authorization: string;
|
|
673
|
+
};
|
|
674
|
+
path?: never;
|
|
675
|
+
cookie?: never;
|
|
676
|
+
};
|
|
677
|
+
requestBody: {
|
|
678
|
+
content: {
|
|
679
|
+
"application/json": {
|
|
680
|
+
/** @description Events to record. */
|
|
681
|
+
events: {
|
|
682
|
+
/** @description The synthesis UI load id the event belongs to. */
|
|
683
|
+
keyName: string;
|
|
684
|
+
/**
|
|
685
|
+
* @description VIEW (the UI was shown) or CLICK (a tracked interaction).
|
|
686
|
+
* @enum {string}
|
|
687
|
+
*/
|
|
688
|
+
type: "VIEW" | "CLICK";
|
|
689
|
+
/** @description For CLICK: the action/label or link url. Omit for VIEW. */
|
|
690
|
+
name?: string;
|
|
691
|
+
/** @description Arbitrary event properties (retained for analytics drill-down). */
|
|
692
|
+
payload?: {
|
|
693
|
+
[key: string]: unknown;
|
|
694
|
+
};
|
|
695
|
+
/** @description ISO timestamp the event occurred; defaults to server time. */
|
|
696
|
+
occurredAt?: string;
|
|
697
|
+
}[];
|
|
698
|
+
};
|
|
699
|
+
};
|
|
700
|
+
};
|
|
701
|
+
responses: {
|
|
702
|
+
/** @description Events recorded */
|
|
703
|
+
200: {
|
|
704
|
+
headers: {
|
|
705
|
+
[name: string]: unknown;
|
|
706
|
+
};
|
|
707
|
+
content: {
|
|
708
|
+
"application/json": {
|
|
709
|
+
/** @example true */
|
|
710
|
+
success: boolean;
|
|
711
|
+
data: {
|
|
712
|
+
/**
|
|
713
|
+
* @description Whether any event resolved to a known UI and was recorded.
|
|
714
|
+
* @example true
|
|
715
|
+
*/
|
|
716
|
+
recorded: boolean;
|
|
717
|
+
};
|
|
718
|
+
};
|
|
719
|
+
};
|
|
720
|
+
};
|
|
721
|
+
/** @description Bad request - missing or invalid parameters */
|
|
722
|
+
400: {
|
|
723
|
+
headers: {
|
|
724
|
+
[name: string]: unknown;
|
|
725
|
+
};
|
|
726
|
+
content: {
|
|
727
|
+
"application/json": {
|
|
728
|
+
/** @example Bad request */
|
|
729
|
+
error?: string;
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
};
|
|
733
|
+
/** @description Unauthorized errors */
|
|
734
|
+
401: {
|
|
735
|
+
headers: {
|
|
736
|
+
[name: string]: unknown;
|
|
737
|
+
};
|
|
738
|
+
content: {
|
|
739
|
+
"application/json": {
|
|
740
|
+
/**
|
|
741
|
+
* @example Unauthorized: No authentication token provided
|
|
742
|
+
* @enum {string}
|
|
743
|
+
*/
|
|
744
|
+
error?: "Unauthorized: No authentication token provided" | "Unauthorized: Token has expired" | "Unauthorized: Invalid token" | "Unauthorized: Authentication failed";
|
|
745
|
+
};
|
|
746
|
+
};
|
|
747
|
+
};
|
|
748
|
+
/** @description Internal server error */
|
|
749
|
+
500: {
|
|
750
|
+
headers: {
|
|
751
|
+
[name: string]: unknown;
|
|
752
|
+
};
|
|
753
|
+
content: {
|
|
754
|
+
"application/json": {
|
|
755
|
+
/** @example false */
|
|
756
|
+
success?: boolean;
|
|
757
|
+
/** @example Internal server error: An unknown error occurred */
|
|
758
|
+
error?: string;
|
|
759
|
+
};
|
|
760
|
+
};
|
|
761
|
+
};
|
|
762
|
+
};
|
|
763
|
+
};
|
|
764
|
+
delete?: never;
|
|
765
|
+
options?: never;
|
|
766
|
+
head?: never;
|
|
767
|
+
patch?: never;
|
|
768
|
+
trace?: never;
|
|
769
|
+
};
|
|
654
770
|
"/v1/user/synthesize": {
|
|
655
771
|
parameters: {
|
|
656
772
|
query?: never;
|
|
@@ -683,7 +799,7 @@ export interface paths {
|
|
|
683
799
|
items: {
|
|
684
800
|
/** @description Optional configuration key name. Loads an existing synthesis config by this name; omit for default configuration. */
|
|
685
801
|
configurationKeyName?: string;
|
|
686
|
-
/** @description How many recent stored synthesis outputs to expose in the streamed `synthesisHistory`
|
|
802
|
+
/** @description How many recent stored synthesis outputs to expose in the streamed `synthesisHistory` / `synthesisHistoryEntries` fields. Defaults to 0 (no history emitted). When > 0, the final data event includes a `synthesisHistoryEntries` array of up to N `{ synthesisOutputId, data }` (most-recent first; each row's payload paired with its output id, so submissions can attach to a specific historical output), and — DEPRECATED, for retrocompatibility — an index-aligned `synthesisHistory` array of the same bare `data` payloads. The first entry is the current synthesis itself — the same payload `data` is derived from — and the remaining entries are older stored rows. */
|
|
687
803
|
synthesisHistoryLimit?: number;
|
|
688
804
|
/** @description Per-request overrides for search options. */
|
|
689
805
|
searchOptionsOverrides?: {
|
|
@@ -700,8 +816,8 @@ export interface paths {
|
|
|
700
816
|
/** @description External ID (e.g. article) for externalId, freeform text for text, or comma-separated list of external IDs to exclude */
|
|
701
817
|
value: string;
|
|
702
818
|
}[];
|
|
703
|
-
/** @description
|
|
704
|
-
output
|
|
819
|
+
/** @description Optional output definition. Omit to use the output schema declared on the config named by `configurationKeyName` (`output.outputSchema`). */
|
|
820
|
+
output?: {
|
|
705
821
|
/** @description Output schema as a JSON string. Top-level type must be "object". Supports object, string, number, boolean, array, and enum. Example: {"type":"object","properties":{"title":{"type":"string","description":"title"},"status":{"type":"string","enum":["draft","published"]}}} */
|
|
706
822
|
schema: string;
|
|
707
823
|
};
|
|
@@ -729,7 +845,7 @@ export interface paths {
|
|
|
729
845
|
* ```
|
|
730
846
|
* `data` is always a single synthesized object (keys match your output schema). `complete` is `false` for partial streaming updates and `true` for the final validated payload.
|
|
731
847
|
*
|
|
732
|
-
* When `synthesisHistoryLimit > 0`, the final event additionally includes `
|
|
848
|
+
* When `synthesisHistoryLimit > 0`, the final event additionally includes `synthesisHistoryEntries`: an array of up to N entries (most-recent first), each `{ synthesisOutputId, data }`, so a client can attach submissions (e.g. poll votes) to a specific historical output. The first entry is the current synthesis itself — the raw payload `data` is derived from (identical to `data` when reranking isn't configured; the unreranked source when it is) — and the remaining entries are older stored rows. A DEPRECATED `synthesisHistory` field (index-aligned bare `data` payloads) is also included for retrocompatibility. The primary `data` field stays a single object — when user reranking is configured, it is built by pooling items at the reranking field across the fetched rows and scoring against the user profile.
|
|
733
849
|
*
|
|
734
850
|
* **Data Events (error):**
|
|
735
851
|
* ```json
|
|
@@ -797,6 +913,136 @@ export interface paths {
|
|
|
797
913
|
patch?: never;
|
|
798
914
|
trace?: never;
|
|
799
915
|
};
|
|
916
|
+
"/v1/user/synthesize-ui": {
|
|
917
|
+
parameters: {
|
|
918
|
+
query?: never;
|
|
919
|
+
header?: never;
|
|
920
|
+
path?: never;
|
|
921
|
+
cookie?: never;
|
|
922
|
+
};
|
|
923
|
+
get?: never;
|
|
924
|
+
put?: never;
|
|
925
|
+
/**
|
|
926
|
+
* Synthesis - Synthesize UI
|
|
927
|
+
* @description **POST** `/v1/user/synthesize-ui`
|
|
928
|
+
*
|
|
929
|
+
* Resolve one or more generated UIs in a single request, each identified by its `keyName`. Streams results as Server-Sent Events so the client can load the (cacheable) code bundle immediately and render synthesis `data` as it arrives — the same streaming model as `/v1/user/synthesize`.
|
|
930
|
+
*
|
|
931
|
+
* The code bundle is immutable per published version and identical for every app user, so it is served from a CDN by versioned `bundleUrl` and cached once across renders and users. `data` is the per-request, per-user piece and may stream in partials before a final `complete: true` event. `theme` is deployment-level and emitted once in the `manifest`. (`bundleSource` is an inlined fallback used only while bundles are served inline, before CDN delivery.)
|
|
932
|
+
*/
|
|
933
|
+
post: {
|
|
934
|
+
parameters: {
|
|
935
|
+
query?: never;
|
|
936
|
+
header: {
|
|
937
|
+
/** @description Bearer token for authentication */
|
|
938
|
+
authorization: string;
|
|
939
|
+
};
|
|
940
|
+
path?: never;
|
|
941
|
+
cookie?: never;
|
|
942
|
+
};
|
|
943
|
+
requestBody: {
|
|
944
|
+
content: {
|
|
945
|
+
"application/json": {
|
|
946
|
+
/**
|
|
947
|
+
* @description Target platform for the bundles, for the whole request. Defaults to `web`.
|
|
948
|
+
* @enum {string}
|
|
949
|
+
*/
|
|
950
|
+
platform?: "web" | "mobile";
|
|
951
|
+
/** @description UIs to resolve in this request. */
|
|
952
|
+
items: {
|
|
953
|
+
/** @description Stable identifier of the UI to load. Configured in the CMS. */
|
|
954
|
+
keyName: string;
|
|
955
|
+
}[];
|
|
956
|
+
};
|
|
957
|
+
};
|
|
958
|
+
};
|
|
959
|
+
responses: {
|
|
960
|
+
/**
|
|
961
|
+
* @description Streaming response (Server-Sent Events). Each event is a JSON object sent as `data: {JSON}\n\n`.
|
|
962
|
+
*
|
|
963
|
+
* **Connection Events:**
|
|
964
|
+
* ```json
|
|
965
|
+
* {"type":"connected" | "complete"}
|
|
966
|
+
* ```
|
|
967
|
+
*
|
|
968
|
+
* **Manifest Event (once, first):**
|
|
969
|
+
* ```json
|
|
970
|
+
* {
|
|
971
|
+
* "type":"manifest",
|
|
972
|
+
* "theme": {...},
|
|
973
|
+
* "items": [{ "index": number, "bundleUrl": string|null, "bundleSource": string|null }]
|
|
974
|
+
* }
|
|
975
|
+
* ```
|
|
976
|
+
* `theme` is the deployment's brand tokens (shared by all items). Each manifest item is index-matched to the request `items` and carries the bundle reference; the client can start loading bundles immediately.
|
|
977
|
+
*
|
|
978
|
+
* **Data Events:**
|
|
979
|
+
* ```json
|
|
980
|
+
* { "index": number, "data": {...}, "complete": false | true }
|
|
981
|
+
* ```
|
|
982
|
+
* `data` is the synthesis output the UI renders. `complete` is `false` for partial streaming updates and `true` for the final payload.
|
|
983
|
+
*
|
|
984
|
+
* **Data Events (error):**
|
|
985
|
+
* ```json
|
|
986
|
+
* { "index": number, "error": "error message" }
|
|
987
|
+
* ```
|
|
988
|
+
*/
|
|
989
|
+
200: {
|
|
990
|
+
headers: {
|
|
991
|
+
[name: string]: unknown;
|
|
992
|
+
};
|
|
993
|
+
content: {
|
|
994
|
+
"application/json": string;
|
|
995
|
+
};
|
|
996
|
+
};
|
|
997
|
+
/** @description Bad request - missing or invalid parameters */
|
|
998
|
+
400: {
|
|
999
|
+
headers: {
|
|
1000
|
+
[name: string]: unknown;
|
|
1001
|
+
};
|
|
1002
|
+
content: {
|
|
1003
|
+
"application/json": {
|
|
1004
|
+
/** @example Bad request */
|
|
1005
|
+
error?: string;
|
|
1006
|
+
};
|
|
1007
|
+
};
|
|
1008
|
+
};
|
|
1009
|
+
/** @description Unauthorized errors */
|
|
1010
|
+
401: {
|
|
1011
|
+
headers: {
|
|
1012
|
+
[name: string]: unknown;
|
|
1013
|
+
};
|
|
1014
|
+
content: {
|
|
1015
|
+
"application/json": {
|
|
1016
|
+
/**
|
|
1017
|
+
* @example Unauthorized: No authentication token provided
|
|
1018
|
+
* @enum {string}
|
|
1019
|
+
*/
|
|
1020
|
+
error?: "Unauthorized: No authentication token provided" | "Unauthorized: Token has expired" | "Unauthorized: Invalid token" | "Unauthorized: Authentication failed";
|
|
1021
|
+
};
|
|
1022
|
+
};
|
|
1023
|
+
};
|
|
1024
|
+
/** @description Internal server error */
|
|
1025
|
+
500: {
|
|
1026
|
+
headers: {
|
|
1027
|
+
[name: string]: unknown;
|
|
1028
|
+
};
|
|
1029
|
+
content: {
|
|
1030
|
+
"application/json": {
|
|
1031
|
+
/** @example false */
|
|
1032
|
+
success?: boolean;
|
|
1033
|
+
/** @example Internal server error: An unknown error occurred */
|
|
1034
|
+
error?: string;
|
|
1035
|
+
};
|
|
1036
|
+
};
|
|
1037
|
+
};
|
|
1038
|
+
};
|
|
1039
|
+
};
|
|
1040
|
+
delete?: never;
|
|
1041
|
+
options?: never;
|
|
1042
|
+
head?: never;
|
|
1043
|
+
patch?: never;
|
|
1044
|
+
trace?: never;
|
|
1045
|
+
};
|
|
800
1046
|
"/v1/user/interactions": {
|
|
801
1047
|
parameters: {
|
|
802
1048
|
query?: never;
|
|
@@ -807,8 +1053,10 @@ export interface paths {
|
|
|
807
1053
|
get?: never;
|
|
808
1054
|
put?: never;
|
|
809
1055
|
/**
|
|
810
|
-
* Synthesis - Get User Interactions
|
|
811
|
-
* @description **
|
|
1056
|
+
* Synthesis - Get User Interactions (DEPRECATED)
|
|
1057
|
+
* @description **DEPRECATED** — use `GET /v1/user/submissions` (submission state), keyed by the poll's `synthesisOutputId`. Kept for retrocompatibility.
|
|
1058
|
+
*
|
|
1059
|
+
* **POST** `/v1/user/interactions`
|
|
812
1060
|
*
|
|
813
1061
|
* Batch-resolve interaction state for items from a synthesis output. Returns aggregates and whether the current user has already responded to each.
|
|
814
1062
|
*/
|
|
@@ -919,8 +1167,10 @@ export interface paths {
|
|
|
919
1167
|
get?: never;
|
|
920
1168
|
put?: never;
|
|
921
1169
|
/**
|
|
922
|
-
* Synthesis - Create User Interaction Response
|
|
923
|
-
* @description **
|
|
1170
|
+
* Synthesis - Create User Interaction Response (DEPRECATED)
|
|
1171
|
+
* @description **DEPRECATED** — use `POST /v1/user/submissions` (submit), keyed by the poll's `synthesisOutputId`. Kept for retrocompatibility.
|
|
1172
|
+
*
|
|
1173
|
+
* **POST** `/v1/user/interactions/:interactionId/responses`
|
|
924
1174
|
*
|
|
925
1175
|
* Submit or update a response to an interaction. Returns updated aggregates.
|
|
926
1176
|
*/
|
|
@@ -1031,6 +1281,219 @@ export interface paths {
|
|
|
1031
1281
|
patch?: never;
|
|
1032
1282
|
trace?: never;
|
|
1033
1283
|
};
|
|
1284
|
+
"/v1/user/submissions": {
|
|
1285
|
+
parameters: {
|
|
1286
|
+
query?: never;
|
|
1287
|
+
header?: never;
|
|
1288
|
+
path?: never;
|
|
1289
|
+
cookie?: never;
|
|
1290
|
+
};
|
|
1291
|
+
/**
|
|
1292
|
+
* Synthesis - Get User Submission State
|
|
1293
|
+
* @description **GET** `/v1/user/submissions`
|
|
1294
|
+
*
|
|
1295
|
+
* Default: for one submittable piece (`synthesisOutputId`), the public aggregate (total, submissionCounts, counts by state) and this user's own submission (null if none).
|
|
1296
|
+
*
|
|
1297
|
+
* With `list=true`: the public feed of LIVE submissions for that output (paginated), as `{ cursor, items }`.
|
|
1298
|
+
*/
|
|
1299
|
+
get: {
|
|
1300
|
+
parameters: {
|
|
1301
|
+
query: {
|
|
1302
|
+
synthesisOutputId: string;
|
|
1303
|
+
synthesisOutputContentKey?: string;
|
|
1304
|
+
list?: boolean;
|
|
1305
|
+
first?: number;
|
|
1306
|
+
after?: string;
|
|
1307
|
+
};
|
|
1308
|
+
header: {
|
|
1309
|
+
authorization: string;
|
|
1310
|
+
};
|
|
1311
|
+
path?: never;
|
|
1312
|
+
cookie?: never;
|
|
1313
|
+
};
|
|
1314
|
+
requestBody?: never;
|
|
1315
|
+
responses: {
|
|
1316
|
+
/** @description Default Response */
|
|
1317
|
+
200: {
|
|
1318
|
+
headers: {
|
|
1319
|
+
[name: string]: unknown;
|
|
1320
|
+
};
|
|
1321
|
+
content: {
|
|
1322
|
+
"application/json": {
|
|
1323
|
+
success: boolean;
|
|
1324
|
+
data: {
|
|
1325
|
+
[key: string]: unknown;
|
|
1326
|
+
};
|
|
1327
|
+
};
|
|
1328
|
+
};
|
|
1329
|
+
};
|
|
1330
|
+
/** @description Bad request - missing or invalid parameters */
|
|
1331
|
+
400: {
|
|
1332
|
+
headers: {
|
|
1333
|
+
[name: string]: unknown;
|
|
1334
|
+
};
|
|
1335
|
+
content: {
|
|
1336
|
+
"application/json": {
|
|
1337
|
+
/** @example Bad request */
|
|
1338
|
+
error?: string;
|
|
1339
|
+
};
|
|
1340
|
+
};
|
|
1341
|
+
};
|
|
1342
|
+
/** @description Unauthorized errors */
|
|
1343
|
+
401: {
|
|
1344
|
+
headers: {
|
|
1345
|
+
[name: string]: unknown;
|
|
1346
|
+
};
|
|
1347
|
+
content: {
|
|
1348
|
+
"application/json": {
|
|
1349
|
+
/**
|
|
1350
|
+
* @example Unauthorized: No authentication token provided
|
|
1351
|
+
* @enum {string}
|
|
1352
|
+
*/
|
|
1353
|
+
error?: "Unauthorized: No authentication token provided" | "Unauthorized: Token has expired" | "Unauthorized: Invalid token" | "Unauthorized: Authentication failed";
|
|
1354
|
+
};
|
|
1355
|
+
};
|
|
1356
|
+
};
|
|
1357
|
+
/** @description Internal server error */
|
|
1358
|
+
500: {
|
|
1359
|
+
headers: {
|
|
1360
|
+
[name: string]: unknown;
|
|
1361
|
+
};
|
|
1362
|
+
content: {
|
|
1363
|
+
"application/json": {
|
|
1364
|
+
/** @example false */
|
|
1365
|
+
success?: boolean;
|
|
1366
|
+
/** @example Internal server error: An unknown error occurred */
|
|
1367
|
+
error?: string;
|
|
1368
|
+
};
|
|
1369
|
+
};
|
|
1370
|
+
};
|
|
1371
|
+
};
|
|
1372
|
+
};
|
|
1373
|
+
put?: never;
|
|
1374
|
+
/**
|
|
1375
|
+
* Synthesis - Create User Submission
|
|
1376
|
+
* @description **POST** `/v1/user/submissions`
|
|
1377
|
+
*
|
|
1378
|
+
* Submit content tied to a synthesis output. One submission per user per piece — re-submitting overwrites the prior one. Returns the submission and any presigned file upload URLs.
|
|
1379
|
+
*/
|
|
1380
|
+
post: {
|
|
1381
|
+
parameters: {
|
|
1382
|
+
query?: never;
|
|
1383
|
+
header: {
|
|
1384
|
+
authorization: string;
|
|
1385
|
+
};
|
|
1386
|
+
path?: never;
|
|
1387
|
+
cookie?: never;
|
|
1388
|
+
};
|
|
1389
|
+
requestBody: {
|
|
1390
|
+
content: {
|
|
1391
|
+
"application/json": {
|
|
1392
|
+
synthesisOutputId: string;
|
|
1393
|
+
synthesisOutputContentKey?: string;
|
|
1394
|
+
data: {
|
|
1395
|
+
[key: string]: unknown;
|
|
1396
|
+
};
|
|
1397
|
+
files?: {
|
|
1398
|
+
field: string;
|
|
1399
|
+
contentType: string;
|
|
1400
|
+
fileName?: string;
|
|
1401
|
+
}[];
|
|
1402
|
+
};
|
|
1403
|
+
};
|
|
1404
|
+
};
|
|
1405
|
+
responses: {
|
|
1406
|
+
/** @description Default Response */
|
|
1407
|
+
200: {
|
|
1408
|
+
headers: {
|
|
1409
|
+
[name: string]: unknown;
|
|
1410
|
+
};
|
|
1411
|
+
content: {
|
|
1412
|
+
"application/json": {
|
|
1413
|
+
success: boolean;
|
|
1414
|
+
data: {
|
|
1415
|
+
submission: {
|
|
1416
|
+
id: string;
|
|
1417
|
+
synthesisConfigId: string;
|
|
1418
|
+
synthesisOutputId: string;
|
|
1419
|
+
synthesisOutputContentKey: string;
|
|
1420
|
+
appUserId: string;
|
|
1421
|
+
state: string;
|
|
1422
|
+
createdAt: string;
|
|
1423
|
+
updatedAt?: string;
|
|
1424
|
+
} & {
|
|
1425
|
+
[key: string]: unknown;
|
|
1426
|
+
};
|
|
1427
|
+
uploads: {
|
|
1428
|
+
field: string;
|
|
1429
|
+
s3Key: string;
|
|
1430
|
+
uploadUrl: string;
|
|
1431
|
+
}[];
|
|
1432
|
+
};
|
|
1433
|
+
};
|
|
1434
|
+
};
|
|
1435
|
+
};
|
|
1436
|
+
/** @description Bad request - missing or invalid parameters */
|
|
1437
|
+
400: {
|
|
1438
|
+
headers: {
|
|
1439
|
+
[name: string]: unknown;
|
|
1440
|
+
};
|
|
1441
|
+
content: {
|
|
1442
|
+
"application/json": {
|
|
1443
|
+
/** @example Bad request */
|
|
1444
|
+
error?: string;
|
|
1445
|
+
};
|
|
1446
|
+
};
|
|
1447
|
+
};
|
|
1448
|
+
/** @description Unauthorized errors */
|
|
1449
|
+
401: {
|
|
1450
|
+
headers: {
|
|
1451
|
+
[name: string]: unknown;
|
|
1452
|
+
};
|
|
1453
|
+
content: {
|
|
1454
|
+
"application/json": {
|
|
1455
|
+
/**
|
|
1456
|
+
* @example Unauthorized: No authentication token provided
|
|
1457
|
+
* @enum {string}
|
|
1458
|
+
*/
|
|
1459
|
+
error?: "Unauthorized: No authentication token provided" | "Unauthorized: Token has expired" | "Unauthorized: Invalid token" | "Unauthorized: Authentication failed";
|
|
1460
|
+
};
|
|
1461
|
+
};
|
|
1462
|
+
};
|
|
1463
|
+
/** @description Not found */
|
|
1464
|
+
404: {
|
|
1465
|
+
headers: {
|
|
1466
|
+
[name: string]: unknown;
|
|
1467
|
+
};
|
|
1468
|
+
content: {
|
|
1469
|
+
"application/json": {
|
|
1470
|
+
/** @example Not found */
|
|
1471
|
+
error?: string;
|
|
1472
|
+
};
|
|
1473
|
+
};
|
|
1474
|
+
};
|
|
1475
|
+
/** @description Internal server error */
|
|
1476
|
+
500: {
|
|
1477
|
+
headers: {
|
|
1478
|
+
[name: string]: unknown;
|
|
1479
|
+
};
|
|
1480
|
+
content: {
|
|
1481
|
+
"application/json": {
|
|
1482
|
+
/** @example false */
|
|
1483
|
+
success?: boolean;
|
|
1484
|
+
/** @example Internal server error: An unknown error occurred */
|
|
1485
|
+
error?: string;
|
|
1486
|
+
};
|
|
1487
|
+
};
|
|
1488
|
+
};
|
|
1489
|
+
};
|
|
1490
|
+
};
|
|
1491
|
+
delete?: never;
|
|
1492
|
+
options?: never;
|
|
1493
|
+
head?: never;
|
|
1494
|
+
patch?: never;
|
|
1495
|
+
trace?: never;
|
|
1496
|
+
};
|
|
1034
1497
|
"/v1/data/assets": {
|
|
1035
1498
|
parameters: {
|
|
1036
1499
|
query?: never;
|
|
@@ -1042,13 +1505,14 @@ export interface paths {
|
|
|
1042
1505
|
put?: never;
|
|
1043
1506
|
/**
|
|
1044
1507
|
* Data - Get Assets
|
|
1045
|
-
* @description **POST** `/v1/data/assets` Fetches assets by IDs and returns requested fields.
|
|
1508
|
+
* @description **POST** `/v1/data/assets` Fetches assets by internal or external IDs and returns requested fields.
|
|
1046
1509
|
*
|
|
1047
1510
|
* #### Request body
|
|
1048
1511
|
*
|
|
1049
1512
|
* | Field | Type | Required | Description |
|
|
1050
1513
|
* |-------|------|----------|-------------|
|
|
1051
|
-
* | `assetIds` | string[] | yes | List of asset IDs to fetch |
|
|
1514
|
+
* | `assetIds` | string[] | yes, unless `externalIds` is provided | List of internal asset IDs to fetch |
|
|
1515
|
+
* | `externalIds` | string[] | yes, unless `assetIds` is provided | List of external IDs to fetch |
|
|
1052
1516
|
* | `assetFields` | string[] | yes | Fields to return (dot or bracket notation, e.g. tags[0], images[1].src). Allowed: assetId, title, tags, images, videos, publishedAt, externalId, externalData, sourceUrl, dataSource.name, and subfields. Empty array returns objects with only `assetId`. `externalData`'s subfields are unique to your source data. |
|
|
1053
1517
|
*/
|
|
1054
1518
|
post: {
|
|
@@ -1065,7 +1529,9 @@ export interface paths {
|
|
|
1065
1529
|
content: {
|
|
1066
1530
|
"application/json": {
|
|
1067
1531
|
/** @description List of asset IDs to fetch */
|
|
1068
|
-
assetIds
|
|
1532
|
+
assetIds?: string[];
|
|
1533
|
+
/** @description List of external IDs to fetch */
|
|
1534
|
+
externalIds?: string[];
|
|
1069
1535
|
/** @description Asset fields to return (dot or bracket notation). Allowed: assetId, title, tags, images, videos, publishedAt, externalId, externalData, assetType, sourceUrl, dataSource.name, and subfields. Empty array returns objects with only assetId. */
|
|
1070
1536
|
assetFields: string[];
|
|
1071
1537
|
};
|
|
@@ -1165,7 +1631,8 @@ export interface paths {
|
|
|
1165
1631
|
requestBody: {
|
|
1166
1632
|
content: {
|
|
1167
1633
|
"application/json": {
|
|
1168
|
-
|
|
1634
|
+
synthesisOutputId: string;
|
|
1635
|
+
synthesisOutputContentKey?: string;
|
|
1169
1636
|
data: {
|
|
1170
1637
|
[key: string]: unknown;
|
|
1171
1638
|
};
|
|
@@ -1189,8 +1656,10 @@ export interface paths {
|
|
|
1189
1656
|
data: {
|
|
1190
1657
|
submission: {
|
|
1191
1658
|
id: string;
|
|
1192
|
-
|
|
1193
|
-
|
|
1659
|
+
synthesisConfigId: string;
|
|
1660
|
+
synthesisOutputId: string;
|
|
1661
|
+
synthesisOutputContentKey: string;
|
|
1662
|
+
appUserId: string;
|
|
1194
1663
|
state: string;
|
|
1195
1664
|
createdAt: string;
|
|
1196
1665
|
updatedAt?: string;
|
|
@@ -1305,7 +1774,17 @@ export interface paths {
|
|
|
1305
1774
|
data: {
|
|
1306
1775
|
cursor: null | string;
|
|
1307
1776
|
items: {
|
|
1308
|
-
|
|
1777
|
+
id: string;
|
|
1778
|
+
data: {
|
|
1779
|
+
[key: string]: unknown;
|
|
1780
|
+
};
|
|
1781
|
+
files: {
|
|
1782
|
+
field: string;
|
|
1783
|
+
contentType: string;
|
|
1784
|
+
fileName?: string;
|
|
1785
|
+
downloadUrl: string;
|
|
1786
|
+
}[];
|
|
1787
|
+
createdAt: string;
|
|
1309
1788
|
}[];
|
|
1310
1789
|
};
|
|
1311
1790
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ export type { ProfileResponse, ProfileUpdateRequest } from './user/profile.js';
|
|
|
16
16
|
export type { RecommendationsRequest, RecommendationsResponse } from './user/recommendations.js';
|
|
17
17
|
export type { ReportRequest, ReportResponse } from './user/report.js';
|
|
18
18
|
export type { Signal, SignalRequest, SignalResponse } from './user/signal.js';
|
|
19
|
-
export type { CreateUserSubmissionRequest, CreateUserSubmissionResponse, ListUserSubmissionsRequest, ListUserSubmissionsResponse, } from './user/submissions.js';
|
|
20
|
-
export type { SynthesizeEvent, SynthesizeItemResponse, SynthesizeOptions, } from './user/synthesize.js';
|
|
19
|
+
export type { CreateUserSubmissionRequest, CreateUserSubmissionResponse, ListUserSubmissionsRequest, ListUserSubmissionsResponse, PublicSubmission, SubmissionAggregate, SubmissionFeed, SubmissionFile, SubmissionState, SubmitRequest, SubmitResponse, } from './user/submissions.js';
|
|
20
|
+
export type { SynthesisHistoryEntry, SynthesizeEvent, SynthesizeItemResponse, SynthesizeOptions, } from './user/synthesize.js';
|
|
21
21
|
export type { SynthesizeOnStreamingData } from './user/synthesize-batch-manager.js';
|
|
22
22
|
export type { TokenRequest, TokenResponse } from './user/token.js';
|
|
23
23
|
export type { BitBitPressSynthesizeRequest, RecommendationsRequestBody, SynthesizeInput, SynthesizeItem, SynthesizeItems, SynthesizeOutputSchema, SynthesizeRequest, } from './user/typeDefs.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACtE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,mBAAmB,wBAAwB,CAAC;AAC5C,YAAY,EACV,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,yBAAyB,EACzB,WAAW,EACX,QAAQ,GACT,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,YAAY,EACV,eAAe,EACf,0BAA0B,EAC1B,2BAA2B,EAC3B,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,YAAY,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACjG,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACtE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9E,YAAY,EACV,2BAA2B,EAC3B,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACtE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,mBAAmB,wBAAwB,CAAC;AAC5C,YAAY,EACV,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,yBAAyB,EACzB,WAAW,EACX,QAAQ,GACT,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,YAAY,EACV,eAAe,EACf,0BAA0B,EAC1B,2BAA2B,EAC3B,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,YAAY,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACjG,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACtE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9E,YAAY,EACV,2BAA2B,EAC3B,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,EAC3B,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,eAAe,EACf,aAAa,EACb,cAAc,GACf,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AACpF,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACnE,YAAY,EACV,4BAA4B,EAC5B,0BAA0B,EAC1B,eAAe,EACf,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC"}
|