• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-client-gateway / 22575363049

02 Mar 2026 12:09PM UTC coverage: 56.52% (-32.9%) from 89.388%
22575363049

push

github

web-flow
build(deps): bump @nestjs/swagger from 11.2.0 to 11.2.6 (#2957)

Bumps [@nestjs/swagger](https://github.com/nestjs/swagger) from 11.2.0 to 11.2.6.
- [Release notes](https://github.com/nestjs/swagger/releases)
- [Commits](https://github.com/nestjs/swagger/compare/11.2.0...11.2.6)

---
updated-dependencies:
- dependency-name: "@nestjs/swagger"
  dependency-version: 11.2.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

1979 of 3720 branches covered (53.2%)

Branch coverage included in aggregate %.

8406 of 14654 relevant lines covered (57.36%)

132.06 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/modules/delegate/routes/delegates.controller.ts
1
import {
×
2
  Body,
3
  Controller,
4
  Delete,
5
  Get,
6
  HttpCode,
7
  Param,
8
  Post,
9
  Query,
10
} from '@nestjs/common';
11
import {
×
12
  ApiOkResponse,
13
  ApiOperation,
14
  ApiQuery,
15
  ApiTags,
16
  ApiParam,
17
  ApiBody,
18
  ApiBadRequestResponse,
19
  ApiNoContentResponse,
20
} from '@nestjs/swagger';
21
import { PaginationDataDecorator } from '@/routes/common/decorators/pagination.data.decorator';
×
22
import { RouteUrlDecorator } from '@/routes/common/decorators/route.url.decorator';
×
23
import { Page } from '@/routes/common/entities/page.entity';
24
import { PaginationData } from '@/routes/common/pagination/pagination.data';
×
25
import { DelegatesService } from '@/modules/delegate/routes/delegates.service';
×
26
import { CreateDelegateDto } from '@/modules/delegate/routes/entities/create-delegate.dto.entity';
×
27
import { Delegate } from '@/modules/delegate/routes/entities/delegate.entity';
28
import { DelegatePage } from '@/modules/delegate/routes/entities/delegate.page.entity';
×
29
import { DeleteDelegateDto } from '@/modules/delegate/routes/entities/delete-delegate.dto.entity';
×
30
import { DeleteSafeDelegateDto } from '@/modules/delegate/routes/entities/delete-safe-delegate.dto.entity';
×
31
import { GetDelegateDto } from '@/modules/delegate/routes/entities/get-delegate.dto.entity';
×
32
import { ValidationPipe } from '@/validation/pipes/validation.pipe';
×
33
import { GetDelegateDtoSchema } from '@/modules/delegate/routes/entities/schemas/get-delegate.dto.schema';
×
34
import { CreateDelegateDtoSchema } from '@/modules/delegate/routes/entities/schemas/create-delegate.dto.schema';
×
35
import { DeleteDelegateDtoSchema } from '@/modules/delegate/routes/entities/schemas/delete-delegate.dto.schema';
×
36
import { DeleteSafeDelegateDtoSchema } from '@/modules/delegate/routes/entities/schemas/delete-safe-delegate.dto.schema';
×
37
import { AddressSchema } from '@/validation/entities/schemas/address.schema';
×
38
import type { Address } from 'viem';
39

40
@ApiTags('delegates')
41
@Controller({
42
  version: '1',
43
})
44
export class DelegatesController {
×
45
  constructor(private readonly service: DelegatesService) {}
×
46

47
  @ApiOperation({
48
    deprecated: true,
49
    summary: 'Get delegates (deprecated)',
50
    description:
51
      'Retrieves a paginated list of delegates for a specific chain. This endpoint is deprecated, please use the v2 version instead.',
52
  })
53
  @ApiParam({
54
    name: 'chainId',
55
    type: 'string',
56
    description: 'Chain ID where delegates are registered',
57
    example: '1',
58
  })
59
  @ApiQuery({
60
    name: 'safe',
61
    required: false,
62
    type: String,
63
    description: 'Filter by Safe address',
64
  })
65
  @ApiQuery({
66
    name: 'delegate',
67
    required: false,
68
    type: String,
69
    description: 'Filter by delegate address',
70
  })
71
  @ApiQuery({
72
    name: 'delegator',
73
    required: false,
74
    type: String,
75
    description: 'Filter by delegator address',
76
  })
77
  @ApiQuery({
78
    name: 'label',
79
    required: false,
80
    type: String,
81
    description: 'Filter by delegate label',
82
  })
83
  @ApiQuery({
84
    name: 'cursor',
85
    required: false,
86
    type: String,
87
    description: 'Pagination cursor for retrieving the next set of results',
88
  })
89
  @ApiOkResponse({
90
    type: DelegatePage,
91
    description: 'Paginated list of delegates retrieved successfully',
92
  })
93
  @Get('chains/:chainId/delegates')
94
  async getDelegates(
×
95
    @Param('chainId') chainId: string,
96
    @RouteUrlDecorator() routeUrl: URL,
97
    @Query(new ValidationPipe(GetDelegateDtoSchema))
98
    getDelegateDto: GetDelegateDto,
99
    @PaginationDataDecorator() paginationData: PaginationData,
100
  ): Promise<Page<Delegate>> {
101
    return this.service.getDelegates({
×
102
      chainId,
103
      routeUrl,
104
      getDelegateDto,
105
      paginationData,
106
    });
107
  }
108

109
  @ApiOperation({
110
    deprecated: true,
111
    summary: 'Create delegate (deprecated)',
112
    description:
113
      'Creates a new delegate for a specific chain. This endpoint is deprecated, please use the v2 version instead.',
114
  })
115
  @ApiParam({
116
    name: 'chainId',
117
    type: 'string',
118
    description: 'Chain ID where the delegate will be registered',
119
    example: '1',
120
  })
121
  @ApiBody({
122
    type: CreateDelegateDto,
123
    description:
124
      'Delegate creation data including Safe address, delegate address, and signature',
125
  })
126
  @ApiNoContentResponse({
127
    description: 'Delegate created successfully',
128
  })
129
  @ApiBadRequestResponse({
130
    description: 'Invalid delegate data or signature',
131
  })
132
  @HttpCode(200)
133
  @Post('chains/:chainId/delegates')
134
  async postDelegate(
×
135
    @Param('chainId') chainId: string,
136
    @Body(new ValidationPipe(CreateDelegateDtoSchema))
137
    createDelegateDto: CreateDelegateDto,
138
  ): Promise<void> {
139
    await this.service.postDelegate({ chainId, createDelegateDto });
×
140
  }
141

142
  @ApiOperation({
143
    deprecated: true,
144
    summary: 'Delete delegate (deprecated)',
145
    description:
146
      'Deletes a delegate for a specific chain and address. This endpoint is deprecated, please use the v2 version instead.',
147
  })
148
  @ApiParam({
149
    name: 'chainId',
150
    type: 'string',
151
    description: 'Chain ID where the delegate is registered',
152
    example: '1',
153
  })
154
  @ApiParam({
155
    name: 'delegateAddress',
156
    type: 'string',
157
    description: 'Delegate address to delete (0x prefixed hex string)',
158
  })
159
  @ApiBody({
160
    type: DeleteDelegateDto,
161
    description: 'Signature proving authorization to delete the delegate',
162
  })
163
  @ApiNoContentResponse({
164
    description: 'Delegate deleted successfully',
165
  })
166
  @ApiBadRequestResponse({
167
    description: 'Invalid signature or unauthorized deletion attempt',
168
  })
169
  @Delete('chains/:chainId/delegates/:delegateAddress')
170
  async deleteDelegate(
×
171
    @Param('chainId') chainId: string,
172
    @Param('delegateAddress', new ValidationPipe(AddressSchema))
173
    delegateAddress: Address,
174
    @Body(new ValidationPipe(DeleteDelegateDtoSchema))
175
    deleteDelegateDto: DeleteDelegateDto,
176
  ): Promise<unknown> {
177
    return this.service.deleteDelegate({
×
178
      chainId,
179
      delegateAddress,
180
      deleteDelegateDto,
181
    });
182
  }
183

184
  @ApiOperation({
185
    deprecated: true,
186
    summary: 'Delete Safe delegate (deprecated)',
187
    description:
188
      'Removes a delegate from a specific Safe. This endpoint is deprecated, please use the v2 version instead.',
189
  })
190
  @ApiParam({
191
    name: 'chainId',
192
    type: 'string',
193
    description: 'Chain ID where the Safe is deployed',
194
    example: '1',
195
  })
196
  @ApiParam({
197
    name: 'safeAddress',
198
    type: 'string',
199
    description: 'Safe contract address (0x prefixed hex string)',
200
  })
201
  @ApiParam({
202
    name: 'delegateAddress',
203
    type: 'string',
204
    description: 'Delegate address to remove (0x prefixed hex string)',
205
  })
206
  @ApiBody({
207
    type: DeleteSafeDelegateDto,
208
    description: 'Signature proving authorization to remove the delegate',
209
  })
210
  @ApiNoContentResponse({
211
    description: 'Safe delegate removed successfully',
212
  })
213
  @ApiBadRequestResponse({
214
    description: 'Invalid signature or unauthorized removal attempt',
215
  })
216
  @Delete('chains/:chainId/safes/:safeAddress/delegates/:delegateAddress')
217
  async deleteSafeDelegate(
×
218
    @Param('chainId') chainId: string,
219
    @Body(new ValidationPipe(DeleteSafeDelegateDtoSchema))
220
    deleteSafeDelegateRequest: DeleteSafeDelegateDto,
221
  ): Promise<unknown> {
222
    return this.service.deleteSafeDelegate({
×
223
      chainId,
224
      deleteSafeDelegateRequest,
225
    });
226
  }
227
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc