@pptb/types 1.0.19-beta.2 → 1.0.19-beta.3
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 +136 -0
- package/package.json +1 -1
package/dataverseAPI.d.ts
CHANGED
|
@@ -58,6 +58,36 @@ declare namespace DataverseAPI {
|
|
|
58
58
|
[key: string]: unknown;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
/**
|
|
62
|
+
* EntityReference for Function parameters
|
|
63
|
+
* User-friendly format that accepts entity logical name instead of requiring manual entity set name pluralization
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* // User-friendly format (recommended)
|
|
67
|
+
* const target: EntityReference = {
|
|
68
|
+
* entityLogicalName: 'account',
|
|
69
|
+
* id: 'guid-here'
|
|
70
|
+
* };
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* // Advanced format (also supported)
|
|
74
|
+
* const target = {
|
|
75
|
+
* '@odata.id': 'accounts(guid-here)'
|
|
76
|
+
* };
|
|
77
|
+
*/
|
|
78
|
+
export interface EntityReference {
|
|
79
|
+
/**
|
|
80
|
+
* Logical name of the entity (e.g., 'account', 'contact', 'systemuser')
|
|
81
|
+
* Will be automatically converted to entity set name (e.g., 'accounts', 'contacts', 'systemusers')
|
|
82
|
+
*/
|
|
83
|
+
entityLogicalName: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* GUID of the record
|
|
87
|
+
*/
|
|
88
|
+
id: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
61
91
|
/**
|
|
62
92
|
* Execute operation request
|
|
63
93
|
*/
|
|
@@ -84,6 +114,112 @@ declare namespace DataverseAPI {
|
|
|
84
114
|
|
|
85
115
|
/**
|
|
86
116
|
* Parameters to pass to the operation
|
|
117
|
+
*
|
|
118
|
+
* ## For Functions (GET requests):
|
|
119
|
+
* Parameters are passed in the URL query string using parameter aliases.
|
|
120
|
+
*
|
|
121
|
+
* ### Parameter Types:
|
|
122
|
+
* - **Primitives**:
|
|
123
|
+
* - Strings: Automatically wrapped in single quotes (e.g., 'Pacific Standard Time')
|
|
124
|
+
* - Numbers: Passed as-is (e.g., 1033)
|
|
125
|
+
* - Booleans: Lowercase true/false
|
|
126
|
+
* - null: Passed as null
|
|
127
|
+
*
|
|
128
|
+
* - **EntityReference**:
|
|
129
|
+
* - Recommended: `{ entityLogicalName: 'account', id: 'guid' }`
|
|
130
|
+
* - Advanced: `{ '@odata.id': 'accounts(guid)' }`
|
|
131
|
+
*
|
|
132
|
+
* - **Enum values**:
|
|
133
|
+
* - Must use Microsoft.Dynamics.CRM prefix format
|
|
134
|
+
* - Single value: `"Microsoft.Dynamics.CRM.EntityFilters'Entity'"`
|
|
135
|
+
* - Multiple values: `"Microsoft.Dynamics.CRM.EntityFilters'Entity,Attributes,Relationships'"`
|
|
136
|
+
*
|
|
137
|
+
* - **Complex objects**: Will be JSON serialized (e.g., PagingInfo)
|
|
138
|
+
* - **Arrays**: Will be JSON serialized
|
|
139
|
+
*
|
|
140
|
+
* ## For Actions (POST requests):
|
|
141
|
+
* All parameters are passed in the request body as JSON.
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* // WhoAmI - Unbound function with no parameters
|
|
145
|
+
* {
|
|
146
|
+
* operationName: 'WhoAmI',
|
|
147
|
+
* operationType: 'function'
|
|
148
|
+
* // No parameters needed
|
|
149
|
+
* }
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* // RetrieveUserQueues - Bound function with boolean parameter
|
|
153
|
+
* {
|
|
154
|
+
* entityName: 'systemuser',
|
|
155
|
+
* entityId: 'user-guid-here',
|
|
156
|
+
* operationName: 'RetrieveUserQueues',
|
|
157
|
+
* operationType: 'function',
|
|
158
|
+
* parameters: {
|
|
159
|
+
* IncludePublic: true
|
|
160
|
+
* }
|
|
161
|
+
* }
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* // CalculateRollupField - Unbound function with EntityReference and string
|
|
165
|
+
* {
|
|
166
|
+
* operationName: 'CalculateRollupField',
|
|
167
|
+
* operationType: 'function',
|
|
168
|
+
* parameters: {
|
|
169
|
+
* Target: { entityLogicalName: 'account', id: 'account-guid-here' },
|
|
170
|
+
* FieldName: 'new_totalrevenue'
|
|
171
|
+
* }
|
|
172
|
+
* }
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* // GetTimeZoneCodeByLocalizedName - Unbound function with string and number
|
|
176
|
+
* {
|
|
177
|
+
* operationName: 'GetTimeZoneCodeByLocalizedName',
|
|
178
|
+
* operationType: 'function',
|
|
179
|
+
* parameters: {
|
|
180
|
+
* LocalizedStandardName: 'Pacific Standard Time',
|
|
181
|
+
* LocaleId: 1033
|
|
182
|
+
* }
|
|
183
|
+
* }
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* // RetrieveAllEntities - Unbound function with enum and boolean
|
|
187
|
+
* {
|
|
188
|
+
* operationName: 'RetrieveAllEntities',
|
|
189
|
+
* operationType: 'function',
|
|
190
|
+
* parameters: {
|
|
191
|
+
* EntityFilters: "Microsoft.Dynamics.CRM.EntityFilters'Entity,Attributes,Relationships'",
|
|
192
|
+
* RetrieveAsIfPublished: false
|
|
193
|
+
* }
|
|
194
|
+
* }
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* // RetrieveAttributeChangeHistory - Unbound function with EntityReference, string, and complex object
|
|
198
|
+
* {
|
|
199
|
+
* operationName: 'RetrieveAttributeChangeHistory',
|
|
200
|
+
* operationType: 'function',
|
|
201
|
+
* parameters: {
|
|
202
|
+
* Target: { entityLogicalName: 'account', id: 'account-guid-here' },
|
|
203
|
+
* AttributeLogicalName: 'name',
|
|
204
|
+
* PagingInfo: {
|
|
205
|
+
* PageNumber: 1,
|
|
206
|
+
* Count: 10,
|
|
207
|
+
* ReturnTotalRecordCount: true
|
|
208
|
+
* }
|
|
209
|
+
* }
|
|
210
|
+
* }
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* // ImportSolution - Unbound action with parameters in body
|
|
214
|
+
* {
|
|
215
|
+
* operationName: 'ImportSolution',
|
|
216
|
+
* operationType: 'action',
|
|
217
|
+
* parameters: {
|
|
218
|
+
* CustomizationFile: 'base64-encoded-solution-zip',
|
|
219
|
+
* PublishWorkflows: true,
|
|
220
|
+
* OverwriteUnmanagedCustomizations: false
|
|
221
|
+
* }
|
|
222
|
+
* }
|
|
87
223
|
*/
|
|
88
224
|
parameters?: Record<string, unknown>;
|
|
89
225
|
}
|