@jaaq/jaaq-sdk-js 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/index.cjs +7 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/dist/jaaq-sdk.min.js +1 -1
- package/dist/jaaq-sdk.min.js.map +1 -1
- package/dist/ui/index.cjs +7 -2
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.ts +4 -0
- package/dist/ui/index.mjs +7 -2
- package/dist/ui/index.mjs.map +1 -1
- package/dist/ui/jaaq-ui-bundled.min.js +2 -2
- package/dist/ui/jaaq-ui-bundled.min.js.map +1 -1
- package/dist/ui/jaaq-ui.min.js +2 -2
- package/dist/ui/jaaq-ui.min.js.map +1 -1
- package/dist/ui/react/index.cjs +7 -2
- package/dist/ui/react/index.cjs.map +1 -1
- package/dist/ui/react/index.d.ts +4 -0
- package/dist/ui/react/index.mjs +7 -2
- package/dist/ui/react/index.mjs.map +1 -1
- package/dist/ui/react/jaaq-ui-react.min.js +2 -2
- package/dist/ui/react/jaaq-ui-react.min.js.map +1 -1
- package/dist/ui/vanilla/index.cjs +7 -2
- package/dist/ui/vanilla/index.cjs.map +1 -1
- package/dist/ui/vanilla/index.d.ts +4 -0
- package/dist/ui/vanilla/index.mjs +7 -2
- package/dist/ui/vanilla/index.mjs.map +1 -1
- package/dist/ui/vanilla/jaaq-vanilla-bundled.min.js +2 -2
- package/dist/ui/vanilla/jaaq-vanilla-bundled.min.js.map +1 -1
- package/dist/ui/vanilla/jaaq-vanilla.min.js +2 -2
- package/dist/ui/vanilla/jaaq-vanilla.min.js.map +1 -1
- package/dist/ui/webcomponents/index.cjs +7 -2
- package/dist/ui/webcomponents/index.cjs.map +1 -1
- package/dist/ui/webcomponents/index.d.ts +4 -0
- package/dist/ui/webcomponents/index.mjs +7 -2
- package/dist/ui/webcomponents/index.mjs.map +1 -1
- package/dist/ui/webcomponents/jaaq-webcomponents-bundled.min.js +2 -2
- package/dist/ui/webcomponents/jaaq-webcomponents-bundled.min.js.map +1 -1
- package/dist/ui/webcomponents/jaaq-webcomponents.min.js +2 -2
- package/dist/ui/webcomponents/jaaq-webcomponents.min.js.map +1 -1
- package/package.json +7 -7
package/dist/ui/react/index.d.ts
CHANGED
|
@@ -85,6 +85,9 @@ type CollectionV2DTO = {
|
|
|
85
85
|
} | null;
|
|
86
86
|
videoGroups: VideoGroupV2DTO[];
|
|
87
87
|
};
|
|
88
|
+
type CollectionSummaryV2DTO = Pick<CollectionV2DTO, 'id' | 'name'> & {
|
|
89
|
+
series: string[];
|
|
90
|
+
};
|
|
88
91
|
type GetCollectionByIdV2Options = {
|
|
89
92
|
subdomain?: string;
|
|
90
93
|
};
|
|
@@ -115,6 +118,7 @@ type VideosResourceV2 = {
|
|
|
115
118
|
type CollectionsResourceV2 = {
|
|
116
119
|
list(): Promise<CollectionV2DTO[]>;
|
|
117
120
|
getById(_id: string, _options?: GetCollectionByIdV2Options): Promise<CollectionV2DTO>;
|
|
121
|
+
getSummaryById(_id: string, _options?: GetCollectionByIdV2Options): Promise<CollectionSummaryV2DTO>;
|
|
118
122
|
};
|
|
119
123
|
|
|
120
124
|
interface SDKConfig {
|
package/dist/ui/react/index.mjs
CHANGED
|
@@ -100,6 +100,7 @@ function createVideosResourceV2(http) {
|
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
const subdomainQuery = (options) => options?.subdomain !== undefined ? `?subdomain=${encodeURIComponent(options.subdomain)}` : '';
|
|
103
104
|
function createCollectionsResourceV2(http) {
|
|
104
105
|
return {
|
|
105
106
|
async list() {
|
|
@@ -108,8 +109,12 @@ function createCollectionsResourceV2(http) {
|
|
|
108
109
|
return response.collections;
|
|
109
110
|
},
|
|
110
111
|
async getById(id, options) {
|
|
111
|
-
const
|
|
112
|
-
const
|
|
112
|
+
const path = `/collections/${encodeURIComponent(id)}${subdomainQuery(options)}`;
|
|
113
|
+
const response = await http.get(path);
|
|
114
|
+
return response.collection;
|
|
115
|
+
},
|
|
116
|
+
async getSummaryById(id, options) {
|
|
117
|
+
const path = `/collections/${encodeURIComponent(id)}/summary${subdomainQuery(options)}`;
|
|
113
118
|
const response = await http.get(path);
|
|
114
119
|
return response.collection;
|
|
115
120
|
},
|