Skip to content

Commit

Permalink
Fix instances where inline schemas were overwriting each other
Browse files Browse the repository at this point in the history
* DataKiosk pagination
* Messaging links and embeds
* Solicitation links and embeds
  • Loading branch information
jlevers committed Jun 14, 2024
1 parent cf13948 commit 496e7ed
Show file tree
Hide file tree
Showing 14 changed files with 191 additions and 19 deletions.
24 changes: 24 additions & 0 deletions src/Seller/DataKioskV20231115/Dto/Pagination2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

/**
* This file is auto-generated by Saloon SDK Generator
* Generator: Crescat\SaloonSdkGenerator\Generators\DtoGenerator
* Do not modify it directly.
*/

declare(strict_types=1);

namespace SellingPartnerApi\Seller\DataKioskV20231115\Dto;

use SellingPartnerApi\Dto;

final class Pagination2 extends Dto
{
/**
* @param ?string $nextToken A token that can be used to fetch the next page of results.
*/
public function __construct(
public readonly ?string $nextToken = null,
) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
namespace SellingPartnerApi\Seller\DataKioskV20231115\Responses;

use SellingPartnerApi\Response;
use SellingPartnerApi\Seller\DataKioskV20231115\Dto\Pagination;
use SellingPartnerApi\Seller\DataKioskV20231115\Dto\Pagination2;

final class GetQueriesResponse extends Response
{
protected static array $complexArrayTypes = ['queries' => [Query::class]];

/**
* @param Query[] $queries A list of queries.
* @param ?Pagination $pagination When a query produces results that are not included in the data document, pagination occurs. This means the results are divided into pages. To retrieve the next page, you must pass a `CreateQuerySpecification` object with `paginationToken` set to this object's `nextToken` and with `query` set to this object's `query` in the subsequent `createQuery` request. When there are no more pages to fetch, the `nextToken` field will be absent.
* @param ?Pagination2 $pagination When a request has results that are not included in this response, pagination occurs. This means the results are divided into pages. To retrieve the next page, you must pass the `nextToken` as the `paginationToken` query parameter in the subsequent `getQueries` request. All other parameters must be provided with the same values that were provided with the request that generated this token, with the exception of `pageSize` which can be modified between calls to `getQueries`. When there are no more pages to fetch, the `nextToken` field will be absent.
*/
public function __construct(
public readonly array $queries,
public readonly ?Pagination $pagination = null,
public readonly ?Pagination2 $pagination = null,
) {
}
}
4 changes: 2 additions & 2 deletions src/Seller/MessagingV1/Dto/Embedded.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

final class Embedded extends Dto
{
protected static array $complexArrayTypes = ['actions' => [LinkObject::class]];
protected static array $complexArrayTypes = ['actions' => [GetMessagingActionResponse::class]];

/**
* @param LinkObject[] $actions Eligible actions for the specified amazonOrderId.
* @param GetMessagingActionResponse[] $actions
*/
public function __construct(
public readonly array $actions,
Expand Down
24 changes: 24 additions & 0 deletions src/Seller/MessagingV1/Dto/Embedded2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

/**
* This file is auto-generated by Saloon SDK Generator
* Generator: Crescat\SaloonSdkGenerator\Generators\DtoGenerator
* Do not modify it directly.
*/

declare(strict_types=1);

namespace SellingPartnerApi\Seller\MessagingV1\Dto;

use SellingPartnerApi\Dto;

final class Embedded2 extends Dto
{
/**
* @param ?GetSchemaResponse $schema
*/
public function __construct(
public readonly ?GetSchemaResponse $schema = null,
) {
}
}
8 changes: 4 additions & 4 deletions src/Seller/MessagingV1/Dto/GetMessagingActionResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ final class GetMessagingActionResponse extends Dto
protected static array $complexArrayTypes = ['errors' => [Error::class]];

/**
* @param ?Links $links
* @param ?Embedded $embedded
* @param ?Links2 $links
* @param ?Embedded2 $embedded
* @param ?MessagingAction $payload A simple object containing the name of the template.
* @param Error[]|null $errors A list of error responses returned when a request is unsuccessful.
*/
public function __construct(
public readonly ?Links $links = null,
public readonly ?Embedded $embedded = null,
public readonly ?Links2 $links = null,
public readonly ?Embedded2 $embedded = null,
public readonly ?MessagingAction $payload = null,
public readonly ?array $errors = null,
) {
Expand Down
4 changes: 2 additions & 2 deletions src/Seller/MessagingV1/Dto/GetSchemaResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class GetSchemaResponse extends Dto
protected static array $complexArrayTypes = ['errors' => [Error::class]];

/**
* @param ?Links $links
* @param ?Links3 $links
* @param ?array[] $payload A JSON schema document describing the expected payload of the action. This object can be validated against <a href=http://json-schema.org/draft-04/schema>http://json-schema.org/draft-04/schema</a>.
* @param Error[]|null $errors A list of error responses returned when a request is unsuccessful.
*/
public function __construct(
public readonly ?Links $links = null,
public readonly ?Links3 $links = null,
public readonly ?array $payload = null,
public readonly ?array $errors = null,
) {
Expand Down
26 changes: 26 additions & 0 deletions src/Seller/MessagingV1/Dto/Links2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

/**
* This file is auto-generated by Saloon SDK Generator
* Generator: Crescat\SaloonSdkGenerator\Generators\DtoGenerator
* Do not modify it directly.
*/

declare(strict_types=1);

namespace SellingPartnerApi\Seller\MessagingV1\Dto;

use SellingPartnerApi\Dto;

final class Links2 extends Dto
{
/**
* @param LinkObject $self A Link object.
* @param LinkObject $schema A Link object.
*/
public function __construct(
public readonly LinkObject $self,
public readonly LinkObject $schema,
) {
}
}
24 changes: 24 additions & 0 deletions src/Seller/MessagingV1/Dto/Links3.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

/**
* This file is auto-generated by Saloon SDK Generator
* Generator: Crescat\SaloonSdkGenerator\Generators\DtoGenerator
* Do not modify it directly.
*/

declare(strict_types=1);

namespace SellingPartnerApi\Seller\MessagingV1\Dto;

use SellingPartnerApi\Dto;

final class Links3 extends Dto
{
/**
* @param LinkObject $self A Link object.
*/
public function __construct(
public readonly LinkObject $self,
) {
}
}
4 changes: 2 additions & 2 deletions src/Seller/SolicitationsV1/Dto/Embedded.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

final class Embedded extends Dto
{
protected static array $complexArrayTypes = ['actions' => [LinkObject::class]];
protected static array $complexArrayTypes = ['actions' => [GetSolicitationActionResponse::class]];

/**
* @param LinkObject[] $actions Eligible actions for the specified amazonOrderId.
* @param GetSolicitationActionResponse[] $actions
*/
public function __construct(
public readonly array $actions,
Expand Down
24 changes: 24 additions & 0 deletions src/Seller/SolicitationsV1/Dto/Embedded2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

/**
* This file is auto-generated by Saloon SDK Generator
* Generator: Crescat\SaloonSdkGenerator\Generators\DtoGenerator
* Do not modify it directly.
*/

declare(strict_types=1);

namespace SellingPartnerApi\Seller\SolicitationsV1\Dto;

use SellingPartnerApi\Dto;

final class Embedded2 extends Dto
{
/**
* @param ?GetSchemaResponse $schema
*/
public function __construct(
public readonly ?GetSchemaResponse $schema = null,
) {
}
}
4 changes: 2 additions & 2 deletions src/Seller/SolicitationsV1/Dto/GetSchemaResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class GetSchemaResponse extends Dto
protected static array $complexArrayTypes = ['errors' => [Error::class]];

/**
* @param ?Links $links
* @param ?Links3 $links
* @param ?array[] $payload A JSON schema document describing the expected payload of the action. This object can be validated against <a href=http://json-schema.org/draft-04/schema>http://json-schema.org/draft-04/schema</a>.
* @param Error[]|null $errors A list of error responses returned when a request is unsuccessful.
*/
public function __construct(
public readonly ?Links $links = null,
public readonly ?Links3 $links = null,
public readonly ?array $payload = null,
public readonly ?array $errors = null,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ final class GetSolicitationActionResponse extends Dto
protected static array $complexArrayTypes = ['errors' => [Error::class]];

/**
* @param ?Links $links
* @param ?Embedded $embedded
* @param ?Links2 $links
* @param ?Embedded2 $embedded
* @param ?SolicitationsAction $payload A simple object containing the name of the template.
* @param Error[]|null $errors A list of error responses returned when a request is unsuccessful.
*/
public function __construct(
public readonly ?Links $links = null,
public readonly ?Embedded $embedded = null,
public readonly ?Links2 $links = null,
public readonly ?Embedded2 $embedded = null,
public readonly ?SolicitationsAction $payload = null,
public readonly ?array $errors = null,
) {
Expand Down
26 changes: 26 additions & 0 deletions src/Seller/SolicitationsV1/Dto/Links2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

/**
* This file is auto-generated by Saloon SDK Generator
* Generator: Crescat\SaloonSdkGenerator\Generators\DtoGenerator
* Do not modify it directly.
*/

declare(strict_types=1);

namespace SellingPartnerApi\Seller\SolicitationsV1\Dto;

use SellingPartnerApi\Dto;

final class Links2 extends Dto
{
/**
* @param LinkObject $self A Link object.
* @param LinkObject $schema A Link object.
*/
public function __construct(
public readonly LinkObject $self,
public readonly LinkObject $schema,
) {
}
}
24 changes: 24 additions & 0 deletions src/Seller/SolicitationsV1/Dto/Links3.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

/**
* This file is auto-generated by Saloon SDK Generator
* Generator: Crescat\SaloonSdkGenerator\Generators\DtoGenerator
* Do not modify it directly.
*/

declare(strict_types=1);

namespace SellingPartnerApi\Seller\SolicitationsV1\Dto;

use SellingPartnerApi\Dto;

final class Links3 extends Dto
{
/**
* @param LinkObject $self A Link object.
*/
public function __construct(
public readonly LinkObject $self,
) {
}
}

0 comments on commit 496e7ed

Please sign in to comment.