@alter-ai/ramp 0.0.0-stage → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Alter AI, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,46 @@
1
- # Temporary Holding Version
1
+ # @alter-ai/ramp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Install `npm install @alter-ai/sdk @alter-ai/ramp`.
4
+
5
+ Construct `RampIntegration(app, { grantId })` with an Alter `App` client.
6
+ All 271 operations use immutable contract `2026-10-27`.
7
+ OAuth and managed-secret/API-key grants use the same binding and controls when
8
+ the provider supports that credential type.
9
+ Requests are authorized, validated, and routed by the backend. Await `call.wait()`
10
+ to handle immediate results and approvals, then decode with `result.bodyJson()`.
11
+ This distribution contains only this provider's native types and response schemas.
12
+
13
+ [Public API reference](https://docs.alterauth.com/reference/managed-ramp-operations) includes every operation's input/output fields and both SDK examples.
14
+
15
+
16
+ ## Resume after a process restart
17
+
18
+ Persist the pending call's `approvalId` (TypeScript) or `approval_id` (Python)
19
+ in your durable job record. After restarting, construct a fresh provider client:
20
+
21
+ ```typescript
22
+ const resumed = await provider.resume(savedApprovalId);
23
+ const result = await resumed.wait();
24
+ const body = result.bodyJson();
25
+ ```
26
+
27
+ ```python
28
+ resumed = await provider.resume(saved_approval_id)
29
+ result = await resumed.wait()
30
+ body = result.body_json()
31
+ ```
32
+
33
+ The backend supplies the stored provider, operation and immutable contract version.
34
+ The provider package verifies provider/version and applies that operation's validator
35
+ and fault handling. Mismatches raise `ManagedOperationError` with
36
+ `managed_approval_contract_mismatch` or `managed_approval_operation_mismatch`.
37
+ The ID yields a union of operation outputs; TypeScript callers can narrow the call
38
+ by `resumed.operation`. No operation or version is accepted from the caller.
39
+
40
+ Generic `app.integrations.resume(id)` preserves raw response access and exact-number
41
+ decoding; use the provider package for its response validator. Both use the existing
42
+ approval poll's `proxy:execute` or `approvals:read` permissions and app/agent isolation.
43
+ Resume also works after execution while the result is retained. Denial, expiry,
44
+ execution failure and result purging retain the existing approval errors. Resume
45
+ never resubmits the request. Raw approvals or missing stored identities fail with
46
+ `managed_approval_identity_unavailable`.