@remkoj/optimizely-graph-client 2.0.4 → 2.1.0

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 (91) hide show
  1. package/README.md +136 -135
  2. package/dist/admin-api/client/OptimizelyGraphAdminApi.js +1 -1
  3. package/dist/admin-api/client/core/OpenAPI.js +1 -1
  4. package/dist/admin-api/client/index.d.ts +4 -3
  5. package/dist/admin-api/client/index.js.map +1 -1
  6. package/dist/admin-api/client/models/{ContentTypeDefinition_V2.d.ts → ContentSource_V2.d.ts} +1 -1
  7. package/dist/admin-api/client/models/ContentSource_V2.js +2 -0
  8. package/dist/admin-api/client/models/ContentSource_V2.js.map +1 -0
  9. package/dist/admin-api/client/models/{ContentTypeDefinition_V3.d.ts → ContentSource_V3.d.ts} +2 -1
  10. package/dist/admin-api/client/models/ContentSource_V3.js +2 -0
  11. package/dist/admin-api/client/models/ContentSource_V3.js.map +1 -0
  12. package/dist/admin-api/client/models/FilterMap.d.ts +2 -2
  13. package/dist/admin-api/client/models/OperationMap.d.ts +1 -1
  14. package/dist/admin-api/client/models/Partial_Record_string_OperationMap__.d.ts +5 -0
  15. package/dist/admin-api/client/models/Partial_Record_string_OperationMap__.js +2 -0
  16. package/dist/admin-api/client/models/Partial_Record_string_OperationMap__.js.map +1 -0
  17. package/dist/admin-api/client/models/SourceInfo.d.ts +1 -0
  18. package/dist/admin-api/client/models/SourceMetadata.d.ts +4 -0
  19. package/dist/admin-api/client/models/SourceMetadata.js +2 -0
  20. package/dist/admin-api/client/models/SourceMetadata.js.map +1 -0
  21. package/dist/admin-api/client/models/Webhook.d.ts +2 -0
  22. package/dist/admin-api/client/models/WebhookPayload.d.ts +2 -2
  23. package/dist/admin-api/client/services/DefinitionV2Service.d.ts +2 -2
  24. package/dist/admin-api/client/services/DefinitionV2Service.js.map +1 -1
  25. package/dist/admin-api/client/services/DefinitionV3Service.d.ts +16 -6
  26. package/dist/admin-api/client/services/DefinitionV3Service.js +21 -2
  27. package/dist/admin-api/client/services/DefinitionV3Service.js.map +1 -1
  28. package/dist/client/client.d.ts +2 -1
  29. package/dist/client/client.js +3 -0
  30. package/dist/client/client.js.map +1 -1
  31. package/dist/client/index.d.ts +2 -2
  32. package/dist/client/index.js +2 -2
  33. package/dist/client/index.js.map +1 -1
  34. package/dist/client/types.d.ts +10 -0
  35. package/dist/client/types.js +5 -0
  36. package/dist/client/types.js.map +1 -1
  37. package/dist/client/utils.d.ts +16 -0
  38. package/dist/client/utils.js +20 -0
  39. package/dist/client/utils.js.map +1 -1
  40. package/dist/config.d.ts +1 -0
  41. package/dist/config.js +13 -1
  42. package/dist/config.js.map +1 -1
  43. package/dist/services/channel-repository/repository.d.ts +1 -1
  44. package/dist/services/channel-repository/repository.js +4 -2
  45. package/dist/services/channel-repository/repository.js.map +1 -1
  46. package/dist/services/routing/queries/cms12/getAllRoutes.d.ts +32 -0
  47. package/dist/services/routing/queries/cms12/getAllRoutes.js +34 -0
  48. package/dist/services/routing/queries/cms12/getAllRoutes.js.map +1 -0
  49. package/dist/services/routing/queries/cms12/getRouteById.d.ts +13 -0
  50. package/dist/services/routing/queries/cms12/getRouteById.js +39 -0
  51. package/dist/services/routing/queries/cms12/getRouteById.js.map +1 -0
  52. package/dist/services/routing/queries/cms12/getRouteByPath.d.ts +12 -0
  53. package/dist/services/routing/queries/cms12/getRouteByPath.js +31 -0
  54. package/dist/services/routing/queries/cms12/getRouteByPath.js.map +1 -0
  55. package/dist/services/routing/queries/cms12/index.d.ts +14 -0
  56. package/dist/services/routing/queries/cms12/index.js +118 -0
  57. package/dist/services/routing/queries/cms12/index.js.map +1 -0
  58. package/dist/services/routing/queries/cms13/getAllRoutes.js.map +1 -0
  59. package/dist/services/routing/queries/cms13/getRouteById.js.map +1 -0
  60. package/dist/services/routing/queries/{getRouteByPath.js → cms13/getRouteByPath.js} +1 -1
  61. package/dist/services/routing/queries/cms13/getRouteByPath.js.map +1 -0
  62. package/dist/services/routing/queries/cms13/index.d.ts +12 -0
  63. package/dist/services/routing/queries/cms13/index.js +91 -0
  64. package/dist/services/routing/queries/cms13/index.js.map +1 -0
  65. package/dist/services/routing/queries/index.d.ts +1 -0
  66. package/dist/services/routing/queries/index.js +2 -0
  67. package/dist/services/routing/queries/index.js.map +1 -0
  68. package/dist/services/routing/queries/types.d.ts +7 -0
  69. package/dist/services/routing/queries/types.js +2 -0
  70. package/dist/services/routing/queries/types.js.map +1 -0
  71. package/dist/services/routing/resolver.d.ts +11 -9
  72. package/dist/services/routing/resolver.js +24 -85
  73. package/dist/services/routing/resolver.js.map +1 -1
  74. package/dist/services/routing/types.d.ts +32 -0
  75. package/dist/types.d.ts +5 -0
  76. package/package.json +3 -3
  77. package/dist/admin-api/client/models/ContentTypeDefinition_V2.js +0 -2
  78. package/dist/admin-api/client/models/ContentTypeDefinition_V2.js.map +0 -1
  79. package/dist/admin-api/client/models/ContentTypeDefinition_V3.js +0 -2
  80. package/dist/admin-api/client/models/ContentTypeDefinition_V3.js.map +0 -1
  81. package/dist/admin-api/client/models/Partial_Record_FieldKeys_OperationMap__.d.ts +0 -8
  82. package/dist/admin-api/client/models/Partial_Record_FieldKeys_OperationMap__.js +0 -2
  83. package/dist/admin-api/client/models/Partial_Record_FieldKeys_OperationMap__.js.map +0 -1
  84. package/dist/services/routing/queries/getAllRoutes.js.map +0 -1
  85. package/dist/services/routing/queries/getRouteById.js.map +0 -1
  86. package/dist/services/routing/queries/getRouteByPath.js.map +0 -1
  87. /package/dist/services/routing/queries/{getAllRoutes.d.ts → cms13/getAllRoutes.d.ts} +0 -0
  88. /package/dist/services/routing/queries/{getAllRoutes.js → cms13/getAllRoutes.js} +0 -0
  89. /package/dist/services/routing/queries/{getRouteById.d.ts → cms13/getRouteById.d.ts} +0 -0
  90. /package/dist/services/routing/queries/{getRouteById.js → cms13/getRouteById.js} +0 -0
  91. /package/dist/services/routing/queries/{getRouteByPath.d.ts → cms13/getRouteByPath.d.ts} +0 -0
package/README.md CHANGED
@@ -1,135 +1,136 @@
1
- # Optimizely Graph Client <!-- omit in toc -->
2
- An extension of the [graphql-request](https://www.npmjs.com/package/graphql-request) package, providing the configuration and additional logic needed to connect with Optimizely Graph.
3
-
4
- ## Within this document <!-- omit in toc -->
5
- - [1. Provided services](#1-provided-services)
6
- - [2. Usage example](#2-usage-example)
7
- - [2.1. GraphQL Client](#21-graphql-client)
8
- - [2.2. Admin API](#22-admin-api)
9
- - [3. Configuration](#3-configuration)
10
- - [3.1. Advanced Features](#31-advanced-features)
11
-
12
- ## 1. Provided services
13
- The package contains the following services:
14
- - The configuration logic, to read and validate the configuration. Supports both runtime configuration objects as well a reading from environment variables.
15
- - The GraphQL Client, based upon [graphql-request](https://www.npmjs.com/package/graphql-request), supporting the following authentication schemes for Optimizely Graph:
16
- - Public access (e.g. using the Single key)
17
- - HMAC Signed messages
18
- - Basic Authentication
19
- - Token pass-through (for Optimizely CMS in context editing)
20
- - A RouteResolver, which simplifies handling routes when using Optimizely CMS, using the Optimizely Graph as datasource.
21
- - A ChannelRepository, which simplifies reading channel (website) configuration from the Optimizely CMS, using the Optimizely Graph as datasource.
22
- - An OpenAPI Client for the administrative REST services of Optimizely Graph. This follows the [service specification](https://cg.optimizely.com/app/swagger/swagger.json) and is based upon the code generated by [openapi-typescript-codegen](https://www.npmjs.com/package/openapi-typescript-codegen) from this service specification.
23
-
24
- ## 2. Usage example
25
- ### 2.1. GraphQL Client
26
- ```typescript
27
- // Import the library
28
- import { gql } from 'graphql-request'
29
- import createClient, { AuthMode } from '@remkoj/optimizely-graph-client/client'
30
- import Router from '@remkoj/optimizely-graph-client/router'
31
- import ChannelRepository from '@remkoj/optimizely-graph-client/channels'
32
-
33
- // Prepare the query
34
- const document = gql`query {
35
- Content {
36
- items {
37
- Name
38
- ContentLink {
39
- GuidValue
40
- }
41
- Language {
42
- Name
43
- }
44
- }
45
- }
46
- }`
47
-
48
- // Create an instance of the client, the configuration object may be omitted
49
- // when executing on Node.JS. If no configuration is provided, it will be read
50
- // from the environment variables.
51
- // The variable client will be of type: GraphQLClient
52
- const client = createClient({
53
- single_key: "your_single_key"
54
- })
55
-
56
- // By default the client will always use AuthMode.Public, unless overridden by the
57
- // second parameter of createClient. Use the updateAuthentication to change the
58
- // authentication mode after creation
59
- client.updateAuthentication(AuthMode.Public)
60
-
61
- // Execute a GraphQL query, the second paramer can be used to send in variables
62
- const result = await client.request(document)
63
-
64
- // Use the Router to get all routes registered by Optimizely CMS
65
- const router = new Router(client)
66
- const allPaths = await router.getRoutes()
67
-
68
- // Use the ChannelRepository to get all registered channels within Optimizely CMS
69
- const channels = new ChannelRepository(client)
70
- const allChannels = await channels.getAll()
71
- ```
72
-
73
- ### 2.2. Admin API
74
- ***Warning***: The AdminAPI of Optimizely Graph requires your App Key & Secret as it allows full management of the service. When used in a browser, take all needed steps to prevent leaking of these credentials.
75
-
76
- ```typescript
77
- import createAdminApi from '@remkoj/optimizely-graph-client/admin'
78
-
79
- // Create an instance of the client, the configuration object may be omitted
80
- // when executing on Node.JS. If no configuration is provided, it will be read
81
- // from the environment variables.
82
- const api = createAdminApi({
83
- single_key: "your single key",
84
- app_key: "your app key",
85
- secret: "your secret"
86
- })
87
-
88
- // Use the webhooks endpoint to list all registered webhooks
89
- const hooks = await api.webhooks.listWebhookHandler()
90
- ```
91
-
92
- ## 3. Configuration
93
- The following configuration options are available, the table lists both the environment variable as well as property within the configuration object.
94
-
95
- | Environment | Configuration object | Required | Usage |
96
- | --- | --- | --- | --- |
97
- | `OPTIMIZELY_GRAPH_GATEWAY` | gateway | no | The endpoint for Optimizely Graph |
98
- | `OPTIMIZELY_GRAPH_SINGLE_KEY` | single_key | yes | The key needed for public, read-only access |
99
- | `OPTIMIZELY_GRAPH_SECRET` | secret | no | The Optimizely Graph secret for write access, this value must never be made available in a browser |
100
- | `OPTIMIZELY_GRAPH_APP_KEY` | app_key | no | The Optimizely Graph app_key for write access, this value must never be made available in a browser |
101
- | `SITE_DOMAIN` | deploy_domain | no | The domain of the frontend |
102
- | `OPTIMIZELY_CMS_URL` | dxp_url | yes | The domain where the CMS has been installed |
103
- | `OPTIMIZELY_GRAPH_QUERY_LOG` | query_log | no | Set to "true" to enable query output to the console |
104
- | `OPTIMIZELY_DEBUG` | debug | no | Set to "true" to enable verbose debug output to the console |
105
-
106
- ### 3.1. Advanced Features
107
- The Optimizely Graph Client has support for a number of the feature flags in Optimizely Graph and can enable/disable those on the fly.
108
-
109
- The following features can currently be toggled:
110
- - **Caching *[Default: enabled]*:** Provides control over the service output cache, setting this to false will make all requests be evaluated in real time instead of being cached.
111
- - **Stored queries *[Default: enabled]*:** This will store the query to the underlying data store, so even when the output cache is invalidated, this will prevent the query to the data store to be regenerated. **Warning**: This feature does not work with cursors, so either disable it temporary or completely if you need cursors in you queries.
112
- - **Recursive queries *[Default: disabled]*:** When enabled it enables the execution of the `@recursive(depth: n)` directive. If compatible with the queries used, this can significantly reduce the number of queries needed to build a page.
113
-
114
- The flags are controlled by the following instance methods & fields on the Client object:
115
- - `updateFlags(newFlags, temporary)`: Update the flags for the instance. If there's roll-back information it will throw an Error. When temporary is enabled it will create a roll-back copy of the current flags prior to updating.
116
- - `restoreFlags()`: Restore the flags to the stored 'roll-back' copy, if there's no roll-back copy, no action is taken and no Error will be thrown.
117
-
118
- #### Example <!-- omit in toc -->
119
- For server-side code, with access to environment variables, adjust according to your case.
120
- ```typescript
121
- // Import client & create instance
122
- import createClient from '@remkoj/optimizely-graph-client/client';
123
- const client = createClient();
124
-
125
- // Set the default for this client to add support for recursive queries
126
- client.updateFlags({ recursive: true });
127
-
128
- // Temporary disable the query cache to allow queries with cursor
129
- client.updateFlags({ queryCache: false }, true);
130
-
131
- ...
132
-
133
- // Roll-back to preferred flag settings
134
- client.restoreFlags();
135
- ```
1
+ # Optimizely Graph Client <!-- omit in toc -->
2
+ An extension of the [graphql-request](https://www.npmjs.com/package/graphql-request) package, providing the configuration and additional logic needed to connect with Optimizely Graph.
3
+
4
+ ## Within this document <!-- omit in toc -->
5
+ - [1. Provided services](#1-provided-services)
6
+ - [2. Usage example](#2-usage-example)
7
+ - [2.1. GraphQL Client](#21-graphql-client)
8
+ - [2.2. Admin API](#22-admin-api)
9
+ - [3. Configuration](#3-configuration)
10
+ - [3.1. Advanced Features](#31-advanced-features)
11
+
12
+ ## 1. Provided services
13
+ The package contains the following services:
14
+ - The configuration logic, to read and validate the configuration. Supports both runtime configuration objects as well a reading from environment variables.
15
+ - The GraphQL Client, based upon [graphql-request](https://www.npmjs.com/package/graphql-request), supporting the following authentication schemes for Optimizely Graph:
16
+ - Public access (e.g. using the Single key)
17
+ - HMAC Signed messages
18
+ - Basic Authentication
19
+ - Token pass-through (for Optimizely CMS in context editing)
20
+ - A RouteResolver, which simplifies handling routes when using Optimizely CMS, using the Optimizely Graph as datasource.
21
+ - A ChannelRepository, which simplifies reading channel (website) configuration from the Optimizely CMS, using the Optimizely Graph as datasource.
22
+ - An OpenAPI Client for the administrative REST services of Optimizely Graph. This follows the [service specification](https://cg.optimizely.com/app/swagger/swagger.json) and is based upon the code generated by [openapi-typescript-codegen](https://www.npmjs.com/package/openapi-typescript-codegen) from this service specification.
23
+
24
+ ## 2. Usage example
25
+ ### 2.1. GraphQL Client
26
+ ```typescript
27
+ // Import the library
28
+ import { gql } from 'graphql-request'
29
+ import createClient, { AuthMode } from '@remkoj/optimizely-graph-client/client'
30
+ import Router from '@remkoj/optimizely-graph-client/router'
31
+ import ChannelRepository from '@remkoj/optimizely-graph-client/channels'
32
+
33
+ // Prepare the query
34
+ const document = gql`query {
35
+ Content {
36
+ items {
37
+ Name
38
+ ContentLink {
39
+ GuidValue
40
+ }
41
+ Language {
42
+ Name
43
+ }
44
+ }
45
+ }
46
+ }`
47
+
48
+ // Create an instance of the client, the configuration object may be omitted
49
+ // when executing on Node.JS. If no configuration is provided, it will be read
50
+ // from the environment variables.
51
+ // The variable client will be of type: GraphQLClient
52
+ const client = createClient({
53
+ single_key: "your_single_key"
54
+ })
55
+
56
+ // By default the client will always use AuthMode.Public, unless overridden by the
57
+ // second parameter of createClient. Use the updateAuthentication to change the
58
+ // authentication mode after creation
59
+ client.updateAuthentication(AuthMode.Public)
60
+
61
+ // Execute a GraphQL query, the second paramer can be used to send in variables
62
+ const result = await client.request(document)
63
+
64
+ // Use the Router to get all routes registered by Optimizely CMS
65
+ const router = new Router(client)
66
+ const allPaths = await router.getRoutes()
67
+
68
+ // Use the ChannelRepository to get all registered channels within Optimizely CMS
69
+ const channels = new ChannelRepository(client)
70
+ const allChannels = await channels.getAll()
71
+ ```
72
+
73
+ ### 2.2. Admin API
74
+ ***Warning***: The AdminAPI of Optimizely Graph requires your App Key & Secret as it allows full management of the service. When used in a browser, take all needed steps to prevent leaking of these credentials.
75
+
76
+ ```typescript
77
+ import createAdminApi from '@remkoj/optimizely-graph-client/admin'
78
+
79
+ // Create an instance of the client, the configuration object may be omitted
80
+ // when executing on Node.JS. If no configuration is provided, it will be read
81
+ // from the environment variables.
82
+ const api = createAdminApi({
83
+ single_key: "your single key",
84
+ app_key: "your app key",
85
+ secret: "your secret"
86
+ })
87
+
88
+ // Use the webhooks endpoint to list all registered webhooks
89
+ const hooks = await api.webhooks.listWebhookHandler()
90
+ ```
91
+
92
+ ## 3. Configuration
93
+ The following configuration options are available, the table lists both the environment variable as well as property within the configuration object.
94
+
95
+ | Environment | Configuration object | Required | Usage |
96
+ | --- | --- | --- | --- |
97
+ | `OPTIMIZELY_GRAPH_GATEWAY` | gateway | no | The endpoint for Optimizely Graph |
98
+ | `OPTIMIZELY_GRAPH_SINGLE_KEY` | single_key | yes | The key needed for public, read-only access |
99
+ | `OPTIMIZELY_GRAPH_SECRET` | secret | no | The Optimizely Graph secret for write access, this value must never be made available in a browser |
100
+ | `OPTIMIZELY_GRAPH_APP_KEY` | app_key | no | The Optimizely Graph app_key for write access, this value must never be made available in a browser |
101
+ | `SITE_DOMAIN` | deploy_domain | no | The domain of the frontend |
102
+ | `OPTIMIZELY_CMS_URL` | dxp_url | yes | The domain where the CMS has been installed |
103
+ | `OPTIMIZELY_CMS_SCHEMA` | opti_cms_schema | no | The marker for the CMS schema version, which can be used by services and the implementation. Valid values are: `OPTI-CMS-12` and `OPTI-CMS-13`. The default value is `OPTI-CMS-13` |
104
+ | `OPTIMIZELY_GRAPH_QUERY_LOG` | query_log | no | Set to "true" to enable query output to the console |
105
+ | `OPTIMIZELY_DEBUG` | debug | no | Set to "true" to enable verbose debug output to the console |
106
+
107
+ ### 3.1. Advanced Features
108
+ The Optimizely Graph Client has support for a number of the feature flags in Optimizely Graph and can enable/disable those on the fly.
109
+
110
+ The following features can currently be toggled:
111
+ - **Caching *[Default: enabled]*:** Provides control over the service output cache, setting this to false will make all requests be evaluated in real time instead of being cached.
112
+ - **Stored queries *[Default: enabled]*:** This will store the query to the underlying data store, so even when the output cache is invalidated, this will prevent the query to the data store to be regenerated. **Warning**: This feature does not work with cursors, so either disable it temporary or completely if you need cursors in you queries.
113
+ - **Recursive queries *[Default: disabled]*:** When enabled it enables the execution of the `@recursive(depth: n)` directive. If compatible with the queries used, this can significantly reduce the number of queries needed to build a page.
114
+
115
+ The flags are controlled by the following instance methods & fields on the Client object:
116
+ - `updateFlags(newFlags, temporary)`: Update the flags for the instance. If there's roll-back information it will throw an Error. When temporary is enabled it will create a roll-back copy of the current flags prior to updating.
117
+ - `restoreFlags()`: Restore the flags to the stored 'roll-back' copy, if there's no roll-back copy, no action is taken and no Error will be thrown.
118
+
119
+ #### Example <!-- omit in toc -->
120
+ For server-side code, with access to environment variables, adjust according to your case.
121
+ ```typescript
122
+ // Import client & create instance
123
+ import createClient from '@remkoj/optimizely-graph-client/client';
124
+ const client = createClient();
125
+
126
+ // Set the default for this client to add support for recursive queries
127
+ client.updateFlags({ recursive: true });
128
+
129
+ // Temporary disable the query cache to allow queries with cursor
130
+ client.updateFlags({ queryCache: false }, true);
131
+
132
+ ...
133
+
134
+ // Roll-back to preferred flag settings
135
+ client.restoreFlags();
136
+ ```
@@ -11,7 +11,7 @@ export class OptimizelyGraphAdminApi {
11
11
  constructor(config, HttpRequest = FetchHttpRequest) {
12
12
  this.request = new HttpRequest({
13
13
  BASE: config?.BASE ?? 'https://prod.cg.optimizely.com',
14
- VERSION: config?.VERSION ?? '3.10.0',
14
+ VERSION: config?.VERSION ?? '3.12.0',
15
15
  WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
16
16
  CREDENTIALS: config?.CREDENTIALS ?? 'include',
17
17
  TOKEN: config?.TOKEN,
@@ -1,6 +1,6 @@
1
1
  export const OpenAPI = {
2
2
  BASE: 'https://prod.cg.optimizely.com',
3
- VERSION: '3.10.0',
3
+ VERSION: '3.12.0',
4
4
  WITH_CREDENTIALS: false,
5
5
  CREDENTIALS: 'include',
6
6
  TOKEN: undefined,
@@ -7,10 +7,10 @@ export type { OpenAPIConfig } from './core/OpenAPI.js';
7
7
  export type { BestBetCollectionPayload } from './models/BestBetCollectionPayload.js';
8
8
  export type { BestBetCollectionResult } from './models/BestBetCollectionResult.js';
9
9
  export type { CacheInvalidationConfig } from './models/CacheInvalidationConfig.js';
10
+ export type { ContentSource_V2 } from './models/ContentSource_V2.js';
11
+ export type { ContentSource_V3 } from './models/ContentSource_V3.js';
10
12
  export type { ContentType_V2 } from './models/ContentType_V2.js';
11
13
  export type { ContentType_V3 } from './models/ContentType_V3.js';
12
- export type { ContentTypeDefinition_V2 } from './models/ContentTypeDefinition_V2.js';
13
- export type { ContentTypeDefinition_V3 } from './models/ContentTypeDefinition_V3.js';
14
14
  export type { ContentTypeMap_V3 } from './models/ContentTypeMap_V3.js';
15
15
  export type { ContentTypeProperty_V2 } from './models/ContentTypeProperty_V2.js';
16
16
  export type { ContentTypeProperty_V3 } from './models/ContentTypeProperty_V3.js';
@@ -22,7 +22,7 @@ export type { LinkMap } from './models/LinkMap.js';
22
22
  export type { LinkProperty } from './models/LinkProperty.js';
23
23
  export type { OperationMap } from './models/OperationMap.js';
24
24
  export type { Optional_string_ } from './models/Optional_string_.js';
25
- export type { Partial_Record_FieldKeys_OperationMap__ } from './models/Partial_Record_FieldKeys_OperationMap__.js';
25
+ export type { Partial_Record_string_OperationMap__ } from './models/Partial_Record_string_OperationMap__.js';
26
26
  export { Preset } from './models/Preset.js';
27
27
  export type { Property_V2 } from './models/Property_V2.js';
28
28
  export type { Property_V3 } from './models/Property_V3.js';
@@ -35,6 +35,7 @@ export type { Request } from './models/Request.js';
35
35
  export type { RequestLog } from './models/RequestLog.js';
36
36
  export type { SourceInfo } from './models/SourceInfo.js';
37
37
  export type { SourceInfoMap } from './models/SourceInfoMap.js';
38
+ export type { SourceMetadata } from './models/SourceMetadata.js';
38
39
  export type { StopwordsBody } from './models/StopwordsBody.js';
39
40
  export type { SynonymsBody } from './models/SynonymsBody.js';
40
41
  export type { TokenClaims } from './models/TokenClaims.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/admin-api/client/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,0BAA0B;AAC1B,oBAAoB;AACpB,oBAAoB;AACpB,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAa5C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AASpD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAkB5C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/admin-api/client/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,0BAA0B;AAC1B,oBAAoB;AACpB,oBAAoB;AACpB,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAa5C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AASpD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAmB5C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { ContentType_V2 } from './ContentType_V2.js';
2
2
  import type { LinkMap } from './LinkMap.js';
3
3
  import type { PropertyType_V2 } from './PropertyType_V2.js';
4
- export type ContentTypeDefinition_V2 = {
4
+ export type ContentSource_V2 = {
5
5
  useTypedFieldNames?: boolean;
6
6
  languages?: Array<string>;
7
7
  links?: LinkMap;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ContentSource_V2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentSource_V2.js","sourceRoot":"","sources":["../../../../src/admin-api/client/models/ContentSource_V2.ts"],"names":[],"mappings":""}
@@ -3,12 +3,13 @@ import type { LinkMap } from './LinkMap.js';
3
3
  import type { Optional_string_ } from './Optional_string_.js';
4
4
  import type { Preset } from './Preset.js';
5
5
  import type { PropertyTypeMap_V3 } from './PropertyTypeMap_V3.js';
6
- export type ContentTypeDefinition_V3 = {
6
+ export type ContentSource_V3 = {
7
7
  languages?: Array<string>;
8
8
  contentTypes?: ContentTypeMap_V3;
9
9
  propertyTypes?: PropertyTypeMap_V3;
10
10
  links?: LinkMap;
11
11
  label?: Optional_string_;
12
+ description?: Optional_string_;
12
13
  useTypedFieldNames?: boolean;
13
14
  preset?: Preset;
14
15
  };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ContentSource_V3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentSource_V3.js","sourceRoot":"","sources":["../../../../src/admin-api/client/models/ContentSource_V3.ts"],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- import type { Partial_Record_FieldKeys_OperationMap__ } from './Partial_Record_FieldKeys_OperationMap__.js';
2
- export type FilterMap = Partial_Record_FieldKeys_OperationMap__;
1
+ import type { Partial_Record_string_OperationMap__ } from './Partial_Record_string_OperationMap__.js';
2
+ export type FilterMap = Partial_Record_string_OperationMap__;
@@ -1,4 +1,4 @@
1
1
  export type OperationMap = {
2
- in?: Array<string>;
2
+ in?: (string | Array<string>);
3
3
  eq?: string;
4
4
  };
@@ -0,0 +1,5 @@
1
+ import type { OperationMap } from './OperationMap.js';
2
+ /**
3
+ * Make all properties in T optional
4
+ */
5
+ export type Partial_Record_string_OperationMap__ = Record<string, OperationMap>;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Partial_Record_string_OperationMap__.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Partial_Record_string_OperationMap__.js","sourceRoot":"","sources":["../../../../src/admin-api/client/models/Partial_Record_string_OperationMap__.ts"],"names":[],"mappings":""}
@@ -1,5 +1,6 @@
1
1
  export type SourceInfo = {
2
2
  languages: Array<string>;
3
+ description: string;
3
4
  label: string;
4
5
  id: string;
5
6
  };
@@ -0,0 +1,4 @@
1
+ export type SourceMetadata = {
2
+ label: string;
3
+ description: string;
4
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SourceMetadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SourceMetadata.js","sourceRoot":"","sources":["../../../../src/admin-api/client/models/SourceMetadata.ts"],"names":[],"mappings":""}
@@ -1,4 +1,6 @@
1
+ import type { Preset } from './Preset.js';
1
2
  import type { WebhookPayload } from './WebhookPayload.js';
2
3
  export type Webhook = (WebhookPayload & {
4
+ preset: Preset;
3
5
  id: string;
4
6
  });
@@ -1,4 +1,4 @@
1
- import type { Partial_Record_FieldKeys_OperationMap__ } from './Partial_Record_FieldKeys_OperationMap__.js';
1
+ import type { Partial_Record_string_OperationMap__ } from './Partial_Record_string_OperationMap__.js';
2
2
  import type { Request } from './Request.js';
3
3
  /**
4
4
  * The `WebhookPayload` type represents the payload of a webhook request, which includes information
@@ -8,5 +8,5 @@ export type WebhookPayload = {
8
8
  disabled?: boolean;
9
9
  request: Request;
10
10
  topics?: Array<string>;
11
- filters?: (Array<Partial_Record_FieldKeys_OperationMap__> | Partial_Record_FieldKeys_OperationMap__);
11
+ filters?: (Array<Partial_Record_string_OperationMap__> | Partial_Record_string_OperationMap__);
12
12
  };
@@ -1,4 +1,4 @@
1
- import type { ContentTypeDefinition_V2 } from '../models/ContentTypeDefinition_V2.js';
1
+ import type { ContentSource_V2 } from '../models/ContentSource_V2.js';
2
2
  import type { CancelablePromise } from '../core/CancelablePromise.js';
3
3
  import type { BaseHttpRequest } from '../core/BaseHttpRequest.js';
4
4
  export declare class DefinitionV2Service {
@@ -30,5 +30,5 @@ export declare class DefinitionV2Service {
30
30
  * @returns any Successfully updated content type
31
31
  * @throws ApiError
32
32
  */
33
- postContentV2TypeHandler(requestBody: ContentTypeDefinition_V2): CancelablePromise<any>;
33
+ postContentV2TypeHandler(requestBody: ContentSource_V2): CancelablePromise<any>;
34
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DefinitionV2Service.js","sourceRoot":"","sources":["../../../../src/admin-api/client/services/DefinitionV2Service.ts"],"names":[],"mappings":"AAOA,MAAM,OAAO,mBAAmB;IAC5B,YAA4B,WAA4B;QAA5B,gBAAW,GAAX,WAAW,CAAiB;IAAG,CAAC;IAC5D;;;;;;;OAOG;IACI,wBAAwB,CAC3B,EAAU,EACV,WAAmB;QAEnB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,sBAAsB;YAC3B,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE;aACX;YACD,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;IACD;;;;;;;OAOG;IACI,0BAA0B,CAC7B,EAAU,EACV,SAAyB;QAEzB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,sBAAsB;YAC3B,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE;gBACR,WAAW,EAAE,SAAS;aACzB;SACJ,CAAC,CAAC;IACP,CAAC;IACD;;;;;;;OAOG;IACI,wBAAwB,CAC3B,WAAqC;QAErC,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,uBAAuB;YAC5B,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;YAC7B,MAAM,EAAE;gBACJ,GAAG,EAAE,6CAA6C;aACrD;SACJ,CAAC,CAAC;IACP,CAAC;CACJ"}
1
+ {"version":3,"file":"DefinitionV2Service.js","sourceRoot":"","sources":["../../../../src/admin-api/client/services/DefinitionV2Service.ts"],"names":[],"mappings":"AAOA,MAAM,OAAO,mBAAmB;IAC5B,YAA4B,WAA4B;QAA5B,gBAAW,GAAX,WAAW,CAAiB;IAAG,CAAC;IAC5D;;;;;;;OAOG;IACI,wBAAwB,CAC3B,EAAU,EACV,WAAmB;QAEnB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,sBAAsB;YAC3B,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE;aACX;YACD,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;IACD;;;;;;;OAOG;IACI,0BAA0B,CAC7B,EAAU,EACV,SAAyB;QAEzB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,sBAAsB;YAC3B,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE;gBACR,WAAW,EAAE,SAAS;aACzB;SACJ,CAAC,CAAC;IACP,CAAC;IACD;;;;;;;OAOG;IACI,wBAAwB,CAC3B,WAA6B;QAE7B,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,uBAAuB;YAC5B,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;YAC7B,MAAM,EAAE;gBACJ,GAAG,EAAE,6CAA6C;aACrD;SACJ,CAAC,CAAC;IACP,CAAC;CACJ"}
@@ -1,6 +1,7 @@
1
- import type { ContentTypeDefinition_V3 } from '../models/ContentTypeDefinition_V3.js';
1
+ import type { ContentSource_V3 } from '../models/ContentSource_V3.js';
2
2
  import type { DeleteMode } from '../models/DeleteMode.js';
3
3
  import type { SourceInfoMap } from '../models/SourceInfoMap.js';
4
+ import type { SourceMetadata } from '../models/SourceMetadata.js';
4
5
  import type { CancelablePromise } from '../core/CancelablePromise.js';
5
6
  import type { BaseHttpRequest } from '../core/BaseHttpRequest.js';
6
7
  export declare class DefinitionV3Service {
@@ -8,7 +9,7 @@ export declare class DefinitionV3Service {
8
9
  constructor(httpRequest: BaseHttpRequest);
9
10
  /**
10
11
  * Get source metadata
11
- * Get `id`, `label` and `languages` fields of the source
12
+ * Get `id`, `label`, `description` and `languages` fields of the source
12
13
  * @param id The id of the source _(optional)_
13
14
  * - _(empty): all sources_
14
15
  * - _**default**: only default source_
@@ -36,14 +37,23 @@ export declare class DefinitionV3Service {
36
37
  * @throws ApiError
37
38
  */
38
39
  deleteContentV3SourceHandler(id?: string, mode?: DeleteMode): CancelablePromise<any>;
40
+ /**
41
+ * Update source metadata
42
+ * Update `label`, `description` fields of the source
43
+ * @param id The id of the source
44
+ * @param requestBody The new metadata source
45
+ * @returns void
46
+ * @throws ApiError
47
+ */
48
+ postContentV3SourceHandler(id: string, requestBody: SourceMetadata): CancelablePromise<void>;
39
49
  /**
40
50
  * Get content types
41
51
  * Get content types of the source
42
52
  * @param id The id of the source
43
- * @returns ContentTypeDefinition_V3 Ok
53
+ * @returns ContentSource_V3 Ok
44
54
  * @throws ApiError
45
55
  */
46
- getContentV3TypeHandler(id?: string): CancelablePromise<ContentTypeDefinition_V3>;
56
+ getContentV3TypeHandler(id?: string): CancelablePromise<ContentSource_V3>;
47
57
  /**
48
58
  * Partial content type update
49
59
  * Update content types of the source partially
@@ -52,7 +62,7 @@ export declare class DefinitionV3Service {
52
62
  * @returns void
53
63
  * @throws ApiError
54
64
  */
55
- postContentV3TypeHandler(requestBody: ContentTypeDefinition_V3, id?: string): CancelablePromise<void>;
65
+ postContentV3TypeHandler(requestBody: ContentSource_V3, id?: string): CancelablePromise<void>;
56
66
  /**
57
67
  * Full content type update
58
68
  * Update content types of the source (overwrite all)
@@ -61,5 +71,5 @@ export declare class DefinitionV3Service {
61
71
  * @returns void
62
72
  * @throws ApiError
63
73
  */
64
- putContentV3TypeHandler(requestBody: ContentTypeDefinition_V3, id?: string): CancelablePromise<void>;
74
+ putContentV3TypeHandler(requestBody: ContentSource_V3, id?: string): CancelablePromise<void>;
65
75
  }
@@ -4,7 +4,7 @@ export class DefinitionV3Service {
4
4
  }
5
5
  /**
6
6
  * Get source metadata
7
- * Get `id`, `label` and `languages` fields of the source
7
+ * Get `id`, `label`, `description` and `languages` fields of the source
8
8
  * @param id The id of the source _(optional)_
9
9
  * - _(empty): all sources_
10
10
  * - _**default**: only default source_
@@ -52,11 +52,30 @@ export class DefinitionV3Service {
52
52
  },
53
53
  });
54
54
  }
55
+ /**
56
+ * Update source metadata
57
+ * Update `label`, `description` fields of the source
58
+ * @param id The id of the source
59
+ * @param requestBody The new metadata source
60
+ * @returns void
61
+ * @throws ApiError
62
+ */
63
+ postContentV3SourceHandler(id, requestBody) {
64
+ return this.httpRequest.request({
65
+ method: 'POST',
66
+ url: '/api/content/v3/sources',
67
+ query: {
68
+ 'id': id,
69
+ },
70
+ body: requestBody,
71
+ mediaType: 'application/json',
72
+ });
73
+ }
55
74
  /**
56
75
  * Get content types
57
76
  * Get content types of the source
58
77
  * @param id The id of the source
59
- * @returns ContentTypeDefinition_V3 Ok
78
+ * @returns ContentSource_V3 Ok
60
79
  * @throws ApiError
61
80
  */
62
81
  getContentV3TypeHandler(id = 'default') {
@@ -1 +1 @@
1
- {"version":3,"file":"DefinitionV3Service.js","sourceRoot":"","sources":["../../../../src/admin-api/client/services/DefinitionV3Service.ts"],"names":[],"mappings":"AASA,MAAM,OAAO,mBAAmB;IAC5B,YAA4B,WAA4B;QAA5B,gBAAW,GAAX,WAAW,CAAiB;IAAG,CAAC;IAC5D;;;;;;;;;OASG;IACI,yBAAyB,CAC5B,EAAW;QAEX,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,yBAAyB;YAC9B,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE;aACX;SACJ,CAAC,CAAC;IACP,CAAC;IACD;;;;;;;;;;;;;;;;;OAiBG;IACI,4BAA4B,CAC/B,EAAW,EACX,IAAiB;QAEjB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,yBAAyB;YAC9B,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE;gBACR,MAAM,EAAE,IAAI;aACf;YACD,MAAM,EAAE;gBACJ,GAAG,EAAE,qBAAqB;aAC7B;SACJ,CAAC,CAAC;IACP,CAAC;IACD;;;;;;OAMG;IACI,uBAAuB,CAC1B,KAAa,SAAS;QAEtB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,uBAAuB;YAC5B,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE;aACX;SACJ,CAAC,CAAC;IACP,CAAC;IACD;;;;;;;OAOG;IACI,wBAAwB,CAC3B,WAAqC,EACrC,KAAa,SAAS;QAEtB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,uBAAuB;YAC5B,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE;aACX;YACD,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;IACD;;;;;;;OAOG;IACI,uBAAuB,CAC1B,WAAqC,EACrC,KAAa,SAAS;QAEtB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,uBAAuB;YAC5B,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE;aACX;YACD,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;CACJ"}
1
+ {"version":3,"file":"DefinitionV3Service.js","sourceRoot":"","sources":["../../../../src/admin-api/client/services/DefinitionV3Service.ts"],"names":[],"mappings":"AAUA,MAAM,OAAO,mBAAmB;IAC5B,YAA4B,WAA4B;QAA5B,gBAAW,GAAX,WAAW,CAAiB;IAAG,CAAC;IAC5D;;;;;;;;;OASG;IACI,yBAAyB,CAC5B,EAAW;QAEX,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,yBAAyB;YAC9B,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE;aACX;SACJ,CAAC,CAAC;IACP,CAAC;IACD;;;;;;;;;;;;;;;;;OAiBG;IACI,4BAA4B,CAC/B,EAAW,EACX,IAAiB;QAEjB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,yBAAyB;YAC9B,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE;gBACR,MAAM,EAAE,IAAI;aACf;YACD,MAAM,EAAE;gBACJ,GAAG,EAAE,qBAAqB;aAC7B;SACJ,CAAC,CAAC;IACP,CAAC;IACD;;;;;;;OAOG;IACI,0BAA0B,CAC7B,EAAU,EACV,WAA2B;QAE3B,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,yBAAyB;YAC9B,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE;aACX;YACD,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;IACD;;;;;;OAMG;IACI,uBAAuB,CAC1B,KAAa,SAAS;QAEtB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,uBAAuB;YAC5B,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE;aACX;SACJ,CAAC,CAAC;IACP,CAAC;IACD;;;;;;;OAOG;IACI,wBAAwB,CAC3B,WAA6B,EAC7B,KAAa,SAAS;QAEtB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,uBAAuB;YAC5B,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE;aACX;YACD,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;IACD;;;;;;;OAOG;IACI,uBAAuB,CAC1B,WAA6B,EAC7B,KAAa,SAAS;QAEtB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,uBAAuB;YAC5B,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE;aACX;YACD,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;CACJ"}
@@ -1,6 +1,6 @@
1
1
  import { type OptimizelyGraphConfigInternal, type OptimizelyGraphConfig } from "../config.js";
2
2
  import { GraphQLClient } from "graphql-request";
3
- import { AuthMode, type RequestMethod, type IOptiGraphClient, type OptiGraphSiteInfo, type IOptiGraphClientFlags } from "./types.js";
3
+ import { AuthMode, type RequestMethod, type IOptiGraphClient, type OptiGraphSiteInfo, type IOptiGraphClientFlags, type OptiCmsSchema } from "./types.js";
4
4
  import { type FetchAPI } from "../hmac-fetch.js";
5
5
  export declare class ContentGraphClient extends GraphQLClient implements IOptiGraphClient {
6
6
  static readonly ForceHmacToken: string;
@@ -9,6 +9,7 @@ export declare class ContentGraphClient extends GraphQLClient implements IOptiGr
9
9
  private _token;
10
10
  private _hmacFetch;
11
11
  private _flags;
12
+ get currentOptiCmsSchema(): OptiCmsSchema;
12
13
  get debug(): boolean;
13
14
  protected get token(): string | undefined;
14
15
  protected set token(newValue: string | undefined);
@@ -10,6 +10,9 @@ const defaultFlags = {
10
10
  omitEmpty: false
11
11
  };
12
12
  export class ContentGraphClient extends GraphQLClient {
13
+ get currentOptiCmsSchema() {
14
+ return this._config.opti_cms_schema;
15
+ }
13
16
  get debug() {
14
17
  return this._config.debug ?? false;
15
18
  }