-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ethan Jaffee
committed
Jan 26, 2024
1 parent
e5bd3d6
commit ac48e6c
Showing
18 changed files
with
50 additions
and
259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ export type EnumOrString<T extends string> = T | `${T}`; | |
|
||
Allows interfaces to support both enums and strings. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/analytics](./analytics.md) > [PartialPayload](./analytics.partialpayload.md) | ||
|
||
## PartialPayload type | ||
|
||
A Payload that is a subset of the EventPayload | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
export type PartialPayload = Partial<Record<keyof EventPayload, unknown>>; | ||
``` | ||
**References:** [EventPayload](./analytics.eventpayload.md) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
import { Environment, EnvironmentEnum } from './Environment'; | ||
import { Region, RegionEnum } from './Region'; | ||
import { Environment } from './Environment'; | ||
import { Region } from './Region'; | ||
|
||
const urlBase = 'yextevents.com/accounts/me/events'; | ||
|
||
export function setupRequestUrl(env?: Environment, region?: Region): string { | ||
if (env === EnvironmentEnum.Sandbox && region === RegionEnum.EU) { | ||
const isSandbox = env === 'SANDBOX'; | ||
if (isSandbox && region === 'eu') { | ||
throw new Error('Sandbox environment is not available in the EU region.'); | ||
} | ||
return ( | ||
'https://' + | ||
(env === EnvironmentEnum.Sandbox ? 'sbx.' : '') + | ||
(region ?? 'us') + | ||
'.' + | ||
urlBase | ||
'https://' + (isSandbox ? 'sbx.' : '') + (region ?? 'us') + '.' + urlBase | ||
); | ||
} |
Oops, something went wrong.