Fixed one auth method

This commit is contained in:
Adina Totorean 2025-02-05 16:32:08 +02:00
parent 396f7c1b8e
commit def6634a5b
3 changed files with 3 additions and 35 deletions

View file

@ -14,7 +14,7 @@ import {
export class MicrosoftCosmosDbSharedKeyApi implements ICredentialType {
name = 'microsoftCosmosDbSharedKeyApi';
displayName = 'Azure Cosmos DB API';
displayName = 'Cosmos DB API';
documentationUrl = 'microsoftCosmosDb';

View file

@ -16,9 +16,9 @@ export class CosmosDb implements INodeType {
group: ['transform'],
version: 1,
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
description: 'Interact with Azure Cosmos DB API',
description: 'Interact with Cosmos DB API',
defaults: {
name: 'Azure Cosmos Db',
name: 'Cosmos Db',
},
inputs: [NodeConnectionType.Main],
outputs: [NodeConnectionType.Main],
@ -26,11 +26,6 @@ export class CosmosDb implements INodeType {
{
name: 'microsoftCosmosDbSharedKeyApi',
required: true,
displayOptions: {
show: {
authentication: ['sharedKey'],
},
},
},
],
requestDefaults: {
@ -41,28 +36,11 @@ export class CosmosDb implements INodeType {
},
},
properties: [
{
displayName: 'Authentication',
name: 'authentication',
type: 'options',
options: [
{
name: 'Shared Key',
value: 'sharedKey',
},
],
default: 'sharedKey',
},
{
displayName: 'Resource',
name: 'resource',
type: 'options',
noDataExpression: true,
routing: {
// send: {
// preSend: [presendStringifyBody],
// },
},
options: [
{
name: 'Container',

View file

@ -63,16 +63,6 @@ export function getAuthorizationTokenUsingMasterKey(
return `type=master&ver=1.0&sig=${signature}`;
}
export async function presendStringifyBody(
this: IExecuteSingleFunctions,
requestOptions: IHttpRequestOptions,
): Promise<IHttpRequestOptions> {
if (requestOptions.body) {
requestOptions.body = JSON.stringify(requestOptions.body);
}
return requestOptions;
}
export async function handlePagination(
this: IExecutePaginationFunctions,
resultOptions: DeclarativeRestApiSettings.ResultOptions,