diff --git a/api.md b/api.md
index 6bf04bb1..832c1af8 100644
--- a/api.md
+++ b/api.md
@@ -433,11 +433,11 @@ Types:
Methods:
- client.proxies.create({ ...params }) -> ProxyCreateResponse
-- client.proxies.retrieve(id) -> ProxyRetrieveResponse
-- client.proxies.update(id, { ...params }) -> ProxyUpdateResponse
+- client.proxies.retrieve(idOrName) -> ProxyRetrieveResponse
+- client.proxies.update(idOrName, { ...params }) -> ProxyUpdateResponse
- client.proxies.list({ ...params }) -> ProxyListResponsesOffsetPagination
-- client.proxies.delete(id) -> void
-- client.proxies.check(id, { ...params }) -> ProxyCheckResponse
+- client.proxies.delete(idOrName) -> void
+- client.proxies.check(idOrName, { ...params }) -> ProxyCheckResponse
# Extensions
diff --git a/src/resources/proxies.ts b/src/resources/proxies.ts
index 1f00130d..0c7809aa 100644
--- a/src/resources/proxies.ts
+++ b/src/resources/proxies.ts
@@ -24,32 +24,37 @@ export class Proxies extends APIResource {
}
/**
- * Retrieve a proxy in the resolved project by ID.
+ * Retrieve a proxy in the resolved project by ID or exact name using the database
+ * collation. IDs take precedence when a value matches both an ID and a name. Proxy
+ * names are not unique; an ambiguous name returns a 400 response with code
+ * ambiguous_proxy_name.
*
* @example
* ```ts
- * const proxy = await client.proxies.retrieve('id');
+ * const proxy = await client.proxies.retrieve('id_or_name');
* ```
*/
- retrieve(id: string, options?: RequestOptions): APIPromise {
- return this._client.get(path`/proxies/${id}`, options);
+ retrieve(idOrName: string, options?: RequestOptions): APIPromise {
+ return this._client.get(path`/proxies/${idOrName}`, options);
}
/**
- * Update a proxy's name. Proxy names are not unique and are not ID-or-name
- * addressable on this endpoint; duplicate names are allowed. Name-based
- * session-create lookups can remain ambiguous until callers resolve proxies by ID
- * or the API adds a stronger uniqueness contract.
+ * Update a proxy's name. Proxy names are not unique and duplicate names are
+ * allowed.
*
* @example
* ```ts
- * const proxy = await client.proxies.update('id', {
+ * const proxy = await client.proxies.update('id_or_name', {
* name: 'my-renamed-proxy',
* });
* ```
*/
- update(id: string, body: ProxyUpdateParams, options?: RequestOptions): APIPromise {
- return this._client.patch(path`/proxies/${id}`, { body, ...options });
+ update(
+ idOrName: string,
+ body: ProxyUpdateParams,
+ options?: RequestOptions,
+ ): APIPromise {
+ return this._client.patch(path`/proxies/${idOrName}`, { body, ...options });
}
/**
@@ -78,11 +83,11 @@ export class Proxies extends APIResource {
*
* @example
* ```ts
- * await client.proxies.delete('id');
+ * await client.proxies.delete('id_or_name');
* ```
*/
- delete(id: string, options?: RequestOptions): APIPromise {
- return this._client.delete(path`/proxies/${id}`, {
+ delete(idOrName: string, options?: RequestOptions): APIPromise {
+ return this._client.delete(path`/proxies/${idOrName}`, {
...options,
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
});
@@ -98,15 +103,15 @@ export class Proxies extends APIResource {
*
* @example
* ```ts
- * const response = await client.proxies.check('id');
+ * const response = await client.proxies.check('id_or_name');
* ```
*/
check(
- id: string,
+ idOrName: string,
body: ProxyCheckParams | null | undefined = {},
options?: RequestOptions,
): APIPromise {
- return this._client.post(path`/proxies/${id}/check`, { body, ...options });
+ return this._client.post(path`/proxies/${idOrName}/check`, { body, ...options });
}
}
diff --git a/src/resources/vaults/items.ts b/src/resources/vaults/items.ts
index 13627f2c..5377f503 100644
--- a/src/resources/vaults/items.ts
+++ b/src/resources/vaults/items.ts
@@ -368,9 +368,7 @@ export namespace CardVaultItemSpec {
*/
export interface LinkCardVaultItemSpec {
/**
- * Integer amount in minor currency units. Link Pay Token execution permits at most
- * 500000; virtual-card execution permits at most 50000. Authorization rejects a
- * larger amount when the checkout requires a virtual card.
+ * Integer amount in minor currency units, at most 50000.
*/
amount: number;
diff --git a/tests/api-resources/proxies.test.ts b/tests/api-resources/proxies.test.ts
index 9e59c91f..8fb2ba08 100644
--- a/tests/api-resources/proxies.test.ts
+++ b/tests/api-resources/proxies.test.ts
@@ -33,7 +33,7 @@ describe('resource proxies', () => {
// Mock server tests are disabled
test.skip('retrieve', async () => {
- const responsePromise = client.proxies.retrieve('id');
+ const responsePromise = client.proxies.retrieve('id_or_name');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -45,7 +45,7 @@ describe('resource proxies', () => {
// Mock server tests are disabled
test.skip('update: only required params', async () => {
- const responsePromise = client.proxies.update('id', { name: 'my-renamed-proxy' });
+ const responsePromise = client.proxies.update('id_or_name', { name: 'my-renamed-proxy' });
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -57,7 +57,7 @@ describe('resource proxies', () => {
// Mock server tests are disabled
test.skip('update: required and optional params', async () => {
- const response = await client.proxies.update('id', { name: 'my-renamed-proxy' });
+ const response = await client.proxies.update('id_or_name', { name: 'my-renamed-proxy' });
});
// Mock server tests are disabled
@@ -90,7 +90,7 @@ describe('resource proxies', () => {
// Mock server tests are disabled
test.skip('delete', async () => {
- const responsePromise = client.proxies.delete('id');
+ const responsePromise = client.proxies.delete('id_or_name');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -102,7 +102,7 @@ describe('resource proxies', () => {
// Mock server tests are disabled
test.skip('check', async () => {
- const responsePromise = client.proxies.check('id');
+ const responsePromise = client.proxies.check('id_or_name');
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
@@ -116,7 +116,11 @@ describe('resource proxies', () => {
test.skip('check: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
- client.proxies.check('id', { url: 'https://example.com' }, { path: '/_stainless_unknown_path' }),
+ client.proxies.check(
+ 'id_or_name',
+ { url: 'https://example.com' },
+ { path: '/_stainless_unknown_path' },
+ ),
).rejects.toThrow(Kernel.NotFoundError);
});
});