Skip to content

Commit

Permalink
Changed package name
Browse files Browse the repository at this point in the history
  • Loading branch information
sunil-lakshman committed Jan 18, 2024
1 parent 8822a57 commit 9172625
Show file tree
Hide file tree
Showing 14 changed files with 748 additions and 8,472 deletions.
9,102 changes: 689 additions & 8,413 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@contentstack/delivery",
"name": "@contentstack/delivery-sdk",
"version": "0.0.1",
"type": "commonjs",
"main": "./dist/cjs/src/index.js",
Expand Down
14 changes: 7 additions & 7 deletions src/lib/asset-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class AssetQuery extends BaseQuery {
* @description Retrieve a specific version of an asset in result
* @returns {AssetQuery}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.asset().version(1).find();
Expand All @@ -30,7 +30,7 @@ export class AssetQuery extends BaseQuery {
* @description Includes the dimensions (height and width) of the image in result
* @returns {AssetQuery}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.asset().includeDimension().find();
Expand All @@ -47,7 +47,7 @@ export class AssetQuery extends BaseQuery {
* @description Includes the branch in result
* @returns {AssetQuery}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.asset().includeBranch().find();
Expand All @@ -64,7 +64,7 @@ export class AssetQuery extends BaseQuery {
* @description Include the metadata for getting metadata content for the entry.
* @returns {Entries}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.asset().includeMetadata().fetch();
Expand All @@ -81,7 +81,7 @@ export class AssetQuery extends BaseQuery {
* @description Includes the relative URLs of the assets in result
* @returns {AssetQuery}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.asset().relativeUrls().find();
Expand All @@ -98,7 +98,7 @@ export class AssetQuery extends BaseQuery {
* @description When an entry is not published in a specific language, content can be fetched from its fallback language
* @returns {AssetQuery}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.asset().includeFallback().find();
Expand All @@ -115,7 +115,7 @@ export class AssetQuery extends BaseQuery {
* @description The assets published in the locale will be fetched
* @returns {AssetQuery}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.asset().locale('en-us').find();
Expand Down
16 changes: 8 additions & 8 deletions src/lib/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class Asset {
* @description When an entry is not published in a specific language, content can be fetched from its fallback language
* @returns {Asset}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.asset('asset_uid').includeFallback().fetch();
Expand All @@ -33,7 +33,7 @@ export class Asset {
* @description Include the metadata for getting metadata content for the entry.
* @returns {Entries}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.asset('asset_uid').includeMetadata().fetch();
Expand All @@ -50,7 +50,7 @@ export class Asset {
* @description Includes the dimensions (height and width) of the image in result
* @returns {Asset}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.asset('asset_uid').includeDimension().fetch();
Expand All @@ -67,7 +67,7 @@ export class Asset {
* @description Includes the branch in result
* @returns {Asset}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.asset('asset_uid').includeBranch().fetch();
Expand All @@ -84,7 +84,7 @@ export class Asset {
* @description Includes the relative URLs of the asset in result
* @returns {Asset}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.asset('asset_uid').relativeUrls().fetch();
Expand All @@ -101,7 +101,7 @@ export class Asset {
* @description Retrieve a specific version of an asset in result
* @returns {Asset}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.asset('asset_uid').version(1).fetch();
Expand All @@ -118,7 +118,7 @@ export class Asset {
* @description The assets published in the locale will be fetched
* @returns {Asset}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.asset('asset_uid').locale('en-us').fetch();
Expand All @@ -135,7 +135,7 @@ export class Asset {
* @description Fetches the asset data on the basis of the asset uid
* @returns {Asset}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.asset('asset_uid').fetch();
Expand Down
22 changes: 11 additions & 11 deletions src/lib/base-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class BaseQuery extends Pagination {
* @memberof BaseQuery
* @description Retrieve count and data of objects in result
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const query = stack.contentType("contentTypeUid").entry().query();
Expand All @@ -33,7 +33,7 @@ export class BaseQuery extends Pagination {
* @memberof BaseQuery
* @description Sorts the results in ascending order based on the specified field UID.
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const query = stack.contentType("contentTypeUid").entry().query();
Expand All @@ -54,7 +54,7 @@ export class BaseQuery extends Pagination {
* @memberof BaseQuery
* @description Sorts the results in descending order based on the specified key.
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const query = stack.contentType("contentTypeUid").entry().query();
Expand All @@ -75,7 +75,7 @@ export class BaseQuery extends Pagination {
* @memberof BaseQuery
* @description Returns a specific number of entries based on the set limit
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const query = stack.contentType("contentTypeUid").entry().query();
Expand All @@ -96,7 +96,7 @@ export class BaseQuery extends Pagination {
* @memberof BaseQuery
* @description Skips at specific number of entries.
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const query = stack.contentType("contentTypeUid").entry().query();
Expand All @@ -119,7 +119,7 @@ export class BaseQuery extends Pagination {
* @memberof BaseQuery
* @description Adds query parameters to the URL.
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const query = stack.contentType("contentTypeUid").entry().query();
Expand All @@ -140,7 +140,7 @@ export class BaseQuery extends Pagination {
* @memberof BaseQuery
* @description Adds a query parameter to the query.
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const query = stack.contentType("contentTypeUid").entry().query();
Expand All @@ -161,7 +161,7 @@ export class BaseQuery extends Pagination {
* @memberof BaseQuery
* @description Removes a query parameter from the query.
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const query = stack.contentType("contentTypeUid").entry().query();
Expand All @@ -183,17 +183,17 @@ export class BaseQuery extends Pagination {
* @description The assets of the stack will be fetched
* @returns {Collection}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.asset().find();
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.contentType("contentType1Uid").entry().query().find();
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.asset(asset_uid).fetch();
Expand Down
4 changes: 2 additions & 2 deletions src/lib/content-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class ContentType {
* @description Creates entry object of the passed entry uid.
* @returns {Entry}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const entry = stack.contentType("contentTypeUid").entry("entryUid");
Expand All @@ -43,7 +43,7 @@ export class ContentType {
* @description Fetches the contentType data on the basis of the contentType uid
* @returns {ContentType}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.contentType(asset_uid).fetch();
Expand Down
4 changes: 2 additions & 2 deletions src/lib/contentstack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ export * as Utils from '@contentstack/utils';
* @param {StackConfig} config - config object for stack with apiKey, deliveryToken and environment as required fields
*
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
* const stack = contentstack.Stack({
* apiKey: "apiKey",
* deliveryToken: "deliveryToken",
Expand Down
4 changes: 2 additions & 2 deletions src/lib/contenttype-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class ContentTypeQuery {
* @description The assets published in the locale will be fetched
* @returns {ContentTypeQuery}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const contentTypeQuery = stack.contentType();
Expand All @@ -33,7 +33,7 @@ export class ContentTypeQuery {
* @description Fetches all contentTypes of the stack
* @returns {ContentTypeQuery}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const contentTypeQuery = stack.contentType();
Expand Down
14 changes: 7 additions & 7 deletions src/lib/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class Entries extends EntryQueryable {
* @description When an entry is not published in a specific language, content can be fetched from its fallback language
* @returns {Entries}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.contentType(contentType_uid).entry().includeFallback().find();
Expand All @@ -35,7 +35,7 @@ export class Entries extends EntryQueryable {
* @description Include the metadata for getting metadata content for the entry.
* @returns {Entries}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.contentType(contentType_uid).entry().includeMetadata().find();
Expand All @@ -52,7 +52,7 @@ export class Entries extends EntryQueryable {
* @description Include Embedded Objects (Entries and Assets) along with entry/entries details.
* @returns {Entries}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.contentType(contentType_uid).entry().includeEmbeddedItems().fetch();
Expand All @@ -69,7 +69,7 @@ export class Entries extends EntryQueryable {
* @description IInclude the details of the content type along with the entries details
* @returns {Entries}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.contentType(contentType_uid).entry().includeContentType().fetch();
Expand All @@ -86,7 +86,7 @@ export class Entries extends EntryQueryable {
* @description Includes the branch in result
* @returns {Entries}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.contentType(contentType_uid).entry().includeBranch().find();
Expand Down Expand Up @@ -157,7 +157,7 @@ export class Entries extends EntryQueryable {
* @description The assets published in the locale will be fetched
* @returns {Entry}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.contentType("contentTypeUid").entry().locale('en-us').find();
Expand All @@ -174,7 +174,7 @@ export class Entries extends EntryQueryable {
* @description Fetches the Entry data on the basis of the asset uid
* @returns {Collection}
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.contentType("contentTypeUid").entry().query();
Expand Down
4 changes: 2 additions & 2 deletions src/lib/entry-queryable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class EntryQueryable extends BaseQuery {
* @memberof EntryQueryable
* @description Selects specific field/fields of an entry
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.contentType("contentTypeUid").entry().only("fieldUID").find()
Expand All @@ -26,7 +26,7 @@ export class EntryQueryable extends BaseQuery {
* @memberof EntryQueryable
* @description Excludes specific field/fields of an entry
* @example
* import contentstack from '@contentstack/delivery'
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.Stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const result = await stack.contentType("contentTypeUid").entry().except("fieldUID").find()
Expand Down
Loading

0 comments on commit 9172625

Please sign in to comment.