@fastpix/fastpix-node 2.0.1 → 2.0.3

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.
Files changed (41) hide show
  1. package/LICENSE +21 -201
  2. package/README.md +273 -155
  3. package/dist/commonjs/funcs/signingKeysGetSigningKeyById.d.ts +2 -2
  4. package/dist/commonjs/funcs/signingKeysGetSigningKeyById.js +2 -2
  5. package/dist/commonjs/models/operations/getdrmconfiguration.d.ts +2 -2
  6. package/dist/commonjs/models/operations/getdrmconfiguration.d.ts.map +1 -1
  7. package/dist/commonjs/models/operations/getdrmconfiguration.js +2 -2
  8. package/dist/commonjs/models/operations/getdrmconfiguration.js.map +1 -1
  9. package/dist/commonjs/sdk/signingkeys.d.ts +2 -2
  10. package/dist/commonjs/sdk/signingkeys.js +2 -2
  11. package/dist/esm/funcs/signingKeysGetSigningKeyById.d.ts +2 -2
  12. package/dist/esm/funcs/signingKeysGetSigningKeyById.js +2 -2
  13. package/dist/esm/models/operations/getdrmconfiguration.d.ts +2 -2
  14. package/dist/esm/models/operations/getdrmconfiguration.d.ts.map +1 -1
  15. package/dist/esm/models/operations/getdrmconfiguration.js +2 -2
  16. package/dist/esm/models/operations/getdrmconfiguration.js.map +1 -1
  17. package/dist/esm/sdk/signingkeys.d.ts +2 -2
  18. package/dist/esm/sdk/signingkeys.js +2 -2
  19. package/package.json +2 -2
  20. package/samples/ai/ai-features.ts +194 -0
  21. package/samples/analytics/dimensions.ts +113 -0
  22. package/samples/analytics/errors.ts +133 -0
  23. package/samples/analytics/metrics.ts +117 -0
  24. package/samples/analytics/views.ts +120 -0
  25. package/samples/common/config.ts +84 -0
  26. package/samples/common/setup.ts +42 -0
  27. package/samples/comprehensive-example.ts +267 -0
  28. package/samples/index.ts +224 -0
  29. package/samples/live/live-playback.ts +104 -0
  30. package/samples/live/manage-live-stream.ts +176 -0
  31. package/samples/live/start-live-stream.ts +91 -0
  32. package/samples/media/input-video.ts +65 -0
  33. package/samples/media/manage-videos.ts +166 -0
  34. package/samples/media/playback.ts +89 -0
  35. package/samples/media/playlist.ts +201 -0
  36. package/samples/package.json +51 -0
  37. package/samples/security/drm-configurations.ts +125 -0
  38. package/samples/security/signing-keys.ts +154 -0
  39. package/src/funcs/signingKeysGetSigningKeyById.ts +2 -2
  40. package/src/models/operations/getdrmconfiguration.ts +4 -4
  41. package/src/sdk/signingkeys.ts +2 -2
@@ -0,0 +1,166 @@
1
+ /**
2
+ * Manage Videos API Samples
3
+ *
4
+ * This file demonstrates how to use the Manage Videos API to:
5
+ * - List all media
6
+ * - Get media by ID
7
+ * - Update media
8
+ * - Delete media
9
+ * - Add/update/delete tracks
10
+ * - Generate subtitles
11
+ *
12
+ * Run this sample:
13
+ * npx tsx media/manage-videos.ts
14
+ */
15
+
16
+ import { createFastpixClient, runSample } from "../common/setup.js";
17
+ import { config, logResponse, logError } from "../common/config.js";
18
+
19
+ let createdMediaId: string | undefined;
20
+
21
+ async function listMedia() {
22
+ const fastpix = createFastpixClient();
23
+
24
+ const result = await fastpix.manageVideos.listMedia({
25
+ limit: 10,
26
+ offset: 0,
27
+ });
28
+
29
+ logResponse("List Media", result);
30
+ return result;
31
+ }
32
+
33
+ async function getMediaById() {
34
+ if (!createdMediaId) {
35
+ console.log("⚠️ No media ID available. Run createMediaFromUrl first.");
36
+ return;
37
+ }
38
+
39
+ const fastpix = createFastpixClient();
40
+
41
+ const result = await fastpix.manageVideos.getMedia({
42
+ mediaId: createdMediaId,
43
+ });
44
+
45
+ logResponse("Get Media by ID", result);
46
+ return result;
47
+ }
48
+
49
+ async function updateMedia() {
50
+ if (!createdMediaId) {
51
+ console.log("⚠️ No media ID available. Run createMediaFromUrl first.");
52
+ return;
53
+ }
54
+
55
+ const fastpix = createFastpixClient();
56
+
57
+ const result = await fastpix.manageVideos.updatedMedia({
58
+ mediaId: createdMediaId,
59
+ requestBody: {
60
+ metadata: {
61
+ title: "Updated Sample Video",
62
+ description: "This video has been updated via SDK",
63
+ category: "updated-sample",
64
+ },
65
+ },
66
+ });
67
+
68
+ logResponse("Update Media", result);
69
+ return result;
70
+ }
71
+
72
+ async function addMediaTrack() {
73
+ if (!createdMediaId) {
74
+ console.log("⚠️ No media ID available. Run createMediaFromUrl first.");
75
+ return;
76
+ }
77
+
78
+ const fastpix = createFastpixClient();
79
+
80
+ const result = await fastpix.manageVideos.addMediaTrack({
81
+ mediaId: createdMediaId,
82
+ requestBody: {
83
+ type: "subtitle",
84
+ language: "en",
85
+ name: "English Subtitles",
86
+ },
87
+ });
88
+
89
+ logResponse("Add Media Track", result);
90
+ return result;
91
+ }
92
+
93
+ async function generateSubtitleTrack() {
94
+ if (!createdMediaId) {
95
+ console.log("⚠️ No media ID available. Run createMediaFromUrl first.");
96
+ return;
97
+ }
98
+
99
+ const fastpix = createFastpixClient();
100
+
101
+ const result = await fastpix.manageVideos.generateSubtitleTrack({
102
+ mediaId: createdMediaId,
103
+ requestBody: {
104
+ language: "en",
105
+ name: "Auto-generated English Subtitles",
106
+ },
107
+ });
108
+
109
+ logResponse("Generate Subtitle Track", result);
110
+ return result;
111
+ }
112
+
113
+ async function deleteMedia() {
114
+ if (!createdMediaId) {
115
+ console.log("⚠️ No media ID available. Run createMediaFromUrl first.");
116
+ return;
117
+ }
118
+
119
+ const fastpix = createFastpixClient();
120
+
121
+ const result = await fastpix.manageVideos.deleteMedia({
122
+ mediaId: createdMediaId,
123
+ });
124
+
125
+ logResponse("Delete Media", result);
126
+ createdMediaId = undefined; // Reset the ID since media is deleted
127
+ return result;
128
+ }
129
+
130
+ async function main() {
131
+ console.log("🎬 Manage Videos API Samples");
132
+ console.log("=============================");
133
+
134
+ // First, create a media item to work with
135
+ console.log("\n📹 Creating sample media...");
136
+ const fastpix = createFastpixClient();
137
+ const createResult = await fastpix.inputVideo.createMedia({
138
+ inputs: [
139
+ {
140
+ type: "video",
141
+ url: config.sampleVideoUrl,
142
+ },
143
+ ],
144
+ metadata: {
145
+ title: "Sample Video for Management",
146
+ description: "This video will be used to demonstrate management operations",
147
+ },
148
+ accessPolicy: "public",
149
+ });
150
+
151
+ if (createResult.createMediaSuccessResponse?.data?.id) {
152
+ createdMediaId = createResult.createMediaSuccessResponse.data.id;
153
+ console.log(`✅ Created media with ID: ${createdMediaId}`);
154
+ }
155
+
156
+ await runSample("List Media", listMedia);
157
+ await runSample("Get Media by ID", getMediaById);
158
+ await runSample("Update Media", updateMedia);
159
+ await runSample("Add Media Track", addMediaTrack);
160
+ await runSample("Generate Subtitle Track", generateSubtitleTrack);
161
+
162
+ // Uncomment to delete the media (be careful!)
163
+ // await runSample("Delete Media", deleteMedia);
164
+ }
165
+
166
+ main().catch(console.error);
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Playback API Samples
3
+ *
4
+ * This file demonstrates how to use the Playback API to:
5
+ * - Create playback IDs
6
+ * - Get playback ID details
7
+ * - Delete playback IDs
8
+ *
9
+ * Run this sample:
10
+ * npx tsx media/playback.ts
11
+ */
12
+
13
+ import { createFastpixClient, runSample } from "../common/setup.js";
14
+ import { config, logResponse } from "../common/config.js";
15
+
16
+ let createdPlaybackId: string | undefined;
17
+
18
+ async function createPlaybackId() {
19
+ const fastpix = createFastpixClient();
20
+
21
+ // First, get a media item to create playback ID for
22
+ const mediaList = await fastpix.manageVideos.listMedia({ limit: 1 });
23
+ const mediaId = mediaList.listMediaSuccessResponse?.data?.media?.[0]?.id;
24
+
25
+ if (!mediaId) {
26
+ console.log("⚠️ No media found. Please create some media first.");
27
+ return;
28
+ }
29
+
30
+ const result = await fastpix.playback.createMediaPlaybackId({
31
+ mediaId: mediaId,
32
+ requestBody: {
33
+ policy: "public",
34
+ },
35
+ });
36
+
37
+ if (result.createMediaPlaybackIdSuccessResponse?.data?.id) {
38
+ createdPlaybackId = result.createMediaPlaybackIdSuccessResponse.data.id;
39
+ }
40
+
41
+ logResponse("Create Playback ID", result);
42
+ return result;
43
+ }
44
+
45
+ async function getPlaybackId() {
46
+ if (!createdPlaybackId) {
47
+ console.log("⚠️ No playback ID available. Run createPlaybackId first.");
48
+ return;
49
+ }
50
+
51
+ const fastpix = createFastpixClient();
52
+
53
+ const result = await fastpix.playback.getPlaybackId({
54
+ playbackId: createdPlaybackId,
55
+ });
56
+
57
+ logResponse("Get Playback ID", result);
58
+ return result;
59
+ }
60
+
61
+ async function deletePlaybackId() {
62
+ if (!createdPlaybackId) {
63
+ console.log("⚠️ No playback ID available. Run createPlaybackId first.");
64
+ return;
65
+ }
66
+
67
+ const fastpix = createFastpixClient();
68
+
69
+ const result = await fastpix.playback.deleteMediaPlaybackId({
70
+ playbackId: createdPlaybackId,
71
+ });
72
+
73
+ logResponse("Delete Playback ID", result);
74
+ createdPlaybackId = undefined; // Reset the ID since playback ID is deleted
75
+ return result;
76
+ }
77
+
78
+ async function main() {
79
+ console.log("▶️ Playback API Samples");
80
+ console.log("========================");
81
+
82
+ await runSample("Create Playback ID", createPlaybackId);
83
+ await runSample("Get Playback ID", getPlaybackId);
84
+
85
+ // Uncomment to delete the playback ID
86
+ // await runSample("Delete Playback ID", deletePlaybackId);
87
+ }
88
+
89
+ main().catch(console.error);
@@ -0,0 +1,201 @@
1
+ /**
2
+ * Playlist API Samples
3
+ *
4
+ * This file demonstrates how to use the Playlist API to:
5
+ * - Create playlists
6
+ * - List playlists
7
+ * - Get playlist by ID
8
+ * - Update playlists
9
+ * - Add/remove/reorder media in playlists
10
+ * - Delete playlists
11
+ *
12
+ * Run this sample:
13
+ * npx tsx media/playlist.ts
14
+ */
15
+
16
+ import { createFastpixClient, runSample } from "../common/setup.js";
17
+ import { config, logResponse } from "../common/config.js";
18
+
19
+ let createdPlaylistId: string | undefined;
20
+ let mediaIds: string[] = [];
21
+
22
+ async function createPlaylist() {
23
+ const fastpix = createFastpixClient();
24
+
25
+ const result = await fastpix.playlist.createAPlaylist({
26
+ requestBody: {
27
+ name: config.samplePlaylistName,
28
+ description: config.samplePlaylistDescription,
29
+ metadata: {
30
+ category: "sample",
31
+ created_by: "sdk",
32
+ },
33
+ },
34
+ });
35
+
36
+ if (result.createAPlaylistSuccessResponse?.data?.id) {
37
+ createdPlaylistId = result.createAPlaylistSuccessResponse.data.id;
38
+ }
39
+
40
+ logResponse("Create Playlist", result);
41
+ return result;
42
+ }
43
+
44
+ async function listPlaylists() {
45
+ const fastpix = createFastpixClient();
46
+
47
+ const result = await fastpix.playlist.getAllPlaylists({
48
+ limit: 10,
49
+ offset: 0,
50
+ });
51
+
52
+ logResponse("List Playlists", result);
53
+ return result;
54
+ }
55
+
56
+ async function getPlaylistById() {
57
+ if (!createdPlaylistId) {
58
+ console.log("⚠️ No playlist ID available. Run createPlaylist first.");
59
+ return;
60
+ }
61
+
62
+ const fastpix = createFastpixClient();
63
+
64
+ const result = await fastpix.playlist.getPlaylistById({
65
+ playlistId: createdPlaylistId,
66
+ });
67
+
68
+ logResponse("Get Playlist by ID", result);
69
+ return result;
70
+ }
71
+
72
+ async function updatePlaylist() {
73
+ if (!createdPlaylistId) {
74
+ console.log("⚠️ No playlist ID available. Run createPlaylist first.");
75
+ return;
76
+ }
77
+
78
+ const fastpix = createFastpixClient();
79
+
80
+ const result = await fastpix.playlist.updateAPlaylist({
81
+ playlistId: createdPlaylistId,
82
+ requestBody: {
83
+ name: "Updated Sample Playlist",
84
+ description: "This playlist has been updated via SDK",
85
+ metadata: {
86
+ category: "updated-sample",
87
+ updated_by: "sdk",
88
+ },
89
+ },
90
+ });
91
+
92
+ logResponse("Update Playlist", result);
93
+ return result;
94
+ }
95
+
96
+ async function addMediaToPlaylist() {
97
+ if (!createdPlaylistId) {
98
+ console.log("⚠️ No playlist ID available. Run createPlaylist first.");
99
+ return;
100
+ }
101
+
102
+ const fastpix = createFastpixClient();
103
+
104
+ // First, get some media to add to the playlist
105
+ const mediaList = await fastpix.manageVideos.listMedia({ limit: 2 });
106
+ const mediaItems = mediaList.listMediaSuccessResponse?.data?.media || [];
107
+
108
+ if (mediaItems.length === 0) {
109
+ console.log("⚠️ No media found. Please create some media first.");
110
+ return;
111
+ }
112
+
113
+ // Add first media item to playlist
114
+ const mediaId = mediaItems[0].id;
115
+ mediaIds.push(mediaId);
116
+
117
+ const result = await fastpix.playlist.addMediaToPlaylist({
118
+ playlistId: createdPlaylistId,
119
+ requestBody: {
120
+ mediaId: mediaId,
121
+ },
122
+ });
123
+
124
+ logResponse("Add Media to Playlist", result);
125
+ return result;
126
+ }
127
+
128
+ async function changeMediaOrder() {
129
+ if (!createdPlaylistId || mediaIds.length === 0) {
130
+ console.log("⚠️ No playlist or media available. Run createPlaylist and addMediaToPlaylist first.");
131
+ return;
132
+ }
133
+
134
+ const fastpix = createFastpixClient();
135
+
136
+ const result = await fastpix.playlist.changeMediaOrderInPlaylist({
137
+ playlistId: createdPlaylistId,
138
+ requestBody: {
139
+ mediaId: mediaIds[0],
140
+ order: 1,
141
+ },
142
+ });
143
+
144
+ logResponse("Change Media Order", result);
145
+ return result;
146
+ }
147
+
148
+ async function deleteMediaFromPlaylist() {
149
+ if (!createdPlaylistId || mediaIds.length === 0) {
150
+ console.log("⚠️ No playlist or media available. Run createPlaylist and addMediaToPlaylist first.");
151
+ return;
152
+ }
153
+
154
+ const fastpix = createFastpixClient();
155
+
156
+ const result = await fastpix.playlist.deleteMediaFromPlaylist({
157
+ playlistId: createdPlaylistId,
158
+ requestBody: {
159
+ mediaId: mediaIds[0],
160
+ },
161
+ });
162
+
163
+ logResponse("Delete Media from Playlist", result);
164
+ mediaIds = []; // Reset media IDs
165
+ return result;
166
+ }
167
+
168
+ async function deletePlaylist() {
169
+ if (!createdPlaylistId) {
170
+ console.log("⚠️ No playlist ID available. Run createPlaylist first.");
171
+ return;
172
+ }
173
+
174
+ const fastpix = createFastpixClient();
175
+
176
+ const result = await fastpix.playlist.deleteAPlaylist({
177
+ playlistId: createdPlaylistId,
178
+ });
179
+
180
+ logResponse("Delete Playlist", result);
181
+ createdPlaylistId = undefined; // Reset the ID since playlist is deleted
182
+ return result;
183
+ }
184
+
185
+ async function main() {
186
+ console.log("📋 Playlist API Samples");
187
+ console.log("=======================");
188
+
189
+ await runSample("Create Playlist", createPlaylist);
190
+ await runSample("List Playlists", listPlaylists);
191
+ await runSample("Get Playlist by ID", getPlaylistById);
192
+ await runSample("Update Playlist", updatePlaylist);
193
+ await runSample("Add Media to Playlist", addMediaToPlaylist);
194
+ await runSample("Change Media Order", changeMediaOrder);
195
+ await runSample("Delete Media from Playlist", deleteMediaFromPlaylist);
196
+
197
+ // Uncomment to delete the playlist (be careful!)
198
+ // await runSample("Delete Playlist", deletePlaylist);
199
+ }
200
+
201
+ main().catch(console.error);
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@fastpix/fastpix-node-samples",
3
+ "version": "1.0.0",
4
+ "description": "Sample code demonstrating FastPix Node.js SDK usage",
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "cd .. && npm run build",
8
+ "media": "npx tsx media/*.ts",
9
+ "live": "npx tsx live/*.ts",
10
+ "analytics": "npx tsx analytics/*.ts",
11
+ "ai": "npx tsx ai/*.ts",
12
+ "security": "npx tsx security/*.ts",
13
+ "all": "npx tsx */*.ts",
14
+ "input-video": "npx tsx media/input-video.ts",
15
+ "manage-videos": "npx tsx media/manage-videos.ts",
16
+ "playback": "npx tsx media/playback.ts",
17
+ "playlist": "npx tsx media/playlist.ts",
18
+ "start-live-stream": "npx tsx live/start-live-stream.ts",
19
+ "manage-live-stream": "npx tsx live/manage-live-stream.ts",
20
+ "live-playback": "npx tsx live/live-playback.ts",
21
+ "views": "npx tsx analytics/views.ts",
22
+ "metrics": "npx tsx analytics/metrics.ts",
23
+ "dimensions": "npx tsx analytics/dimensions.ts",
24
+ "errors": "npx tsx analytics/errors.ts",
25
+ "ai-features": "npx tsx ai/ai-features.ts",
26
+ "signing-keys": "npx tsx security/signing-keys.ts",
27
+ "drm-configurations": "npx tsx security/drm-configurations.ts"
28
+ },
29
+ "keywords": [
30
+ "fastpix",
31
+ "video",
32
+ "streaming",
33
+ "sdk",
34
+ "samples",
35
+ "examples"
36
+ ],
37
+ "author": "FastPix",
38
+ "license": "MIT",
39
+ "dependencies": {
40
+ "@fastpix/fastpix-node": "file:..",
41
+ "dotenv": "^16.4.5"
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "^20.0.0",
45
+ "tsx": "^4.7.0",
46
+ "typescript": "^5.0.0"
47
+ },
48
+ "engines": {
49
+ "node": ">=18.0.0"
50
+ }
51
+ }
@@ -0,0 +1,125 @@
1
+ /**
2
+ * DRM Configurations API Samples
3
+ *
4
+ * This file demonstrates how to use the DRM Configurations API to:
5
+ * - List DRM configurations
6
+ * - Get DRM configuration by ID
7
+ *
8
+ * Run this sample:
9
+ * npx tsx security/drm-configurations.ts
10
+ */
11
+
12
+ import { createFastpixClient, runSample } from "../common/setup.js";
13
+ import { logResponse } from "../common/config.js";
14
+
15
+ async function listDrmConfigurations() {
16
+ const fastpix = createFastpixClient();
17
+
18
+ const result = await fastpix.drmConfigurations.getDrmConfiguration();
19
+
20
+ logResponse("List DRM Configurations", result);
21
+ return result;
22
+ }
23
+
24
+ async function getDrmConfigurationById() {
25
+ const fastpix = createFastpixClient();
26
+
27
+ // First, get available DRM configurations
28
+ const configs = await fastpix.drmConfigurations.getDrmConfiguration();
29
+ const configId = configs.getDrmConfigurationSuccessResponse?.data?.configurations?.[0]?.id;
30
+
31
+ if (!configId) {
32
+ console.log("⚠️ No DRM configurations found.");
33
+ return;
34
+ }
35
+
36
+ const result = await fastpix.drmConfigurations.getDrmConfigurationById({
37
+ configId: configId,
38
+ });
39
+
40
+ logResponse(`Get DRM Configuration by ID (${configId})`, result);
41
+ return result;
42
+ }
43
+
44
+ async function exploreDrmConfigurations() {
45
+ const fastpix = createFastpixClient();
46
+
47
+ const result = await fastpix.drmConfigurations.getDrmConfiguration();
48
+ const configurations = result.getDrmConfigurationSuccessResponse?.data?.configurations || [];
49
+
50
+ console.log("\n🔒 DRM Configurations Overview:");
51
+ console.log("===============================");
52
+ console.log(`Found ${configurations.length} DRM configurations:`);
53
+
54
+ for (const config of configurations) {
55
+ console.log(`\n📋 Configuration: ${config.name || 'Unnamed'}`);
56
+ console.log(` ID: ${config.id}`);
57
+ console.log(` Type: ${config.type || 'Unknown'}`);
58
+ console.log(` Status: ${config.status || 'Unknown'}`);
59
+
60
+ if (config.description) {
61
+ console.log(` Description: ${config.description}`);
62
+ }
63
+
64
+ if (config.supportedFormats) {
65
+ console.log(` Supported Formats: ${config.supportedFormats.join(', ')}`);
66
+ }
67
+ }
68
+
69
+ return result;
70
+ }
71
+
72
+ async function getDetailedDrmInfo() {
73
+ const fastpix = createFastpixClient();
74
+
75
+ // Get all configurations
76
+ const configs = await fastpix.drmConfigurations.getDrmConfiguration();
77
+ const configurations = configs.getDrmConfigurationSuccessResponse?.data?.configurations || [];
78
+
79
+ if (configurations.length === 0) {
80
+ console.log("⚠️ No DRM configurations available.");
81
+ return;
82
+ }
83
+
84
+ console.log("\n🔍 Detailed DRM Configuration Information:");
85
+ console.log("==========================================");
86
+
87
+ // Get detailed info for each configuration
88
+ for (const config of configurations.slice(0, 3)) { // Limit to first 3 for demo
89
+ try {
90
+ const detailedConfig = await fastpix.drmConfigurations.getDrmConfigurationById({
91
+ configId: config.id!,
92
+ });
93
+
94
+ console.log(`\n📊 ${config.name || 'Configuration'} (${config.id}):`);
95
+ console.log(` Type: ${detailedConfig.data?.type || 'Unknown'}`);
96
+ console.log(` Status: ${detailedConfig.data?.status || 'Unknown'}`);
97
+ console.log(` Created: ${detailedConfig.data?.createdAt || 'Unknown'}`);
98
+ console.log(` Updated: ${detailedConfig.data?.updatedAt || 'Unknown'}`);
99
+
100
+ if (detailedConfig.data?.settings) {
101
+ console.log(` Settings: ${JSON.stringify(detailedConfig.data.settings, null, 2)}`);
102
+ }
103
+
104
+ if (detailedConfig.data?.capabilities) {
105
+ console.log(` Capabilities: ${detailedConfig.data.capabilities.join(', ')}`);
106
+ }
107
+ } catch (error) {
108
+ console.log(` ❌ Error getting details for ${config.id}: ${error}`);
109
+ }
110
+ }
111
+
112
+ return configs;
113
+ }
114
+
115
+ async function main() {
116
+ console.log("🔒 DRM Configurations API Samples");
117
+ console.log("===================================");
118
+
119
+ await runSample("List DRM Configurations", listDrmConfigurations);
120
+ await runSample("Get DRM Configuration by ID", getDrmConfigurationById);
121
+ await runSample("Explore DRM Configurations", exploreDrmConfigurations);
122
+ await runSample("Get Detailed DRM Info", getDetailedDrmInfo);
123
+ }
124
+
125
+ main().catch(console.error);