Skip to content

Commit

Permalink
docs(functions): add short and long descriptions to triggers methods (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Oct 26, 2023
1 parent 7f57b6a commit e49ab98
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
31 changes: 31 additions & 0 deletions packages/clients/src/api/function/v1beta1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,12 @@ export class API extends ParentAPI {
unmarshalToken,
)

/**
* Create a trigger. Create a new trigger for a specified function.
*
* @param request - The request {@link CreateTriggerRequest}
* @returns A Promise of Trigger
*/
createTrigger = (request: Readonly<CreateTriggerRequest>) =>
this.client.fetch<Trigger>(
{
Expand All @@ -900,6 +906,12 @@ export class API extends ParentAPI {
unmarshalTrigger,
)

/**
* Get a trigger. Get a trigger with a specified ID.
*
* @param request - The request {@link GetTriggerRequest}
* @returns A Promise of Trigger
*/
getTrigger = (request: Readonly<GetTriggerRequest>) =>
this.client.fetch<Trigger>(
{
Expand Down Expand Up @@ -971,9 +983,22 @@ export class API extends ParentAPI {
unmarshalListTriggersResponse,
)

/**
* List all triggers. List all triggers belonging to a specified Organization
* or Project.
*
* @param request - The request {@link ListTriggersRequest}
* @returns A Promise of ListTriggersResponse
*/
listTriggers = (request: Readonly<ListTriggersRequest> = {}) =>
enrichForPagination('triggers', this.pageOfListTriggers, request)

/**
* Update a trigger. Update a trigger with a specified ID.
*
* @param request - The request {@link UpdateTriggerRequest}
* @returns A Promise of Trigger
*/
updateTrigger = (request: Readonly<UpdateTriggerRequest>) =>
this.client.fetch<Trigger>(
{
Expand All @@ -990,6 +1015,12 @@ export class API extends ParentAPI {
unmarshalTrigger,
)

/**
* Delete a trigger. Delete a trigger with a specified ID.
*
* @param request - The request {@link DeleteTriggerRequest}
* @returns A Promise of Trigger
*/
deleteTrigger = (request: Readonly<DeleteTriggerRequest>) =>
this.client.fetch<Trigger>(
{
Expand Down
4 changes: 2 additions & 2 deletions packages/clients/src/api/function/v1beta1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,10 @@ export interface TriggerMnqNatsClientConfig {

/** Trigger. mnq sqs client config. */
export interface TriggerMnqSqsClientConfig {
/** @deprecated */
mnqNamespaceId?: string
/** Name of the SQS queue the trigger listens to. */
queue: string
/** @deprecated */
mnqNamespaceId?: string
/** ID of the M&Q project. */
mnqProjectId: string
/** Region in which the M&Q project is activated. */
Expand Down

0 comments on commit e49ab98

Please sign in to comment.