@prismicio/e2e-tests-utils 1.18.0 → 1.19.0-pr.37.21fc0dd

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 (159) hide show
  1. package/README.md +24 -27
  2. package/dist/_virtual/_rolldown/runtime.cjs +23 -0
  3. package/dist/clients/apiClient.cjs +38 -38
  4. package/dist/clients/apiClient.cjs.map +1 -1
  5. package/dist/clients/apiClient.d.cts +30 -0
  6. package/dist/clients/apiClient.d.cts.map +1 -0
  7. package/dist/clients/apiClient.d.ts +23 -23
  8. package/dist/clients/apiClient.d.ts.map +1 -0
  9. package/dist/clients/apiClient.js +38 -38
  10. package/dist/clients/apiClient.js.map +1 -1
  11. package/dist/clients/assetApi.cjs +81 -93
  12. package/dist/clients/assetApi.cjs.map +1 -1
  13. package/dist/clients/assetApi.d.cts +105 -0
  14. package/dist/clients/assetApi.d.cts.map +1 -0
  15. package/dist/clients/assetApi.d.ts +96 -97
  16. package/dist/clients/assetApi.d.ts.map +1 -0
  17. package/dist/clients/assetApi.js +79 -91
  18. package/dist/clients/assetApi.js.map +1 -1
  19. package/dist/clients/authenticationApi.cjs +66 -73
  20. package/dist/clients/authenticationApi.cjs.map +1 -1
  21. package/dist/clients/authenticationApi.d.cts +20 -0
  22. package/dist/clients/authenticationApi.d.cts.map +1 -0
  23. package/dist/clients/authenticationApi.d.ts +18 -13
  24. package/dist/clients/authenticationApi.d.ts.map +1 -0
  25. package/dist/clients/authenticationApi.js +65 -72
  26. package/dist/clients/authenticationApi.js.map +1 -1
  27. package/dist/clients/contentApi.cjs +94 -103
  28. package/dist/clients/contentApi.cjs.map +1 -1
  29. package/dist/clients/contentApi.d.cts +116 -0
  30. package/dist/clients/contentApi.d.cts.map +1 -0
  31. package/dist/clients/contentApi.d.ts +102 -98
  32. package/dist/clients/contentApi.d.ts.map +1 -0
  33. package/dist/clients/contentApi.js +94 -103
  34. package/dist/clients/contentApi.js.map +1 -1
  35. package/dist/clients/coreApi.cjs +154 -145
  36. package/dist/clients/coreApi.cjs.map +1 -1
  37. package/dist/clients/coreApi.d.cts +142 -0
  38. package/dist/clients/coreApi.d.cts.map +1 -0
  39. package/dist/clients/coreApi.d.ts +131 -109
  40. package/dist/clients/coreApi.d.ts.map +1 -0
  41. package/dist/clients/coreApi.js +153 -144
  42. package/dist/clients/coreApi.js.map +1 -1
  43. package/dist/clients/customTypesApi.cjs +90 -99
  44. package/dist/clients/customTypesApi.cjs.map +1 -1
  45. package/dist/clients/customTypesApi.d.cts +46 -0
  46. package/dist/clients/customTypesApi.d.cts.map +1 -0
  47. package/dist/clients/customTypesApi.d.ts +45 -45
  48. package/dist/clients/customTypesApi.d.ts.map +1 -0
  49. package/dist/clients/customTypesApi.js +87 -98
  50. package/dist/clients/customTypesApi.js.map +1 -1
  51. package/dist/clients/integrationFields.cjs +96 -87
  52. package/dist/clients/integrationFields.cjs.map +1 -1
  53. package/dist/clients/integrationFields.d.cts +30 -0
  54. package/dist/clients/integrationFields.d.cts.map +1 -0
  55. package/dist/clients/integrationFields.d.ts +27 -22
  56. package/dist/clients/integrationFields.d.ts.map +1 -0
  57. package/dist/clients/integrationFields.js +93 -86
  58. package/dist/clients/integrationFields.js.map +1 -1
  59. package/dist/clients/manageV2.cjs +154 -171
  60. package/dist/clients/manageV2.cjs.map +1 -1
  61. package/dist/clients/manageV2.d.cts +105 -0
  62. package/dist/clients/manageV2.d.cts.map +1 -0
  63. package/dist/clients/manageV2.d.ts +103 -111
  64. package/dist/clients/manageV2.d.ts.map +1 -0
  65. package/dist/clients/manageV2.js +149 -169
  66. package/dist/clients/manageV2.js.map +1 -1
  67. package/dist/clients/migrationApi.cjs +37 -36
  68. package/dist/clients/migrationApi.cjs.map +1 -1
  69. package/dist/clients/migrationApi.d.cts +48 -0
  70. package/dist/clients/migrationApi.d.cts.map +1 -0
  71. package/dist/clients/migrationApi.d.ts +45 -39
  72. package/dist/clients/migrationApi.d.ts.map +1 -0
  73. package/dist/clients/migrationApi.js +35 -34
  74. package/dist/clients/migrationApi.js.map +1 -1
  75. package/dist/clients/wroom.cjs +101 -122
  76. package/dist/clients/wroom.cjs.map +1 -1
  77. package/dist/clients/wroom.d.cts +48 -0
  78. package/dist/clients/wroom.d.cts.map +1 -0
  79. package/dist/clients/wroom.d.ts +46 -47
  80. package/dist/clients/wroom.d.ts.map +1 -0
  81. package/dist/clients/wroom.js +99 -122
  82. package/dist/clients/wroom.js.map +1 -1
  83. package/dist/index.cjs +13 -15
  84. package/dist/index.d.cts +8 -0
  85. package/dist/index.d.ts +8 -7
  86. package/dist/index.js +5 -14
  87. package/dist/managers/repositories.cjs +159 -169
  88. package/dist/managers/repositories.cjs.map +1 -1
  89. package/dist/managers/repositories.d.cts +67 -0
  90. package/dist/managers/repositories.d.cts.map +1 -0
  91. package/dist/managers/repositories.d.ts +56 -63
  92. package/dist/managers/repositories.d.ts.map +1 -0
  93. package/dist/managers/repositories.js +148 -159
  94. package/dist/managers/repositories.js.map +1 -1
  95. package/dist/managers/repository.cjs +592 -616
  96. package/dist/managers/repository.cjs.map +1 -1
  97. package/dist/managers/repository.d.cts +339 -0
  98. package/dist/managers/repository.d.cts.map +1 -0
  99. package/dist/managers/repository.d.ts +334 -307
  100. package/dist/managers/repository.d.ts.map +1 -0
  101. package/dist/managers/repository.js +592 -616
  102. package/dist/managers/repository.js.map +1 -1
  103. package/dist/types.d.cts +41 -0
  104. package/dist/types.d.cts.map +1 -0
  105. package/dist/types.d.ts +35 -37
  106. package/dist/types.d.ts.map +1 -0
  107. package/dist/utils/cookies.cjs +19 -17
  108. package/dist/utils/cookies.cjs.map +1 -1
  109. package/dist/utils/cookies.js +20 -18
  110. package/dist/utils/cookies.js.map +1 -1
  111. package/dist/utils/envVariableManager.cjs +33 -34
  112. package/dist/utils/envVariableManager.cjs.map +1 -1
  113. package/dist/utils/envVariableManager.js +34 -35
  114. package/dist/utils/envVariableManager.js.map +1 -1
  115. package/dist/utils/log.cjs +18 -19
  116. package/dist/utils/log.cjs.map +1 -1
  117. package/dist/utils/log.js +18 -21
  118. package/dist/utils/log.js.map +1 -1
  119. package/dist/utils/random.cjs +13 -6
  120. package/dist/utils/random.cjs.map +1 -1
  121. package/dist/utils/random.js +13 -6
  122. package/dist/utils/random.js.map +1 -1
  123. package/dist/utils/strings.cjs +13 -7
  124. package/dist/utils/strings.cjs.map +1 -1
  125. package/dist/utils/strings.js +14 -8
  126. package/dist/utils/strings.js.map +1 -1
  127. package/dist/utils/urls.cjs +21 -10
  128. package/dist/utils/urls.cjs.map +1 -1
  129. package/dist/utils/urls.js +22 -12
  130. package/dist/utils/urls.js.map +1 -1
  131. package/package.json +42 -67
  132. package/src/clients/apiClient.ts +16 -21
  133. package/src/clients/assetApi.ts +75 -82
  134. package/src/clients/authenticationApi.ts +54 -27
  135. package/src/clients/contentApi.ts +111 -129
  136. package/src/clients/coreApi.ts +165 -117
  137. package/src/clients/customTypesApi.ts +54 -74
  138. package/src/clients/integrationFields.ts +59 -74
  139. package/src/clients/manageV2.ts +72 -96
  140. package/src/clients/migrationApi.ts +35 -39
  141. package/src/clients/wroom.ts +42 -56
  142. package/src/index.ts +7 -7
  143. package/src/managers/repositories.ts +85 -108
  144. package/src/managers/repository.ts +394 -368
  145. package/src/types.ts +31 -31
  146. package/src/utils/cookies.ts +8 -8
  147. package/src/utils/envVariableManager.ts +15 -15
  148. package/src/utils/log.ts +17 -21
  149. package/src/utils/random.ts +5 -6
  150. package/src/utils/strings.ts +7 -9
  151. package/src/utils/urls.ts +10 -12
  152. package/dist/index.cjs.map +0 -1
  153. package/dist/index.js.map +0 -1
  154. package/dist/utils/cookies.d.ts +0 -8
  155. package/dist/utils/envVariableManager.d.ts +0 -16
  156. package/dist/utils/log.d.ts +0 -5
  157. package/dist/utils/random.d.ts +0 -8
  158. package/dist/utils/strings.d.ts +0 -11
  159. package/dist/utils/urls.d.ts +0 -16
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wroom.d.cts","names":[],"sources":["../../src/clients/wroom.ts"],"mappings":";;;;;cASa,WAAA;EAAA,iBAWM,IAAA;EAAA,iBAVD,MAAA;EAAA,QACT,QAAA;EASgB;;;;;cADvB,OAAA,UACiB,IAAA,EAAM,UAAA,EACvB,OAAA;EA8BD,UAAA;EA+De;EA1DT,GAAA,CAAI,UAAA,iBAA2B,IAAA,WAAe,OAAA,CAAQ,aAAA;EA2DzD;EA7CG,IAAA,CAAK,UAAA,iBAA2B,IAAA,UAAc,IAAA,aAAiB,OAAA,CAAQ,aAAA;EA6CnE;;;;;;;;EAnBJ,UAAA,CAAW,UAAA,UAAoB,KAAA,UAAe,IAAA,WAAe,OAAA,CAAQ,aAAA;EA7C3E;;;;;;;;EA4DM,kBAAA,CACL,UAAA,UACA,KAAA,UACA,YAAA,EAAc,MAAA,mBACZ,OAAA,CAAQ,aAAA;EA7CyC;;;;;EAAA,QAyDtC,KAAA;AAAA"}
@@ -1,49 +1,48 @@
1
+ import { AuthConfig } from "../types.js";
1
2
  import { AxiosResponse } from "axios";
2
- import { AuthConfig } from "../types";
3
- /**
4
- * Client for interacting with the Wroom service to perform operations on
5
- * repositories.
6
- */
7
- export declare class WroomClient {
8
- private readonly auth;
9
- private readonly client;
10
- private loggedIn;
11
- /**
12
- * @param baseURL - The base URL of the Wroom app. ex: https://prismic.io
13
- * @param auth - Authentication credentials.
14
- * @param cluster - Cluster where to create the repository (only work in
15
- * staging)
16
- */
17
- constructor(baseURL: string, auth: AuthConfig, cluster?: string);
18
- getBaseURL(): string;
19
- /** authenticated GET request on the wroom backend */
20
- get(repository: string | null, path: string): Promise<AxiosResponse>;
21
- /** authenticated POST request on the wroom backend */
22
- post(repository: string | null, path: string, data?: unknown): Promise<AxiosResponse>;
23
- /**
24
- * Update the role of a user in the repository
25
- *
26
- * @param {string} repository - The repository name
27
- * @param {string} email - The email of the user
28
- * @param {string} role - The new role to be given
29
- *
30
- * @returns The Axios Reponse
31
- */
32
- updateRole(repository: string, email: string, role: string): Promise<AxiosResponse>;
33
- /**
34
- * Update the role of a user in the repository
35
- *
36
- * @param {string} repository - The repository name
37
- * @param {string} email - The email of the user
38
- * @param {string} rolePerLocal - The role per local object
39
- *
40
- * @returns The Axios Reponse
41
- */
42
- updateRolePerLocal(repository: string, email: string, rolePerLocal: Record<string, string>): Promise<AxiosResponse>;
43
- /**
44
- * Authenticate Wroom to call Wroom unofficial endpoints.
45
- *
46
- * @throws Error if the login to Wroom fails.
47
- */
48
- private login;
3
+
4
+ //#region src/clients/wroom.d.ts
5
+ /** Client for interacting with the Wroom service to perform operations on repositories. */
6
+ declare class WroomClient {
7
+ private readonly auth;
8
+ private readonly client;
9
+ private loggedIn;
10
+ /**
11
+ * @param baseURL - The base URL of the Wroom app. ex: https://prismic.io
12
+ * @param auth - Authentication credentials.
13
+ * @param cluster - Cluster where to create the repository (only work in staging)
14
+ */
15
+ constructor(baseURL: string, auth: AuthConfig, cluster?: string);
16
+ getBaseURL(): string;
17
+ /** Authenticated GET request on the wroom backend */
18
+ get(repository: string | null, path: string): Promise<AxiosResponse>;
19
+ /** Authenticated POST request on the wroom backend */
20
+ post(repository: string | null, path: string, data?: unknown): Promise<AxiosResponse>;
21
+ /**
22
+ * Update the role of a user in the repository
23
+ *
24
+ * @param {string} repository - The repository name
25
+ * @param {string} email - The email of the user
26
+ * @param {string} role - The new role to be given
27
+ * @returns The Axios Reponse
28
+ */
29
+ updateRole(repository: string, email: string, role: string): Promise<AxiosResponse>;
30
+ /**
31
+ * Update the role of a user in the repository
32
+ *
33
+ * @param {string} repository - The repository name
34
+ * @param {string} email - The email of the user
35
+ * @param {string} rolePerLocal - The role per local object
36
+ * @returns The Axios Reponse
37
+ */
38
+ updateRolePerLocal(repository: string, email: string, rolePerLocal: Record<string, string>): Promise<AxiosResponse>;
39
+ /**
40
+ * Authenticate Wroom to call Wroom unofficial endpoints.
41
+ *
42
+ * @throws Error if the login to Wroom fails.
43
+ */
44
+ private login;
49
45
  }
46
+ //#endregion
47
+ export { WroomClient };
48
+ //# sourceMappingURL=wroom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wroom.d.ts","names":[],"sources":["../../src/clients/wroom.ts"],"mappings":";;;;;cASa,WAAA;EAAA,iBAWM,IAAA;EAAA,iBAVD,MAAA;EAAA,QACT,QAAA;EASgB;;;;;cADvB,OAAA,UACiB,IAAA,EAAM,UAAA,EACvB,OAAA;EA8BD,UAAA;EA+De;EA1DT,GAAA,CAAI,UAAA,iBAA2B,IAAA,WAAe,OAAA,CAAQ,aAAA;EA2DzD;EA7CG,IAAA,CAAK,UAAA,iBAA2B,IAAA,UAAc,IAAA,aAAiB,OAAA,CAAQ,aAAA;EA6CnE;;;;;;;;EAnBJ,UAAA,CAAW,UAAA,UAAoB,KAAA,UAAe,IAAA,WAAe,OAAA,CAAQ,aAAA;EA7C3E;;;;;;;;EA4DM,kBAAA,CACL,UAAA,UACA,KAAA,UACA,YAAA,EAAc,MAAA,mBACZ,OAAA,CAAQ,aAAA;EA7CyC;;;;;EAAA,QAyDtC,KAAA;AAAA"}
@@ -1,124 +1,101 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
- var __publicField = (obj, key, value) => {
4
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
- return value;
6
- };
7
- import axios from "axios";
8
- import { extractCookie } from "../utils/cookies.js";
9
- import { logger, logHttpResponse } from "../utils/log.js";
1
+ import { logHttpResponse, logger } from "../utils/log.js";
10
2
  import { getRepositoryUrl } from "../utils/urls.js";
11
- class WroomClient {
12
- /**
13
- * @param baseURL - The base URL of the Wroom app. ex: https://prismic.io
14
- * @param auth - Authentication credentials.
15
- * @param cluster - Cluster where to create the repository (only work in
16
- * staging)
17
- */
18
- constructor(baseURL, auth, cluster) {
19
- __publicField(this, "auth");
20
- __publicField(this, "client");
21
- __publicField(this, "loggedIn", false);
22
- this.auth = auth;
23
- const clusterHeader = cluster ? {
24
- "X-Prismic-Cluster": cluster
25
- } : {};
26
- this.client = axios.create({
27
- baseURL,
28
- withCredentials: true,
29
- validateStatus: () => true,
30
- xsrfCookieName: "X_XSRF",
31
- headers: {
32
- "User-Agent": "prismic-cli/prismic-e2e-tests-utils",
33
- ...clusterHeader
34
- }
35
- });
36
- this.client.interceptors.response.use((response) => {
37
- const cookies = response.headers["set-cookie"];
38
- if (cookies && extractCookie(cookies, "SESSION")) {
39
- this.client.defaults.headers["Cookie"] = cookies;
40
- }
41
- return response;
42
- });
43
- }
44
- getBaseURL() {
45
- return this.client.getUri();
46
- }
47
- /** authenticated GET request on the wroom backend */
48
- async get(repository, path) {
49
- if (!this.loggedIn) {
50
- await this.login();
51
- }
52
- let url = new URL(path, this.client.getUri()).toString();
53
- if (repository) {
54
- url = getRepositoryUrl(url, repository);
55
- }
56
- return this.client.get(url);
57
- }
58
- /** authenticated POST request on the wroom backend */
59
- async post(repository, path, data) {
60
- if (!this.loggedIn) {
61
- await this.login();
62
- }
63
- let url = new URL(path, this.client.getUri()).toString();
64
- if (repository) {
65
- url = getRepositoryUrl(url, repository);
66
- }
67
- const response = await this.client.post(url.toString(), data, {
68
- params: {
69
- _: extractCookie(this.client.defaults.headers["Cookie"], "X_XSRF")
70
- }
71
- });
72
- return response;
73
- }
74
- /**
75
- * Update the role of a user in the repository
76
- *
77
- * @param {string} repository - The repository name
78
- * @param {string} email - The email of the user
79
- * @param {string} role - The new role to be given
80
- *
81
- * @returns The Axios Reponse
82
- */
83
- async updateRole(repository, email, role) {
84
- const params = new URLSearchParams({ email, profile: role });
85
- const path = `/app/settings/users/profiles?${params.toString()}`;
86
- return this.post(repository, path);
87
- }
88
- /**
89
- * Update the role of a user in the repository
90
- *
91
- * @param {string} repository - The repository name
92
- * @param {string} email - The email of the user
93
- * @param {string} rolePerLocal - The role per local object
94
- *
95
- * @returns The Axios Reponse
96
- */
97
- async updateRolePerLocal(repository, email, rolePerLocal) {
98
- const params = new URLSearchParams({ email });
99
- const path = `/app/settings/users/rolesperlocale?${params.toString()}`;
100
- return this.post(repository, path, rolePerLocal);
101
- }
102
- /**
103
- * Authenticate Wroom to call Wroom unofficial endpoints.
104
- *
105
- * @throws Error if the login to Wroom fails.
106
- */
107
- async login() {
108
- const profiler = logger.startTimer();
109
- const response = await this.client.post("/authentication/signin", {
110
- email: this.auth.email,
111
- password: this.auth.password
112
- });
113
- if (response.status !== 200) {
114
- logHttpResponse(response);
115
- throw new Error("Could not login to Prismic, check your credentials");
116
- }
117
- this.loggedIn = true;
118
- profiler.done({ message: "logged in to Prismic" });
119
- }
120
- }
121
- export {
122
- WroomClient
3
+ import { extractCookie } from "../utils/cookies.js";
4
+ import axios from "axios";
5
+ //#region src/clients/wroom.ts
6
+ /** Client for interacting with the Wroom service to perform operations on repositories. */
7
+ var WroomClient = class {
8
+ auth;
9
+ client;
10
+ loggedIn = false;
11
+ /**
12
+ * @param baseURL - The base URL of the Wroom app. ex: https://prismic.io
13
+ * @param auth - Authentication credentials.
14
+ * @param cluster - Cluster where to create the repository (only work in staging)
15
+ */
16
+ constructor(baseURL, auth, cluster) {
17
+ this.auth = auth;
18
+ const clusterHeader = cluster ? { "X-Prismic-Cluster": cluster } : {};
19
+ this.client = axios.create({
20
+ baseURL,
21
+ withCredentials: true,
22
+ validateStatus: () => true,
23
+ xsrfCookieName: "X_XSRF",
24
+ headers: {
25
+ "User-Agent": "prismic-cli/prismic-e2e-tests-utils",
26
+ ...clusterHeader
27
+ }
28
+ });
29
+ this.client.interceptors.response.use((response) => {
30
+ const cookies = response.headers["set-cookie"];
31
+ if (cookies && extractCookie(cookies, "SESSION")) this.client.defaults.headers["Cookie"] = cookies;
32
+ return response;
33
+ });
34
+ }
35
+ getBaseURL() {
36
+ return this.client.getUri();
37
+ }
38
+ /** Authenticated GET request on the wroom backend */
39
+ async get(repository, path) {
40
+ if (!this.loggedIn) await this.login();
41
+ let url = new URL(path, this.client.getUri()).toString();
42
+ if (repository) url = getRepositoryUrl(url, repository);
43
+ return this.client.get(url);
44
+ }
45
+ /** Authenticated POST request on the wroom backend */
46
+ async post(repository, path, data) {
47
+ if (!this.loggedIn) await this.login();
48
+ let url = new URL(path, this.client.getUri()).toString();
49
+ if (repository) url = getRepositoryUrl(url, repository);
50
+ return await this.client.post(url.toString(), data, { params: { _: extractCookie(this.client.defaults.headers["Cookie"], "X_XSRF") } });
51
+ }
52
+ /**
53
+ * Update the role of a user in the repository
54
+ *
55
+ * @param {string} repository - The repository name
56
+ * @param {string} email - The email of the user
57
+ * @param {string} role - The new role to be given
58
+ * @returns The Axios Reponse
59
+ */
60
+ async updateRole(repository, email, role) {
61
+ const path = `/app/settings/users/profiles?${new URLSearchParams({
62
+ email,
63
+ profile: role
64
+ }).toString()}`;
65
+ return this.post(repository, path);
66
+ }
67
+ /**
68
+ * Update the role of a user in the repository
69
+ *
70
+ * @param {string} repository - The repository name
71
+ * @param {string} email - The email of the user
72
+ * @param {string} rolePerLocal - The role per local object
73
+ * @returns The Axios Reponse
74
+ */
75
+ async updateRolePerLocal(repository, email, rolePerLocal) {
76
+ const path = `/app/settings/users/rolesperlocale?${new URLSearchParams({ email }).toString()}`;
77
+ return this.post(repository, path, rolePerLocal);
78
+ }
79
+ /**
80
+ * Authenticate Wroom to call Wroom unofficial endpoints.
81
+ *
82
+ * @throws Error if the login to Wroom fails.
83
+ */
84
+ async login() {
85
+ const profiler = logger.startTimer();
86
+ const response = await this.client.post("/authentication/signin", {
87
+ email: this.auth.email,
88
+ password: this.auth.password
89
+ });
90
+ if (response.status !== 200) {
91
+ logHttpResponse(response);
92
+ throw new Error("Could not login to Prismic, check your credentials");
93
+ }
94
+ this.loggedIn = true;
95
+ profiler.done({ message: "logged in to Prismic" });
96
+ }
123
97
  };
124
- //# sourceMappingURL=wroom.js.map
98
+ //#endregion
99
+ export { WroomClient };
100
+
101
+ //# sourceMappingURL=wroom.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wroom.js","sources":["../../../src/clients/wroom.ts"],"sourcesContent":["import axios, { AxiosInstance, AxiosResponse } from \"axios\";\n\nimport { AuthConfig } from \"../types\";\n\nimport { extractCookie } from \"../utils/cookies\";\nimport { logHttpResponse, logger } from \"../utils/log\";\nimport { getRepositoryUrl } from \"../utils/urls\";\n\n/**\n * Client for interacting with the Wroom service to perform operations on\n * repositories.\n */\nexport class WroomClient {\n\tprivate readonly client: AxiosInstance;\n\tprivate loggedIn = false;\n\n\t/**\n\t * @param baseURL - The base URL of the Wroom app. ex: https://prismic.io\n\t * @param auth - Authentication credentials.\n\t * @param cluster - Cluster where to create the repository (only work in\n\t * staging)\n\t */\n\tconstructor(\n\t\tbaseURL: string,\n\t\tprivate readonly auth: AuthConfig,\n\t\tcluster?: string,\n\t) {\n\t\tconst clusterHeader = cluster\n\t\t\t? {\n\t\t\t\t\t\"X-Prismic-Cluster\": cluster,\n\t\t\t\t}\n\t\t\t: {};\n\n\t\tthis.client = axios.create({\n\t\t\tbaseURL,\n\t\t\twithCredentials: true,\n\t\t\tvalidateStatus: () => true,\n\t\t\txsrfCookieName: \"X_XSRF\",\n\t\t\theaders: {\n\t\t\t\t\"User-Agent\": \"prismic-cli/prismic-e2e-tests-utils\",\n\t\t\t\t...clusterHeader,\n\t\t\t},\n\t\t});\n\n\t\t// cookies are not forwarded automatically in a non-browser env\n\t\tthis.client.interceptors.response.use((response) => {\n\t\t\tconst cookies = response.headers[\"set-cookie\"];\n\t\t\tif (cookies && extractCookie(cookies, \"SESSION\")) {\n\t\t\t\tthis.client.defaults.headers[\"Cookie\"] = cookies;\n\t\t\t}\n\n\t\t\treturn response;\n\t\t});\n\t}\n\n\tgetBaseURL(): string {\n\t\treturn this.client.getUri();\n\t}\n\n\t/** authenticated GET request on the wroom backend */\n\tasync get(repository: string | null, path: string): Promise<AxiosResponse> {\n\t\tif (!this.loggedIn) {\n\t\t\tawait this.login();\n\t\t}\n\n\t\tlet url = new URL(path, this.client.getUri()).toString();\n\t\tif (repository) {\n\t\t\turl = getRepositoryUrl(url, repository);\n\t\t}\n\n\t\treturn this.client.get(url);\n\t}\n\n\t/** authenticated POST request on the wroom backend */\n\tasync post(\n\t\trepository: string | null,\n\t\tpath: string,\n\t\tdata?: unknown,\n\t): Promise<AxiosResponse> {\n\t\tif (!this.loggedIn) {\n\t\t\tawait this.login();\n\t\t}\n\n\t\tlet url = new URL(path, this.client.getUri()).toString();\n\t\tif (repository) {\n\t\t\turl = getRepositoryUrl(url, repository);\n\t\t}\n\t\tconst response = await this.client.post(url.toString(), data, {\n\t\t\tparams: {\n\t\t\t\t_: extractCookie(this.client.defaults.headers[\"Cookie\"], \"X_XSRF\"),\n\t\t\t},\n\t\t});\n\n\t\treturn response;\n\t}\n\n\t/**\n\t * Update the role of a user in the repository\n\t *\n\t * @param {string} repository - The repository name\n\t * @param {string} email - The email of the user\n\t * @param {string} role - The new role to be given\n\t *\n\t * @returns The Axios Reponse\n\t */\n\tasync updateRole(\n\t\trepository: string,\n\t\temail: string,\n\t\trole: string,\n\t): Promise<AxiosResponse> {\n\t\tconst params = new URLSearchParams({ email, profile: role });\n\t\tconst path = `/app/settings/users/profiles?${params.toString()}`;\n\n\t\treturn this.post(repository, path);\n\t}\n\n\t/**\n\t * Update the role of a user in the repository\n\t *\n\t * @param {string} repository - The repository name\n\t * @param {string} email - The email of the user\n\t * @param {string} rolePerLocal - The role per local object\n\t *\n\t * @returns The Axios Reponse\n\t */\n\tasync updateRolePerLocal(\n\t\trepository: string,\n\t\temail: string,\n\t\trolePerLocal: Record<string, string>,\n\t): Promise<AxiosResponse> {\n\t\tconst params = new URLSearchParams({ email });\n\t\tconst path = `/app/settings/users/rolesperlocale?${params.toString()}`;\n\n\t\treturn this.post(repository, path, rolePerLocal);\n\t}\n\n\t/**\n\t * Authenticate Wroom to call Wroom unofficial endpoints.\n\t *\n\t * @throws Error if the login to Wroom fails.\n\t */\n\tprivate async login(): Promise<void> {\n\t\tconst profiler = logger.startTimer();\n\t\tconst response = await this.client.post<string>(\"/authentication/signin\", {\n\t\t\temail: this.auth.email,\n\t\t\tpassword: this.auth.password,\n\t\t});\n\n\t\tif (response.status !== 200) {\n\t\t\tlogHttpResponse(response);\n\t\t\tthrow new Error(\"Could not login to Prismic, check your credentials\");\n\t\t}\n\t\tthis.loggedIn = true;\n\t\tprofiler.done({ message: \"logged in to Prismic\" });\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;MAYa,YAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUvB,YACC,SACiB,MACjB,SAAgB;AADC;AAXD;AACT,oCAAW;AAUD,SAAI,OAAJ;AAGjB,UAAM,gBAAgB,UACnB;AAAA,MACA,qBAAqB;AAAA,QAErB;AAEE,SAAA,SAAS,MAAM,OAAO;AAAA,MAC1B;AAAA,MACA,iBAAiB;AAAA,MACjB,gBAAgB,MAAM;AAAA,MACtB,gBAAgB;AAAA,MAChB,SAAS;AAAA,QACR,cAAc;AAAA,QACd,GAAG;AAAA,MACH;AAAA,IAAA,CACD;AAGD,SAAK,OAAO,aAAa,SAAS,IAAI,CAAC,aAAY;AAC5C,YAAA,UAAU,SAAS,QAAQ,YAAY;AAC7C,UAAI,WAAW,cAAc,SAAS,SAAS,GAAG;AACjD,aAAK,OAAO,SAAS,QAAQ,QAAQ,IAAI;AAAA,MAC1C;AAEO,aAAA;AAAA,IAAA,CACP;AAAA,EACF;AAAA,EAEA,aAAU;AACF,WAAA,KAAK,OAAO;EACpB;AAAA;AAAA,EAGA,MAAM,IAAI,YAA2B,MAAY;AAC5C,QAAA,CAAC,KAAK,UAAU;AACnB,YAAM,KAAK;IACZ;AAEI,QAAA,MAAM,IAAI,IAAI,MAAM,KAAK,OAAO,OAAA,CAAQ,EAAE;AAC9C,QAAI,YAAY;AACT,YAAA,iBAAiB,KAAK,UAAU;AAAA,IACvC;AAEO,WAAA,KAAK,OAAO,IAAI,GAAG;AAAA,EAC3B;AAAA;AAAA,EAGA,MAAM,KACL,YACA,MACA,MAAc;AAEV,QAAA,CAAC,KAAK,UAAU;AACnB,YAAM,KAAK;IACZ;AAEI,QAAA,MAAM,IAAI,IAAI,MAAM,KAAK,OAAO,OAAA,CAAQ,EAAE;AAC9C,QAAI,YAAY;AACT,YAAA,iBAAiB,KAAK,UAAU;AAAA,IACvC;AACM,UAAA,WAAW,MAAM,KAAK,OAAO,KAAK,IAAI,YAAY,MAAM;AAAA,MAC7D,QAAQ;AAAA,QACP,GAAG,cAAc,KAAK,OAAO,SAAS,QAAQ,QAAQ,GAAG,QAAQ;AAAA,MACjE;AAAA,IAAA,CACD;AAEM,WAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAM,WACL,YACA,OACA,MAAY;AAEZ,UAAM,SAAS,IAAI,gBAAgB,EAAE,OAAO,SAAS,MAAM;AAC3D,UAAM,OAAO,gCAAgC,OAAO,SAAA,CAAU;AAEvD,WAAA,KAAK,KAAK,YAAY,IAAI;AAAA,EAClC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAM,mBACL,YACA,OACA,cAAoC;AAEpC,UAAM,SAAS,IAAI,gBAAgB,EAAE,MAAO,CAAA;AAC5C,UAAM,OAAO,sCAAsC,OAAO,SAAA,CAAU;AAEpE,WAAO,KAAK,KAAK,YAAY,MAAM,YAAY;AAAA,EAChD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOQ,MAAM,QAAK;AACZ,UAAA,WAAW,OAAO;AACxB,UAAM,WAAW,MAAM,KAAK,OAAO,KAAa,0BAA0B;AAAA,MACzE,OAAO,KAAK,KAAK;AAAA,MACjB,UAAU,KAAK,KAAK;AAAA,IAAA,CACpB;AAEG,QAAA,SAAS,WAAW,KAAK;AAC5B,sBAAgB,QAAQ;AAClB,YAAA,IAAI,MAAM,oDAAoD;AAAA,IACrE;AACA,SAAK,WAAW;AAChB,aAAS,KAAK,EAAE,SAAS,uBAAwB,CAAA;AAAA,EAClD;AACA;"}
1
+ {"version":3,"file":"wroom.js","names":[],"sources":["../../src/clients/wroom.ts"],"sourcesContent":["import type { AxiosInstance, AxiosResponse } from \"axios\"\nimport axios from \"axios\"\n\nimport type { AuthConfig } from \"../types\"\nimport { extractCookie } from \"../utils/cookies\"\nimport { logHttpResponse, logger } from \"../utils/log\"\nimport { getRepositoryUrl } from \"../utils/urls\"\n\n/** Client for interacting with the Wroom service to perform operations on repositories. */\nexport class WroomClient {\n\tprivate readonly client: AxiosInstance\n\tprivate loggedIn = false\n\n\t/**\n\t * @param baseURL - The base URL of the Wroom app. ex: https://prismic.io\n\t * @param auth - Authentication credentials.\n\t * @param cluster - Cluster where to create the repository (only work in staging)\n\t */\n\tconstructor(\n\t\tbaseURL: string,\n\t\tprivate readonly auth: AuthConfig,\n\t\tcluster?: string,\n\t) {\n\t\tconst clusterHeader = cluster\n\t\t\t? {\n\t\t\t\t\t\"X-Prismic-Cluster\": cluster,\n\t\t\t\t}\n\t\t\t: {}\n\n\t\tthis.client = axios.create({\n\t\t\tbaseURL,\n\t\t\twithCredentials: true,\n\t\t\tvalidateStatus: () => true,\n\t\t\txsrfCookieName: \"X_XSRF\",\n\t\t\theaders: {\n\t\t\t\t\"User-Agent\": \"prismic-cli/prismic-e2e-tests-utils\",\n\t\t\t\t...clusterHeader,\n\t\t\t},\n\t\t})\n\n\t\t// cookies are not forwarded automatically in a non-browser env\n\t\tthis.client.interceptors.response.use((response) => {\n\t\t\tconst cookies = response.headers[\"set-cookie\"]\n\t\t\tif (cookies && extractCookie(cookies, \"SESSION\")) {\n\t\t\t\tthis.client.defaults.headers[\"Cookie\"] = cookies\n\t\t\t}\n\n\t\t\treturn response\n\t\t})\n\t}\n\n\tgetBaseURL(): string {\n\t\treturn this.client.getUri()\n\t}\n\n\t/** Authenticated GET request on the wroom backend */\n\tasync get(repository: string | null, path: string): Promise<AxiosResponse> {\n\t\tif (!this.loggedIn) {\n\t\t\tawait this.login()\n\t\t}\n\n\t\tlet url = new URL(path, this.client.getUri()).toString()\n\t\tif (repository) {\n\t\t\turl = getRepositoryUrl(url, repository)\n\t\t}\n\n\t\treturn this.client.get(url)\n\t}\n\n\t/** Authenticated POST request on the wroom backend */\n\tasync post(repository: string | null, path: string, data?: unknown): Promise<AxiosResponse> {\n\t\tif (!this.loggedIn) {\n\t\t\tawait this.login()\n\t\t}\n\n\t\tlet url = new URL(path, this.client.getUri()).toString()\n\t\tif (repository) {\n\t\t\turl = getRepositoryUrl(url, repository)\n\t\t}\n\t\tconst response = await this.client.post(url.toString(), data, {\n\t\t\tparams: {\n\t\t\t\t_: extractCookie(this.client.defaults.headers[\"Cookie\"], \"X_XSRF\"),\n\t\t\t},\n\t\t})\n\n\t\treturn response\n\t}\n\n\t/**\n\t * Update the role of a user in the repository\n\t *\n\t * @param {string} repository - The repository name\n\t * @param {string} email - The email of the user\n\t * @param {string} role - The new role to be given\n\t * @returns The Axios Reponse\n\t */\n\tasync updateRole(repository: string, email: string, role: string): Promise<AxiosResponse> {\n\t\tconst params = new URLSearchParams({ email, profile: role })\n\t\tconst path = `/app/settings/users/profiles?${params.toString()}`\n\n\t\treturn this.post(repository, path)\n\t}\n\n\t/**\n\t * Update the role of a user in the repository\n\t *\n\t * @param {string} repository - The repository name\n\t * @param {string} email - The email of the user\n\t * @param {string} rolePerLocal - The role per local object\n\t * @returns The Axios Reponse\n\t */\n\tasync updateRolePerLocal(\n\t\trepository: string,\n\t\temail: string,\n\t\trolePerLocal: Record<string, string>,\n\t): Promise<AxiosResponse> {\n\t\tconst params = new URLSearchParams({ email })\n\t\tconst path = `/app/settings/users/rolesperlocale?${params.toString()}`\n\n\t\treturn this.post(repository, path, rolePerLocal)\n\t}\n\n\t/**\n\t * Authenticate Wroom to call Wroom unofficial endpoints.\n\t *\n\t * @throws Error if the login to Wroom fails.\n\t */\n\tprivate async login(): Promise<void> {\n\t\tconst profiler = logger.startTimer()\n\t\tconst response = await this.client.post<string>(\"/authentication/signin\", {\n\t\t\temail: this.auth.email,\n\t\t\tpassword: this.auth.password,\n\t\t})\n\n\t\tif (response.status !== 200) {\n\t\t\tlogHttpResponse(response)\n\t\t\tthrow new Error(\"Could not login to Prismic, check your credentials\")\n\t\t}\n\t\tthis.loggedIn = true\n\t\tprofiler.done({ message: \"logged in to Prismic\" })\n\t}\n}\n"],"mappings":";;;;;;AASA,IAAa,cAAb,MAAyB;CAWN;CAVlB;CACA,WAAmB;;;;;;CAOnB,YACC,SACA,MACA,SACC;EAFgB,KAAA,OAAA;EAGjB,MAAM,gBAAgB,UACnB,EACA,qBAAqB,QACtB,IACC,CAAC;EAEJ,KAAK,SAAS,MAAM,OAAO;GAC1B;GACA,iBAAiB;GACjB,sBAAsB;GACtB,gBAAgB;GAChB,SAAS;IACR,cAAc;IACd,GAAG;GACJ;EACD,CAAC;EAGD,KAAK,OAAO,aAAa,SAAS,KAAK,aAAa;GACnD,MAAM,UAAU,SAAS,QAAQ;GACjC,IAAI,WAAW,cAAc,SAAS,SAAS,GAC9C,KAAK,OAAO,SAAS,QAAQ,YAAY;GAG1C,OAAO;EACR,CAAC;CACF;CAEA,aAAqB;EACpB,OAAO,KAAK,OAAO,OAAO;CAC3B;;CAGA,MAAM,IAAI,YAA2B,MAAsC;EAC1E,IAAI,CAAC,KAAK,UACT,MAAM,KAAK,MAAM;EAGlB,IAAI,MAAM,IAAI,IAAI,MAAM,KAAK,OAAO,OAAO,CAAC,CAAC,CAAC,SAAS;EACvD,IAAI,YACH,MAAM,iBAAiB,KAAK,UAAU;EAGvC,OAAO,KAAK,OAAO,IAAI,GAAG;CAC3B;;CAGA,MAAM,KAAK,YAA2B,MAAc,MAAwC;EAC3F,IAAI,CAAC,KAAK,UACT,MAAM,KAAK,MAAM;EAGlB,IAAI,MAAM,IAAI,IAAI,MAAM,KAAK,OAAO,OAAO,CAAC,CAAC,CAAC,SAAS;EACvD,IAAI,YACH,MAAM,iBAAiB,KAAK,UAAU;EAQvC,OAAO,MANgB,KAAK,OAAO,KAAK,IAAI,SAAS,GAAG,MAAM,EAC7D,QAAQ,EACP,GAAG,cAAc,KAAK,OAAO,SAAS,QAAQ,WAAW,QAAQ,EAClE,EACD,CAAC;CAGF;;;;;;;;;CAUA,MAAM,WAAW,YAAoB,OAAe,MAAsC;EAEzF,MAAM,OAAO,gCAAgC,IAD1B,gBAAgB;GAAE;GAAO,SAAS;EAAK,CACR,CAAC,CAAC,SAAS;EAE7D,OAAO,KAAK,KAAK,YAAY,IAAI;CAClC;;;;;;;;;CAUA,MAAM,mBACL,YACA,OACA,cACyB;EAEzB,MAAM,OAAO,sCAAsC,IADhC,gBAAgB,EAAE,MAAM,CACa,CAAC,CAAC,SAAS;EAEnE,OAAO,KAAK,KAAK,YAAY,MAAM,YAAY;CAChD;;;;;;CAOA,MAAc,QAAuB;EACpC,MAAM,WAAW,OAAO,WAAW;EACnC,MAAM,WAAW,MAAM,KAAK,OAAO,KAAa,0BAA0B;GACzE,OAAO,KAAK,KAAK;GACjB,UAAU,KAAK,KAAK;EACrB,CAAC;EAED,IAAI,SAAS,WAAW,KAAK;GAC5B,gBAAgB,QAAQ;GACxB,MAAM,IAAI,MAAM,oDAAoD;EACrE;EACA,KAAK,WAAW;EAChB,SAAS,KAAK,EAAE,SAAS,uBAAuB,CAAC;CAClD;AACD"}
package/dist/index.cjs CHANGED
@@ -1,16 +1,14 @@
1
- "use strict";
2
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const repositories = require("./managers/repositories.cjs");
4
- const repository = require("./managers/repository.cjs");
5
- const coreApi = require("./clients/coreApi.cjs");
6
- const contentApi = require("./clients/contentApi.cjs");
7
- const assetApi = require("./clients/assetApi.cjs");
8
- const migrationApi = require("./clients/migrationApi.cjs");
9
- exports.RepositoriesManager = repositories.RepositoriesManager;
10
- exports.createRepositoriesManager = repositories.createRepositoriesManager;
11
- exports.RepositoryManager = repository.RepositoryManager;
12
- exports.CoreApiClient = coreApi.CoreApiClient;
13
- exports.ContentApiClient = contentApi.ContentApiClient;
14
- exports.AssetApiClient = assetApi.AssetApiClient;
15
- exports.MigrationApiClient = migrationApi.MigrationApiClient;
16
- //# sourceMappingURL=index.cjs.map
2
+ const require_assetApi = require("./clients/assetApi.cjs");
3
+ const require_coreApi = require("./clients/coreApi.cjs");
4
+ const require_migrationApi = require("./clients/migrationApi.cjs");
5
+ const require_contentApi = require("./clients/contentApi.cjs");
6
+ const require_repository = require("./managers/repository.cjs");
7
+ const require_repositories = require("./managers/repositories.cjs");
8
+ exports.AssetApiClient = require_assetApi.AssetApiClient;
9
+ exports.ContentApiClient = require_contentApi.ContentApiClient;
10
+ exports.CoreApiClient = require_coreApi.CoreApiClient;
11
+ exports.MigrationApiClient = require_migrationApi.MigrationApiClient;
12
+ exports.RepositoriesManager = require_repositories.RepositoriesManager;
13
+ exports.RepositoryManager = require_repository.RepositoryManager;
14
+ exports.createRepositoriesManager = require_repositories.createRepositoriesManager;
@@ -0,0 +1,8 @@
1
+ import { AuthConfig, IntegrationFieldConfig, IntegrationFieldData, ManageV2Config, SetupConfiguration, UrlConfig } from "./types.cjs";
2
+ import { AssetApiClient, AssetApiCreatePayload, AssetApiCreateResponse, AssetApiResponse } from "./clients/assetApi.cjs";
3
+ import { ContentApiClient, ContentApiDocument, ContentApiError, ContentApiGraphQLResponse, ContentApiRef, ContentApiSearchResponse } from "./clients/contentApi.cjs";
4
+ import { CoreApiClient, CoreApiDocumentCreationPayload, CoreApiDocumentCreationResponse, CoreApiDocumentData, CoreApiDocumentUpdatePayload, CoreApiDocumentsPayload, CoreApiDocumentsResponse, CoreApiRepository, Release } from "./clients/coreApi.cjs";
5
+ import { MigrationApiClient, MigrationApiDocumentPayload, MigrationApiDocumentResponse } from "./clients/migrationApi.cjs";
6
+ import { CustomLocale, Preview, RepositoryConfig, RepositoryManager } from "./managers/repository.cjs";
7
+ import { RepositoriesManager, createRepositoriesManager } from "./managers/repositories.cjs";
8
+ export { AssetApiClient, AssetApiCreatePayload, AssetApiCreateResponse, AssetApiResponse, AuthConfig, ContentApiClient, ContentApiDocument, ContentApiError, ContentApiGraphQLResponse, ContentApiRef, ContentApiSearchResponse, CoreApiClient, CoreApiDocumentCreationPayload, CoreApiDocumentCreationResponse, CoreApiDocumentData, CoreApiDocumentUpdatePayload, CoreApiDocumentsPayload, CoreApiDocumentsResponse, CoreApiRepository, CustomLocale, IntegrationFieldConfig, IntegrationFieldData, ManageV2Config, MigrationApiClient, MigrationApiDocumentPayload, MigrationApiDocumentResponse, Preview, Release, RepositoriesManager, RepositoryConfig, RepositoryManager, SetupConfiguration, UrlConfig, createRepositoriesManager };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- export * from "./managers/repositories";
2
- export * from "./managers/repository";
3
- export * from "./clients/coreApi";
4
- export * from "./clients/contentApi";
5
- export * from "./clients/assetApi";
6
- export * from "./clients/migrationApi";
7
- export * from "./types";
1
+ import { AuthConfig, IntegrationFieldConfig, IntegrationFieldData, ManageV2Config, SetupConfiguration, UrlConfig } from "./types.js";
2
+ import { AssetApiClient, AssetApiCreatePayload, AssetApiCreateResponse, AssetApiResponse } from "./clients/assetApi.js";
3
+ import { ContentApiClient, ContentApiDocument, ContentApiError, ContentApiGraphQLResponse, ContentApiRef, ContentApiSearchResponse } from "./clients/contentApi.js";
4
+ import { CoreApiClient, CoreApiDocumentCreationPayload, CoreApiDocumentCreationResponse, CoreApiDocumentData, CoreApiDocumentUpdatePayload, CoreApiDocumentsPayload, CoreApiDocumentsResponse, CoreApiRepository, Release } from "./clients/coreApi.js";
5
+ import { MigrationApiClient, MigrationApiDocumentPayload, MigrationApiDocumentResponse } from "./clients/migrationApi.js";
6
+ import { CustomLocale, Preview, RepositoryConfig, RepositoryManager } from "./managers/repository.js";
7
+ import { RepositoriesManager, createRepositoriesManager } from "./managers/repositories.js";
8
+ export { AssetApiClient, AssetApiCreatePayload, AssetApiCreateResponse, AssetApiResponse, AuthConfig, ContentApiClient, ContentApiDocument, ContentApiError, ContentApiGraphQLResponse, ContentApiRef, ContentApiSearchResponse, CoreApiClient, CoreApiDocumentCreationPayload, CoreApiDocumentCreationResponse, CoreApiDocumentData, CoreApiDocumentUpdatePayload, CoreApiDocumentsPayload, CoreApiDocumentsResponse, CoreApiRepository, CustomLocale, IntegrationFieldConfig, IntegrationFieldData, ManageV2Config, MigrationApiClient, MigrationApiDocumentPayload, MigrationApiDocumentResponse, Preview, Release, RepositoriesManager, RepositoryConfig, RepositoryManager, SetupConfiguration, UrlConfig, createRepositoriesManager };
package/dist/index.js CHANGED
@@ -1,16 +1,7 @@
1
- import { RepositoriesManager, createRepositoriesManager } from "./managers/repositories.js";
2
- import { RepositoryManager } from "./managers/repository.js";
3
- import { CoreApiClient } from "./clients/coreApi.js";
4
- import { ContentApiClient } from "./clients/contentApi.js";
5
1
  import { AssetApiClient } from "./clients/assetApi.js";
2
+ import { CoreApiClient } from "./clients/coreApi.js";
6
3
  import { MigrationApiClient } from "./clients/migrationApi.js";
7
- export {
8
- AssetApiClient,
9
- ContentApiClient,
10
- CoreApiClient,
11
- MigrationApiClient,
12
- RepositoriesManager,
13
- RepositoryManager,
14
- createRepositoriesManager
15
- };
16
- //# sourceMappingURL=index.js.map
4
+ import { ContentApiClient } from "./clients/contentApi.js";
5
+ import { RepositoryManager } from "./managers/repository.js";
6
+ import { RepositoriesManager, createRepositoriesManager } from "./managers/repositories.js";
7
+ export { AssetApiClient, ContentApiClient, CoreApiClient, MigrationApiClient, RepositoriesManager, RepositoryManager, createRepositoriesManager };