Download the PHP package tillio-crm/oauth-resources without Composer

On this page you can find all versions of the php package tillio-crm/oauth-resources. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package oauth-resources

tillio-crm/oauth-resources

Oficjalne SDK PHP do zasobów aplikacji Tillio: prywatny magazyn dokumentów i plików per (aplikacja × workspace), udostępniany przez storage proxy serwera Tillio.

Twoja aplikacja nigdy nie dotyka Firestore/GCS bezpośrednio — wszystko przechodzi przez API Tillio z tokenem OAuth. Przestrzeń danych jest wyznaczana po stronie serwera z tokenu, więc aplikacja widzi wyłącznie własne dane w obrębie workspace'u, który ją zainstalował.

Latest Version Total Downloads PHP Version

Uzupełnia tillio-crm/oauth-client (logowanie OAuth 2.0 + PKCE) — razem stanowią komplet do budowy aplikacji Tillio.


Spis treści


Wymagania

Instalacja

Szybki start

Najwygodniej w parze z tillio-crm/oauth-client — callable z tokenem załatwia auto-refresh:

Token można też podać wprost: new ResourcesClient(['accessToken' => $jwt]).

Dokumenty

Dokument to tablica JSON-owalna (max 256 KB). Nazwy kolekcji i ID: [a-zA-Z0-9_-], max 64 znaki.

Operatory filtra: ==, !=, >, >=, <, <=, in, array-contains. Wartości filtra zachowują typ (string "5" ≠ liczba 5).

Pliki

Pliki trafiają bezpośrednio do Google Cloud Storage przez krótkoterminowe signed URLs (15 min) — nie przechodzą przez serwer Tillio. SDK ukrywa cały flow:

Ścieżki są względne w obrębie przestrzeni aplikacji; segmenty [a-zA-Z0-9._-], bez .. i bez segmentów zaczynających się kropką. Limit uploadu: 100 MB (egzekwowany kryptograficznie w podpisie URL).

API

Klasa ResourcesClient

Metoda / opcja Opis
new ResourcesClient(array $config) accessToken (string | callable, wymagane), server (default https://auth.tillio.app), timeout (default 30.0), handler (Guzzle HandlerStack, do testów)
storage(): Storage dokumentowy magazyn danych
files(): Files magazyn plików

Klasa Storage

Metoda Opis
put(string $collection, string $docId, array $data): array upsert; zwraca {id, data, created_at, updated_at}
get(string $collection, string $docId): array odczyt; NotFoundException gdy brak
find(string $collection, string $docId): ?array jak get(), ale null zamiast wyjątku
delete(string $collection, string $docId): void usunięcie dokumentu
list(string $collection, array $options = []): array limit (≤500), after (cursor), filter ([pole, operator, wartość]); zwraca {documents, next_cursor}
all(string $collection, array $options = []): Generator iterator po całej kolekcji (auto-paginacja)

Klasa Files

Metoda Opis
upload(string $path, mixed $contents, string $contentType): void string albo stream
download(string $path): string NotFoundException gdy brak
uploadUrl(string $path, string $contentType, ?int $maxBytes): array {url, method, headers, expires_in} — nagłówki są wymagane przy PUT
downloadUrl(string $path): array {url, method, expires_in}
list(string $prefix = ''): array [{path, size, content_type, updated_at}]
delete(string $path): void NotFoundException gdy brak

Wyjątki

Wszystkie dziedziczą po ResourcesException (\RuntimeException); kod wyjątku = status HTTP.

Wyjątek Kiedy
AuthenticationException 401/403 — zły/pusty token, brak scope app_storage, apka niezainstalowana w workspace
NotFoundException 404 — dokument/plik nie istnieje
ValidationException pozostałe 4xx — zły input (nazwa kolekcji, limit 256 KB itd.)
ServerException 5xx — błąd serwera/magazynu

Bezpieczeństwo

Testy

Testy nie wymagają sieci (Guzzle MockHandler przez opcję handler).

Wersjonowanie

SemVer. Do wersji 1.0.0 drobne zmiany łamiące mogą pojawić się w wydaniach minor.

Zgłaszanie błędów / pull requesty

Issues i PR-y: github.com/tillio-crm/oauth-resources. Zgłoszenia bezpieczeństwa — nie przez publiczne issues; napisz na adres wsparcia Tillio.

Licencja

MIT — patrz LICENSE.


All versions of oauth-resources with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-curl Version *
ext-json Version *
guzzlehttp/guzzle Version ^7.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tillio-crm/oauth-resources contains the following files

Loading the files please wait ...