@anthropic-ai/sdk
Version:
The official TypeScript library for the Anthropic API
66 lines • 2.36 kB
text/typescript
import { APIResource } from "../../../core/resource.mjs";
import * as BetaAPI from "../beta.mjs";
import { APIPromise } from "../../../core/api-promise.mjs";
import { RequestOptions } from "../../../internal/request-options.mjs";
export declare class ActionURLs extends APIResource {
/**
* Create Action URL
*
* @example
* ```ts
* const betaUserProfileActionURL =
* await client.beta.userProfiles.actionURLs.create(
* 'uprof_011CZkZCu8hGbp5mYRQgUmz9',
* { action: { type: 'enroll_end_user' } },
* );
* ```
*/
create(userProfileID: string, params: ActionURLCreateParams, options?: RequestOptions): APIPromise<BetaUserProfileActionURL>;
}
/**
* A URL to give to the person who takes the requested action.
*/
export interface BetaUserProfileActionURL {
/**
* When the URL stops working, in RFC 3339 format.
*/
expires_at: string;
/**
* Object type. Always `user_profile_action_url`.
*/
type: 'user_profile_action_url';
/**
* The URL to give to the person who takes the action. Anyone who holds it can open
* it until `expires_at`.
*/
url: string;
}
/**
* The end-user that the profile represents enrolls in a program.
*/
export interface BetaUserProfileEnrollEndUserAction {
type: 'enroll_end_user';
}
export interface ActionURLCreateParams {
/**
* Body param: The action that the person who opens the URL takes.
*/
action: BetaUserProfileEnrollEndUserAction;
/**
* Header param: Optional header to specify the beta version(s) you want to use.
*/
betas?: Array<BetaAPI.AnthropicBeta>;
/**
* Header param: Optional header to select the Workspace for this request. The
* value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
*
* Only needed for credentials that can act on more than one Workspace. A
* credential that belongs to a specific Workspace may omit it; if sent, it must
* match that Workspace.
*/
workspace_id?: string;
}
export declare namespace ActionURLs {
export { type BetaUserProfileActionURL as BetaUserProfileActionURL, type BetaUserProfileEnrollEndUserAction as BetaUserProfileEnrollEndUserAction, type ActionURLCreateParams as ActionURLCreateParams, };
}
//# sourceMappingURL=action-urls.d.mts.map