CloudSDK
|
Type |
Function |
|
Import path |
|
Initializes the Cloud SDK and any SDK packages of your choice.
Initialize SDK packages before running any functions in the package modules.
Signature
Parameters
|
Name |
Type |
Description |
|---|---|---|
|
|
Required. Details about your SitecoreAI instance and cookie settings. |
ServerSettings properties
ServerSettings properties|
Name |
Type |
Description |
Value |
|---|---|---|---|
|
|
|
Required. |
|
|
|
|
Required. |
|
|
|
|
Optional. The top-level domain of your app. The cookie domain ensures that the Cloud SDK stores cookies in the web browser as first-party cookies. Default: your domain. |
|
|
|
|
Optional. The number of days before cookies expire. For example, set to If unset, cookies expire according to the |
|
|
|
|
Optional. A URL path that must exist in the requested URL in order to send cookies. Default: |
|
|
|
|
Optional. Whether to set cookies from the server side. If using only the If using both the Default: |
|
Return value
Returns an instance of CloudSDKServerInitializer.
Examples
Next.js
Here's an example middleware.ts script showing how to initialize the SDK and its packages.
Before initializing SDK packages, first install them and import their modules.
See install and initialize the Cloud SDK and the reference documentation for installation and initialization code for all Cloud SDK packages and modules.