diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 6a15549e..df0299e9 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "7.7.0"
+ ".": "7.7.1"
}
diff --git a/.stats.yml b/.stats.yml
index 17749e26..bb69a634 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 81
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-3fc1c86b4a83a16393aaf17d1fb3ac6098d30dd057ba872973b57285a7a3f0d0.yml
-openapi_spec_hash: 02a545d217b13399f311e99561f9de1d
-config_hash: 0789c3cddc625bb9712b3bded274ab6c
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-44c2e612f5d40e03f56712a4e123a193e6ea03cc64a91d0c34ee094563dafa1c.yml
+openapi_spec_hash: 40bf6b3f7992d55f1bd543f32564ea86
+config_hash: b1f6d0f43161b66d201043fcbe5c5695
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a5604f1e..91ea5153 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,30 @@
# Changelog
+## 7.7.1 (2026-03-03)
+
+Full Changelog: [v7.7.0...v7.7.1](https://github.com/trycourier/courier-node/compare/v7.7.0...v7.7.1)
+
+### Bug Fixes
+
+* **api:** remove body_token parameter from tokens.addSingle method ([b8de6f7](https://github.com/trycourier/courier-node/commit/b8de6f7d6c936dce1b5e458b881635a4e0d920e4))
+* **api:** remove brand field from ElementalContent ([2a3d25d](https://github.com/trycourier/courier-node/commit/2a3d25dac9b544179e928800dba0f53623cd3734))
+* **docs/contributing:** correct pnpm link command ([d3b4a96](https://github.com/trycourier/courier-node/commit/d3b4a96b0d1112692832cff49bfd7897ec77df8c))
+
+
+### Chores
+
+* **internal/client:** fix form-urlencoded requests ([45deac0](https://github.com/trycourier/courier-node/commit/45deac06aa22be68b4ac57136d065dd85668901c))
+* **internal:** avoid type checking errors with ts-reset ([88b8c18](https://github.com/trycourier/courier-node/commit/88b8c18a47ac0d71e5a58274eeb705b41dfb42c3))
+* **internal:** codegen related update ([879dd2f](https://github.com/trycourier/courier-node/commit/879dd2f830081dd643bff1afafe1a4f3413f80c1))
+* **internal:** remove mock server code ([cbd7d67](https://github.com/trycourier/courier-node/commit/cbd7d675567742542d481cf9275fa765524f2dae))
+* update mock server docs ([f4a7c1f](https://github.com/trycourier/courier-node/commit/f4a7c1f3590b16463dd8edb1ef81a188ae276d06))
+
+
+### Documentation
+
+* add AUTO-GENERATED-OVERVIEW markers for README sync ([#228](https://github.com/trycourier/courier-node/issues/228)) ([63dc300](https://github.com/trycourier/courier-node/commit/63dc300ce3d67d339942446c86edeaa0f4aa69ee))
+* sync README from mintlify-docs (2026-02-20 18:11 UTC) ([#229](https://github.com/trycourier/courier-node/issues/229)) ([f35a2aa](https://github.com/trycourier/courier-node/commit/f35a2aa144409b12c125a564a003421a9b8a7a5b))
+
## 7.7.0 (2026-02-06)
Full Changelog: [v7.6.3...v7.7.0](https://github.com/trycourier/courier-node/compare/v7.6.3...v7.7.0)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 4338b522..9b0cfc77 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -60,17 +60,11 @@ $ yarn link @trycourier/courier
# With pnpm
$ pnpm link --global
$ cd ../my-package
-$ pnpm link -—global @trycourier/courier
+$ pnpm link --global @trycourier/courier
```
## Running tests
-Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
-
-```sh
-$ npx prism mock path/to/your/openapi.yml
-```
-
```sh
$ yarn run test
```
diff --git a/api.md b/api.md
index fe7cb60e..6aae8faf 100644
--- a/api.md
+++ b/api.md
@@ -424,4 +424,4 @@ Methods:
- client.users.tokens.list(userID) -> TokenListResponse
- client.users.tokens.delete(token, { ...params }) -> void
- client.users.tokens.addMultiple(userID) -> void
-- client.users.tokens.addSingle(pathToken, { ...params }) -> void
+- client.users.tokens.addSingle(token, { ...params }) -> void
diff --git a/package.json b/package.json
index b4c2b0b7..b5612f3c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@trycourier/courier",
- "version": "7.7.0",
+ "version": "7.7.1",
"description": "The official TypeScript library for the Courier API",
"author": "Courier ",
"types": "dist/index.d.ts",
diff --git a/scripts/mock b/scripts/mock
deleted file mode 100755
index 0b28f6ea..00000000
--- a/scripts/mock
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-cd "$(dirname "$0")/.."
-
-if [[ -n "$1" && "$1" != '--'* ]]; then
- URL="$1"
- shift
-else
- URL="$(grep 'openapi_spec_url' .stats.yml | cut -d' ' -f2)"
-fi
-
-# Check if the URL is empty
-if [ -z "$URL" ]; then
- echo "Error: No OpenAPI spec path/url provided or found in .stats.yml"
- exit 1
-fi
-
-echo "==> Starting mock server with URL ${URL}"
-
-# Run prism mock on the given spec
-if [ "$1" == "--daemon" ]; then
- npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &
-
- # Wait for server to come online
- echo -n "Waiting for server"
- while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
- echo -n "."
- sleep 0.1
- done
-
- if grep -q "✖ fatal" ".prism.log"; then
- cat .prism.log
- exit 1
- fi
-
- echo
-else
- npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL"
-fi
diff --git a/scripts/test b/scripts/test
index 7bce0516..548da9bb 100755
--- a/scripts/test
+++ b/scripts/test
@@ -4,53 +4,7 @@ set -e
cd "$(dirname "$0")/.."
-RED='\033[0;31m'
-GREEN='\033[0;32m'
-YELLOW='\033[0;33m'
-NC='\033[0m' # No Color
-function prism_is_running() {
- curl --silent "http://localhost:4010" >/dev/null 2>&1
-}
-
-kill_server_on_port() {
- pids=$(lsof -t -i tcp:"$1" || echo "")
- if [ "$pids" != "" ]; then
- kill "$pids"
- echo "Stopped $pids."
- fi
-}
-
-function is_overriding_api_base_url() {
- [ -n "$TEST_API_BASE_URL" ]
-}
-
-if ! is_overriding_api_base_url && ! prism_is_running ; then
- # When we exit this script, make sure to kill the background mock server process
- trap 'kill_server_on_port 4010' EXIT
-
- # Start the dev server
- ./scripts/mock --daemon
-fi
-
-if is_overriding_api_base_url ; then
- echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}"
- echo
-elif ! prism_is_running ; then
- echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server"
- echo -e "running against your OpenAPI spec."
- echo
- echo -e "To run the server, pass in the path or url of your OpenAPI"
- echo -e "spec to the prism command:"
- echo
- echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
- echo
-
- exit 1
-else
- echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}"
- echo
-fi
echo "==> Running tests"
./node_modules/.bin/jest "$@"
diff --git a/src/client.ts b/src/client.ts
index 5f0770b5..62602fdd 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -11,7 +11,7 @@ import type { APIResponseProps } from './internal/parse';
import { getPlatformHeaders } from './internal/detect-platform';
import * as Shims from './internal/shims';
import * as Opts from './internal/request-options';
-import * as qs from './internal/qs';
+import { stringifyQuery } from './internal/utils/query';
import { VERSION } from './version';
import * as Errors from './core/error';
import * as Uploads from './core/uploads';
@@ -331,8 +331,8 @@ export class Courier {
return buildHeaders([{ Authorization: `Bearer ${this.apiKey}` }]);
}
- protected stringifyQuery(query: Record): string {
- return qs.stringify(query, { arrayFormat: 'comma' });
+ protected stringifyQuery(query: object | Record): string {
+ return stringifyQuery(query);
}
private getUserAgent(): string {
@@ -369,7 +369,7 @@ export class Courier {
}
if (typeof query === 'object' && query && !Array.isArray(query)) {
- url.search = this.stringifyQuery(query as Record);
+ url.search = this.stringifyQuery(query);
}
return url.toString();
@@ -553,7 +553,7 @@ export class Courier {
loggerFor(this).info(`${responseInfo} - ${retryMessage}`);
const errText = await response.text().catch((err: any) => castToError(err).message);
- const errJSON = safeJSON(errText);
+ const errJSON = safeJSON(errText) as any;
const errMessage = errJSON ? undefined : errText;
loggerFor(this).debug(
@@ -802,6 +802,14 @@ export class Courier {
(Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))
) {
return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable) };
+ } else if (
+ typeof body === 'object' &&
+ headers.values.get('content-type') === 'application/x-www-form-urlencoded'
+ ) {
+ return {
+ bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
+ body: this.stringifyQuery(body),
+ };
} else {
return this.#encoder({ body, headers });
}
diff --git a/src/internal/utils.ts b/src/internal/utils.ts
index 3cbfacce..c591353b 100644
--- a/src/internal/utils.ts
+++ b/src/internal/utils.ts
@@ -6,3 +6,4 @@ export * from './utils/env';
export * from './utils/log';
export * from './utils/uuid';
export * from './utils/sleep';
+export * from './utils/query';
diff --git a/src/internal/utils/query.ts b/src/internal/utils/query.ts
new file mode 100644
index 00000000..0139cacb
--- /dev/null
+++ b/src/internal/utils/query.ts
@@ -0,0 +1,7 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import * as qs from '../qs/stringify';
+
+export function stringifyQuery(query: object | Record) {
+ return qs.stringify(query, { arrayFormat: 'comma' });
+}
diff --git a/src/resources/shared.ts b/src/resources/shared.ts
index 90e864ff..9af97f2a 100644
--- a/src/resources/shared.ts
+++ b/src/resources/shared.ts
@@ -123,8 +123,6 @@ export interface ElementalContent {
* For example, "2022-01-01"
*/
version: string;
-
- brand?: string | null;
}
/**
diff --git a/src/resources/users/tokens.ts b/src/resources/users/tokens.ts
index d06b7880..1e0c15fb 100644
--- a/src/resources/users/tokens.ts
+++ b/src/resources/users/tokens.ts
@@ -98,14 +98,13 @@ export class Tokens extends APIResource {
* ```ts
* await client.users.tokens.addSingle('token', {
* user_id: 'user_id',
- * body_token: 'token',
* provider_key: 'firebase-fcm',
* });
* ```
*/
- addSingle(pathToken: string, params: TokenAddSingleParams, options?: RequestOptions): APIPromise {
+ addSingle(token: string, params: TokenAddSingleParams, options?: RequestOptions): APIPromise {
const { user_id, ...body } = params;
- return this._client.put(path`/users/${user_id}/tokens/${pathToken}`, {
+ return this._client.put(path`/users/${user_id}/tokens/${token}`, {
body,
...options,
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
@@ -272,11 +271,6 @@ export interface TokenAddSingleParams {
*/
user_id: string;
- /**
- * Body param: Full body of the token. Must match token in URL path parameter.
- */
- body_token: string;
-
/**
* Body param
*/
diff --git a/src/version.ts b/src/version.ts
index 9d2fe457..2cae26d0 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '7.7.0'; // x-release-please-version
+export const VERSION = '7.7.1'; // x-release-please-version
diff --git a/tests/api-resources/audiences.test.ts b/tests/api-resources/audiences.test.ts
index 8ea7921f..be870cdd 100644
--- a/tests/api-resources/audiences.test.ts
+++ b/tests/api-resources/audiences.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource audiences', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve', async () => {
const responsePromise = client.audiences.retrieve('audience_id');
const rawResponse = await responsePromise.asResponse();
@@ -20,7 +20,7 @@ describe('resource audiences', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('update', async () => {
const responsePromise = client.audiences.update('audience_id', {});
const rawResponse = await responsePromise.asResponse();
@@ -32,7 +32,7 @@ describe('resource audiences', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list', async () => {
const responsePromise = client.audiences.list();
const rawResponse = await responsePromise.asResponse();
@@ -44,7 +44,7 @@ describe('resource audiences', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
@@ -52,7 +52,7 @@ describe('resource audiences', () => {
).rejects.toThrow(Courier.NotFoundError);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('delete', async () => {
const responsePromise = client.audiences.delete('audience_id');
const rawResponse = await responsePromise.asResponse();
@@ -64,7 +64,7 @@ describe('resource audiences', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('listMembers', async () => {
const responsePromise = client.audiences.listMembers('audience_id');
const rawResponse = await responsePromise.asResponse();
@@ -76,7 +76,7 @@ describe('resource audiences', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('listMembers: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
diff --git a/tests/api-resources/audit-events.test.ts b/tests/api-resources/audit-events.test.ts
index e2a57388..236efabb 100644
--- a/tests/api-resources/audit-events.test.ts
+++ b/tests/api-resources/audit-events.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource auditEvents', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve', async () => {
const responsePromise = client.auditEvents.retrieve('audit-event-id');
const rawResponse = await responsePromise.asResponse();
@@ -20,7 +20,7 @@ describe('resource auditEvents', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list', async () => {
const responsePromise = client.auditEvents.list();
const rawResponse = await responsePromise.asResponse();
@@ -32,7 +32,7 @@ describe('resource auditEvents', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
diff --git a/tests/api-resources/auth.test.ts b/tests/api-resources/auth.test.ts
index 9dd50f52..7773e3d1 100644
--- a/tests/api-resources/auth.test.ts
+++ b/tests/api-resources/auth.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource auth', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('issueToken: only required params', async () => {
const responsePromise = client.auth.issueToken({
expires_in: '$YOUR_NUMBER days',
@@ -24,7 +24,7 @@ describe('resource auth', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('issueToken: required and optional params', async () => {
const response = await client.auth.issueToken({
expires_in: '$YOUR_NUMBER days',
diff --git a/tests/api-resources/automations/automations.test.ts b/tests/api-resources/automations/automations.test.ts
index e6c27380..eb2e9248 100644
--- a/tests/api-resources/automations/automations.test.ts
+++ b/tests/api-resources/automations/automations.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource automations', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list', async () => {
const responsePromise = client.automations.list();
const rawResponse = await responsePromise.asResponse();
@@ -20,7 +20,7 @@ describe('resource automations', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
diff --git a/tests/api-resources/automations/invoke.test.ts b/tests/api-resources/automations/invoke.test.ts
index 6b08acc9..d52475be 100644
--- a/tests/api-resources/automations/invoke.test.ts
+++ b/tests/api-resources/automations/invoke.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource invoke', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('invokeAdHoc: only required params', async () => {
const responsePromise = client.automations.invoke.invokeAdHoc({
automation: { steps: [{ action: 'delay' }, { action: 'send' }] },
@@ -22,7 +22,7 @@ describe('resource invoke', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('invokeAdHoc: required and optional params', async () => {
const response = await client.automations.invoke.invokeAdHoc({
automation: {
@@ -51,7 +51,7 @@ describe('resource invoke', () => {
});
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('invokeByTemplate: only required params', async () => {
const responsePromise = client.automations.invoke.invokeByTemplate('templateId', {
recipient: 'recipient',
@@ -65,7 +65,7 @@ describe('resource invoke', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('invokeByTemplate: required and optional params', async () => {
const response = await client.automations.invoke.invokeByTemplate('templateId', {
recipient: 'recipient',
diff --git a/tests/api-resources/brands.test.ts b/tests/api-resources/brands.test.ts
index 17be147d..d02ad9cc 100644
--- a/tests/api-resources/brands.test.ts
+++ b/tests/api-resources/brands.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource brands', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('create: only required params', async () => {
const responsePromise = client.brands.create({ name: 'name' });
const rawResponse = await responsePromise.asResponse();
@@ -20,7 +20,7 @@ describe('resource brands', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('create: required and optional params', async () => {
const response = await client.brands.create({
name: 'name',
@@ -70,7 +70,7 @@ describe('resource brands', () => {
});
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve', async () => {
const responsePromise = client.brands.retrieve('brand_id');
const rawResponse = await responsePromise.asResponse();
@@ -82,7 +82,7 @@ describe('resource brands', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('update: only required params', async () => {
const responsePromise = client.brands.update('brand_id', { name: 'name' });
const rawResponse = await responsePromise.asResponse();
@@ -94,7 +94,7 @@ describe('resource brands', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('update: required and optional params', async () => {
const response = await client.brands.update('brand_id', {
name: 'name',
@@ -143,7 +143,7 @@ describe('resource brands', () => {
});
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list', async () => {
const responsePromise = client.brands.list();
const rawResponse = await responsePromise.asResponse();
@@ -155,7 +155,7 @@ describe('resource brands', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
@@ -163,7 +163,7 @@ describe('resource brands', () => {
).rejects.toThrow(Courier.NotFoundError);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('delete', async () => {
const responsePromise = client.brands.delete('brand_id');
const rawResponse = await responsePromise.asResponse();
diff --git a/tests/api-resources/bulk.test.ts b/tests/api-resources/bulk.test.ts
index d21821d7..2cec3e13 100644
--- a/tests/api-resources/bulk.test.ts
+++ b/tests/api-resources/bulk.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource bulk', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('addUsers: only required params', async () => {
const responsePromise = client.bulk.addUsers('job_id', { users: [{}] });
const rawResponse = await responsePromise.asResponse();
@@ -20,7 +20,7 @@ describe('resource bulk', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('addUsers: required and optional params', async () => {
const response = await client.bulk.addUsers('job_id', {
users: [
@@ -79,7 +79,7 @@ describe('resource bulk', () => {
});
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('createJob: only required params', async () => {
const responsePromise = client.bulk.createJob({ message: { event: 'event' } });
const rawResponse = await responsePromise.asResponse();
@@ -91,7 +91,7 @@ describe('resource bulk', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('createJob: required and optional params', async () => {
const response = await client.bulk.createJob({
message: {
@@ -106,7 +106,7 @@ describe('resource bulk', () => {
});
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('listUsers', async () => {
const responsePromise = client.bulk.listUsers('job_id');
const rawResponse = await responsePromise.asResponse();
@@ -118,7 +118,7 @@ describe('resource bulk', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('listUsers: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
@@ -126,7 +126,7 @@ describe('resource bulk', () => {
).rejects.toThrow(Courier.NotFoundError);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieveJob', async () => {
const responsePromise = client.bulk.retrieveJob('job_id');
const rawResponse = await responsePromise.asResponse();
@@ -138,7 +138,7 @@ describe('resource bulk', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('runJob', async () => {
const responsePromise = client.bulk.runJob('job_id');
const rawResponse = await responsePromise.asResponse();
diff --git a/tests/api-resources/inbound.test.ts b/tests/api-resources/inbound.test.ts
index 647d1e2d..9e49a5b9 100644
--- a/tests/api-resources/inbound.test.ts
+++ b/tests/api-resources/inbound.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource inbound', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('trackEvent: only required params', async () => {
const responsePromise = client.inbound.trackEvent({
event: 'New Order Placed',
@@ -29,7 +29,7 @@ describe('resource inbound', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('trackEvent: required and optional params', async () => {
const response = await client.inbound.trackEvent({
event: 'New Order Placed',
diff --git a/tests/api-resources/lists/lists.test.ts b/tests/api-resources/lists/lists.test.ts
index fef1ca21..0a69942b 100644
--- a/tests/api-resources/lists/lists.test.ts
+++ b/tests/api-resources/lists/lists.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource lists', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve', async () => {
const responsePromise = client.lists.retrieve('list_id');
const rawResponse = await responsePromise.asResponse();
@@ -20,7 +20,7 @@ describe('resource lists', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('update: only required params', async () => {
const responsePromise = client.lists.update('list_id', { name: 'name' });
const rawResponse = await responsePromise.asResponse();
@@ -32,7 +32,7 @@ describe('resource lists', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('update: required and optional params', async () => {
const response = await client.lists.update('list_id', {
name: 'name',
@@ -55,7 +55,7 @@ describe('resource lists', () => {
});
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list', async () => {
const responsePromise = client.lists.list();
const rawResponse = await responsePromise.asResponse();
@@ -67,7 +67,7 @@ describe('resource lists', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
@@ -75,7 +75,7 @@ describe('resource lists', () => {
).rejects.toThrow(Courier.NotFoundError);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('delete', async () => {
const responsePromise = client.lists.delete('list_id');
const rawResponse = await responsePromise.asResponse();
@@ -87,7 +87,7 @@ describe('resource lists', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('restore', async () => {
const responsePromise = client.lists.restore('list_id', {});
const rawResponse = await responsePromise.asResponse();
diff --git a/tests/api-resources/lists/subscriptions.test.ts b/tests/api-resources/lists/subscriptions.test.ts
index a4948ad4..ec7570f5 100644
--- a/tests/api-resources/lists/subscriptions.test.ts
+++ b/tests/api-resources/lists/subscriptions.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource subscriptions', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list', async () => {
const responsePromise = client.lists.subscriptions.list('list_id');
const rawResponse = await responsePromise.asResponse();
@@ -20,7 +20,7 @@ describe('resource subscriptions', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
@@ -28,7 +28,7 @@ describe('resource subscriptions', () => {
).rejects.toThrow(Courier.NotFoundError);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('add: only required params', async () => {
const responsePromise = client.lists.subscriptions.add('list_id', {
recipients: [{ recipientId: 'recipientId' }],
@@ -42,7 +42,7 @@ describe('resource subscriptions', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('add: required and optional params', async () => {
const response = await client.lists.subscriptions.add('list_id', {
recipients: [
@@ -69,7 +69,7 @@ describe('resource subscriptions', () => {
});
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('subscribe: only required params', async () => {
const responsePromise = client.lists.subscriptions.subscribe('list_id', {
recipients: [{ recipientId: 'recipientId' }],
@@ -83,7 +83,7 @@ describe('resource subscriptions', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('subscribe: required and optional params', async () => {
const response = await client.lists.subscriptions.subscribe('list_id', {
recipients: [
@@ -110,7 +110,7 @@ describe('resource subscriptions', () => {
});
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('subscribeUser: only required params', async () => {
const responsePromise = client.lists.subscriptions.subscribeUser('user_id', { list_id: 'list_id' });
const rawResponse = await responsePromise.asResponse();
@@ -122,7 +122,7 @@ describe('resource subscriptions', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('subscribeUser: required and optional params', async () => {
const response = await client.lists.subscriptions.subscribeUser('user_id', {
list_id: 'list_id',
@@ -145,7 +145,7 @@ describe('resource subscriptions', () => {
});
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('unsubscribeUser: only required params', async () => {
const responsePromise = client.lists.subscriptions.unsubscribeUser('user_id', { list_id: 'list_id' });
const rawResponse = await responsePromise.asResponse();
@@ -157,7 +157,7 @@ describe('resource subscriptions', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('unsubscribeUser: required and optional params', async () => {
const response = await client.lists.subscriptions.unsubscribeUser('user_id', { list_id: 'list_id' });
});
diff --git a/tests/api-resources/messages.test.ts b/tests/api-resources/messages.test.ts
index 42e1330a..48000970 100644
--- a/tests/api-resources/messages.test.ts
+++ b/tests/api-resources/messages.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource messages', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve', async () => {
const responsePromise = client.messages.retrieve('message_id');
const rawResponse = await responsePromise.asResponse();
@@ -20,7 +20,7 @@ describe('resource messages', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list', async () => {
const responsePromise = client.messages.list();
const rawResponse = await responsePromise.asResponse();
@@ -32,7 +32,7 @@ describe('resource messages', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
@@ -58,7 +58,7 @@ describe('resource messages', () => {
).rejects.toThrow(Courier.NotFoundError);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('cancel', async () => {
const responsePromise = client.messages.cancel('message_id');
const rawResponse = await responsePromise.asResponse();
@@ -70,7 +70,7 @@ describe('resource messages', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('content', async () => {
const responsePromise = client.messages.content('message_id');
const rawResponse = await responsePromise.asResponse();
@@ -82,7 +82,7 @@ describe('resource messages', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('history', async () => {
const responsePromise = client.messages.history('message_id');
const rawResponse = await responsePromise.asResponse();
@@ -94,7 +94,7 @@ describe('resource messages', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('history: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
diff --git a/tests/api-resources/notifications/checks.test.ts b/tests/api-resources/notifications/checks.test.ts
index 22938d42..cc4a65ab 100644
--- a/tests/api-resources/notifications/checks.test.ts
+++ b/tests/api-resources/notifications/checks.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource checks', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('update: only required params', async () => {
const responsePromise = client.notifications.checks.update('submissionId', {
id: 'id',
@@ -29,7 +29,7 @@ describe('resource checks', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('update: required and optional params', async () => {
const response = await client.notifications.checks.update('submissionId', {
id: 'id',
@@ -43,7 +43,7 @@ describe('resource checks', () => {
});
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list: only required params', async () => {
const responsePromise = client.notifications.checks.list('submissionId', { id: 'id' });
const rawResponse = await responsePromise.asResponse();
@@ -55,12 +55,12 @@ describe('resource checks', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list: required and optional params', async () => {
const response = await client.notifications.checks.list('submissionId', { id: 'id' });
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('delete: only required params', async () => {
const responsePromise = client.notifications.checks.delete('submissionId', { id: 'id' });
const rawResponse = await responsePromise.asResponse();
@@ -72,7 +72,7 @@ describe('resource checks', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('delete: required and optional params', async () => {
const response = await client.notifications.checks.delete('submissionId', { id: 'id' });
});
diff --git a/tests/api-resources/notifications/draft.test.ts b/tests/api-resources/notifications/draft.test.ts
index 89b0d188..f8f67a85 100644
--- a/tests/api-resources/notifications/draft.test.ts
+++ b/tests/api-resources/notifications/draft.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource draft', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieveContent', async () => {
const responsePromise = client.notifications.draft.retrieveContent('id');
const rawResponse = await responsePromise.asResponse();
diff --git a/tests/api-resources/notifications/notifications.test.ts b/tests/api-resources/notifications/notifications.test.ts
index 5effa347..bffc95e6 100644
--- a/tests/api-resources/notifications/notifications.test.ts
+++ b/tests/api-resources/notifications/notifications.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource notifications', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list', async () => {
const responsePromise = client.notifications.list();
const rawResponse = await responsePromise.asResponse();
@@ -20,7 +20,7 @@ describe('resource notifications', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
@@ -28,7 +28,7 @@ describe('resource notifications', () => {
).rejects.toThrow(Courier.NotFoundError);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieveContent', async () => {
const responsePromise = client.notifications.retrieveContent('id');
const rawResponse = await responsePromise.asResponse();
diff --git a/tests/api-resources/profiles/lists.test.ts b/tests/api-resources/profiles/lists.test.ts
index d87afaed..54fe8e00 100644
--- a/tests/api-resources/profiles/lists.test.ts
+++ b/tests/api-resources/profiles/lists.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource lists', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve', async () => {
const responsePromise = client.profiles.lists.retrieve('user_id');
const rawResponse = await responsePromise.asResponse();
@@ -20,7 +20,7 @@ describe('resource lists', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
@@ -28,7 +28,7 @@ describe('resource lists', () => {
).rejects.toThrow(Courier.NotFoundError);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('delete', async () => {
const responsePromise = client.profiles.lists.delete('user_id');
const rawResponse = await responsePromise.asResponse();
@@ -40,7 +40,7 @@ describe('resource lists', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('subscribe: only required params', async () => {
const responsePromise = client.profiles.lists.subscribe('user_id', { lists: [{ listId: 'listId' }] });
const rawResponse = await responsePromise.asResponse();
@@ -52,7 +52,7 @@ describe('resource lists', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('subscribe: required and optional params', async () => {
const response = await client.profiles.lists.subscribe('user_id', {
lists: [
diff --git a/tests/api-resources/profiles/profiles.test.ts b/tests/api-resources/profiles/profiles.test.ts
index c5c40f3f..65785844 100644
--- a/tests/api-resources/profiles/profiles.test.ts
+++ b/tests/api-resources/profiles/profiles.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource profiles', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('create: only required params', async () => {
const responsePromise = client.profiles.create('user_id', { profile: { foo: 'bar' } });
const rawResponse = await responsePromise.asResponse();
@@ -20,12 +20,12 @@ describe('resource profiles', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('create: required and optional params', async () => {
const response = await client.profiles.create('user_id', { profile: { foo: 'bar' } });
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve', async () => {
const responsePromise = client.profiles.retrieve('user_id');
const rawResponse = await responsePromise.asResponse();
@@ -37,7 +37,7 @@ describe('resource profiles', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('update: only required params', async () => {
const responsePromise = client.profiles.update('user_id', {
patch: [
@@ -57,7 +57,7 @@ describe('resource profiles', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('update: required and optional params', async () => {
const response = await client.profiles.update('user_id', {
patch: [
@@ -70,7 +70,7 @@ describe('resource profiles', () => {
});
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('delete', async () => {
const responsePromise = client.profiles.delete('user_id');
const rawResponse = await responsePromise.asResponse();
@@ -82,7 +82,7 @@ describe('resource profiles', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('replace: only required params', async () => {
const responsePromise = client.profiles.replace('user_id', { profile: { foo: 'bar' } });
const rawResponse = await responsePromise.asResponse();
@@ -94,7 +94,7 @@ describe('resource profiles', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('replace: required and optional params', async () => {
const response = await client.profiles.replace('user_id', { profile: { foo: 'bar' } });
});
diff --git a/tests/api-resources/requests.test.ts b/tests/api-resources/requests.test.ts
index b6989b03..104590ae 100644
--- a/tests/api-resources/requests.test.ts
+++ b/tests/api-resources/requests.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource requests', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('archive', async () => {
const responsePromise = client.requests.archive('request_id');
const rawResponse = await responsePromise.asResponse();
diff --git a/tests/api-resources/send.test.ts b/tests/api-resources/send.test.ts
index 12953439..2daf02a5 100644
--- a/tests/api-resources/send.test.ts
+++ b/tests/api-resources/send.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource send', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('message: only required params', async () => {
const responsePromise = client.send.message({ message: {} });
const rawResponse = await responsePromise.asResponse();
@@ -20,7 +20,7 @@ describe('resource send', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('message: required and optional params', async () => {
const response = await client.send.message({
message: {
diff --git a/tests/api-resources/tenants/preferences/items.test.ts b/tests/api-resources/tenants/preferences/items.test.ts
index a54bd6be..f502f673 100644
--- a/tests/api-resources/tenants/preferences/items.test.ts
+++ b/tests/api-resources/tenants/preferences/items.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource items', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('update: only required params', async () => {
const responsePromise = client.tenants.preferences.items.update('topic_id', {
tenant_id: 'tenant_id',
@@ -23,7 +23,7 @@ describe('resource items', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('update: required and optional params', async () => {
const response = await client.tenants.preferences.items.update('topic_id', {
tenant_id: 'tenant_id',
@@ -33,7 +33,7 @@ describe('resource items', () => {
});
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('delete: only required params', async () => {
const responsePromise = client.tenants.preferences.items.delete('topic_id', { tenant_id: 'tenant_id' });
const rawResponse = await responsePromise.asResponse();
@@ -45,7 +45,7 @@ describe('resource items', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('delete: required and optional params', async () => {
const response = await client.tenants.preferences.items.delete('topic_id', { tenant_id: 'tenant_id' });
});
diff --git a/tests/api-resources/tenants/templates/templates.test.ts b/tests/api-resources/tenants/templates/templates.test.ts
index a07cd734..94e7ae8e 100644
--- a/tests/api-resources/tenants/templates/templates.test.ts
+++ b/tests/api-resources/tenants/templates/templates.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource templates', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve: only required params', async () => {
const responsePromise = client.tenants.templates.retrieve('template_id', { tenant_id: 'tenant_id' });
const rawResponse = await responsePromise.asResponse();
@@ -20,12 +20,12 @@ describe('resource templates', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve: required and optional params', async () => {
const response = await client.tenants.templates.retrieve('template_id', { tenant_id: 'tenant_id' });
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list', async () => {
const responsePromise = client.tenants.templates.list('tenant_id');
const rawResponse = await responsePromise.asResponse();
@@ -37,7 +37,7 @@ describe('resource templates', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
@@ -49,7 +49,7 @@ describe('resource templates', () => {
).rejects.toThrow(Courier.NotFoundError);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('publish: only required params', async () => {
const responsePromise = client.tenants.templates.publish('template_id', { tenant_id: 'tenant_id' });
const rawResponse = await responsePromise.asResponse();
@@ -61,7 +61,7 @@ describe('resource templates', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('publish: required and optional params', async () => {
const response = await client.tenants.templates.publish('template_id', {
tenant_id: 'tenant_id',
@@ -69,7 +69,7 @@ describe('resource templates', () => {
});
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('replace: only required params', async () => {
const responsePromise = client.tenants.templates.replace('template_id', {
tenant_id: 'tenant_id',
@@ -84,7 +84,7 @@ describe('resource templates', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('replace: required and optional params', async () => {
const response = await client.tenants.templates.replace('template_id', {
tenant_id: 'tenant_id',
@@ -100,7 +100,6 @@ describe('resource templates', () => {
},
],
version: 'version',
- brand: 'brand',
},
channels: {
foo: {
diff --git a/tests/api-resources/tenants/templates/versions.test.ts b/tests/api-resources/tenants/templates/versions.test.ts
index 66e1d164..fca12b6f 100644
--- a/tests/api-resources/tenants/templates/versions.test.ts
+++ b/tests/api-resources/tenants/templates/versions.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource versions', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve: only required params', async () => {
const responsePromise = client.tenants.templates.versions.retrieve('version', {
tenant_id: 'tenant_id',
@@ -23,7 +23,7 @@ describe('resource versions', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve: required and optional params', async () => {
const response = await client.tenants.templates.versions.retrieve('version', {
tenant_id: 'tenant_id',
diff --git a/tests/api-resources/tenants/tenants.test.ts b/tests/api-resources/tenants/tenants.test.ts
index 402aff2a..3ea303e1 100644
--- a/tests/api-resources/tenants/tenants.test.ts
+++ b/tests/api-resources/tenants/tenants.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource tenants', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve', async () => {
const responsePromise = client.tenants.retrieve('tenant_id');
const rawResponse = await responsePromise.asResponse();
@@ -20,7 +20,7 @@ describe('resource tenants', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('update: only required params', async () => {
const responsePromise = client.tenants.update('tenant_id', { name: 'name' });
const rawResponse = await responsePromise.asResponse();
@@ -32,7 +32,7 @@ describe('resource tenants', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('update: required and optional params', async () => {
const response = await client.tenants.update('tenant_id', {
name: 'name',
@@ -53,7 +53,7 @@ describe('resource tenants', () => {
});
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list', async () => {
const responsePromise = client.tenants.list();
const rawResponse = await responsePromise.asResponse();
@@ -65,7 +65,7 @@ describe('resource tenants', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
@@ -80,7 +80,7 @@ describe('resource tenants', () => {
).rejects.toThrow(Courier.NotFoundError);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('delete', async () => {
const responsePromise = client.tenants.delete('tenant_id');
const rawResponse = await responsePromise.asResponse();
@@ -92,7 +92,7 @@ describe('resource tenants', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('listUsers', async () => {
const responsePromise = client.tenants.listUsers('tenant_id');
const rawResponse = await responsePromise.asResponse();
@@ -104,7 +104,7 @@ describe('resource tenants', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('listUsers: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
diff --git a/tests/api-resources/translations.test.ts b/tests/api-resources/translations.test.ts
index 36c92cac..3f0c1df9 100644
--- a/tests/api-resources/translations.test.ts
+++ b/tests/api-resources/translations.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource translations', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve: only required params', async () => {
const responsePromise = client.translations.retrieve('locale', { domain: 'domain' });
const rawResponse = await responsePromise.asResponse();
@@ -20,12 +20,12 @@ describe('resource translations', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve: required and optional params', async () => {
const response = await client.translations.retrieve('locale', { domain: 'domain' });
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('update: only required params', async () => {
const responsePromise = client.translations.update('locale', { domain: 'domain', body: 'body' });
const rawResponse = await responsePromise.asResponse();
@@ -37,7 +37,7 @@ describe('resource translations', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('update: required and optional params', async () => {
const response = await client.translations.update('locale', { domain: 'domain', body: 'body' });
});
diff --git a/tests/api-resources/users/preferences.test.ts b/tests/api-resources/users/preferences.test.ts
index 68a6d306..51252679 100644
--- a/tests/api-resources/users/preferences.test.ts
+++ b/tests/api-resources/users/preferences.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource preferences', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve', async () => {
const responsePromise = client.users.preferences.retrieve('user_id');
const rawResponse = await responsePromise.asResponse();
@@ -20,7 +20,7 @@ describe('resource preferences', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
@@ -32,7 +32,7 @@ describe('resource preferences', () => {
).rejects.toThrow(Courier.NotFoundError);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieveTopic: only required params', async () => {
const responsePromise = client.users.preferences.retrieveTopic('topic_id', { user_id: 'user_id' });
const rawResponse = await responsePromise.asResponse();
@@ -44,7 +44,7 @@ describe('resource preferences', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieveTopic: required and optional params', async () => {
const response = await client.users.preferences.retrieveTopic('topic_id', {
user_id: 'user_id',
@@ -52,7 +52,7 @@ describe('resource preferences', () => {
});
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('updateOrCreateTopic: only required params', async () => {
const responsePromise = client.users.preferences.updateOrCreateTopic('topic_id', {
user_id: 'user_id',
@@ -67,7 +67,7 @@ describe('resource preferences', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('updateOrCreateTopic: required and optional params', async () => {
const response = await client.users.preferences.updateOrCreateTopic('topic_id', {
user_id: 'user_id',
diff --git a/tests/api-resources/users/tenants.test.ts b/tests/api-resources/users/tenants.test.ts
index ca2b429f..73c46f87 100644
--- a/tests/api-resources/users/tenants.test.ts
+++ b/tests/api-resources/users/tenants.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource tenants', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list', async () => {
const responsePromise = client.users.tenants.list('user_id');
const rawResponse = await responsePromise.asResponse();
@@ -20,7 +20,7 @@ describe('resource tenants', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
@@ -32,7 +32,7 @@ describe('resource tenants', () => {
).rejects.toThrow(Courier.NotFoundError);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('addMultiple: only required params', async () => {
const responsePromise = client.users.tenants.addMultiple('user_id', {
tenants: [{ tenant_id: 'tenant_id' }],
@@ -46,7 +46,7 @@ describe('resource tenants', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('addMultiple: required and optional params', async () => {
const response = await client.users.tenants.addMultiple('user_id', {
tenants: [
@@ -60,7 +60,7 @@ describe('resource tenants', () => {
});
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('addSingle: only required params', async () => {
const responsePromise = client.users.tenants.addSingle('tenant_id', { user_id: 'user_id' });
const rawResponse = await responsePromise.asResponse();
@@ -72,7 +72,7 @@ describe('resource tenants', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('addSingle: required and optional params', async () => {
const response = await client.users.tenants.addSingle('tenant_id', {
user_id: 'user_id',
@@ -80,7 +80,7 @@ describe('resource tenants', () => {
});
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('removeAll', async () => {
const responsePromise = client.users.tenants.removeAll('user_id');
const rawResponse = await responsePromise.asResponse();
@@ -92,7 +92,7 @@ describe('resource tenants', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('removeSingle: only required params', async () => {
const responsePromise = client.users.tenants.removeSingle('tenant_id', { user_id: 'user_id' });
const rawResponse = await responsePromise.asResponse();
@@ -104,7 +104,7 @@ describe('resource tenants', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('removeSingle: required and optional params', async () => {
const response = await client.users.tenants.removeSingle('tenant_id', { user_id: 'user_id' });
});
diff --git a/tests/api-resources/users/tokens.test.ts b/tests/api-resources/users/tokens.test.ts
index 1d8ef83d..91e4a7e3 100644
--- a/tests/api-resources/users/tokens.test.ts
+++ b/tests/api-resources/users/tokens.test.ts
@@ -8,7 +8,7 @@ const client = new Courier({
});
describe('resource tokens', () => {
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve: only required params', async () => {
const responsePromise = client.users.tokens.retrieve('token', { user_id: 'user_id' });
const rawResponse = await responsePromise.asResponse();
@@ -20,12 +20,12 @@ describe('resource tokens', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('retrieve: required and optional params', async () => {
const response = await client.users.tokens.retrieve('token', { user_id: 'user_id' });
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('update: only required params', async () => {
const responsePromise = client.users.tokens.update('token', {
user_id: 'user_id',
@@ -40,7 +40,7 @@ describe('resource tokens', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('update: required and optional params', async () => {
const response = await client.users.tokens.update('token', {
user_id: 'user_id',
@@ -54,7 +54,7 @@ describe('resource tokens', () => {
});
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('list', async () => {
const responsePromise = client.users.tokens.list('user_id');
const rawResponse = await responsePromise.asResponse();
@@ -66,7 +66,7 @@ describe('resource tokens', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('delete: only required params', async () => {
const responsePromise = client.users.tokens.delete('token', { user_id: 'user_id' });
const rawResponse = await responsePromise.asResponse();
@@ -78,12 +78,12 @@ describe('resource tokens', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('delete: required and optional params', async () => {
const response = await client.users.tokens.delete('token', { user_id: 'user_id' });
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('addMultiple', async () => {
const responsePromise = client.users.tokens.addMultiple('user_id');
const rawResponse = await responsePromise.asResponse();
@@ -95,11 +95,10 @@ describe('resource tokens', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('addSingle: only required params', async () => {
const responsePromise = client.users.tokens.addSingle('token', {
user_id: 'user_id',
- body_token: 'token',
provider_key: 'firebase-fcm',
});
const rawResponse = await responsePromise.asResponse();
@@ -111,11 +110,10 @@ describe('resource tokens', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
+ // Mock server tests are disabled
test.skip('addSingle: required and optional params', async () => {
const response = await client.users.tokens.addSingle('token', {
user_id: 'user_id',
- body_token: 'token',
provider_key: 'firebase-fcm',
device: {
ad_id: 'ad_id',
diff --git a/tests/stringifyQuery.test.ts b/tests/stringifyQuery.test.ts
index 6ed17624..315ab571 100644
--- a/tests/stringifyQuery.test.ts
+++ b/tests/stringifyQuery.test.ts
@@ -1,8 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-import { Courier } from '@trycourier/courier';
-
-const { stringifyQuery } = Courier.prototype as any;
+import { stringifyQuery } from '@trycourier/courier/internal/utils/query';
describe(stringifyQuery, () => {
for (const [input, expected] of [
@@ -15,7 +13,7 @@ describe(stringifyQuery, () => {
'e=f',
)}=${encodeURIComponent('g&h')}`,
],
- ]) {
+ ] as const) {
it(`${JSON.stringify(input)} -> ${expected}`, () => {
expect(stringifyQuery(input)).toEqual(expected);
});