@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.
Files changed (36) hide show
  1. package/dist/cjs/editing/editing-data-middleware.js +2 -2
  2. package/dist/cjs/editing/editing-data-service.js +7 -15
  3. package/dist/cjs/editing/editing-render-middleware.js +8 -31
  4. package/dist/cjs/index.js +6 -10
  5. package/dist/cjs/middleware/personalize-middleware.js +32 -33
  6. package/dist/cjs/middleware/redirects-middleware.js +6 -3
  7. package/dist/cjs/services/base-graphql-sitemap-service.js +0 -8
  8. package/dist/esm/editing/editing-data-middleware.js +1 -1
  9. package/dist/esm/editing/editing-data-service.js +5 -13
  10. package/dist/esm/editing/editing-render-middleware.js +8 -31
  11. package/dist/esm/index.js +3 -9
  12. package/dist/esm/middleware/personalize-middleware.js +33 -34
  13. package/dist/esm/middleware/redirects-middleware.js +6 -3
  14. package/dist/esm/services/base-graphql-sitemap-service.js +1 -9
  15. package/package.json +8 -9
  16. package/types/editing/editing-data-service.d.ts +4 -12
  17. package/types/editing/editing-render-middleware.d.ts +0 -10
  18. package/types/index.d.ts +3 -7
  19. package/types/middleware/personalize-middleware.d.ts +15 -20
  20. package/types/services/base-graphql-sitemap-service.d.ts +3 -10
  21. package/context.d.ts +0 -1
  22. package/context.js +0 -1
  23. package/dist/cjs/context/context.js +0 -63
  24. package/dist/cjs/context/index.js +0 -5
  25. package/dist/cjs/editing/constants.js +0 -6
  26. package/dist/cjs/graphql/index.js +0 -6
  27. package/dist/esm/context/context.js +0 -59
  28. package/dist/esm/context/index.js +0 -1
  29. package/dist/esm/editing/constants.js +0 -3
  30. package/dist/esm/graphql/index.js +0 -1
  31. package/graphql.d.ts +0 -1
  32. package/graphql.js +0 -1
  33. package/types/context/context.d.ts +0 -104
  34. package/types/context/index.d.ts +0 -1
  35. package/types/editing/constants.d.ts +0 -3
  36. 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 {};
@@ -1 +0,0 @@
1
- export { Context, ContextConfig, SDK } from './context';
@@ -1,3 +0,0 @@
1
- export declare const QUERY_PARAM_EDITING_SECRET = "secret";
2
- export declare const QUERY_PARAM_PROTECTION_BYPASS_SITECORE = "x-sitecore-protection-bypass";
3
- export declare const QUERY_PARAM_PROTECTION_BYPASS_VERCEL = "x-vercel-protection-bypass";
@@ -1 +0,0 @@
1
- export { GraphQLRequestClient, GraphQLRequestClientFactory, GraphQLRequestClientFactoryConfig, getEdgeProxyContentUrl, } from '@sitecore-jss/sitecore-jss/graphql';