Skip to content

Commit f605f26

Browse files
authored
feat: migrate Zod to pure TS w/ JSDoc, improve type safety and simplify parsing (#217)
# Description <!-- Include a summary of the change made and also list the dependencies that are required if any --> This PR migrates the repo off of Zod schemas toward pure TS with JSDoc annotations that can eventually be used to extract metadata for display in docs. Generally the external behavior should be identical, with obvious exceptions where schema entry points are no longer available etc., so this would constitute a breaking change for consumers relying on those entrypoints or whose inputs may no longer be valid with new type safety around video/image options. I've also updated all the tests to `.ts` so we can be sure the types for the API are working as we expect going forward. Although all the tests are passing, the doc generation issue remains unsolved, causing the repo-wide build to fail, so that will need to be updated to use a JSDoc parsing tool. However, it should be quite straightforward to wire that up in place of the previous Zod-embedded metadata. For now, I'm opening this against the `beta` branch so the required JSDoc parsing logic can be added and other changes can be experimented with before broader consumption. ## Issue Ticket Number N/A <!-- Specify above which issue this fixes by referencing the issue number (`#<ISSUE_NUMBER>`) or issue URL. --> <!-- Example: Fixes https://github.com/colbyfayock/cloudinary-util/issues/<ISSUE_NUMBER> --> ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [X] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Fix or improve the documentation - [X] This change requires a documentation update # Checklist (Still a draft, need to figure out how to work around missing schemas in build) <!-- These must all be followed and checked. --> - [ ] I have followed the contributing guidelines of this project as mentioned in [CONTRIBUTING.md](/CONTRIBUTING.md) - [ ] I have created an [issue](https://github.com/colbyfayock/cloudinary-util/issues) ticket for this PR - [ ] I have checked to ensure there aren't other open [Pull Requests](https://github.com/colbyfayock/cloudinary-util/pulls) for the same update/change? - [ ] I have performed a self-review of my own code - [ ] I have run tests locally to ensure they all pass - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes needed to the documentation BREAKING CHANGES: removes zod schemas, refactors type system
1 parent d4a49ee commit f605f26

File tree

102 files changed

+5281
-5587
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+5281
-5587
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@ module.exports = defineConfig({
3838
"@typescript-eslint/ban-types": "off",
3939
"@typescript-eslint/no-explicit-any": "off",
4040
"@typescript-eslint/no-non-null-assertion": "off",
41+
"@typescript-eslint/no-namespace": ["warn", { allowDeclarations: true }],
4142
},
4243
});

docs/src/lib/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
export function sortByKey(
77
array: Array<object> = [],
88
key: string,
9-
type: string = "asc"
9+
type: string = "asc",
1010
) {
1111
function compare(a: object, b: object) {
1212
let keyA = a[key];

packages/types/CHANGELOG.md

Lines changed: 24 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,163 +1,141 @@
11
# [@cloudinary-util/types-v1.5.11](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.10...@cloudinary-util/types-v1.5.11) (2024-10-07)
22

3-
43
### Bug Fixes
54

6-
* Add cloudinaryAnalytics to Video Player types [#171](https://github.com/cloudinary-community/cloudinary-util/issues/171) ([#208](https://github.com/cloudinary-community/cloudinary-util/issues/208)) ([60da2de](https://github.com/cloudinary-community/cloudinary-util/commit/60da2de13ae511fd21805b9e1d510be627ce3de7))
5+
- Add cloudinaryAnalytics to Video Player types [#171](https://github.com/cloudinary-community/cloudinary-util/issues/171) ([#208](https://github.com/cloudinary-community/cloudinary-util/issues/208)) ([60da2de](https://github.com/cloudinary-community/cloudinary-util/commit/60da2de13ae511fd21805b9e1d510be627ce3de7))
76

87
# [@cloudinary-util/types-v1.5.10](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.9...@cloudinary-util/types-v1.5.10) (2024-10-04)
98

10-
119
### Bug Fixes
1210

13-
* Adds videojs dispose method to Video Player type ([2fd75c1](https://github.com/cloudinary-community/cloudinary-util/commit/2fd75c1c6ceac2496f2fa258d466e1e0d2d1f9cd))
11+
- Adds videojs dispose method to Video Player type ([2fd75c1](https://github.com/cloudinary-community/cloudinary-util/commit/2fd75c1c6ceac2496f2fa258d466e1e0d2d1f9cd))
1412

1513
# [@cloudinary-util/types-v1.5.9](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.8...@cloudinary-util/types-v1.5.9) (2024-09-16)
1614

17-
1815
### Bug Fixes
1916

20-
* fixing player text track options ([a03577d](https://github.com/cloudinary-community/cloudinary-util/commit/a03577d60589626d9b1d6eed098e7afb07eaf0d1))
17+
- fixing player text track options ([a03577d](https://github.com/cloudinary-community/cloudinary-util/commit/a03577d60589626d9b1d6eed098e7afb07eaf0d1))
2118

2219
# [@cloudinary-util/types-v1.5.8](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.7...@cloudinary-util/types-v1.5.8) (2024-09-13)
2320

24-
2521
### Bug Fixes
2622

27-
* adding textTracks types to video player ([3b766a3](https://github.com/cloudinary-community/cloudinary-util/commit/3b766a37a3ffec17507a79c1bd6e4a7f01fdfa39))
23+
- adding textTracks types to video player ([3b766a3](https://github.com/cloudinary-community/cloudinary-util/commit/3b766a37a3ffec17507a79c1bd6e4a7f01fdfa39))
2824

2925
# [@cloudinary-util/types-v1.5.7](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.6...@cloudinary-util/types-v1.5.7) (2024-09-11)
3026

31-
3227
### Bug Fixes
3328

34-
* adding type definition for resource context ([2ef1311](https://github.com/cloudinary-community/cloudinary-util/commit/2ef13118602f1efc39a85a7e05fa958c6e1cd2f1))
29+
- adding type definition for resource context ([2ef1311](https://github.com/cloudinary-community/cloudinary-util/commit/2ef13118602f1efc39a85a7e05fa958c6e1cd2f1))
3530

3631
# [@cloudinary-util/types-v1.5.6](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.5...@cloudinary-util/types-v1.5.6) (2024-09-06)
3732

38-
3933
### Bug Fixes
4034

41-
* making resource types optional that aren't potentially always there ([7d0b6ce](https://github.com/cloudinary-community/cloudinary-util/commit/7d0b6ce397a6e01087d96aef2c399a067ec998ee))
35+
- making resource types optional that aren't potentially always there ([7d0b6ce](https://github.com/cloudinary-community/cloudinary-util/commit/7d0b6ce397a6e01087d96aef2c399a067ec998ee))
4236

4337
# [@cloudinary-util/types-v1.5.5](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.4...@cloudinary-util/types-v1.5.5) (2024-09-05)
4438

45-
4639
### Bug Fixes
4740

48-
* fixing resource type, adding more fields, reorganizing ([466dd1b](https://github.com/cloudinary-community/cloudinary-util/commit/466dd1b9efe702e8630e21d72e77081a010e96a6))
41+
- fixing resource type, adding more fields, reorganizing ([466dd1b](https://github.com/cloudinary-community/cloudinary-util/commit/466dd1b9efe702e8630e21d72e77081a010e96a6))
4942

5043
# [@cloudinary-util/types-v1.5.4](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.3...@cloudinary-util/types-v1.5.4) (2024-09-05)
5144

52-
5345
### Bug Fixes
5446

55-
* add video player types ([#194](https://github.com/cloudinary-community/cloudinary-util/issues/194)) ([f7f9e6e](https://github.com/cloudinary-community/cloudinary-util/commit/f7f9e6edaaa7963c97ef923653b62af7182c7272))
47+
- add video player types ([#194](https://github.com/cloudinary-community/cloudinary-util/issues/194)) ([f7f9e6e](https://github.com/cloudinary-community/cloudinary-util/commit/f7f9e6edaaa7963c97ef923653b62af7182c7272))
5648

5749
# [@cloudinary-util/types-v1.5.3](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.2...@cloudinary-util/types-v1.5.3) (2024-09-03)
5850

59-
6051
### Bug Fixes
6152

62-
* export the new widget types ([#193](https://github.com/cloudinary-community/cloudinary-util/issues/193)) ([8ec71be](https://github.com/cloudinary-community/cloudinary-util/commit/8ec71be305de51d2d8340ac7346676768aeea57c)), closes [#191](https://github.com/cloudinary-community/cloudinary-util/issues/191)
53+
- export the new widget types ([#193](https://github.com/cloudinary-community/cloudinary-util/issues/193)) ([8ec71be](https://github.com/cloudinary-community/cloudinary-util/commit/8ec71be305de51d2d8340ac7346676768aeea57c)), closes [#191](https://github.com/cloudinary-community/cloudinary-util/issues/191)
6354

6455
# [@cloudinary-util/types-v1.5.2](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.1...@cloudinary-util/types-v1.5.2) (2024-09-03)
6556

66-
6757
### Bug Fixes
6858

69-
* add more upload widget types ([#191](https://github.com/cloudinary-community/cloudinary-util/issues/191)) ([b1cb91a](https://github.com/cloudinary-community/cloudinary-util/commit/b1cb91a78bb6c4879ee26b37f1fd89392f2c5090))
59+
- add more upload widget types ([#191](https://github.com/cloudinary-community/cloudinary-util/issues/191)) ([b1cb91a](https://github.com/cloudinary-community/cloudinary-util/commit/b1cb91a78bb6c4879ee26b37f1fd89392f2c5090))
7060

7161
# [@cloudinary-util/types-v1.5.1](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.5.0...@cloudinary-util/types-v1.5.1) (2024-08-30)
7262

73-
7463
### Bug Fixes
7564

76-
* moving access mode type from resource to its own definition ([7f449fd](https://github.com/cloudinary-community/cloudinary-util/commit/7f449fd6d4e1b94d2c2bcc2859922555bd6f79f8))
65+
- moving access mode type from resource to its own definition ([7f449fd](https://github.com/cloudinary-community/cloudinary-util/commit/7f449fd6d4e1b94d2c2bcc2859922555bd6f79f8))
7766

7867
# [@cloudinary-util/types-v1.5.0](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.4.0...@cloudinary-util/types-v1.5.0) (2024-08-30)
7968

80-
8169
### Bug Fixes
8270

83-
* top level type import ([933e124](https://github.com/cloudinary-community/cloudinary-util/commit/933e124d92c8b782933d376d5e7bc4d12274c49e))
84-
71+
- top level type import ([933e124](https://github.com/cloudinary-community/cloudinary-util/commit/933e124d92c8b782933d376d5e7bc4d12274c49e))
8572

8673
### Features
8774

88-
* adding Cloudinary Resource type ([e3ad47e](https://github.com/cloudinary-community/cloudinary-util/commit/e3ad47ef1718f560de37b3206f20dde7abdab784))
75+
- adding Cloudinary Resource type ([e3ad47e](https://github.com/cloudinary-community/cloudinary-util/commit/e3ad47ef1718f560de37b3206f20dde7abdab784))
8976

9077
# [@cloudinary-util/types-v1.4.0](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.3.2...@cloudinary-util/types-v1.4.0) (2024-08-21)
9178

92-
9379
### Features
9480

95-
* deprecating controlBar in video player as not recommended for use ([429f40a](https://github.com/cloudinary-community/cloudinary-util/commit/429f40a7c546a653181e36e5fc2077fb2e5598e0))
81+
- deprecating controlBar in video player as not recommended for use ([429f40a](https://github.com/cloudinary-community/cloudinary-util/commit/429f40a7c546a653181e36e5fc2077fb2e5598e0))
9682

9783
# [@cloudinary-util/types-v1.3.2](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.3.1...@cloudinary-util/types-v1.3.2) (2024-08-21)
9884

99-
10085
### Bug Fixes
10186

102-
* prepublish build ([b2e84d2](https://github.com/cloudinary-community/cloudinary-util/commit/b2e84d20a8cc97dee42e9ce32822322a7166811d))
103-
* releaserc ([2d11e72](https://github.com/cloudinary-community/cloudinary-util/commit/2d11e727aeb03bec5138a4dc451b620a814f87b6))
87+
- prepublish build ([b2e84d2](https://github.com/cloudinary-community/cloudinary-util/commit/b2e84d20a8cc97dee42e9ce32822322a7166811d))
88+
- releaserc ([2d11e72](https://github.com/cloudinary-community/cloudinary-util/commit/2d11e727aeb03bec5138a4dc451b620a814f87b6))
10489

10590
# [@cloudinary-util/types-v1.3.1](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.3.0...@cloudinary-util/types-v1.3.1) (2024-08-21)
10691

107-
10892
### Bug Fixes
10993

110-
* adding dist files to config ([ef9b56e](https://github.com/cloudinary-community/cloudinary-util/commit/ef9b56e64a475e7a479bdac554fa05381cff08a1))
94+
- adding dist files to config ([ef9b56e](https://github.com/cloudinary-community/cloudinary-util/commit/ef9b56e64a475e7a479bdac554fa05381cff08a1))
11195

11296
# [@cloudinary-util/types-v1.3.0](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.2.0...@cloudinary-util/types-v1.3.0) (2024-08-20)
11397

114-
11598
### Features
11699

117-
* adding configuration types ([4478dd4](https://github.com/cloudinary-community/cloudinary-util/commit/4478dd4619cea25a36cd4436e8b855aca1f27701))
100+
- adding configuration types ([4478dd4](https://github.com/cloudinary-community/cloudinary-util/commit/4478dd4619cea25a36cd4436e8b855aca1f27701))
118101

119102
# [@cloudinary-util/types-v1.2.0](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.1.0...@cloudinary-util/types-v1.2.0) (2024-08-07)
120103

121-
122104
### Features
123105

124-
* [email protected] ([#166](https://github.com/cloudinary-community/cloudinary-util/issues/166)) ([26736af](https://github.com/cloudinary-community/cloudinary-util/commit/26736afe7c9e32bad971beb273c71a9519c36944)), closes [#164](https://github.com/cloudinary-community/cloudinary-util/issues/164)
106+
- [email protected] ([#166](https://github.com/cloudinary-community/cloudinary-util/issues/166)) ([26736af](https://github.com/cloudinary-community/cloudinary-util/commit/26736afe7c9e32bad971beb273c71a9519c36944)), closes [#164](https://github.com/cloudinary-community/cloudinary-util/issues/164)
125107

126108
# [@cloudinary-util/types-v1.2.0-beta.1](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.1.0...@cloudinary-util/types-v1.2.0-beta.1) (2024-08-02)
127109

128-
129110
### Features
130111

131-
* getUploadWidgetOptions, generateSignatureCallback, generateUploadWidgetResultCallback ([#165](https://github.com/cloudinary-community/cloudinary-util/issues/165)) ([4e3adc4](https://github.com/cloudinary-community/cloudinary-util/commit/4e3adc4317022ceb8031cda5372b5419ba8bafe7)), closes [#164](https://github.com/cloudinary-community/cloudinary-util/issues/164)
112+
- getUploadWidgetOptions, generateSignatureCallback, generateUploadWidgetResultCallback ([#165](https://github.com/cloudinary-community/cloudinary-util/issues/165)) ([4e3adc4](https://github.com/cloudinary-community/cloudinary-util/commit/4e3adc4317022ceb8031cda5372b5419ba8bafe7)), closes [#164](https://github.com/cloudinary-community/cloudinary-util/issues/164)
132113

133114
# [@cloudinary-util/types-v1.2.0-beta.1](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.1.0...@cloudinary-util/types-v1.2.0-beta.1) (2024-08-02)
134115

135-
136116
### Features
137117

138-
* getUploadWidgetOptions, generateSignatureCallback, generateUploadWidgetResultCallback ([#165](https://github.com/cloudinary-community/cloudinary-util/issues/165)) ([4e3adc4](https://github.com/cloudinary-community/cloudinary-util/commit/4e3adc4317022ceb8031cda5372b5419ba8bafe7)), closes [#164](https://github.com/cloudinary-community/cloudinary-util/issues/164)
118+
- getUploadWidgetOptions, generateSignatureCallback, generateUploadWidgetResultCallback ([#165](https://github.com/cloudinary-community/cloudinary-util/issues/165)) ([4e3adc4](https://github.com/cloudinary-community/cloudinary-util/commit/4e3adc4317022ceb8031cda5372b5419ba8bafe7)), closes [#164](https://github.com/cloudinary-community/cloudinary-util/issues/164)
139119

140120
# [@cloudinary-util/types-v1.1.0-beta.2](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.1.0-beta.1...@cloudinary-util/types-v1.1.0-beta.2) (2024-08-01)
141121

142-
143122
### Bug Fixes
144123

145-
* adding config options to upload widget options ([0d979d2](https://github.com/cloudinary-community/cloudinary-util/commit/0d979d261ff1dfdde50d47686decf10e7a5a4a39))
124+
- adding config options to upload widget options ([0d979d2](https://github.com/cloudinary-community/cloudinary-util/commit/0d979d261ff1dfdde50d47686decf10e7a5a4a39))
146125

147126
# [@cloudinary-util/types-v1.1.0-beta.1](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.0.5...@cloudinary-util/types-v1.1.0-beta.1) (2024-07-09)
148127

149128
# [@cloudinary-util/types-v1.0.6](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.0.5...@cloudinary-util/types-v1.0.6) (2024-07-25)
150129

151130
### Bug Fixes
152131

153-
* adding config options to upload widget options ([0d979d2](https://github.com/cloudinary-community/cloudinary-util/commit/0d979d261ff1dfdde50d47686decf10e7a5a4a39))
132+
- adding config options to upload widget options ([0d979d2](https://github.com/cloudinary-community/cloudinary-util/commit/0d979d261ff1dfdde50d47686decf10e7a5a4a39))
154133

155134
# [@cloudinary-util/types-v1.0.5](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.0.4...@cloudinary-util/types-v1.0.5) (2024-05-23)
156135

157-
158136
### Features
159137

160-
* Improve plugin types, modernize monorepo structure ([#161](https://github.com/cloudinary-community/cloudinary-util/issues/161)) ([8ad6066](https://github.com/cloudinary-community/cloudinary-util/commit/8ad60661d4b3c78c08e9dd1939171a689eeb7b08))
138+
- Improve plugin types, modernize monorepo structure ([#161](https://github.com/cloudinary-community/cloudinary-util/issues/161)) ([8ad6066](https://github.com/cloudinary-community/cloudinary-util/commit/8ad60661d4b3c78c08e9dd1939171a689eeb7b08))
161139

162140
# [@cloudinary-util/types-v1.0.5](https://github.com/cloudinary-community/cloudinary-util/compare/@cloudinary-util/types-v1.0.4...@cloudinary-util/types-v1.0.5) (2024-05-23)
163141

packages/types/src/index.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
export type {
2-
CloudinaryResource, CloudinaryResourceAccessMode, CloudinaryResourceContext, CloudinaryResourceDeliveryType, CloudinaryResourceResourceType
2+
CloudinaryResource,
3+
CloudinaryResourceAccessMode,
4+
CloudinaryResourceContext,
5+
CloudinaryResourceDeliveryType,
6+
CloudinaryResourceResourceType,
37
} from "./types/resources.js";
48

59
export type {
@@ -14,24 +18,28 @@ export type {
1418
CloudinaryUploadWidgetInstanceMethods,
1519
CloudinaryUploadWidgetOptions,
1620
CloudinaryUploadWidgetResults,
17-
CloudinaryUploadWidgetSources
21+
CloudinaryUploadWidgetSources,
1822
} from "./types/cloudinary-upload-widget.js";
1923

2024
export type {
2125
CloudinaryVideoPlayer,
2226
CloudinaryVideoPlayerOptionPosterOptions,
2327
CloudinaryVideoPlayerOptions,
2428
CloudinaryVideoPlayerOptionsColors,
25-
CloudinaryVideoPlayerOptionsLogo, CloudinaryVideoPlayerPlaylistByTagOptions,
26-
CloudinaryVideoPlayerPlaylistOptions, CloudinaryVideoPlayerTextTracks, CloudinaryVideoPlayerTextTracksTrack, CloudinaryVideoPlayerTextTracksTrackOptions, CloudinaryVideoPlayerTextTracksTrackOptionsBox,
29+
CloudinaryVideoPlayerOptionsLogo,
30+
CloudinaryVideoPlayerPlaylistByTagOptions,
31+
CloudinaryVideoPlayerPlaylistOptions,
32+
CloudinaryVideoPlayerTextTracks,
33+
CloudinaryVideoPlayerTextTracksTrack,
34+
CloudinaryVideoPlayerTextTracksTrackOptions,
35+
CloudinaryVideoPlayerTextTracksTrackOptionsBox,
2736
CloudinaryVideoPlayerTextTracksTrackOptionsGravity,
28-
CloudinaryVideoPlayerTextTracksTrackOptionsTheme
37+
CloudinaryVideoPlayerTextTracksTrackOptionsTheme,
2938
} from "./types/cloudinary-video-player.js";
3039

3140
export type {
3241
CloudinaryAssetConfiguration,
3342
CloudinaryAssetConfigurationAuthToken,
3443
CloudinaryAssetConfigurationCloud,
35-
CloudinaryAssetConfigurationUrl
44+
CloudinaryAssetConfigurationUrl,
3645
} from "./types/configuration.js";
37-

packages/types/src/types/cloudinary-upload-widget.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { CloudinaryResource } from './resources.js';
1+
import type { CloudinaryResource } from "./resources.js";
22

33
// Sourced from: https://cloudinary.com/documentation/upload_widget_reference
44

packages/types/src/types/cloudinary-video-player.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,8 @@ export interface CloudinaryVideoPlayer {
306306
videojs: {
307307
cloudinary: {
308308
dispose: () => void;
309-
}
310-
}
311-
309+
};
310+
};
312311
}
313312

314313
export interface CloudinaryVideoPlayerOptionsLogo {
@@ -366,8 +365,10 @@ export interface CloudinaryVideoPlayerTextTracksTrack {
366365

367366
export interface CloudinaryVideoPlayerTextTracks {
368367
captions?: CloudinaryVideoPlayerTextTracksTrack;
369-
options?: CloudinaryVideoPlayerTextTracksTrackOptions
370-
subtitles?: CloudinaryVideoPlayerTextTracksTrack | Array<CloudinaryVideoPlayerTextTracksTrack>;
368+
options?: CloudinaryVideoPlayerTextTracksTrackOptions;
369+
subtitles?:
370+
| CloudinaryVideoPlayerTextTracksTrack
371+
| Array<CloudinaryVideoPlayerTextTracksTrack>;
371372
}
372373

373374
export interface CloudinaryVideoPlayerOptions
@@ -442,7 +443,9 @@ export interface CloudinaryVideoPlayerOptions
442443
};
443444
analytics?: boolean;
444445
allowUsageReport?: boolean;
445-
cloudinaryAnalytics?: boolean | CloudinaryVideoPlayerOptionsCloudinaryAnalytics;
446+
cloudinaryAnalytics?:
447+
| boolean
448+
| CloudinaryVideoPlayerOptionsCloudinaryAnalytics;
446449

447450
// ------------ Delivery ------------
448451
cloud_name?: string;
@@ -495,4 +498,4 @@ export interface CloudinaryVideoPlayerOptionsCloudinaryAnalyticsCustomData {
495498
customData3?: string;
496499
customData4?: string;
497500
customData5?: string;
498-
}
501+
}

packages/types/src/types/configuration.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ export interface CloudinaryAssetConfigurationUrl {
2323
useRootPath?: boolean;
2424
forceVersion?: boolean;
2525
queryParams?: Record<string, string | number | boolean> | string;
26-
};
26+
}
2727

2828
export interface CloudinaryAssetConfigurationCloud {
2929
cloudName?: string;
3030
apiKey?: string;
3131
apiSecret?: string;
3232
authToken?: CloudinaryAssetConfigurationAuthToken;
33-
};
33+
}
3434

3535
export interface CloudinaryAssetConfiguration {
3636
cloud?: CloudinaryAssetConfigurationCloud;
3737
url?: CloudinaryAssetConfigurationUrl;
38-
}
38+
}

packages/types/src/types/resources.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
export type CloudinaryResourceAccessMode = "public" | "authenticated" | (string & {});
2-
export type CloudinaryResourceResourceType = "image" | "video" | "raw" | "auto" | (string & {});
1+
export type CloudinaryResourceAccessMode =
2+
| "public"
3+
| "authenticated"
4+
| (string & {});
5+
export type CloudinaryResourceResourceType =
6+
| "image"
7+
| "video"
8+
| "raw"
9+
| "auto"
10+
| (string & {});
311
export type CloudinaryResourceDeliveryType =
412
| "animoto"
513
| "asset"
@@ -68,4 +76,4 @@ export interface CloudinaryResource {
6876
version: number;
6977
width: number;
7078
[key: string]: unknown;
71-
}
79+
}

0 commit comments

Comments
 (0)