Metadata-Version: 2.5
Name: render-lab-tasks-salesforce
Version: 0.1.0
Summary: salesforce tasks for Render Workflows
Project-URL: Repository, https://github.com/render-lab/render-tasks-python
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.12
Requires-Dist: httpx<0.29,>=0.28
Requires-Dist: render-lab-tasks-core<0.2,>=0.1.1
Requires-Dist: render==1.0.1
Description-Content-Type: text/markdown

# render-lab-tasks-salesforce

Python port of all 12 registered tasks in the pinned TypeScript pack at
`45f9c2d44bd28e01ae9813e0d2ff56ee6c533816`. Python 3.12+.

Install this distribution and its dependencies:

```sh
pip install render-lab-tasks-salesforce==0.1.0
```

Import definitions from `render_lab_tasks_salesforce.tasks`; combine `app` objects
with `Workflows.from_workflows(...)`. JSON fields retain TS spelling; functions
use snake_case. Package root imports are inert.

## Tasks

| Registered name | Python export (also exposes `_impl`) |
| --- | --- |
| `salesforce.awaitBulkJob` | `await_bulk_job` |
| `salesforce.cancelBulkJob` | `cancel_bulk_job` |
| `salesforce.createRecord` | `create_record` |
| `salesforce.deleteRecord` | `delete_record` |
| `salesforce.getBulkJob` | `get_bulk_job` |
| `salesforce.getBulkResults` | `get_bulk_results` |
| `salesforce.getRecord` | `get_record` |
| `salesforce.queryRecords` | `query_records` |
| `salesforce.submitBulkIngest` | `submit_bulk_ingest` |
| `salesforce.submitBulkQuery` | `submit_bulk_query` |
| `salesforce.updateRecord` | `update_record` |
| `salesforce.upsertRecord` | `upsert_record` |

## Dependencies and retries

Raw implementations accept context first and keyword-only `deps`. The `.client`
module exports typed `Port`, `Deps`, and `Client` classes. Inject a fake port, or
pass a caller-owned `httpx.AsyncClient` to `Client`. Default dependencies close
their client after one operation. Credentials resolve at first use. Transport
retries are disabled; `retry.py` owns durable policies. DTO types are in `.types`.
Requires core >=0.1.1.

## Environment

| Variable | Contract |
| --- | --- |
| `SALESFORCE_INSTANCE_URL` | Required Salesforce instance URL. |
| `SALESFORCE_ACCESS_TOKEN` | Required access token. No automatic refresh. |

## Verification and limitations

REST and Bulk API 2.0 paths are pinned to v67.0. Access-token refresh is external.
Record creates and bulk submissions disable retries. Ingest failures report the
already-created job ID for inspection/abort before resubmission. CSV input is
capped at 4,000,000 bytes; result pages default to 10,000 records/3,500,000 bytes.
Python validates result-byte limits and sends application/json on JSON writes.
awaitBulkJob checks once per attempt; Failed/Aborted raise under the inherited
240-retry policy. It does not cancel the job when workflow retries exhaust.

Shared fixtures execute the actual pinned TS implementations and compare Python
outputs and requests. Sanity's SDK calls are translated into separately asserted
REST requests. These are hermetic checks, not real account or hosted verification.
See [the testing backlog](https://github.com/render-lab/render-tasks-python/issues/1)
and the root verification tracker. Licensed under MIT.
