diff --git a/lib/create-contentful-api.ts b/lib/create-contentful-api.ts index b616ee26a..345259205 100644 --- a/lib/create-contentful-api.ts +++ b/lib/create-contentful-api.ts @@ -5,7 +5,7 @@ import { encodeCPAResponse } from '@contentful/content-source-maps' import { AxiosInstance, createRequestConfig, errorHandler } from 'contentful-sdk-core' -import { CreateClientParams } from './contentful' +import { CreateClientParams } from './contentful.js' import { GetGlobalOptions } from './create-global-options.js' import pagedSync from './paged-sync.js' import type { @@ -28,7 +28,7 @@ import type { import normalizeSearchParameters from './utils/normalize-search-parameters.js' import normalizeSelect from './utils/normalize-select.js' import resolveCircular from './utils/resolve-circular.js' -import getQuerySelectionSet from './utils/query-selection-set' +import getQuerySelectionSet from './utils/query-selection-set.js' import validateTimestamp from './utils/validate-timestamp.js' import { ChainOptions, ModifiersFromOptions } from './utils/client-helpers.js' import { @@ -36,8 +36,8 @@ import { validateLocaleParam, validateRemoveUnresolvedParam, validateResolveLinksParam, -} from './utils/validate-params' -import validateSearchParameters from './utils/validate-search-parameters' +} from './utils/validate-params.js' +import validateSearchParameters from './utils/validate-search-parameters.js' const ASSET_KEY_MAX_LIFETIME = 48 * 60 * 60 diff --git a/lib/types/asset.ts b/lib/types/asset.ts index 136c44bac..c96a882e5 100644 --- a/lib/types/asset.ts +++ b/lib/types/asset.ts @@ -1,8 +1,8 @@ -import { ContentfulCollection } from './collection' -import { LocaleCode } from './locale' -import { Metadata } from './metadata' -import { EntitySys } from './sys' -import { ChainModifiers } from './client' +import { ContentfulCollection } from './collection.js' +import { LocaleCode } from './locale.js' +import { Metadata } from './metadata.js' +import { EntitySys } from './sys.js' +import { ChainModifiers } from './client.js' /** * @category Asset diff --git a/lib/types/client.ts b/lib/types/client.ts index 34be7f63c..14192d2cd 100644 --- a/lib/types/client.ts +++ b/lib/types/client.ts @@ -1,6 +1,6 @@ -import { ContentType, ContentTypeCollection } from './content-type' -import { Space } from './space' -import { LocaleCode, LocaleCollection } from './locale' +import { ContentType, ContentTypeCollection } from './content-type.js' +import { Space } from './space.js' +import { LocaleCode, LocaleCollection } from './locale.js' import { AssetQueries, AssetsQueries, @@ -8,12 +8,12 @@ import { EntryQueries, EntrySkeletonType, TagQueries, -} from './query' -import { SyncCollection, SyncOptions, SyncQuery } from './sync' -import { Tag, TagCollection } from './tag' -import { AssetKey } from './asset-key' -import { Entry, EntryCollection } from './entry' -import { Asset, AssetCollection, AssetFields } from './asset' +} from './query/index.js' +import { SyncCollection, SyncOptions, SyncQuery } from './sync.js' +import { Tag, TagCollection } from './tag.js' +import { AssetKey } from './asset-key.js' +import { Entry, EntryCollection } from './entry.js' +import { Asset, AssetCollection, AssetFields } from './asset.js' /** * Client chain modifiers used in all types that depend on the client configuration. diff --git a/lib/types/collection.ts b/lib/types/collection.ts index dd412fde5..588a56be8 100644 --- a/lib/types/collection.ts +++ b/lib/types/collection.ts @@ -1,5 +1,5 @@ -import { AssetSys } from './asset' -import { EntrySys } from './entry' +import { AssetSys } from './asset.js' +import { EntrySys } from './entry.js' /** * A wrapper object containing additional information for diff --git a/lib/types/content-type.ts b/lib/types/content-type.ts index f33421210..b3d6df658 100644 --- a/lib/types/content-type.ts +++ b/lib/types/content-type.ts @@ -1,7 +1,7 @@ -import { ContentfulCollection } from './collection' -import { EntryFields } from './entry' -import { SpaceLink, EnvironmentLink } from './link' -import { BaseSys } from './sys' +import { ContentfulCollection } from './collection.js' +import { EntryFields } from './entry.js' +import { SpaceLink, EnvironmentLink } from './link.js' +import { BaseSys } from './sys.js' import type { BLOCKS, INLINES } from '@contentful/rich-text-types' /** diff --git a/lib/types/entry.ts b/lib/types/entry.ts index ce6848a1d..7be75e432 100644 --- a/lib/types/entry.ts +++ b/lib/types/entry.ts @@ -1,14 +1,14 @@ import { Document as RichTextDocument } from '@contentful/rich-text-types' -import { Asset } from './asset' -import { ContentfulCollection } from './collection' -import { ContentTypeLink, UnresolvedLink } from './link' -import { LocaleCode } from './locale' -import { Metadata } from './metadata' -import { EntrySkeletonType } from './query' -import { EntitySys } from './sys' +import { Asset } from './asset.js' +import { ContentfulCollection } from './collection.js' +import { ContentTypeLink, UnresolvedLink } from './link.js' +import { LocaleCode } from './locale.js' +import { Metadata } from './metadata.js' +import { EntrySkeletonType } from './query/index.js' +import { EntitySys } from './sys.js' import { JsonArray, JsonObject } from 'type-fest' -import { ResourceLink } from './resource-link' -import { ChainModifiers } from './client' +import { ResourceLink } from './resource-link.js' +import { ChainModifiers } from './client.js' /** * System managed metadata for entries diff --git a/lib/types/link.ts b/lib/types/link.ts index fdfd1a613..28871a181 100644 --- a/lib/types/link.ts +++ b/lib/types/link.ts @@ -1,4 +1,4 @@ -import { ResourceLink } from './resource-link' +import { ResourceLink } from './resource-link.js' /** * @category Link diff --git a/lib/types/locale.ts b/lib/types/locale.ts index c8734ddcf..555841997 100644 --- a/lib/types/locale.ts +++ b/lib/types/locale.ts @@ -1,5 +1,5 @@ -import { ContentfulCollection } from './collection' -import { BaseSys } from './sys' +import { ContentfulCollection } from './collection.js' +import { BaseSys } from './sys.js' /** * @category Entity diff --git a/lib/types/metadata.ts b/lib/types/metadata.ts index 2e0785fb2..b1179eba7 100644 --- a/lib/types/metadata.ts +++ b/lib/types/metadata.ts @@ -1,4 +1,4 @@ -import { TagLink, TaxonomyConceptLink } from './link' +import { TagLink, TaxonomyConceptLink } from './link.js' /** * User-controlled metadata diff --git a/lib/types/query/equality.ts b/lib/types/query/equality.ts index c66ef15ce..bb743296b 100644 --- a/lib/types/query/equality.ts +++ b/lib/types/query/equality.ts @@ -1,5 +1,5 @@ -import { EntryFields, EntryFieldType, EntryFieldTypes } from '../entry' -import { ConditionalQueries, EntryFieldsConditionalQueries, EntrySkeletonType } from './util' +import { EntryFields, EntryFieldType, EntryFieldTypes } from '../entry.js' +import { ConditionalQueries, EntryFieldsConditionalQueries, EntrySkeletonType } from './util.js' type SupportedTypes = | EntryFields.Symbol diff --git a/lib/types/query/existence.ts b/lib/types/query/existence.ts index f44f31034..d29f1aba9 100644 --- a/lib/types/query/existence.ts +++ b/lib/types/query/existence.ts @@ -1,6 +1,6 @@ -import { EntryField, EntryFieldType } from '../entry' -import { ConditionalFixedQueries, FieldsType, EntrySkeletonType } from './util' -import { AssetDetails, AssetFile } from '../asset' +import { EntryField, EntryFieldType } from '../entry.js' +import { ConditionalFixedQueries, FieldsType, EntrySkeletonType } from './util.js' +import { AssetDetails, AssetFile } from '../asset.js' /** * Check for existence of provided fields diff --git a/lib/types/query/location.ts b/lib/types/query/location.ts index 371d3d02f..1a3fa9c79 100644 --- a/lib/types/query/location.ts +++ b/lib/types/query/location.ts @@ -1,5 +1,5 @@ import { ConditionalPick } from 'type-fest' -import { EntryFieldTypes } from '../entry' +import { EntryFieldTypes } from '../entry.js' type Types = EntryFieldTypes.Location | undefined diff --git a/lib/types/query/order.ts b/lib/types/query/order.ts index f9b22a25a..f44a5c27f 100644 --- a/lib/types/query/order.ts +++ b/lib/types/query/order.ts @@ -1,8 +1,8 @@ -import { EntrySkeletonType, FieldsType } from './util' -import { EntryFields, EntryFieldType, EntryFieldTypes, EntrySys } from '../entry' -import { AssetSys } from '../asset' +import { EntrySkeletonType, FieldsType } from './util.js' +import { EntryFields, EntryFieldType, EntryFieldTypes, EntrySys } from '../entry.js' +import { AssetSys } from '../asset.js' import { ConditionalPick } from 'type-fest' -import { TagSys } from '../tag' +import { TagSys } from '../tag.js' export type SupportedTypes = | EntryFields.Symbol diff --git a/lib/types/query/query.ts b/lib/types/query/query.ts index ac6afd54a..9c819a2ff 100644 --- a/lib/types/query/query.ts +++ b/lib/types/query/query.ts @@ -1,35 +1,35 @@ -import { AssetDetails, AssetFile, AssetMimeType, AssetSys } from '../asset' -import { ChainModifiers } from '../client' -import { EntrySys } from '../entry' -import { TagLink, TaxonomyConceptLink } from '../link' -import { Metadata } from '../metadata' -import { TagSys } from '../tag' +import { AssetDetails, AssetFile, AssetMimeType, AssetSys } from '../asset.js' +import { ChainModifiers } from '../client.js' +import { EntrySys } from '../entry.js' +import { TagLink, TaxonomyConceptLink } from '../link.js' +import { Metadata } from '../metadata.js' +import { TagSys } from '../tag.js' import { EntryFieldsEqualityFilter, EntryFieldsInequalityFilter, EqualityFilter, InequalityFilter, -} from './equality' -import { EntryFieldsExistenceFilter, ExistenceFilter } from './existence' -import { LocationSearchFilters } from './location' +} from './equality.js' +import { EntryFieldsExistenceFilter, ExistenceFilter } from './existence.js' +import { LocationSearchFilters } from './location.js' import { AssetOrderFilter, EntryOrderFilter, EntryOrderFilterWithFields, TagOrderFilter, -} from './order' -import { EntryFieldsRangeFilters, RangeFilters } from './range' -import { ReferenceSearchFilters } from './reference' -import { EntryFieldsFullTextSearchFilters, FullTextSearchFilters } from './search' -import { AssetSelectFilter, EntrySelectFilter, EntrySelectFilterWithFields } from './select' -import { EntryFieldsSetFilter } from './set' -import { EntryFieldsSubsetFilters, SubsetFilters } from './subset' +} from './order.js' +import { EntryFieldsRangeFilters, RangeFilters } from './range.js' +import { ReferenceSearchFilters } from './reference.js' +import { EntryFieldsFullTextSearchFilters, FullTextSearchFilters } from './search.js' +import { AssetSelectFilter, EntrySelectFilter, EntrySelectFilterWithFields } from './select.js' +import { EntryFieldsSetFilter } from './set.js' +import { EntryFieldsSubsetFilters, SubsetFilters } from './subset.js' import { ConditionalFixedQueries, ConditionalListQueries, EntrySkeletonType, FieldsType, -} from './util' +} from './util.js' export type FixedPagedOptions = { skip?: number diff --git a/lib/types/query/range.ts b/lib/types/query/range.ts index a7490829e..095cd4622 100644 --- a/lib/types/query/range.ts +++ b/lib/types/query/range.ts @@ -1,5 +1,5 @@ -import { EntryFields, EntryFieldType, EntryFieldTypes } from '../entry' -import { ConditionalQueries, EntryFieldsConditionalQueries, EntrySkeletonType } from './util' +import { EntryFields, EntryFieldType, EntryFieldTypes } from '../entry.js' +import { ConditionalQueries, EntryFieldsConditionalQueries, EntrySkeletonType } from './util.js' type RangeFilterTypes = 'lt' | 'lte' | 'gt' | 'gte' diff --git a/lib/types/query/reference.ts b/lib/types/query/reference.ts index b8a895660..81a3249be 100644 --- a/lib/types/query/reference.ts +++ b/lib/types/query/reference.ts @@ -1,4 +1,4 @@ -import { EntryFieldTypes } from '../entry' +import { EntryFieldTypes } from '../entry.js' import { ConditionalPick } from 'type-fest' type SupportedTypes = diff --git a/lib/types/query/search.ts b/lib/types/query/search.ts index e5e468e68..92c202d08 100644 --- a/lib/types/query/search.ts +++ b/lib/types/query/search.ts @@ -1,5 +1,5 @@ -import { EntryFields, EntryFieldTypes } from '../entry' -import { ConditionalFixedQueries, FieldsType } from './util' +import { EntryFields, EntryFieldTypes } from '../entry.js' +import { ConditionalFixedQueries, FieldsType } from './util.js' type SupportedTypes = | EntryFields.Text diff --git a/lib/types/query/select.ts b/lib/types/query/select.ts index 9ce94a97d..b6f8a22c6 100644 --- a/lib/types/query/select.ts +++ b/lib/types/query/select.ts @@ -1,7 +1,7 @@ -import { FieldsType } from './util' -import { EntrySys } from '../entry' -import { AssetSys } from '../asset' -import { Metadata } from '../metadata' +import { FieldsType } from './util.js' +import { EntrySys } from '../entry.js' +import { AssetSys } from '../asset.js' +import { Metadata } from '../metadata.js' export type SelectFilterPaths< Fields extends FieldsType, diff --git a/lib/types/query/set.ts b/lib/types/query/set.ts index 9e29d03b6..70781e773 100644 --- a/lib/types/query/set.ts +++ b/lib/types/query/set.ts @@ -1,5 +1,5 @@ -import { EntryFieldType, EntryFieldTypes } from '..' -import { EntryFieldsConditionalListQueries } from './util' +import { EntryFieldType, EntryFieldTypes } from '../index.js' +import { EntryFieldsConditionalListQueries } from './util.js' type SupportedTypes = | EntryFieldTypes.Symbol diff --git a/lib/types/query/subset.ts b/lib/types/query/subset.ts index b15d63627..32f30b056 100644 --- a/lib/types/query/subset.ts +++ b/lib/types/query/subset.ts @@ -1,5 +1,5 @@ -import { EntryFields, EntryFieldType, EntryFieldTypes } from '..' -import { ConditionalListQueries, EntryFieldsConditionalListQueries } from './util' +import { EntryFields, EntryFieldType, EntryFieldTypes } from '../index.js' +import { ConditionalListQueries, EntryFieldsConditionalListQueries } from './util.js' type SubsetFilterTypes = 'in' | 'nin' diff --git a/lib/types/query/util.ts b/lib/types/query/util.ts index 13aa2f962..077d8cd9c 100644 --- a/lib/types/query/util.ts +++ b/lib/types/query/util.ts @@ -1,5 +1,5 @@ import { ConditionalPick } from 'type-fest' -import { BaseFieldMap, EntryFieldType, EntryFieldTypes } from '../entry' +import { BaseFieldMap, EntryFieldType, EntryFieldTypes } from '../entry.js' /** * @category Entity diff --git a/lib/types/space.ts b/lib/types/space.ts index 5ab03a3e5..852dc6dab 100644 --- a/lib/types/space.ts +++ b/lib/types/space.ts @@ -1,5 +1,5 @@ -import { Locale } from './locale' -import { BaseSys } from './sys' +import { Locale } from './locale.js' +import { BaseSys } from './sys.js' /** * System managed metadata for spaces diff --git a/lib/types/sync.ts b/lib/types/sync.ts index 82f08d350..98d58d1e8 100644 --- a/lib/types/sync.ts +++ b/lib/types/sync.ts @@ -1,9 +1,9 @@ -import { Asset } from './asset' -import { Entry } from './entry' -import { EntitySys } from './sys' -import { EntrySkeletonType } from './query' -import { LocaleCode } from './locale' -import { ChainModifiers } from './client' +import { Asset } from './asset.js' +import { Entry } from './entry.js' +import { EntitySys } from './sys.js' +import { EntrySkeletonType } from './query/index.js' +import { LocaleCode } from './locale.js' +import { ChainModifiers } from './client.js' /** * @category Sync diff --git a/lib/types/sys.ts b/lib/types/sys.ts index 4ae93d593..495e863c7 100644 --- a/lib/types/sys.ts +++ b/lib/types/sys.ts @@ -1,6 +1,6 @@ import { ContentSourceMapsLookup, CPAContentSourceMaps } from '@contentful/content-source-maps' -import { EntryFields } from './entry' -import { EnvironmentLink, SpaceLink } from './link' +import { EntryFields } from './entry.js' +import { EnvironmentLink, SpaceLink } from './link.js' /** * Definition of common part of system managed metadata diff --git a/lib/types/tag.ts b/lib/types/tag.ts index adaaee5ac..f1ce3f958 100644 --- a/lib/types/tag.ts +++ b/lib/types/tag.ts @@ -1,6 +1,6 @@ -import { EntitySys } from './sys' -import { ContentfulCollection } from './collection' -import { UserLink } from './link' +import { EntitySys } from './sys.js' +import { ContentfulCollection } from './collection.js' +import { UserLink } from './link.js' /** * System managed metadata for tags diff --git a/lib/utils/client-helpers.ts b/lib/utils/client-helpers.ts index f5ac820aa..7517895d9 100644 --- a/lib/utils/client-helpers.ts +++ b/lib/utils/client-helpers.ts @@ -1,4 +1,4 @@ -import { ChainModifiers } from '../types/client' +import { ChainModifiers } from '../types/client.js' export type ChainOption = { withoutLinkResolution: ChainModifiers extends Modifiers diff --git a/lib/utils/normalize-select.ts b/lib/utils/normalize-select.ts index 7b99a30b5..a5dbfe014 100644 --- a/lib/utils/normalize-select.ts +++ b/lib/utils/normalize-select.ts @@ -1,4 +1,4 @@ -import getQuerySelectionSet from './query-selection-set' +import getQuerySelectionSet from './query-selection-set.js' /* * sdk relies heavily on sys metadata