@webiny/app-sdk-playground 6.0.0 → 6.1.0-beta.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/app-sdk-playground",
3
- "version": "6.0.0",
3
+ "version": "6.1.0-beta.1",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -11,17 +11,17 @@
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
13
  "@monaco-editor/react": "4.7.0",
14
- "@webiny/admin-ui": "6.0.0",
15
- "@webiny/app": "6.0.0",
16
- "@webiny/app-admin": "6.0.0",
17
- "@webiny/icons": "6.0.0",
18
- "@webiny/sdk": "6.0.0",
14
+ "@webiny/admin-ui": "6.1.0-beta.1",
15
+ "@webiny/app": "6.1.0-beta.1",
16
+ "@webiny/app-admin": "6.1.0-beta.1",
17
+ "@webiny/icons": "6.1.0-beta.1",
18
+ "@webiny/sdk": "6.1.0-beta.1",
19
19
  "monaco-editor": "0.53.0",
20
20
  "react": "18.2.0",
21
21
  "react-dom": "18.2.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@webiny/build-tools": "6.0.0",
24
+ "@webiny/build-tools": "6.1.0-beta.1",
25
25
  "rimraf": "6.1.3",
26
26
  "typescript": "5.9.3"
27
27
  },
@@ -29,5 +29,5 @@
29
29
  "access": "public",
30
30
  "directory": "dist"
31
31
  },
32
- "gitHead": "9c6892640a45679ff521e25cd6587dff57393a2e"
32
+ "gitHead": "3c1293ba17a14f239fb1cbf5d80cd66846849309"
33
33
  }
@@ -0,0 +1 @@
1
+ export declare const CMS_DECLARATIONS = "\ntype SdkEntryStatus = \"published\" | \"unpublished\" | \"draft\";\n\ninterface SdkEntryValues {\n [key: string]: any;\n}\n\ninterface SdkEntryData<TValues extends SdkEntryValues = SdkEntryValues> {\n id?: string;\n entryId?: string;\n status?: SdkEntryStatus;\n createdOn?: string;\n modifiedOn?: string | null;\n savedOn?: string;\n deletedOn?: string | null;\n restoredOn?: string | null;\n createdBy?: SdkIdentity;\n modifiedBy?: SdkIdentity;\n savedBy?: SdkIdentity;\n firstPublishedOn?: string;\n lastPublishedOn?: string;\n firstPublishedBy?: SdkIdentity;\n lastPublishedBy?: SdkIdentity;\n revisionCreatedOn?: string;\n revisionModifiedOn?: string | null;\n revisionSavedOn?: string;\n revisionCreatedBy?: SdkIdentity;\n revisionModifiedBy?: SdkIdentity | null;\n revisionSavedBy?: SdkIdentity;\n revisionFirstPublishedOn?: string;\n revisionLastPublishedOn?: string;\n revisionFirstPublishedBy?: SdkIdentity;\n revisionLastPublishedBy?: SdkIdentity;\n location?: { folderId?: string | null };\n values?: TValues;\n}\n\ninterface SdkListEntriesResult<TValues extends SdkEntryValues = SdkEntryValues> {\n data: SdkEntryData<TValues>[];\n meta: {\n cursor: string | null;\n hasMoreItems: boolean;\n totalCount: number;\n };\n}\n\ninterface SdkGetEntryParams {\n /** The model ID to query. */\n modelId: string;\n where: {\n /** Revision ID, e.g. \"abc#0001\". */\n id?: string;\n /** Entry ID, e.g. \"abc\". */\n entryId?: string;\n /** Filter by entry field values. */\n values?: Record<string, unknown>;\n };\n /** Fields to include in the response. Use \"values.fieldName\" for entry values. */\n fields: string[];\n /** When true, returns unpublished/draft content. Defaults to false. */\n preview?: boolean;\n}\n\ninterface SdkListEntriesParams {\n /** The model ID to query. */\n modelId: string;\n /** Filter conditions. */\n where?: Record<string, unknown>;\n /** Sort order per field, e.g. { createdOn: \"desc\" }. */\n sort?: Record<string, \"asc\" | \"desc\">;\n /** Maximum number of entries to return. Defaults to 10. */\n limit?: number;\n /** Pagination cursor from a previous response. */\n after?: string;\n /** Full-text search term to filter entries across searchable fields. */\n search?: string;\n /** Fields to include in the response. Use \"values.fieldName\" for entry values. */\n fields: string[];\n /** When true, returns unpublished/draft content. Defaults to false. */\n preview?: boolean;\n}\n\ninterface SdkCreateEntryData<TValues extends SdkEntryValues = SdkEntryValues> {\n values: TValues | undefined;\n status?: SdkEntryStatus;\n location?: { folderId?: string | null };\n}\n\ninterface SdkCreateEntryParams<TValues extends SdkEntryValues = SdkEntryValues> {\n /** The model ID. */\n modelId: string;\n /** The entry data to create. */\n data: SdkCreateEntryData<TValues>;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkUpdateEntryData<TValues extends SdkEntryValues = SdkEntryValues> {\n values?: Partial<TValues>;\n location?: { folderId?: string | null };\n}\n\ninterface SdkUpdateEntryRevisionParams<TValues extends SdkEntryValues = SdkEntryValues> {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** The fields to update. */\n data: SdkUpdateEntryData<TValues>;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkDeleteEntryRevisionParams {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** When true, permanently deletes the entry. Defaults to false. */\n permanent?: boolean;\n}\n\ninterface SdkPublishEntryRevisionParams {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkUnpublishEntryRevisionParams {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkCms {\n /** Get a single entry by ID or field values. */\n getEntry<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkGetEntryParams\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;\n\n /** List entries with optional filtering, sorting, and pagination. */\n listEntries<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkListEntriesParams\n ): Promise<SdkResult<SdkListEntriesResult<TValues>, SdkError>>;\n\n /** Create a new entry. */\n createEntry<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkCreateEntryParams<TValues>\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;\n\n /** Update an existing entry revision. */\n updateEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkUpdateEntryRevisionParams<TValues>\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;\n\n /** Delete an entry revision. */\n deleteEntryRevision(\n params: SdkDeleteEntryRevisionParams\n ): Promise<SdkResult<boolean, SdkError>>;\n\n /** Publish an entry revision. */\n publishEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkPublishEntryRevisionParams\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;\n\n /** Unpublish an entry revision. */\n unpublishEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkUnpublishEntryRevisionParams\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;\n}\n";
@@ -0,0 +1,180 @@
1
+ // CMS SDK type declarations.
2
+ export const CMS_DECLARATIONS = `
3
+ type SdkEntryStatus = "published" | "unpublished" | "draft";
4
+
5
+ interface SdkEntryValues {
6
+ [key: string]: any;
7
+ }
8
+
9
+ interface SdkEntryData<TValues extends SdkEntryValues = SdkEntryValues> {
10
+ id?: string;
11
+ entryId?: string;
12
+ status?: SdkEntryStatus;
13
+ createdOn?: string;
14
+ modifiedOn?: string | null;
15
+ savedOn?: string;
16
+ deletedOn?: string | null;
17
+ restoredOn?: string | null;
18
+ createdBy?: SdkIdentity;
19
+ modifiedBy?: SdkIdentity;
20
+ savedBy?: SdkIdentity;
21
+ firstPublishedOn?: string;
22
+ lastPublishedOn?: string;
23
+ firstPublishedBy?: SdkIdentity;
24
+ lastPublishedBy?: SdkIdentity;
25
+ revisionCreatedOn?: string;
26
+ revisionModifiedOn?: string | null;
27
+ revisionSavedOn?: string;
28
+ revisionCreatedBy?: SdkIdentity;
29
+ revisionModifiedBy?: SdkIdentity | null;
30
+ revisionSavedBy?: SdkIdentity;
31
+ revisionFirstPublishedOn?: string;
32
+ revisionLastPublishedOn?: string;
33
+ revisionFirstPublishedBy?: SdkIdentity;
34
+ revisionLastPublishedBy?: SdkIdentity;
35
+ location?: { folderId?: string | null };
36
+ values?: TValues;
37
+ }
38
+
39
+ interface SdkListEntriesResult<TValues extends SdkEntryValues = SdkEntryValues> {
40
+ data: SdkEntryData<TValues>[];
41
+ meta: {
42
+ cursor: string | null;
43
+ hasMoreItems: boolean;
44
+ totalCount: number;
45
+ };
46
+ }
47
+
48
+ interface SdkGetEntryParams {
49
+ /** The model ID to query. */
50
+ modelId: string;
51
+ where: {
52
+ /** Revision ID, e.g. "abc#0001". */
53
+ id?: string;
54
+ /** Entry ID, e.g. "abc". */
55
+ entryId?: string;
56
+ /** Filter by entry field values. */
57
+ values?: Record<string, unknown>;
58
+ };
59
+ /** Fields to include in the response. Use "values.fieldName" for entry values. */
60
+ fields: string[];
61
+ /** When true, returns unpublished/draft content. Defaults to false. */
62
+ preview?: boolean;
63
+ }
64
+
65
+ interface SdkListEntriesParams {
66
+ /** The model ID to query. */
67
+ modelId: string;
68
+ /** Filter conditions. */
69
+ where?: Record<string, unknown>;
70
+ /** Sort order per field, e.g. { createdOn: "desc" }. */
71
+ sort?: Record<string, "asc" | "desc">;
72
+ /** Maximum number of entries to return. Defaults to 10. */
73
+ limit?: number;
74
+ /** Pagination cursor from a previous response. */
75
+ after?: string;
76
+ /** Full-text search term to filter entries across searchable fields. */
77
+ search?: string;
78
+ /** Fields to include in the response. Use "values.fieldName" for entry values. */
79
+ fields: string[];
80
+ /** When true, returns unpublished/draft content. Defaults to false. */
81
+ preview?: boolean;
82
+ }
83
+
84
+ interface SdkCreateEntryData<TValues extends SdkEntryValues = SdkEntryValues> {
85
+ values: TValues | undefined;
86
+ status?: SdkEntryStatus;
87
+ location?: { folderId?: string | null };
88
+ }
89
+
90
+ interface SdkCreateEntryParams<TValues extends SdkEntryValues = SdkEntryValues> {
91
+ /** The model ID. */
92
+ modelId: string;
93
+ /** The entry data to create. */
94
+ data: SdkCreateEntryData<TValues>;
95
+ /** Fields to include in the response. */
96
+ fields: string[];
97
+ }
98
+
99
+ interface SdkUpdateEntryData<TValues extends SdkEntryValues = SdkEntryValues> {
100
+ values?: Partial<TValues>;
101
+ location?: { folderId?: string | null };
102
+ }
103
+
104
+ interface SdkUpdateEntryRevisionParams<TValues extends SdkEntryValues = SdkEntryValues> {
105
+ /** The model ID. */
106
+ modelId: string;
107
+ /** The revision ID, e.g. "abc#0001". */
108
+ revisionId: string;
109
+ /** The fields to update. */
110
+ data: SdkUpdateEntryData<TValues>;
111
+ /** Fields to include in the response. */
112
+ fields: string[];
113
+ }
114
+
115
+ interface SdkDeleteEntryRevisionParams {
116
+ /** The model ID. */
117
+ modelId: string;
118
+ /** The revision ID, e.g. "abc#0001". */
119
+ revisionId: string;
120
+ /** When true, permanently deletes the entry. Defaults to false. */
121
+ permanent?: boolean;
122
+ }
123
+
124
+ interface SdkPublishEntryRevisionParams {
125
+ /** The model ID. */
126
+ modelId: string;
127
+ /** The revision ID, e.g. "abc#0001". */
128
+ revisionId: string;
129
+ /** Fields to include in the response. */
130
+ fields: string[];
131
+ }
132
+
133
+ interface SdkUnpublishEntryRevisionParams {
134
+ /** The model ID. */
135
+ modelId: string;
136
+ /** The revision ID, e.g. "abc#0001". */
137
+ revisionId: string;
138
+ /** Fields to include in the response. */
139
+ fields: string[];
140
+ }
141
+
142
+ interface SdkCms {
143
+ /** Get a single entry by ID or field values. */
144
+ getEntry<TValues extends SdkEntryValues = SdkEntryValues>(
145
+ params: SdkGetEntryParams
146
+ ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;
147
+
148
+ /** List entries with optional filtering, sorting, and pagination. */
149
+ listEntries<TValues extends SdkEntryValues = SdkEntryValues>(
150
+ params: SdkListEntriesParams
151
+ ): Promise<SdkResult<SdkListEntriesResult<TValues>, SdkError>>;
152
+
153
+ /** Create a new entry. */
154
+ createEntry<TValues extends SdkEntryValues = SdkEntryValues>(
155
+ params: SdkCreateEntryParams<TValues>
156
+ ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;
157
+
158
+ /** Update an existing entry revision. */
159
+ updateEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(
160
+ params: SdkUpdateEntryRevisionParams<TValues>
161
+ ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;
162
+
163
+ /** Delete an entry revision. */
164
+ deleteEntryRevision(
165
+ params: SdkDeleteEntryRevisionParams
166
+ ): Promise<SdkResult<boolean, SdkError>>;
167
+
168
+ /** Publish an entry revision. */
169
+ publishEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(
170
+ params: SdkPublishEntryRevisionParams
171
+ ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;
172
+
173
+ /** Unpublish an entry revision. */
174
+ unpublishEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(
175
+ params: SdkUnpublishEntryRevisionParams
176
+ ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;
177
+ }
178
+ `;
179
+
180
+ //# sourceMappingURL=cms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CMS_DECLARATIONS"],"sources":["cms.ts"],"sourcesContent":["// CMS SDK type declarations.\nexport const CMS_DECLARATIONS = `\ntype SdkEntryStatus = \"published\" | \"unpublished\" | \"draft\";\n\ninterface SdkEntryValues {\n [key: string]: any;\n}\n\ninterface SdkEntryData<TValues extends SdkEntryValues = SdkEntryValues> {\n id?: string;\n entryId?: string;\n status?: SdkEntryStatus;\n createdOn?: string;\n modifiedOn?: string | null;\n savedOn?: string;\n deletedOn?: string | null;\n restoredOn?: string | null;\n createdBy?: SdkIdentity;\n modifiedBy?: SdkIdentity;\n savedBy?: SdkIdentity;\n firstPublishedOn?: string;\n lastPublishedOn?: string;\n firstPublishedBy?: SdkIdentity;\n lastPublishedBy?: SdkIdentity;\n revisionCreatedOn?: string;\n revisionModifiedOn?: string | null;\n revisionSavedOn?: string;\n revisionCreatedBy?: SdkIdentity;\n revisionModifiedBy?: SdkIdentity | null;\n revisionSavedBy?: SdkIdentity;\n revisionFirstPublishedOn?: string;\n revisionLastPublishedOn?: string;\n revisionFirstPublishedBy?: SdkIdentity;\n revisionLastPublishedBy?: SdkIdentity;\n location?: { folderId?: string | null };\n values?: TValues;\n}\n\ninterface SdkListEntriesResult<TValues extends SdkEntryValues = SdkEntryValues> {\n data: SdkEntryData<TValues>[];\n meta: {\n cursor: string | null;\n hasMoreItems: boolean;\n totalCount: number;\n };\n}\n\ninterface SdkGetEntryParams {\n /** The model ID to query. */\n modelId: string;\n where: {\n /** Revision ID, e.g. \"abc#0001\". */\n id?: string;\n /** Entry ID, e.g. \"abc\". */\n entryId?: string;\n /** Filter by entry field values. */\n values?: Record<string, unknown>;\n };\n /** Fields to include in the response. Use \"values.fieldName\" for entry values. */\n fields: string[];\n /** When true, returns unpublished/draft content. Defaults to false. */\n preview?: boolean;\n}\n\ninterface SdkListEntriesParams {\n /** The model ID to query. */\n modelId: string;\n /** Filter conditions. */\n where?: Record<string, unknown>;\n /** Sort order per field, e.g. { createdOn: \"desc\" }. */\n sort?: Record<string, \"asc\" | \"desc\">;\n /** Maximum number of entries to return. Defaults to 10. */\n limit?: number;\n /** Pagination cursor from a previous response. */\n after?: string;\n /** Full-text search term to filter entries across searchable fields. */\n search?: string;\n /** Fields to include in the response. Use \"values.fieldName\" for entry values. */\n fields: string[];\n /** When true, returns unpublished/draft content. Defaults to false. */\n preview?: boolean;\n}\n\ninterface SdkCreateEntryData<TValues extends SdkEntryValues = SdkEntryValues> {\n values: TValues | undefined;\n status?: SdkEntryStatus;\n location?: { folderId?: string | null };\n}\n\ninterface SdkCreateEntryParams<TValues extends SdkEntryValues = SdkEntryValues> {\n /** The model ID. */\n modelId: string;\n /** The entry data to create. */\n data: SdkCreateEntryData<TValues>;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkUpdateEntryData<TValues extends SdkEntryValues = SdkEntryValues> {\n values?: Partial<TValues>;\n location?: { folderId?: string | null };\n}\n\ninterface SdkUpdateEntryRevisionParams<TValues extends SdkEntryValues = SdkEntryValues> {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** The fields to update. */\n data: SdkUpdateEntryData<TValues>;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkDeleteEntryRevisionParams {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** When true, permanently deletes the entry. Defaults to false. */\n permanent?: boolean;\n}\n\ninterface SdkPublishEntryRevisionParams {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkUnpublishEntryRevisionParams {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkCms {\n /** Get a single entry by ID or field values. */\n getEntry<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkGetEntryParams\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;\n\n /** List entries with optional filtering, sorting, and pagination. */\n listEntries<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkListEntriesParams\n ): Promise<SdkResult<SdkListEntriesResult<TValues>, SdkError>>;\n\n /** Create a new entry. */\n createEntry<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkCreateEntryParams<TValues>\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;\n\n /** Update an existing entry revision. */\n updateEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkUpdateEntryRevisionParams<TValues>\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;\n\n /** Delete an entry revision. */\n deleteEntryRevision(\n params: SdkDeleteEntryRevisionParams\n ): Promise<SdkResult<boolean, SdkError>>;\n\n /** Publish an entry revision. */\n publishEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkPublishEntryRevisionParams\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;\n\n /** Unpublish an entry revision. */\n unpublishEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkUnpublishEntryRevisionParams\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;\n}\n`;\n"],"mappings":"AAAA;AACA,OAAO,MAAMA,gBAAgB,GAAG;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -0,0 +1 @@
1
+ export declare const COMMON_DECLARATIONS = "\ninterface SdkIdentity {\n id: string;\n displayName: string;\n type: string;\n}\n\ninterface SdkResult<TValue, TError = unknown> {\n isOk(): boolean;\n isFail(): boolean;\n readonly value: TValue;\n readonly error: TError;\n}\n\ndeclare class SdkBaseError extends Error {\n readonly code: string;\n readonly message: string;\n}\n\ndeclare class SdkHttpError extends SdkBaseError {\n readonly code: \"HTTP_ERROR\";\n readonly data: { status: number };\n}\n\ndeclare class SdkGraphQLError extends SdkBaseError {\n readonly code: \"GRAPHQL_ERROR\";\n readonly data: { code?: string };\n}\n\ndeclare class SdkNetworkError extends SdkBaseError {\n readonly code: \"NETWORK_ERROR\";\n}\n\ntype SdkError = SdkHttpError | SdkGraphQLError | SdkNetworkError;\n";
@@ -0,0 +1,38 @@
1
+ // Common types shared across all SDK modules.
2
+ export const COMMON_DECLARATIONS = `
3
+ interface SdkIdentity {
4
+ id: string;
5
+ displayName: string;
6
+ type: string;
7
+ }
8
+
9
+ interface SdkResult<TValue, TError = unknown> {
10
+ isOk(): boolean;
11
+ isFail(): boolean;
12
+ readonly value: TValue;
13
+ readonly error: TError;
14
+ }
15
+
16
+ declare class SdkBaseError extends Error {
17
+ readonly code: string;
18
+ readonly message: string;
19
+ }
20
+
21
+ declare class SdkHttpError extends SdkBaseError {
22
+ readonly code: "HTTP_ERROR";
23
+ readonly data: { status: number };
24
+ }
25
+
26
+ declare class SdkGraphQLError extends SdkBaseError {
27
+ readonly code: "GRAPHQL_ERROR";
28
+ readonly data: { code?: string };
29
+ }
30
+
31
+ declare class SdkNetworkError extends SdkBaseError {
32
+ readonly code: "NETWORK_ERROR";
33
+ }
34
+
35
+ type SdkError = SdkHttpError | SdkGraphQLError | SdkNetworkError;
36
+ `;
37
+
38
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["COMMON_DECLARATIONS"],"sources":["common.ts"],"sourcesContent":["// Common types shared across all SDK modules.\nexport const COMMON_DECLARATIONS = `\ninterface SdkIdentity {\n id: string;\n displayName: string;\n type: string;\n}\n\ninterface SdkResult<TValue, TError = unknown> {\n isOk(): boolean;\n isFail(): boolean;\n readonly value: TValue;\n readonly error: TError;\n}\n\ndeclare class SdkBaseError extends Error {\n readonly code: string;\n readonly message: string;\n}\n\ndeclare class SdkHttpError extends SdkBaseError {\n readonly code: \"HTTP_ERROR\";\n readonly data: { status: number };\n}\n\ndeclare class SdkGraphQLError extends SdkBaseError {\n readonly code: \"GRAPHQL_ERROR\";\n readonly data: { code?: string };\n}\n\ndeclare class SdkNetworkError extends SdkBaseError {\n readonly code: \"NETWORK_ERROR\";\n}\n\ntype SdkError = SdkHttpError | SdkGraphQLError | SdkNetworkError;\n`;\n"],"mappings":"AAAA;AACA,OAAO,MAAMA,mBAAmB,GAAG;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -0,0 +1 @@
1
+ export declare const FILE_MANAGER_DECLARATIONS = "\ninterface SdkFmIdentity {\n id: string;\n displayName: string;\n type: string;\n}\n\ninterface SdkFmLocation {\n folderId: string;\n}\n\ninterface SdkFmFile_Metadata {\n image?: {\n width?: number;\n height?: number;\n format?: string;\n orientation?: number;\n };\n exif?: Record<string, any>;\n iptc?: Record<string, any>;\n [key: string]: any;\n}\n\ntype SdkFmFile_AccessControl = {\n type: \"public\" | \"private-authenticated\";\n};\n\ninterface SdkFmFile {\n id: string;\n createdOn: string;\n modifiedOn?: string;\n savedOn: string;\n createdBy: SdkFmIdentity;\n modifiedBy?: SdkFmIdentity;\n savedBy: SdkFmIdentity;\n location: SdkFmLocation;\n src?: string;\n name?: string;\n key?: string;\n type?: string;\n size?: number;\n metadata?: SdkFmFile_Metadata;\n tags?: string[];\n accessControl?: SdkFmFile_AccessControl;\n [key: string]: any;\n}\n\ninterface SdkFmTag {\n tag: string;\n count: number;\n}\n\ninterface SdkUploadProgress {\n sent: number;\n total: number;\n percentage: number;\n}\n\ntype SdkBatchUploadStrategy = \"fail-fast\" | \"continue\";\n\ninterface SdkGetFileParams {\n /** ID of the file to get. */\n id: string;\n /** Fields to select (dot notation supported, e.g., \"location.folderId\", \"createdBy.displayName\"). */\n fields: string[];\n}\n\ninterface SdkListFilesParams {\n /** Search query. */\n search?: string;\n /** Filter conditions. */\n where?: {\n location?: {\n folderId?: string;\n folderId_in?: string[];\n };\n name?: string;\n name_contains?: string;\n type?: string;\n type_in?: string[];\n tags?: string[];\n tags_in?: string[];\n };\n /** Maximum number of items to return. */\n limit?: number;\n /** Cursor for pagination. */\n after?: string;\n /** Sort order. */\n sort?: (\"savedOn_ASC\" | \"savedOn_DESC\" | \"createdOn_ASC\" | \"createdOn_DESC\" | \"name_ASC\" | \"name_DESC\" | \"size_ASC\" | \"size_DESC\")[];\n /** Fields to select (dot notation supported, e.g., \"location.folderId\", \"createdBy.displayName\"). */\n fields: string[];\n}\n\ninterface SdkListFilesResult {\n data: SdkFmFile[];\n meta: {\n cursor: string | null;\n hasMoreItems: boolean;\n totalCount: number;\n };\n}\n\ninterface SdkCreateFileParams {\n /** Optional: The actual file content to upload (Buffer in Node.js, File/Blob in browser). */\n file?: any;\n /** The file metadata. */\n data: {\n id?: string;\n name?: string;\n key?: string;\n keyPrefix?: string;\n type?: string;\n size?: number;\n tags?: string[];\n location?: { folderId: string };\n [key: string]: any;\n };\n /** Fields to select (dot notation supported, e.g., \"location.folderId\", \"createdBy.displayName\"). */\n fields: string[];\n /** Optional: Progress callback. */\n onProgress?: (progress: SdkUploadProgress) => void;\n /** Optional: Threshold in MB for multi-part upload (default: 100). */\n multiPartThreshold?: number;\n /** Optional: AbortSignal for cancellation. */\n signal?: AbortSignal;\n}\n\ninterface SdkCreateFilesParams {\n /** Array of files with their data. */\n files: Array<{\n file?: any;\n data: {\n id?: string;\n name?: string;\n key?: string;\n keyPrefix?: string;\n type?: string;\n size?: number;\n tags?: string[];\n location?: { folderId: string };\n [key: string]: any;\n };\n /** Fields to select (dot notation supported, e.g., \"location.folderId\", \"createdBy.displayName\"). */\n fields: string[];\n onProgress?: (progress: SdkUploadProgress) => void;\n }>;\n /** Optional: Threshold in MB for multi-part upload (default: 100). */\n multiPartThreshold?: number;\n /** Optional: Number of concurrent uploads (default: 5). */\n concurrency?: number;\n /** Optional: Batch upload strategy (default: \"fail-fast\"). */\n strategy?: SdkBatchUploadStrategy;\n /** Optional: AbortSignal for cancellation. */\n signal?: AbortSignal;\n}\n\ninterface SdkCreateFilesResult {\n successful: SdkFmFile[];\n failed: Array<{\n data: any;\n error: Error;\n }>;\n}\n\ninterface SdkUpdateFileParams {\n /** ID of the file to update. */\n id: string;\n /** The file data to update. */\n data: {\n name?: string;\n tags?: string[];\n location?: { folderId: string };\n [key: string]: any;\n };\n /** Fields to select (dot notation supported, e.g., \"location.folderId\", \"createdBy.displayName\"). */\n fields: string[];\n}\n\ninterface SdkDeleteFileParams {\n /** ID of the file to delete. */\n id: string;\n}\n\ninterface SdkListTagsParams {\n /** Filter conditions. */\n where?: {\n createdBy?: string;\n tags_startsWith?: string;\n tags_not_startsWith?: string;\n };\n}\n\ninterface SdkFileManager {\n /** Get a single file by ID. */\n getFile(params: SdkGetFileParams): Promise<SdkResult<SdkFmFile, SdkError>>;\n\n /** List files with optional filtering, sorting, and pagination. */\n listFiles(params: SdkListFilesParams): Promise<SdkResult<SdkListFilesResult, SdkError>>;\n\n /** \n * Create a new file. If 'file' is provided, uploads to S3 first.\n * If no 'file' is provided, only creates metadata record.\n */\n createFile(params: SdkCreateFileParams): Promise<SdkResult<SdkFmFile, SdkError>>;\n\n /** \n * Create multiple files. If 'file' is provided for each, uploads to S3 first.\n * Supports batch upload with configurable concurrency and error handling strategy.\n */\n createFiles(params: SdkCreateFilesParams): Promise<SdkResult<SdkCreateFilesResult, SdkError>>;\n\n /** Update a file's metadata. */\n updateFile(params: SdkUpdateFileParams): Promise<SdkResult<SdkFmFile, SdkError>>;\n\n /** Delete a file. */\n deleteFile(params: SdkDeleteFileParams): Promise<SdkResult<boolean, SdkError>>;\n\n /** List tags with optional filtering. */\n listTags(params?: SdkListTagsParams): Promise<SdkResult<SdkFmTag[], SdkError>>;\n}\n";
@@ -0,0 +1,224 @@
1
+ // File Manager SDK type declarations.
2
+ export const FILE_MANAGER_DECLARATIONS = `
3
+ interface SdkFmIdentity {
4
+ id: string;
5
+ displayName: string;
6
+ type: string;
7
+ }
8
+
9
+ interface SdkFmLocation {
10
+ folderId: string;
11
+ }
12
+
13
+ interface SdkFmFile_Metadata {
14
+ image?: {
15
+ width?: number;
16
+ height?: number;
17
+ format?: string;
18
+ orientation?: number;
19
+ };
20
+ exif?: Record<string, any>;
21
+ iptc?: Record<string, any>;
22
+ [key: string]: any;
23
+ }
24
+
25
+ type SdkFmFile_AccessControl = {
26
+ type: "public" | "private-authenticated";
27
+ };
28
+
29
+ interface SdkFmFile {
30
+ id: string;
31
+ createdOn: string;
32
+ modifiedOn?: string;
33
+ savedOn: string;
34
+ createdBy: SdkFmIdentity;
35
+ modifiedBy?: SdkFmIdentity;
36
+ savedBy: SdkFmIdentity;
37
+ location: SdkFmLocation;
38
+ src?: string;
39
+ name?: string;
40
+ key?: string;
41
+ type?: string;
42
+ size?: number;
43
+ metadata?: SdkFmFile_Metadata;
44
+ tags?: string[];
45
+ accessControl?: SdkFmFile_AccessControl;
46
+ [key: string]: any;
47
+ }
48
+
49
+ interface SdkFmTag {
50
+ tag: string;
51
+ count: number;
52
+ }
53
+
54
+ interface SdkUploadProgress {
55
+ sent: number;
56
+ total: number;
57
+ percentage: number;
58
+ }
59
+
60
+ type SdkBatchUploadStrategy = "fail-fast" | "continue";
61
+
62
+ interface SdkGetFileParams {
63
+ /** ID of the file to get. */
64
+ id: string;
65
+ /** Fields to select (dot notation supported, e.g., "location.folderId", "createdBy.displayName"). */
66
+ fields: string[];
67
+ }
68
+
69
+ interface SdkListFilesParams {
70
+ /** Search query. */
71
+ search?: string;
72
+ /** Filter conditions. */
73
+ where?: {
74
+ location?: {
75
+ folderId?: string;
76
+ folderId_in?: string[];
77
+ };
78
+ name?: string;
79
+ name_contains?: string;
80
+ type?: string;
81
+ type_in?: string[];
82
+ tags?: string[];
83
+ tags_in?: string[];
84
+ };
85
+ /** Maximum number of items to return. */
86
+ limit?: number;
87
+ /** Cursor for pagination. */
88
+ after?: string;
89
+ /** Sort order. */
90
+ sort?: ("savedOn_ASC" | "savedOn_DESC" | "createdOn_ASC" | "createdOn_DESC" | "name_ASC" | "name_DESC" | "size_ASC" | "size_DESC")[];
91
+ /** Fields to select (dot notation supported, e.g., "location.folderId", "createdBy.displayName"). */
92
+ fields: string[];
93
+ }
94
+
95
+ interface SdkListFilesResult {
96
+ data: SdkFmFile[];
97
+ meta: {
98
+ cursor: string | null;
99
+ hasMoreItems: boolean;
100
+ totalCount: number;
101
+ };
102
+ }
103
+
104
+ interface SdkCreateFileParams {
105
+ /** Optional: The actual file content to upload (Buffer in Node.js, File/Blob in browser). */
106
+ file?: any;
107
+ /** The file metadata. */
108
+ data: {
109
+ id?: string;
110
+ name?: string;
111
+ key?: string;
112
+ keyPrefix?: string;
113
+ type?: string;
114
+ size?: number;
115
+ tags?: string[];
116
+ location?: { folderId: string };
117
+ [key: string]: any;
118
+ };
119
+ /** Fields to select (dot notation supported, e.g., "location.folderId", "createdBy.displayName"). */
120
+ fields: string[];
121
+ /** Optional: Progress callback. */
122
+ onProgress?: (progress: SdkUploadProgress) => void;
123
+ /** Optional: Threshold in MB for multi-part upload (default: 100). */
124
+ multiPartThreshold?: number;
125
+ /** Optional: AbortSignal for cancellation. */
126
+ signal?: AbortSignal;
127
+ }
128
+
129
+ interface SdkCreateFilesParams {
130
+ /** Array of files with their data. */
131
+ files: Array<{
132
+ file?: any;
133
+ data: {
134
+ id?: string;
135
+ name?: string;
136
+ key?: string;
137
+ keyPrefix?: string;
138
+ type?: string;
139
+ size?: number;
140
+ tags?: string[];
141
+ location?: { folderId: string };
142
+ [key: string]: any;
143
+ };
144
+ /** Fields to select (dot notation supported, e.g., "location.folderId", "createdBy.displayName"). */
145
+ fields: string[];
146
+ onProgress?: (progress: SdkUploadProgress) => void;
147
+ }>;
148
+ /** Optional: Threshold in MB for multi-part upload (default: 100). */
149
+ multiPartThreshold?: number;
150
+ /** Optional: Number of concurrent uploads (default: 5). */
151
+ concurrency?: number;
152
+ /** Optional: Batch upload strategy (default: "fail-fast"). */
153
+ strategy?: SdkBatchUploadStrategy;
154
+ /** Optional: AbortSignal for cancellation. */
155
+ signal?: AbortSignal;
156
+ }
157
+
158
+ interface SdkCreateFilesResult {
159
+ successful: SdkFmFile[];
160
+ failed: Array<{
161
+ data: any;
162
+ error: Error;
163
+ }>;
164
+ }
165
+
166
+ interface SdkUpdateFileParams {
167
+ /** ID of the file to update. */
168
+ id: string;
169
+ /** The file data to update. */
170
+ data: {
171
+ name?: string;
172
+ tags?: string[];
173
+ location?: { folderId: string };
174
+ [key: string]: any;
175
+ };
176
+ /** Fields to select (dot notation supported, e.g., "location.folderId", "createdBy.displayName"). */
177
+ fields: string[];
178
+ }
179
+
180
+ interface SdkDeleteFileParams {
181
+ /** ID of the file to delete. */
182
+ id: string;
183
+ }
184
+
185
+ interface SdkListTagsParams {
186
+ /** Filter conditions. */
187
+ where?: {
188
+ createdBy?: string;
189
+ tags_startsWith?: string;
190
+ tags_not_startsWith?: string;
191
+ };
192
+ }
193
+
194
+ interface SdkFileManager {
195
+ /** Get a single file by ID. */
196
+ getFile(params: SdkGetFileParams): Promise<SdkResult<SdkFmFile, SdkError>>;
197
+
198
+ /** List files with optional filtering, sorting, and pagination. */
199
+ listFiles(params: SdkListFilesParams): Promise<SdkResult<SdkListFilesResult, SdkError>>;
200
+
201
+ /**
202
+ * Create a new file. If 'file' is provided, uploads to S3 first.
203
+ * If no 'file' is provided, only creates metadata record.
204
+ */
205
+ createFile(params: SdkCreateFileParams): Promise<SdkResult<SdkFmFile, SdkError>>;
206
+
207
+ /**
208
+ * Create multiple files. If 'file' is provided for each, uploads to S3 first.
209
+ * Supports batch upload with configurable concurrency and error handling strategy.
210
+ */
211
+ createFiles(params: SdkCreateFilesParams): Promise<SdkResult<SdkCreateFilesResult, SdkError>>;
212
+
213
+ /** Update a file's metadata. */
214
+ updateFile(params: SdkUpdateFileParams): Promise<SdkResult<SdkFmFile, SdkError>>;
215
+
216
+ /** Delete a file. */
217
+ deleteFile(params: SdkDeleteFileParams): Promise<SdkResult<boolean, SdkError>>;
218
+
219
+ /** List tags with optional filtering. */
220
+ listTags(params?: SdkListTagsParams): Promise<SdkResult<SdkFmTag[], SdkError>>;
221
+ }
222
+ `;
223
+
224
+ //# sourceMappingURL=fileManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["FILE_MANAGER_DECLARATIONS"],"sources":["fileManager.ts"],"sourcesContent":["// File Manager SDK type declarations.\nexport const FILE_MANAGER_DECLARATIONS = `\ninterface SdkFmIdentity {\n id: string;\n displayName: string;\n type: string;\n}\n\ninterface SdkFmLocation {\n folderId: string;\n}\n\ninterface SdkFmFile_Metadata {\n image?: {\n width?: number;\n height?: number;\n format?: string;\n orientation?: number;\n };\n exif?: Record<string, any>;\n iptc?: Record<string, any>;\n [key: string]: any;\n}\n\ntype SdkFmFile_AccessControl = {\n type: \"public\" | \"private-authenticated\";\n};\n\ninterface SdkFmFile {\n id: string;\n createdOn: string;\n modifiedOn?: string;\n savedOn: string;\n createdBy: SdkFmIdentity;\n modifiedBy?: SdkFmIdentity;\n savedBy: SdkFmIdentity;\n location: SdkFmLocation;\n src?: string;\n name?: string;\n key?: string;\n type?: string;\n size?: number;\n metadata?: SdkFmFile_Metadata;\n tags?: string[];\n accessControl?: SdkFmFile_AccessControl;\n [key: string]: any;\n}\n\ninterface SdkFmTag {\n tag: string;\n count: number;\n}\n\ninterface SdkUploadProgress {\n sent: number;\n total: number;\n percentage: number;\n}\n\ntype SdkBatchUploadStrategy = \"fail-fast\" | \"continue\";\n\ninterface SdkGetFileParams {\n /** ID of the file to get. */\n id: string;\n /** Fields to select (dot notation supported, e.g., \"location.folderId\", \"createdBy.displayName\"). */\n fields: string[];\n}\n\ninterface SdkListFilesParams {\n /** Search query. */\n search?: string;\n /** Filter conditions. */\n where?: {\n location?: {\n folderId?: string;\n folderId_in?: string[];\n };\n name?: string;\n name_contains?: string;\n type?: string;\n type_in?: string[];\n tags?: string[];\n tags_in?: string[];\n };\n /** Maximum number of items to return. */\n limit?: number;\n /** Cursor for pagination. */\n after?: string;\n /** Sort order. */\n sort?: (\"savedOn_ASC\" | \"savedOn_DESC\" | \"createdOn_ASC\" | \"createdOn_DESC\" | \"name_ASC\" | \"name_DESC\" | \"size_ASC\" | \"size_DESC\")[];\n /** Fields to select (dot notation supported, e.g., \"location.folderId\", \"createdBy.displayName\"). */\n fields: string[];\n}\n\ninterface SdkListFilesResult {\n data: SdkFmFile[];\n meta: {\n cursor: string | null;\n hasMoreItems: boolean;\n totalCount: number;\n };\n}\n\ninterface SdkCreateFileParams {\n /** Optional: The actual file content to upload (Buffer in Node.js, File/Blob in browser). */\n file?: any;\n /** The file metadata. */\n data: {\n id?: string;\n name?: string;\n key?: string;\n keyPrefix?: string;\n type?: string;\n size?: number;\n tags?: string[];\n location?: { folderId: string };\n [key: string]: any;\n };\n /** Fields to select (dot notation supported, e.g., \"location.folderId\", \"createdBy.displayName\"). */\n fields: string[];\n /** Optional: Progress callback. */\n onProgress?: (progress: SdkUploadProgress) => void;\n /** Optional: Threshold in MB for multi-part upload (default: 100). */\n multiPartThreshold?: number;\n /** Optional: AbortSignal for cancellation. */\n signal?: AbortSignal;\n}\n\ninterface SdkCreateFilesParams {\n /** Array of files with their data. */\n files: Array<{\n file?: any;\n data: {\n id?: string;\n name?: string;\n key?: string;\n keyPrefix?: string;\n type?: string;\n size?: number;\n tags?: string[];\n location?: { folderId: string };\n [key: string]: any;\n };\n /** Fields to select (dot notation supported, e.g., \"location.folderId\", \"createdBy.displayName\"). */\n fields: string[];\n onProgress?: (progress: SdkUploadProgress) => void;\n }>;\n /** Optional: Threshold in MB for multi-part upload (default: 100). */\n multiPartThreshold?: number;\n /** Optional: Number of concurrent uploads (default: 5). */\n concurrency?: number;\n /** Optional: Batch upload strategy (default: \"fail-fast\"). */\n strategy?: SdkBatchUploadStrategy;\n /** Optional: AbortSignal for cancellation. */\n signal?: AbortSignal;\n}\n\ninterface SdkCreateFilesResult {\n successful: SdkFmFile[];\n failed: Array<{\n data: any;\n error: Error;\n }>;\n}\n\ninterface SdkUpdateFileParams {\n /** ID of the file to update. */\n id: string;\n /** The file data to update. */\n data: {\n name?: string;\n tags?: string[];\n location?: { folderId: string };\n [key: string]: any;\n };\n /** Fields to select (dot notation supported, e.g., \"location.folderId\", \"createdBy.displayName\"). */\n fields: string[];\n}\n\ninterface SdkDeleteFileParams {\n /** ID of the file to delete. */\n id: string;\n}\n\ninterface SdkListTagsParams {\n /** Filter conditions. */\n where?: {\n createdBy?: string;\n tags_startsWith?: string;\n tags_not_startsWith?: string;\n };\n}\n\ninterface SdkFileManager {\n /** Get a single file by ID. */\n getFile(params: SdkGetFileParams): Promise<SdkResult<SdkFmFile, SdkError>>;\n\n /** List files with optional filtering, sorting, and pagination. */\n listFiles(params: SdkListFilesParams): Promise<SdkResult<SdkListFilesResult, SdkError>>;\n\n /** \n * Create a new file. If 'file' is provided, uploads to S3 first.\n * If no 'file' is provided, only creates metadata record.\n */\n createFile(params: SdkCreateFileParams): Promise<SdkResult<SdkFmFile, SdkError>>;\n\n /** \n * Create multiple files. If 'file' is provided for each, uploads to S3 first.\n * Supports batch upload with configurable concurrency and error handling strategy.\n */\n createFiles(params: SdkCreateFilesParams): Promise<SdkResult<SdkCreateFilesResult, SdkError>>;\n\n /** Update a file's metadata. */\n updateFile(params: SdkUpdateFileParams): Promise<SdkResult<SdkFmFile, SdkError>>;\n\n /** Delete a file. */\n deleteFile(params: SdkDeleteFileParams): Promise<SdkResult<boolean, SdkError>>;\n\n /** List tags with optional filtering. */\n listTags(params?: SdkListTagsParams): Promise<SdkResult<SdkFmTag[], SdkError>>;\n}\n`;\n"],"mappings":"AAAA;AACA,OAAO,MAAMA,yBAAyB,GAAG;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -0,0 +1 @@
1
+ export declare const TENANT_MANAGER_DECLARATIONS = "\ninterface SdkCreateTenantInput {\n /** Custom tenant ID. If not provided, one will be generated automatically. */\n id?: string;\n /** Display name for the tenant. */\n name: string;\n /** Tenant description. */\n description?: string;\n}\n\ninterface SdkCreateTenantParams {\n /** The tenant data to create. */\n data: SdkCreateTenantInput;\n}\n\ninterface SdkInstallTenantParams {\n /** ID of the tenant to install. */\n tenantId: string;\n}\n\ninterface SdkDisableTenantParams {\n /** ID of the tenant to disable. */\n tenantId: string;\n}\n\ninterface SdkEnableTenantParams {\n /** ID of the tenant to enable. */\n tenantId: string;\n}\n\ninterface SdkTenant {\n /** Unique tenant identifier. */\n id: string;\n /** Tenant configuration values. */\n values: Record<string, unknown>;\n}\n\ninterface SdkTenantManager {\n /** Return the current tenant for the authenticated context. */\n getCurrentTenant(): Promise<SdkResult<SdkTenant, SdkError>>;\n\n /** Create a new tenant in the system. */\n createTenant(params: SdkCreateTenantParams): Promise<SdkResult<boolean, SdkError>>;\n\n /** Install and provision a tenant with default settings and configurations. */\n installTenant(params: SdkInstallTenantParams): Promise<SdkResult<boolean, SdkError>>;\n\n /** Disable a tenant, preventing access to its resources. */\n disableTenant(params: SdkDisableTenantParams): Promise<SdkResult<boolean, SdkError>>;\n\n /** Re-enable a previously disabled tenant. */\n enableTenant(params: SdkEnableTenantParams): Promise<SdkResult<boolean, SdkError>>;\n}\n";
@@ -0,0 +1,57 @@
1
+ // Tenant Manager SDK type declarations.
2
+ export const TENANT_MANAGER_DECLARATIONS = `
3
+ interface SdkCreateTenantInput {
4
+ /** Custom tenant ID. If not provided, one will be generated automatically. */
5
+ id?: string;
6
+ /** Display name for the tenant. */
7
+ name: string;
8
+ /** Tenant description. */
9
+ description?: string;
10
+ }
11
+
12
+ interface SdkCreateTenantParams {
13
+ /** The tenant data to create. */
14
+ data: SdkCreateTenantInput;
15
+ }
16
+
17
+ interface SdkInstallTenantParams {
18
+ /** ID of the tenant to install. */
19
+ tenantId: string;
20
+ }
21
+
22
+ interface SdkDisableTenantParams {
23
+ /** ID of the tenant to disable. */
24
+ tenantId: string;
25
+ }
26
+
27
+ interface SdkEnableTenantParams {
28
+ /** ID of the tenant to enable. */
29
+ tenantId: string;
30
+ }
31
+
32
+ interface SdkTenant {
33
+ /** Unique tenant identifier. */
34
+ id: string;
35
+ /** Tenant configuration values. */
36
+ values: Record<string, unknown>;
37
+ }
38
+
39
+ interface SdkTenantManager {
40
+ /** Return the current tenant for the authenticated context. */
41
+ getCurrentTenant(): Promise<SdkResult<SdkTenant, SdkError>>;
42
+
43
+ /** Create a new tenant in the system. */
44
+ createTenant(params: SdkCreateTenantParams): Promise<SdkResult<boolean, SdkError>>;
45
+
46
+ /** Install and provision a tenant with default settings and configurations. */
47
+ installTenant(params: SdkInstallTenantParams): Promise<SdkResult<boolean, SdkError>>;
48
+
49
+ /** Disable a tenant, preventing access to its resources. */
50
+ disableTenant(params: SdkDisableTenantParams): Promise<SdkResult<boolean, SdkError>>;
51
+
52
+ /** Re-enable a previously disabled tenant. */
53
+ enableTenant(params: SdkEnableTenantParams): Promise<SdkResult<boolean, SdkError>>;
54
+ }
55
+ `;
56
+
57
+ //# sourceMappingURL=tenantManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TENANT_MANAGER_DECLARATIONS"],"sources":["tenantManager.ts"],"sourcesContent":["// Tenant Manager SDK type declarations.\nexport const TENANT_MANAGER_DECLARATIONS = `\ninterface SdkCreateTenantInput {\n /** Custom tenant ID. If not provided, one will be generated automatically. */\n id?: string;\n /** Display name for the tenant. */\n name: string;\n /** Tenant description. */\n description?: string;\n}\n\ninterface SdkCreateTenantParams {\n /** The tenant data to create. */\n data: SdkCreateTenantInput;\n}\n\ninterface SdkInstallTenantParams {\n /** ID of the tenant to install. */\n tenantId: string;\n}\n\ninterface SdkDisableTenantParams {\n /** ID of the tenant to disable. */\n tenantId: string;\n}\n\ninterface SdkEnableTenantParams {\n /** ID of the tenant to enable. */\n tenantId: string;\n}\n\ninterface SdkTenant {\n /** Unique tenant identifier. */\n id: string;\n /** Tenant configuration values. */\n values: Record<string, unknown>;\n}\n\ninterface SdkTenantManager {\n /** Return the current tenant for the authenticated context. */\n getCurrentTenant(): Promise<SdkResult<SdkTenant, SdkError>>;\n\n /** Create a new tenant in the system. */\n createTenant(params: SdkCreateTenantParams): Promise<SdkResult<boolean, SdkError>>;\n\n /** Install and provision a tenant with default settings and configurations. */\n installTenant(params: SdkInstallTenantParams): Promise<SdkResult<boolean, SdkError>>;\n\n /** Disable a tenant, preventing access to its resources. */\n disableTenant(params: SdkDisableTenantParams): Promise<SdkResult<boolean, SdkError>>;\n\n /** Re-enable a previously disabled tenant. */\n enableTenant(params: SdkEnableTenantParams): Promise<SdkResult<boolean, SdkError>>;\n}\n`;\n"],"mappings":"AAAA;AACA,OAAO,MAAMA,2BAA2B,GAAG;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- export declare const SDK_GLOBAL_DECLARATION = "\ninterface SdkIdentity {\n id: string;\n displayName: string;\n type: string;\n}\n\ntype SdkEntryStatus = \"published\" | \"unpublished\" | \"draft\";\n\ninterface SdkEntryValues {\n [key: string]: any;\n}\n\ninterface SdkEntryData<TValues extends SdkEntryValues = SdkEntryValues> {\n id?: string;\n entryId?: string;\n status?: SdkEntryStatus;\n createdOn?: string;\n modifiedOn?: string | null;\n savedOn?: string;\n deletedOn?: string | null;\n restoredOn?: string | null;\n createdBy?: SdkIdentity;\n modifiedBy?: SdkIdentity;\n savedBy?: SdkIdentity;\n firstPublishedOn?: string;\n lastPublishedOn?: string;\n firstPublishedBy?: SdkIdentity;\n lastPublishedBy?: SdkIdentity;\n revisionCreatedOn?: string;\n revisionModifiedOn?: string | null;\n revisionSavedOn?: string;\n revisionCreatedBy?: SdkIdentity;\n revisionModifiedBy?: SdkIdentity | null;\n revisionSavedBy?: SdkIdentity;\n revisionFirstPublishedOn?: string;\n revisionLastPublishedOn?: string;\n revisionFirstPublishedBy?: SdkIdentity;\n revisionLastPublishedBy?: SdkIdentity;\n location?: { folderId?: string | null };\n values?: TValues;\n}\n\ninterface SdkListEntriesResult<TValues extends SdkEntryValues = SdkEntryValues> {\n data: SdkEntryData<TValues>[];\n meta: {\n cursor: string | null;\n hasMoreItems: boolean;\n totalCount: number;\n };\n}\n\ninterface SdkResult<TValue, TError = unknown> {\n isOk(): boolean;\n isFail(): boolean;\n readonly value: TValue;\n readonly error: TError;\n}\n\ndeclare class SdkBaseError extends Error {\n readonly code: string;\n readonly message: string;\n}\n\ndeclare class SdkHttpError extends SdkBaseError {\n readonly code: \"HTTP_ERROR\";\n readonly data: { status: number };\n}\n\ndeclare class SdkGraphQLError extends SdkBaseError {\n readonly code: \"GRAPHQL_ERROR\";\n readonly data: { code?: string };\n}\n\ndeclare class SdkNetworkError extends SdkBaseError {\n readonly code: \"NETWORK_ERROR\";\n}\n\ntype SdkCmsError = SdkHttpError | SdkGraphQLError | SdkNetworkError;\n\ninterface SdkGetEntryParams {\n /** The model ID to query. */\n modelId: string;\n where: {\n /** Revision ID, e.g. \"abc#0001\". */\n id?: string;\n /** Entry ID, e.g. \"abc\". */\n entryId?: string;\n /** Filter by entry field values. */\n values?: Record<string, unknown>;\n };\n /** Fields to include in the response. Use \"values.fieldName\" for entry values. */\n fields: string[];\n /** When true, returns unpublished/draft content. Defaults to false. */\n preview?: boolean;\n}\n\ninterface SdkListEntriesParams {\n /** The model ID to query. */\n modelId: string;\n /** Filter conditions. */\n where?: Record<string, unknown>;\n /** Sort order per field, e.g. { createdOn: \"desc\" }. */\n sort?: Record<string, \"asc\" | \"desc\">;\n /** Maximum number of entries to return. Defaults to 10. */\n limit?: number;\n /** Pagination cursor from a previous response. */\n after?: string;\n /** Fields to include in the response. Use \"values.fieldName\" for entry values. */\n fields: string[];\n /** When true, returns unpublished/draft content. Defaults to false. */\n preview?: boolean;\n}\n\ninterface SdkCreateEntryData<TValues extends SdkEntryValues = SdkEntryValues> {\n values: TValues | undefined;\n status?: SdkEntryStatus;\n location?: { folderId?: string | null };\n}\n\ninterface SdkCreateEntryParams<TValues extends SdkEntryValues = SdkEntryValues> {\n /** The model ID. */\n modelId: string;\n /** The entry data to create. */\n data: SdkCreateEntryData<TValues>;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkUpdateEntryData<TValues extends SdkEntryValues = SdkEntryValues> {\n values?: Partial<TValues>;\n location?: { folderId?: string | null };\n}\n\ninterface SdkUpdateEntryRevisionParams<TValues extends SdkEntryValues = SdkEntryValues> {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** The fields to update. */\n data: SdkUpdateEntryData<TValues>;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkDeleteEntryRevisionParams {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** When true, permanently deletes the entry. Defaults to false. */\n permanent?: boolean;\n}\n\ninterface SdkPublishEntryRevisionParams {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkUnpublishEntryRevisionParams {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkCms {\n /** Get a single entry by ID or field values. */\n getEntry<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkGetEntryParams\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkCmsError>>;\n\n /** List entries with optional filtering, sorting, and pagination. */\n listEntries<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkListEntriesParams\n ): Promise<SdkResult<SdkListEntriesResult<TValues>, SdkCmsError>>;\n\n /** Create a new entry. */\n createEntry<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkCreateEntryParams<TValues>\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkCmsError>>;\n\n /** Update an existing entry revision. */\n updateEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkUpdateEntryRevisionParams<TValues>\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkCmsError>>;\n\n /** Delete an entry revision. */\n deleteEntryRevision(\n params: SdkDeleteEntryRevisionParams\n ): Promise<SdkResult<boolean, SdkCmsError>>;\n\n /** Publish an entry revision. */\n publishEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkPublishEntryRevisionParams\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkCmsError>>;\n\n /** Unpublish an entry revision. */\n unpublishEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkUnpublishEntryRevisionParams\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkCmsError>>;\n}\n\ninterface SdkWebiny {\n /** CMS operations: list, get, create, update, delete, publish entries. */\n readonly cms: SdkCms;\n}\n\ndeclare const sdk: SdkWebiny;\ndeclare interface Window { sdk: SdkWebiny; }\n";
1
+ export declare const SDK_GLOBAL_DECLARATION = "\n\ninterface SdkIdentity {\n id: string;\n displayName: string;\n type: string;\n}\n\ninterface SdkResult<TValue, TError = unknown> {\n isOk(): boolean;\n isFail(): boolean;\n readonly value: TValue;\n readonly error: TError;\n}\n\ndeclare class SdkBaseError extends Error {\n readonly code: string;\n readonly message: string;\n}\n\ndeclare class SdkHttpError extends SdkBaseError {\n readonly code: \"HTTP_ERROR\";\n readonly data: { status: number };\n}\n\ndeclare class SdkGraphQLError extends SdkBaseError {\n readonly code: \"GRAPHQL_ERROR\";\n readonly data: { code?: string };\n}\n\ndeclare class SdkNetworkError extends SdkBaseError {\n readonly code: \"NETWORK_ERROR\";\n}\n\ntype SdkError = SdkHttpError | SdkGraphQLError | SdkNetworkError;\n\n\n\ntype SdkEntryStatus = \"published\" | \"unpublished\" | \"draft\";\n\ninterface SdkEntryValues {\n [key: string]: any;\n}\n\ninterface SdkEntryData<TValues extends SdkEntryValues = SdkEntryValues> {\n id?: string;\n entryId?: string;\n status?: SdkEntryStatus;\n createdOn?: string;\n modifiedOn?: string | null;\n savedOn?: string;\n deletedOn?: string | null;\n restoredOn?: string | null;\n createdBy?: SdkIdentity;\n modifiedBy?: SdkIdentity;\n savedBy?: SdkIdentity;\n firstPublishedOn?: string;\n lastPublishedOn?: string;\n firstPublishedBy?: SdkIdentity;\n lastPublishedBy?: SdkIdentity;\n revisionCreatedOn?: string;\n revisionModifiedOn?: string | null;\n revisionSavedOn?: string;\n revisionCreatedBy?: SdkIdentity;\n revisionModifiedBy?: SdkIdentity | null;\n revisionSavedBy?: SdkIdentity;\n revisionFirstPublishedOn?: string;\n revisionLastPublishedOn?: string;\n revisionFirstPublishedBy?: SdkIdentity;\n revisionLastPublishedBy?: SdkIdentity;\n location?: { folderId?: string | null };\n values?: TValues;\n}\n\ninterface SdkListEntriesResult<TValues extends SdkEntryValues = SdkEntryValues> {\n data: SdkEntryData<TValues>[];\n meta: {\n cursor: string | null;\n hasMoreItems: boolean;\n totalCount: number;\n };\n}\n\ninterface SdkGetEntryParams {\n /** The model ID to query. */\n modelId: string;\n where: {\n /** Revision ID, e.g. \"abc#0001\". */\n id?: string;\n /** Entry ID, e.g. \"abc\". */\n entryId?: string;\n /** Filter by entry field values. */\n values?: Record<string, unknown>;\n };\n /** Fields to include in the response. Use \"values.fieldName\" for entry values. */\n fields: string[];\n /** When true, returns unpublished/draft content. Defaults to false. */\n preview?: boolean;\n}\n\ninterface SdkListEntriesParams {\n /** The model ID to query. */\n modelId: string;\n /** Filter conditions. */\n where?: Record<string, unknown>;\n /** Sort order per field, e.g. { createdOn: \"desc\" }. */\n sort?: Record<string, \"asc\" | \"desc\">;\n /** Maximum number of entries to return. Defaults to 10. */\n limit?: number;\n /** Pagination cursor from a previous response. */\n after?: string;\n /** Full-text search term to filter entries across searchable fields. */\n search?: string;\n /** Fields to include in the response. Use \"values.fieldName\" for entry values. */\n fields: string[];\n /** When true, returns unpublished/draft content. Defaults to false. */\n preview?: boolean;\n}\n\ninterface SdkCreateEntryData<TValues extends SdkEntryValues = SdkEntryValues> {\n values: TValues | undefined;\n status?: SdkEntryStatus;\n location?: { folderId?: string | null };\n}\n\ninterface SdkCreateEntryParams<TValues extends SdkEntryValues = SdkEntryValues> {\n /** The model ID. */\n modelId: string;\n /** The entry data to create. */\n data: SdkCreateEntryData<TValues>;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkUpdateEntryData<TValues extends SdkEntryValues = SdkEntryValues> {\n values?: Partial<TValues>;\n location?: { folderId?: string | null };\n}\n\ninterface SdkUpdateEntryRevisionParams<TValues extends SdkEntryValues = SdkEntryValues> {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** The fields to update. */\n data: SdkUpdateEntryData<TValues>;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkDeleteEntryRevisionParams {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** When true, permanently deletes the entry. Defaults to false. */\n permanent?: boolean;\n}\n\ninterface SdkPublishEntryRevisionParams {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkUnpublishEntryRevisionParams {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkCms {\n /** Get a single entry by ID or field values. */\n getEntry<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkGetEntryParams\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;\n\n /** List entries with optional filtering, sorting, and pagination. */\n listEntries<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkListEntriesParams\n ): Promise<SdkResult<SdkListEntriesResult<TValues>, SdkError>>;\n\n /** Create a new entry. */\n createEntry<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkCreateEntryParams<TValues>\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;\n\n /** Update an existing entry revision. */\n updateEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkUpdateEntryRevisionParams<TValues>\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;\n\n /** Delete an entry revision. */\n deleteEntryRevision(\n params: SdkDeleteEntryRevisionParams\n ): Promise<SdkResult<boolean, SdkError>>;\n\n /** Publish an entry revision. */\n publishEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkPublishEntryRevisionParams\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;\n\n /** Unpublish an entry revision. */\n unpublishEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkUnpublishEntryRevisionParams\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkError>>;\n}\n\n\n\ninterface SdkCreateTenantInput {\n /** Custom tenant ID. If not provided, one will be generated automatically. */\n id?: string;\n /** Display name for the tenant. */\n name: string;\n /** Tenant description. */\n description?: string;\n}\n\ninterface SdkCreateTenantParams {\n /** The tenant data to create. */\n data: SdkCreateTenantInput;\n}\n\ninterface SdkInstallTenantParams {\n /** ID of the tenant to install. */\n tenantId: string;\n}\n\ninterface SdkDisableTenantParams {\n /** ID of the tenant to disable. */\n tenantId: string;\n}\n\ninterface SdkEnableTenantParams {\n /** ID of the tenant to enable. */\n tenantId: string;\n}\n\ninterface SdkTenant {\n /** Unique tenant identifier. */\n id: string;\n /** Tenant configuration values. */\n values: Record<string, unknown>;\n}\n\ninterface SdkTenantManager {\n /** Return the current tenant for the authenticated context. */\n getCurrentTenant(): Promise<SdkResult<SdkTenant, SdkError>>;\n\n /** Create a new tenant in the system. */\n createTenant(params: SdkCreateTenantParams): Promise<SdkResult<boolean, SdkError>>;\n\n /** Install and provision a tenant with default settings and configurations. */\n installTenant(params: SdkInstallTenantParams): Promise<SdkResult<boolean, SdkError>>;\n\n /** Disable a tenant, preventing access to its resources. */\n disableTenant(params: SdkDisableTenantParams): Promise<SdkResult<boolean, SdkError>>;\n\n /** Re-enable a previously disabled tenant. */\n enableTenant(params: SdkEnableTenantParams): Promise<SdkResult<boolean, SdkError>>;\n}\n\n\n\ninterface SdkFmIdentity {\n id: string;\n displayName: string;\n type: string;\n}\n\ninterface SdkFmLocation {\n folderId: string;\n}\n\ninterface SdkFmFile_Metadata {\n image?: {\n width?: number;\n height?: number;\n format?: string;\n orientation?: number;\n };\n exif?: Record<string, any>;\n iptc?: Record<string, any>;\n [key: string]: any;\n}\n\ntype SdkFmFile_AccessControl = {\n type: \"public\" | \"private-authenticated\";\n};\n\ninterface SdkFmFile {\n id: string;\n createdOn: string;\n modifiedOn?: string;\n savedOn: string;\n createdBy: SdkFmIdentity;\n modifiedBy?: SdkFmIdentity;\n savedBy: SdkFmIdentity;\n location: SdkFmLocation;\n src?: string;\n name?: string;\n key?: string;\n type?: string;\n size?: number;\n metadata?: SdkFmFile_Metadata;\n tags?: string[];\n accessControl?: SdkFmFile_AccessControl;\n [key: string]: any;\n}\n\ninterface SdkFmTag {\n tag: string;\n count: number;\n}\n\ninterface SdkUploadProgress {\n sent: number;\n total: number;\n percentage: number;\n}\n\ntype SdkBatchUploadStrategy = \"fail-fast\" | \"continue\";\n\ninterface SdkGetFileParams {\n /** ID of the file to get. */\n id: string;\n /** Fields to select (dot notation supported, e.g., \"location.folderId\", \"createdBy.displayName\"). */\n fields: string[];\n}\n\ninterface SdkListFilesParams {\n /** Search query. */\n search?: string;\n /** Filter conditions. */\n where?: {\n location?: {\n folderId?: string;\n folderId_in?: string[];\n };\n name?: string;\n name_contains?: string;\n type?: string;\n type_in?: string[];\n tags?: string[];\n tags_in?: string[];\n };\n /** Maximum number of items to return. */\n limit?: number;\n /** Cursor for pagination. */\n after?: string;\n /** Sort order. */\n sort?: (\"savedOn_ASC\" | \"savedOn_DESC\" | \"createdOn_ASC\" | \"createdOn_DESC\" | \"name_ASC\" | \"name_DESC\" | \"size_ASC\" | \"size_DESC\")[];\n /** Fields to select (dot notation supported, e.g., \"location.folderId\", \"createdBy.displayName\"). */\n fields: string[];\n}\n\ninterface SdkListFilesResult {\n data: SdkFmFile[];\n meta: {\n cursor: string | null;\n hasMoreItems: boolean;\n totalCount: number;\n };\n}\n\ninterface SdkCreateFileParams {\n /** Optional: The actual file content to upload (Buffer in Node.js, File/Blob in browser). */\n file?: any;\n /** The file metadata. */\n data: {\n id?: string;\n name?: string;\n key?: string;\n keyPrefix?: string;\n type?: string;\n size?: number;\n tags?: string[];\n location?: { folderId: string };\n [key: string]: any;\n };\n /** Fields to select (dot notation supported, e.g., \"location.folderId\", \"createdBy.displayName\"). */\n fields: string[];\n /** Optional: Progress callback. */\n onProgress?: (progress: SdkUploadProgress) => void;\n /** Optional: Threshold in MB for multi-part upload (default: 100). */\n multiPartThreshold?: number;\n /** Optional: AbortSignal for cancellation. */\n signal?: AbortSignal;\n}\n\ninterface SdkCreateFilesParams {\n /** Array of files with their data. */\n files: Array<{\n file?: any;\n data: {\n id?: string;\n name?: string;\n key?: string;\n keyPrefix?: string;\n type?: string;\n size?: number;\n tags?: string[];\n location?: { folderId: string };\n [key: string]: any;\n };\n /** Fields to select (dot notation supported, e.g., \"location.folderId\", \"createdBy.displayName\"). */\n fields: string[];\n onProgress?: (progress: SdkUploadProgress) => void;\n }>;\n /** Optional: Threshold in MB for multi-part upload (default: 100). */\n multiPartThreshold?: number;\n /** Optional: Number of concurrent uploads (default: 5). */\n concurrency?: number;\n /** Optional: Batch upload strategy (default: \"fail-fast\"). */\n strategy?: SdkBatchUploadStrategy;\n /** Optional: AbortSignal for cancellation. */\n signal?: AbortSignal;\n}\n\ninterface SdkCreateFilesResult {\n successful: SdkFmFile[];\n failed: Array<{\n data: any;\n error: Error;\n }>;\n}\n\ninterface SdkUpdateFileParams {\n /** ID of the file to update. */\n id: string;\n /** The file data to update. */\n data: {\n name?: string;\n tags?: string[];\n location?: { folderId: string };\n [key: string]: any;\n };\n /** Fields to select (dot notation supported, e.g., \"location.folderId\", \"createdBy.displayName\"). */\n fields: string[];\n}\n\ninterface SdkDeleteFileParams {\n /** ID of the file to delete. */\n id: string;\n}\n\ninterface SdkListTagsParams {\n /** Filter conditions. */\n where?: {\n createdBy?: string;\n tags_startsWith?: string;\n tags_not_startsWith?: string;\n };\n}\n\ninterface SdkFileManager {\n /** Get a single file by ID. */\n getFile(params: SdkGetFileParams): Promise<SdkResult<SdkFmFile, SdkError>>;\n\n /** List files with optional filtering, sorting, and pagination. */\n listFiles(params: SdkListFilesParams): Promise<SdkResult<SdkListFilesResult, SdkError>>;\n\n /** \n * Create a new file. If 'file' is provided, uploads to S3 first.\n * If no 'file' is provided, only creates metadata record.\n */\n createFile(params: SdkCreateFileParams): Promise<SdkResult<SdkFmFile, SdkError>>;\n\n /** \n * Create multiple files. If 'file' is provided for each, uploads to S3 first.\n * Supports batch upload with configurable concurrency and error handling strategy.\n */\n createFiles(params: SdkCreateFilesParams): Promise<SdkResult<SdkCreateFilesResult, SdkError>>;\n\n /** Update a file's metadata. */\n updateFile(params: SdkUpdateFileParams): Promise<SdkResult<SdkFmFile, SdkError>>;\n\n /** Delete a file. */\n deleteFile(params: SdkDeleteFileParams): Promise<SdkResult<boolean, SdkError>>;\n\n /** List tags with optional filtering. */\n listTags(params?: SdkListTagsParams): Promise<SdkResult<SdkFmTag[], SdkError>>;\n}\n\n\n// ============================================================================\n// MAIN SDK INTERFACE\n// ============================================================================\n\ninterface SdkWebiny {\n /** CMS operations: list, get, create, update, delete, publish entries. */\n readonly cms: SdkCms;\n \n /** Tenant Manager operations: create, install, disable, enable tenants. */\n readonly tenantManager: SdkTenantManager;\n \n /** File Manager operations: upload, list, get, update, delete files. */\n readonly fileManager: SdkFileManager;\n}\n\ndeclare const sdk: SdkWebiny;\ndeclare interface Window { sdk: SdkWebiny; }\n";
@@ -9,218 +9,33 @@
9
9
  // all declarations locally instead of globally.
10
10
  // 2. All types must be declared inline — no cross-file references.
11
11
  // 3. Register this with addExtraLib using a "file:///" URI.
12
- export const SDK_GLOBAL_DECLARATION = `
13
- interface SdkIdentity {
14
- id: string;
15
- displayName: string;
16
- type: string;
17
- }
18
-
19
- type SdkEntryStatus = "published" | "unpublished" | "draft";
20
-
21
- interface SdkEntryValues {
22
- [key: string]: any;
23
- }
24
-
25
- interface SdkEntryData<TValues extends SdkEntryValues = SdkEntryValues> {
26
- id?: string;
27
- entryId?: string;
28
- status?: SdkEntryStatus;
29
- createdOn?: string;
30
- modifiedOn?: string | null;
31
- savedOn?: string;
32
- deletedOn?: string | null;
33
- restoredOn?: string | null;
34
- createdBy?: SdkIdentity;
35
- modifiedBy?: SdkIdentity;
36
- savedBy?: SdkIdentity;
37
- firstPublishedOn?: string;
38
- lastPublishedOn?: string;
39
- firstPublishedBy?: SdkIdentity;
40
- lastPublishedBy?: SdkIdentity;
41
- revisionCreatedOn?: string;
42
- revisionModifiedOn?: string | null;
43
- revisionSavedOn?: string;
44
- revisionCreatedBy?: SdkIdentity;
45
- revisionModifiedBy?: SdkIdentity | null;
46
- revisionSavedBy?: SdkIdentity;
47
- revisionFirstPublishedOn?: string;
48
- revisionLastPublishedOn?: string;
49
- revisionFirstPublishedBy?: SdkIdentity;
50
- revisionLastPublishedBy?: SdkIdentity;
51
- location?: { folderId?: string | null };
52
- values?: TValues;
53
- }
54
-
55
- interface SdkListEntriesResult<TValues extends SdkEntryValues = SdkEntryValues> {
56
- data: SdkEntryData<TValues>[];
57
- meta: {
58
- cursor: string | null;
59
- hasMoreItems: boolean;
60
- totalCount: number;
61
- };
62
- }
63
-
64
- interface SdkResult<TValue, TError = unknown> {
65
- isOk(): boolean;
66
- isFail(): boolean;
67
- readonly value: TValue;
68
- readonly error: TError;
69
- }
70
-
71
- declare class SdkBaseError extends Error {
72
- readonly code: string;
73
- readonly message: string;
74
- }
75
-
76
- declare class SdkHttpError extends SdkBaseError {
77
- readonly code: "HTTP_ERROR";
78
- readonly data: { status: number };
79
- }
80
-
81
- declare class SdkGraphQLError extends SdkBaseError {
82
- readonly code: "GRAPHQL_ERROR";
83
- readonly data: { code?: string };
84
- }
85
-
86
- declare class SdkNetworkError extends SdkBaseError {
87
- readonly code: "NETWORK_ERROR";
88
- }
89
-
90
- type SdkCmsError = SdkHttpError | SdkGraphQLError | SdkNetworkError;
91
-
92
- interface SdkGetEntryParams {
93
- /** The model ID to query. */
94
- modelId: string;
95
- where: {
96
- /** Revision ID, e.g. "abc#0001". */
97
- id?: string;
98
- /** Entry ID, e.g. "abc". */
99
- entryId?: string;
100
- /** Filter by entry field values. */
101
- values?: Record<string, unknown>;
102
- };
103
- /** Fields to include in the response. Use "values.fieldName" for entry values. */
104
- fields: string[];
105
- /** When true, returns unpublished/draft content. Defaults to false. */
106
- preview?: boolean;
107
- }
108
-
109
- interface SdkListEntriesParams {
110
- /** The model ID to query. */
111
- modelId: string;
112
- /** Filter conditions. */
113
- where?: Record<string, unknown>;
114
- /** Sort order per field, e.g. { createdOn: "desc" }. */
115
- sort?: Record<string, "asc" | "desc">;
116
- /** Maximum number of entries to return. Defaults to 10. */
117
- limit?: number;
118
- /** Pagination cursor from a previous response. */
119
- after?: string;
120
- /** Fields to include in the response. Use "values.fieldName" for entry values. */
121
- fields: string[];
122
- /** When true, returns unpublished/draft content. Defaults to false. */
123
- preview?: boolean;
124
- }
125
-
126
- interface SdkCreateEntryData<TValues extends SdkEntryValues = SdkEntryValues> {
127
- values: TValues | undefined;
128
- status?: SdkEntryStatus;
129
- location?: { folderId?: string | null };
130
- }
131
-
132
- interface SdkCreateEntryParams<TValues extends SdkEntryValues = SdkEntryValues> {
133
- /** The model ID. */
134
- modelId: string;
135
- /** The entry data to create. */
136
- data: SdkCreateEntryData<TValues>;
137
- /** Fields to include in the response. */
138
- fields: string[];
139
- }
140
-
141
- interface SdkUpdateEntryData<TValues extends SdkEntryValues = SdkEntryValues> {
142
- values?: Partial<TValues>;
143
- location?: { folderId?: string | null };
144
- }
145
-
146
- interface SdkUpdateEntryRevisionParams<TValues extends SdkEntryValues = SdkEntryValues> {
147
- /** The model ID. */
148
- modelId: string;
149
- /** The revision ID, e.g. "abc#0001". */
150
- revisionId: string;
151
- /** The fields to update. */
152
- data: SdkUpdateEntryData<TValues>;
153
- /** Fields to include in the response. */
154
- fields: string[];
155
- }
156
12
 
157
- interface SdkDeleteEntryRevisionParams {
158
- /** The model ID. */
159
- modelId: string;
160
- /** The revision ID, e.g. "abc#0001". */
161
- revisionId: string;
162
- /** When true, permanently deletes the entry. Defaults to false. */
163
- permanent?: boolean;
164
- }
165
-
166
- interface SdkPublishEntryRevisionParams {
167
- /** The model ID. */
168
- modelId: string;
169
- /** The revision ID, e.g. "abc#0001". */
170
- revisionId: string;
171
- /** Fields to include in the response. */
172
- fields: string[];
173
- }
174
-
175
- interface SdkUnpublishEntryRevisionParams {
176
- /** The model ID. */
177
- modelId: string;
178
- /** The revision ID, e.g. "abc#0001". */
179
- revisionId: string;
180
- /** Fields to include in the response. */
181
- fields: string[];
182
- }
183
-
184
- interface SdkCms {
185
- /** Get a single entry by ID or field values. */
186
- getEntry<TValues extends SdkEntryValues = SdkEntryValues>(
187
- params: SdkGetEntryParams
188
- ): Promise<SdkResult<SdkEntryData<TValues>, SdkCmsError>>;
189
-
190
- /** List entries with optional filtering, sorting, and pagination. */
191
- listEntries<TValues extends SdkEntryValues = SdkEntryValues>(
192
- params: SdkListEntriesParams
193
- ): Promise<SdkResult<SdkListEntriesResult<TValues>, SdkCmsError>>;
194
-
195
- /** Create a new entry. */
196
- createEntry<TValues extends SdkEntryValues = SdkEntryValues>(
197
- params: SdkCreateEntryParams<TValues>
198
- ): Promise<SdkResult<SdkEntryData<TValues>, SdkCmsError>>;
13
+ import { COMMON_DECLARATIONS } from "./declarations/common.js";
14
+ import { CMS_DECLARATIONS } from "./declarations/cms.js";
15
+ import { TENANT_MANAGER_DECLARATIONS } from "./declarations/tenantManager.js";
16
+ import { FILE_MANAGER_DECLARATIONS } from "./declarations/fileManager.js";
17
+ export const SDK_GLOBAL_DECLARATION = `
18
+ ${COMMON_DECLARATIONS}
199
19
 
200
- /** Update an existing entry revision. */
201
- updateEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(
202
- params: SdkUpdateEntryRevisionParams<TValues>
203
- ): Promise<SdkResult<SdkEntryData<TValues>, SdkCmsError>>;
20
+ ${CMS_DECLARATIONS}
204
21
 
205
- /** Delete an entry revision. */
206
- deleteEntryRevision(
207
- params: SdkDeleteEntryRevisionParams
208
- ): Promise<SdkResult<boolean, SdkCmsError>>;
22
+ ${TENANT_MANAGER_DECLARATIONS}
209
23
 
210
- /** Publish an entry revision. */
211
- publishEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(
212
- params: SdkPublishEntryRevisionParams
213
- ): Promise<SdkResult<SdkEntryData<TValues>, SdkCmsError>>;
24
+ ${FILE_MANAGER_DECLARATIONS}
214
25
 
215
- /** Unpublish an entry revision. */
216
- unpublishEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(
217
- params: SdkUnpublishEntryRevisionParams
218
- ): Promise<SdkResult<SdkEntryData<TValues>, SdkCmsError>>;
219
- }
26
+ // ============================================================================
27
+ // MAIN SDK INTERFACE
28
+ // ============================================================================
220
29
 
221
30
  interface SdkWebiny {
222
31
  /** CMS operations: list, get, create, update, delete, publish entries. */
223
32
  readonly cms: SdkCms;
33
+
34
+ /** Tenant Manager operations: create, install, disable, enable tenants. */
35
+ readonly tenantManager: SdkTenantManager;
36
+
37
+ /** File Manager operations: upload, list, get, update, delete files. */
38
+ readonly fileManager: SdkFileManager;
224
39
  }
225
40
 
226
41
  declare const sdk: SdkWebiny;
@@ -1 +1 @@
1
- {"version":3,"names":["SDK_GLOBAL_DECLARATION"],"sources":["sdkGlobalDeclaration.ts"],"sourcesContent":["// Global ambient declaration injected into Monaco's TypeScript language service.\n//\n// NOTE: This file contains TypeScript type declarations as a string literal.\n// In the future, this can be auto-generated from a real .d.ts file.\n//\n// RULES (do not break these):\n// 1. This string must contain NO top-level `import` or `export` statements.\n// Any import/export makes TypeScript treat the file as a module, scoping\n// all declarations locally instead of globally.\n// 2. All types must be declared inline — no cross-file references.\n// 3. Register this with addExtraLib using a \"file:///\" URI.\nexport const SDK_GLOBAL_DECLARATION = `\ninterface SdkIdentity {\n id: string;\n displayName: string;\n type: string;\n}\n\ntype SdkEntryStatus = \"published\" | \"unpublished\" | \"draft\";\n\ninterface SdkEntryValues {\n [key: string]: any;\n}\n\ninterface SdkEntryData<TValues extends SdkEntryValues = SdkEntryValues> {\n id?: string;\n entryId?: string;\n status?: SdkEntryStatus;\n createdOn?: string;\n modifiedOn?: string | null;\n savedOn?: string;\n deletedOn?: string | null;\n restoredOn?: string | null;\n createdBy?: SdkIdentity;\n modifiedBy?: SdkIdentity;\n savedBy?: SdkIdentity;\n firstPublishedOn?: string;\n lastPublishedOn?: string;\n firstPublishedBy?: SdkIdentity;\n lastPublishedBy?: SdkIdentity;\n revisionCreatedOn?: string;\n revisionModifiedOn?: string | null;\n revisionSavedOn?: string;\n revisionCreatedBy?: SdkIdentity;\n revisionModifiedBy?: SdkIdentity | null;\n revisionSavedBy?: SdkIdentity;\n revisionFirstPublishedOn?: string;\n revisionLastPublishedOn?: string;\n revisionFirstPublishedBy?: SdkIdentity;\n revisionLastPublishedBy?: SdkIdentity;\n location?: { folderId?: string | null };\n values?: TValues;\n}\n\ninterface SdkListEntriesResult<TValues extends SdkEntryValues = SdkEntryValues> {\n data: SdkEntryData<TValues>[];\n meta: {\n cursor: string | null;\n hasMoreItems: boolean;\n totalCount: number;\n };\n}\n\ninterface SdkResult<TValue, TError = unknown> {\n isOk(): boolean;\n isFail(): boolean;\n readonly value: TValue;\n readonly error: TError;\n}\n\ndeclare class SdkBaseError extends Error {\n readonly code: string;\n readonly message: string;\n}\n\ndeclare class SdkHttpError extends SdkBaseError {\n readonly code: \"HTTP_ERROR\";\n readonly data: { status: number };\n}\n\ndeclare class SdkGraphQLError extends SdkBaseError {\n readonly code: \"GRAPHQL_ERROR\";\n readonly data: { code?: string };\n}\n\ndeclare class SdkNetworkError extends SdkBaseError {\n readonly code: \"NETWORK_ERROR\";\n}\n\ntype SdkCmsError = SdkHttpError | SdkGraphQLError | SdkNetworkError;\n\ninterface SdkGetEntryParams {\n /** The model ID to query. */\n modelId: string;\n where: {\n /** Revision ID, e.g. \"abc#0001\". */\n id?: string;\n /** Entry ID, e.g. \"abc\". */\n entryId?: string;\n /** Filter by entry field values. */\n values?: Record<string, unknown>;\n };\n /** Fields to include in the response. Use \"values.fieldName\" for entry values. */\n fields: string[];\n /** When true, returns unpublished/draft content. Defaults to false. */\n preview?: boolean;\n}\n\ninterface SdkListEntriesParams {\n /** The model ID to query. */\n modelId: string;\n /** Filter conditions. */\n where?: Record<string, unknown>;\n /** Sort order per field, e.g. { createdOn: \"desc\" }. */\n sort?: Record<string, \"asc\" | \"desc\">;\n /** Maximum number of entries to return. Defaults to 10. */\n limit?: number;\n /** Pagination cursor from a previous response. */\n after?: string;\n /** Fields to include in the response. Use \"values.fieldName\" for entry values. */\n fields: string[];\n /** When true, returns unpublished/draft content. Defaults to false. */\n preview?: boolean;\n}\n\ninterface SdkCreateEntryData<TValues extends SdkEntryValues = SdkEntryValues> {\n values: TValues | undefined;\n status?: SdkEntryStatus;\n location?: { folderId?: string | null };\n}\n\ninterface SdkCreateEntryParams<TValues extends SdkEntryValues = SdkEntryValues> {\n /** The model ID. */\n modelId: string;\n /** The entry data to create. */\n data: SdkCreateEntryData<TValues>;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkUpdateEntryData<TValues extends SdkEntryValues = SdkEntryValues> {\n values?: Partial<TValues>;\n location?: { folderId?: string | null };\n}\n\ninterface SdkUpdateEntryRevisionParams<TValues extends SdkEntryValues = SdkEntryValues> {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** The fields to update. */\n data: SdkUpdateEntryData<TValues>;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkDeleteEntryRevisionParams {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** When true, permanently deletes the entry. Defaults to false. */\n permanent?: boolean;\n}\n\ninterface SdkPublishEntryRevisionParams {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkUnpublishEntryRevisionParams {\n /** The model ID. */\n modelId: string;\n /** The revision ID, e.g. \"abc#0001\". */\n revisionId: string;\n /** Fields to include in the response. */\n fields: string[];\n}\n\ninterface SdkCms {\n /** Get a single entry by ID or field values. */\n getEntry<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkGetEntryParams\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkCmsError>>;\n\n /** List entries with optional filtering, sorting, and pagination. */\n listEntries<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkListEntriesParams\n ): Promise<SdkResult<SdkListEntriesResult<TValues>, SdkCmsError>>;\n\n /** Create a new entry. */\n createEntry<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkCreateEntryParams<TValues>\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkCmsError>>;\n\n /** Update an existing entry revision. */\n updateEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkUpdateEntryRevisionParams<TValues>\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkCmsError>>;\n\n /** Delete an entry revision. */\n deleteEntryRevision(\n params: SdkDeleteEntryRevisionParams\n ): Promise<SdkResult<boolean, SdkCmsError>>;\n\n /** Publish an entry revision. */\n publishEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkPublishEntryRevisionParams\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkCmsError>>;\n\n /** Unpublish an entry revision. */\n unpublishEntryRevision<TValues extends SdkEntryValues = SdkEntryValues>(\n params: SdkUnpublishEntryRevisionParams\n ): Promise<SdkResult<SdkEntryData<TValues>, SdkCmsError>>;\n}\n\ninterface SdkWebiny {\n /** CMS operations: list, get, create, update, delete, publish entries. */\n readonly cms: SdkCms;\n}\n\ndeclare const sdk: SdkWebiny;\ndeclare interface Window { sdk: SdkWebiny; }\n`;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,sBAAsB,GAAG;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["COMMON_DECLARATIONS","CMS_DECLARATIONS","TENANT_MANAGER_DECLARATIONS","FILE_MANAGER_DECLARATIONS","SDK_GLOBAL_DECLARATION"],"sources":["sdkGlobalDeclaration.ts"],"sourcesContent":["// Global ambient declaration injected into Monaco's TypeScript language service.\n//\n// NOTE: This file contains TypeScript type declarations as a string literal.\n// In the future, this can be auto-generated from a real .d.ts file.\n//\n// RULES (do not break these):\n// 1. This string must contain NO top-level `import` or `export` statements.\n// Any import/export makes TypeScript treat the file as a module, scoping\n// all declarations locally instead of globally.\n// 2. All types must be declared inline — no cross-file references.\n// 3. Register this with addExtraLib using a \"file:///\" URI.\n\nimport { COMMON_DECLARATIONS } from \"./declarations/common.js\";\nimport { CMS_DECLARATIONS } from \"./declarations/cms.js\";\nimport { TENANT_MANAGER_DECLARATIONS } from \"./declarations/tenantManager.js\";\nimport { FILE_MANAGER_DECLARATIONS } from \"./declarations/fileManager.js\";\n\nexport const SDK_GLOBAL_DECLARATION = `\n${COMMON_DECLARATIONS}\n\n${CMS_DECLARATIONS}\n\n${TENANT_MANAGER_DECLARATIONS}\n\n${FILE_MANAGER_DECLARATIONS}\n\n// ============================================================================\n// MAIN SDK INTERFACE\n// ============================================================================\n\ninterface SdkWebiny {\n /** CMS operations: list, get, create, update, delete, publish entries. */\n readonly cms: SdkCms;\n \n /** Tenant Manager operations: create, install, disable, enable tenants. */\n readonly tenantManager: SdkTenantManager;\n \n /** File Manager operations: upload, list, get, update, delete files. */\n readonly fileManager: SdkFileManager;\n}\n\ndeclare const sdk: SdkWebiny;\ndeclare interface Window { sdk: SdkWebiny; }\n`;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,mBAAmB;AAC5B,SAASC,gBAAgB;AACzB,SAASC,2BAA2B;AACpC,SAASC,yBAAyB;AAElC,OAAO,MAAMC,sBAAsB,GAAG;AACtC,EAAEJ,mBAAmB;AACrB;AACA,EAAEC,gBAAgB;AAClB;AACA,EAAEC,2BAA2B;AAC7B;AACA,EAAEC,yBAAyB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}