@pptb/types 1.0.19 → 1.0.20
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/dataverseAPI.d.ts +46 -4
- package/package.json +1 -1
- package/toolboxAPI.d.ts +14 -13
package/dataverseAPI.d.ts
CHANGED
|
@@ -958,6 +958,27 @@ declare namespace DataverseAPI {
|
|
|
958
958
|
*/
|
|
959
959
|
buildLabel: (text: string, languageCode?: number) => Label;
|
|
960
960
|
|
|
961
|
+
/**
|
|
962
|
+
* Retrieve the CSDL/EDMX metadata document for the Dataverse environment
|
|
963
|
+
*
|
|
964
|
+
* Returns the complete OData service document as raw XML containing metadata for:
|
|
965
|
+
* - EntityType definitions (tables/entities)
|
|
966
|
+
* - Property elements (attributes/columns)
|
|
967
|
+
* - NavigationProperty elements (relationships)
|
|
968
|
+
* - ComplexType definitions (return types for actions/functions)
|
|
969
|
+
* - EnumType definitions (picklist/choice enumerations)
|
|
970
|
+
* - Action definitions (OData Actions - POST operations)
|
|
971
|
+
* - Function definitions (OData Functions - GET operations)
|
|
972
|
+
* - EntityContainer metadata
|
|
973
|
+
*
|
|
974
|
+
* The response is automatically compressed with gzip during transfer for optimal performance,
|
|
975
|
+
* then decompressed and returned as a raw XML string.
|
|
976
|
+
*
|
|
977
|
+
* @param connectionTarget - Optional connection target for multi-connection tools
|
|
978
|
+
* @returns Raw CSDL/EDMX XML document as string (typically 1-5MB)
|
|
979
|
+
*/
|
|
980
|
+
getCSDLDocument: (connectionTarget?: "primary" | "secondary") => Promise<string>;
|
|
981
|
+
|
|
961
982
|
/**
|
|
962
983
|
* Get the OData type string for an attribute metadata type
|
|
963
984
|
* Converts AttributeMetadataType enum to full Microsoft.Dynamics.CRM type path
|
|
@@ -1142,7 +1163,12 @@ declare namespace DataverseAPI {
|
|
|
1142
1163
|
* });
|
|
1143
1164
|
* await dataverseAPI.publishCustomizations("new_project");
|
|
1144
1165
|
*/
|
|
1145
|
-
createAttribute: (
|
|
1166
|
+
createAttribute: (
|
|
1167
|
+
entityLogicalName: string,
|
|
1168
|
+
attributeDefinition: Record<string, unknown>,
|
|
1169
|
+
options?: MetadataOperationOptions,
|
|
1170
|
+
connectionTarget?: "primary" | "secondary",
|
|
1171
|
+
) => Promise<{ id: string }>;
|
|
1146
1172
|
|
|
1147
1173
|
/**
|
|
1148
1174
|
* Update an attribute (column) definition
|
|
@@ -1179,7 +1205,13 @@ declare namespace DataverseAPI {
|
|
|
1179
1205
|
* // Step 4: Publish customizations
|
|
1180
1206
|
* await dataverseAPI.publishCustomizations("new_project");
|
|
1181
1207
|
*/
|
|
1182
|
-
updateAttribute: (
|
|
1208
|
+
updateAttribute: (
|
|
1209
|
+
entityLogicalName: string,
|
|
1210
|
+
attributeIdentifier: string,
|
|
1211
|
+
attributeDefinition: Record<string, unknown>,
|
|
1212
|
+
options?: MetadataOperationOptions,
|
|
1213
|
+
connectionTarget?: "primary" | "secondary",
|
|
1214
|
+
) => Promise<void>;
|
|
1183
1215
|
|
|
1184
1216
|
/**
|
|
1185
1217
|
* Delete an attribute (column) from an entity
|
|
@@ -1295,7 +1327,12 @@ declare namespace DataverseAPI {
|
|
|
1295
1327
|
* @param options - Optional metadata operation options (mergeLabels defaults to true)
|
|
1296
1328
|
* @param connectionTarget - Optional connection target for multi-connection tools ('primary' or 'secondary'). Defaults to 'primary'.
|
|
1297
1329
|
*/
|
|
1298
|
-
updateRelationship: (
|
|
1330
|
+
updateRelationship: (
|
|
1331
|
+
relationshipIdentifier: string,
|
|
1332
|
+
relationshipDefinition: Record<string, unknown>,
|
|
1333
|
+
options?: MetadataOperationOptions,
|
|
1334
|
+
connectionTarget?: "primary" | "secondary",
|
|
1335
|
+
) => Promise<void>;
|
|
1299
1336
|
|
|
1300
1337
|
/**
|
|
1301
1338
|
* Delete a relationship
|
|
@@ -1354,7 +1391,12 @@ declare namespace DataverseAPI {
|
|
|
1354
1391
|
* @param options - Optional metadata operation options (mergeLabels defaults to true)
|
|
1355
1392
|
* @param connectionTarget - Optional connection target for multi-connection tools ('primary' or 'secondary'). Defaults to 'primary'.
|
|
1356
1393
|
*/
|
|
1357
|
-
updateGlobalOptionSet: (
|
|
1394
|
+
updateGlobalOptionSet: (
|
|
1395
|
+
optionSetIdentifier: string,
|
|
1396
|
+
optionSetDefinition: Record<string, unknown>,
|
|
1397
|
+
options?: MetadataOperationOptions,
|
|
1398
|
+
connectionTarget?: "primary" | "secondary",
|
|
1399
|
+
) => Promise<void>;
|
|
1358
1400
|
|
|
1359
1401
|
/**
|
|
1360
1402
|
* Delete a global option set
|
package/package.json
CHANGED
package/toolboxAPI.d.ts
CHANGED
|
@@ -82,8 +82,6 @@ declare namespace ToolBoxAPI {
|
|
|
82
82
|
name: string;
|
|
83
83
|
url: string;
|
|
84
84
|
environment: "Dev" | "Test" | "UAT" | "Production";
|
|
85
|
-
clientId?: string;
|
|
86
|
-
tenantId?: string;
|
|
87
85
|
createdAt: string;
|
|
88
86
|
lastUsedAt?: string;
|
|
89
87
|
/**
|
|
@@ -155,16 +153,6 @@ declare namespace ToolBoxAPI {
|
|
|
155
153
|
* Get the secondary connection for multi-connection tools
|
|
156
154
|
*/
|
|
157
155
|
getSecondaryConnection: () => Promise<DataverseConnection | null>;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Get the secondary connection URL for multi-connection tools
|
|
161
|
-
*/
|
|
162
|
-
getSecondaryConnectionUrl: () => Promise<string | null>;
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Get the secondary connection ID for multi-connection tools
|
|
166
|
-
*/
|
|
167
|
-
getSecondaryConnectionId: () => Promise<string | null>;
|
|
168
156
|
}
|
|
169
157
|
|
|
170
158
|
/**
|
|
@@ -262,8 +250,21 @@ declare namespace ToolBoxAPI {
|
|
|
262
250
|
|
|
263
251
|
/**
|
|
264
252
|
* Open a save file dialog and write content
|
|
253
|
+
* @param defaultPath The suggested file name and path
|
|
254
|
+
* @param content The content to save (string or Buffer)
|
|
255
|
+
* @param filters Optional file type filters. If not provided, filters are derived from the file extension
|
|
256
|
+
* @example
|
|
257
|
+
* // Save with custom filters
|
|
258
|
+
* await toolboxAPI.fileSystem.saveFile(
|
|
259
|
+
* "react-export.json",
|
|
260
|
+
* JSON.stringify(data, null, 2),
|
|
261
|
+
* [{name: "JSON", extensions: ["json"]}, {name: "Text", extensions: ["txt"]}]
|
|
262
|
+
* );
|
|
263
|
+
*
|
|
264
|
+
* // Save without filters (auto-derived from extension)
|
|
265
|
+
* await toolboxAPI.fileSystem.saveFile("config.xml", xmlContent);
|
|
265
266
|
*/
|
|
266
|
-
saveFile: (defaultPath: string, content: any) => Promise<string | null>;
|
|
267
|
+
saveFile: (defaultPath: string, content: any, filters?: FileDialogFilter[]) => Promise<string | null>;
|
|
267
268
|
|
|
268
269
|
/**
|
|
269
270
|
* Open a native dialog to select either a file or a folder and return the chosen path
|