n8n-nodes-ms-dataverse 0.6.4 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +93 -9
- package/dist/nodes/Dataverse/Dataverse.node.d.ts +1 -1
- package/dist/nodes/Dataverse/Dataverse.node.js +17 -0
- package/dist/nodes/Dataverse/Dataverse.node.js.map +1 -1
- package/dist/nodes/Dataverse/descriptions.d.ts +2 -0
- package/dist/nodes/Dataverse/descriptions.js +280 -5
- package/dist/nodes/Dataverse/descriptions.js.map +1 -1
- package/dist/nodes/Dataverse/operations/RecordOperations.d.ts +3 -0
- package/dist/nodes/Dataverse/operations/RecordOperations.js +188 -0
- package/dist/nodes/Dataverse/operations/RecordOperations.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,10 +31,14 @@ This node supports the following operations on Dataverse records:
|
|
|
31
31
|
### Record Operations
|
|
32
32
|
|
|
33
33
|
- **Create**: Create a new record in a table
|
|
34
|
-
- **Delete**: Delete a record by ID
|
|
34
|
+
- **Delete**: Delete a record by ID or alternate key
|
|
35
35
|
- **Get**: Retrieve a single record by ID or alternate key
|
|
36
36
|
- **Get Many**: Retrieve multiple records using OData queries or FetchXML
|
|
37
|
-
- **Update**: Update an existing record
|
|
37
|
+
- **Update**: Update an existing record by ID or alternate key
|
|
38
|
+
- **Upsert**: Create a new record or update if it exists (based on alternate key)
|
|
39
|
+
- **Share Access Add**: Grant access to a record for a user or team
|
|
40
|
+
- **Share Access List**: List all users and teams who have access to a record
|
|
41
|
+
- **Share Access Revoke**: Revoke access to a record from a user or team
|
|
38
42
|
|
|
39
43
|
### SQL Query via TDS (Read-Only)
|
|
40
44
|
|
|
@@ -91,14 +95,16 @@ For text-based types (JS, CSS, HTML, XML), provide raw code — it will be base6
|
|
|
91
95
|
### Features
|
|
92
96
|
|
|
93
97
|
- **Dynamic Table Discovery**: Automatically loads available tables from your Dataverse environment using the OData metadata endpoint
|
|
94
|
-
- **Field
|
|
98
|
+
- **Dynamic Field Selection**: Field names load from table metadata with dropdowns showing display name, logical name, and type
|
|
99
|
+
- **Alternate Key Support**: All record operations (Get, Update, Delete, Share) support alternate keys with dynamic field selection
|
|
95
100
|
- **Image & File Downloads**: Automatically detect and download image and file fields as binary data
|
|
96
101
|
- **OData Support**: Use OData query syntax for filtering, sorting, and selecting fields
|
|
97
102
|
- **FetchXML Support**: Execute complex queries using FetchXML
|
|
98
103
|
- **TDS/SQL Support**: Execute SQL queries for complex data retrieval and analysis
|
|
99
|
-
- **
|
|
100
|
-
- **
|
|
104
|
+
- **JSON Input Mode**: Create, Update, and Upsert operations support both field collection and JSON input modes
|
|
105
|
+
- **Access Control**: Share records with users/teams, list access, and revoke access with UPN/team name lookup
|
|
101
106
|
- **Custom Authentication**: Use custom environment URL and access token for environments without OAuth2 setup
|
|
107
|
+
- **Enhanced Error Messages**: Detailed error messages with HTTP status codes and Dataverse error codes
|
|
102
108
|
|
|
103
109
|
## Credentials
|
|
104
110
|
|
|
@@ -188,10 +194,13 @@ Use this option when you have an access token but don't have OAuth2 configured i
|
|
|
188
194
|
|
|
189
195
|
### Using Alternate Keys
|
|
190
196
|
|
|
191
|
-
|
|
197
|
+
Alternate keys allow you to identify records using business keys instead of GUIDs. Supported operations: Get, Update, Delete, Upsert, Share Access Add, Share Access List, Share Access Revoke.
|
|
198
|
+
|
|
199
|
+
1. Select any supported operation
|
|
192
200
|
2. Choose **Alternate Key** as Record ID Type
|
|
193
|
-
3.
|
|
194
|
-
4.
|
|
201
|
+
3. Select key name from dropdown (loads from table's defined alternate keys)
|
|
202
|
+
4. Enter the key value
|
|
203
|
+
5. Execute the workflow
|
|
195
204
|
|
|
196
205
|
### Example: Get Account by Email
|
|
197
206
|
|
|
@@ -200,10 +209,85 @@ Operation: Get
|
|
|
200
209
|
Table: accounts
|
|
201
210
|
Record ID Type: Alternate Key
|
|
202
211
|
Alternate Keys:
|
|
203
|
-
- Key Name: emailaddress1
|
|
212
|
+
- Key Name: emailaddress1 (selected from dropdown)
|
|
204
213
|
- Key Value: contact@example.com
|
|
205
214
|
```
|
|
206
215
|
|
|
216
|
+
### Using Upsert Operation
|
|
217
|
+
|
|
218
|
+
Upsert creates a new record if it doesn't exist, or updates it if it does (based on alternate keys).
|
|
219
|
+
|
|
220
|
+
**With Alternate Keys** (Update or Create):
|
|
221
|
+
```
|
|
222
|
+
Operation: Upsert
|
|
223
|
+
Table: ssl_certs
|
|
224
|
+
Alternate Keys:
|
|
225
|
+
- Key Name: domain
|
|
226
|
+
- Key Value: example.com
|
|
227
|
+
Fields:
|
|
228
|
+
- Field Name: status
|
|
229
|
+
- Field Value: active
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**Without Alternate Keys** (Always Create):
|
|
233
|
+
```
|
|
234
|
+
Operation: Upsert
|
|
235
|
+
Table: contacts
|
|
236
|
+
Fields:
|
|
237
|
+
- Field Name: firstname
|
|
238
|
+
- Field Value: John
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Managing Record Access
|
|
242
|
+
|
|
243
|
+
#### Share Access with User (by Email/UPN)
|
|
244
|
+
|
|
245
|
+
```
|
|
246
|
+
Operation: Share Access Add
|
|
247
|
+
Table: accounts
|
|
248
|
+
Record ID Type: Primary Key (ID)
|
|
249
|
+
Record ID: abc-123-def-456
|
|
250
|
+
Principal Type: User
|
|
251
|
+
Principal ID Type: UPN (User Principal Name)
|
|
252
|
+
User Principal Name: user@example.com
|
|
253
|
+
Access Rights: Read, Write
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
#### Share Access with Team (by Name)
|
|
257
|
+
|
|
258
|
+
```
|
|
259
|
+
Operation: Share Access Add
|
|
260
|
+
Table: accounts
|
|
261
|
+
Record ID Type: Alternate Key
|
|
262
|
+
Alternate Keys:
|
|
263
|
+
- Key Name: accountnumber
|
|
264
|
+
- Key Value: ACC-001
|
|
265
|
+
Principal Type: Team
|
|
266
|
+
Team Name: Sales Team
|
|
267
|
+
Access Rights: Read, Write, Delete
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
#### List Who Has Access
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
Operation: Share Access List
|
|
274
|
+
Table: accounts
|
|
275
|
+
Record ID: abc-123-def-456
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Returns all users and teams with access and their permission levels.
|
|
279
|
+
|
|
280
|
+
#### Revoke Access
|
|
281
|
+
|
|
282
|
+
```
|
|
283
|
+
Operation: Share Access Revoke
|
|
284
|
+
Table: accounts
|
|
285
|
+
Record ID: abc-123-def-456
|
|
286
|
+
Principal Type: User
|
|
287
|
+
Principal ID Type: UPN
|
|
288
|
+
User Principal Name: user@example.com
|
|
289
|
+
```
|
|
290
|
+
|
|
207
291
|
### Executing SQL Queries via TDS
|
|
208
292
|
|
|
209
293
|
#### Prerequisites
|
|
@@ -2,7 +2,7 @@ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescrip
|
|
|
2
2
|
import { searchTables, getTableFieldsForDisplay, getTableFieldNames, getAlternateKeyFields } from './GenericFunctions';
|
|
3
3
|
export type RecordIdType = 'id' | 'alternateKey';
|
|
4
4
|
export type QueryType = 'odata' | 'fetchxml';
|
|
5
|
-
export type Operation = 'create' | 'delete' | 'get' | 'getMany' | 'update' | 'upsert' | 'executeQuery' | 'registerEndpoint' | 'registerWebhookStep' | 'listEndpoints' | 'deleteEndpoint' | 'listEndpointSteps' | 'deleteStep' | 'listSdkMessageFilters' | 'uploadPluginAssembly' | 'registerPluginStep' | 'listPluginAssemblies' | 'deletePluginAssembly' | 'uploadWebResource' | 'updateWebResource' | 'listWebResources' | 'deleteWebResource';
|
|
5
|
+
export type Operation = 'create' | 'delete' | 'get' | 'getMany' | 'update' | 'upsert' | 'shareAccessAdd' | 'shareAccessList' | 'shareAccessRevoke' | 'executeQuery' | 'registerEndpoint' | 'registerWebhookStep' | 'listEndpoints' | 'deleteEndpoint' | 'listEndpointSteps' | 'deleteStep' | 'listSdkMessageFilters' | 'uploadPluginAssembly' | 'registerPluginStep' | 'listPluginAssemblies' | 'deletePluginAssembly' | 'uploadWebResource' | 'updateWebResource' | 'listWebResources' | 'deleteWebResource';
|
|
6
6
|
export declare class Dataverse implements INodeType {
|
|
7
7
|
description: INodeTypeDescription;
|
|
8
8
|
methods: {
|
|
@@ -54,6 +54,8 @@ class Dataverse {
|
|
|
54
54
|
...descriptions_1.getOperationFields,
|
|
55
55
|
...descriptions_1.updateOperationFields,
|
|
56
56
|
...descriptions_1.upsertOperationFields,
|
|
57
|
+
...descriptions_1.shareOperationFields,
|
|
58
|
+
...descriptions_1.revokeAccessOperationFields,
|
|
57
59
|
...descriptions_1.getManyOperationFields,
|
|
58
60
|
...descriptions_1.sqlQueryFields,
|
|
59
61
|
descriptions_1.optionsDescription,
|
|
@@ -108,6 +110,21 @@ class Dataverse {
|
|
|
108
110
|
result = { json: upsertResult, pairedItem: { item: i } };
|
|
109
111
|
break;
|
|
110
112
|
}
|
|
113
|
+
case 'shareAccessAdd': {
|
|
114
|
+
const shareResult = await RecordOperations_1.shareRecord.call(this, table, i);
|
|
115
|
+
result = { json: shareResult, pairedItem: { item: i } };
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
case 'shareAccessList': {
|
|
119
|
+
const listResult = await RecordOperations_1.listSharedUsers.call(this, table, i);
|
|
120
|
+
result = { json: listResult, pairedItem: { item: i } };
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
case 'shareAccessRevoke': {
|
|
124
|
+
const revokeResult = await RecordOperations_1.revokeAccess.call(this, table, i);
|
|
125
|
+
result = { json: revokeResult, pairedItem: { item: i } };
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
111
128
|
case 'delete': {
|
|
112
129
|
const deleteResult = await RecordOperations_1.deleteRecord.call(this, table, i);
|
|
113
130
|
result = { json: deleteResult, pairedItem: { item: i } };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dataverse.node.js","sourceRoot":"","sources":["../../../nodes/Dataverse/Dataverse.node.ts"],"names":[],"mappings":";;;AAMA,+CAAkD;AAElD,yDAAuH;AACvH,
|
|
1
|
+
{"version":3,"file":"Dataverse.node.js","sourceRoot":"","sources":["../../../nodes/Dataverse/Dataverse.node.ts"],"names":[],"mappings":";;;AAMA,+CAAkD;AAElD,yDAAuH;AACvH,iDAqBwB;AACxB,oEAUuC;AACvC,oEAKuC;AACvC,8EAK4C;AAC5C,8DAA6D;AAC7D,sEAQwC;AAMxC,MAAa,SAAS;IAAtB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,oBAAoB;YAC1B,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE;gBACT,IAAI,EAAE,WAAW;aACjB;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,oBAAoB;oBAC1B,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,eAAe,EAAE;gBAChB,OAAO,EAAE,kCAAkC;gBAC3C,OAAO,EAAE;oBACR,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,kBAAkB;iBAClC;aACD;YACD,UAAU,EAAE;gBACX,kCAAmB;gBACnB,mCAAoB;gBACpB,sCAAuB;gBACvB,yCAA0B;gBAC1B,GAAG,oCAAqB;gBACxB,8CAA+B;gBAC/B,GAAG,yCAA0B;gBAC7B,0CAA2B;gBAC3B,GAAG,qCAAsB;gBACzB,+BAAgB;gBAChB,kCAAmB;gBACnB,GAAG,oCAAqB;gBACxB,GAAG,iCAAkB;gBACrB,GAAG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C,OAAO;yBACpB;wBACD,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;qBACvB,CAAC,CAAC;oBACH,SAAS;gBACV,CAAC;gBACD,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE;oBACnD,SAAS,EAAE,CAAC;iBACZ,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AAjSD,8BAiSC"}
|
|
@@ -7,6 +7,8 @@ export declare const fieldSchemaSelector: INodeProperties;
|
|
|
7
7
|
export declare const createOperationFields: INodeProperties[];
|
|
8
8
|
export declare const getOperationFields: INodeProperties[];
|
|
9
9
|
export declare const upsertOperationFields: INodeProperties[];
|
|
10
|
+
export declare const shareOperationFields: INodeProperties[];
|
|
11
|
+
export declare const revokeAccessOperationFields: INodeProperties[];
|
|
10
12
|
export declare const updateOperationFields: INodeProperties[];
|
|
11
13
|
export declare const getManyOperationFields: INodeProperties[];
|
|
12
14
|
export declare const webhookOperationDescription: INodeProperties;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.webResourceOperationFields = exports.webResourceOperationDescription = exports.pluginOperationFields = exports.pluginOperationDescription = exports.sqlQueryFields = exports.sqlOperationDescription = exports.webhookOperationFields = exports.webhookOperationDescription = exports.getManyOperationFields = exports.updateOperationFields = exports.upsertOperationFields = exports.getOperationFields = exports.createOperationFields = exports.fieldSchemaSelector = exports.tableDescription = exports.optionsDescription = exports.operationDescription = exports.resourceDescription = void 0;
|
|
3
|
+
exports.webResourceOperationFields = exports.webResourceOperationDescription = exports.pluginOperationFields = exports.pluginOperationDescription = exports.sqlQueryFields = exports.sqlOperationDescription = exports.webhookOperationFields = exports.webhookOperationDescription = exports.getManyOperationFields = exports.updateOperationFields = exports.revokeAccessOperationFields = exports.shareOperationFields = exports.upsertOperationFields = exports.getOperationFields = exports.createOperationFields = exports.fieldSchemaSelector = exports.tableDescription = exports.optionsDescription = exports.operationDescription = exports.resourceDescription = void 0;
|
|
4
4
|
exports.resourceDescription = {
|
|
5
5
|
displayName: 'Resource',
|
|
6
6
|
name: 'resource',
|
|
@@ -77,6 +77,24 @@ exports.operationDescription = {
|
|
|
77
77
|
description: 'Create a new record or update if it exists (based on alternate key)',
|
|
78
78
|
action: 'Upsert a record',
|
|
79
79
|
},
|
|
80
|
+
{
|
|
81
|
+
name: 'Share Access Add',
|
|
82
|
+
value: 'shareAccessAdd',
|
|
83
|
+
description: 'Share a record with a user or team',
|
|
84
|
+
action: 'Share access add',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: 'Share Access List',
|
|
88
|
+
value: 'shareAccessList',
|
|
89
|
+
description: 'List users and teams who have access to a record',
|
|
90
|
+
action: 'Share access list',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: 'Share Access Revoke',
|
|
94
|
+
value: 'shareAccessRevoke',
|
|
95
|
+
description: 'Revoke access to a record from a user or team',
|
|
96
|
+
action: 'Share access revoke',
|
|
97
|
+
},
|
|
80
98
|
],
|
|
81
99
|
default: 'get',
|
|
82
100
|
};
|
|
@@ -258,7 +276,7 @@ exports.fieldSchemaSelector = {
|
|
|
258
276
|
},
|
|
259
277
|
displayOptions: {
|
|
260
278
|
show: {
|
|
261
|
-
resource: ['
|
|
279
|
+
resource: ['sql'],
|
|
262
280
|
},
|
|
263
281
|
},
|
|
264
282
|
default: '',
|
|
@@ -356,7 +374,7 @@ exports.getOperationFields = [
|
|
|
356
374
|
displayOptions: {
|
|
357
375
|
show: {
|
|
358
376
|
resource: ['record'],
|
|
359
|
-
operation: ['get', 'update', 'delete'],
|
|
377
|
+
operation: ['get', 'update', 'delete', 'shareAccessAdd', 'shareAccessList', 'shareAccessRevoke'],
|
|
360
378
|
},
|
|
361
379
|
},
|
|
362
380
|
options: [
|
|
@@ -381,7 +399,7 @@ exports.getOperationFields = [
|
|
|
381
399
|
displayOptions: {
|
|
382
400
|
show: {
|
|
383
401
|
resource: ['record'],
|
|
384
|
-
operation: ['get', 'delete', 'update'],
|
|
402
|
+
operation: ['get', 'delete', 'update', 'shareAccessAdd', 'shareAccessList', 'shareAccessRevoke'],
|
|
385
403
|
recordIdType: ['id'],
|
|
386
404
|
},
|
|
387
405
|
},
|
|
@@ -402,7 +420,7 @@ exports.getOperationFields = [
|
|
|
402
420
|
displayOptions: {
|
|
403
421
|
show: {
|
|
404
422
|
resource: ['record'],
|
|
405
|
-
operation: ['get', 'update', 'delete'],
|
|
423
|
+
operation: ['get', 'update', 'delete', 'shareAccessAdd', 'shareAccessList', 'shareAccessRevoke'],
|
|
406
424
|
recordIdType: ['alternateKey'],
|
|
407
425
|
},
|
|
408
426
|
},
|
|
@@ -573,6 +591,263 @@ exports.upsertOperationFields = [
|
|
|
573
591
|
},
|
|
574
592
|
},
|
|
575
593
|
];
|
|
594
|
+
exports.shareOperationFields = [
|
|
595
|
+
{
|
|
596
|
+
displayName: 'Principal Type',
|
|
597
|
+
name: 'principalType',
|
|
598
|
+
type: 'options',
|
|
599
|
+
options: [
|
|
600
|
+
{
|
|
601
|
+
name: 'User',
|
|
602
|
+
value: 'systemuser',
|
|
603
|
+
description: 'Share with a user',
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
name: 'Team',
|
|
607
|
+
value: 'team',
|
|
608
|
+
description: 'Share with a team',
|
|
609
|
+
},
|
|
610
|
+
],
|
|
611
|
+
default: 'systemuser',
|
|
612
|
+
required: true,
|
|
613
|
+
displayOptions: {
|
|
614
|
+
show: {
|
|
615
|
+
resource: ['record'],
|
|
616
|
+
operation: ['shareAccessAdd'],
|
|
617
|
+
},
|
|
618
|
+
},
|
|
619
|
+
description: 'Type of principal to share with',
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
displayName: 'Principal ID Type',
|
|
623
|
+
name: 'principalIdType',
|
|
624
|
+
type: 'options',
|
|
625
|
+
options: [
|
|
626
|
+
{
|
|
627
|
+
name: 'GUID',
|
|
628
|
+
value: 'guid',
|
|
629
|
+
description: 'Use the principal ID (GUID)',
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
name: 'UPN (User Principal Name)',
|
|
633
|
+
value: 'upn',
|
|
634
|
+
description: 'Use email/UPN (will lookup the GUID)',
|
|
635
|
+
},
|
|
636
|
+
],
|
|
637
|
+
default: 'upn',
|
|
638
|
+
required: true,
|
|
639
|
+
displayOptions: {
|
|
640
|
+
show: {
|
|
641
|
+
resource: ['record'],
|
|
642
|
+
operation: ['shareAccessAdd'],
|
|
643
|
+
principalType: ['systemuser'],
|
|
644
|
+
},
|
|
645
|
+
},
|
|
646
|
+
description: 'How to identify the user',
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
displayName: 'Principal ID (GUID)',
|
|
650
|
+
name: 'principalId',
|
|
651
|
+
type: 'string',
|
|
652
|
+
required: true,
|
|
653
|
+
default: '',
|
|
654
|
+
displayOptions: {
|
|
655
|
+
show: {
|
|
656
|
+
resource: ['record'],
|
|
657
|
+
operation: ['shareAccessAdd'],
|
|
658
|
+
principalIdType: ['guid'],
|
|
659
|
+
},
|
|
660
|
+
},
|
|
661
|
+
description: 'GUID of the user or team',
|
|
662
|
+
placeholder: 'e.g. 00000000-0000-0000-0000-000000000000',
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
displayName: 'User Principal Name (Email)',
|
|
666
|
+
name: 'principalUpn',
|
|
667
|
+
type: 'string',
|
|
668
|
+
required: true,
|
|
669
|
+
default: '',
|
|
670
|
+
displayOptions: {
|
|
671
|
+
show: {
|
|
672
|
+
resource: ['record'],
|
|
673
|
+
operation: ['shareAccessAdd'],
|
|
674
|
+
principalIdType: ['upn'],
|
|
675
|
+
},
|
|
676
|
+
},
|
|
677
|
+
description: 'Email address or User Principal Name of the user',
|
|
678
|
+
placeholder: 'e.g. user@example.com',
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
displayName: 'Team Name',
|
|
682
|
+
name: 'teamName',
|
|
683
|
+
type: 'string',
|
|
684
|
+
required: true,
|
|
685
|
+
default: '',
|
|
686
|
+
displayOptions: {
|
|
687
|
+
show: {
|
|
688
|
+
resource: ['record'],
|
|
689
|
+
operation: ['shareAccessAdd'],
|
|
690
|
+
principalType: ['team'],
|
|
691
|
+
},
|
|
692
|
+
},
|
|
693
|
+
description: 'Name of the team (will lookup the GUID)',
|
|
694
|
+
placeholder: 'e.g. Sales Team',
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
displayName: 'Access Rights',
|
|
698
|
+
name: 'accessRights',
|
|
699
|
+
type: 'multiOptions',
|
|
700
|
+
options: [
|
|
701
|
+
{
|
|
702
|
+
name: 'Read',
|
|
703
|
+
value: 'ReadAccess',
|
|
704
|
+
description: 'Read access to the record',
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
name: 'Write',
|
|
708
|
+
value: 'WriteAccess',
|
|
709
|
+
description: 'Write access to the record',
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
name: 'Delete',
|
|
713
|
+
value: 'DeleteAccess',
|
|
714
|
+
description: 'Delete access to the record',
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
name: 'Append',
|
|
718
|
+
value: 'AppendAccess',
|
|
719
|
+
description: 'Append access to the record',
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
name: 'Append To',
|
|
723
|
+
value: 'AppendToAccess',
|
|
724
|
+
description: 'Append to access to the record',
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
name: 'Assign',
|
|
728
|
+
value: 'AssignAccess',
|
|
729
|
+
description: 'Assign access to the record',
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
name: 'Share',
|
|
733
|
+
value: 'ShareAccess',
|
|
734
|
+
description: 'Share access to the record',
|
|
735
|
+
},
|
|
736
|
+
],
|
|
737
|
+
default: ['ReadAccess', 'WriteAccess'],
|
|
738
|
+
required: true,
|
|
739
|
+
displayOptions: {
|
|
740
|
+
show: {
|
|
741
|
+
resource: ['record'],
|
|
742
|
+
operation: ['shareAccessAdd'],
|
|
743
|
+
},
|
|
744
|
+
},
|
|
745
|
+
description: 'Access rights to grant',
|
|
746
|
+
},
|
|
747
|
+
];
|
|
748
|
+
exports.revokeAccessOperationFields = [
|
|
749
|
+
{
|
|
750
|
+
displayName: 'Principal Type',
|
|
751
|
+
name: 'principalType',
|
|
752
|
+
type: 'options',
|
|
753
|
+
options: [
|
|
754
|
+
{
|
|
755
|
+
name: 'User',
|
|
756
|
+
value: 'systemuser',
|
|
757
|
+
description: 'Revoke access from a user',
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
name: 'Team',
|
|
761
|
+
value: 'team',
|
|
762
|
+
description: 'Revoke access from a team',
|
|
763
|
+
},
|
|
764
|
+
],
|
|
765
|
+
default: 'systemuser',
|
|
766
|
+
required: true,
|
|
767
|
+
displayOptions: {
|
|
768
|
+
show: {
|
|
769
|
+
resource: ['record'],
|
|
770
|
+
operation: ['shareAccessRevoke'],
|
|
771
|
+
},
|
|
772
|
+
},
|
|
773
|
+
description: 'Type of principal to revoke access from',
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
displayName: 'Principal ID Type',
|
|
777
|
+
name: 'principalIdType',
|
|
778
|
+
type: 'options',
|
|
779
|
+
options: [
|
|
780
|
+
{
|
|
781
|
+
name: 'GUID',
|
|
782
|
+
value: 'guid',
|
|
783
|
+
description: 'Use the principal ID (GUID)',
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
name: 'UPN (User Principal Name)',
|
|
787
|
+
value: 'upn',
|
|
788
|
+
description: 'Use email/UPN (will lookup the GUID)',
|
|
789
|
+
},
|
|
790
|
+
],
|
|
791
|
+
default: 'upn',
|
|
792
|
+
required: true,
|
|
793
|
+
displayOptions: {
|
|
794
|
+
show: {
|
|
795
|
+
resource: ['record'],
|
|
796
|
+
operation: ['shareAccessRevoke'],
|
|
797
|
+
principalType: ['systemuser'],
|
|
798
|
+
},
|
|
799
|
+
},
|
|
800
|
+
description: 'How to identify the user',
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
displayName: 'Principal ID (GUID)',
|
|
804
|
+
name: 'principalId',
|
|
805
|
+
type: 'string',
|
|
806
|
+
required: true,
|
|
807
|
+
default: '',
|
|
808
|
+
displayOptions: {
|
|
809
|
+
show: {
|
|
810
|
+
resource: ['record'],
|
|
811
|
+
operation: ['shareAccessRevoke'],
|
|
812
|
+
principalIdType: ['guid'],
|
|
813
|
+
},
|
|
814
|
+
},
|
|
815
|
+
description: 'GUID of the user or team',
|
|
816
|
+
placeholder: 'e.g. 00000000-0000-0000-0000-000000000000',
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
displayName: 'User Principal Name (Email)',
|
|
820
|
+
name: 'principalUpn',
|
|
821
|
+
type: 'string',
|
|
822
|
+
required: true,
|
|
823
|
+
default: '',
|
|
824
|
+
displayOptions: {
|
|
825
|
+
show: {
|
|
826
|
+
resource: ['record'],
|
|
827
|
+
operation: ['shareAccessRevoke'],
|
|
828
|
+
principalIdType: ['upn'],
|
|
829
|
+
},
|
|
830
|
+
},
|
|
831
|
+
description: 'Email address or User Principal Name of the user',
|
|
832
|
+
placeholder: 'e.g. user@example.com',
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
displayName: 'Team Name',
|
|
836
|
+
name: 'teamName',
|
|
837
|
+
type: 'string',
|
|
838
|
+
required: true,
|
|
839
|
+
default: '',
|
|
840
|
+
displayOptions: {
|
|
841
|
+
show: {
|
|
842
|
+
resource: ['record'],
|
|
843
|
+
operation: ['shareAccessRevoke'],
|
|
844
|
+
principalType: ['team'],
|
|
845
|
+
},
|
|
846
|
+
},
|
|
847
|
+
description: 'Name of the team (will lookup the GUID)',
|
|
848
|
+
placeholder: 'e.g. Sales Team',
|
|
849
|
+
},
|
|
850
|
+
];
|
|
576
851
|
exports.updateOperationFields = [
|
|
577
852
|
{
|
|
578
853
|
displayName: 'Fields Input Mode',
|