Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/ci_check_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ jobs:
- name: Install Smithy CLI
run: |
mkdir -p smithy-install/smithy && \
curl -L https://github.com/smithy-lang/smithy/releases/download/1.55.0/smithy-cli-linux-x86_64.zip -o smithy-install/smithy-cli-linux-x86_64.zip && \
curl -L https://github.com/smithy-lang/smithy/releases/download/1.69.0/smithy-cli-linux-x86_64.zip -o smithy-install/smithy-cli-linux-x86_64.zip && \
unzip -qo smithy-install/smithy-cli-linux-x86_64.zip -d smithy-install && \
mv smithy-install/smithy-cli-linux-x86_64/* smithy-install/smithy/ && \
rm -rf smithy-install/smithy-cli-linux-x86_64.zip
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,6 @@ clients/generated/smithy/typescript/tsconfig.*

# Skill packages (zips for upload, regenerated by `make skills-update`)
scripts/skill_templates/

# Local Maven repo with corrected smithy-rs codegen POMs (generated by `make smithy-local-repo`)
smithy/.local-m2/
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import qualified Io.Superposition.SuperpositionClient
import qualified Io.Superposition.Utility

data BulkOperationError =
InternalServerError Io.Superposition.Model.InternalServerError.InternalServerError
ResourceNotFound Io.Superposition.Model.ResourceNotFound.ResourceNotFound
| WebhookFailed Io.Superposition.Model.WebhookFailed.WebhookFailed
| ResourceNotFound Io.Superposition.Model.ResourceNotFound.ResourceNotFound
| InternalServerError Io.Superposition.Model.InternalServerError.InternalServerError
| BuilderError Data.Text.Text
| DeSerializationError Io.Superposition.Utility.HttpMetadata Data.Text.Text
| UnexpectedError (Data.Maybe.Maybe Io.Superposition.Utility.HttpMetadata) Data.Text.Text
Expand All @@ -31,9 +31,9 @@ instance Io.Superposition.Utility.OperationError BulkOperationError where
mkUnexpectedError = UnexpectedError

getErrorParser status
| status == (Io.Superposition.Utility.expectedStatus @Io.Superposition.Model.InternalServerError.InternalServerError) = Just (fmap InternalServerError (Io.Superposition.Utility.responseParser @Io.Superposition.Model.InternalServerError.InternalServerError))
| status == (Io.Superposition.Utility.expectedStatus @Io.Superposition.Model.WebhookFailed.WebhookFailed) = Just (fmap WebhookFailed (Io.Superposition.Utility.responseParser @Io.Superposition.Model.WebhookFailed.WebhookFailed))
| status == (Io.Superposition.Utility.expectedStatus @Io.Superposition.Model.ResourceNotFound.ResourceNotFound) = Just (fmap ResourceNotFound (Io.Superposition.Utility.responseParser @Io.Superposition.Model.ResourceNotFound.ResourceNotFound))
| status == (Io.Superposition.Utility.expectedStatus @Io.Superposition.Model.WebhookFailed.WebhookFailed) = Just (fmap WebhookFailed (Io.Superposition.Utility.responseParser @Io.Superposition.Model.WebhookFailed.WebhookFailed))
| status == (Io.Superposition.Utility.expectedStatus @Io.Superposition.Model.InternalServerError.InternalServerError) = Just (fmap InternalServerError (Io.Superposition.Utility.responseParser @Io.Superposition.Model.InternalServerError.InternalServerError))
| otherwise = Nothing


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import qualified Io.Superposition.SuperpositionClient
import qualified Io.Superposition.Utility

data WeightRecomputeError =
InternalServerError Io.Superposition.Model.InternalServerError.InternalServerError
| WebhookFailed Io.Superposition.Model.WebhookFailed.WebhookFailed
WebhookFailed Io.Superposition.Model.WebhookFailed.WebhookFailed
| InternalServerError Io.Superposition.Model.InternalServerError.InternalServerError
| BuilderError Data.Text.Text
| DeSerializationError Io.Superposition.Utility.HttpMetadata Data.Text.Text
| UnexpectedError (Data.Maybe.Maybe Io.Superposition.Utility.HttpMetadata) Data.Text.Text
Expand All @@ -29,8 +29,8 @@ instance Io.Superposition.Utility.OperationError WeightRecomputeError where
mkUnexpectedError = UnexpectedError

getErrorParser status
| status == (Io.Superposition.Utility.expectedStatus @Io.Superposition.Model.InternalServerError.InternalServerError) = Just (fmap InternalServerError (Io.Superposition.Utility.responseParser @Io.Superposition.Model.InternalServerError.InternalServerError))
| status == (Io.Superposition.Utility.expectedStatus @Io.Superposition.Model.WebhookFailed.WebhookFailed) = Just (fmap WebhookFailed (Io.Superposition.Utility.responseParser @Io.Superposition.Model.WebhookFailed.WebhookFailed))
| status == (Io.Superposition.Utility.expectedStatus @Io.Superposition.Model.InternalServerError.InternalServerError) = Just (fmap InternalServerError (Io.Superposition.Utility.responseParser @Io.Superposition.Model.InternalServerError.InternalServerError))
| otherwise = Nothing


Expand Down
2 changes: 1 addition & 1 deletion clients/java/provider-sdk-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {

// Add missing Smithy dependencies
implementation("software.amazon.smithy.java:client-core:0.0.1")
implementation("software.amazon.smithy:smithy-aws-traits:1.55.0")
implementation("software.amazon.smithy:smithy-aws-traits:1.69.0")
implementation("software.amazon.smithy.java:aws-client-restjson:0.0.1")

testImplementation("org.junit.jupiter:junit-jupiter:5.7.1")
Expand Down
2 changes: 1 addition & 1 deletion clients/java/sdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ java {

dependencies {
implementation("software.amazon.smithy.java:client-core:0.0.1")
implementation("software.amazon.smithy:smithy-aws-traits:1.55.0")
implementation("software.amazon.smithy:smithy-aws-traits:1.69.0")
implementation("software.amazon.smithy.java:aws-client-restjson:0.0.1")
}
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ default CompletableFuture<ApplicableVariantsOutput> applicableVariants(Applicabl
* Executes multiple context operations (PUT, REPLACE, DELETE, MOVE) in a single atomic transaction for
* efficient batch processing.
*
* @throws InternalServerError
* @throws WebhookFailed
* @throws ResourceNotFound
* @throws WebhookFailed
* @throws InternalServerError
*/
default CompletableFuture<BulkOperationOutput> bulkOperation(BulkOperationInput input) {
return bulkOperation(input, null);
Expand All @@ -250,9 +250,9 @@ default CompletableFuture<BulkOperationOutput> bulkOperation(BulkOperationInput
* Executes multiple context operations (PUT, REPLACE, DELETE, MOVE) in a single atomic transaction for
* efficient batch processing.
*
* @throws InternalServerError
* @throws WebhookFailed
* @throws ResourceNotFound
* @throws WebhookFailed
* @throws InternalServerError
*/
CompletableFuture<BulkOperationOutput> bulkOperation(BulkOperationInput input, RequestOverrideConfig overrideConfig);

Expand Down Expand Up @@ -1854,8 +1854,8 @@ default CompletableFuture<ValidateContextOutput> validateContext(ValidateContext
* Recalculates and updates the priority weights for all contexts in the workspace based on their
* dimensions.
*
* @throws InternalServerError
* @throws WebhookFailed
* @throws InternalServerError
*/
default CompletableFuture<WeightRecomputeOutput> weightRecompute(WeightRecomputeInput input) {
return weightRecompute(input, null);
Expand All @@ -1865,8 +1865,8 @@ default CompletableFuture<WeightRecomputeOutput> weightRecompute(WeightRecompute
* Recalculates and updates the priority weights for all contexts in the workspace based on their
* dimensions.
*
* @throws InternalServerError
* @throws WebhookFailed
* @throws InternalServerError
*/
CompletableFuture<WeightRecomputeOutput> weightRecompute(WeightRecomputeInput input, RequestOverrideConfig overrideConfig);

Expand Down Expand Up @@ -1901,12 +1901,12 @@ final class Builder extends Client.Builder<SuperpositionAsyncClient, Builder> {
Node.objectNode()
);

private static final HttpBasicAuthTrait httpBasicAuthScheme = new HttpBasicAuthTrait();
private static final AuthSchemeFactory<HttpBasicAuthTrait> httpBasicAuthSchemeFactory = new HttpBasicAuthAuthScheme.Factory();

private static final HttpBearerAuthTrait httpBearerAuthScheme = new HttpBearerAuthTrait();
private static final AuthSchemeFactory<HttpBearerAuthTrait> httpBearerAuthSchemeFactory = new HttpBearerAuthScheme.Factory();

private static final HttpBasicAuthTrait httpBasicAuthScheme = new HttpBasicAuthTrait();
private static final AuthSchemeFactory<HttpBasicAuthTrait> httpBasicAuthSchemeFactory = new HttpBasicAuthAuthScheme.Factory();

private Builder() {
configBuilder().putSupportedAuthSchemes(httpBasicAuthSchemeFactory.createAuthScheme(httpBasicAuthScheme), httpBearerAuthSchemeFactory.createAuthScheme(httpBearerAuthScheme));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ default ApplicableVariantsOutput applicableVariants(ApplicableVariantsInput inpu
* Executes multiple context operations (PUT, REPLACE, DELETE, MOVE) in a single atomic transaction for
* efficient batch processing.
*
* @throws InternalServerError
* @throws WebhookFailed
* @throws ResourceNotFound
* @throws WebhookFailed
* @throws InternalServerError
*/
default BulkOperationOutput bulkOperation(BulkOperationInput input) {
return bulkOperation(input, null);
Expand All @@ -249,9 +249,9 @@ default BulkOperationOutput bulkOperation(BulkOperationInput input) {
* Executes multiple context operations (PUT, REPLACE, DELETE, MOVE) in a single atomic transaction for
* efficient batch processing.
*
* @throws InternalServerError
* @throws WebhookFailed
* @throws ResourceNotFound
* @throws WebhookFailed
* @throws InternalServerError
*/
BulkOperationOutput bulkOperation(BulkOperationInput input, RequestOverrideConfig overrideConfig);

Expand Down Expand Up @@ -1853,8 +1853,8 @@ default ValidateContextOutput validateContext(ValidateContextInput input) {
* Recalculates and updates the priority weights for all contexts in the workspace based on their
* dimensions.
*
* @throws InternalServerError
* @throws WebhookFailed
* @throws InternalServerError
*/
default WeightRecomputeOutput weightRecompute(WeightRecomputeInput input) {
return weightRecompute(input, null);
Expand All @@ -1864,8 +1864,8 @@ default WeightRecomputeOutput weightRecompute(WeightRecomputeInput input) {
* Recalculates and updates the priority weights for all contexts in the workspace based on their
* dimensions.
*
* @throws InternalServerError
* @throws WebhookFailed
* @throws InternalServerError
*/
WeightRecomputeOutput weightRecompute(WeightRecomputeInput input, RequestOverrideConfig overrideConfig);

Expand Down Expand Up @@ -1900,12 +1900,12 @@ final class Builder extends Client.Builder<SuperpositionClient, Builder> {
Node.objectNode()
);

private static final HttpBasicAuthTrait httpBasicAuthScheme = new HttpBasicAuthTrait();
private static final AuthSchemeFactory<HttpBasicAuthTrait> httpBasicAuthSchemeFactory = new HttpBasicAuthAuthScheme.Factory();

private static final HttpBearerAuthTrait httpBearerAuthScheme = new HttpBearerAuthTrait();
private static final AuthSchemeFactory<HttpBearerAuthTrait> httpBearerAuthSchemeFactory = new HttpBearerAuthScheme.Factory();

private static final HttpBasicAuthTrait httpBasicAuthScheme = new HttpBasicAuthTrait();
private static final AuthSchemeFactory<HttpBasicAuthTrait> httpBasicAuthSchemeFactory = new HttpBasicAuthAuthScheme.Factory();

private Builder() {
configBuilder().putSupportedAuthSchemes(httpBasicAuthSchemeFactory.createAuthScheme(httpBasicAuthScheme), httpBearerAuthSchemeFactory.createAuthScheme(httpBearerAuthScheme));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public final class BulkOperation implements ApiOperation<BulkOperationInput, Bul

private static final TypeRegistry TYPE_REGISTRY = TypeRegistry.builder()
.putType(InternalServerError.$ID, InternalServerError.class, InternalServerError::builder)
.putType(WebhookFailed.$ID, WebhookFailed.class, WebhookFailed::builder)
.putType(ResourceNotFound.$ID, ResourceNotFound.class, ResourceNotFound::builder)
.putType(WebhookFailed.$ID, WebhookFailed.class, WebhookFailed::builder)
.build();

private static final List<ShapeId> SCHEMES = List.of(ShapeId.from("smithy.api#httpBasicAuth"), ShapeId.from("smithy.api#httpBearerAuth"));
Expand Down
6 changes: 3 additions & 3 deletions clients/python/sdk/superposition_sdk/deserialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,12 @@ async def _deserialize_error_bulk_operation(http_response: HTTPResponse, config:
case "internalservererror":
return await _deserialize_error_internal_server_error(http_response, config, parsed_body, message)

case "webhookfailed":
return await _deserialize_error_webhook_failed(http_response, config, parsed_body, message)

case "resourcenotfound":
return await _deserialize_error_resource_not_found(http_response, config, parsed_body, message)

case "webhookfailed":
return await _deserialize_error_webhook_failed(http_response, config, parsed_body, message)

case _:
return UnknownApiError(f"{code}: {message}")

Expand Down
8 changes: 4 additions & 4 deletions clients/python/sdk/superposition_sdk/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2001,9 +2001,9 @@ def _consumer(schema: Schema, de: ShapeDeserializer) -> None:
input_schema = _SCHEMA_BULK_OPERATION_INPUT,
output_schema = _SCHEMA_BULK_OPERATION_OUTPUT,
error_registry = TypeRegistry({
ShapeID("io.superposition#InternalServerError"): InternalServerError,
ShapeID("io.superposition#ResourceNotFound"): ResourceNotFound,
ShapeID("io.superposition#WebhookFailed"): WebhookFailed,
ShapeID("io.superposition#ResourceNotFound"): ResourceNotFound,
ShapeID("io.superposition#InternalServerError"): InternalServerError,
}),
effective_auth_schemes = [
ShapeID("smithy.api#httpBasicAuth"),
Expand Down Expand Up @@ -5362,8 +5362,8 @@ def _consumer(schema: Schema, de: ShapeDeserializer) -> None:
input_schema = _SCHEMA_WEIGHT_RECOMPUTE_INPUT,
output_schema = _SCHEMA_WEIGHT_RECOMPUTE_OUTPUT,
error_registry = TypeRegistry({
ShapeID("io.superposition#InternalServerError"): InternalServerError,
ShapeID("io.superposition#WebhookFailed"): WebhookFailed,
ShapeID("io.superposition#WebhookFailed"): WebhookFailed,
ShapeID("io.superposition#InternalServerError"): InternalServerError,
}),
effective_auth_schemes = [
ShapeID("smithy.api#httpBasicAuth"),
Expand Down
21 changes: 13 additions & 8 deletions crates/superposition_sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,32 @@ rust-version = "1.82.0"
readme = "README.md"

[package.metadata.smithy]
codegen-version = "18e06e0a61e4ce792a2b17271d25a1f524d90ed4"
codegen-version = "62028c3457eb372f2dd13f28c760d441b155ffcb"
protocol = "aws.protocols#restJson1"
[dependencies.aws-smithy-async]
version = "1.2.5"
version = "1.2.14"
[dependencies.aws-smithy-http]
version = "0.62.1"
version = "0.63.6"
[dependencies.aws-smithy-json]
version = "0.61.3"
version = "0.62.7"
[dependencies.aws-smithy-runtime]
version = "1.8.2"
version = "1.11.3"
features = ["client", "http-auth"]
[dependencies.aws-smithy-runtime-api]
version = "1.7.4"
features = ["client", "http-02x", "http-auth"]
version = "1.12.3"
features = ["client", "http-1x", "http-auth"]
[dependencies.aws-smithy-types]
version = "1.3.0"
version = "1.5.0"
features = ["http-body-1-x"]
[dependencies.bytes]
version = "1.4.0"
[dependencies.fastrand]
version = "2.0.0"
[dependencies.http]
version = "0.2.9"
[dependencies.http-1x]
version = "1"
package = "http"
[dependencies.tracing]
version = "0.1"
[features]
Expand Down
41 changes: 0 additions & 41 deletions crates/superposition_sdk/src/auth_plugin.rs

This file was deleted.

Loading
Loading