@bitbitpress/client 1.1.0 → 1.1.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 +71 -0
- package/dist/generated/openapi.d.ts +487 -15
- package/dist/index.d.ts +1 -1
- 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 +59 -11
- 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 +7 -0
- package/dist/user/interaction.d.ts.map +1 -1
- package/dist/user/interaction.js +7 -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 +26 -0
- package/dist/user/synthesize.d.ts.map +1 -1
- package/dist/user/synthesize.js +11 -2
- 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,6 +49,9 @@ 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)
|
|
@@ -428,6 +431,74 @@ 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
|
+
await client.user.submit({ synthesisOutputId, data: { response: 'yes' } });
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
---
|
|
457
|
+
|
|
458
|
+
#### submissionState
|
|
459
|
+
|
|
460
|
+
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.
|
|
461
|
+
|
|
462
|
+
```typescript
|
|
463
|
+
client.user.submissionState(options: {
|
|
464
|
+
synthesisOutputId: string;
|
|
465
|
+
synthesisOutputContentKey?: string;
|
|
466
|
+
}): Promise<SubmissionState>
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
##### Returns
|
|
470
|
+
|
|
471
|
+
- `aggregate`: `{ total, submissionCounts?, byState? }` — `submissionCounts` is keyed by the config's `aggregateField` value (e.g. a poll option)
|
|
472
|
+
- `ownSubmission`: this user's submission, or `null`
|
|
473
|
+
|
|
474
|
+
##### Example
|
|
475
|
+
|
|
476
|
+
```typescript
|
|
477
|
+
const { aggregate, ownSubmission } = await client.user.submissionState({ synthesisOutputId });
|
|
478
|
+
const hasVoted = ownSubmission != null;
|
|
479
|
+
const counts = aggregate.submissionCounts; // { yes: 12, no: 3 }
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
---
|
|
483
|
+
|
|
484
|
+
#### submissionFeed
|
|
485
|
+
|
|
486
|
+
List the public feed of LIVE submissions for a synthesis output (e.g. all contest entries), paginated.
|
|
487
|
+
|
|
488
|
+
```typescript
|
|
489
|
+
client.user.submissionFeed(options: {
|
|
490
|
+
synthesisOutputId: string;
|
|
491
|
+
first?: number;
|
|
492
|
+
after?: string;
|
|
493
|
+
}): Promise<SubmissionFeed>
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
##### Returns
|
|
497
|
+
|
|
498
|
+
- `SubmissionFeed`: `{ cursor, items }` — each item is `{ id, data, files, createdAt }`
|
|
499
|
+
|
|
500
|
+
---
|
|
501
|
+
|
|
431
502
|
#### signal
|
|
432
503
|
|
|
433
504
|
Record user signals (e.g., clicked topic, read article) to inform profile interests. Signals are used to power a user's recommendations.
|
|
@@ -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;
|
|
@@ -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
|
};
|
|
@@ -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;
|
|
@@ -1031,6 +1277,219 @@ export interface paths {
|
|
|
1031
1277
|
patch?: never;
|
|
1032
1278
|
trace?: never;
|
|
1033
1279
|
};
|
|
1280
|
+
"/v1/user/submissions": {
|
|
1281
|
+
parameters: {
|
|
1282
|
+
query?: never;
|
|
1283
|
+
header?: never;
|
|
1284
|
+
path?: never;
|
|
1285
|
+
cookie?: never;
|
|
1286
|
+
};
|
|
1287
|
+
/**
|
|
1288
|
+
* Synthesis - Get User Submission State
|
|
1289
|
+
* @description **GET** `/v1/user/submissions`
|
|
1290
|
+
*
|
|
1291
|
+
* Default: for one submittable piece (`synthesisOutputId`), the public aggregate (total, submissionCounts, counts by state) and this user's own submission (null if none).
|
|
1292
|
+
*
|
|
1293
|
+
* With `list=true`: the public feed of LIVE submissions for that output (paginated), as `{ cursor, items }`.
|
|
1294
|
+
*/
|
|
1295
|
+
get: {
|
|
1296
|
+
parameters: {
|
|
1297
|
+
query: {
|
|
1298
|
+
synthesisOutputId: string;
|
|
1299
|
+
synthesisOutputContentKey?: string;
|
|
1300
|
+
list?: boolean;
|
|
1301
|
+
first?: number;
|
|
1302
|
+
after?: string;
|
|
1303
|
+
};
|
|
1304
|
+
header: {
|
|
1305
|
+
authorization: string;
|
|
1306
|
+
};
|
|
1307
|
+
path?: never;
|
|
1308
|
+
cookie?: never;
|
|
1309
|
+
};
|
|
1310
|
+
requestBody?: never;
|
|
1311
|
+
responses: {
|
|
1312
|
+
/** @description Default Response */
|
|
1313
|
+
200: {
|
|
1314
|
+
headers: {
|
|
1315
|
+
[name: string]: unknown;
|
|
1316
|
+
};
|
|
1317
|
+
content: {
|
|
1318
|
+
"application/json": {
|
|
1319
|
+
success: boolean;
|
|
1320
|
+
data: {
|
|
1321
|
+
[key: string]: unknown;
|
|
1322
|
+
};
|
|
1323
|
+
};
|
|
1324
|
+
};
|
|
1325
|
+
};
|
|
1326
|
+
/** @description Bad request - missing or invalid parameters */
|
|
1327
|
+
400: {
|
|
1328
|
+
headers: {
|
|
1329
|
+
[name: string]: unknown;
|
|
1330
|
+
};
|
|
1331
|
+
content: {
|
|
1332
|
+
"application/json": {
|
|
1333
|
+
/** @example Bad request */
|
|
1334
|
+
error?: string;
|
|
1335
|
+
};
|
|
1336
|
+
};
|
|
1337
|
+
};
|
|
1338
|
+
/** @description Unauthorized errors */
|
|
1339
|
+
401: {
|
|
1340
|
+
headers: {
|
|
1341
|
+
[name: string]: unknown;
|
|
1342
|
+
};
|
|
1343
|
+
content: {
|
|
1344
|
+
"application/json": {
|
|
1345
|
+
/**
|
|
1346
|
+
* @example Unauthorized: No authentication token provided
|
|
1347
|
+
* @enum {string}
|
|
1348
|
+
*/
|
|
1349
|
+
error?: "Unauthorized: No authentication token provided" | "Unauthorized: Token has expired" | "Unauthorized: Invalid token" | "Unauthorized: Authentication failed";
|
|
1350
|
+
};
|
|
1351
|
+
};
|
|
1352
|
+
};
|
|
1353
|
+
/** @description Internal server error */
|
|
1354
|
+
500: {
|
|
1355
|
+
headers: {
|
|
1356
|
+
[name: string]: unknown;
|
|
1357
|
+
};
|
|
1358
|
+
content: {
|
|
1359
|
+
"application/json": {
|
|
1360
|
+
/** @example false */
|
|
1361
|
+
success?: boolean;
|
|
1362
|
+
/** @example Internal server error: An unknown error occurred */
|
|
1363
|
+
error?: string;
|
|
1364
|
+
};
|
|
1365
|
+
};
|
|
1366
|
+
};
|
|
1367
|
+
};
|
|
1368
|
+
};
|
|
1369
|
+
put?: never;
|
|
1370
|
+
/**
|
|
1371
|
+
* Synthesis - Create User Submission
|
|
1372
|
+
* @description **POST** `/v1/user/submissions`
|
|
1373
|
+
*
|
|
1374
|
+
* 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.
|
|
1375
|
+
*/
|
|
1376
|
+
post: {
|
|
1377
|
+
parameters: {
|
|
1378
|
+
query?: never;
|
|
1379
|
+
header: {
|
|
1380
|
+
authorization: string;
|
|
1381
|
+
};
|
|
1382
|
+
path?: never;
|
|
1383
|
+
cookie?: never;
|
|
1384
|
+
};
|
|
1385
|
+
requestBody: {
|
|
1386
|
+
content: {
|
|
1387
|
+
"application/json": {
|
|
1388
|
+
synthesisOutputId: string;
|
|
1389
|
+
synthesisOutputContentKey?: string;
|
|
1390
|
+
data: {
|
|
1391
|
+
[key: string]: unknown;
|
|
1392
|
+
};
|
|
1393
|
+
files?: {
|
|
1394
|
+
field: string;
|
|
1395
|
+
contentType: string;
|
|
1396
|
+
fileName?: string;
|
|
1397
|
+
}[];
|
|
1398
|
+
};
|
|
1399
|
+
};
|
|
1400
|
+
};
|
|
1401
|
+
responses: {
|
|
1402
|
+
/** @description Default Response */
|
|
1403
|
+
200: {
|
|
1404
|
+
headers: {
|
|
1405
|
+
[name: string]: unknown;
|
|
1406
|
+
};
|
|
1407
|
+
content: {
|
|
1408
|
+
"application/json": {
|
|
1409
|
+
success: boolean;
|
|
1410
|
+
data: {
|
|
1411
|
+
submission: {
|
|
1412
|
+
id: string;
|
|
1413
|
+
synthesisConfigId: string;
|
|
1414
|
+
synthesisOutputId: string;
|
|
1415
|
+
synthesisOutputContentKey: string;
|
|
1416
|
+
appUserId: string;
|
|
1417
|
+
state: string;
|
|
1418
|
+
createdAt: string;
|
|
1419
|
+
updatedAt?: string;
|
|
1420
|
+
} & {
|
|
1421
|
+
[key: string]: unknown;
|
|
1422
|
+
};
|
|
1423
|
+
uploads: {
|
|
1424
|
+
field: string;
|
|
1425
|
+
s3Key: string;
|
|
1426
|
+
uploadUrl: string;
|
|
1427
|
+
}[];
|
|
1428
|
+
};
|
|
1429
|
+
};
|
|
1430
|
+
};
|
|
1431
|
+
};
|
|
1432
|
+
/** @description Bad request - missing or invalid parameters */
|
|
1433
|
+
400: {
|
|
1434
|
+
headers: {
|
|
1435
|
+
[name: string]: unknown;
|
|
1436
|
+
};
|
|
1437
|
+
content: {
|
|
1438
|
+
"application/json": {
|
|
1439
|
+
/** @example Bad request */
|
|
1440
|
+
error?: string;
|
|
1441
|
+
};
|
|
1442
|
+
};
|
|
1443
|
+
};
|
|
1444
|
+
/** @description Unauthorized errors */
|
|
1445
|
+
401: {
|
|
1446
|
+
headers: {
|
|
1447
|
+
[name: string]: unknown;
|
|
1448
|
+
};
|
|
1449
|
+
content: {
|
|
1450
|
+
"application/json": {
|
|
1451
|
+
/**
|
|
1452
|
+
* @example Unauthorized: No authentication token provided
|
|
1453
|
+
* @enum {string}
|
|
1454
|
+
*/
|
|
1455
|
+
error?: "Unauthorized: No authentication token provided" | "Unauthorized: Token has expired" | "Unauthorized: Invalid token" | "Unauthorized: Authentication failed";
|
|
1456
|
+
};
|
|
1457
|
+
};
|
|
1458
|
+
};
|
|
1459
|
+
/** @description Not found */
|
|
1460
|
+
404: {
|
|
1461
|
+
headers: {
|
|
1462
|
+
[name: string]: unknown;
|
|
1463
|
+
};
|
|
1464
|
+
content: {
|
|
1465
|
+
"application/json": {
|
|
1466
|
+
/** @example Not found */
|
|
1467
|
+
error?: string;
|
|
1468
|
+
};
|
|
1469
|
+
};
|
|
1470
|
+
};
|
|
1471
|
+
/** @description Internal server error */
|
|
1472
|
+
500: {
|
|
1473
|
+
headers: {
|
|
1474
|
+
[name: string]: unknown;
|
|
1475
|
+
};
|
|
1476
|
+
content: {
|
|
1477
|
+
"application/json": {
|
|
1478
|
+
/** @example false */
|
|
1479
|
+
success?: boolean;
|
|
1480
|
+
/** @example Internal server error: An unknown error occurred */
|
|
1481
|
+
error?: string;
|
|
1482
|
+
};
|
|
1483
|
+
};
|
|
1484
|
+
};
|
|
1485
|
+
};
|
|
1486
|
+
};
|
|
1487
|
+
delete?: never;
|
|
1488
|
+
options?: never;
|
|
1489
|
+
head?: never;
|
|
1490
|
+
patch?: never;
|
|
1491
|
+
trace?: never;
|
|
1492
|
+
};
|
|
1034
1493
|
"/v1/data/assets": {
|
|
1035
1494
|
parameters: {
|
|
1036
1495
|
query?: never;
|
|
@@ -1165,7 +1624,8 @@ export interface paths {
|
|
|
1165
1624
|
requestBody: {
|
|
1166
1625
|
content: {
|
|
1167
1626
|
"application/json": {
|
|
1168
|
-
|
|
1627
|
+
synthesisOutputId: string;
|
|
1628
|
+
synthesisOutputContentKey?: string;
|
|
1169
1629
|
data: {
|
|
1170
1630
|
[key: string]: unknown;
|
|
1171
1631
|
};
|
|
@@ -1189,8 +1649,10 @@ export interface paths {
|
|
|
1189
1649
|
data: {
|
|
1190
1650
|
submission: {
|
|
1191
1651
|
id: string;
|
|
1192
|
-
|
|
1193
|
-
|
|
1652
|
+
synthesisConfigId: string;
|
|
1653
|
+
synthesisOutputId: string;
|
|
1654
|
+
synthesisOutputContentKey: string;
|
|
1655
|
+
appUserId: string;
|
|
1194
1656
|
state: string;
|
|
1195
1657
|
createdAt: string;
|
|
1196
1658
|
updatedAt?: string;
|
|
@@ -1305,7 +1767,17 @@ export interface paths {
|
|
|
1305
1767
|
data: {
|
|
1306
1768
|
cursor: null | string;
|
|
1307
1769
|
items: {
|
|
1308
|
-
|
|
1770
|
+
id: string;
|
|
1771
|
+
data: {
|
|
1772
|
+
[key: string]: unknown;
|
|
1773
|
+
};
|
|
1774
|
+
files: {
|
|
1775
|
+
field: string;
|
|
1776
|
+
contentType: string;
|
|
1777
|
+
fileName?: string;
|
|
1778
|
+
downloadUrl: string;
|
|
1779
|
+
}[];
|
|
1780
|
+
createdAt: string;
|
|
1309
1781
|
}[];
|
|
1310
1782
|
};
|
|
1311
1783
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ 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';
|
|
19
|
+
export type { CreateUserSubmissionRequest, CreateUserSubmissionResponse, ListUserSubmissionsRequest, ListUserSubmissionsResponse, PublicSubmission, SubmissionAggregate, SubmissionFeed, SubmissionFile, SubmissionState, SubmitRequest, SubmitResponse, } from './user/submissions.js';
|
|
20
20
|
export type { 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';
|
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,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"}
|