Skip to content

Commit

Permalink
RavenDB-23163 UI for Amazon SQS ETL
Browse files Browse the repository at this point in the history
  • Loading branch information
ml054 committed Dec 5, 2024
1 parent 79949f7 commit 28fd92c
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export interface AmazonSqsConnection extends ConnectionBase {
regionName?: string;
secretKey?: string;
};
emulator?: boolean;
passwordless?: boolean;
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ const schema = yupObjectSchema<FormData>({
regionName: getStringRequiredSchema("basic"),
}),
passwordless: yup.boolean(),
emulator: yup.boolean(),
}),
});

Expand All @@ -226,7 +225,6 @@ function getDefaultValues(initialConnection: AmazonSqsConnection, isForNewConnec
secretKey: null,
regionName: null,
},
emulator: false,
passwordless: false,
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ export function mapAmazonSqsConnectionsFromDto(
name: connection.Name,
authType: getAmazonSqsAuthType(connection),
settings: {
emulator: connection.AmazonSqsConnectionSettings.UseEmulator,
passwordless: connection.AmazonSqsConnectionSettings.Passwordless,
basic: {
accessKey: connection.AmazonSqsConnectionSettings.Basic?.AccessKey,
Expand All @@ -320,9 +319,6 @@ function getAmazonSqsAuthType(dto: QueueConnectionStringDto): AmazonSqsAuthentic
if (dto.AmazonSqsConnectionSettings.Passwordless) {
return "passwordless";
}
if (dto.AmazonSqsConnectionSettings.UseEmulator) {
return "emulator";
}
if (dto.AmazonSqsConnectionSettings.Basic) {
return "basic";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,22 +168,13 @@ export function mapAmazonSqsConnectionStringSettingsToDto(
AccessKey: connection.settings.basic.accessKey,
RegionName: connection.settings.basic.regionName,
},
UseEmulator: false,
Passwordless: false,
};
}
case "passwordless": {
return {
Basic: null,
Passwordless: true,
UseEmulator: false,
};
}
case "emulator": {
return {
Basic: null,
Passwordless: false,
UseEmulator: true,
};
}
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class AmazonSqsBasicModel {
RegionName: this.regionName(),
SecretKey: this.secretKey()
},
UseEmulator: false,
Passwordless: false
}
}
Expand Down Expand Up @@ -83,8 +82,6 @@ class connectionStringAmazonSqsModel extends connectionStringModel {
switch (authenticationType) {
case "basic":
return "Basic";
case "emulator":
return "Emulator";
case "passwordless":
return "Passwordless";
default:
Expand All @@ -103,8 +100,6 @@ class connectionStringAmazonSqsModel extends connectionStringModel {
const settings = dto.AmazonSqsConnectionSettings;
if (settings.Passwordless) {
this.authenticationType("passwordless");
} else if (settings.UseEmulator) {
this.authenticationType("emulator");
} else if (settings.Basic) {
this.authenticationType("basic");
this.basicModel.update(settings.Basic);
Expand Down Expand Up @@ -139,7 +134,6 @@ class connectionStringAmazonSqsModel extends connectionStringModel {
RegionName: ""
},
Passwordless: false,
UseEmulator: false
}
}, true, []);
}
Expand All @@ -149,17 +143,10 @@ class connectionStringAmazonSqsModel extends connectionStringModel {
switch (authenticationType) {
case "basic":
return this.basicModel.toDto();
case "emulator":
return {
Basic: null,
Passwordless: false,
UseEmulator: true
}
case "passwordless":
return {
Basic: null,
Passwordless: true,
UseEmulator: false
}
default:
assertUnreachable(authenticationType);
Expand Down
1 change: 0 additions & 1 deletion src/Raven.Studio/typescript/test/stubs/DatabasesStubs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,6 @@ export class DatabasesStubs {
RegionName: "us-west-2",
},
Passwordless: false,
UseEmulator: false,
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/Raven.Studio/typings/_studio/dto.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1057,4 +1057,4 @@ type GetConnectionStringsResult = Omit<Raven.Client.Documents.Operations.Connect
}

type AzureQueueStorageAuthenticationType = "connectionString" | "entraId" | "passwordless";
type AmazonSqsAuthenticationType = "basic" | "emulator" | "passwordless";
type AmazonSqsAuthenticationType = "basic" | "passwordless";

0 comments on commit 28fd92c

Please sign in to comment.