Skip to content

Commit

Permalink
feat: migrate Zod to pure TS w/ JSDoc, improve type safety and simpli…
Browse files Browse the repository at this point in the history
…fy 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
  • Loading branch information
ssalbdivad authored Oct 18, 2024
1 parent d4a49ee commit f605f26
Show file tree
Hide file tree
Showing 102 changed files with 5,281 additions and 5,587 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ module.exports = defineConfig({
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-namespace": ["warn", { allowDeclarations: true }],
},
});
2 changes: 1 addition & 1 deletion docs/src/lib/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
export function sortByKey(
array: Array<object> = [],
key: string,
type: string = "asc"
type: string = "asc",
) {
function compare(a: object, b: object) {
let keyA = a[key];
Expand Down
70 changes: 24 additions & 46 deletions packages/types/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,163 +1,141 @@
# [@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)


### Bug Fixes

* 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))
- 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))

# [@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)


### Bug Fixes

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

# [@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)


### Bug Fixes

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

# [@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)


### Bug Fixes

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

# [@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)


### Bug Fixes

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

# [@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)


### Bug Fixes

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

# [@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)


### Bug Fixes

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

# [@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)


### Bug Fixes

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

# [@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)


### Bug Fixes

* 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)
- 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)

# [@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)


### Bug Fixes

* 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))
- 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))

# [@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)


### Bug Fixes

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

# [@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)


### Bug Fixes

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

- top level type import ([933e124](https://github.com/cloudinary-community/cloudinary-util/commit/933e124d92c8b782933d376d5e7bc4d12274c49e))

### Features

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

# [@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)


### Features

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

# [@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)


### Bug Fixes

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

# [@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)


### Bug Fixes

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

# [@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)


### Features

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

# [@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)


### Features

* [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)
- [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)

# [@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)


### Features

* 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)
- 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)

# [@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)


### Features

* 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)
- 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)

# [@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)


### Bug Fixes

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

# [@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)

# [@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)

### Bug Fixes

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

# [@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)


### Features

* 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))
- 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))

# [@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)

Expand Down
22 changes: 15 additions & 7 deletions packages/types/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
export type {
CloudinaryResource, CloudinaryResourceAccessMode, CloudinaryResourceContext, CloudinaryResourceDeliveryType, CloudinaryResourceResourceType
CloudinaryResource,
CloudinaryResourceAccessMode,
CloudinaryResourceContext,
CloudinaryResourceDeliveryType,
CloudinaryResourceResourceType,
} from "./types/resources.js";

export type {
Expand All @@ -14,24 +18,28 @@ export type {
CloudinaryUploadWidgetInstanceMethods,
CloudinaryUploadWidgetOptions,
CloudinaryUploadWidgetResults,
CloudinaryUploadWidgetSources
CloudinaryUploadWidgetSources,
} from "./types/cloudinary-upload-widget.js";

export type {
CloudinaryVideoPlayer,
CloudinaryVideoPlayerOptionPosterOptions,
CloudinaryVideoPlayerOptions,
CloudinaryVideoPlayerOptionsColors,
CloudinaryVideoPlayerOptionsLogo, CloudinaryVideoPlayerPlaylistByTagOptions,
CloudinaryVideoPlayerPlaylistOptions, CloudinaryVideoPlayerTextTracks, CloudinaryVideoPlayerTextTracksTrack, CloudinaryVideoPlayerTextTracksTrackOptions, CloudinaryVideoPlayerTextTracksTrackOptionsBox,
CloudinaryVideoPlayerOptionsLogo,
CloudinaryVideoPlayerPlaylistByTagOptions,
CloudinaryVideoPlayerPlaylistOptions,
CloudinaryVideoPlayerTextTracks,
CloudinaryVideoPlayerTextTracksTrack,
CloudinaryVideoPlayerTextTracksTrackOptions,
CloudinaryVideoPlayerTextTracksTrackOptionsBox,
CloudinaryVideoPlayerTextTracksTrackOptionsGravity,
CloudinaryVideoPlayerTextTracksTrackOptionsTheme
CloudinaryVideoPlayerTextTracksTrackOptionsTheme,
} from "./types/cloudinary-video-player.js";

export type {
CloudinaryAssetConfiguration,
CloudinaryAssetConfigurationAuthToken,
CloudinaryAssetConfigurationCloud,
CloudinaryAssetConfigurationUrl
CloudinaryAssetConfigurationUrl,
} from "./types/configuration.js";

2 changes: 1 addition & 1 deletion packages/types/src/types/cloudinary-upload-widget.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { CloudinaryResource } from './resources.js';
import type { CloudinaryResource } from "./resources.js";

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

Expand Down
17 changes: 10 additions & 7 deletions packages/types/src/types/cloudinary-video-player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,8 @@ export interface CloudinaryVideoPlayer {
videojs: {
cloudinary: {
dispose: () => void;
}
}

};
};
}

export interface CloudinaryVideoPlayerOptionsLogo {
Expand Down Expand Up @@ -366,8 +365,10 @@ export interface CloudinaryVideoPlayerTextTracksTrack {

export interface CloudinaryVideoPlayerTextTracks {
captions?: CloudinaryVideoPlayerTextTracksTrack;
options?: CloudinaryVideoPlayerTextTracksTrackOptions
subtitles?: CloudinaryVideoPlayerTextTracksTrack | Array<CloudinaryVideoPlayerTextTracksTrack>;
options?: CloudinaryVideoPlayerTextTracksTrackOptions;
subtitles?:
| CloudinaryVideoPlayerTextTracksTrack
| Array<CloudinaryVideoPlayerTextTracksTrack>;
}

export interface CloudinaryVideoPlayerOptions
Expand Down Expand Up @@ -442,7 +443,9 @@ export interface CloudinaryVideoPlayerOptions
};
analytics?: boolean;
allowUsageReport?: boolean;
cloudinaryAnalytics?: boolean | CloudinaryVideoPlayerOptionsCloudinaryAnalytics;
cloudinaryAnalytics?:
| boolean
| CloudinaryVideoPlayerOptionsCloudinaryAnalytics;

// ------------ Delivery ------------
cloud_name?: string;
Expand Down Expand Up @@ -495,4 +498,4 @@ export interface CloudinaryVideoPlayerOptionsCloudinaryAnalyticsCustomData {
customData3?: string;
customData4?: string;
customData5?: string;
}
}
6 changes: 3 additions & 3 deletions packages/types/src/types/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ export interface CloudinaryAssetConfigurationUrl {
useRootPath?: boolean;
forceVersion?: boolean;
queryParams?: Record<string, string | number | boolean> | string;
};
}

export interface CloudinaryAssetConfigurationCloud {
cloudName?: string;
apiKey?: string;
apiSecret?: string;
authToken?: CloudinaryAssetConfigurationAuthToken;
};
}

export interface CloudinaryAssetConfiguration {
cloud?: CloudinaryAssetConfigurationCloud;
url?: CloudinaryAssetConfigurationUrl;
}
}
14 changes: 11 additions & 3 deletions packages/types/src/types/resources.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
export type CloudinaryResourceAccessMode = "public" | "authenticated" | (string & {});
export type CloudinaryResourceResourceType = "image" | "video" | "raw" | "auto" | (string & {});
export type CloudinaryResourceAccessMode =
| "public"
| "authenticated"
| (string & {});
export type CloudinaryResourceResourceType =
| "image"
| "video"
| "raw"
| "auto"
| (string & {});
export type CloudinaryResourceDeliveryType =
| "animoto"
| "asset"
Expand Down Expand Up @@ -68,4 +76,4 @@ export interface CloudinaryResource {
version: number;
width: number;
[key: string]: unknown;
}
}
Loading

0 comments on commit f605f26

Please sign in to comment.