@webiny/sdk 5.45.0-beta.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 (51) hide show
  1. package/BaseError.d.ts +17 -0
  2. package/BaseError.js +10 -0
  3. package/BaseError.js.map +1 -0
  4. package/CmsSdk.d.ts +23 -0
  5. package/CmsSdk.js +36 -0
  6. package/CmsSdk.js.map +1 -0
  7. package/LICENSE +21 -0
  8. package/README.md +11 -0
  9. package/Result.d.ts +102 -0
  10. package/Result.js +143 -0
  11. package/Result.js.map +1 -0
  12. package/Webiny.d.ts +8 -0
  13. package/Webiny.js +11 -0
  14. package/Webiny.js.map +1 -0
  15. package/errors.d.ts +29 -0
  16. package/errors.js +43 -0
  17. package/errors.js.map +1 -0
  18. package/index.d.ts +13 -0
  19. package/index.js +11 -0
  20. package/index.js.map +1 -0
  21. package/methods/cms/cmsTypes.d.ts +82 -0
  22. package/methods/cms/cmsTypes.js +3 -0
  23. package/methods/cms/cmsTypes.js.map +1 -0
  24. package/methods/cms/createEntry.d.ts +67 -0
  25. package/methods/cms/createEntry.js +59 -0
  26. package/methods/cms/createEntry.js.map +1 -0
  27. package/methods/cms/deleteEntryRevision.d.ts +20 -0
  28. package/methods/cms/deleteEntryRevision.js +53 -0
  29. package/methods/cms/deleteEntryRevision.js.map +1 -0
  30. package/methods/cms/getEntry.d.ts +32 -0
  31. package/methods/cms/getEntry.js +60 -0
  32. package/methods/cms/getEntry.js.map +1 -0
  33. package/methods/cms/listEntries.d.ts +38 -0
  34. package/methods/cms/listEntries.js +90 -0
  35. package/methods/cms/listEntries.js.map +1 -0
  36. package/methods/cms/publishEntryRevision.d.ts +22 -0
  37. package/methods/cms/publishEntryRevision.js +54 -0
  38. package/methods/cms/publishEntryRevision.js.map +1 -0
  39. package/methods/cms/unpublishEntryRevision.d.ts +22 -0
  40. package/methods/cms/unpublishEntryRevision.js +54 -0
  41. package/methods/cms/unpublishEntryRevision.js.map +1 -0
  42. package/methods/cms/updateEntryRevision.d.ts +67 -0
  43. package/methods/cms/updateEntryRevision.js +62 -0
  44. package/methods/cms/updateEntryRevision.js.map +1 -0
  45. package/methods/executeGraphQL.d.ts +4 -0
  46. package/methods/executeGraphQL.js +40 -0
  47. package/methods/executeGraphQL.js.map +1 -0
  48. package/package.json +25 -0
  49. package/types.d.ts +6 -0
  50. package/types.js +3 -0
  51. package/types.js.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Result","unpublishEntryRevision","config","fetchFn","params","modelId","revisionId","fields","executeGraphQL","query","result","isFail","data","value","cms","error","GraphQLError","fail","message","code","ok"],"sources":["unpublishEntryRevision.ts"],"sourcesContent":["import type { WebinyConfig } from \"../../types.js\";\nimport { Result } from \"../../Result.js\";\nimport type { HttpError, GraphQLError, NetworkError } from \"../../errors.js\";\nimport type { CmsEntryValues, CmsEntryData } from \"./cmsTypes.js\";\n\nexport interface UnpublishEntryRevisionParams {\n modelId: string;\n revisionId: string;\n fields: string[];\n}\n\n/**\n * Unpublishes an entry revision in the CMS.\n *\n * @template TValues - Type of the entry values object\n * @param config - SDK configuration\n * @param fetchFn - Fetch function to use for HTTP requests\n * @param params - Parameters for unpublishing the entry revision\n * @param params.modelId - The model ID of the entry to unpublish\n * @param params.revisionId - The revision ID of the entry to unpublish (e.g., \"123#0001\")\n * @param params.fields - Fields to include in response. Use \"values.\" prefix for entry values (e.g., \"values.author.name\")\n * @returns Result containing the unpublished entry data or an error\n */\nexport async function unpublishEntryRevision<TValues extends CmsEntryValues = CmsEntryValues>(\n config: WebinyConfig,\n fetchFn: typeof fetch,\n params: UnpublishEntryRevisionParams\n): Promise<Result<CmsEntryData<TValues>, HttpError | GraphQLError | NetworkError>> {\n const { modelId, revisionId, fields } = params;\n\n const { executeGraphQL } = await import(\"../executeGraphQL.js\");\n\n const query = `\n mutation UnpublishEntryRevision($modelId: ID!, $revisionId: ID!, $fields: [String!]!) {\n cms {\n unpublishEntryRevision(modelId: $modelId, revisionId: $revisionId, fields: $fields) {\n data\n error {\n message\n code\n }\n }\n }\n }\n `;\n\n const result = await executeGraphQL(config, fetchFn, query, { modelId, revisionId, fields });\n\n if (result.isFail()) {\n return result;\n }\n\n const data = result.value;\n\n if (data.cms.unpublishEntryRevision.error) {\n const { GraphQLError } = await import(\"../../errors.js\");\n return Result.fail(\n new GraphQLError(\n data.cms.unpublishEntryRevision.error.message,\n data.cms.unpublishEntryRevision.error.code\n )\n );\n }\n\n return Result.ok(data.cms.unpublishEntryRevision.data);\n}\n"],"mappings":"AACA,SAASA,MAAM;AAUf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,sBAAsBA,CACxCC,MAAoB,EACpBC,OAAqB,EACrBC,MAAoC,EAC2C;EAC/E,MAAM;IAAEC,OAAO;IAAEC,UAAU;IAAEC;EAAO,CAAC,GAAGH,MAAM;EAE9C,MAAM;IAAEI;EAAe,CAAC,GAAG,MAAM,MAAM,uBAAuB,CAAC;EAE/D,MAAMC,KAAK,GAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;EAED,MAAMC,MAAM,GAAG,MAAMF,cAAc,CAACN,MAAM,EAAEC,OAAO,EAAEM,KAAK,EAAE;IAAEJ,OAAO;IAAEC,UAAU;IAAEC;EAAO,CAAC,CAAC;EAE5F,IAAIG,MAAM,CAACC,MAAM,CAAC,CAAC,EAAE;IACjB,OAAOD,MAAM;EACjB;EAEA,MAAME,IAAI,GAAGF,MAAM,CAACG,KAAK;EAEzB,IAAID,IAAI,CAACE,GAAG,CAACb,sBAAsB,CAACc,KAAK,EAAE;IACvC,MAAM;MAAEC;IAAa,CAAC,GAAG,MAAM,MAAM,kBAAkB,CAAC;IACxD,OAAOhB,MAAM,CAACiB,IAAI,CACd,IAAID,YAAY,CACZJ,IAAI,CAACE,GAAG,CAACb,sBAAsB,CAACc,KAAK,CAACG,OAAO,EAC7CN,IAAI,CAACE,GAAG,CAACb,sBAAsB,CAACc,KAAK,CAACI,IAC1C,CACJ,CAAC;EACL;EAEA,OAAOnB,MAAM,CAACoB,EAAE,CAACR,IAAI,CAACE,GAAG,CAACb,sBAAsB,CAACW,IAAI,CAAC;AAC1D","ignoreList":[]}
@@ -0,0 +1,67 @@
1
+ import type { WebinyConfig } from "../../types.js";
2
+ import { Result } from "../../Result.js";
3
+ import type { HttpError, GraphQLError, NetworkError } from "../../errors.js";
4
+ import type { CmsEntryValues, CmsIdentity } from "./cmsTypes.js";
5
+ /**
6
+ * Update entry revision data.
7
+ */
8
+ export interface UpdateCmsEntryData<TValues extends CmsEntryValues = CmsEntryValues> {
9
+ /**
10
+ * Revision-level meta fields.
11
+ */
12
+ revisionCreatedOn?: Date | string | null;
13
+ revisionModifiedOn?: Date | string | null;
14
+ revisionSavedOn?: Date | string | null;
15
+ revisionDeletedOn?: Date | string | null;
16
+ revisionRestoredOn?: Date | string | null;
17
+ revisionFirstPublishedOn?: Date | string | null;
18
+ revisionLastPublishedOn?: Date | string | null;
19
+ revisionModifiedBy?: CmsIdentity | null;
20
+ revisionCreatedBy?: CmsIdentity | null;
21
+ revisionSavedBy?: CmsIdentity | null;
22
+ revisionDeletedBy?: CmsIdentity | null;
23
+ revisionRestoredBy?: CmsIdentity | null;
24
+ revisionFirstPublishedBy?: CmsIdentity | null;
25
+ revisionLastPublishedBy?: CmsIdentity | null;
26
+ /**
27
+ * Entry-level meta fields.
28
+ */
29
+ createdOn?: Date | string | null;
30
+ modifiedOn?: Date | string | null;
31
+ savedOn?: Date | string | null;
32
+ deletedOn?: Date | string | null;
33
+ restoredOn?: Date | string | null;
34
+ firstPublishedOn?: Date | string | null;
35
+ lastPublishedOn?: Date | string | null;
36
+ createdBy?: CmsIdentity | null;
37
+ modifiedBy?: CmsIdentity | null;
38
+ savedBy?: CmsIdentity | null;
39
+ deletedBy?: CmsIdentity | null;
40
+ restoredBy?: CmsIdentity | null;
41
+ firstPublishedBy?: CmsIdentity | null;
42
+ lastPublishedBy?: CmsIdentity | null;
43
+ location?: {
44
+ folderId?: string | null;
45
+ };
46
+ values?: Partial<TValues>;
47
+ }
48
+ export interface UpdateEntryRevisionParams<TValues extends CmsEntryValues = CmsEntryValues> {
49
+ modelId: string;
50
+ revisionId: string;
51
+ data: UpdateCmsEntryData<TValues>;
52
+ fields: string[];
53
+ }
54
+ /**1`
55
+ * Updates an existing entry revision in the CMS.
56
+ *
57
+ * @template TValues - Type of the entry data object returned (typically contains id and entryId, or additional fields if specified)
58
+ * @param config - SDK configuration
59
+ * @param fetchFn - Fetch function to use for HTTP requests
60
+ * @param params - Parameters for updating the entry revision
61
+ * @param params.modelId - The model ID for the entry
62
+ * @param params.revisionId - The revision ID of the entry to update (e.g., "123#0001")
63
+ * @param params.data - The updated entry data
64
+ * @param params.fields - Fields to include in the response. Use "values." prefix for entry values (e.g., "values.author.name") or specify top-level fields like "createdOn"
65
+ * @returns Result containing the updated entry data or an error
66
+ */
67
+ export declare function updateEntryRevision<TValues extends CmsEntryValues = CmsEntryValues>(config: WebinyConfig, fetchFn: typeof fetch, params: UpdateEntryRevisionParams<TValues>): Promise<Result<UpdateCmsEntryData<TValues>, HttpError | GraphQLError | NetworkError>>;
@@ -0,0 +1,62 @@
1
+ import { Result } from "../../Result.js";
2
+
3
+ /**
4
+ * Update entry revision data.
5
+ */
6
+
7
+ /**1`
8
+ * Updates an existing entry revision in the CMS.
9
+ *
10
+ * @template TValues - Type of the entry data object returned (typically contains id and entryId, or additional fields if specified)
11
+ * @param config - SDK configuration
12
+ * @param fetchFn - Fetch function to use for HTTP requests
13
+ * @param params - Parameters for updating the entry revision
14
+ * @param params.modelId - The model ID for the entry
15
+ * @param params.revisionId - The revision ID of the entry to update (e.g., "123#0001")
16
+ * @param params.data - The updated entry data
17
+ * @param params.fields - Fields to include in the response. Use "values." prefix for entry values (e.g., "values.author.name") or specify top-level fields like "createdOn"
18
+ * @returns Result containing the updated entry data or an error
19
+ */
20
+ export async function updateEntryRevision(config, fetchFn, params) {
21
+ const {
22
+ modelId,
23
+ revisionId,
24
+ data,
25
+ fields
26
+ } = params;
27
+ const {
28
+ executeGraphQL
29
+ } = await import("../executeGraphQL.js");
30
+ const query = `
31
+ mutation UpdateEntryRevision($modelId: ID!, $revisionId: ID!, $data: JSON!, $fields: [String!]!) {
32
+ cms {
33
+ updateEntryRevision(modelId: $modelId, revisionId: $revisionId, data: $data, fields: $fields) {
34
+ data
35
+ error {
36
+ message
37
+ code
38
+ }
39
+ }
40
+ }
41
+ }
42
+ `;
43
+ const result = await executeGraphQL(config, fetchFn, query, {
44
+ modelId,
45
+ revisionId,
46
+ data,
47
+ fields
48
+ });
49
+ if (result.isFail()) {
50
+ return Result.fail(result.error);
51
+ }
52
+ const responseData = result.value;
53
+ if (responseData.cms.updateEntryRevision.error) {
54
+ const {
55
+ GraphQLError
56
+ } = await import("../../errors.js");
57
+ return Result.fail(new GraphQLError(responseData.cms.updateEntryRevision.error.message, responseData.cms.updateEntryRevision.error.code));
58
+ }
59
+ return Result.ok(responseData.cms.updateEntryRevision.data);
60
+ }
61
+
62
+ //# sourceMappingURL=updateEntryRevision.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Result","updateEntryRevision","config","fetchFn","params","modelId","revisionId","data","fields","executeGraphQL","query","result","isFail","fail","error","responseData","value","cms","GraphQLError","message","code","ok"],"sources":["updateEntryRevision.ts"],"sourcesContent":["import type { WebinyConfig } from \"../../types.js\";\nimport { Result } from \"../../Result.js\";\nimport type { HttpError, GraphQLError, NetworkError } from \"../../errors.js\";\nimport type { CmsEntryValues, CmsIdentity } from \"./cmsTypes.js\";\n\n/**\n * Update entry revision data.\n */\nexport interface UpdateCmsEntryData<TValues extends CmsEntryValues = CmsEntryValues> {\n /**\n * Revision-level meta fields.\n */\n revisionCreatedOn?: Date | string | null;\n revisionModifiedOn?: Date | string | null;\n revisionSavedOn?: Date | string | null;\n revisionDeletedOn?: Date | string | null;\n revisionRestoredOn?: Date | string | null;\n revisionFirstPublishedOn?: Date | string | null;\n revisionLastPublishedOn?: Date | string | null;\n revisionModifiedBy?: CmsIdentity | null;\n revisionCreatedBy?: CmsIdentity | null;\n revisionSavedBy?: CmsIdentity | null;\n revisionDeletedBy?: CmsIdentity | null;\n revisionRestoredBy?: CmsIdentity | null;\n revisionFirstPublishedBy?: CmsIdentity | null;\n revisionLastPublishedBy?: CmsIdentity | null;\n\n /**\n * Entry-level meta fields.\n */\n createdOn?: Date | string | null;\n modifiedOn?: Date | string | null;\n savedOn?: Date | string | null;\n deletedOn?: Date | string | null;\n restoredOn?: Date | string | null;\n firstPublishedOn?: Date | string | null;\n lastPublishedOn?: Date | string | null;\n createdBy?: CmsIdentity | null;\n modifiedBy?: CmsIdentity | null;\n savedBy?: CmsIdentity | null;\n deletedBy?: CmsIdentity | null;\n restoredBy?: CmsIdentity | null;\n firstPublishedBy?: CmsIdentity | null;\n lastPublishedBy?: CmsIdentity | null;\n\n location?: {\n folderId?: string | null;\n };\n\n values?: Partial<TValues>;\n}\n\nexport interface UpdateEntryRevisionParams<TValues extends CmsEntryValues = CmsEntryValues> {\n modelId: string;\n revisionId: string;\n data: UpdateCmsEntryData<TValues>;\n fields: string[];\n}\n\n/**1`\n * Updates an existing entry revision in the CMS.\n *\n * @template TValues - Type of the entry data object returned (typically contains id and entryId, or additional fields if specified)\n * @param config - SDK configuration\n * @param fetchFn - Fetch function to use for HTTP requests\n * @param params - Parameters for updating the entry revision\n * @param params.modelId - The model ID for the entry\n * @param params.revisionId - The revision ID of the entry to update (e.g., \"123#0001\")\n * @param params.data - The updated entry data\n * @param params.fields - Fields to include in the response. Use \"values.\" prefix for entry values (e.g., \"values.author.name\") or specify top-level fields like \"createdOn\"\n * @returns Result containing the updated entry data or an error\n */\nexport async function updateEntryRevision<TValues extends CmsEntryValues = CmsEntryValues>(\n config: WebinyConfig,\n fetchFn: typeof fetch,\n params: UpdateEntryRevisionParams<TValues>\n): Promise<Result<UpdateCmsEntryData<TValues>, HttpError | GraphQLError | NetworkError>> {\n const { modelId, revisionId, data, fields } = params;\n\n const { executeGraphQL } = await import(\"../executeGraphQL.js\");\n\n const query = `\n mutation UpdateEntryRevision($modelId: ID!, $revisionId: ID!, $data: JSON!, $fields: [String!]!) {\n cms {\n updateEntryRevision(modelId: $modelId, revisionId: $revisionId, data: $data, fields: $fields) {\n data\n error {\n message\n code\n }\n }\n }\n }\n `;\n\n const result = await executeGraphQL(config, fetchFn, query, {\n modelId,\n revisionId,\n data,\n fields\n });\n\n if (result.isFail()) {\n return Result.fail(result.error);\n }\n\n const responseData = result.value;\n\n if (responseData.cms.updateEntryRevision.error) {\n const { GraphQLError } = await import(\"../../errors.js\");\n return Result.fail(\n new GraphQLError(\n responseData.cms.updateEntryRevision.error.message,\n responseData.cms.updateEntryRevision.error.code\n )\n );\n }\n\n return Result.ok(responseData.cms.updateEntryRevision.data);\n}\n"],"mappings":"AACA,SAASA,MAAM;;AAIf;AACA;AACA;;AAoDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,mBAAmBA,CACrCC,MAAoB,EACpBC,OAAqB,EACrBC,MAA0C,EAC2C;EACrF,MAAM;IAAEC,OAAO;IAAEC,UAAU;IAAEC,IAAI;IAAEC;EAAO,CAAC,GAAGJ,MAAM;EAEpD,MAAM;IAAEK;EAAe,CAAC,GAAG,MAAM,MAAM,uBAAuB,CAAC;EAE/D,MAAMC,KAAK,GAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;EAED,MAAMC,MAAM,GAAG,MAAMF,cAAc,CAACP,MAAM,EAAEC,OAAO,EAAEO,KAAK,EAAE;IACxDL,OAAO;IACPC,UAAU;IACVC,IAAI;IACJC;EACJ,CAAC,CAAC;EAEF,IAAIG,MAAM,CAACC,MAAM,CAAC,CAAC,EAAE;IACjB,OAAOZ,MAAM,CAACa,IAAI,CAACF,MAAM,CAACG,KAAK,CAAC;EACpC;EAEA,MAAMC,YAAY,GAAGJ,MAAM,CAACK,KAAK;EAEjC,IAAID,YAAY,CAACE,GAAG,CAAChB,mBAAmB,CAACa,KAAK,EAAE;IAC5C,MAAM;MAAEI;IAAa,CAAC,GAAG,MAAM,MAAM,kBAAkB,CAAC;IACxD,OAAOlB,MAAM,CAACa,IAAI,CACd,IAAIK,YAAY,CACZH,YAAY,CAACE,GAAG,CAAChB,mBAAmB,CAACa,KAAK,CAACK,OAAO,EAClDJ,YAAY,CAACE,GAAG,CAAChB,mBAAmB,CAACa,KAAK,CAACM,IAC/C,CACJ,CAAC;EACL;EAEA,OAAOpB,MAAM,CAACqB,EAAE,CAACN,YAAY,CAACE,GAAG,CAAChB,mBAAmB,CAACM,IAAI,CAAC;AAC/D","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ import type { WebinyConfig } from "../types.js";
2
+ import { Result } from "../Result.js";
3
+ import { HttpError, GraphQLError, NetworkError } from "../errors.js";
4
+ export declare function executeGraphQL(config: WebinyConfig, fetchFn: typeof fetch, query: string, variables?: Record<string, unknown>): Promise<Result<any, HttpError | GraphQLError | NetworkError>>;
@@ -0,0 +1,40 @@
1
+ import { Result } from "../Result.js";
2
+ import { HttpError, GraphQLError, NetworkError } from "../errors.js";
3
+ export async function executeGraphQL(config, fetchFn, query, variables = {}) {
4
+ const url = `${config.endpoint}/graphql`;
5
+ let response;
6
+ try {
7
+ const body = JSON.stringify({
8
+ query,
9
+ variables
10
+ });
11
+ response = await fetchFn(url, {
12
+ method: "POST",
13
+ headers: {
14
+ "Content-Type": "application/json",
15
+ Authorization: `Bearer ${config.token}`,
16
+ "x-tenant": config.tenant,
17
+ "x-webiny-sdk": "v6"
18
+ },
19
+ body
20
+ });
21
+ } catch (error) {
22
+ return Result.fail(new NetworkError(error instanceof Error ? error.message : "Network request failed"));
23
+ }
24
+ if (!response.ok) {
25
+ return Result.fail(new HttpError(response.status, `HTTP error! status: ${response.status}`));
26
+ }
27
+ let result;
28
+ try {
29
+ result = await response.json();
30
+ } catch {
31
+ return Result.fail(new NetworkError("Failed to parse response JSON"));
32
+ }
33
+ if (result.errors) {
34
+ const error = result.errors[0];
35
+ return Result.fail(new GraphQLError(error?.message || "GraphQL error", error?.code));
36
+ }
37
+ return Result.ok(result.data);
38
+ }
39
+
40
+ //# sourceMappingURL=executeGraphQL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Result","HttpError","GraphQLError","NetworkError","executeGraphQL","config","fetchFn","query","variables","url","endpoint","response","body","JSON","stringify","method","headers","Authorization","token","tenant","error","fail","Error","message","ok","status","result","json","errors","code","data"],"sources":["executeGraphQL.ts"],"sourcesContent":["import type { WebinyConfig } from \"../types.js\";\nimport { Result } from \"../Result.js\";\nimport { HttpError, GraphQLError, NetworkError } from \"../errors.js\";\n\nexport async function executeGraphQL(\n config: WebinyConfig,\n fetchFn: typeof fetch,\n query: string,\n variables: Record<string, unknown> = {}\n): Promise<Result<any, HttpError | GraphQLError | NetworkError>> {\n const url = `${config.endpoint}/graphql`;\n\n let response: Response;\n\n try {\n const body = JSON.stringify({ query, variables });\n\n response = await fetchFn(url, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Bearer ${config.token}`,\n \"x-tenant\": config.tenant,\n \"x-webiny-sdk\": \"v6\"\n },\n body\n });\n } catch (error) {\n return Result.fail(\n new NetworkError(error instanceof Error ? error.message : \"Network request failed\")\n );\n }\n\n if (!response.ok) {\n return Result.fail(\n new HttpError(response.status, `HTTP error! status: ${response.status}`)\n );\n }\n\n let result: any;\n try {\n result = await response.json();\n } catch {\n return Result.fail(new NetworkError(\"Failed to parse response JSON\"));\n }\n\n if (result.errors) {\n const error = result.errors[0];\n return Result.fail(new GraphQLError(error?.message || \"GraphQL error\", error?.code));\n }\n\n return Result.ok(result.data);\n}\n"],"mappings":"AACA,SAASA,MAAM;AACf,SAASC,SAAS,EAAEC,YAAY,EAAEC,YAAY;AAE9C,OAAO,eAAeC,cAAcA,CAChCC,MAAoB,EACpBC,OAAqB,EACrBC,KAAa,EACbC,SAAkC,GAAG,CAAC,CAAC,EACsB;EAC7D,MAAMC,GAAG,GAAG,GAAGJ,MAAM,CAACK,QAAQ,UAAU;EAExC,IAAIC,QAAkB;EAEtB,IAAI;IACA,MAAMC,IAAI,GAAGC,IAAI,CAACC,SAAS,CAAC;MAAEP,KAAK;MAAEC;IAAU,CAAC,CAAC;IAEjDG,QAAQ,GAAG,MAAML,OAAO,CAACG,GAAG,EAAE;MAC1BM,MAAM,EAAE,MAAM;MACdC,OAAO,EAAE;QACL,cAAc,EAAE,kBAAkB;QAClCC,aAAa,EAAE,UAAUZ,MAAM,CAACa,KAAK,EAAE;QACvC,UAAU,EAAEb,MAAM,CAACc,MAAM;QACzB,cAAc,EAAE;MACpB,CAAC;MACDP;IACJ,CAAC,CAAC;EACN,CAAC,CAAC,OAAOQ,KAAK,EAAE;IACZ,OAAOpB,MAAM,CAACqB,IAAI,CACd,IAAIlB,YAAY,CAACiB,KAAK,YAAYE,KAAK,GAAGF,KAAK,CAACG,OAAO,GAAG,wBAAwB,CACtF,CAAC;EACL;EAEA,IAAI,CAACZ,QAAQ,CAACa,EAAE,EAAE;IACd,OAAOxB,MAAM,CAACqB,IAAI,CACd,IAAIpB,SAAS,CAACU,QAAQ,CAACc,MAAM,EAAE,uBAAuBd,QAAQ,CAACc,MAAM,EAAE,CAC3E,CAAC;EACL;EAEA,IAAIC,MAAW;EACf,IAAI;IACAA,MAAM,GAAG,MAAMf,QAAQ,CAACgB,IAAI,CAAC,CAAC;EAClC,CAAC,CAAC,MAAM;IACJ,OAAO3B,MAAM,CAACqB,IAAI,CAAC,IAAIlB,YAAY,CAAC,+BAA+B,CAAC,CAAC;EACzE;EAEA,IAAIuB,MAAM,CAACE,MAAM,EAAE;IACf,MAAMR,KAAK,GAAGM,MAAM,CAACE,MAAM,CAAC,CAAC,CAAC;IAC9B,OAAO5B,MAAM,CAACqB,IAAI,CAAC,IAAInB,YAAY,CAACkB,KAAK,EAAEG,OAAO,IAAI,eAAe,EAAEH,KAAK,EAAES,IAAI,CAAC,CAAC;EACxF;EAEA,OAAO7B,MAAM,CAACwB,EAAE,CAACE,MAAM,CAACI,IAAI,CAAC;AACjC","ignoreList":[]}
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@webiny/sdk",
3
+ "version": "5.45.0-beta.0",
4
+ "type": "module",
5
+ "main": "index.js",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/webiny/webiny-js.git"
9
+ },
10
+ "exports": {
11
+ ".": "./index.js"
12
+ },
13
+ "author": "Webiny",
14
+ "license": "MIT",
15
+ "devDependencies": {
16
+ "@webiny/build-tools": "5.45.0-beta.0",
17
+ "typescript": "5.9.3",
18
+ "vitest": "4.0.18"
19
+ },
20
+ "publishConfig": {
21
+ "access": "public",
22
+ "directory": "dist"
23
+ },
24
+ "gitHead": "b85c33cfbe7c02c130445c918d913ef4b2c09cb2"
25
+ }
package/types.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export interface WebinyConfig {
2
+ token: string;
3
+ endpoint: string;
4
+ tenant: string;
5
+ fetch?: typeof fetch;
6
+ }
package/types.js ADDED
@@ -0,0 +1,3 @@
1
+ export {};
2
+
3
+ //# sourceMappingURL=types.js.map
package/types.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export interface WebinyConfig {\n token: string;\n endpoint: string;\n tenant: string;\n fetch?: typeof fetch;\n}\n"],"mappings":"","ignoreList":[]}