@sitecore-jss/sitecore-jss-nextjs 21.6.0-canary.36 → 21.6.0-canary.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/editing/editing-data-middleware.js +2 -2
- package/dist/cjs/editing/editing-data-service.js +7 -15
- package/dist/cjs/editing/editing-render-middleware.js +8 -31
- package/dist/cjs/index.js +6 -10
- package/dist/cjs/middleware/personalize-middleware.js +32 -33
- package/dist/cjs/middleware/redirects-middleware.js +6 -3
- package/dist/cjs/services/base-graphql-sitemap-service.js +0 -8
- package/dist/esm/editing/editing-data-middleware.js +1 -1
- package/dist/esm/editing/editing-data-service.js +5 -13
- package/dist/esm/editing/editing-render-middleware.js +8 -31
- package/dist/esm/index.js +3 -9
- package/dist/esm/middleware/personalize-middleware.js +33 -34
- package/dist/esm/middleware/redirects-middleware.js +6 -3
- package/dist/esm/services/base-graphql-sitemap-service.js +1 -9
- package/package.json +8 -9
- package/types/editing/editing-data-service.d.ts +4 -12
- package/types/editing/editing-render-middleware.d.ts +0 -10
- package/types/index.d.ts +3 -7
- package/types/middleware/personalize-middleware.d.ts +15 -20
- package/types/services/base-graphql-sitemap-service.d.ts +3 -10
- package/context.d.ts +0 -1
- package/context.js +0 -1
- package/dist/cjs/context/context.js +0 -63
- package/dist/cjs/context/index.js +0 -5
- package/dist/cjs/editing/constants.js +0 -6
- package/dist/cjs/graphql/index.js +0 -6
- package/dist/esm/context/context.js +0 -59
- package/dist/esm/context/index.js +0 -1
- package/dist/esm/editing/constants.js +0 -3
- package/dist/esm/graphql/index.js +0 -1
- package/graphql.d.ts +0 -1
- package/graphql.js +0 -1
- package/types/context/context.d.ts +0 -104
- package/types/context/index.d.ts +0 -1
- package/types/editing/constants.d.ts +0 -3
- package/types/graphql/index.d.ts +0 -1
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Software Development Kit (SDK) instance
|
|
3
|
-
*/
|
|
4
|
-
export type SDK<SDKType = unknown> = {
|
|
5
|
-
/**
|
|
6
|
-
* The Software Development Kit (SDK) library instance
|
|
7
|
-
*/
|
|
8
|
-
sdk: SDKType;
|
|
9
|
-
/**
|
|
10
|
-
* Initializes the Software Development Kit (SDK)
|
|
11
|
-
*/
|
|
12
|
-
init: (props: InitSDKProps) => Promise<void>;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Software Development Kits (SDKs) to be initialized
|
|
16
|
-
*/
|
|
17
|
-
type SDKModulesType = Record<string, SDK>;
|
|
18
|
-
/**
|
|
19
|
-
* Properties that are passed to the Context.
|
|
20
|
-
*/
|
|
21
|
-
export interface ContextInitProps {
|
|
22
|
-
/**
|
|
23
|
-
* Your Sitecore site name
|
|
24
|
-
*/
|
|
25
|
-
siteName?: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Configuration that is passed to the Context.
|
|
29
|
-
*/
|
|
30
|
-
export interface ContextConfig<SDKModules extends SDKModulesType> {
|
|
31
|
-
/**
|
|
32
|
-
* Your Sitecore Edge URL
|
|
33
|
-
*/
|
|
34
|
-
sitecoreEdgeUrl: string;
|
|
35
|
-
/**
|
|
36
|
-
* Your Sitecore Edge Context ID
|
|
37
|
-
*/
|
|
38
|
-
sitecoreEdgeContextId: string;
|
|
39
|
-
/**
|
|
40
|
-
* Your Sitecore site name
|
|
41
|
-
*/
|
|
42
|
-
siteName: string;
|
|
43
|
-
/**
|
|
44
|
-
* Software Development Kits (SDKs) to be initialized
|
|
45
|
-
*/
|
|
46
|
-
sdks: {
|
|
47
|
-
[module in keyof SDKModules]: SDKModules[module];
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Properties that are passed to the Software Development Kit (SDK) initialization function.
|
|
52
|
-
*/
|
|
53
|
-
type InitSDKProps = Omit<ContextConfig<SDKModulesType>, 'sdks'>;
|
|
54
|
-
/**
|
|
55
|
-
* Context instance that is used to initialize the application Context and associated Software Development Kits (SDKs).
|
|
56
|
-
*/
|
|
57
|
-
export declare class Context<SDKModules extends SDKModulesType> {
|
|
58
|
-
protected props: ContextConfig<SDKModules>;
|
|
59
|
-
/**
|
|
60
|
-
* Indicates whether the Context and SDK(s) have been initialized
|
|
61
|
-
*/
|
|
62
|
-
isInitialized: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* The Sitecore Edge URL
|
|
65
|
-
*/
|
|
66
|
-
readonly sitecoreEdgeUrl: string;
|
|
67
|
-
/**
|
|
68
|
-
* The Sitecore Edge Context ID
|
|
69
|
-
*/
|
|
70
|
-
readonly sitecoreEdgeContextId: string;
|
|
71
|
-
/**
|
|
72
|
-
* The Sitecore site name
|
|
73
|
-
*/
|
|
74
|
-
siteName: string;
|
|
75
|
-
/**
|
|
76
|
-
* Software Development Kits (SDKs) to be initialized
|
|
77
|
-
*/
|
|
78
|
-
readonly sdks: {
|
|
79
|
-
[module in keyof SDKModules]?: SDKModules[module]['sdk'];
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* Promises for the SDKs
|
|
83
|
-
*/
|
|
84
|
-
protected sdkPromises: {
|
|
85
|
-
[module in keyof SDKModules]?: Promise<SDKModules[module]['sdk']>;
|
|
86
|
-
};
|
|
87
|
-
constructor(props: ContextConfig<SDKModules>);
|
|
88
|
-
init(props?: ContextInitProps): void;
|
|
89
|
-
/**
|
|
90
|
-
* Retrieves the Software Development Kit (SDK) instance, ensuring it is initialized before returning
|
|
91
|
-
*
|
|
92
|
-
* @param {string} name SDK name
|
|
93
|
-
* @returns initialized SDK
|
|
94
|
-
*/
|
|
95
|
-
getSDK: <T extends keyof SDKModules>(name: T) => Promise<SDKModules[T]["sdk"]>;
|
|
96
|
-
/**
|
|
97
|
-
* Initializes the Software Development Kit (SDK)
|
|
98
|
-
*
|
|
99
|
-
* @param {T} name SDK name
|
|
100
|
-
* @returns {void}
|
|
101
|
-
*/
|
|
102
|
-
protected initSDK<T extends keyof SDKModules>(name: T): void;
|
|
103
|
-
}
|
|
104
|
-
export {};
|
package/types/context/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Context, ContextConfig, SDK } from './context';
|
package/types/graphql/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { GraphQLRequestClient, GraphQLRequestClientFactory, GraphQLRequestClientFactoryConfig, getEdgeProxyContentUrl, } from '@sitecore-jss/sitecore-jss/graphql';
|