@contentstack/delivery-sdk 4.11.2 → 5.0.1
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.
- package/README.md +31 -2
- package/dist/{modern/lib → legacy/assets}/asset.cjs +15 -34
- package/dist/legacy/assets/asset.cjs.map +1 -0
- package/dist/legacy/{lib/asset.cjs → assets/asset.js} +13 -34
- package/dist/legacy/assets/asset.js.map +1 -0
- package/dist/{modern/lib/cache.cjs → legacy/cache/index.cjs} +14 -35
- package/dist/legacy/cache/index.cjs.map +1 -0
- package/dist/legacy/{lib/cache.js → cache/index.js} +10 -8
- package/dist/legacy/cache/index.js.map +1 -0
- package/dist/legacy/{lib → common}/error-messages.cjs +8 -34
- package/dist/legacy/common/error-messages.cjs.map +1 -0
- package/dist/legacy/{lib → common}/error-messages.js +6 -9
- package/dist/legacy/common/error-messages.js.map +1 -0
- package/dist/{modern/lib → legacy/common}/pagination.cjs +10 -32
- package/dist/legacy/common/pagination.cjs.map +1 -0
- package/dist/legacy/{lib/pagination.cjs → common/pagination.js} +10 -34
- package/dist/legacy/common/pagination.js.map +1 -0
- package/dist/legacy/common/string-extensions.cjs +11 -0
- package/dist/legacy/common/string-extensions.cjs.map +1 -0
- package/dist/legacy/{lib → common}/string-extensions.js +1 -2
- package/dist/legacy/common/string-extensions.js.map +1 -0
- package/dist/legacy/{lib → common}/types.cjs +17 -55
- package/dist/legacy/common/types.cjs.map +1 -0
- package/dist/legacy/{lib → common}/types.js +3 -18
- package/dist/legacy/common/types.js.map +1 -0
- package/dist/legacy/common/utils.cjs +29 -0
- package/dist/legacy/common/utils.cjs.map +1 -0
- package/dist/legacy/{lib → common}/utils.js +7 -10
- package/dist/legacy/common/utils.js.map +1 -0
- package/dist/legacy/content-type/index.cjs +43 -0
- package/dist/legacy/content-type/index.cjs.map +1 -0
- package/dist/legacy/content-type/index.js +41 -0
- package/dist/legacy/content-type/index.js.map +1 -0
- package/dist/legacy/{lib → entries}/entries.cjs +21 -41
- package/dist/legacy/entries/entries.cjs.map +1 -0
- package/dist/{modern/lib → legacy/entries}/entries.js +15 -12
- package/dist/legacy/entries/entries.js.map +1 -0
- package/dist/{modern/lib → legacy/entries}/entry.cjs +20 -36
- package/dist/legacy/entries/entry.cjs.map +1 -0
- package/dist/legacy/{lib/entry.cjs → entries/entry.js} +18 -36
- package/dist/legacy/entries/entry.js.map +1 -0
- package/dist/{modern/lib/global-field.cjs → legacy/global-field/index.cjs} +15 -34
- package/dist/legacy/global-field/index.cjs.map +1 -0
- package/dist/legacy/{lib/global-field.cjs → global-field/index.js} +13 -34
- package/dist/legacy/global-field/index.js.map +1 -0
- package/dist/legacy/index.cjs +28 -48
- package/dist/legacy/index.cjs.map +1 -1
- package/dist/legacy/index.js +9 -11
- package/dist/legacy/index.js.map +1 -1
- package/dist/legacy/{lib → query}/asset-query.cjs +10 -34
- package/dist/legacy/query/asset-query.cjs.map +1 -0
- package/dist/{modern/lib → legacy/query}/asset-query.js +8 -9
- package/dist/legacy/query/asset-query.js.map +1 -0
- package/dist/{modern/lib → legacy/query}/base-query.cjs +20 -37
- package/dist/legacy/query/base-query.cjs.map +1 -0
- package/dist/legacy/{lib/base-query.cjs → query/base-query.js} +18 -37
- package/dist/legacy/query/base-query.js.map +1 -0
- package/dist/legacy/query/contenttype-query.cjs +51 -0
- package/dist/legacy/query/contenttype-query.cjs.map +1 -0
- package/dist/legacy/query/contenttype-query.js +49 -0
- package/dist/legacy/query/contenttype-query.js.map +1 -0
- package/dist/legacy/query/global-field-query.cjs +30 -0
- package/dist/legacy/query/global-field-query.cjs.map +1 -0
- package/dist/{modern/lib → legacy/query}/global-field-query.js +7 -8
- package/dist/legacy/query/global-field-query.js.map +1 -0
- package/dist/legacy/{lib → query}/query.cjs +48 -68
- package/dist/legacy/query/query.cjs.map +1 -0
- package/dist/{modern/lib → legacy/query}/query.js +17 -14
- package/dist/legacy/query/query.js.map +1 -0
- package/dist/legacy/query/taxonomy-query.cjs +14 -0
- package/dist/legacy/query/taxonomy-query.cjs.map +1 -0
- package/dist/legacy/query/taxonomy-query.js +12 -0
- package/dist/legacy/query/taxonomy-query.js.map +1 -0
- package/dist/{modern/lib → legacy/stack}/contentstack.cjs +44 -56
- package/dist/legacy/stack/contentstack.cjs.map +1 -0
- package/dist/{modern/lib → legacy/stack}/contentstack.js +19 -16
- package/dist/legacy/stack/contentstack.js.map +1 -0
- package/dist/legacy/stack/index.cjs +11 -0
- package/dist/legacy/stack/index.cjs.map +1 -0
- package/dist/legacy/stack/index.js +7 -0
- package/dist/legacy/stack/index.js.map +1 -0
- package/dist/{modern/lib → legacy/stack}/stack.cjs +30 -49
- package/dist/legacy/stack/stack.cjs.map +1 -0
- package/dist/legacy/{lib → stack}/stack.js +20 -16
- package/dist/legacy/stack/stack.js.map +1 -0
- package/dist/legacy/sync/synchronization.cjs +30 -0
- package/dist/legacy/sync/synchronization.cjs.map +1 -0
- package/dist/{modern/lib → legacy/sync}/synchronization.js +11 -13
- package/dist/legacy/sync/synchronization.js.map +1 -0
- package/dist/modern/{lib/asset.js → assets/asset.cjs} +13 -10
- package/dist/modern/assets/asset.cjs.map +1 -0
- package/dist/modern/{lib → assets}/asset.d.ts +2 -4
- package/dist/modern/assets/asset.d.ts.map +1 -0
- package/dist/{legacy/lib → modern/assets}/asset.js +10 -9
- package/dist/modern/assets/asset.js.map +1 -0
- package/dist/modern/{lib/string-extensions.d.ts → assets/image-transform.d.ts} +3 -16
- package/dist/modern/assets/image-transform.d.ts.map +1 -0
- package/dist/modern/assets/index.d.ts +3 -0
- package/dist/modern/assets/index.d.ts.map +1 -0
- package/dist/{legacy/lib/cache.cjs → modern/cache/index.cjs} +14 -35
- package/dist/modern/cache/index.cjs.map +1 -0
- package/dist/{legacy/lib/cache.d.ts → modern/cache/index.d.ts} +3 -10
- package/dist/modern/cache/index.d.ts.map +1 -0
- package/dist/modern/{lib/cache.js → cache/index.js} +10 -8
- package/dist/modern/cache/index.js.map +1 -0
- package/dist/modern/{lib → common}/error-messages.cjs +8 -34
- package/dist/modern/common/error-messages.cjs.map +1 -0
- package/dist/{legacy/lib → modern/common}/error-messages.d.ts +4 -5
- package/dist/modern/common/error-messages.d.ts.map +1 -0
- package/dist/modern/{lib → common}/error-messages.js +6 -9
- package/dist/modern/common/error-messages.js.map +1 -0
- package/dist/{legacy/lib/pagination.js → modern/common/pagination.cjs} +10 -12
- package/dist/modern/common/pagination.cjs.map +1 -0
- package/dist/{legacy/lib → modern/common}/pagination.d.ts +3 -10
- package/dist/modern/common/pagination.d.ts.map +1 -0
- package/dist/modern/{lib → common}/pagination.js +6 -10
- package/dist/modern/common/pagination.js.map +1 -0
- package/dist/modern/common/string-extensions.cjs +11 -0
- package/dist/modern/common/string-extensions.cjs.map +1 -0
- package/dist/modern/common/string-extensions.d.ts +8 -0
- package/dist/modern/common/string-extensions.d.ts.map +1 -0
- package/dist/modern/{lib → common}/string-extensions.js +1 -2
- package/dist/modern/common/string-extensions.js.map +1 -0
- package/dist/modern/{lib → common}/types.cjs +17 -55
- package/dist/modern/common/types.cjs.map +1 -0
- package/dist/{legacy/lib → modern/common}/types.d.ts +60 -41
- package/dist/modern/common/types.d.ts.map +1 -0
- package/dist/modern/{lib → common}/types.js +3 -18
- package/dist/modern/common/types.js.map +1 -0
- package/dist/modern/common/utils.cjs +29 -0
- package/dist/modern/common/utils.cjs.map +1 -0
- package/dist/modern/common/utils.d.ts +14 -0
- package/dist/modern/common/utils.d.ts.map +1 -0
- package/dist/modern/{lib → common}/utils.js +7 -10
- package/dist/modern/common/utils.js.map +1 -0
- package/dist/{legacy/lib/content-type.js → modern/content-type/index.cjs} +18 -14
- package/dist/modern/content-type/index.cjs.map +1 -0
- package/dist/{legacy/lib/content-type.d.ts → modern/content-type/index.d.ts} +4 -13
- package/dist/modern/content-type/index.d.ts.map +1 -0
- package/dist/modern/{lib/content-type.js → content-type/index.js} +13 -11
- package/dist/modern/content-type/index.js.map +1 -0
- package/dist/modern/{lib → entries}/entries.cjs +18 -41
- package/dist/modern/entries/entries.cjs.map +1 -0
- package/dist/modern/{lib → entries}/entries.d.ts +5 -11
- package/dist/modern/entries/entries.d.ts.map +1 -0
- package/dist/{legacy/lib → modern/entries}/entries.js +12 -12
- package/dist/modern/entries/entries.js.map +1 -0
- package/dist/modern/{lib/entry.js → entries/entry.cjs} +18 -12
- package/dist/modern/entries/entry.cjs.map +1 -0
- package/dist/modern/{lib → entries}/entry.d.ts +2 -4
- package/dist/modern/entries/entry.d.ts.map +1 -0
- package/dist/{legacy/lib → modern/entries}/entry.js +14 -10
- package/dist/modern/entries/entry.js.map +1 -0
- package/dist/modern/entries/index.d.ts +3 -0
- package/dist/modern/entries/index.d.ts.map +1 -0
- package/dist/modern/{lib/global-field.js → global-field/index.cjs} +13 -10
- package/dist/modern/global-field/index.cjs.map +1 -0
- package/dist/{legacy/lib/global-field.d.cts → modern/global-field/index.d.ts} +2 -4
- package/dist/modern/global-field/index.d.ts.map +1 -0
- package/dist/{legacy/lib/global-field.js → modern/global-field/index.js} +10 -9
- package/dist/modern/global-field/index.js.map +1 -0
- package/dist/modern/index.cjs +28 -48
- package/dist/modern/index.cjs.map +1 -1
- package/dist/modern/index.d.ts +17 -26
- package/dist/modern/index.d.ts.map +1 -0
- package/dist/modern/index.js +9 -11
- package/dist/modern/index.js.map +1 -1
- package/dist/modern/{lib → query}/asset-query.cjs +10 -34
- package/dist/modern/query/asset-query.cjs.map +1 -0
- package/dist/{legacy/lib → modern/query}/asset-query.d.ts +4 -11
- package/dist/modern/query/asset-query.d.ts.map +1 -0
- package/dist/{legacy/lib → modern/query}/asset-query.js +8 -9
- package/dist/modern/query/asset-query.js.map +1 -0
- package/dist/{legacy/lib/base-query.js → modern/query/base-query.cjs} +18 -16
- package/dist/modern/query/base-query.cjs.map +1 -0
- package/dist/modern/query/base-query.d.ts +174 -0
- package/dist/modern/query/base-query.d.ts.map +1 -0
- package/dist/modern/{lib → query}/base-query.js +14 -14
- package/dist/modern/query/base-query.js.map +1 -0
- package/dist/{legacy/lib/contenttype-query.js → modern/query/contenttype-query.cjs} +13 -10
- package/dist/modern/query/contenttype-query.cjs.map +1 -0
- package/dist/modern/{lib → query}/contenttype-query.d.ts +3 -9
- package/dist/modern/query/contenttype-query.d.ts.map +1 -0
- package/dist/modern/{lib → query}/contenttype-query.js +10 -9
- package/dist/modern/query/contenttype-query.js.map +1 -0
- package/dist/modern/query/entry-queryable.d.ts +4 -0
- package/dist/modern/query/entry-queryable.d.ts.map +1 -0
- package/dist/modern/query/global-field-query.cjs +30 -0
- package/dist/modern/query/global-field-query.cjs.map +1 -0
- package/dist/modern/{lib → query}/global-field-query.d.ts +3 -11
- package/dist/modern/query/global-field-query.d.ts.map +1 -0
- package/dist/{legacy/lib → modern/query}/global-field-query.js +7 -8
- package/dist/modern/query/global-field-query.js.map +1 -0
- package/dist/modern/query/index.d.ts +8 -0
- package/dist/modern/query/index.d.ts.map +1 -0
- package/dist/modern/{lib → query}/query.cjs +45 -68
- package/dist/modern/query/query.cjs.map +1 -0
- package/dist/{legacy/base-query-B4_k3n_p.d.ts → modern/query/query.d.ts} +4 -176
- package/dist/modern/query/query.d.ts.map +1 -0
- package/dist/{legacy/lib → modern/query}/query.js +14 -14
- package/dist/modern/query/query.js.map +1 -0
- package/dist/modern/query/taxonomy-query.cjs +14 -0
- package/dist/modern/query/taxonomy-query.cjs.map +1 -0
- package/dist/modern/query/taxonomy-query.d.ts +6 -0
- package/dist/modern/query/taxonomy-query.d.ts.map +1 -0
- package/dist/modern/query/taxonomy-query.js +12 -0
- package/dist/modern/query/taxonomy-query.js.map +1 -0
- package/dist/{legacy/lib → modern/stack}/contentstack.cjs +51 -66
- package/dist/modern/stack/contentstack.cjs.map +1 -0
- package/dist/modern/{contentstack-BmTB3Y49.d.cts → stack/contentstack.d.ts} +8 -13
- package/dist/modern/stack/contentstack.d.ts.map +1 -0
- package/dist/{legacy/lib → modern/stack}/contentstack.js +26 -26
- package/dist/modern/stack/contentstack.js.map +1 -0
- package/dist/modern/stack/index.cjs +11 -0
- package/dist/modern/stack/index.cjs.map +1 -0
- package/dist/modern/stack/index.d.ts +6 -0
- package/dist/modern/stack/index.d.ts.map +1 -0
- package/dist/modern/stack/index.js +7 -0
- package/dist/modern/stack/index.js.map +1 -0
- package/dist/{legacy/lib → modern/stack}/stack.cjs +27 -49
- package/dist/modern/stack/stack.cjs.map +1 -0
- package/dist/{legacy/lib → modern/stack}/stack.d.ts +11 -21
- package/dist/modern/stack/stack.d.ts.map +1 -0
- package/dist/modern/{lib → stack}/stack.js +17 -16
- package/dist/modern/stack/stack.js.map +1 -0
- package/dist/modern/sync/index.d.ts +3 -0
- package/dist/modern/sync/index.d.ts.map +1 -0
- package/dist/modern/sync/synchronization.cjs +30 -0
- package/dist/modern/sync/synchronization.cjs.map +1 -0
- package/dist/modern/sync/synchronization.d.ts +4 -0
- package/dist/modern/sync/synchronization.d.ts.map +1 -0
- package/dist/{legacy/lib → modern/sync}/synchronization.js +11 -13
- package/dist/modern/sync/synchronization.js.map +1 -0
- package/package.json +19 -21
- package/dist/legacy/base-query-DrXtYoPl.d.cts +0 -548
- package/dist/legacy/contentstack-BmTB3Y49.d.cts +0 -35
- package/dist/legacy/contentstack-DajCqJdu.d.ts +0 -35
- package/dist/legacy/index.d.cts +0 -26
- package/dist/legacy/index.d.ts +0 -26
- package/dist/legacy/lib/asset-query.cjs.map +0 -1
- package/dist/legacy/lib/asset-query.d.cts +0 -110
- package/dist/legacy/lib/asset-query.js.map +0 -1
- package/dist/legacy/lib/asset.cjs.map +0 -1
- package/dist/legacy/lib/asset.d.cts +0 -108
- package/dist/legacy/lib/asset.d.ts +0 -108
- package/dist/legacy/lib/asset.js.map +0 -1
- package/dist/legacy/lib/base-query.cjs.map +0 -1
- package/dist/legacy/lib/base-query.d.cts +0 -8
- package/dist/legacy/lib/base-query.d.ts +0 -8
- package/dist/legacy/lib/base-query.js.map +0 -1
- package/dist/legacy/lib/cache.cjs.map +0 -1
- package/dist/legacy/lib/cache.d.cts +0 -20
- package/dist/legacy/lib/cache.js.map +0 -1
- package/dist/legacy/lib/content-type.cjs +0 -61
- package/dist/legacy/lib/content-type.cjs.map +0 -1
- package/dist/legacy/lib/content-type.d.cts +0 -50
- package/dist/legacy/lib/content-type.js.map +0 -1
- package/dist/legacy/lib/contentstack.cjs.map +0 -1
- package/dist/legacy/lib/contentstack.d.cts +0 -21
- package/dist/legacy/lib/contentstack.d.ts +0 -21
- package/dist/legacy/lib/contentstack.js.map +0 -1
- package/dist/legacy/lib/contenttype-query.cjs +0 -70
- package/dist/legacy/lib/contenttype-query.cjs.map +0 -1
- package/dist/legacy/lib/contenttype-query.d.cts +0 -43
- package/dist/legacy/lib/contenttype-query.d.ts +0 -43
- package/dist/legacy/lib/contenttype-query.js.map +0 -1
- package/dist/legacy/lib/entries.cjs.map +0 -1
- package/dist/legacy/lib/entries.d.cts +0 -191
- package/dist/legacy/lib/entries.d.ts +0 -191
- package/dist/legacy/lib/entries.js.map +0 -1
- package/dist/legacy/lib/entry-queryable.cjs +0 -33
- package/dist/legacy/lib/entry-queryable.cjs.map +0 -1
- package/dist/legacy/lib/entry-queryable.d.cts +0 -13
- package/dist/legacy/lib/entry-queryable.d.ts +0 -13
- package/dist/legacy/lib/entry-queryable.js +0 -8
- package/dist/legacy/lib/entry-queryable.js.map +0 -1
- package/dist/legacy/lib/entry.cjs.map +0 -1
- package/dist/legacy/lib/entry.d.cts +0 -170
- package/dist/legacy/lib/entry.d.ts +0 -170
- package/dist/legacy/lib/entry.js.map +0 -1
- package/dist/legacy/lib/error-messages.cjs.map +0 -1
- package/dist/legacy/lib/error-messages.d.cts +0 -31
- package/dist/legacy/lib/error-messages.js.map +0 -1
- package/dist/legacy/lib/global-field-query.cjs +0 -54
- package/dist/legacy/lib/global-field-query.cjs.map +0 -1
- package/dist/legacy/lib/global-field-query.d.cts +0 -27
- package/dist/legacy/lib/global-field-query.d.ts +0 -27
- package/dist/legacy/lib/global-field-query.js.map +0 -1
- package/dist/legacy/lib/global-field.cjs.map +0 -1
- package/dist/legacy/lib/global-field.d.ts +0 -38
- package/dist/legacy/lib/global-field.js.map +0 -1
- package/dist/legacy/lib/image-transform.cjs +0 -528
- package/dist/legacy/lib/image-transform.cjs.map +0 -1
- package/dist/legacy/lib/image-transform.d.cts +0 -7
- package/dist/legacy/lib/image-transform.d.ts +0 -7
- package/dist/legacy/lib/image-transform.js +0 -506
- package/dist/legacy/lib/image-transform.js.map +0 -1
- package/dist/legacy/lib/pagination.cjs.map +0 -1
- package/dist/legacy/lib/pagination.d.cts +0 -99
- package/dist/legacy/lib/pagination.js.map +0 -1
- package/dist/legacy/lib/query.cjs.map +0 -1
- package/dist/legacy/lib/query.d.cts +0 -8
- package/dist/legacy/lib/query.d.ts +0 -8
- package/dist/legacy/lib/query.js.map +0 -1
- package/dist/legacy/lib/stack.cjs.map +0 -1
- package/dist/legacy/lib/stack.d.cts +0 -170
- package/dist/legacy/lib/stack.js.map +0 -1
- package/dist/legacy/lib/string-extensions.cjs +0 -27
- package/dist/legacy/lib/string-extensions.cjs.map +0 -1
- package/dist/legacy/lib/string-extensions.d.cts +0 -404
- package/dist/legacy/lib/string-extensions.d.ts +0 -404
- package/dist/legacy/lib/string-extensions.js.map +0 -1
- package/dist/legacy/lib/synchronization.cjs +0 -65
- package/dist/legacy/lib/synchronization.cjs.map +0 -1
- package/dist/legacy/lib/synchronization.d.cts +0 -10
- package/dist/legacy/lib/synchronization.d.ts +0 -10
- package/dist/legacy/lib/synchronization.js.map +0 -1
- package/dist/legacy/lib/taxonomy-query.cjs +0 -38
- package/dist/legacy/lib/taxonomy-query.cjs.map +0 -1
- package/dist/legacy/lib/taxonomy-query.d.cts +0 -14
- package/dist/legacy/lib/taxonomy-query.d.ts +0 -14
- package/dist/legacy/lib/taxonomy-query.js +0 -13
- package/dist/legacy/lib/taxonomy-query.js.map +0 -1
- package/dist/legacy/lib/types.cjs.map +0 -1
- package/dist/legacy/lib/types.d.cts +0 -318
- package/dist/legacy/lib/types.js.map +0 -1
- package/dist/legacy/lib/utils.cjs +0 -55
- package/dist/legacy/lib/utils.cjs.map +0 -1
- package/dist/legacy/lib/utils.d.cts +0 -21
- package/dist/legacy/lib/utils.d.ts +0 -21
- package/dist/legacy/lib/utils.js.map +0 -1
- package/dist/legacy/persistance/config/persistance-storage-config.cjs +0 -19
- package/dist/legacy/persistance/config/persistance-storage-config.cjs.map +0 -1
- package/dist/legacy/persistance/config/persistance-storage-config.d.cts +0 -33
- package/dist/legacy/persistance/config/persistance-storage-config.d.ts +0 -33
- package/dist/legacy/persistance/config/persistance-storage-config.js +0 -1
- package/dist/legacy/persistance/config/persistance-storage-config.js.map +0 -1
- package/dist/legacy/persistance/helper/utils.cjs +0 -31
- package/dist/legacy/persistance/helper/utils.cjs.map +0 -1
- package/dist/legacy/persistance/helper/utils.d.cts +0 -4
- package/dist/legacy/persistance/helper/utils.d.ts +0 -4
- package/dist/legacy/persistance/helper/utils.js +0 -6
- package/dist/legacy/persistance/helper/utils.js.map +0 -1
- package/dist/legacy/persistance/index.cjs +0 -31
- package/dist/legacy/persistance/index.cjs.map +0 -1
- package/dist/legacy/persistance/index.d.cts +0 -7
- package/dist/legacy/persistance/index.d.ts +0 -7
- package/dist/legacy/persistance/index.js +0 -6
- package/dist/legacy/persistance/index.js.map +0 -1
- package/dist/legacy/persistance/persistance-store.cjs +0 -162
- package/dist/legacy/persistance/persistance-store.cjs.map +0 -1
- package/dist/legacy/persistance/persistance-store.d.cts +0 -51
- package/dist/legacy/persistance/persistance-store.d.ts +0 -51
- package/dist/legacy/persistance/persistance-store.js +0 -137
- package/dist/legacy/persistance/persistance-store.js.map +0 -1
- package/dist/legacy/persistance/storages/index.cjs +0 -34
- package/dist/legacy/persistance/storages/index.cjs.map +0 -1
- package/dist/legacy/persistance/storages/index.d.cts +0 -4
- package/dist/legacy/persistance/storages/index.d.ts +0 -4
- package/dist/legacy/persistance/storages/index.js +0 -8
- package/dist/legacy/persistance/storages/index.js.map +0 -1
- package/dist/legacy/persistance/storages/local-storage.cjs +0 -66
- package/dist/legacy/persistance/storages/local-storage.cjs.map +0 -1
- package/dist/legacy/persistance/storages/local-storage.d.cts +0 -6
- package/dist/legacy/persistance/storages/local-storage.d.ts +0 -6
- package/dist/legacy/persistance/storages/local-storage.js +0 -41
- package/dist/legacy/persistance/storages/local-storage.js.map +0 -1
- package/dist/legacy/persistance/storages/memory-storage.cjs +0 -60
- package/dist/legacy/persistance/storages/memory-storage.cjs.map +0 -1
- package/dist/legacy/persistance/storages/memory-storage.d.cts +0 -6
- package/dist/legacy/persistance/storages/memory-storage.d.ts +0 -6
- package/dist/legacy/persistance/storages/memory-storage.js +0 -35
- package/dist/legacy/persistance/storages/memory-storage.js.map +0 -1
- package/dist/legacy/persistance/types/index.cjs +0 -19
- package/dist/legacy/persistance/types/index.cjs.map +0 -1
- package/dist/legacy/persistance/types/index.d.cts +0 -3
- package/dist/legacy/persistance/types/index.d.ts +0 -3
- package/dist/legacy/persistance/types/index.js +0 -1
- package/dist/legacy/persistance/types/index.js.map +0 -1
- package/dist/legacy/persistance/types/storage-type.cjs +0 -19
- package/dist/legacy/persistance/types/storage-type.cjs.map +0 -1
- package/dist/legacy/persistance/types/storage-type.d.cts +0 -3
- package/dist/legacy/persistance/types/storage-type.d.ts +0 -3
- package/dist/legacy/persistance/types/storage-type.js +0 -1
- package/dist/legacy/persistance/types/storage-type.js.map +0 -1
- package/dist/legacy/persistance/types/storage.cjs +0 -19
- package/dist/legacy/persistance/types/storage.cjs.map +0 -1
- package/dist/legacy/persistance/types/storage.d.cts +0 -12
- package/dist/legacy/persistance/types/storage.d.ts +0 -12
- package/dist/legacy/persistance/types/storage.js +0 -1
- package/dist/legacy/persistance/types/storage.js.map +0 -1
- package/dist/modern/base-query-B4_k3n_p.d.ts +0 -548
- package/dist/modern/base-query-DrXtYoPl.d.cts +0 -548
- package/dist/modern/contentstack-DajCqJdu.d.ts +0 -35
- package/dist/modern/index.d.cts +0 -26
- package/dist/modern/lib/asset-query.cjs.map +0 -1
- package/dist/modern/lib/asset-query.d.cts +0 -110
- package/dist/modern/lib/asset-query.d.ts +0 -110
- package/dist/modern/lib/asset-query.js.map +0 -1
- package/dist/modern/lib/asset.cjs.map +0 -1
- package/dist/modern/lib/asset.d.cts +0 -108
- package/dist/modern/lib/asset.js.map +0 -1
- package/dist/modern/lib/base-query.cjs.map +0 -1
- package/dist/modern/lib/base-query.d.cts +0 -8
- package/dist/modern/lib/base-query.d.ts +0 -8
- package/dist/modern/lib/base-query.js.map +0 -1
- package/dist/modern/lib/cache.cjs.map +0 -1
- package/dist/modern/lib/cache.d.cts +0 -20
- package/dist/modern/lib/cache.d.ts +0 -20
- package/dist/modern/lib/cache.js.map +0 -1
- package/dist/modern/lib/content-type.cjs +0 -61
- package/dist/modern/lib/content-type.cjs.map +0 -1
- package/dist/modern/lib/content-type.d.cts +0 -50
- package/dist/modern/lib/content-type.d.ts +0 -50
- package/dist/modern/lib/content-type.js.map +0 -1
- package/dist/modern/lib/contentstack.cjs.map +0 -1
- package/dist/modern/lib/contentstack.d.cts +0 -21
- package/dist/modern/lib/contentstack.d.ts +0 -21
- package/dist/modern/lib/contentstack.js.map +0 -1
- package/dist/modern/lib/contenttype-query.cjs +0 -70
- package/dist/modern/lib/contenttype-query.cjs.map +0 -1
- package/dist/modern/lib/contenttype-query.d.cts +0 -43
- package/dist/modern/lib/contenttype-query.js.map +0 -1
- package/dist/modern/lib/entries.cjs.map +0 -1
- package/dist/modern/lib/entries.d.cts +0 -191
- package/dist/modern/lib/entries.js.map +0 -1
- package/dist/modern/lib/entry-queryable.cjs +0 -33
- package/dist/modern/lib/entry-queryable.cjs.map +0 -1
- package/dist/modern/lib/entry-queryable.d.cts +0 -13
- package/dist/modern/lib/entry-queryable.d.ts +0 -13
- package/dist/modern/lib/entry-queryable.js +0 -8
- package/dist/modern/lib/entry-queryable.js.map +0 -1
- package/dist/modern/lib/entry.cjs.map +0 -1
- package/dist/modern/lib/entry.d.cts +0 -170
- package/dist/modern/lib/entry.js.map +0 -1
- package/dist/modern/lib/error-messages.cjs.map +0 -1
- package/dist/modern/lib/error-messages.d.cts +0 -31
- package/dist/modern/lib/error-messages.d.ts +0 -31
- package/dist/modern/lib/error-messages.js.map +0 -1
- package/dist/modern/lib/global-field-query.cjs +0 -54
- package/dist/modern/lib/global-field-query.cjs.map +0 -1
- package/dist/modern/lib/global-field-query.d.cts +0 -27
- package/dist/modern/lib/global-field-query.js.map +0 -1
- package/dist/modern/lib/global-field.cjs.map +0 -1
- package/dist/modern/lib/global-field.d.cts +0 -38
- package/dist/modern/lib/global-field.d.ts +0 -38
- package/dist/modern/lib/global-field.js.map +0 -1
- package/dist/modern/lib/image-transform.cjs +0 -528
- package/dist/modern/lib/image-transform.cjs.map +0 -1
- package/dist/modern/lib/image-transform.d.cts +0 -7
- package/dist/modern/lib/image-transform.d.ts +0 -7
- package/dist/modern/lib/image-transform.js +0 -506
- package/dist/modern/lib/image-transform.js.map +0 -1
- package/dist/modern/lib/pagination.cjs.map +0 -1
- package/dist/modern/lib/pagination.d.cts +0 -99
- package/dist/modern/lib/pagination.d.ts +0 -99
- package/dist/modern/lib/pagination.js.map +0 -1
- package/dist/modern/lib/query.cjs.map +0 -1
- package/dist/modern/lib/query.d.cts +0 -8
- package/dist/modern/lib/query.d.ts +0 -8
- package/dist/modern/lib/query.js.map +0 -1
- package/dist/modern/lib/stack.cjs.map +0 -1
- package/dist/modern/lib/stack.d.cts +0 -170
- package/dist/modern/lib/stack.d.ts +0 -170
- package/dist/modern/lib/stack.js.map +0 -1
- package/dist/modern/lib/string-extensions.cjs +0 -27
- package/dist/modern/lib/string-extensions.cjs.map +0 -1
- package/dist/modern/lib/string-extensions.d.cts +0 -404
- package/dist/modern/lib/string-extensions.js.map +0 -1
- package/dist/modern/lib/synchronization.cjs +0 -65
- package/dist/modern/lib/synchronization.cjs.map +0 -1
- package/dist/modern/lib/synchronization.d.cts +0 -10
- package/dist/modern/lib/synchronization.d.ts +0 -10
- package/dist/modern/lib/synchronization.js.map +0 -1
- package/dist/modern/lib/taxonomy-query.cjs +0 -38
- package/dist/modern/lib/taxonomy-query.cjs.map +0 -1
- package/dist/modern/lib/taxonomy-query.d.cts +0 -14
- package/dist/modern/lib/taxonomy-query.d.ts +0 -14
- package/dist/modern/lib/taxonomy-query.js +0 -13
- package/dist/modern/lib/taxonomy-query.js.map +0 -1
- package/dist/modern/lib/types.cjs.map +0 -1
- package/dist/modern/lib/types.d.cts +0 -318
- package/dist/modern/lib/types.d.ts +0 -318
- package/dist/modern/lib/types.js.map +0 -1
- package/dist/modern/lib/utils.cjs +0 -55
- package/dist/modern/lib/utils.cjs.map +0 -1
- package/dist/modern/lib/utils.d.cts +0 -21
- package/dist/modern/lib/utils.d.ts +0 -21
- package/dist/modern/lib/utils.js.map +0 -1
- package/dist/modern/persistance/config/persistance-storage-config.cjs +0 -19
- package/dist/modern/persistance/config/persistance-storage-config.cjs.map +0 -1
- package/dist/modern/persistance/config/persistance-storage-config.d.cts +0 -33
- package/dist/modern/persistance/config/persistance-storage-config.d.ts +0 -33
- package/dist/modern/persistance/config/persistance-storage-config.js +0 -1
- package/dist/modern/persistance/config/persistance-storage-config.js.map +0 -1
- package/dist/modern/persistance/helper/utils.cjs +0 -31
- package/dist/modern/persistance/helper/utils.cjs.map +0 -1
- package/dist/modern/persistance/helper/utils.d.cts +0 -4
- package/dist/modern/persistance/helper/utils.d.ts +0 -4
- package/dist/modern/persistance/helper/utils.js +0 -6
- package/dist/modern/persistance/helper/utils.js.map +0 -1
- package/dist/modern/persistance/index.cjs +0 -31
- package/dist/modern/persistance/index.cjs.map +0 -1
- package/dist/modern/persistance/index.d.cts +0 -7
- package/dist/modern/persistance/index.d.ts +0 -7
- package/dist/modern/persistance/index.js +0 -6
- package/dist/modern/persistance/index.js.map +0 -1
- package/dist/modern/persistance/persistance-store.cjs +0 -162
- package/dist/modern/persistance/persistance-store.cjs.map +0 -1
- package/dist/modern/persistance/persistance-store.d.cts +0 -51
- package/dist/modern/persistance/persistance-store.d.ts +0 -51
- package/dist/modern/persistance/persistance-store.js +0 -137
- package/dist/modern/persistance/persistance-store.js.map +0 -1
- package/dist/modern/persistance/storages/index.cjs +0 -34
- package/dist/modern/persistance/storages/index.cjs.map +0 -1
- package/dist/modern/persistance/storages/index.d.cts +0 -4
- package/dist/modern/persistance/storages/index.d.ts +0 -4
- package/dist/modern/persistance/storages/index.js +0 -8
- package/dist/modern/persistance/storages/index.js.map +0 -1
- package/dist/modern/persistance/storages/local-storage.cjs +0 -66
- package/dist/modern/persistance/storages/local-storage.cjs.map +0 -1
- package/dist/modern/persistance/storages/local-storage.d.cts +0 -6
- package/dist/modern/persistance/storages/local-storage.d.ts +0 -6
- package/dist/modern/persistance/storages/local-storage.js +0 -41
- package/dist/modern/persistance/storages/local-storage.js.map +0 -1
- package/dist/modern/persistance/storages/memory-storage.cjs +0 -60
- package/dist/modern/persistance/storages/memory-storage.cjs.map +0 -1
- package/dist/modern/persistance/storages/memory-storage.d.cts +0 -6
- package/dist/modern/persistance/storages/memory-storage.d.ts +0 -6
- package/dist/modern/persistance/storages/memory-storage.js +0 -35
- package/dist/modern/persistance/storages/memory-storage.js.map +0 -1
- package/dist/modern/persistance/types/index.cjs +0 -19
- package/dist/modern/persistance/types/index.cjs.map +0 -1
- package/dist/modern/persistance/types/index.d.cts +0 -3
- package/dist/modern/persistance/types/index.d.ts +0 -3
- package/dist/modern/persistance/types/index.js +0 -1
- package/dist/modern/persistance/types/index.js.map +0 -1
- package/dist/modern/persistance/types/storage-type.cjs +0 -19
- package/dist/modern/persistance/types/storage-type.cjs.map +0 -1
- package/dist/modern/persistance/types/storage-type.d.cts +0 -3
- package/dist/modern/persistance/types/storage-type.d.ts +0 -3
- package/dist/modern/persistance/types/storage-type.js +0 -1
- package/dist/modern/persistance/types/storage-type.js.map +0 -1
- package/dist/modern/persistance/types/storage.cjs +0 -19
- package/dist/modern/persistance/types/storage.cjs.map +0 -1
- package/dist/modern/persistance/types/storage.d.cts +0 -12
- package/dist/modern/persistance/types/storage.d.ts +0 -12
- package/dist/modern/persistance/types/storage.js +0 -1
- package/dist/modern/persistance/types/storage.js.map +0 -1
|
@@ -1,548 +0,0 @@
|
|
|
1
|
-
import { AxiosInstance } from '@contentstack/core';
|
|
2
|
-
import { Pagination } from './lib/pagination.js';
|
|
3
|
-
import { params, queryParams, QueryOperation, TaxonomyQueryOperation, QueryOperator, FindResponse } from './lib/types.js';
|
|
4
|
-
|
|
5
|
-
declare class Query extends BaseQuery {
|
|
6
|
-
private _contentTypeUid?;
|
|
7
|
-
constructor(client: AxiosInstance, params: params, queryParams: queryParams, variants?: string, uid?: string, queryObj?: {
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
});
|
|
10
|
-
private isValidAlphanumeric;
|
|
11
|
-
private isValidRegexPattern;
|
|
12
|
-
private isValidValue;
|
|
13
|
-
/**
|
|
14
|
-
* @method where
|
|
15
|
-
* @memberof Query
|
|
16
|
-
* @description Filters the results based on the specified criteria.
|
|
17
|
-
* @example
|
|
18
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
19
|
-
*
|
|
20
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
21
|
-
* const query = stack.contentType("contentTypeUid").entry().query();
|
|
22
|
-
* const result = await query.where("field_UID", QueryOperation.IS_LESS_THAN, ["field1", "field2"]).find()
|
|
23
|
-
* // OR
|
|
24
|
-
* const asset = await stack.asset().query().where("field_UID", QueryOperation.IS_LESS_THAN, ["field1", "field2"]).find()
|
|
25
|
-
* @example
|
|
26
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
27
|
-
*
|
|
28
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
29
|
-
* const query = stack.contentType("contentTypeUid").entry().query();
|
|
30
|
-
* const result = await query.where("field_UID", QueryOperation.MATCHES, ["field1", "field2"]).find()
|
|
31
|
-
* @returns {Query}
|
|
32
|
-
*/
|
|
33
|
-
where(fieldUid: string, queryOperation: QueryOperation | TaxonomyQueryOperation, fields: string | string[] | number | number[] | object | boolean, additionalData?: object): Query;
|
|
34
|
-
/**
|
|
35
|
-
* @method regex
|
|
36
|
-
* @memberof Query
|
|
37
|
-
* @description Retrieve entries that match the provided regular expressions
|
|
38
|
-
* @example
|
|
39
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
40
|
-
*
|
|
41
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
42
|
-
* const query = stack.contentType("contentTypeUid").entry().query();
|
|
43
|
-
* const result = await query.regex('title','^Demo').find()
|
|
44
|
-
* // OR
|
|
45
|
-
* const result = await query.regex('title','^Demo', 'i').find() // regex with options
|
|
46
|
-
* @returns {Query}
|
|
47
|
-
*/
|
|
48
|
-
regex(fieldUid: string, regexPattern: string, options?: string): Query;
|
|
49
|
-
/**
|
|
50
|
-
* @method whereIn
|
|
51
|
-
* @memberof Query
|
|
52
|
-
* @description Get entries having values based on referenced fields.
|
|
53
|
-
* The query retrieves all entries that satisfy the query conditions made on referenced fields
|
|
54
|
-
* This method sets the '$in_query' parameter to a reference field UID and a query instance in the API request.
|
|
55
|
-
* @example
|
|
56
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
57
|
-
*
|
|
58
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
59
|
-
* const query = stack.contentType("contentTypeUid").entry().query();
|
|
60
|
-
* const subQuery = stack.contentType("referencedContentTypeUid").entry().query().where("title", QueryOperation.EQUALS, "value");
|
|
61
|
-
* query.whereIn("brand", subQuery)
|
|
62
|
-
* const result = await query.find()
|
|
63
|
-
*
|
|
64
|
-
* @param {string} referenceUid - UID of the reference field to query.
|
|
65
|
-
* @param {Query} queryInstance - The Query instance to include in the where clause.
|
|
66
|
-
* @returns {Query} - Returns the Query instance for chaining.
|
|
67
|
-
*/
|
|
68
|
-
whereIn(referenceUid: string, queryInstance: Query): Query;
|
|
69
|
-
/**
|
|
70
|
-
* @method whereNotIn
|
|
71
|
-
* @memberof Query
|
|
72
|
-
* @description Get entries having values based on referenced fields.
|
|
73
|
-
* This query works the opposite of $in_query and retrieves all entries that does not satisfy query conditions made on referenced fields.
|
|
74
|
-
* This method sets the '$nin_query' parameter to a reference field UID and a query instance in the API request.
|
|
75
|
-
* @example
|
|
76
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
77
|
-
*
|
|
78
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
79
|
-
* const query = stack.contentType("contentTypeUid").entry().query();
|
|
80
|
-
* const subQuery = stack.contentType("referencedContentTypeUid").entry().query().where("title", QueryOperation.EQUALS, "value");
|
|
81
|
-
* query.whereNotIn("brand", subQuery)
|
|
82
|
-
* const result = await query.find()
|
|
83
|
-
*
|
|
84
|
-
* @param {string} referenceUid - UID of the reference field to query.
|
|
85
|
-
* @param {Query} queryInstance - The Query instance to include in the where clause.
|
|
86
|
-
* @returns {Query} - Returns the Query instance for chaining.
|
|
87
|
-
*/
|
|
88
|
-
whereNotIn(referenceUid: string, queryInstance: Query): Query;
|
|
89
|
-
/**
|
|
90
|
-
* @method queryOperator
|
|
91
|
-
* @memberof Query
|
|
92
|
-
* @description In case of '$and' get entries that satisfy all the conditions provided in the '$and' query and
|
|
93
|
-
* in case of '$or' query get all entries that satisfy at least one of the given conditions provided in the '$or' query.
|
|
94
|
-
* @example
|
|
95
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
96
|
-
*
|
|
97
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
98
|
-
* const query = stack.contentType("contentType1Uid").entry().query();
|
|
99
|
-
* const subQuery1 = stack.contentType("contentType2Uid").entry().query().where("price", QueryOperation.IS_LESS_THAN, 90);
|
|
100
|
-
* const subQuery2 = stack.contentType("contentType3Uid").entry().query().where("discount", QueryOperation.INCLUDES, [20, 45]);
|
|
101
|
-
* query.queryOperator(QueryOperator.AND, subQuery1, subQuery2)
|
|
102
|
-
* const result = await query.find()
|
|
103
|
-
*
|
|
104
|
-
* @param {QueryOperator} queryType - The type of query operator to apply.
|
|
105
|
-
* @param {...Query[]} queryObjects - The Query instances to apply the query to.
|
|
106
|
-
* @returns {Query} - Returns the Query instance for chaining.
|
|
107
|
-
*/
|
|
108
|
-
queryOperator(queryType: QueryOperator, ...queryObjects: Query[]): Query;
|
|
109
|
-
/**
|
|
110
|
-
* @method getQuery
|
|
111
|
-
* @memberof Query
|
|
112
|
-
* @description Returns the raw (JSON) query based on the filters applied on Query object.
|
|
113
|
-
* @example
|
|
114
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
115
|
-
*
|
|
116
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
117
|
-
* const query = stack.contentType("contentTypeUid").entry().query();
|
|
118
|
-
* const result = query.getQuery()
|
|
119
|
-
* // OR
|
|
120
|
-
* const assetQuery = stack.asset().query();
|
|
121
|
-
* const assetResult = assetQuery.getQuery()
|
|
122
|
-
*
|
|
123
|
-
* @returns {{ [key: string]: any }} The raw query object
|
|
124
|
-
*/
|
|
125
|
-
getQuery(): {
|
|
126
|
-
[key: string]: any;
|
|
127
|
-
};
|
|
128
|
-
/**
|
|
129
|
-
* @method containedIn
|
|
130
|
-
* @memberof Query
|
|
131
|
-
* @description Filters entries where the field value is contained in the provided array of values
|
|
132
|
-
* @param {string} key - The field UID to filter on
|
|
133
|
-
* @param {(string | number | boolean)[]} value - Array of values to match against
|
|
134
|
-
* @example
|
|
135
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
136
|
-
*
|
|
137
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
138
|
-
* const query = stack.contentType("contentTypeUid").entry().query();
|
|
139
|
-
* const result = await query.containedIn('fieldUid', ['value1', 'value2']).find()
|
|
140
|
-
*
|
|
141
|
-
* @returns {Query}
|
|
142
|
-
*/
|
|
143
|
-
containedIn(key: string, value: (string | number | boolean)[]): Query;
|
|
144
|
-
/**
|
|
145
|
-
* @method notContainedIn
|
|
146
|
-
* @memberof Query
|
|
147
|
-
* @description Filters entries where the field value is not contained in the provided array of values
|
|
148
|
-
* @param {string} key - The field UID to filter on
|
|
149
|
-
* @param {(string | number | boolean)[]} value - Array of values to exclude
|
|
150
|
-
* @example
|
|
151
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
152
|
-
*
|
|
153
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
154
|
-
* const query = stack.contentType("contentTypeUid").entry().query();
|
|
155
|
-
* const result = await query.notContainedIn('fieldUid', ['value1', 'value2']).find()
|
|
156
|
-
*
|
|
157
|
-
* @returns {Query}
|
|
158
|
-
*/
|
|
159
|
-
notContainedIn(key: string, value: (string | number | boolean)[]): Query;
|
|
160
|
-
/**
|
|
161
|
-
* @method exists
|
|
162
|
-
* @memberof Query
|
|
163
|
-
* @description Filters entries where the specified field exists
|
|
164
|
-
* @param {string} key - The field UID to check for existence
|
|
165
|
-
* @example
|
|
166
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
167
|
-
*
|
|
168
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
169
|
-
* const query = stack.contentType("contentTypeUid").entry().query();
|
|
170
|
-
* const result = await query.exists('fieldUid').find()
|
|
171
|
-
*
|
|
172
|
-
* @returns {Query}
|
|
173
|
-
*/
|
|
174
|
-
exists(key: string): Query;
|
|
175
|
-
/**
|
|
176
|
-
* @method notExists
|
|
177
|
-
* @memberof Query
|
|
178
|
-
* @description Filters entries where the specified field does not exist
|
|
179
|
-
* @param {string} key - The field UID to check for non-existence
|
|
180
|
-
* @example
|
|
181
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
182
|
-
*
|
|
183
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
184
|
-
* const query = stack.contentType("contentTypeUid").entry().query();
|
|
185
|
-
* const result = await query.notExists('fieldUid').find()
|
|
186
|
-
*
|
|
187
|
-
* @returns {Query}
|
|
188
|
-
*/
|
|
189
|
-
notExists(key: string): Query;
|
|
190
|
-
/**
|
|
191
|
-
* @method or
|
|
192
|
-
* @memberof Query
|
|
193
|
-
* @description Combines multiple queries with OR logic - returns entries that match at least one of the provided queries
|
|
194
|
-
* @param {...Query} queries - Query instances to combine with OR logic
|
|
195
|
-
* @example
|
|
196
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
197
|
-
*
|
|
198
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
199
|
-
* const query1 = stack.contentType('contenttype_uid').entry().query().containedIn('fieldUID', ['value']);
|
|
200
|
-
* const query2 = stack.contentType('contenttype_uid').entry().query().where('fieldUID', QueryOperation.EQUALS, 'value2');
|
|
201
|
-
* const result = await stack.contentType('contenttype_uid').entry().query().or(query1, query2).find();
|
|
202
|
-
*
|
|
203
|
-
* @returns {Query}
|
|
204
|
-
*/
|
|
205
|
-
or(...queries: Query[]): Query;
|
|
206
|
-
/**
|
|
207
|
-
* @method and
|
|
208
|
-
* @memberof Query
|
|
209
|
-
* @description Combines multiple queries with AND logic - returns entries that match all of the provided queries
|
|
210
|
-
* @param {...Query} queries - Query instances to combine with AND logic
|
|
211
|
-
* @example
|
|
212
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
213
|
-
*
|
|
214
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
215
|
-
* const query1 = stack.contentType('contenttype_uid').entry().query().containedIn('fieldUID', ['value']);
|
|
216
|
-
* const query2 = stack.contentType('contenttype_uid').entry().query().where('fieldUID', QueryOperation.EQUALS, 'value2');
|
|
217
|
-
* const result = await stack.contentType('contenttype_uid').entry().query().and(query1, query2).find();
|
|
218
|
-
*
|
|
219
|
-
* @returns {Query}
|
|
220
|
-
*/
|
|
221
|
-
and(...queries: Query[]): Query;
|
|
222
|
-
/**
|
|
223
|
-
* @method equalTo
|
|
224
|
-
* @memberof Query
|
|
225
|
-
* @description Filters entries where the field value equals the specified value
|
|
226
|
-
* @param {string} key - The field UID to filter on
|
|
227
|
-
* @param {string | number | boolean} value - The value to match
|
|
228
|
-
* @example
|
|
229
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
230
|
-
*
|
|
231
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
232
|
-
* const result = await stack.contentType('contenttype_uid').entry().query().equalTo('fieldUid', 'value').find();
|
|
233
|
-
*
|
|
234
|
-
* @returns {Query}
|
|
235
|
-
*/
|
|
236
|
-
equalTo(key: string, value: string | number | boolean): Query;
|
|
237
|
-
/**
|
|
238
|
-
* @method notEqualTo
|
|
239
|
-
* @memberof Query
|
|
240
|
-
* @description Filters entries where the field value does not equal the specified value
|
|
241
|
-
* @param {string} key - The field UID to filter on
|
|
242
|
-
* @param {string | number | boolean} value - The value to exclude
|
|
243
|
-
* @example
|
|
244
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
245
|
-
*
|
|
246
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
247
|
-
* const result = await stack.contentType('contenttype_uid').entry().query().notEqualTo('fieldUid', 'value').find();
|
|
248
|
-
*
|
|
249
|
-
* @returns {Query}
|
|
250
|
-
*/
|
|
251
|
-
notEqualTo(key: string, value: string | number | boolean): Query;
|
|
252
|
-
/**
|
|
253
|
-
* @method referenceIn
|
|
254
|
-
* @memberof Query
|
|
255
|
-
* @description Filters entries where the reference field matches entries from the provided query
|
|
256
|
-
* @param {string} key - The reference field UID to filter on
|
|
257
|
-
* @param {Query} query - Query instance to match referenced entries against
|
|
258
|
-
* @example
|
|
259
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
260
|
-
*
|
|
261
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
262
|
-
* const subQuery = stack.contentType('contenttype_uid').entry().query().where('title', QueryOperation.EQUALS, 'value');
|
|
263
|
-
* const result = await stack.contentType('contenttype_uid').entry().query().referenceIn('reference_uid', subQuery).find();
|
|
264
|
-
*
|
|
265
|
-
* @returns {Query}
|
|
266
|
-
*/
|
|
267
|
-
referenceIn(key: string, query: Query): Query;
|
|
268
|
-
/**
|
|
269
|
-
* @method referenceNotIn
|
|
270
|
-
* @memberof Query
|
|
271
|
-
* @description Filters entries where the reference field does not match entries from the provided query
|
|
272
|
-
* @param {string} key - The reference field UID to filter on
|
|
273
|
-
* @param {Query} query - Query instance to exclude referenced entries against
|
|
274
|
-
* @example
|
|
275
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
276
|
-
*
|
|
277
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
278
|
-
* const subQuery = stack.contentType('contenttype_uid').entry().query().where('title', QueryOperation.EQUALS, 'value');
|
|
279
|
-
* const result = await stack.contentType('contenttype_uid').entry().query().referenceNotIn('reference_uid', subQuery).find();
|
|
280
|
-
*
|
|
281
|
-
* @returns {Query}
|
|
282
|
-
*/
|
|
283
|
-
referenceNotIn(key: string, query: Query): Query;
|
|
284
|
-
/**
|
|
285
|
-
* @method tags
|
|
286
|
-
* @memberof Query
|
|
287
|
-
* @description Filters entries that have any of the specified tags
|
|
288
|
-
* @param {(string | number | boolean)[]} values - Array of tag values to filter by
|
|
289
|
-
* @example
|
|
290
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
291
|
-
*
|
|
292
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
293
|
-
* const result = await stack.contentType('contenttype_uid').entry().query().tags(['tag1']).find();
|
|
294
|
-
*
|
|
295
|
-
* @returns {Query}
|
|
296
|
-
*/
|
|
297
|
-
tags(values: (string | number | boolean)[]): Query;
|
|
298
|
-
/**
|
|
299
|
-
* @method search
|
|
300
|
-
* @memberof Query
|
|
301
|
-
* @description Enables typeahead search functionality for the query
|
|
302
|
-
* @param {string} key - The search term to use for typeahead search
|
|
303
|
-
* @example
|
|
304
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
305
|
-
*
|
|
306
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
307
|
-
* const result = await stack.contentType('contenttype_uid').entry().query().search('key').find();
|
|
308
|
-
*
|
|
309
|
-
* @returns {Query}
|
|
310
|
-
*/
|
|
311
|
-
search(key: string): Query;
|
|
312
|
-
/**
|
|
313
|
-
* @method lessThan
|
|
314
|
-
* @memberof Query
|
|
315
|
-
* @description Filters entries where the field value is less than the specified value
|
|
316
|
-
* @param {string} key - The field UID to filter on
|
|
317
|
-
* @param {string | number} value - The value to compare against
|
|
318
|
-
* @example
|
|
319
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
320
|
-
*
|
|
321
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
322
|
-
* const result = await stack.contentType('contenttype_uid').entry().query().lessThan('fieldUid', 100).find();
|
|
323
|
-
*
|
|
324
|
-
* @returns {Query}
|
|
325
|
-
*/
|
|
326
|
-
lessThan(key: string, value: (string | number)): Query;
|
|
327
|
-
/**
|
|
328
|
-
* @method lessThanOrEqualTo
|
|
329
|
-
* @memberof Query
|
|
330
|
-
* @description Filters entries where the field value is less than or equal to the specified value
|
|
331
|
-
* @param {string} key - The field UID to filter on
|
|
332
|
-
* @param {string | number} value - The value to compare against
|
|
333
|
-
* @example
|
|
334
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
335
|
-
*
|
|
336
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
337
|
-
* const result = await stack.contentType('contenttype_uid').entry().query().lessThanOrEqualTo('fieldUid', 100).find();
|
|
338
|
-
*
|
|
339
|
-
* @returns {Query}
|
|
340
|
-
*/
|
|
341
|
-
lessThanOrEqualTo(key: string, value: (string | number)): Query;
|
|
342
|
-
/**
|
|
343
|
-
* @method greaterThan
|
|
344
|
-
* @memberof Query
|
|
345
|
-
* @description Filters entries where the field value is greater than the specified value
|
|
346
|
-
* @param {string} key - The field UID to filter on
|
|
347
|
-
* @param {string | number} value - The value to compare against
|
|
348
|
-
* @example
|
|
349
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
350
|
-
*
|
|
351
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
352
|
-
* const result = await stack.contentType('contenttype_uid').entry().query().greaterThan('fieldUid', 100).find();
|
|
353
|
-
*
|
|
354
|
-
* @returns {Query}
|
|
355
|
-
*/
|
|
356
|
-
greaterThan(key: string, value: (string | number)): Query;
|
|
357
|
-
/**
|
|
358
|
-
* @method greaterThanOrEqualTo
|
|
359
|
-
* @memberof Query
|
|
360
|
-
* @description Filters entries where the field value is greater than or equal to the specified value
|
|
361
|
-
* @param {string} key - The field UID to filter on
|
|
362
|
-
* @param {string | number} value - The value to compare against
|
|
363
|
-
* @example
|
|
364
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
365
|
-
*
|
|
366
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
367
|
-
* const result = await stack.contentType('contenttype_uid').entry().query().greaterThanOrEqualTo('fieldUid', 100).find();
|
|
368
|
-
*
|
|
369
|
-
* @returns {Query}
|
|
370
|
-
*/
|
|
371
|
-
greaterThanOrEqualTo(key: string, value: (string | number)): Query;
|
|
372
|
-
/**
|
|
373
|
-
* Override find method to include content type UID directly for better caching
|
|
374
|
-
*/
|
|
375
|
-
find<T>(encode?: boolean): Promise<FindResponse<T>>;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
declare class BaseQuery extends Pagination {
|
|
379
|
-
_parameters: params;
|
|
380
|
-
protected _client: AxiosInstance;
|
|
381
|
-
protected _urlPath: string;
|
|
382
|
-
protected _variants: string;
|
|
383
|
-
/**
|
|
384
|
-
* Helper method to cast this instance to Query type
|
|
385
|
-
* @private
|
|
386
|
-
*/
|
|
387
|
-
protected asQuery(): Query;
|
|
388
|
-
/**
|
|
389
|
-
* @method includeCount
|
|
390
|
-
* @memberof BaseQuery
|
|
391
|
-
* @description Retrieve count and data of objects in result
|
|
392
|
-
* @example
|
|
393
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
394
|
-
*
|
|
395
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
396
|
-
* const query = stack.contentType("contentTypeUid").entry().query();
|
|
397
|
-
* const result = await query.includeCount().find()
|
|
398
|
-
* // OR
|
|
399
|
-
* const asset = await stack.asset().includeCount().find()
|
|
400
|
-
*
|
|
401
|
-
* @returns {Query}
|
|
402
|
-
*/
|
|
403
|
-
includeCount(): Query;
|
|
404
|
-
/**
|
|
405
|
-
* @method orderByAscending
|
|
406
|
-
* @memberof BaseQuery
|
|
407
|
-
* @description Sorts the results in ascending order based on the specified field UID.
|
|
408
|
-
* @example
|
|
409
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
410
|
-
*
|
|
411
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
412
|
-
* const query = stack.contentType("contentTypeUid").entry().query();
|
|
413
|
-
* const result = await query.orderByAscending("field_uid").find()
|
|
414
|
-
* // OR
|
|
415
|
-
* const asset = await stack.asset().orderByAscending("field_uid").find()
|
|
416
|
-
*
|
|
417
|
-
* @returns {Query}
|
|
418
|
-
*/
|
|
419
|
-
orderByAscending(key: string): Query;
|
|
420
|
-
/**
|
|
421
|
-
* @method orderByDescending
|
|
422
|
-
* @memberof BaseQuery
|
|
423
|
-
* @description Sorts the results in descending order based on the specified key.
|
|
424
|
-
* @example
|
|
425
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
426
|
-
*
|
|
427
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
428
|
-
* const query = stack.contentType("contentTypeUid").entry().query();
|
|
429
|
-
* const result = await query.orderByDescending("field_uid").find()
|
|
430
|
-
* // OR
|
|
431
|
-
* const asset = await stack.asset().orderByDescending("field_uid").find()
|
|
432
|
-
*
|
|
433
|
-
* @returns {Query}
|
|
434
|
-
*/
|
|
435
|
-
orderByDescending(key: string): Query;
|
|
436
|
-
/**
|
|
437
|
-
* @method limit
|
|
438
|
-
* @memberof BaseQuery
|
|
439
|
-
* @description Returns a specific number of entries based on the set limit
|
|
440
|
-
* @example
|
|
441
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
442
|
-
*
|
|
443
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
444
|
-
* const query = stack.contentType("contentTypeUid").entry().query();
|
|
445
|
-
* const result = await query.limit(10).find()
|
|
446
|
-
* // OR
|
|
447
|
-
* const asset = await stack.asset().limit(5).find()
|
|
448
|
-
*
|
|
449
|
-
* @returns {Query}
|
|
450
|
-
*/
|
|
451
|
-
limit(key: number): Query;
|
|
452
|
-
/**
|
|
453
|
-
* @method skip
|
|
454
|
-
* @memberof BaseQuery
|
|
455
|
-
* @description Skips at specific number of entries.
|
|
456
|
-
* @example
|
|
457
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
458
|
-
*
|
|
459
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
460
|
-
* const query = stack.contentType("contentTypeUid").entry().query();
|
|
461
|
-
* const result = await query.skip(10).find()
|
|
462
|
-
* // OR
|
|
463
|
-
* const asset = await stack.asset().skip(5).find()
|
|
464
|
-
*
|
|
465
|
-
* @returns {Query}
|
|
466
|
-
*/
|
|
467
|
-
skip(key: number): Query;
|
|
468
|
-
/**
|
|
469
|
-
* @method param
|
|
470
|
-
* @memberof BaseQuery
|
|
471
|
-
* @description Adds query parameters to the URL.
|
|
472
|
-
* @example
|
|
473
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
474
|
-
*
|
|
475
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
476
|
-
* const query = stack.contentType("contentTypeUid").entry().query();
|
|
477
|
-
* const result = await query.param("key", "value").find()
|
|
478
|
-
* // OR
|
|
479
|
-
* const asset = await stack.asset().param("key", "value").find()
|
|
480
|
-
*
|
|
481
|
-
* @returns {Query}
|
|
482
|
-
*/
|
|
483
|
-
param(key: string, value: string | number): Query;
|
|
484
|
-
/**
|
|
485
|
-
* @method addParams
|
|
486
|
-
* @memberof BaseQuery
|
|
487
|
-
* @description Adds a query parameter to the query.
|
|
488
|
-
* @example
|
|
489
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
490
|
-
*
|
|
491
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
492
|
-
* const query = stack.contentType("contentTypeUid").entry().query();
|
|
493
|
-
* const result = await query.addParams({"key": "value"}).find()
|
|
494
|
-
* // OR
|
|
495
|
-
* const asset = await stack.asset().addParams({"key": "value"}).find()
|
|
496
|
-
*
|
|
497
|
-
* @returns {Query}
|
|
498
|
-
*/
|
|
499
|
-
addParams(paramObj: {
|
|
500
|
-
[key: string]: string | boolean | number;
|
|
501
|
-
}): Query;
|
|
502
|
-
/**
|
|
503
|
-
* @method removeParam
|
|
504
|
-
* @memberof BaseQuery
|
|
505
|
-
* @description Removes a query parameter from the query.
|
|
506
|
-
* @example
|
|
507
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
508
|
-
*
|
|
509
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
510
|
-
* const query = stack.contentType("contentTypeUid").entry().query();
|
|
511
|
-
* const result = await query.removeParam("query_param_key").find()
|
|
512
|
-
* // OR
|
|
513
|
-
* const asset = await stack.asset().removeParam("query_param_key").find()
|
|
514
|
-
*
|
|
515
|
-
* @returns {Query}
|
|
516
|
-
*/
|
|
517
|
-
removeParam(key: string): Query;
|
|
518
|
-
/**
|
|
519
|
-
* @method find
|
|
520
|
-
* @memberof BaseQuery
|
|
521
|
-
* @description Fetches the data based on the query parameters
|
|
522
|
-
* @param {boolean} encode - Whether to encode query parameters
|
|
523
|
-
* @returns {Promise<FindResponse<T>>} Promise that resolves to the find response
|
|
524
|
-
* @example
|
|
525
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
526
|
-
*
|
|
527
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
528
|
-
* const result = await stack.asset().find();
|
|
529
|
-
* @example
|
|
530
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
531
|
-
*
|
|
532
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
533
|
-
* const result = await stack.contentType("contentType1Uid").entry().query().find();
|
|
534
|
-
* @example
|
|
535
|
-
* import contentstack from '@contentstack/delivery-sdk'
|
|
536
|
-
*
|
|
537
|
-
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
|
|
538
|
-
* const result = await stack.contentType("contentTypeUid").entry().query().find();
|
|
539
|
-
*/
|
|
540
|
-
find<T>(encode?: boolean): Promise<FindResponse<T>>;
|
|
541
|
-
/**
|
|
542
|
-
* Extracts content type UID from the URL path
|
|
543
|
-
* @returns content type UID if found, null otherwise
|
|
544
|
-
*/
|
|
545
|
-
private extractContentTypeUidFromUrl;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
export { BaseQuery as B, Query as Q };
|