@placeos/ts-client 4.7.1 → 4.7.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.
@@ -45,6 +45,11 @@ export declare function addSignageMedia(form_data: Partial<SignageMedia>): impor
45
45
  * @param query_params Query parameters to add the to request URL
46
46
  */
47
47
  export declare function removeSignageMedia(id: string, query_params?: Record<string, any>): import('rxjs').Observable<import('../utilities/types').HashMap<any>>;
48
+ /**
49
+ * Get the thumbnail URL for a media item.
50
+ * This is the endpoint resolves to the image for the media item's thumbnail.
51
+ */
52
+ export declare function mediaThumbnail(id: string): string;
48
53
  /**
49
54
  * Query the available playlists
50
55
  * @param query_params Query parameters to add the to request URL
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.7.1",
2
+ "version": "4.7.2",
3
3
  "license": "MIT",
4
4
  "name": "@placeos/ts-client",
5
5
  "author": "Alex Sorafumo <alex@place.tech>",
@@ -1,4 +1,5 @@
1
1
  import { create, query, remove, show, update } from '../api';
2
+ import { apiEndpoint } from '../auth';
2
3
  import { HttpJsonOptions } from '../http/interfaces';
3
4
  import { task } from '../resources/functions';
4
5
  import { SignageMediaQueryOptions, SignageMetrics } from './interfaces';
@@ -117,6 +118,14 @@ export function removeSignageMedia(
117
118
  return remove({ id, query_params, path: MEDIA_PATH });
118
119
  }
119
120
 
121
+ /**
122
+ * Get the thumbnail URL for a media item.
123
+ * This is the endpoint resolves to the image for the media item's thumbnail.
124
+ */
125
+ export function mediaThumbnail(id: string): string {
126
+ return `${apiEndpoint()}/${MEDIA_PATH}/${id}/thumbnail`;
127
+ }
128
+
120
129
  /**
121
130
  * @private
122
131
  */