Skip to content

Commit

Permalink
Update SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
octoper committed Jul 10, 2024
1 parent 14b9a2f commit 35e1c91
Show file tree
Hide file tree
Showing 66 changed files with 251 additions and 86 deletions.
10 changes: 5 additions & 5 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ id: 8c24a12b-d2f1-466a-bdaa-6d83a049a679
management:
docChecksum: 16d57a566fd293ae00cc4172463280a5
docVersion: v1
speakeasyVersion: 1.304.0
generationVersion: 2.340.3
releaseVersion: 0.0.2
configChecksum: 34256face4ed02fa3d1ffcabc892a57d
speakeasyVersion: 1.330.0
generationVersion: 2.361.10
releaseVersion: 0.0.3
configChecksum: c1795060efbe64cc88a9856715854761
features:
php:
core: 3.3.5
core: 3.3.6
deprecations: 2.81.1
flattening: 2.81.1
globalSecurity: 2.81.6
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
php:
version: 0.0.2
version: 0.0.3
flattenGlobalSecurity: true
imports:
option: openapi
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
speakeasyVersion: 1.304.0
speakeasyVersion: 1.330.0
sources:
clerk-backend-php:
sourceNamespace: clerk-backend-php
Expand Down
59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,65 @@ You can override the default server globally by passing a server index to the `s
The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
<!-- End Server Selection [server] -->

<!-- Start SDK Installation [installation] -->
## SDK Installation

### Composer

To install the SDK first add the below to your `composer.json` file:

```json
{
"repositories": [
{
"type": "github",
"url": "<UNSET>.git"
}
],
"require": {
"clerk/backend-php": "*"
}
}
```

Then run the following command:

```bash
composer update
```
<!-- End SDK Installation [installation] -->

<!-- Start SDK Example Usage [usage] -->
## SDK Example Usage

### Example

```php
<?php

declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;
use Clerk\Backend\Models\Components;
use Clerk\Backend\Models\Operations;

$sdk = Backend\ClerkBackend::builder()->build();

try {
$response = $sdk->miscellaneous->getPublicInterstitial('<value>', '<value>');

if ($response->statusCode === 200) {
// handle response
}
} catch (Throwable $e) {
// handle exception
}

```
<!-- End SDK Example Usage [usage] -->

<!-- Placeholder for Future Speakeasy SDK Sections -->

# Development
Expand Down
3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
],
"stan": [
"./vendor/bin/phpstan analyse --memory-limit=2g"
],
"format": [
"./vendor/bin/pint"
]
},
"script-descriptions": {
Expand Down
3 changes: 2 additions & 1 deletion pint.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"no_extra_blank_lines": false,
"no_blank_lines_after_class_opening": false,
"single_line_after_imports": false,
"no_trailing_whitespace_in_comment": false
"no_trailing_whitespace_in_comment": false,
"single_line_empty_body": false
}
}
28 changes: 14 additions & 14 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
use Rector\Set\ValueObject\SetList;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__.'/src',
]);
$rectorConfig->paths([
__DIR__ . '/src',
]);

$rectorConfig->rules([
InlineConstructorDefaultToPropertyRector::class,
]);
$rectorConfig->rules([
InlineConstructorDefaultToPropertyRector::class,
]);

$rectorConfig->sets([
LevelSetList::UP_TO_PHP_82,
SetList::CODE_QUALITY,
SetList::DEAD_CODE,
SetList::EARLY_RETURN,
SetList::TYPE_DECLARATION,
SetList::PRIVATIZATION,
]);
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_82,
SetList::CODE_QUALITY,
SetList::DEAD_CODE,
SetList::EARLY_RETURN,
SetList::TYPE_DECLARATION,
SetList::PRIVATIZATION,
]);
};
3 changes: 2 additions & 1 deletion src/ClerkBackendBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class ClerkBackendBuilder
{
public function __construct(
private SDKConfiguration $sdkConfig = new SDKConfiguration(),
) {}
) {
}

/**
* setClient allows setting a custom Guzzle client for the SDK to make requests with.
Expand Down
4 changes: 3 additions & 1 deletion src/Models/Components/Actor.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class Actor
{
public function __construct() {}
public function __construct()
{
}
}
4 changes: 3 additions & 1 deletion src/Models/Components/ActorTokenActor.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class ActorTokenActor
{
public function __construct() {}
public function __construct()
{
}
}
4 changes: 3 additions & 1 deletion src/Models/Components/Claims.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class Claims
{
public function __construct() {}
public function __construct()
{
}
}
4 changes: 3 additions & 1 deletion src/Models/Components/ClerkErrorsMeta.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class ClerkErrorsMeta
{
public function __construct() {}
public function __construct()
{
}
}
4 changes: 3 additions & 1 deletion src/Models/Components/ExternalAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class ExternalAccount
{
public function __construct() {}
public function __construct()
{
}
}
4 changes: 3 additions & 1 deletion src/Models/Components/ExternalAccounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class ExternalAccounts
{
public function __construct() {}
public function __construct()
{
}
}
4 changes: 3 additions & 1 deletion src/Models/Components/InvitationPublicMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class InvitationPublicMetadata
{
public function __construct() {}
public function __construct()
{
}
}
4 changes: 3 additions & 1 deletion src/Models/Components/InvitationRevokedPublicMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class InvitationRevokedPublicMetadata
{
public function __construct() {}
public function __construct()
{
}
}
4 changes: 3 additions & 1 deletion src/Models/Components/Meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class Meta
{
public function __construct() {}
public function __construct()
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class OrganizationInvitationPrivateMetadata
{
public function __construct() {}
public function __construct()
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class OrganizationInvitationPublicMetadata
{
public function __construct() {}
public function __construct()
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class OrganizationMembershipOrganizationPrivateMetadata
{
public function __construct() {}
public function __construct()
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class OrganizationMembershipOrganizationPublicMetadata
{
public function __construct() {}
public function __construct()
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@
/** OrganizationMembershipPrivateMetadata - Metadata saved on the organization membership, accessible only from the Backend API */
class OrganizationMembershipPrivateMetadata
{
public function __construct() {}
public function __construct()
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@
/** OrganizationMembershipPublicMetadata - Metadata saved on the organization membership, accessible from both Frontend and Backend APIs */
class OrganizationMembershipPublicMetadata
{
public function __construct() {}
public function __construct()
{
}
}
4 changes: 3 additions & 1 deletion src/Models/Components/OrganizationPrivateMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class OrganizationPrivateMetadata
{
public function __construct() {}
public function __construct()
{
}
}
4 changes: 3 additions & 1 deletion src/Models/Components/OrganizationPublicMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class OrganizationPublicMetadata
{
public function __construct() {}
public function __construct()
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class OrganizationWithLogoPrivateMetadata
{
public function __construct() {}
public function __construct()
{
}
}
4 changes: 3 additions & 1 deletion src/Models/Components/OrganizationWithLogoPublicMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class OrganizationWithLogoPublicMetadata
{
public function __construct() {}
public function __construct()
{
}
}
4 changes: 3 additions & 1 deletion src/Models/Components/PrivateMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class PrivateMetadata
{
public function __construct() {}
public function __construct()
{
}
}
4 changes: 3 additions & 1 deletion src/Models/Components/PublicMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class PublicMetadata
{
public function __construct() {}
public function __construct()
{
}
}
4 changes: 3 additions & 1 deletion src/Models/Components/SAMLAccountPublicMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class SAMLAccountPublicMetadata
{
public function __construct() {}
public function __construct()
{
}
}
4 changes: 3 additions & 1 deletion src/Models/Components/SignUpPublicMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@

class SignUpPublicMetadata
{
public function __construct() {}
public function __construct()
{
}
}
Loading

0 comments on commit 35e1c91

Please sign in to comment.