Skip to main content
Home

latest
Works with
This package works with DenoIt is unknown whether this package works with Cloudflare Workers, Node.js, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score82%
Downloads1/wk
Published6 months ago (0.2.10)

commercetools Deno sdk

prerequisites

place a .env file with the commercetools details in the same folder as where you are executing the code

CTP_PROJECT_KEY=xxxx
CTP_CLIENT_SECRET=xxxxx
CTP_CLIENT_ID=xxxx
CTP_AUTH_URL=https://auth.europe-west1.gcp.commercetools.com
CTP_API_URL=https://api.europe-west1.gcp.commercetools.com
CTP_SCOPES=manage_project:xxxx

Contains the following modules:

sdk the main deno sdk for commercetools

	import { sdk } from "./mod.ts"
	
	const handle = sdk.init()
	const project = await handle.root().get().execute()
	console.log(project)

to run this example on your machine, execute:

deno -A jsr:@commercetoolsdemo/sdk/examples/project 
  • importsdk the main deno importsdk for commercetools
  • Importer an importer, that imports batches of data for a given resourse
  • extensionsListener a utility function to handle API extensions durint development on your laptop
  • messagesListener a utility function to listen to subscription messages to run this example on your machine, execute:
deno -A jsr:@commercetoolsdemo/sdk/examples/messagesListener 

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@commercetoolsdemo/sdk

Import symbol

import * as sdk from "@commercetoolsdemo/sdk";
or

Import directly with a jsr specifier

import * as sdk from "jsr:@commercetoolsdemo/sdk";

Add Package

pnpm i jsr:@commercetoolsdemo/sdk
or (using pnpm 10.8 or older)
pnpm dlx jsr add @commercetoolsdemo/sdk

Import symbol

import * as sdk from "@commercetoolsdemo/sdk";

Add Package

yarn add jsr:@commercetoolsdemo/sdk
or (using Yarn 4.8 or older)
yarn dlx jsr add @commercetoolsdemo/sdk

Import symbol

import * as sdk from "@commercetoolsdemo/sdk";

Add Package

vlt install jsr:@commercetoolsdemo/sdk

Import symbol

import * as sdk from "@commercetoolsdemo/sdk";

Add Package

npx jsr add @commercetoolsdemo/sdk

Import symbol

import * as sdk from "@commercetoolsdemo/sdk";

Add Package

bunx jsr add @commercetoolsdemo/sdk

Import symbol

import * as sdk from "@commercetoolsdemo/sdk";