Skip to content

Commit

Permalink
change requests
Browse files Browse the repository at this point in the history
  • Loading branch information
mprew97 committed May 23, 2024
1 parent 1d31cbf commit a0fc1bd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ To do this, on the web server that hosts your site, set the `IS_EU_ITERABLE_SERV
```ts
import { initializeWithConfig } from '@iterable/web-sdk';

const { clearRefresh, setEmail, setUserID, logout } = initialize({
const { clearRefresh, setEmail, setUserID, logout } = initializeWithConfig({
'my-API-key',
{
isEuIterableService: true,
Expand Down Expand Up @@ -278,7 +278,7 @@ interface InitializeParams {
generateJWT?: (payload: GenerateJWTPayload) => Promise<string>;
}

initializeWithConfig: (initializeParams: InitializeParams) => Promise<string>) => {
initializeWithConfig: (initializeParams: InitializeParams) => {
clearRefresh: () => void;
setEmail: (email: string) => Promise<string>;
setUserID: (userId: string) => Promise<string>;
Expand All @@ -291,7 +291,7 @@ Example:
```ts
import { initializeWithConfig } from '@iterable/web-sdk';

const { clearRefresh, setEmail, setUserID, logout } = initialize({
const { clearRefresh, setEmail, setUserID, logout } = initializeWithConfig({
'my-API-key',
{
isEuIterableService: false,
Expand Down Expand Up @@ -1016,7 +1016,7 @@ To allow JavaScript to run in these new tabs:
```ts
import { initializeWithConfig } from '@iterable/web-sdk';

const { clearRefresh, setEmail, setUserID, logout } = initialize({
const { clearRefresh, setEmail, setUserID, logout } = initializeWithConfig({
'my-API-key',
{
isEuIterableService: false,
Expand Down
2 changes: 1 addition & 1 deletion src/authorization/authorization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ export function initialize(
export interface WithJWTParams {
authToken: string;
configOptions: Partial<Options>;
generateJWT?: (payload: GenerateJWTPayload) => Promise<string>;
generateJWT: (payload: GenerateJWTPayload) => Promise<string>;
}

export interface WithoutJWTParams {
Expand Down
2 changes: 2 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ const ITERABLE_API_URL = `https://${
IS_EU_ITERABLE_SERVICE ? EU_ITERABLE_DOMAIN : US_ITERABLE_DOMAIN
}/api`;

export const EU_ITERABLE_API = `https://${EU_ITERABLE_DOMAIN}/api`;

// Do not set `process.env.BASE_URL` if intending on using the prod or EU APIs.
export const BASE_URL = process.env.BASE_URL || ITERABLE_API_URL;

Expand Down

0 comments on commit a0fc1bd

Please sign in to comment.