Skip to content

AWS-AU support added #190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 9 additions & 26 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
fileignoreconfig:
- filename: .github/workflows/secrets-scan.yml
ignore_detectors:
- filecontent
- filename: src/lib/types.ts
checksum: 1eb6d6ec971934d65017dae2f82d6d6ef1cd0e6bfd50f43a9b46f30182307230
- filename: test/unit/image-transform.spec.ts
checksum: 7beabdd07bd35d620668fcd97e1a303b9cbc40170bf3008a376d75ce0895de2a
- filename: test/utils/mocks.ts
checksum: a1cb4b1890a584f1facd30f2a0974c97a66f91417022be79d00516338e244227
- filename: src/lib/query.ts
checksum: c4529069bc974d15c104303c5ae573c9341185a869c612ab07f0ee7f42e8b149
- filename: package-lock.json
checksum: f9c5af529a2c4c6576d67bd6c25dc6c3088ddedf2482757d382953f2d4521995
- filename: src/lib/entries.ts
checksum: 1c9a58570f26d3e53526e89b404581a523d3f035234bc099fda96d144dee40f6
- filename: src/lib/entry.ts
checksum: 8826fe3147a2c640b0780dae02345611ed24e562562e7df7b3785cb0fa6f1f14
- filename: .husky/pre-commit
checksum: 5baabd7d2c391648163f9371f0e5e9484f8fb90fa2284cfc378732ec3192c193
- filename: test/api/live-preview.spec.ts
checksum: 34f8b01b1e3804023f71768f9c6a67860f192abd70eb22c7d2260d3a80d9e500
version: ""
fileignoreconfig:
- filename: package-lock.json
checksum: be08fac0b5e580b7dd66f5dc2b2f7bdefeef89b98ce60df1fe31ad33adb96172
version: "1.0"
- filename: test/unit/persistance/local-storage.spec.ts
checksum: da6638b676c34274279d80539983a5dfcf5e729ec65d6a535d7939b6ba7c9b58
- filename: test/unit/cache.spec.ts
checksum: cadf177ffc4ce8c271e8b49fd227947351afa7cade5c7cd902cda78d0f91ba5b
- filename: test/unit/persistance/preference-store.spec.ts
checksum: 0f3457f8ea8b149c5de1d6585c78eb4cea0d2ac00ca69cdc294c44fe29ea3c11
- filename: test/api/live-preview.spec.ts
checksum: acdb1bd25dc81cfd9ea16e8a3e3960930c9e6e6034defd8552421e0d25e8afc4
version: "1.0"
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### Version: 4.8.0
#### Date: June-30-2025
Enh: Added AWS-EU support

### Version: 4.7.1
#### Date: June-13-2025
- Add encode option on find method to encode query params
Expand Down Expand Up @@ -38,11 +42,11 @@ Fix: removed node-localstorage
#### Date: October-21-2024
Fix: getData to receive params and headers both in data
Enh: Node version bump
Refactor: Package type changed to be module instead of CommonJS
Refactor: Package type changed to be module instead of CommonJS

### Version: 4.3.0
#### Date: Septmber-09-2024
Feat: Include refernce accepts array of values
Feat: Include refernce accepts array of values

### Version: 4.2.0
#### Date: Septmber-04-2024
Expand Down Expand Up @@ -75,7 +79,7 @@ Custom host implementation

### Version: 4.0.1
#### Date: May-20-2024
Fixed SRE vulnerabilities
Fixed SRE vulnerabilities

### Version: 4.0.0
#### Date: April-23-2024
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/delivery-sdk",
"version": "4.7.1",
"version": "4.8.0",
"type": "module",
"license": "MIT",
"main": "./dist/legacy/index.cjs",
Expand Down
159 changes: 80 additions & 79 deletions src/lib/types.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
/* eslint-disable @cspell/spellchecker */
import { HttpClientParams } from '@contentstack/core';
import { PersistanceStoreOptions, StorageType } from '../persistance';
import { HttpClientParams } from "@contentstack/core";
import { PersistanceStoreOptions, StorageType } from "../persistance";

// Internal Types
export type params = {
[key: string]: any
}
[key: string]: any;
};

export type queryParams = {
[key: string]: string | boolean | number | string[]
}
export type queryParams = {
[key: string]: string | boolean | number | string[];
};

// External Types
export enum Region {
US = 'us',
EU = 'eu',
AZURE_NA = 'azure-na',
AZURE_EU = 'azure-eu',
GCP_NA = 'gcp-na',
GCP_EU = 'gcp-eu',
US = "us",
EU = "eu",
AU = "au",
AZURE_NA = "azure-na",
AZURE_EU = "azure-eu",
GCP_NA = "gcp-na",
GCP_EU = "gcp-eu",
}
export interface StackConfig extends HttpClientParams {
host?: string;
Expand All @@ -42,24 +43,24 @@ export interface CacheOptions extends PersistanceStoreOptions {
}

export enum Policy {
IGNORE_CACHE = 'IGNORE_CACHE',
CACHE_THEN_NETWORK = 'CACHE_THEN_NETWORK',
CACHE_ELSE_NETWORK = 'CACHE_ELSE_NETWORK',
NETWORK_ELSE_CACHE = 'NETWORK_ELSE_CACHE',
IGNORE_CACHE = "IGNORE_CACHE",
CACHE_THEN_NETWORK = "CACHE_THEN_NETWORK",
CACHE_ELSE_NETWORK = "CACHE_ELSE_NETWORK",
NETWORK_ELSE_CACHE = "NETWORK_ELSE_CACHE",
}

export interface SyncStack {
paginationToken?: string;
syncToken?: string;
}
export enum PublishType {
ENTRY_PUBLISHED = 'entry_published',
ENTRY_UNPUBLISHED = 'entry_unpublished',
ENTRY_DELETED = 'entry_deleted',
ASSET_PUBLISHED = 'asset_published',
ASSET_UNPUBLISHED = 'asset_unpublished',
ASSET_DELETED = 'asset_deleted',
CONTENT_TYPE_DELETED = 'content_type_deleted',
ENTRY_PUBLISHED = "entry_published",
ENTRY_UNPUBLISHED = "entry_unpublished",
ENTRY_DELETED = "entry_deleted",
ASSET_PUBLISHED = "asset_published",
ASSET_UNPUBLISHED = "asset_unpublished",
ASSET_DELETED = "asset_deleted",
CONTENT_TYPE_DELETED = "content_type_deleted",
}
export interface SyncType {
environment?: string;
Expand All @@ -71,25 +72,25 @@ export interface SyncType {
export type TransformData = { [key: string]: string | string[] };

export enum Format {
GIF = 'gif',
PNG = 'png',
JPG = 'jpg',
PJPG = 'pjpg',
WEBP = 'webp',
WEBPLL = 'webpll',
WEBPLY = 'webply',
GIF = "gif",
PNG = "png",
JPG = "jpg",
PJPG = "pjpg",
WEBP = "webp",
WEBPLL = "webpll",
WEBPLY = "webply",
}

export enum CropBy {
DEFAULT = 'default',
ASPECTRATIO = 'aspectRatio',
REGION = 'region',
OFFSET = 'offset',
DEFAULT = "default",
ASPECTRATIO = "aspectRatio",
REGION = "region",
OFFSET = "offset",
}

export enum FitBy {
BOUNDS = 'bounds',
CROP = 'crop',
BOUNDS = "bounds",
CROP = "crop",
}

export enum Orientation {
Expand All @@ -104,53 +105,53 @@ export enum Orientation {
}

export enum OverlayAlign {
TOP = 'top',
BOTTOM = 'bottom',
LEFT = 'left',
RIGHT = 'right',
MIDDLE = 'middle',
CENTER = 'center',
TOP = "top",
BOTTOM = "bottom",
LEFT = "left",
RIGHT = "right",
MIDDLE = "middle",
CENTER = "center",
}

export enum OverlayRepeat {
X = 'x',
Y = 'y',
BOTH = 'both',
X = "x",
Y = "y",
BOTH = "both",
}

export enum ResizeFilter {
NEAREST = 'nearest',
BILINEAR = 'bilinear',
BICUBIC = 'bicubic',
LANCZOS2 = 'lanczos2',
LANCZOS3 = 'lanczos3',
NEAREST = "nearest",
BILINEAR = "bilinear",
BICUBIC = "bicubic",
LANCZOS2 = "lanczos2",
LANCZOS3 = "lanczos3",
}

export enum CanvasBy {
DEFAULT = 'default',
ASPECTRATIO = 'aspectRatio',
REGION = 'region',
OFFSET = 'offset',
DEFAULT = "default",
ASPECTRATIO = "aspectRatio",
REGION = "region",
OFFSET = "offset",
}

export enum QueryOperation {
EQUALS = '',
NOT_EQUALS = '$ne',
INCLUDES = '$in',
EXCLUDES = '$nin',
IS_LESS_THAN = '$lt',
IS_LESS_THAN_OR_EQUAL = '$lte',
IS_GREATER_THAN = '$gt',
IS_GREATER_THAN_OR_EQUAL = '$gte',
EXISTS = '$exists',
MATCHES = '$regex',
EQUALS = "",
NOT_EQUALS = "$ne",
INCLUDES = "$in",
EXCLUDES = "$nin",
IS_LESS_THAN = "$lt",
IS_LESS_THAN_OR_EQUAL = "$lte",
IS_GREATER_THAN = "$gt",
IS_GREATER_THAN_OR_EQUAL = "$gte",
EXISTS = "$exists",
MATCHES = "$regex",
}

export enum TaxonomyQueryOperation {
ABOVE = '$above',
BELOW = '$below',
EQ_ABOVE = '$eq_above',
EQ_BELOW = '$eq_below'
ABOVE = "$above",
BELOW = "$below",
EQ_ABOVE = "$eq_above",
EQ_BELOW = "$eq_below",
}

export type BaseQueryParameters = {
Expand All @@ -162,8 +163,8 @@ export type BaseQueryParameters = {
};

export enum QueryOperator {
AND = '$and',
OR = '$or',
AND = "$and",
OR = "$or",
}

export type PaginationObj = {
Expand Down Expand Up @@ -267,18 +268,18 @@ export interface FindResponse<T> {
content_types?: T[];
assets?: T[];
global_fields?: T[];
count?: number
count?: number;
}

export interface LivePreviewQuery {
live_preview: string
live_preview: string;
include_applied_variants?: boolean;
contentTypeUid?: string
content_type_uid?: string
entry_uid?: string
contentTypeUid?: string;
content_type_uid?: string;
entry_uid?: string;
entryUid?: any;
preview_timestamp?: string
release_id?: string
preview_timestamp?: string;
release_id?: string;
}

export type LivePreview = {
Expand All @@ -290,4 +291,4 @@ export type LivePreview = {
enable: boolean;
management_token?: string;
preview_token?: string;
}
};
Loading