@remkoj/optimizely-graph-client 5.1.1 → 6.0.0-pre2

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.
@@ -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.18.0',
14
+ VERSION: config?.VERSION ?? '3.20.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.18.0',
3
+ VERSION: '3.20.0',
4
4
  WITH_CREDENTIALS: false,
5
5
  CREDENTIALS: 'include',
6
6
  TOKEN: undefined,
@@ -34,6 +34,7 @@ export type { Record_string_any_ } from './models/Record_string_any_.js';
34
34
  export type { Record_string_string_ } from './models/Record_string_string_.js';
35
35
  export type { Request } from './models/Request.js';
36
36
  export type { RequestLog } from './models/RequestLog.js';
37
+ export { Slot } from './models/Slot.js';
37
38
  export type { SourceInfo } from './models/SourceInfo.js';
38
39
  export type { SourceInfoMap } from './models/SourceInfoMap.js';
39
40
  export type { SourceMetadata } from './models/SourceMetadata.js';
@@ -9,6 +9,7 @@ export { CancelablePromise, CancelError } from './core/CancelablePromise.js';
9
9
  export { OpenAPI } from './core/OpenAPI.js';
10
10
  export { DeleteMode } from './models/DeleteMode.js';
11
11
  export { Preset } from './models/Preset.js';
12
+ export { Slot } from './models/Slot.js';
12
13
  export { BestBetsService } from './services/BestBetsService.js';
13
14
  export { DefinitionV2Service } from './services/DefinitionV2Service.js';
14
15
  export { DefinitionV3Service } from './services/DefinitionV3Service.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;AAUpD,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
+ {"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;AAUpD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAU5C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAUxC,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"}
@@ -0,0 +1,4 @@
1
+ export declare enum Slot {
2
+ NEW = "new",
3
+ OLD = "old"
4
+ }
@@ -0,0 +1,10 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ export var Slot;
6
+ (function (Slot) {
7
+ Slot["NEW"] = "new";
8
+ Slot["OLD"] = "old";
9
+ })(Slot || (Slot = {}));
10
+ //# sourceMappingURL=Slot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Slot.js","sourceRoot":"","sources":["../../../../src/admin-api/client/models/Slot.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,0BAA0B;AAC1B,oBAAoB;AACpB,oBAAoB;AACpB,MAAM,CAAN,IAAY,IAGX;AAHD,WAAY,IAAI;IACZ,mBAAW,CAAA;IACX,mBAAW,CAAA;AACf,CAAC,EAHW,IAAI,KAAJ,IAAI,QAGf"}
@@ -1,5 +1,6 @@
1
1
  import type { ContentSource_V3 } from '../models/ContentSource_V3.js';
2
2
  import type { DeleteMode } from '../models/DeleteMode.js';
3
+ import type { Slot } from '../models/Slot.js';
3
4
  import type { SourceInfoMap } from '../models/SourceInfoMap.js';
4
5
  import type { SourceMetadata } from '../models/SourceMetadata.js';
5
6
  import type { CancelablePromise } from '../core/CancelablePromise.js';
@@ -14,10 +15,13 @@ export declare class DefinitionV3Service {
14
15
  * - _(empty): all sources_
15
16
  * - _**default**: only default source_
16
17
  * - _**src1**: only src1_
18
+ * @param slot The slot of the source _(optional)_
19
+ * - _(empty): old slot_
20
+ * - _**new**: new slot_
17
21
  * @returns SourceInfoMap Ok
18
22
  * @throws ApiError
19
23
  */
20
- getContentV3SourceHandler(id?: string): CancelablePromise<SourceInfoMap>;
24
+ getContentV3SourceHandler(id?: string, slot?: Slot): CancelablePromise<SourceInfoMap>;
21
25
  /**
22
26
  * Delete source
23
27
  * Delete content _types / data_ of the source
@@ -33,19 +37,25 @@ export declare class DefinitionV3Service {
33
37
  * | _**types**_ | _delete only types_ | _(delete)_ | |
34
38
  * | _**data**_ | _delete only data_ | | _(delete)_ |
35
39
  * | _**reset**_ | _reset data_ | _(delete)_ | _(reset)_ |
40
+ * @param slot The slot of the source _(optional)_
41
+ * - _(empty): old slot_
42
+ * - _**new**: new slot_
36
43
  * @returns any Source is deleted successfully
37
44
  * @throws ApiError
38
45
  */
39
- deleteContentV3SourceHandler(id?: string, mode?: DeleteMode): CancelablePromise<any>;
46
+ deleteContentV3SourceHandler(id?: string, mode?: DeleteMode, slot?: Slot): CancelablePromise<any>;
40
47
  /**
41
48
  * Update source metadata
42
49
  * Update `label`, `description` fields of the source
43
50
  * @param id The id of the source
44
51
  * @param requestBody The new metadata source
52
+ * @param slot The slot of the source _(optional)_
53
+ * - _(empty): old slot_
54
+ * - _**new**: new slot_
45
55
  * @returns void
46
56
  * @throws ApiError
47
57
  */
48
- postContentV3SourceHandler(id: string, requestBody: SourceMetadata): CancelablePromise<void>;
58
+ postContentV3SourceHandler(id: string, requestBody: SourceMetadata, slot?: Slot): CancelablePromise<void>;
49
59
  /**
50
60
  * Get content types
51
61
  * Get content types of the source
@@ -9,15 +9,19 @@ export class DefinitionV3Service {
9
9
  * - _(empty): all sources_
10
10
  * - _**default**: only default source_
11
11
  * - _**src1**: only src1_
12
+ * @param slot The slot of the source _(optional)_
13
+ * - _(empty): old slot_
14
+ * - _**new**: new slot_
12
15
  * @returns SourceInfoMap Ok
13
16
  * @throws ApiError
14
17
  */
15
- getContentV3SourceHandler(id) {
18
+ getContentV3SourceHandler(id, slot) {
16
19
  return this.httpRequest.request({
17
20
  method: 'GET',
18
21
  url: '/api/content/v3/sources',
19
22
  query: {
20
23
  'id': id,
24
+ 'slot': slot,
21
25
  },
22
26
  });
23
27
  }
@@ -36,16 +40,20 @@ export class DefinitionV3Service {
36
40
  * | _**types**_ | _delete only types_ | _(delete)_ | |
37
41
  * | _**data**_ | _delete only data_ | | _(delete)_ |
38
42
  * | _**reset**_ | _reset data_ | _(delete)_ | _(reset)_ |
43
+ * @param slot The slot of the source _(optional)_
44
+ * - _(empty): old slot_
45
+ * - _**new**: new slot_
39
46
  * @returns any Source is deleted successfully
40
47
  * @throws ApiError
41
48
  */
42
- deleteContentV3SourceHandler(id, mode) {
49
+ deleteContentV3SourceHandler(id, mode, slot) {
43
50
  return this.httpRequest.request({
44
51
  method: 'DELETE',
45
52
  url: '/api/content/v3/sources',
46
53
  query: {
47
54
  'id': id,
48
55
  'mode': mode,
56
+ 'slot': slot,
49
57
  },
50
58
  errors: {
51
59
  404: `Source is not found`,
@@ -57,15 +65,19 @@ export class DefinitionV3Service {
57
65
  * Update `label`, `description` fields of the source
58
66
  * @param id The id of the source
59
67
  * @param requestBody The new metadata source
68
+ * @param slot The slot of the source _(optional)_
69
+ * - _(empty): old slot_
70
+ * - _**new**: new slot_
60
71
  * @returns void
61
72
  * @throws ApiError
62
73
  */
63
- postContentV3SourceHandler(id, requestBody) {
74
+ postContentV3SourceHandler(id, requestBody, slot) {
64
75
  return this.httpRequest.request({
65
76
  method: 'POST',
66
77
  url: '/api/content/v3/sources',
67
78
  query: {
68
79
  'id': id,
80
+ 'slot': slot,
69
81
  },
70
82
  body: requestBody,
71
83
  mediaType: 'application/json',
@@ -1 +1 @@
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
+ {"version":3,"file":"DefinitionV3Service.js","sourceRoot":"","sources":["../../../../src/admin-api/client/services/DefinitionV3Service.ts"],"names":[],"mappings":"AAWA,MAAM,OAAO,mBAAmB;IAC5B,YAA4B,WAA4B;QAA5B,gBAAW,GAAX,WAAW,CAAiB;IAAG,CAAC;IAC5D;;;;;;;;;;;;OAYG;IACI,yBAAyB,CAC5B,EAAW,EACX,IAAW;QAEX,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,yBAAyB;YAC9B,KAAK,EAAE;gBACH,IAAI,EAAE,EAAE;gBACR,MAAM,EAAE,IAAI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,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"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@remkoj/optimizely-graph-client",
3
3
  "license": "Apache-2.0",
4
- "version": "5.1.1",
4
+ "version": "6.0.0-pre2",
5
5
  "repository": "https://github.com/remkoj/optimizely-dxp-clients.git",
6
6
  "author": "Remko Jantzen <693172+remkoj@users.noreply.github.com>",
7
7
  "homepage": "https://github.com/remkoj/optimizely-dxp-clients",
@@ -52,8 +52,6 @@
52
52
  "devDependencies": {
53
53
  "@types/crypto-js": "^4.2.2",
54
54
  "@types/node": "^22.16.2",
55
- "graphql": "^16.11.0",
56
- "graphql-request": "^6.1.0",
57
55
  "openapi-typescript-codegen": "^0.29.0",
58
56
  "prop-types": "^15.8.1",
59
57
  "scheduler": "^0.26.0",
@@ -61,11 +59,10 @@
61
59
  },
62
60
  "dependencies": {
63
61
  "crypto-js": "^4.2.0",
62
+ "graphql": "^16.11.0",
63
+ "graphql-request": "^7.2.0",
64
64
  "uuid": "^11.1.0"
65
65
  },
66
- "peerDependencies": {
67
- "graphql-request": "^6"
68
- },
69
66
  "scripts": {
70
67
  "clean": "tsc --build --clean",
71
68
  "compile-ts": "tsc --build",
@@ -73,5 +70,6 @@
73
70
  "watch": "yarn tsc --watch",
74
71
  "recompile": "tsc --build --clean && tsc --build --force",
75
72
  "generate": "openapi --input https://cg.optimizely.com/app/swagger/swagger.json --output ./src/admin-api/client --name OptimizelyGraphAdminApi && node ./scripts/update-imports.cjs"
76
- }
73
+ },
74
+ "stableVersion": "5.1.0"
77
75
  }