Skip to content

Commit d6cb59a

Browse files
chore: sync repo
1 parent ef3eb02 commit d6cb59a

File tree

408 files changed

+34372
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

408 files changed

+34372
-0
lines changed

.gitattributes

Whitespace-only changes.

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# This file is used to automatically assign reviewers to PRs
2+
# For more information see: https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
3+
4+
* @anthropics/sdk

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI
2+
on:
3+
push:
4+
branches-ignore:
5+
- 'generated'
6+
- 'codegen/**'
7+
- 'integrated/**'
8+
- 'stl-preview-head/**'
9+
- 'stl-preview-base/**'
10+
pull_request:
11+
branches-ignore:
12+
- 'stl-preview-head/**'
13+
- 'stl-preview-base/**'
14+
15+
jobs:
16+
lint:
17+
timeout-minutes: 10
18+
name: lint
19+
runs-on: ${{ github.repository == 'stainless-sdks/anthropic-php' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
20+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Set up PHP
26+
uses: 'shivammathur/setup-php@v2'
27+
with:
28+
php-version: '8.3'
29+
30+
- name: Run Bootstrap
31+
run: ./scripts/bootstrap
32+
33+
- name: Run lints
34+
run: ./scripts/lint
35+
test:
36+
timeout-minutes: 10
37+
name: test
38+
runs-on: ${{ github.repository == 'stainless-sdks/anthropic-php' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
39+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Set up PHP
44+
uses: 'shivammathur/setup-php@v2'
45+
with:
46+
php-version: '8.3'
47+
48+
- name: Run bootstrap
49+
run: ./scripts/bootstrap
50+
51+
- name: Run tests
52+
run: ./scripts/test
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish Packagist
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
publish:
10+
name: publish
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Publish to Packagist
17+
run: |-
18+
curl --fail-with-body -X POST -H 'Content-Type: application/json' "https://packagist.org/api/update-package?username=${PACKAGIST_USERNAME}&apiToken=${PACKAGIST_SAFE_KEY}" -d '{"repository":"https://www.github.com/anthropics/anthropic-sdk-php"}'
19+
env:
20+
PACKAGIST_USERNAME: ${{ secrets.ANTHROPIC_PACKAGIST_USERNAME || secrets.PACKAGIST_USERNAME }}
21+
PACKAGIST_SAFE_KEY: ${{ secrets.ANTHROPIC_PACKAGIST_SAFE_KEY || secrets.PACKAGIST_SAFE_KEY }}

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
*.swo
2+
*.swp
3+
.idea/
4+
.php-cs-fixer.cache
5+
.php-cs-fixer.php
6+
.phpdoc/
7+
.phpunit.cache
8+
composer.lock
9+
phpunit.xml
10+
playground/
11+
vendor/

.php-cs-fixer.dist.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
use PhpCsFixer\Config;
4+
use PhpCsFixer\Finder;
5+
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
6+
7+
return (new Config())
8+
->setParallelConfig(ParallelConfigFactory::detect())
9+
->setFinder(Finder::create()->in([__DIR__.'/src', __DIR__.'/tests']))
10+
->setRules([
11+
'@PhpCsFixer' => true,
12+
'phpdoc_align' => false,
13+
'new_with_parentheses' => ['named_class' => false],
14+
'ordered_types' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
15+
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
16+
])
17+
;

.phpactor.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"indexer.exclude_patterns": ["vendor"],
3+
"language_server_completion.trim_leading_dollar": true,
4+
"language_server_php_cs_fixer.enabled": false,
5+
"language_server_phpstan.enabled": true
6+
}

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.0.1"
3+
}

.stats.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
configured_endpoints: 23
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthropic-0f40955413f5d04b30ecd6c2f5002ce36a85c320cc671911ff70902fed6e342c.yml
3+
openapi_spec_hash: 92a37231c475ddfec0093718cd24f7ab
4+
config_hash: 4500da2d28400e4a30603dc785ca948a

LICENSE

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Copyright 2023 Anthropic, PBC.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8+

0 commit comments

Comments
 (0)