n8n-nodes-base 1.90.2 → 1.91.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.
Files changed (65) hide show
  1. package/dist/credentials/GSuiteAdminOAuth2Api.credentials.js +3 -1
  2. package/dist/credentials/GSuiteAdminOAuth2Api.credentials.js.map +1 -1
  3. package/dist/methods/defined.json +2 -1
  4. package/dist/methods/referenced.json +1 -0
  5. package/dist/nodes/Calendly/CalendlyTrigger.node.js +11 -0
  6. package/dist/nodes/Calendly/CalendlyTrigger.node.js.map +1 -1
  7. package/dist/nodes/EmailReadImap/v1/EmailReadImapV1.node.js +2 -2
  8. package/dist/nodes/EmailReadImap/v1/EmailReadImapV1.node.js.map +1 -1
  9. package/dist/nodes/EmailReadImap/v2/EmailReadImapV2.node.js +2 -2
  10. package/dist/nodes/EmailReadImap/v2/EmailReadImapV2.node.js.map +1 -1
  11. package/dist/nodes/Files/ReadWriteFile/actions/read.operation.js +0 -1
  12. package/dist/nodes/Files/ReadWriteFile/actions/read.operation.js.map +1 -1
  13. package/dist/nodes/Form/utils.js.map +1 -1
  14. package/dist/nodes/Google/GSuiteAdmin/DeviceDescription.js +381 -0
  15. package/dist/nodes/Google/GSuiteAdmin/DeviceDescription.js.map +1 -0
  16. package/dist/nodes/Google/GSuiteAdmin/GSuiteAdmin.node.js +395 -88
  17. package/dist/nodes/Google/GSuiteAdmin/GSuiteAdmin.node.js.map +1 -1
  18. package/dist/nodes/Google/GSuiteAdmin/GenericFunctions.js +6 -2
  19. package/dist/nodes/Google/GSuiteAdmin/GenericFunctions.js.map +1 -1
  20. package/dist/nodes/Google/GSuiteAdmin/GroupDescripion.js +112 -88
  21. package/dist/nodes/Google/GSuiteAdmin/GroupDescripion.js.map +1 -1
  22. package/dist/nodes/Google/GSuiteAdmin/SearchFunctions.js +101 -0
  23. package/dist/nodes/Google/GSuiteAdmin/SearchFunctions.js.map +1 -0
  24. package/dist/nodes/Google/GSuiteAdmin/UserDescription.js +538 -195
  25. package/dist/nodes/Google/GSuiteAdmin/UserDescription.js.map +1 -1
  26. package/dist/nodes/Google/GSuiteAdmin/gSuiteAdmin.svg +1 -0
  27. package/dist/nodes/HttpRequest/V2/HttpRequestV2.node.js +11 -0
  28. package/dist/nodes/HttpRequest/V2/HttpRequestV2.node.js.map +1 -1
  29. package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js +8 -0
  30. package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js.map +1 -1
  31. package/dist/nodes/Jira/GenericFunctions.js +25 -12
  32. package/dist/nodes/Jira/GenericFunctions.js.map +1 -1
  33. package/dist/nodes/Jira/Jira.node.js +11 -7
  34. package/dist/nodes/Jira/Jira.node.js.map +1 -1
  35. package/dist/nodes/LocalFileTrigger/LocalFileTrigger.node.js +2 -2
  36. package/dist/nodes/LocalFileTrigger/LocalFileTrigger.node.js.map +1 -1
  37. package/dist/nodes/MQTT/MqttTrigger.node.js +2 -2
  38. package/dist/nodes/MQTT/MqttTrigger.node.js.map +1 -1
  39. package/dist/nodes/Postgres/PostgresTrigger.node.js +2 -2
  40. package/dist/nodes/Postgres/PostgresTrigger.node.js.map +1 -1
  41. package/dist/nodes/RabbitMQ/RabbitMQTrigger.node.js +2 -2
  42. package/dist/nodes/RabbitMQ/RabbitMQTrigger.node.js.map +1 -1
  43. package/dist/nodes/SeaTable/v2/actions/asset/upload.operation.js.map +1 -1
  44. package/dist/nodes/SeaTable/v2/actions/row/get.operation.js.map +1 -1
  45. package/dist/nodes/SeaTable/v2/actions/row/list.operation.js.map +1 -1
  46. package/dist/nodes/SeaTable/v2/actions/row/search.operation.js.map +1 -1
  47. package/dist/nodes/SseTrigger/SseTrigger.node.js +2 -2
  48. package/dist/nodes/SseTrigger/SseTrigger.node.js.map +1 -1
  49. package/dist/test/nodes/Helpers.d.ts +5 -0
  50. package/dist/test/nodes/Helpers.js +16 -170
  51. package/dist/test/nodes/Helpers.js.map +1 -1
  52. package/dist/types/credentials.json +1 -1
  53. package/dist/types/nodes.json +10 -10
  54. package/package.json +7 -7
  55. package/dist/nodes/Google/GSuiteAdmin/google-workspace-admin.png +0 -0
  56. package/dist/test/nodes/ExecuteWorkflow.js +0 -120
  57. package/dist/test/nodes/ExecuteWorkflow.js.map +0 -1
  58. package/dist/test/nodes/credential-types.js +0 -57
  59. package/dist/test/nodes/credential-types.js.map +0 -1
  60. package/dist/test/nodes/credentials-helper.js +0 -76
  61. package/dist/test/nodes/credentials-helper.js.map +0 -1
  62. package/dist/test/nodes/load-nodes-and-credentials.js +0 -68
  63. package/dist/test/nodes/load-nodes-and-credentials.js.map +0 -1
  64. package/dist/test/nodes/node-types.js +0 -56
  65. package/dist/test/nodes/node-types.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../nodes/Google/GSuiteAdmin/GSuiteAdmin.node.ts"],"sourcesContent":["import type {\n\tIExecuteFunctions,\n\tIDataObject,\n\tILoadOptionsFunctions,\n\tINodeExecutionData,\n\tINodePropertyOptions,\n\tINodeType,\n\tINodeTypeDescription,\n} from 'n8n-workflow';\nimport { NodeConnectionTypes, NodeOperationError } from 'n8n-workflow';\n\nimport { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions';\nimport { groupFields, groupOperations } from './GroupDescripion';\nimport { userFields, userOperations } from './UserDescription';\n\nexport class GSuiteAdmin implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Google Workspace Admin',\n\t\tname: 'gSuiteAdmin',\n\t\t// eslint-disable-next-line n8n-nodes-base/node-class-description-icon-not-svg\n\t\ticon: 'file:google-workspace-admin.png',\n\t\tgroup: ['input'],\n\t\tversion: 1,\n\t\tsubtitle: '={{$parameter[\"operation\"] + \": \" + $parameter[\"resource\"]}}',\n\t\tdescription: 'Consume Google Workspace Admin API',\n\t\tdefaults: {\n\t\t\tname: 'Google Workspace Admin',\n\t\t},\n\t\tusableAsTool: true,\n\t\tinputs: [NodeConnectionTypes.Main],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'gSuiteAdminOAuth2Api',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Resource',\n\t\t\t\tname: 'resource',\n\t\t\t\ttype: 'options',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Group',\n\t\t\t\t\t\tvalue: 'group',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'User',\n\t\t\t\t\t\tvalue: 'user',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'user',\n\t\t\t},\n\t\t\t...groupOperations,\n\t\t\t...groupFields,\n\t\t\t...userOperations,\n\t\t\t...userFields,\n\t\t],\n\t};\n\n\tmethods = {\n\t\tloadOptions: {\n\t\t\t// Get all the domains to display them to user so that they can\n\t\t\t// select them easily\n\t\t\tasync getDomains(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {\n\t\t\t\tconst returnData: INodePropertyOptions[] = [];\n\t\t\t\tconst domains = await googleApiRequestAllItems.call(\n\t\t\t\t\tthis,\n\t\t\t\t\t'domains',\n\t\t\t\t\t'GET',\n\t\t\t\t\t'/directory/v1/customer/my_customer/domains',\n\t\t\t\t);\n\t\t\t\tfor (const domain of domains) {\n\t\t\t\t\tconst domainName = domain.domainName;\n\t\t\t\t\tconst domainId = domain.domainName;\n\t\t\t\t\treturnData.push({\n\t\t\t\t\t\tname: domainName,\n\t\t\t\t\t\tvalue: domainId,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn returnData;\n\t\t\t},\n\t\t\t// Get all the schemas to display them to user so that they can\n\t\t\t// select them easily\n\t\t\tasync getSchemas(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {\n\t\t\t\tconst returnData: INodePropertyOptions[] = [];\n\t\t\t\tconst schemas = await googleApiRequestAllItems.call(\n\t\t\t\t\tthis,\n\t\t\t\t\t'schemas',\n\t\t\t\t\t'GET',\n\t\t\t\t\t'/directory/v1/customer/my_customer/schemas',\n\t\t\t\t);\n\t\t\t\tfor (const schema of schemas) {\n\t\t\t\t\tconst schemaName = schema.displayName;\n\t\t\t\t\tconst schemaId = schema.schemaName;\n\t\t\t\t\treturnData.push({\n\t\t\t\t\t\tname: schemaName,\n\t\t\t\t\t\tvalue: schemaId,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn returnData;\n\t\t\t},\n\t\t},\n\t};\n\n\tasync execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\t\tconst items = this.getInputData();\n\t\tconst returnData: INodeExecutionData[] = [];\n\t\tconst length = items.length;\n\t\tconst qs: IDataObject = {};\n\t\tlet responseData;\n\t\tconst resource = this.getNodeParameter('resource', 0);\n\t\tconst operation = this.getNodeParameter('operation', 0);\n\t\tfor (let i = 0; i < length; i++) {\n\t\t\ttry {\n\t\t\t\tif (resource === 'group') {\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/groups/insert\n\t\t\t\t\tif (operation === 'create') {\n\t\t\t\t\t\tconst email = this.getNodeParameter('email', i) as string;\n\n\t\t\t\t\t\tconst additionalFields = this.getNodeParameter('additionalFields', i);\n\n\t\t\t\t\t\tconst body: IDataObject = {\n\t\t\t\t\t\t\temail,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tObject.assign(body, additionalFields);\n\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(this, 'POST', '/directory/v1/groups', body);\n\t\t\t\t\t}\n\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/groups/delete\n\t\t\t\t\tif (operation === 'delete') {\n\t\t\t\t\t\tconst groupId = this.getNodeParameter('groupId', i) as string;\n\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'DELETE',\n\t\t\t\t\t\t\t`/directory/v1/groups/${groupId}`,\n\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tresponseData = { success: true };\n\t\t\t\t\t}\n\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/groups/get\n\t\t\t\t\tif (operation === 'get') {\n\t\t\t\t\t\tconst groupId = this.getNodeParameter('groupId', i) as string;\n\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'GET',\n\t\t\t\t\t\t\t`/directory/v1/groups/${groupId}`,\n\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/groups/list\n\t\t\t\t\tif (operation === 'getAll') {\n\t\t\t\t\t\tconst returnAll = this.getNodeParameter('returnAll', i);\n\n\t\t\t\t\t\tconst options = this.getNodeParameter('options', i);\n\n\t\t\t\t\t\tObject.assign(qs, options);\n\n\t\t\t\t\t\tif (qs.customer === undefined) {\n\t\t\t\t\t\t\tqs.customer = 'my_customer';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (returnAll) {\n\t\t\t\t\t\t\tresponseData = await googleApiRequestAllItems.call(\n\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t'groups',\n\t\t\t\t\t\t\t\t'GET',\n\t\t\t\t\t\t\t\t'/directory/v1/groups',\n\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t\tqs,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tqs.maxResults = this.getNodeParameter('limit', i);\n\n\t\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t'GET',\n\t\t\t\t\t\t\t\t'/directory/v1/groups',\n\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t\tqs,\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tresponseData = responseData.groups;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/groups/update\n\t\t\t\t\tif (operation === 'update') {\n\t\t\t\t\t\tconst groupId = this.getNodeParameter('groupId', i) as string;\n\n\t\t\t\t\t\tconst updateFields = this.getNodeParameter('updateFields', i);\n\n\t\t\t\t\t\tconst body: IDataObject = {};\n\n\t\t\t\t\t\tObject.assign(body, updateFields);\n\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'PUT',\n\t\t\t\t\t\t\t`/directory/v1/groups/${groupId}`,\n\t\t\t\t\t\t\tbody,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (resource === 'user') {\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/users/insert\n\t\t\t\t\tif (operation === 'create') {\n\t\t\t\t\t\tconst domain = this.getNodeParameter('domain', i) as string;\n\n\t\t\t\t\t\tconst firstName = this.getNodeParameter('firstName', i) as string;\n\n\t\t\t\t\t\tconst lastName = this.getNodeParameter('lastName', i) as string;\n\n\t\t\t\t\t\tconst password = this.getNodeParameter('password', i) as string;\n\n\t\t\t\t\t\tconst username = this.getNodeParameter('username', i) as string;\n\n\t\t\t\t\t\tconst makeAdmin = this.getNodeParameter('makeAdmin', i) as boolean;\n\n\t\t\t\t\t\tconst additionalFields = this.getNodeParameter('additionalFields', i);\n\n\t\t\t\t\t\tconst body: IDataObject = {\n\t\t\t\t\t\t\tname: {\n\t\t\t\t\t\t\t\tfamilyName: lastName,\n\t\t\t\t\t\t\t\tgivenName: firstName,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tpassword,\n\t\t\t\t\t\t\tprimaryEmail: `${username}@${domain}`,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tObject.assign(body, additionalFields);\n\n\t\t\t\t\t\tif (additionalFields.phoneUi) {\n\t\t\t\t\t\t\tconst phones = (additionalFields.phoneUi as IDataObject).phoneValues as IDataObject[];\n\n\t\t\t\t\t\t\tbody.phones = phones;\n\n\t\t\t\t\t\t\tdelete body.phoneUi;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (additionalFields.emailUi) {\n\t\t\t\t\t\t\tconst emails = (additionalFields.emailUi as IDataObject).emailValues as IDataObject[];\n\n\t\t\t\t\t\t\tbody.emails = emails;\n\n\t\t\t\t\t\t\tdelete body.emailUi;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'POST',\n\t\t\t\t\t\t\t'/directory/v1/users',\n\t\t\t\t\t\t\tbody,\n\t\t\t\t\t\t\tqs,\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif (makeAdmin) {\n\t\t\t\t\t\t\tawait googleApiRequest.call(\n\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t'POST',\n\t\t\t\t\t\t\t\t`/directory/v1/users/${responseData.id}/makeAdmin`,\n\t\t\t\t\t\t\t\t{ status: true },\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tresponseData.isAdmin = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/users/delete\n\t\t\t\t\tif (operation === 'delete') {\n\t\t\t\t\t\tconst userId = this.getNodeParameter('userId', i) as string;\n\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'DELETE',\n\t\t\t\t\t\t\t`/directory/v1/users/${userId}`,\n\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tresponseData = { success: true };\n\t\t\t\t\t}\n\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/users/get\n\t\t\t\t\tif (operation === 'get') {\n\t\t\t\t\t\tconst userId = this.getNodeParameter('userId', i) as string;\n\n\t\t\t\t\t\tconst projection = this.getNodeParameter('projection', i) as string;\n\n\t\t\t\t\t\tconst options = this.getNodeParameter('options', i);\n\n\t\t\t\t\t\tqs.projection = projection;\n\n\t\t\t\t\t\tObject.assign(qs, options);\n\n\t\t\t\t\t\tif (qs.customFieldMask) {\n\t\t\t\t\t\t\tqs.customFieldMask = (qs.customFieldMask as string[]).join(' ');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (qs.projection === 'custom' && qs.customFieldMask === undefined) {\n\t\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\t\t\t'When projection is set to custom, the custom schemas field must be defined',\n\t\t\t\t\t\t\t\t{ itemIndex: i },\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'GET',\n\t\t\t\t\t\t\t`/directory/v1/users/${userId}`,\n\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\tqs,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/users/list\n\t\t\t\t\tif (operation === 'getAll') {\n\t\t\t\t\t\tconst returnAll = this.getNodeParameter('returnAll', i);\n\n\t\t\t\t\t\tconst projection = this.getNodeParameter('projection', i) as string;\n\n\t\t\t\t\t\tconst options = this.getNodeParameter('options', i);\n\n\t\t\t\t\t\tqs.projection = projection;\n\n\t\t\t\t\t\tObject.assign(qs, options);\n\n\t\t\t\t\t\tif (qs.customer === undefined) {\n\t\t\t\t\t\t\tqs.customer = 'my_customer';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (qs.customFieldMask) {\n\t\t\t\t\t\t\tqs.customFieldMask = (qs.customFieldMask as string[]).join(' ');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (qs.projection === 'custom' && qs.customFieldMask === undefined) {\n\t\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\t\t\t'When projection is set to custom, the custom schemas field must be defined',\n\t\t\t\t\t\t\t\t{ itemIndex: i },\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (returnAll) {\n\t\t\t\t\t\t\tresponseData = await googleApiRequestAllItems.call(\n\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t'users',\n\t\t\t\t\t\t\t\t'GET',\n\t\t\t\t\t\t\t\t'/directory/v1/users',\n\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t\tqs,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tqs.maxResults = this.getNodeParameter('limit', i);\n\n\t\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t'GET',\n\t\t\t\t\t\t\t\t'/directory/v1/users',\n\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t\tqs,\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tresponseData = responseData.users;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/users/update\n\t\t\t\t\tif (operation === 'update') {\n\t\t\t\t\t\tconst userId = this.getNodeParameter('userId', i) as string;\n\n\t\t\t\t\t\tconst updateFields = this.getNodeParameter('updateFields', i);\n\n\t\t\t\t\t\tconst body: {\n\t\t\t\t\t\t\tname: { givenName?: string; familyName?: string };\n\t\t\t\t\t\t\temails?: IDataObject[];\n\t\t\t\t\t\t\tphones?: IDataObject[];\n\t\t\t\t\t\t} = { name: {} };\n\n\t\t\t\t\t\tObject.assign(body, updateFields);\n\n\t\t\t\t\t\tif (updateFields.firstName) {\n\t\t\t\t\t\t\tbody.name.givenName = updateFields.firstName as string;\n\t\t\t\t\t\t\t//@ts-ignore\n\t\t\t\t\t\t\tdelete body.firstName;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (updateFields.lastName) {\n\t\t\t\t\t\t\tbody.name.familyName = updateFields.lastName as string;\n\t\t\t\t\t\t\t//@ts-ignore\n\t\t\t\t\t\t\tdelete body.lastName;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (Object.keys(body.name).length === 0) {\n\t\t\t\t\t\t\t//@ts-ignore\n\t\t\t\t\t\t\tdelete body.name;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (updateFields.phoneUi) {\n\t\t\t\t\t\t\tconst phones = (updateFields.phoneUi as IDataObject).phoneValues as IDataObject[];\n\n\t\t\t\t\t\t\tbody.phones = phones;\n\n\t\t\t\t\t\t\t//@ts-ignore\n\t\t\t\t\t\t\tdelete body.phoneUi;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (updateFields.emailUi) {\n\t\t\t\t\t\t\tconst emails = (updateFields.emailUi as IDataObject).emailValues as IDataObject[];\n\n\t\t\t\t\t\t\tbody.emails = emails;\n\n\t\t\t\t\t\t\t//@ts-ignore\n\t\t\t\t\t\t\tdelete body.emailUi;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'PUT',\n\t\t\t\t\t\t\t`/directory/v1/users/${userId}`,\n\t\t\t\t\t\t\tbody,\n\t\t\t\t\t\t\tqs,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst executionData = this.helpers.constructExecutionMetaData(\n\t\t\t\t\tthis.helpers.returnJsonArray(responseData as IDataObject[]),\n\t\t\t\t\t{ itemData: { item: i } },\n\t\t\t\t);\n\n\t\t\t\treturnData.push(...executionData);\n\t\t\t} catch (error) {\n\t\t\t\tif (this.continueOnFail()) {\n\t\t\t\t\tconst executionErrorData = this.helpers.constructExecutionMetaData(\n\t\t\t\t\t\tthis.helpers.returnJsonArray({ error: error.message }),\n\t\t\t\t\t\t{ itemData: { item: i } },\n\t\t\t\t\t);\n\t\t\t\t\treturnData.push(...executionErrorData);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t\treturn [returnData];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,0BAAwD;AAExD,8BAA2D;AAC3D,6BAA6C;AAC7C,6BAA2C;AAEpC,MAAM,YAAiC;AAAA,EAAvC;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA;AAAA,MAEN,MAAM;AAAA,MACN,OAAO,CAAC,OAAO;AAAA,MACf,SAAS;AAAA,MACT,UAAU;AAAA,MACV,aAAa;AAAA,MACb,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,cAAc;AAAA,MACd,QAAQ,CAAC,wCAAoB,IAAI;AAAA,MACjC,SAAS,CAAC,wCAAoB,IAAI;AAAA,MAClC,aAAa;AAAA,QACZ;AAAA,UACC,MAAM;AAAA,UACN,UAAU;AAAA,QACX;AAAA,MACD;AAAA,MACA,YAAY;AAAA,QACX;AAAA,UACC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM;AAAA,UACN,kBAAkB;AAAA,UAClB,SAAS;AAAA,YACR;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,YACR;AAAA,YACA;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,YACR;AAAA,UACD;AAAA,UACA,SAAS;AAAA,QACV;AAAA,QACA,GAAG;AAAA,QACH,GAAG;AAAA,QACH,GAAG;AAAA,QACH,GAAG;AAAA,MACJ;AAAA,IACD;AAEA,mBAAU;AAAA,MACT,aAAa;AAAA;AAAA;AAAA,QAGZ,MAAM,aAAyE;AAC9E,gBAAM,aAAqC,CAAC;AAC5C,gBAA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EAAE,MAAM,EAAE,EAAE;AAAA,QACzB;AAEA,mBAAW,KAAK,GAAG,aAAa;AAAA,MACjC,SAAS,OAAO;AACf,YAAI,KAAK,eAAe,GAAG;AAC1B,gBAAM,qBAAqB,KAAK,QAAQ;AAAA,YACvC,KAAK,QAAQ,gBAAgB,EAAE,OAAO,MAAM,QAAQ,CAAC;AAAA,YACrD,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE;AAAA,UACzB;AACA,qBAAW,KAAK,GAAG,kBAAkB;AACrC;AAAA,QACD;AACA,cAAM;AAAA,MACP;AAAA,IACD;AACA,WAAO,CAAC,UAAU;AAAA,EACnB;AACD;","names":[]}
1
+ {"version":3,"sources":["../../../../nodes/Google/GSuiteAdmin/GSuiteAdmin.node.ts"],"sourcesContent":["import type {\n\tIExecuteFunctions,\n\tIDataObject,\n\tILoadOptionsFunctions,\n\tINodeExecutionData,\n\tINodePropertyOptions,\n\tINodeType,\n\tINodeTypeDescription,\n} from 'n8n-workflow';\nimport { NodeConnectionTypes, NodeOperationError } from 'n8n-workflow';\n\nimport { deviceFields, deviceOperations } from './DeviceDescription';\nimport { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions';\nimport { groupFields, groupOperations } from './GroupDescripion';\nimport { searchDevices, searchGroups, searchUsers } from './SearchFunctions';\nimport { userFields, userOperations } from './UserDescription';\n\nexport class GSuiteAdmin implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Google Workspace Admin',\n\t\tname: 'gSuiteAdmin',\n\t\ticon: 'file:gSuiteAdmin.svg',\n\t\tgroup: ['input'],\n\t\tversion: 1,\n\t\tsubtitle: '={{$parameter[\"operation\"] + \": \" + $parameter[\"resource\"]}}',\n\t\tdescription: 'Consume Google Workspace Admin API',\n\t\tdefaults: {\n\t\t\tname: 'Google Workspace Admin',\n\t\t},\n\t\tusableAsTool: true,\n\t\tinputs: [NodeConnectionTypes.Main],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'gSuiteAdminOAuth2Api',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Resource',\n\t\t\t\tname: 'resource',\n\t\t\t\ttype: 'options',\n\t\t\t\tnoDataExpression: true,\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'ChromeOS Device',\n\t\t\t\t\t\tvalue: 'device',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Group',\n\t\t\t\t\t\tvalue: 'group',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'User',\n\t\t\t\t\t\tvalue: 'user',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: 'user',\n\t\t\t},\n\t\t\t...deviceOperations,\n\t\t\t...deviceFields,\n\t\t\t...groupOperations,\n\t\t\t...groupFields,\n\t\t\t...userOperations,\n\t\t\t...userFields,\n\t\t],\n\t};\n\n\tmethods = {\n\t\tloadOptions: {\n\t\t\tasync getDomains(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {\n\t\t\t\tconst returnData: INodePropertyOptions[] = [];\n\t\t\t\tconst domains = (await googleApiRequestAllItems.call(\n\t\t\t\t\tthis,\n\t\t\t\t\t'domains',\n\t\t\t\t\t'GET',\n\t\t\t\t\t'/directory/v1/customer/my_customer/domains',\n\t\t\t\t)) as Array<{\n\t\t\t\t\tdomainName: string;\n\t\t\t\t}>;\n\t\t\t\tfor (const domain of domains) {\n\t\t\t\t\tconst domainName = domain.domainName;\n\t\t\t\t\tconst domainId = domain.domainName;\n\t\t\t\t\treturnData.push({\n\t\t\t\t\t\tname: domainName,\n\t\t\t\t\t\tvalue: domainId,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn returnData;\n\t\t\t},\n\t\t\tasync getSchemas(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {\n\t\t\t\tconst schemas = (await googleApiRequestAllItems.call(\n\t\t\t\t\tthis,\n\t\t\t\t\t'schemas',\n\t\t\t\t\t'GET',\n\t\t\t\t\t'/directory/v1/customer/my_customer/schemas',\n\t\t\t\t)) as Array<{\n\t\t\t\t\tdisplayName: string;\n\t\t\t\t\tschemaName: string;\n\t\t\t\t}>;\n\t\t\t\treturn schemas.map((schema: { schemaName: string; displayName: string }) => ({\n\t\t\t\t\tname: schema.displayName || schema.schemaName,\n\t\t\t\t\tvalue: schema.schemaName,\n\t\t\t\t}));\n\t\t\t},\n\t\t\tasync getOrgUnits(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {\n\t\t\t\tconst returnData: INodePropertyOptions[] = [];\n\t\t\t\tconst orgUnits = (await googleApiRequest.call(\n\t\t\t\t\tthis,\n\t\t\t\t\t'GET',\n\t\t\t\t\t'/directory/v1/customer/my_customer/orgunits',\n\t\t\t\t\t{},\n\t\t\t\t\t{ orgUnitPath: '/', type: 'all' },\n\t\t\t\t)) as {\n\t\t\t\t\torganizationUnits: Array<{\n\t\t\t\t\t\tname: string;\n\t\t\t\t\t\torgUnitPath: string;\n\t\t\t\t\t}>;\n\t\t\t\t};\n\n\t\t\t\tfor (const unit of orgUnits.organizationUnits) {\n\t\t\t\t\treturnData.push({\n\t\t\t\t\t\tname: unit.name,\n\t\t\t\t\t\tvalue: unit.orgUnitPath,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\treturn returnData;\n\t\t\t},\n\t\t},\n\t\tlistSearch: {\n\t\t\tsearchDevices,\n\t\t\tsearchGroups,\n\t\t\tsearchUsers,\n\t\t},\n\t};\n\n\tasync execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\t\tconst items = this.getInputData();\n\t\tconst returnData: INodeExecutionData[] = [];\n\t\tconst length = items.length;\n\t\tlet responseData;\n\t\tconst resource = this.getNodeParameter('resource', 0);\n\t\tconst operation = this.getNodeParameter('operation', 0);\n\n\t\tfor (let i = 0; i < length; i++) {\n\t\t\tconst qs: IDataObject = {};\n\n\t\t\ttry {\n\t\t\t\tif (resource === 'device') {\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/customer/my_customer/devices/chromeos/deviceId\n\t\t\t\t\tif (operation === 'get') {\n\t\t\t\t\t\tconst deviceId = this.getNodeParameter('deviceId', i, undefined, {\n\t\t\t\t\t\t\textractValue: true,\n\t\t\t\t\t\t}) as string;\n\t\t\t\t\t\tconst output = this.getNodeParameter('projection', 1);\n\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'GET',\n\t\t\t\t\t\t\t`/directory/v1/customer/my_customer/devices/chromeos/${deviceId}?projection=${output}`,\n\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/reference/rest/v1/chromeosdevices/list\n\t\t\t\t\tif (operation === 'getAll') {\n\t\t\t\t\t\tconst returnAll = this.getNodeParameter('returnAll', i);\n\t\t\t\t\t\tconst output = this.getNodeParameter('projection', 1);\n\t\t\t\t\t\tconst includeChildren = this.getNodeParameter('includeChildOrgunits', i);\n\t\t\t\t\t\tconst filter = this.getNodeParameter('filter', i, {}) as {\n\t\t\t\t\t\t\tquery?: string;\n\t\t\t\t\t\t\torgUnitPath?: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t\tconst sort = this.getNodeParameter('sort', i, {}) as {\n\t\t\t\t\t\t\tsortRules?: {\n\t\t\t\t\t\t\t\torderBy?: string;\n\t\t\t\t\t\t\t\tsortOrder?: string;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tqs.projection = output;\n\t\t\t\t\t\tqs.includeChildOrgunits = includeChildren;\n\n\t\t\t\t\t\tif (qs.customer === undefined) {\n\t\t\t\t\t\t\tqs.customer = 'my_customer';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (filter.orgUnitPath) {\n\t\t\t\t\t\t\tqs.orgUnitPath = filter.orgUnitPath;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (filter.query) {\n\t\t\t\t\t\t\tqs.query = filter.query.trim();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (sort.sortRules) {\n\t\t\t\t\t\t\tconst { orderBy, sortOrder } = sort.sortRules;\n\t\t\t\t\t\t\tif (orderBy) {\n\t\t\t\t\t\t\t\tqs.orderBy = orderBy;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (sortOrder) {\n\t\t\t\t\t\t\t\tqs.sortOrder = sortOrder;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!returnAll) {\n\t\t\t\t\t\t\tqs.maxResults = this.getNodeParameter('limit', i);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'GET',\n\t\t\t\t\t\t\t`/directory/v1/customer/${qs.customer}/devices/chromeos/`,\n\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\tqs,\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif (!Array.isArray(responseData) || responseData.length === 0) {\n\t\t\t\t\t\t\treturn [this.helpers.returnJsonArray({})];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn [this.helpers.returnJsonArray(responseData)];\n\t\t\t\t\t}\n\n\t\t\t\t\tif (operation === 'update') {\n\t\t\t\t\t\tconst deviceId = this.getNodeParameter('deviceId', i, undefined, {\n\t\t\t\t\t\t\textractValue: true,\n\t\t\t\t\t\t}) as string;\n\t\t\t\t\t\tconst updateOptions = this.getNodeParameter('updateOptions', 1);\n\n\t\t\t\t\t\tObject.assign(qs, updateOptions);\n\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'PUT',\n\t\t\t\t\t\t\t`/directory/v1/customer/my_customer/devices/chromeos/${deviceId}`,\n\t\t\t\t\t\t\tqs,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (operation === 'changeStatus') {\n\t\t\t\t\t\tconst deviceId = this.getNodeParameter('deviceId', i, undefined, {\n\t\t\t\t\t\t\textractValue: true,\n\t\t\t\t\t\t}) as string;\n\t\t\t\t\t\tconst action = this.getNodeParameter('action', 1);\n\n\t\t\t\t\t\tqs.action = action;\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'POST',\n\t\t\t\t\t\t\t`/directory/v1/customer/my_customer/devices/chromeos/${deviceId}/action`,\n\t\t\t\t\t\t\tqs,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else if (resource === 'group') {\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/groups/insert\n\t\t\t\t\tif (operation === 'create') {\n\t\t\t\t\t\tconst name = this.getNodeParameter('name', i) as string;\n\t\t\t\t\t\tconst email = this.getNodeParameter('email', i) as string;\n\t\t\t\t\t\tconst additionalFields = this.getNodeParameter('additionalFields', i);\n\n\t\t\t\t\t\tconst body: IDataObject = {\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\temail,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tObject.assign(body, additionalFields);\n\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(this, 'POST', '/directory/v1/groups', body);\n\t\t\t\t\t}\n\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/groups/delete\n\t\t\t\t\tif (operation === 'delete') {\n\t\t\t\t\t\tconst groupId = this.getNodeParameter('groupId', i, undefined, {\n\t\t\t\t\t\t\textractValue: true,\n\t\t\t\t\t\t}) as string;\n\n\t\t\t\t\t\tawait googleApiRequest.call(this, 'DELETE', `/directory/v1/groups/${groupId}`, {});\n\n\t\t\t\t\t\tresponseData = { success: true };\n\t\t\t\t\t}\n\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/groups/get\n\t\t\t\t\tif (operation === 'get') {\n\t\t\t\t\t\tconst groupId = this.getNodeParameter('groupId', i, undefined, {\n\t\t\t\t\t\t\textractValue: true,\n\t\t\t\t\t\t}) as string;\n\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'GET',\n\t\t\t\t\t\t\t`/directory/v1/groups/${groupId}`,\n\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/groups/list\n\t\t\t\t\tif (operation === 'getAll') {\n\t\t\t\t\t\tconst returnAll = this.getNodeParameter('returnAll', i);\n\t\t\t\t\t\tconst filter = this.getNodeParameter('filter', i, {}) as {\n\t\t\t\t\t\t\tcustomer?: string;\n\t\t\t\t\t\t\tdomain?: string;\n\t\t\t\t\t\t\tquery?: string;\n\t\t\t\t\t\t\tuserId?: string;\n\t\t\t\t\t\t};\n\t\t\t\t\t\tconst sort = this.getNodeParameter('sort', i, {}) as {\n\t\t\t\t\t\t\tsortRules?: {\n\t\t\t\t\t\t\t\torderBy?: string;\n\t\t\t\t\t\t\t\tsortOrder?: string;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (filter.customer) {\n\t\t\t\t\t\t\tqs.customer = filter.customer;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (filter.domain) {\n\t\t\t\t\t\t\tqs.domain = filter.domain;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (filter.query) {\n\t\t\t\t\t\t\tconst query = filter.query.trim();\n\n\t\t\t\t\t\t\tconst regex = /^(name|email):\\S+$/;\n\t\t\t\t\t\t\tif (!regex.test(query)) {\n\t\t\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\t\t\t\t'Invalid query format. Query must follow the format \"displayName:<value>\" or \"email:<value>\".',\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tqs.query = query;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (filter.userId) {\n\t\t\t\t\t\t\tqs.userId = filter.userId;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (sort.sortRules) {\n\t\t\t\t\t\t\tconst { orderBy, sortOrder } = sort.sortRules;\n\t\t\t\t\t\t\tif (orderBy) {\n\t\t\t\t\t\t\t\tqs.orderBy = orderBy;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (sortOrder) {\n\t\t\t\t\t\t\t\tqs.sortOrder = sortOrder;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!qs.customer) {\n\t\t\t\t\t\t\tqs.customer = 'my_customer';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!returnAll) {\n\t\t\t\t\t\t\tqs.maxResults = this.getNodeParameter('limit', i);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (returnAll) {\n\t\t\t\t\t\t\tresponseData = await googleApiRequestAllItems.call(\n\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t'groups',\n\t\t\t\t\t\t\t\t'GET',\n\t\t\t\t\t\t\t\t'/directory/v1/groups',\n\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t\tqs,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tqs.maxResults = this.getNodeParameter('limit', i);\n\t\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t'GET',\n\t\t\t\t\t\t\t\t'/directory/v1/groups',\n\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t\tqs,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tresponseData = responseData.groups || [];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/groups/update\n\t\t\t\t\tif (operation === 'update') {\n\t\t\t\t\t\tconst groupId = this.getNodeParameter('groupId', i, undefined, {\n\t\t\t\t\t\t\textractValue: true,\n\t\t\t\t\t\t}) as string;\n\n\t\t\t\t\t\tconst updateFields = this.getNodeParameter('updateFields', i);\n\n\t\t\t\t\t\tconst body: IDataObject = {};\n\n\t\t\t\t\t\tObject.assign(body, updateFields);\n\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'PUT',\n\t\t\t\t\t\t\t`/directory/v1/groups/${groupId}`,\n\t\t\t\t\t\t\tbody,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else if (resource === 'user') {\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/reference/rest/v1/members/insert\n\t\t\t\t\tif (operation === 'addToGroup') {\n\t\t\t\t\t\tconst groupId = this.getNodeParameter('groupId', i, undefined, {\n\t\t\t\t\t\t\textractValue: true,\n\t\t\t\t\t\t}) as string;\n\t\t\t\t\t\tconst userId = this.getNodeParameter('userId', i, undefined, {\n\t\t\t\t\t\t\textractValue: true,\n\t\t\t\t\t\t}) as string;\n\n\t\t\t\t\t\tlet userEmail: string | undefined;\n\n\t\t\t\t\t\t// If the user ID is not already an email, fetch the user details\n\t\t\t\t\t\tif (!userId.includes('@')) {\n\t\t\t\t\t\t\tconst userDetails = (await googleApiRequest.call(\n\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t'GET',\n\t\t\t\t\t\t\t\t`/directory/v1/users/${userId}`,\n\t\t\t\t\t\t\t)) as {\n\t\t\t\t\t\t\t\tprimaryEmail: string;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tuserEmail = userDetails.primaryEmail;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tuserEmail = userId;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!userEmail) {\n\t\t\t\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t\t\t\t'Unable to determine the user email for adding to the group',\n\t\t\t\t\t\t\t\t{ itemIndex: i },\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst body: IDataObject = {\n\t\t\t\t\t\t\temail: userEmail,\n\t\t\t\t\t\t\trole: 'MEMBER',\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tawait googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'POST',\n\t\t\t\t\t\t\t`/directory/v1/groups/${groupId}/members`,\n\t\t\t\t\t\t\tbody,\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tresponseData = { added: true };\n\t\t\t\t\t}\n\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/users/insert\n\t\t\t\t\tif (operation === 'create') {\n\t\t\t\t\t\tconst domain = this.getNodeParameter('domain', i) as string;\n\t\t\t\t\t\tconst firstName = this.getNodeParameter('firstName', i) as string;\n\t\t\t\t\t\tconst lastName = this.getNodeParameter('lastName', i) as string;\n\t\t\t\t\t\tconst password = this.getNodeParameter('password', i) as string;\n\t\t\t\t\t\tconst username = this.getNodeParameter('username', i) as string;\n\t\t\t\t\t\tconst additionalFields = this.getNodeParameter('additionalFields', i);\n\n\t\t\t\t\t\tconst body: IDataObject = {\n\t\t\t\t\t\t\tname: {\n\t\t\t\t\t\t\t\tfamilyName: lastName,\n\t\t\t\t\t\t\t\tgivenName: firstName,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tpassword,\n\t\t\t\t\t\t\tprimaryEmail: `${username}@${domain}`,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (!username) {\n\t\t\t\t\t\t\tthrow new NodeOperationError(this.getNode(), \"The parameter 'Username' is empty\", {\n\t\t\t\t\t\t\t\titemIndex: i,\n\t\t\t\t\t\t\t\tdescription: \"Please fill in the 'Username' parameter to create the user\",\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (additionalFields.phoneUi) {\n\t\t\t\t\t\t\tbody.phones = (additionalFields.phoneUi as IDataObject).phoneValues as IDataObject[];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (additionalFields.emailUi) {\n\t\t\t\t\t\t\tbody.emails = (additionalFields.emailUi as IDataObject).emailValues as IDataObject[];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (additionalFields.roles) {\n\t\t\t\t\t\t\tconst roles = additionalFields.roles as string[];\n\t\t\t\t\t\t\tbody.roles = {\n\t\t\t\t\t\t\t\tsuperAdmin: roles.includes('superAdmin'),\n\t\t\t\t\t\t\t\tgroupsAdmin: roles.includes('groupsAdmin'),\n\t\t\t\t\t\t\t\tgroupsReader: roles.includes('groupsReader'),\n\t\t\t\t\t\t\t\tgroupsEditor: roles.includes('groupsEditor'),\n\t\t\t\t\t\t\t\tuserManagement: roles.includes('userManagement'),\n\t\t\t\t\t\t\t\thelpDeskAdmin: roles.includes('helpDeskAdmin'),\n\t\t\t\t\t\t\t\tservicesAdmin: roles.includes('servicesAdmin'),\n\t\t\t\t\t\t\t\tinventoryReportingAdmin: roles.includes('inventoryReportingAdmin'),\n\t\t\t\t\t\t\t\tstorageAdmin: roles.includes('storageAdmin'),\n\t\t\t\t\t\t\t\tdirectorySyncAdmin: roles.includes('directorySyncAdmin'),\n\t\t\t\t\t\t\t\tmobileAdmin: roles.includes('mobileAdmin'),\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (additionalFields.customFields) {\n\t\t\t\t\t\t\tconst customFields = (additionalFields.customFields as IDataObject)\n\t\t\t\t\t\t\t\t.fieldValues as IDataObject[];\n\t\t\t\t\t\t\tconst customSchemas: IDataObject = {};\n\t\t\t\t\t\t\tcustomFields.forEach((field) => {\n\t\t\t\t\t\t\t\tconst { schemaName, fieldName, value } = field as {\n\t\t\t\t\t\t\t\t\tschemaName: string;\n\t\t\t\t\t\t\t\t\tfieldName: string;\n\t\t\t\t\t\t\t\t\tvalue: string;\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\tif (!schemaName || !fieldName || !value) {\n\t\t\t\t\t\t\t\t\tthrow new NodeOperationError(this.getNode(), 'Invalid custom field data', {\n\t\t\t\t\t\t\t\t\t\titemIndex: i,\n\t\t\t\t\t\t\t\t\t\tdescription: 'Schema name, field name, and value are required.',\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tcustomSchemas[schemaName] ??= {};\n\t\t\t\t\t\t\t\t(customSchemas[schemaName] as IDataObject)[fieldName] = value;\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tif (Object.keys(customSchemas).length > 0) {\n\t\t\t\t\t\t\t\tbody.customSchemas = customSchemas;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'POST',\n\t\t\t\t\t\t\t'/directory/v1/users',\n\t\t\t\t\t\t\tbody,\n\t\t\t\t\t\t\tqs,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/users/delete\n\t\t\t\t\tif (operation === 'delete') {\n\t\t\t\t\t\tconst userId = this.getNodeParameter('userId', i, undefined, {\n\t\t\t\t\t\t\textractValue: true,\n\t\t\t\t\t\t}) as string;\n\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'DELETE',\n\t\t\t\t\t\t\t`/directory/v1/users/${userId}`,\n\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tresponseData = { deleted: true };\n\t\t\t\t\t}\n\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/users/get\n\t\t\t\t\tif (operation === 'get') {\n\t\t\t\t\t\tconst userId = this.getNodeParameter('userId', i, undefined, {\n\t\t\t\t\t\t\textractValue: true,\n\t\t\t\t\t\t}) as string;\n\n\t\t\t\t\t\tconst output = this.getNodeParameter('output', i);\n\t\t\t\t\t\tconst projection = this.getNodeParameter('projection', i);\n\t\t\t\t\t\tconst fields = this.getNodeParameter('fields', i, []) as string[];\n\n\t\t\t\t\t\tif (projection) {\n\t\t\t\t\t\t\tqs.projection = projection;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (projection === 'custom' && qs.customFieldMask) {\n\t\t\t\t\t\t\tqs.customFieldMask = (qs.customFieldMask as string[]).join(',');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (output === 'select') {\n\t\t\t\t\t\t\tif (!fields.includes('id')) {\n\t\t\t\t\t\t\t\tfields.push('id');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tqs.fields = fields.join(',');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'GET',\n\t\t\t\t\t\t\t`/directory/v1/users/${userId}`,\n\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\tqs,\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif (output === 'simplified') {\n\t\t\t\t\t\t\tresponseData = {\n\t\t\t\t\t\t\t\tkind: responseData.kind,\n\t\t\t\t\t\t\t\tid: responseData.id,\n\t\t\t\t\t\t\t\tprimaryEmail: responseData.primaryEmail,\n\t\t\t\t\t\t\t\tname: responseData.name,\n\t\t\t\t\t\t\t\tisAdmin: responseData.isAdmin,\n\t\t\t\t\t\t\t\tlastLoginTime: responseData.lastLoginTime,\n\t\t\t\t\t\t\t\tcreationTime: responseData.creationTime,\n\t\t\t\t\t\t\t\tsuspended: responseData.suspended,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/users/list\n\t\t\t\t\tif (operation === 'getAll') {\n\t\t\t\t\t\tconst returnAll = this.getNodeParameter('returnAll', i);\n\t\t\t\t\t\tconst output = this.getNodeParameter('output', i);\n\t\t\t\t\t\tconst fields = this.getNodeParameter('fields', i, []) as string[];\n\t\t\t\t\t\tconst projection = this.getNodeParameter('projection', i) as string;\n\t\t\t\t\t\tconst filter = this.getNodeParameter('filter', i, {}) as {\n\t\t\t\t\t\t\tcustomer?: string;\n\t\t\t\t\t\t\tdomain?: string;\n\t\t\t\t\t\t\tquery?: string;\n\t\t\t\t\t\t\tshowDeleted?: boolean;\n\t\t\t\t\t\t};\n\t\t\t\t\t\tconst sort = this.getNodeParameter('sort', i, {}) as {\n\t\t\t\t\t\t\tsortRules?: {\n\t\t\t\t\t\t\t\torderBy?: string;\n\t\t\t\t\t\t\t\tsortOrder?: string;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (filter.customer) {\n\t\t\t\t\t\t\tqs.customer = filter.customer;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (filter.domain) {\n\t\t\t\t\t\t\tqs.domain = filter.domain;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (filter.query) {\n\t\t\t\t\t\t\tqs.query = filter.query.trim();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (filter.showDeleted) {\n\t\t\t\t\t\t\tqs.showDeleted = filter.showDeleted ? 'true' : 'false';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (sort.sortRules) {\n\t\t\t\t\t\t\tconst { orderBy, sortOrder } = sort.sortRules;\n\t\t\t\t\t\t\tif (orderBy) {\n\t\t\t\t\t\t\t\tqs.orderBy = orderBy;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (sortOrder) {\n\t\t\t\t\t\t\t\tqs.sortOrder = sortOrder;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tqs.projection = projection;\n\t\t\t\t\t\tif (projection === 'custom' && qs.customFieldMask) {\n\t\t\t\t\t\t\tqs.customFieldMask = (qs.customFieldMask as string[]).join(',');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (output === 'select') {\n\t\t\t\t\t\t\tif (!fields.includes('id')) {\n\t\t\t\t\t\t\t\tfields.push('id');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tqs.fields = `users(${fields.join(',')})`;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!qs.customer) {\n\t\t\t\t\t\t\tqs.customer = 'my_customer';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (returnAll) {\n\t\t\t\t\t\t\tresponseData = await googleApiRequestAllItems.call(\n\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t'users',\n\t\t\t\t\t\t\t\t'GET',\n\t\t\t\t\t\t\t\t'/directory/v1/users',\n\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t\tqs,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tqs.maxResults = this.getNodeParameter('limit', i);\n\t\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t'GET',\n\t\t\t\t\t\t\t\t'/directory/v1/users',\n\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t\tqs,\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tresponseData = responseData.users;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (output === 'simplified') {\n\t\t\t\t\t\t\tresponseData = responseData.map((user: any) => ({\n\t\t\t\t\t\t\t\tkind: user.kind,\n\t\t\t\t\t\t\t\tid: user.id,\n\t\t\t\t\t\t\t\tprimaryEmail: user.primaryEmail,\n\t\t\t\t\t\t\t\tname: user.name,\n\t\t\t\t\t\t\t\tisAdmin: user.isAdmin,\n\t\t\t\t\t\t\t\tlastLoginTime: user.lastLoginTime,\n\t\t\t\t\t\t\t\tcreationTime: user.creationTime,\n\t\t\t\t\t\t\t\tsuspended: user.suspended,\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/reference/rest/v1/members/delete\n\t\t\t\t\tif (operation === 'removeFromGroup') {\n\t\t\t\t\t\tconst groupId = this.getNodeParameter('groupId', i, undefined, {\n\t\t\t\t\t\t\textractValue: true,\n\t\t\t\t\t\t}) as string;\n\t\t\t\t\t\tconst userId = this.getNodeParameter('userId', i, undefined, {\n\t\t\t\t\t\t\textractValue: true,\n\t\t\t\t\t\t}) as string;\n\n\t\t\t\t\t\tawait googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'DELETE',\n\t\t\t\t\t\t\t`/directory/v1/groups/${groupId}/members/${userId}`,\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tresponseData = { removed: true };\n\t\t\t\t\t}\n\n\t\t\t\t\t//https://developers.google.com/admin-sdk/directory/v1/reference/users/update\n\t\t\t\t\tif (operation === 'update') {\n\t\t\t\t\t\tconst userId = this.getNodeParameter('userId', i, undefined, {\n\t\t\t\t\t\t\textractValue: true,\n\t\t\t\t\t\t}) as string;\n\t\t\t\t\t\tconst updateFields = this.getNodeParameter('updateFields', i);\n\n\t\t\t\t\t\tconst body: {\n\t\t\t\t\t\t\tname?: { givenName?: string; familyName?: string };\n\t\t\t\t\t\t\temails?: IDataObject[];\n\t\t\t\t\t\t\tprimaryEmail?: string;\n\t\t\t\t\t\t\tphones?: IDataObject[];\n\t\t\t\t\t\t\tsuspended?: boolean;\n\t\t\t\t\t\t\troles?: { [key: string]: boolean };\n\t\t\t\t\t\t\tcustomSchemas?: IDataObject;\n\t\t\t\t\t\t} = {};\n\n\t\t\t\t\t\tif (updateFields.firstName) {\n\t\t\t\t\t\t\tbody.name ??= {};\n\t\t\t\t\t\t\tbody.name.givenName = updateFields.firstName as string;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (updateFields.lastName) {\n\t\t\t\t\t\t\tbody.name ??= {};\n\t\t\t\t\t\t\tbody.name.familyName = updateFields.lastName as string;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (updateFields.phoneUi) {\n\t\t\t\t\t\t\tbody.phones = (updateFields.phoneUi as IDataObject).phoneValues as IDataObject[];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (updateFields.emailUi) {\n\t\t\t\t\t\t\tbody.emails = (updateFields.emailUi as IDataObject).emailValues as IDataObject[];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (updateFields.primaryEmail) {\n\t\t\t\t\t\t\tbody.primaryEmail = updateFields.primaryEmail as string;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (updateFields.suspendUi) {\n\t\t\t\t\t\t\tbody.suspended = updateFields.suspendUi as boolean;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (updateFields.roles) {\n\t\t\t\t\t\t\tconst roles = updateFields.roles as string[];\n\t\t\t\t\t\t\tbody.roles = {\n\t\t\t\t\t\t\t\tsuperAdmin: roles.includes('superAdmin'),\n\t\t\t\t\t\t\t\tgroupsAdmin: roles.includes('groupsAdmin'),\n\t\t\t\t\t\t\t\tgroupsReader: roles.includes('groupsReader'),\n\t\t\t\t\t\t\t\tgroupsEditor: roles.includes('groupsEditor'),\n\t\t\t\t\t\t\t\tuserManagement: roles.includes('userManagement'),\n\t\t\t\t\t\t\t\thelpDeskAdmin: roles.includes('helpDeskAdmin'),\n\t\t\t\t\t\t\t\tservicesAdmin: roles.includes('servicesAdmin'),\n\t\t\t\t\t\t\t\tinventoryReportingAdmin: roles.includes('inventoryReportingAdmin'),\n\t\t\t\t\t\t\t\tstorageAdmin: roles.includes('storageAdmin'),\n\t\t\t\t\t\t\t\tdirectorySyncAdmin: roles.includes('directorySyncAdmin'),\n\t\t\t\t\t\t\t\tmobileAdmin: roles.includes('mobileAdmin'),\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (updateFields.customFields) {\n\t\t\t\t\t\t\tconst customFields = (updateFields.customFields as IDataObject)\n\t\t\t\t\t\t\t\t.fieldValues as IDataObject[];\n\t\t\t\t\t\t\tconst customSchemas: IDataObject = {};\n\t\t\t\t\t\t\tcustomFields.forEach((field) => {\n\t\t\t\t\t\t\t\tconst { schemaName, fieldName, value } = field as {\n\t\t\t\t\t\t\t\t\tschemaName: string;\n\t\t\t\t\t\t\t\t\tfieldName: string;\n\t\t\t\t\t\t\t\t\tvalue: string;\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\tif (!schemaName || !fieldName || !value) {\n\t\t\t\t\t\t\t\t\tthrow new NodeOperationError(this.getNode(), 'Invalid custom field data', {\n\t\t\t\t\t\t\t\t\t\titemIndex: i,\n\t\t\t\t\t\t\t\t\t\tdescription: 'Schema name, field name, and value are required.',\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tcustomSchemas[schemaName] ??= {};\n\t\t\t\t\t\t\t\t(customSchemas[schemaName] as IDataObject)[fieldName] = value;\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tif (Object.keys(customSchemas).length > 0) {\n\t\t\t\t\t\t\t\tbody.customSchemas = customSchemas;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tresponseData = await googleApiRequest.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t'PUT',\n\t\t\t\t\t\t\t`/directory/v1/users/${userId}`,\n\t\t\t\t\t\t\tbody,\n\t\t\t\t\t\t\tqs,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst executionData = this.helpers.constructExecutionMetaData(\n\t\t\t\t\tthis.helpers.returnJsonArray(responseData as IDataObject[]),\n\t\t\t\t\t{ itemData: { item: i } },\n\t\t\t\t);\n\n\t\t\t\treturnData.push(...executionData);\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof NodeOperationError) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t\tif (this.continueOnFail()) {\n\t\t\t\t\tconst executionErrorData = this.helpers.constructExecutionMetaData(\n\t\t\t\t\t\tthis.helpers.returnJsonArray({\n\t\t\t\t\t\t\tmessage: `Operation \"${operation}\" failed for resource \"${resource}\".`,\n\t\t\t\t\t\t\tdescription: error.message,\n\t\t\t\t\t\t}),\n\t\t\t\t\t\t{ itemData: { item: i } },\n\t\t\t\t\t);\n\t\t\t\t\treturnData.push(...executionErrorData);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t`Operation \"${operation}\" failed for resource \"${resource}\".`,\n\n\t\t\t\t\t{\n\t\t\t\t\t\tdescription: `Please check the input parameters and ensure the API request is correctly formatted. Details: ${error.description}`,\n\t\t\t\t\t\titemIndex: i,\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn [returnData];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,0BAAwD;AAExD,+BAA+C;AAC/C,8BAA2D;AAC3D,6BAA6C;AAC7C,6BAAyD;AACzD,6BAA2C;AAEpC,MAAM,YAAiC;AAAA,EAAvC;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,CAAC,OAAO;AAAA,MACf,SAAS;AAAA,MACT,UAAU;AAAA,MACV,aAAa;AAAA,MACb,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,cAAc;AAAA,MACd,QAAQ,CAAC,wCAAoB,IAAI;AAAA,MACjC,SAAS,CAAC,wCAAoB,IAAI;AAAA,MAClC,aAA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A0B,QAAQ;AAAA,UAEzD;AAAA,YACC,aAAa,iGAAiG,MAAM,WAAW;AAAA,YAC/H,WAAW;AAAA,UACZ;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAEA,WAAO,CAAC,UAAU;AAAA,EACnB;AACD;","names":[]}
@@ -31,7 +31,7 @@ async function googleApiRequest(method, resource, body = {}, qs = {}, uri, heade
31
31
  method,
32
32
  body,
33
33
  qs,
34
- uri: uri || `https://www.googleapis.com/admin${resource}`,
34
+ url: uri || `https://www.googleapis.com/admin${resource}`,
35
35
  json: true
36
36
  };
37
37
  try {
@@ -41,7 +41,11 @@ async function googleApiRequest(method, resource, body = {}, qs = {}, uri, heade
41
41
  if (Object.keys(body).length === 0) {
42
42
  delete options.body;
43
43
  }
44
- return await this.helpers.requestOAuth2.call(this, "gSuiteAdminOAuth2Api", options);
44
+ return await this.helpers.httpRequestWithAuthentication.call(
45
+ this,
46
+ "gSuiteAdminOAuth2Api",
47
+ options
48
+ );
45
49
  } catch (error) {
46
50
  throw new import_n8n_workflow.NodeApiError(this.getNode(), error);
47
51
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../nodes/Google/GSuiteAdmin/GenericFunctions.ts"],"sourcesContent":["import type {\n\tIExecuteFunctions,\n\tILoadOptionsFunctions,\n\tIDataObject,\n\tJsonObject,\n\tIHttpRequestMethods,\n\tIRequestOptions,\n} from 'n8n-workflow';\nimport { NodeApiError } from 'n8n-workflow';\n\nexport async function googleApiRequest(\n\tthis: IExecuteFunctions | ILoadOptionsFunctions,\n\tmethod: IHttpRequestMethods,\n\tresource: string,\n\n\tbody: any = {},\n\tqs: IDataObject = {},\n\turi?: string,\n\theaders: IDataObject = {},\n): Promise<any> {\n\tconst options: IRequestOptions = {\n\t\theaders: {\n\t\t\t'Content-Type': 'application/json',\n\t\t},\n\t\tmethod,\n\t\tbody,\n\t\tqs,\n\t\turi: uri || `https://www.googleapis.com/admin${resource}`,\n\t\tjson: true,\n\t};\n\ttry {\n\t\tif (Object.keys(headers).length !== 0) {\n\t\t\toptions.headers = Object.assign({}, options.headers, headers);\n\t\t}\n\t\tif (Object.keys(body as IDataObject).length === 0) {\n\t\t\tdelete options.body;\n\t\t}\n\t\treturn await this.helpers.requestOAuth2.call(this, 'gSuiteAdminOAuth2Api', options);\n\t} catch (error) {\n\t\tthrow new NodeApiError(this.getNode(), error as JsonObject);\n\t}\n}\n\nexport async function googleApiRequestAllItems(\n\tthis: IExecuteFunctions | ILoadOptionsFunctions,\n\tpropertyName: string,\n\tmethod: IHttpRequestMethods,\n\tendpoint: string,\n\n\tbody: any = {},\n\tquery: IDataObject = {},\n): Promise<any> {\n\tconst returnData: IDataObject[] = [];\n\n\tlet responseData;\n\tquery.maxResults = 100;\n\n\tdo {\n\t\tresponseData = await googleApiRequest.call(this, method, endpoint, body, query);\n\t\tquery.pageToken = responseData.nextPageToken;\n\t\treturnData.push.apply(returnData, responseData[propertyName] as IDataObject[]);\n\t} while (responseData.nextPageToken !== undefined && responseData.nextPageToken !== '');\n\n\treturn returnData;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,0BAA6B;AAE7B,eAAsB,iBAErB,QACA,UAEA,OAAY,CAAC,GACb,KAAkB,CAAC,GACnB,KACA,UAAuB,CAAC,GACT;AACf,QAAM,UAA2B;AAAA,IAChC,SAAS;AAAA,MACR,gBAAgB;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,KAAK,OAAO,mCAAmC,QAAQ;AAAA,IACvD,MAAM;AAAA,EACP;AACA,MAAI;AACH,QAAI,OAAO,KAAK,OAAO,EAAE,WAAW,GAAG;AACtC,cAAQ,UAAU,OAAO,OAAO,CAAC,GAAG,QAAQ,SAAS,OAAO;AAAA,IAC7D;AACA,QAAI,OAAO,KAAK,IAAmB,EAAE,WAAW,GAAG;AAClD,aAAO,QAAQ;AAAA,IAChB;AACA,WAAO,MAAM,KAAK,QAAQ,cAAc,KAAK,MAAM,wBAAwB,OAAO;AAAA,EACnF,SAAS,OAAO;AACf,UAAM,IAAI,iCAAa,KAAK,QAAQ,GAAG,KAAmB;AAAA,EAC3D;AACD;AAEA,eAAsB,yBAErB,cACA,QACA,UAEA,OAAY,CAAC,GACb,QAAqB,CAAC,GACP;AACf,QAAM,aAA4B,CAAC;AAEnC,MAAI;AACJ,QAAM,aAAa;AAEnB,KAAG;AACF,mBAAe,MAAM,iBAAiB,KAAK,MAAM,QAAQ,UAAU,MAAM,KAAK;AAC9E,UAAM,YAAY,aAAa;AAC/B,eAAW,KAAK,MAAM,YAAY,aAAa,YAAY,CAAkB;AAAA,EAC9E,SAAS,aAAa,kBAAkB,UAAa,aAAa,kBAAkB;AAEpF,SAAO;AACR;","names":[]}
1
+ {"version":3,"sources":["../../../../nodes/Google/GSuiteAdmin/GenericFunctions.ts"],"sourcesContent":["import type {\n\tIExecuteFunctions,\n\tILoadOptionsFunctions,\n\tIDataObject,\n\tJsonObject,\n\tIHttpRequestMethods,\n\tIHttpRequestOptions,\n} from 'n8n-workflow';\nimport { NodeApiError } from 'n8n-workflow';\n\nexport async function googleApiRequest(\n\tthis: IExecuteFunctions | ILoadOptionsFunctions,\n\tmethod: IHttpRequestMethods,\n\tresource: string,\n\tbody: any = {},\n\tqs: IDataObject = {},\n\turi?: string,\n\theaders: IDataObject = {},\n): Promise<any> {\n\tconst options: IHttpRequestOptions = {\n\t\theaders: {\n\t\t\t'Content-Type': 'application/json',\n\t\t},\n\t\tmethod,\n\t\tbody,\n\t\tqs,\n\t\turl: uri || `https://www.googleapis.com/admin${resource}`,\n\t\tjson: true,\n\t};\n\ttry {\n\t\tif (Object.keys(headers).length !== 0) {\n\t\t\toptions.headers = Object.assign({}, options.headers, headers);\n\t\t}\n\t\tif (Object.keys(body as IDataObject).length === 0) {\n\t\t\tdelete options.body;\n\t\t}\n\t\treturn await this.helpers.httpRequestWithAuthentication.call(\n\t\t\tthis,\n\t\t\t'gSuiteAdminOAuth2Api',\n\t\t\toptions,\n\t\t);\n\t} catch (error) {\n\t\tthrow new NodeApiError(this.getNode(), error as JsonObject);\n\t}\n}\n\nexport async function googleApiRequestAllItems(\n\tthis: IExecuteFunctions | ILoadOptionsFunctions,\n\tpropertyName: string,\n\tmethod: IHttpRequestMethods,\n\tendpoint: string,\n\tbody: any = {},\n\tquery: IDataObject = {},\n): Promise<any> {\n\tconst returnData: IDataObject[] = [];\n\n\tlet responseData;\n\tquery.maxResults = 100;\n\n\tdo {\n\t\tresponseData = await googleApiRequest.call(this, method, endpoint, body, query);\n\t\tquery.pageToken = responseData.nextPageToken;\n\t\treturnData.push.apply(returnData, responseData[propertyName] as IDataObject[]);\n\t} while (responseData.nextPageToken !== undefined && responseData.nextPageToken !== '');\n\n\treturn returnData;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,0BAA6B;AAE7B,eAAsB,iBAErB,QACA,UACA,OAAY,CAAC,GACb,KAAkB,CAAC,GACnB,KACA,UAAuB,CAAC,GACT;AACf,QAAM,UAA+B;AAAA,IACpC,SAAS;AAAA,MACR,gBAAgB;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,KAAK,OAAO,mCAAmC,QAAQ;AAAA,IACvD,MAAM;AAAA,EACP;AACA,MAAI;AACH,QAAI,OAAO,KAAK,OAAO,EAAE,WAAW,GAAG;AACtC,cAAQ,UAAU,OAAO,OAAO,CAAC,GAAG,QAAQ,SAAS,OAAO;AAAA,IAC7D;AACA,QAAI,OAAO,KAAK,IAAmB,EAAE,WAAW,GAAG;AAClD,aAAO,QAAQ;AAAA,IAChB;AACA,WAAO,MAAM,KAAK,QAAQ,8BAA8B;AAAA,MACvD;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,EACD,SAAS,OAAO;AACf,UAAM,IAAI,iCAAa,KAAK,QAAQ,GAAG,KAAmB;AAAA,EAC3D;AACD;AAEA,eAAsB,yBAErB,cACA,QACA,UACA,OAAY,CAAC,GACb,QAAqB,CAAC,GACP;AACf,QAAM,aAA4B,CAAC;AAEnC,MAAI;AACJ,QAAM,aAAa;AAEnB,KAAG;AACF,mBAAe,MAAM,iBAAiB,KAAK,MAAM,QAAQ,UAAU,MAAM,KAAK;AAC9E,UAAM,YAAY,aAAa;AAC/B,eAAW,KAAK,MAAM,YAAY,aAAa,YAAY,CAAkB;AAAA,EAC9E,SAAS,aAAa,kBAAkB,UAAa,aAAa,kBAAkB;AAEpF,SAAO;AACR;","names":[]}
@@ -69,14 +69,64 @@ const groupOperations = [
69
69
  }
70
70
  ];
71
71
  const groupFields = [
72
+ /* -------------------------------------------------------------------------- */
73
+ /* group */
74
+ /* -------------------------------------------------------------------------- */
75
+ {
76
+ displayName: "Group",
77
+ name: "groupId",
78
+ default: {
79
+ mode: "list",
80
+ value: ""
81
+ },
82
+ description: "Select the group to perform the operation on",
83
+ displayOptions: {
84
+ show: {
85
+ operation: ["delete", "get", "update"],
86
+ resource: ["group"]
87
+ }
88
+ },
89
+ modes: [
90
+ {
91
+ displayName: "From list",
92
+ name: "list",
93
+ type: "list",
94
+ typeOptions: {
95
+ searchListMethod: "searchGroups"
96
+ }
97
+ },
98
+ {
99
+ displayName: "By ID",
100
+ name: "GroupId",
101
+ type: "string",
102
+ placeholder: "e.g. 0123kx3o1habcdf"
103
+ }
104
+ ],
105
+ required: true,
106
+ type: "resourceLocator"
107
+ },
72
108
  /* -------------------------------------------------------------------------- */
73
109
  /* group:create */
74
110
  /* -------------------------------------------------------------------------- */
75
111
  {
76
- displayName: "Email",
112
+ displayName: "Group Name",
113
+ name: "name",
114
+ displayOptions: {
115
+ show: {
116
+ operation: ["create"],
117
+ resource: ["group"]
118
+ }
119
+ },
120
+ default: "",
121
+ description: "The group's display name",
122
+ placeholder: "e.g. Sales",
123
+ type: "string"
124
+ },
125
+ {
126
+ displayName: "Group Email",
77
127
  name: "email",
78
128
  type: "string",
79
- placeholder: "name@email.com",
129
+ placeholder: "e.g. sales@example.com",
80
130
  required: true,
81
131
  displayOptions: {
82
132
  show: {
@@ -106,50 +156,12 @@ const groupFields = [
106
156
  type: "string",
107
157
  default: "",
108
158
  description: "An extended description to help users determine the purpose of a group. For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups."
109
- },
110
- {
111
- displayName: "Name",
112
- name: "name",
113
- type: "string",
114
- default: "",
115
- description: "The group's display name"
116
159
  }
117
160
  ]
118
161
  },
119
162
  /* -------------------------------------------------------------------------- */
120
163
  /* group:delete */
121
164
  /* -------------------------------------------------------------------------- */
122
- {
123
- displayName: "Group ID",
124
- name: "groupId",
125
- type: "string",
126
- required: true,
127
- displayOptions: {
128
- show: {
129
- operation: ["delete"],
130
- resource: ["group"]
131
- }
132
- },
133
- default: "",
134
- description: "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID."
135
- },
136
- /* -------------------------------------------------------------------------- */
137
- /* group:get */
138
- /* -------------------------------------------------------------------------- */
139
- {
140
- displayName: "Group ID",
141
- name: "groupId",
142
- type: "string",
143
- required: true,
144
- displayOptions: {
145
- show: {
146
- operation: ["get"],
147
- resource: ["group"]
148
- }
149
- },
150
- default: "",
151
- description: "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID."
152
- },
153
165
  /* -------------------------------------------------------------------------- */
154
166
  /* group:getAll */
155
167
  /* -------------------------------------------------------------------------- */
@@ -185,10 +197,10 @@ const groupFields = [
185
197
  description: "Max number of results to return"
186
198
  },
187
199
  {
188
- displayName: "Options",
189
- name: "options",
200
+ displayName: "Filter",
201
+ name: "filter",
190
202
  type: "collection",
191
- placeholder: "Add option",
203
+ placeholder: "Add Filter",
192
204
  default: {},
193
205
  displayOptions: {
194
206
  show: {
@@ -202,78 +214,86 @@ const groupFields = [
202
214
  name: "customer",
203
215
  type: "string",
204
216
  default: "",
205
- description: "The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, fill this field instead of domain."
217
+ description: "The unique ID for the customer's Google Workspace account"
206
218
  },
207
219
  {
208
220
  displayName: "Domain",
209
221
  name: "domain",
210
222
  type: "string",
211
223
  default: "",
212
- description: "The domain name. Use this field to get fields from only one domain."
213
- },
214
- {
215
- displayName: "Order By",
216
- name: "orderBy",
217
- type: "options",
218
- options: [
219
- {
220
- name: "Email",
221
- value: "email"
222
- }
223
- ],
224
- default: "",
225
- description: "Property to use for sorting results"
224
+ description: "The domain name. Use this field to get groups from a specific domain."
226
225
  },
227
226
  {
228
227
  displayName: "Query",
229
228
  name: "query",
230
229
  type: "string",
230
+ placeholder: "e.g. name:contact* email:contact*",
231
231
  default: "",
232
- description: 'Query string search. Complete documentation is <a href="https://developers.google.com/admin-sdk/directory/v1/guides/search-groups">at</a>.'
233
- },
234
- {
235
- displayName: "Sort Order",
236
- name: "sortOrder",
237
- type: "options",
238
- options: [
239
- {
240
- name: "Ascending",
241
- value: "ASCENDING"
242
- },
243
- {
244
- name: "Descending",
245
- value: "DESCENDING"
246
- }
247
- ],
248
- default: "",
249
- description: "Whether to return results in ascending or descending order"
232
+ description: 'Query string to filter the results. Follow Google Admin SDK documentation. <a href="https://developers.google.com/admin-sdk/directory/v1/guides/search-groups#examples" target="_blank">More info</a>.'
250
233
  },
251
234
  {
252
235
  displayName: "User ID",
253
236
  name: "userId",
254
237
  type: "string",
255
238
  default: "",
256
- description: "Email or immutable ID of the user if only those groups are to be listed, the given user is a member of. If it's an ID, it should match with the ID of the user object."
239
+ description: "Email or immutable ID of a user to list groups they are a member of"
257
240
  }
258
241
  ]
259
242
  },
260
- /* -------------------------------------------------------------------------- */
261
- /* group:update */
262
- /* -------------------------------------------------------------------------- */
263
243
  {
264
- displayName: "Group ID",
265
- name: "groupId",
266
- type: "string",
267
- required: true,
244
+ displayName: "Sort",
245
+ name: "sort",
246
+ type: "fixedCollection",
247
+ placeholder: "Add Sort Rule",
248
+ default: {},
268
249
  displayOptions: {
269
250
  show: {
270
- operation: ["update"],
251
+ operation: ["getAll"],
271
252
  resource: ["group"]
272
253
  }
273
254
  },
274
- default: "",
275
- description: "Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID."
255
+ options: [
256
+ {
257
+ name: "sortRules",
258
+ displayName: "Sort Rules",
259
+ values: [
260
+ {
261
+ displayName: "Order By",
262
+ name: "orderBy",
263
+ type: "options",
264
+ options: [
265
+ {
266
+ name: "Email",
267
+ value: "email"
268
+ }
269
+ ],
270
+ default: "email",
271
+ description: "Field to sort the results by"
272
+ },
273
+ {
274
+ displayName: "Sort Order",
275
+ name: "sortOrder",
276
+ type: "options",
277
+ options: [
278
+ {
279
+ name: "Ascending",
280
+ value: "ASCENDING"
281
+ },
282
+ {
283
+ name: "Descending",
284
+ value: "DESCENDING"
285
+ }
286
+ ],
287
+ default: "ASCENDING",
288
+ description: "Sort order direction"
289
+ }
290
+ ]
291
+ }
292
+ ]
276
293
  },
294
+ /* -------------------------------------------------------------------------- */
295
+ /* group:update */
296
+ /* -------------------------------------------------------------------------- */
277
297
  {
278
298
  displayName: "Update Fields",
279
299
  name: "updateFields",
@@ -292,13 +312,16 @@ const groupFields = [
292
312
  name: "description",
293
313
  type: "string",
294
314
  default: "",
315
+ typeOptions: {
316
+ rows: 2
317
+ },
295
318
  description: "An extended description to help users determine the purpose of a group. For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups."
296
319
  },
297
320
  {
298
321
  displayName: "Email",
299
322
  name: "email",
300
323
  type: "string",
301
- placeholder: "name@email.com",
324
+ placeholder: "e.g. sales@example.com",
302
325
  default: "",
303
326
  description: "The group's email address. If your account has multiple domains, select the appropriate domain for the email address. The email must be unique."
304
327
  },
@@ -306,6 +329,7 @@ const groupFields = [
306
329
  displayName: "Name",
307
330
  name: "name",
308
331
  type: "string",
332
+ placeholder: "e.g. Sales",
309
333
  default: "",
310
334
  description: "The group's display name"
311
335
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../nodes/Google/GSuiteAdmin/GroupDescripion.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\n\nexport const groupOperations: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Operation',\n\t\tname: 'operation',\n\t\ttype: 'options',\n\t\tnoDataExpression: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['group'],\n\t\t\t},\n\t\t},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tname: 'Create',\n\t\t\t\tvalue: 'create',\n\t\t\t\tdescription: 'Create a group',\n\t\t\t\taction: 'Create a group',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Delete',\n\t\t\t\tvalue: 'delete',\n\t\t\t\tdescription: 'Delete a group',\n\t\t\t\taction: 'Delete a group',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Get',\n\t\t\t\tvalue: 'get',\n\t\t\t\tdescription: 'Get a group',\n\t\t\t\taction: 'Get a group',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Get Many',\n\t\t\t\tvalue: 'getAll',\n\t\t\t\tdescription: 'Get many groups',\n\t\t\t\taction: 'Get many groups',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Update',\n\t\t\t\tvalue: 'update',\n\t\t\t\tdescription: 'Update a group',\n\t\t\t\taction: 'Update a group',\n\t\t\t},\n\t\t],\n\t\tdefault: 'create',\n\t},\n];\n\nexport const groupFields: INodeProperties[] = [\n\t/* -------------------------------------------------------------------------- */\n\t/* group:create */\n\t/* -------------------------------------------------------------------------- */\n\t{\n\t\tdisplayName: 'Email',\n\t\tname: 'email',\n\t\ttype: 'string',\n\t\tplaceholder: 'name@email.com',\n\t\trequired: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['create'],\n\t\t\t\tresource: ['group'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription:\n\t\t\t\"The group's email address. If your account has multiple domains, select the appropriate domain for the email address. The email must be unique\",\n\t},\n\t{\n\t\tdisplayName: 'Additional Fields',\n\t\tname: 'additionalFields',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Field',\n\t\tdefault: {},\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['create'],\n\t\t\t\tresource: ['group'],\n\t\t\t},\n\t\t},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Description',\n\t\t\t\tname: 'description',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription:\n\t\t\t\t\t'An extended description to help users determine the purpose of a group. For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups.',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Name',\n\t\t\t\tname: 'name',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription: \"The group's display name\",\n\t\t\t},\n\t\t],\n\t},\n\t/* -------------------------------------------------------------------------- */\n\t/* group:delete */\n\t/* -------------------------------------------------------------------------- */\n\t{\n\t\tdisplayName: 'Group ID',\n\t\tname: 'groupId',\n\t\ttype: 'string',\n\t\trequired: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['delete'],\n\t\t\t\tresource: ['group'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription:\n\t\t\t\"Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.\",\n\t},\n\t/* -------------------------------------------------------------------------- */\n\t/* group:get */\n\t/* -------------------------------------------------------------------------- */\n\t{\n\t\tdisplayName: 'Group ID',\n\t\tname: 'groupId',\n\t\ttype: 'string',\n\t\trequired: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['get'],\n\t\t\t\tresource: ['group'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription:\n\t\t\t\"Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.\",\n\t},\n\t/* -------------------------------------------------------------------------- */\n\t/* group:getAll */\n\t/* -------------------------------------------------------------------------- */\n\t{\n\t\tdisplayName: 'Return All',\n\t\tname: 'returnAll',\n\t\ttype: 'boolean',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['getAll'],\n\t\t\t\tresource: ['group'],\n\t\t\t},\n\t\t},\n\t\tdefault: false,\n\t\tdescription: 'Whether to return all results or only up to a given limit',\n\t},\n\t{\n\t\tdisplayName: 'Limit',\n\t\tname: 'limit',\n\t\ttype: 'number',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['getAll'],\n\t\t\t\tresource: ['group'],\n\t\t\t\treturnAll: [false],\n\t\t\t},\n\t\t},\n\t\ttypeOptions: {\n\t\t\tminValue: 1,\n\t\t\tmaxValue: 500,\n\t\t},\n\t\tdefault: 100,\n\t\tdescription: 'Max number of results to return',\n\t},\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add option',\n\t\tdefault: {},\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['getAll'],\n\t\t\t\tresource: ['group'],\n\t\t\t},\n\t\t},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Customer',\n\t\t\t\tname: 'customer',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription:\n\t\t\t\t\t\"The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, fill this field instead of domain.\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Domain',\n\t\t\t\tname: 'domain',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription: 'The domain name. Use this field to get fields from only one domain.',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Order By',\n\t\t\t\tname: 'orderBy',\n\t\t\t\ttype: 'options',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Email',\n\t\t\t\t\t\tvalue: 'email',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: '',\n\t\t\t\tdescription: 'Property to use for sorting results',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Query',\n\t\t\t\tname: 'query',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription:\n\t\t\t\t\t'Query string search. Complete documentation is <a href=\"https://developers.google.com/admin-sdk/directory/v1/guides/search-groups\">at</a>.',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Sort Order',\n\t\t\t\tname: 'sortOrder',\n\t\t\t\ttype: 'options',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Ascending',\n\t\t\t\t\t\tvalue: 'ASCENDING',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Descending',\n\t\t\t\t\t\tvalue: 'DESCENDING',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\tdefault: '',\n\t\t\t\tdescription: 'Whether to return results in ascending or descending order',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'User ID',\n\t\t\t\tname: 'userId',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription:\n\t\t\t\t\t\"Email or immutable ID of the user if only those groups are to be listed, the given user is a member of. If it's an ID, it should match with the ID of the user object.\",\n\t\t\t},\n\t\t],\n\t},\n\t/* -------------------------------------------------------------------------- */\n\t/* group:update */\n\t/* -------------------------------------------------------------------------- */\n\t{\n\t\tdisplayName: 'Group ID',\n\t\tname: 'groupId',\n\t\ttype: 'string',\n\t\trequired: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['update'],\n\t\t\t\tresource: ['group'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription:\n\t\t\t\"Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.\",\n\t},\n\t{\n\t\tdisplayName: 'Update Fields',\n\t\tname: 'updateFields',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Field',\n\t\tdefault: {},\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['update'],\n\t\t\t\tresource: ['group'],\n\t\t\t},\n\t\t},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Description',\n\t\t\t\tname: 'description',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription:\n\t\t\t\t\t'An extended description to help users determine the purpose of a group. For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups.',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Email',\n\t\t\t\tname: 'email',\n\t\t\t\ttype: 'string',\n\t\t\t\tplaceholder: 'name@email.com',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription:\n\t\t\t\t\t\"The group's email address. If your account has multiple domains, select the appropriate domain for the email address. The email must be unique.\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Name',\n\t\t\t\tname: 'name',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription: \"The group's display name\",\n\t\t\t},\n\t\t],\n\t},\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,kBAAqC;AAAA,EACjD;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,UAAU,CAAC,OAAO;AAAA,MACnB;AAAA,IACD;AAAA,IACA,SAAS;AAAA,MACR;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,QACP,aAAa;AAAA,QACb,QAAQ;AAAA,MACT;AAAA,MACA;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,QACP,aAAa;AAAA,QACb,QAAQ;AAAA,MACT;AAAA,MACA;AAAA,QACC,MAAM;AAA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O;AAAA,MACnB;AAAA,IACD;AAAA,IACA,SAAS;AAAA,MACR;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aACC;AAAA,MACF;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,aAAa;AAAA,QACb,SAAS;AAAA,QACT,aACC;AAAA,MACF;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,IACD;AAAA,EACD;AACD;","names":[]}
1
+ {"version":3,"sources":["../../../../nodes/Google/GSuiteAdmin/GroupDescripion.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\n\nexport const groupOperations: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Operation',\n\t\tname: 'operation',\n\t\ttype: 'options',\n\t\tnoDataExpression: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['group'],\n\t\t\t},\n\t\t},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tname: 'Create',\n\t\t\t\tvalue: 'create',\n\t\t\t\tdescription: 'Create a group',\n\t\t\t\taction: 'Create a group',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Delete',\n\t\t\t\tvalue: 'delete',\n\t\t\t\tdescription: 'Delete a group',\n\t\t\t\taction: 'Delete a group',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Get',\n\t\t\t\tvalue: 'get',\n\t\t\t\tdescription: 'Get a group',\n\t\t\t\taction: 'Get a group',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Get Many',\n\t\t\t\tvalue: 'getAll',\n\t\t\t\tdescription: 'Get many groups',\n\t\t\t\taction: 'Get many groups',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Update',\n\t\t\t\tvalue: 'update',\n\t\t\t\tdescription: 'Update a group',\n\t\t\t\taction: 'Update a group',\n\t\t\t},\n\t\t],\n\t\tdefault: 'create',\n\t},\n];\n\nexport const groupFields: INodeProperties[] = [\n\t/* -------------------------------------------------------------------------- */\n\t/* group */\n\t/* -------------------------------------------------------------------------- */\n\t{\n\t\tdisplayName: 'Group',\n\t\tname: 'groupId',\n\t\tdefault: {\n\t\t\tmode: 'list',\n\t\t\tvalue: '',\n\t\t},\n\t\tdescription: 'Select the group to perform the operation on',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['delete', 'get', 'update'],\n\t\t\t\tresource: ['group'],\n\t\t\t},\n\t\t},\n\t\tmodes: [\n\t\t\t{\n\t\t\t\tdisplayName: 'From list',\n\t\t\t\tname: 'list',\n\t\t\t\ttype: 'list',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tsearchListMethod: 'searchGroups',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'By ID',\n\t\t\t\tname: 'GroupId',\n\t\t\t\ttype: 'string',\n\t\t\t\tplaceholder: 'e.g. 0123kx3o1habcdf',\n\t\t\t},\n\t\t],\n\t\trequired: true,\n\t\ttype: 'resourceLocator',\n\t},\n\n\t/* -------------------------------------------------------------------------- */\n\t/* group:create */\n\t/* -------------------------------------------------------------------------- */\n\t{\n\t\tdisplayName: 'Group Name',\n\t\tname: 'name',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['create'],\n\t\t\t\tresource: ['group'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: \"The group's display name\",\n\t\tplaceholder: 'e.g. Sales',\n\t\ttype: 'string',\n\t},\n\t{\n\t\tdisplayName: 'Group Email',\n\t\tname: 'email',\n\t\ttype: 'string',\n\t\tplaceholder: 'e.g. sales@example.com',\n\t\trequired: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['create'],\n\t\t\t\tresource: ['group'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription:\n\t\t\t\"The group's email address. If your account has multiple domains, select the appropriate domain for the email address. The email must be unique\",\n\t},\n\t{\n\t\tdisplayName: 'Additional Fields',\n\t\tname: 'additionalFields',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Field',\n\t\tdefault: {},\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['create'],\n\t\t\t\tresource: ['group'],\n\t\t\t},\n\t\t},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Description',\n\t\t\t\tname: 'description',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription:\n\t\t\t\t\t'An extended description to help users determine the purpose of a group. For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups.',\n\t\t\t},\n\t\t],\n\t},\n\n\t/* -------------------------------------------------------------------------- */\n\t/* group:delete */\n\t/* -------------------------------------------------------------------------- */\n\n\t/* -------------------------------------------------------------------------- */\n\t/* group:getAll */\n\t/* -------------------------------------------------------------------------- */\n\t{\n\t\tdisplayName: 'Return All',\n\t\tname: 'returnAll',\n\t\ttype: 'boolean',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['getAll'],\n\t\t\t\tresource: ['group'],\n\t\t\t},\n\t\t},\n\t\tdefault: false,\n\t\tdescription: 'Whether to return all results or only up to a given limit',\n\t},\n\t{\n\t\tdisplayName: 'Limit',\n\t\tname: 'limit',\n\t\ttype: 'number',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['getAll'],\n\t\t\t\tresource: ['group'],\n\t\t\t\treturnAll: [false],\n\t\t\t},\n\t\t},\n\t\ttypeOptions: {\n\t\t\tminValue: 1,\n\t\t\tmaxValue: 500,\n\t\t},\n\t\tdefault: 100,\n\t\tdescription: 'Max number of results to return',\n\t},\n\t{\n\t\tdisplayName: 'Filter',\n\t\tname: 'filter',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Filter',\n\t\tdefault: {},\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['getAll'],\n\t\t\t\tresource: ['group'],\n\t\t\t},\n\t\t},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Customer',\n\t\t\t\tname: 'customer',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription: \"The unique ID for the customer's Google Workspace account\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Domain',\n\t\t\t\tname: 'domain',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription: 'The domain name. Use this field to get groups from a specific domain.',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Query',\n\t\t\t\tname: 'query',\n\t\t\t\ttype: 'string',\n\t\t\t\tplaceholder: 'e.g. name:contact* email:contact*',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription:\n\t\t\t\t\t'Query string to filter the results. Follow Google Admin SDK documentation. <a href=\"https://developers.google.com/admin-sdk/directory/v1/guides/search-groups#examples\" target=\"_blank\">More info</a>.',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'User ID',\n\t\t\t\tname: 'userId',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription: 'Email or immutable ID of a user to list groups they are a member of',\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tdisplayName: 'Sort',\n\t\tname: 'sort',\n\t\ttype: 'fixedCollection',\n\t\tplaceholder: 'Add Sort Rule',\n\t\tdefault: {},\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['getAll'],\n\t\t\t\tresource: ['group'],\n\t\t\t},\n\t\t},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tname: 'sortRules',\n\t\t\t\tdisplayName: 'Sort Rules',\n\t\t\t\tvalues: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Order By',\n\t\t\t\t\t\tname: 'orderBy',\n\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Email',\n\t\t\t\t\t\t\t\tvalue: 'email',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdefault: 'email',\n\t\t\t\t\t\tdescription: 'Field to sort the results by',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Sort Order',\n\t\t\t\t\t\tname: 'sortOrder',\n\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Ascending',\n\t\t\t\t\t\t\t\tvalue: 'ASCENDING',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Descending',\n\t\t\t\t\t\t\t\tvalue: 'DESCENDING',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdefault: 'ASCENDING',\n\t\t\t\t\t\tdescription: 'Sort order direction',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n\n\t/* -------------------------------------------------------------------------- */\n\t/* group:update */\n\t/* -------------------------------------------------------------------------- */\n\t{\n\t\tdisplayName: 'Update Fields',\n\t\tname: 'updateFields',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Field',\n\t\tdefault: {},\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\toperation: ['update'],\n\t\t\t\tresource: ['group'],\n\t\t\t},\n\t\t},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Description',\n\t\t\t\tname: 'description',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\trows: 2,\n\t\t\t\t},\n\t\t\t\tdescription:\n\t\t\t\t\t'An extended description to help users determine the purpose of a group. For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups.',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Email',\n\t\t\t\tname: 'email',\n\t\t\t\ttype: 'string',\n\t\t\t\tplaceholder: 'e.g. sales@example.com',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription:\n\t\t\t\t\t\"The group's email address. If your account has multiple domains, select the appropriate domain for the email address. The email must be unique.\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Name',\n\t\t\t\tname: 'name',\n\t\t\t\ttype: 'string',\n\t\t\t\tplaceholder: 'e.g. Sales',\n\t\t\t\tdefault: '',\n\t\t\t\tdescription: \"The group's display name\",\n\t\t\t},\n\t\t],\n\t},\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,kBAAqC;AAAA,EACjD;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,UAAU,CAAC,OAAO;AAAA,MACnB;AAAA,IACD;AAAA,IACA,SAAS;AAAA,MACR;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,QACP,aAAa;AAAA,QACb,QAAQ;AAAA,MACT;AAAA,MACA;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,QACP,aAAa;AAAA,QACb,QAAQ;AAAA,MACT;AAAA,MACA;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,QACP,aAAa;AAAA,QACb,QAAQ;AAAA,MACT;AAAA,MACA;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,QACP,aAAa;AAAA,QACb,QAAQ;AAAA,MACT;AAAA,MACA;AAAA,QACC,MAAM;AAAA,QACN,OAAO;AAAA,QACP,aAAa;AAAA,QACb,QAAQ;AAAA,MACT;AAAA,IACD;AAAA,IACA,SAAS;AAAA,EACV;AACD;AAEO,MA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