# Google.Apis.Core

**Kind:** Service

**Source:** `Pams/Logic/Pams.Storage/Pams.Storage.csproj` (line 1)

**Part of:** [Pams](subsystem-pams)

NuGet package dependency

Google.Apis.Core is a NuGet package dependency declared in `Pams.Storage.csproj`. The `Pams.Storage` project references its Google API client types and request infrastructure when storage code calls Google services.

## Diagram

```mermaid
sequenceDiagram
    participant Client as TypeScript client
    participant Storage as Pams.Storage
    participant Core as Google.Apis.Core
    participant Google as Google API

    Client->>Storage: Call storage endpoint
    Storage->>Core: Create and execute API request
    Core->>Google: Send authenticated HTTP request
    Google-->>Core: Return API response
    Core-->>Storage: Return parsed result
    Storage-->>Client: Return endpoint response
```

## Usage

```ts
type UploadRequest = {
  fileName: string;
  content: string;
};

async function uploadFile(request: UploadRequest) {
  const response = await fetch("/api/storage/upload", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify(request),
  });

  if (!response.ok) {
    throw new Error(`Storage upload failed: ${response.statusText}`);
  }

  return response.json();
}

await uploadFile({
  fileName: "report.txt",
  content: "Storage content",
});
```

## AI Coding Instructions

- Keep `Google.Apis.Core` references in the `Pams.Storage` project file; TypeScript clients call storage endpoints rather than importing NuGet packages.
- Follow the existing Google API authentication and request patterns in `Pams.Storage` before adding new API calls.
- Handle Google API failures in the storage layer and return application-level errors to callers.
- Update package versions through `Pams.Storage.csproj` and verify compatibility with related Google API packages.

## Used by

1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Injected or called by (1)

- `Pams.Storage` — `Pams/Logic/Pams.Storage/Pams.Storage.csproj`:1
