@37signals/fizzy 0.1.0
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/dist/auth/cookie-auth.d.ts +25 -0
- package/dist/auth/cookie-auth.d.ts.map +1 -0
- package/dist/auth/cookie-auth.js +29 -0
- package/dist/auth/cookie-auth.js.map +1 -0
- package/dist/auth/magic-link.d.ts +66 -0
- package/dist/auth/magic-link.d.ts.map +1 -0
- package/dist/auth/magic-link.js +78 -0
- package/dist/auth/magic-link.js.map +1 -0
- package/dist/auth-strategy.d.ts +32 -0
- package/dist/auth-strategy.d.ts.map +1 -0
- package/dist/auth-strategy.js +29 -0
- package/dist/auth-strategy.js.map +1 -0
- package/dist/cache/etag-cache.d.ts +49 -0
- package/dist/cache/etag-cache.d.ts.map +1 -0
- package/dist/cache/etag-cache.js +95 -0
- package/dist/cache/etag-cache.js.map +1 -0
- package/dist/client.d.ts +92 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +505 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +68 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +187 -0
- package/dist/errors.js.map +1 -0
- package/dist/generated/metadata.json +1272 -0
- package/dist/generated/openapi-stripped.json +12446 -0
- package/dist/generated/path-mapping.d.ts +8 -0
- package/dist/generated/path-mapping.d.ts.map +1 -0
- package/dist/generated/path-mapping.js +124 -0
- package/dist/generated/path-mapping.js.map +1 -0
- package/dist/generated/path-mapping.ts +135 -0
- package/dist/generated/schema.d.ts +10272 -0
- package/dist/generated/services/boards.d.ts +56 -0
- package/dist/generated/services/boards.d.ts.map +1 -0
- package/dist/generated/services/boards.js +100 -0
- package/dist/generated/services/boards.js.map +1 -0
- package/dist/generated/services/boards.ts +152 -0
- package/dist/generated/services/cards.d.ts +164 -0
- package/dist/generated/services/cards.d.ts.map +1 -0
- package/dist/generated/services/cards.js +353 -0
- package/dist/generated/services/cards.js.map +1 -0
- package/dist/generated/services/cards.ts +522 -0
- package/dist/generated/services/columns.d.ts +45 -0
- package/dist/generated/services/columns.d.ts.map +1 -0
- package/dist/generated/services/columns.js +77 -0
- package/dist/generated/services/columns.js.map +1 -0
- package/dist/generated/services/columns.ts +116 -0
- package/dist/generated/services/comments.d.ts +42 -0
- package/dist/generated/services/comments.d.ts.map +1 -0
- package/dist/generated/services/comments.js +77 -0
- package/dist/generated/services/comments.js.map +1 -0
- package/dist/generated/services/comments.ts +114 -0
- package/dist/generated/services/devices.d.ts +24 -0
- package/dist/generated/services/devices.d.ts.map +1 -0
- package/dist/generated/services/devices.js +36 -0
- package/dist/generated/services/devices.js.map +1 -0
- package/dist/generated/services/devices.ts +53 -0
- package/dist/generated/services/identity.d.ts +16 -0
- package/dist/generated/services/identity.d.ts.map +1 -0
- package/dist/generated/services/identity.js +21 -0
- package/dist/generated/services/identity.js.map +1 -0
- package/dist/generated/services/identity.ts +30 -0
- package/dist/generated/services/index.d.ts +17 -0
- package/dist/generated/services/index.d.ts.map +1 -0
- package/dist/generated/services/index.js +17 -0
- package/dist/generated/services/index.js.map +1 -0
- package/dist/generated/services/index.ts +16 -0
- package/dist/generated/services/miscellaneous.d.ts +136 -0
- package/dist/generated/services/miscellaneous.d.ts.map +1 -0
- package/dist/generated/services/miscellaneous.js +301 -0
- package/dist/generated/services/miscellaneous.js.map +1 -0
- package/dist/generated/services/miscellaneous.ts +443 -0
- package/dist/generated/services/notifications.d.ts +42 -0
- package/dist/generated/services/notifications.d.ts.map +1 -0
- package/dist/generated/services/notifications.js +75 -0
- package/dist/generated/services/notifications.js.map +1 -0
- package/dist/generated/services/notifications.ts +113 -0
- package/dist/generated/services/pins.d.ts +16 -0
- package/dist/generated/services/pins.d.ts.map +1 -0
- package/dist/generated/services/pins.js +21 -0
- package/dist/generated/services/pins.js.map +1 -0
- package/dist/generated/services/pins.ts +29 -0
- package/dist/generated/services/reactions.d.ts +45 -0
- package/dist/generated/services/reactions.d.ts.map +1 -0
- package/dist/generated/services/reactions.js +90 -0
- package/dist/generated/services/reactions.js.map +1 -0
- package/dist/generated/services/reactions.ts +129 -0
- package/dist/generated/services/sessions.d.ts +44 -0
- package/dist/generated/services/sessions.d.ts.map +1 -0
- package/dist/generated/services/sessions.js +73 -0
- package/dist/generated/services/sessions.js.map +1 -0
- package/dist/generated/services/sessions.ts +113 -0
- package/dist/generated/services/steps.d.ts +43 -0
- package/dist/generated/services/steps.d.ts.map +1 -0
- package/dist/generated/services/steps.js +77 -0
- package/dist/generated/services/steps.js.map +1 -0
- package/dist/generated/services/steps.ts +114 -0
- package/dist/generated/services/tags.d.ts +17 -0
- package/dist/generated/services/tags.d.ts.map +1 -0
- package/dist/generated/services/tags.js +21 -0
- package/dist/generated/services/tags.js.map +1 -0
- package/dist/generated/services/tags.ts +32 -0
- package/dist/generated/services/uploads.d.ts +22 -0
- package/dist/generated/services/uploads.d.ts.map +1 -0
- package/dist/generated/services/uploads.js +23 -0
- package/dist/generated/services/uploads.js.map +1 -0
- package/dist/generated/services/uploads.ts +38 -0
- package/dist/generated/services/users.d.ts +33 -0
- package/dist/generated/services/users.d.ts.map +1 -0
- package/dist/generated/services/users.js +61 -0
- package/dist/generated/services/users.js.map +1 -0
- package/dist/generated/services/users.ts +89 -0
- package/dist/generated/services/webhooks.d.ts +49 -0
- package/dist/generated/services/webhooks.d.ts.map +1 -0
- package/dist/generated/services/webhooks.js +90 -0
- package/dist/generated/services/webhooks.js.map +1 -0
- package/dist/generated/services/webhooks.ts +133 -0
- package/dist/hooks/gating.d.ts +35 -0
- package/dist/hooks/gating.d.ts.map +1 -0
- package/dist/hooks/gating.js +58 -0
- package/dist/hooks/gating.js.map +1 -0
- package/dist/hooks/otel.d.ts +49 -0
- package/dist/hooks/otel.d.ts.map +1 -0
- package/dist/hooks/otel.js +171 -0
- package/dist/hooks/otel.js.map +1 -0
- package/dist/hooks.d.ts +99 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +130 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +97 -0
- package/dist/index.js.map +1 -0
- package/dist/pagination-utils.d.ts +22 -0
- package/dist/pagination-utils.d.ts.map +1 -0
- package/dist/pagination-utils.js +52 -0
- package/dist/pagination-utils.js.map +1 -0
- package/dist/pagination.d.ts +37 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +30 -0
- package/dist/pagination.js.map +1 -0
- package/dist/resilience/bulkhead.d.ts +34 -0
- package/dist/resilience/bulkhead.d.ts.map +1 -0
- package/dist/resilience/bulkhead.js +65 -0
- package/dist/resilience/bulkhead.js.map +1 -0
- package/dist/resilience/circuit-breaker.d.ts +48 -0
- package/dist/resilience/circuit-breaker.d.ts.map +1 -0
- package/dist/resilience/circuit-breaker.js +74 -0
- package/dist/resilience/circuit-breaker.js.map +1 -0
- package/dist/resilience/index.d.ts +41 -0
- package/dist/resilience/index.d.ts.map +1 -0
- package/dist/resilience/index.js +46 -0
- package/dist/resilience/index.js.map +1 -0
- package/dist/resilience/rate-limiter.d.ts +38 -0
- package/dist/resilience/rate-limiter.d.ts.map +1 -0
- package/dist/resilience/rate-limiter.js +69 -0
- package/dist/resilience/rate-limiter.js.map +1 -0
- package/dist/security.d.ts +19 -0
- package/dist/security.d.ts.map +1 -0
- package/dist/security.js +55 -0
- package/dist/security.js.map +1 -0
- package/dist/services/base.d.ts +51 -0
- package/dist/services/base.d.ts.map +1 -0
- package/dist/services/base.js +146 -0
- package/dist/services/base.js.map +1 -0
- package/dist/webhooks/handler.d.ts +62 -0
- package/dist/webhooks/handler.d.ts.map +1 -0
- package/dist/webhooks/handler.js +204 -0
- package/dist/webhooks/handler.js.map +1 -0
- package/dist/webhooks/index.d.ts +3 -0
- package/dist/webhooks/index.d.ts.map +1 -0
- package/dist/webhooks/index.js +3 -0
- package/dist/webhooks/index.js.map +1 -0
- package/dist/webhooks/verify.d.ts +10 -0
- package/dist/webhooks/verify.d.ts.map +1 -0
- package/dist/webhooks/verify.js +23 -0
- package/dist/webhooks/verify.js.map +1 -0
- package/package.json +67 -0
- package/src/generated/metadata.json +1272 -0
- package/src/generated/openapi-stripped.json +12446 -0
- package/src/generated/path-mapping.ts +135 -0
- package/src/generated/schema.d.ts +10272 -0
- package/src/generated/services/boards.ts +152 -0
- package/src/generated/services/cards.ts +522 -0
- package/src/generated/services/columns.ts +116 -0
- package/src/generated/services/comments.ts +114 -0
- package/src/generated/services/devices.ts +53 -0
- package/src/generated/services/identity.ts +30 -0
- package/src/generated/services/index.ts +16 -0
- package/src/generated/services/miscellaneous.ts +443 -0
- package/src/generated/services/notifications.ts +113 -0
- package/src/generated/services/pins.ts +29 -0
- package/src/generated/services/reactions.ts +129 -0
- package/src/generated/services/sessions.ts +113 -0
- package/src/generated/services/steps.ts +114 -0
- package/src/generated/services/tags.ts +32 -0
- package/src/generated/services/uploads.ts +38 -0
- package/src/generated/services/users.ts +89 -0
- package/src/generated/services/webhooks.ts +133 -0
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Miscellaneous service for the Fizzy API.
|
|
3
|
+
*
|
|
4
|
+
* @generated from OpenAPI spec - do not edit directly
|
|
5
|
+
* Run `npm run generate` to regenerate.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { BaseService, type FetchResponse } from "../../services/base.js";
|
|
9
|
+
import { ListResult, type PaginationOptions } from "../../pagination.js";
|
|
10
|
+
import type { components } from "../schema.js";
|
|
11
|
+
|
|
12
|
+
export interface CreateAccessTokenRequest {
|
|
13
|
+
/** Rich text description (HTML) */
|
|
14
|
+
description: string;
|
|
15
|
+
permission: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface UpdateAccountEntropyRequest {
|
|
19
|
+
autoPostponePeriod?: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface UpdateJoinCodeRequest {
|
|
23
|
+
usageLimit?: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface UpdateAccountSettingsRequest {
|
|
27
|
+
/** Display name */
|
|
28
|
+
name?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface UpdateBoardEntropyRequest {
|
|
32
|
+
autoPostponePeriod?: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface UpdateBoardInvolvementRequest {
|
|
36
|
+
involvement?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface UpdateNotificationSettingsRequest {
|
|
40
|
+
bundleEmailFrequency?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface CreatePushSubscriptionRequest {
|
|
44
|
+
endpoint: string;
|
|
45
|
+
p256dhKey: string;
|
|
46
|
+
authKey: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface UpdateUserRoleRequest {
|
|
50
|
+
role: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export class MiscellaneousService extends BaseService {
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* ListAccessTokens
|
|
57
|
+
*/
|
|
58
|
+
async listAccessTokens(): Promise<ListResult<components["schemas"]["AccessToken"]>> {
|
|
59
|
+
return this.request(
|
|
60
|
+
{
|
|
61
|
+
service: "Access tokens",
|
|
62
|
+
operation: "ListAccessTokens",
|
|
63
|
+
resourceType: "access_tokens",
|
|
64
|
+
isMutation: false,
|
|
65
|
+
},
|
|
66
|
+
() => this.client.GET("/my/access_tokens.json" as never, {
|
|
67
|
+
} as never),
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* CreateAccessToken
|
|
73
|
+
*/
|
|
74
|
+
async createAccessToken(body: CreateAccessTokenRequest): Promise<components["schemas"]["AccessToken"]> {
|
|
75
|
+
return this.request(
|
|
76
|
+
{
|
|
77
|
+
service: "Access token",
|
|
78
|
+
operation: "CreateAccessToken",
|
|
79
|
+
resourceType: "access_token",
|
|
80
|
+
isMutation: true,
|
|
81
|
+
},
|
|
82
|
+
() => this.client.POST("/my/access_tokens.json" as never, {
|
|
83
|
+
body: { description: body.description, permission: body.permission } as never,
|
|
84
|
+
} as never),
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* DeleteAccessToken
|
|
90
|
+
*/
|
|
91
|
+
async deleteAccessToken(accessTokenId: string): Promise<void> {
|
|
92
|
+
return this.request(
|
|
93
|
+
{
|
|
94
|
+
service: "Access token",
|
|
95
|
+
operation: "DeleteAccessToken",
|
|
96
|
+
resourceType: "access_token",
|
|
97
|
+
isMutation: true,
|
|
98
|
+
},
|
|
99
|
+
() => this.client.DELETE("/my/access_tokens/{accessTokenId}" as never, {
|
|
100
|
+
params: { path: { accessTokenId } },
|
|
101
|
+
} as never),
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* UpdateAccountEntropy
|
|
107
|
+
*/
|
|
108
|
+
async updateAccountEntropy(body?: UpdateAccountEntropyRequest): Promise<void> {
|
|
109
|
+
return this.request(
|
|
110
|
+
{
|
|
111
|
+
service: "Account entropy",
|
|
112
|
+
operation: "UpdateAccountEntropy",
|
|
113
|
+
resourceType: "account_entropy",
|
|
114
|
+
isMutation: true,
|
|
115
|
+
},
|
|
116
|
+
() => this.client.PATCH("/account/entropy.json" as never, {
|
|
117
|
+
body: { auto_postpone_period: body?.autoPostponePeriod } as never,
|
|
118
|
+
} as never),
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* CreateAccountExport
|
|
124
|
+
*/
|
|
125
|
+
async createAccountExport(): Promise<components["schemas"]["AccountExport"]> {
|
|
126
|
+
return this.request(
|
|
127
|
+
{
|
|
128
|
+
service: "Account export",
|
|
129
|
+
operation: "CreateAccountExport",
|
|
130
|
+
resourceType: "account_export",
|
|
131
|
+
isMutation: true,
|
|
132
|
+
},
|
|
133
|
+
() => this.client.POST("/account/exports.json" as never, {
|
|
134
|
+
} as never),
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* GetAccountExport
|
|
140
|
+
*/
|
|
141
|
+
async accountExport(exportId: string): Promise<components["schemas"]["AccountExport"]> {
|
|
142
|
+
return this.request(
|
|
143
|
+
{
|
|
144
|
+
service: "Account export",
|
|
145
|
+
operation: "GetAccountExport",
|
|
146
|
+
resourceType: "account_export",
|
|
147
|
+
isMutation: false,
|
|
148
|
+
},
|
|
149
|
+
() => this.client.GET("/account/exports/{exportId}" as never, {
|
|
150
|
+
params: { path: { exportId } },
|
|
151
|
+
} as never),
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* ResetJoinCode
|
|
157
|
+
*/
|
|
158
|
+
async resetJoinCode(): Promise<void> {
|
|
159
|
+
return this.request(
|
|
160
|
+
{
|
|
161
|
+
service: "Resetjoincode",
|
|
162
|
+
operation: "ResetJoinCode",
|
|
163
|
+
resourceType: "resetjoincode",
|
|
164
|
+
isMutation: true,
|
|
165
|
+
},
|
|
166
|
+
() => this.client.DELETE("/account/join_code.json" as never, {
|
|
167
|
+
} as never),
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* GetJoinCode
|
|
173
|
+
*/
|
|
174
|
+
async joinCode(): Promise<components["schemas"]["JoinCode"]> {
|
|
175
|
+
return this.request(
|
|
176
|
+
{
|
|
177
|
+
service: "Join code",
|
|
178
|
+
operation: "GetJoinCode",
|
|
179
|
+
resourceType: "join_code",
|
|
180
|
+
isMutation: false,
|
|
181
|
+
},
|
|
182
|
+
() => this.client.GET("/account/join_code.json" as never, {
|
|
183
|
+
} as never),
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* UpdateJoinCode
|
|
189
|
+
*/
|
|
190
|
+
async updateJoinCode(body?: UpdateJoinCodeRequest): Promise<void> {
|
|
191
|
+
return this.request(
|
|
192
|
+
{
|
|
193
|
+
service: "Join code",
|
|
194
|
+
operation: "UpdateJoinCode",
|
|
195
|
+
resourceType: "join_code",
|
|
196
|
+
isMutation: true,
|
|
197
|
+
},
|
|
198
|
+
() => this.client.PATCH("/account/join_code.json" as never, {
|
|
199
|
+
body: { usage_limit: body?.usageLimit } as never,
|
|
200
|
+
} as never),
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* GetAccountSettings
|
|
206
|
+
*/
|
|
207
|
+
async accountSettings(): Promise<components["schemas"]["AccountSettings"]> {
|
|
208
|
+
return this.request(
|
|
209
|
+
{
|
|
210
|
+
service: "Account settings",
|
|
211
|
+
operation: "GetAccountSettings",
|
|
212
|
+
resourceType: "account_settings",
|
|
213
|
+
isMutation: false,
|
|
214
|
+
},
|
|
215
|
+
() => this.client.GET("/account/settings.json" as never, {
|
|
216
|
+
} as never),
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* UpdateAccountSettings
|
|
222
|
+
*/
|
|
223
|
+
async updateAccountSettings(body?: UpdateAccountSettingsRequest): Promise<void> {
|
|
224
|
+
return this.request(
|
|
225
|
+
{
|
|
226
|
+
service: "Account settings",
|
|
227
|
+
operation: "UpdateAccountSettings",
|
|
228
|
+
resourceType: "account_settings",
|
|
229
|
+
isMutation: true,
|
|
230
|
+
},
|
|
231
|
+
() => this.client.PATCH("/account/settings.json" as never, {
|
|
232
|
+
body: { name: body?.name } as never,
|
|
233
|
+
} as never),
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* UpdateBoardEntropy
|
|
239
|
+
*/
|
|
240
|
+
async updateBoardEntropy(boardId: string, body?: UpdateBoardEntropyRequest): Promise<void> {
|
|
241
|
+
return this.request(
|
|
242
|
+
{
|
|
243
|
+
service: "Board entropy",
|
|
244
|
+
operation: "UpdateBoardEntropy",
|
|
245
|
+
resourceType: "board_entropy",
|
|
246
|
+
isMutation: true,
|
|
247
|
+
},
|
|
248
|
+
() => this.client.PATCH("/boards/{boardId}/entropy.json" as never, {
|
|
249
|
+
params: { path: { boardId } },
|
|
250
|
+
body: { auto_postpone_period: body?.autoPostponePeriod } as never,
|
|
251
|
+
} as never),
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* UpdateBoardInvolvement
|
|
257
|
+
*/
|
|
258
|
+
async updateBoardInvolvement(boardId: string, body?: UpdateBoardInvolvementRequest): Promise<void> {
|
|
259
|
+
return this.request(
|
|
260
|
+
{
|
|
261
|
+
service: "Board involvement",
|
|
262
|
+
operation: "UpdateBoardInvolvement",
|
|
263
|
+
resourceType: "board_involvement",
|
|
264
|
+
isMutation: true,
|
|
265
|
+
},
|
|
266
|
+
() => this.client.PATCH("/boards/{boardId}/involvement.json" as never, {
|
|
267
|
+
params: { path: { boardId } },
|
|
268
|
+
body: { involvement: body?.involvement } as never,
|
|
269
|
+
} as never),
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* MarkCardUnread
|
|
275
|
+
*/
|
|
276
|
+
async markCardUnread(cardNumber: number): Promise<void> {
|
|
277
|
+
return this.request(
|
|
278
|
+
{
|
|
279
|
+
service: "Markcardunread",
|
|
280
|
+
operation: "MarkCardUnread",
|
|
281
|
+
resourceType: "markcardunread",
|
|
282
|
+
isMutation: true,
|
|
283
|
+
},
|
|
284
|
+
() => this.client.DELETE("/cards/{cardNumber}/reading.json" as never, {
|
|
285
|
+
params: { path: { cardNumber } },
|
|
286
|
+
} as never),
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* MarkCardRead
|
|
292
|
+
*/
|
|
293
|
+
async markCardRead(cardNumber: number): Promise<void> {
|
|
294
|
+
return this.request(
|
|
295
|
+
{
|
|
296
|
+
service: "Markcardread",
|
|
297
|
+
operation: "MarkCardRead",
|
|
298
|
+
resourceType: "markcardread",
|
|
299
|
+
isMutation: true,
|
|
300
|
+
},
|
|
301
|
+
() => this.client.POST("/cards/{cardNumber}/reading.json" as never, {
|
|
302
|
+
params: { path: { cardNumber } },
|
|
303
|
+
} as never),
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* MoveColumnLeft
|
|
309
|
+
*/
|
|
310
|
+
async moveColumnLeft(columnId: string): Promise<void> {
|
|
311
|
+
return this.request(
|
|
312
|
+
{
|
|
313
|
+
service: "Column left",
|
|
314
|
+
operation: "MoveColumnLeft",
|
|
315
|
+
resourceType: "column_left",
|
|
316
|
+
isMutation: true,
|
|
317
|
+
},
|
|
318
|
+
() => this.client.POST("/columns/{columnId}/left_position.json" as never, {
|
|
319
|
+
params: { path: { columnId } },
|
|
320
|
+
} as never),
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* MoveColumnRight
|
|
326
|
+
*/
|
|
327
|
+
async moveColumnRight(columnId: string): Promise<void> {
|
|
328
|
+
return this.request(
|
|
329
|
+
{
|
|
330
|
+
service: "Column right",
|
|
331
|
+
operation: "MoveColumnRight",
|
|
332
|
+
resourceType: "column_right",
|
|
333
|
+
isMutation: true,
|
|
334
|
+
},
|
|
335
|
+
() => this.client.POST("/columns/{columnId}/right_position.json" as never, {
|
|
336
|
+
params: { path: { columnId } },
|
|
337
|
+
} as never),
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* GetNotificationSettings
|
|
343
|
+
*/
|
|
344
|
+
async notificationSettings(): Promise<components["schemas"]["NotificationSettings"]> {
|
|
345
|
+
return this.request(
|
|
346
|
+
{
|
|
347
|
+
service: "Notification settings",
|
|
348
|
+
operation: "GetNotificationSettings",
|
|
349
|
+
resourceType: "notification_settings",
|
|
350
|
+
isMutation: false,
|
|
351
|
+
},
|
|
352
|
+
() => this.client.GET("/notifications/settings.json" as never, {
|
|
353
|
+
} as never),
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* UpdateNotificationSettings
|
|
359
|
+
*/
|
|
360
|
+
async updateNotificationSettings(body?: UpdateNotificationSettingsRequest): Promise<void> {
|
|
361
|
+
return this.request(
|
|
362
|
+
{
|
|
363
|
+
service: "Notification settings",
|
|
364
|
+
operation: "UpdateNotificationSettings",
|
|
365
|
+
resourceType: "notification_settings",
|
|
366
|
+
isMutation: true,
|
|
367
|
+
},
|
|
368
|
+
() => this.client.PATCH("/notifications/settings.json" as never, {
|
|
369
|
+
body: { bundle_email_frequency: body?.bundleEmailFrequency } as never,
|
|
370
|
+
} as never),
|
|
371
|
+
);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* DeleteUserAvatar
|
|
376
|
+
*/
|
|
377
|
+
async deleteUserAvatar(userId: string): Promise<void> {
|
|
378
|
+
return this.request(
|
|
379
|
+
{
|
|
380
|
+
service: "User avatar",
|
|
381
|
+
operation: "DeleteUserAvatar",
|
|
382
|
+
resourceType: "user_avatar",
|
|
383
|
+
isMutation: true,
|
|
384
|
+
},
|
|
385
|
+
() => this.client.DELETE("/users/{userId}/avatar" as never, {
|
|
386
|
+
params: { path: { userId } },
|
|
387
|
+
} as never),
|
|
388
|
+
);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* CreatePushSubscription
|
|
393
|
+
*/
|
|
394
|
+
async createPushSubscription(userId: string, body: CreatePushSubscriptionRequest): Promise<void> {
|
|
395
|
+
return this.request(
|
|
396
|
+
{
|
|
397
|
+
service: "Push subscription",
|
|
398
|
+
operation: "CreatePushSubscription",
|
|
399
|
+
resourceType: "push_subscription",
|
|
400
|
+
isMutation: true,
|
|
401
|
+
},
|
|
402
|
+
() => this.client.POST("/users/{userId}/push_subscriptions.json" as never, {
|
|
403
|
+
params: { path: { userId } },
|
|
404
|
+
body: { endpoint: body.endpoint, p256dh_key: body.p256dhKey, auth_key: body.authKey } as never,
|
|
405
|
+
} as never),
|
|
406
|
+
);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* DeletePushSubscription
|
|
411
|
+
*/
|
|
412
|
+
async deletePushSubscription(userId: string, pushSubscriptionId: string): Promise<void> {
|
|
413
|
+
return this.request(
|
|
414
|
+
{
|
|
415
|
+
service: "Push subscription",
|
|
416
|
+
operation: "DeletePushSubscription",
|
|
417
|
+
resourceType: "push_subscription",
|
|
418
|
+
isMutation: true,
|
|
419
|
+
},
|
|
420
|
+
() => this.client.DELETE("/users/{userId}/push_subscriptions/{pushSubscriptionId}" as never, {
|
|
421
|
+
params: { path: { userId, pushSubscriptionId } },
|
|
422
|
+
} as never),
|
|
423
|
+
);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* UpdateUserRole
|
|
428
|
+
*/
|
|
429
|
+
async updateUserRole(userId: string, body: UpdateUserRoleRequest): Promise<void> {
|
|
430
|
+
return this.request(
|
|
431
|
+
{
|
|
432
|
+
service: "User role",
|
|
433
|
+
operation: "UpdateUserRole",
|
|
434
|
+
resourceType: "user_role",
|
|
435
|
+
isMutation: true,
|
|
436
|
+
},
|
|
437
|
+
() => this.client.PATCH("/users/{userId}/role.json" as never, {
|
|
438
|
+
params: { path: { userId } },
|
|
439
|
+
body: { role: body.role } as never,
|
|
440
|
+
} as never),
|
|
441
|
+
);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notifications service for the Fizzy API.
|
|
3
|
+
*
|
|
4
|
+
* @generated from OpenAPI spec - do not edit directly
|
|
5
|
+
* Run `npm run generate` to regenerate.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { BaseService, type FetchResponse } from "../../services/base.js";
|
|
9
|
+
import { ListResult, type PaginationOptions } from "../../pagination.js";
|
|
10
|
+
import type { components } from "../schema.js";
|
|
11
|
+
|
|
12
|
+
export type Notification = components["schemas"]["Notification"];
|
|
13
|
+
|
|
14
|
+
export interface ListNotificationsOptions extends PaginationOptions {
|
|
15
|
+
read?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface BulkReadNotificationsRequest {
|
|
19
|
+
notificationIds?: string[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface TrayNotificationtrayOptions extends PaginationOptions {
|
|
23
|
+
includeRead?: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export class NotificationsService extends BaseService {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* ListNotifications
|
|
30
|
+
*/
|
|
31
|
+
async list(options?: ListNotificationsOptions): Promise<ListResult<Notification>> {
|
|
32
|
+
return this.requestPaginated(
|
|
33
|
+
{
|
|
34
|
+
service: "Notifications",
|
|
35
|
+
operation: "ListNotifications",
|
|
36
|
+
resourceType: "notifications",
|
|
37
|
+
isMutation: false,
|
|
38
|
+
},
|
|
39
|
+
() => this.client.GET("/notifications.json" as never, {
|
|
40
|
+
params: { query: { read: options?.read } },
|
|
41
|
+
} as never),
|
|
42
|
+
options,
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* BulkReadNotifications
|
|
48
|
+
*/
|
|
49
|
+
async bulkRead(body?: BulkReadNotificationsRequest): Promise<void> {
|
|
50
|
+
return this.request(
|
|
51
|
+
{
|
|
52
|
+
service: "Read notifications",
|
|
53
|
+
operation: "BulkReadNotifications",
|
|
54
|
+
resourceType: "read_notifications",
|
|
55
|
+
isMutation: true,
|
|
56
|
+
},
|
|
57
|
+
() => this.client.POST("/notifications/bulk_reading.json" as never, {
|
|
58
|
+
body: { notification_ids: body?.notificationIds } as never,
|
|
59
|
+
} as never),
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* GetNotificationTray
|
|
65
|
+
*/
|
|
66
|
+
async tray(options?: TrayNotificationtrayOptions): Promise<ListResult<Notification>> {
|
|
67
|
+
return this.request(
|
|
68
|
+
{
|
|
69
|
+
service: "Notification tray",
|
|
70
|
+
operation: "GetNotificationTray",
|
|
71
|
+
resourceType: "notification_tray",
|
|
72
|
+
isMutation: false,
|
|
73
|
+
},
|
|
74
|
+
() => this.client.GET("/notifications/tray.json" as never, {
|
|
75
|
+
params: { query: { include_read: options?.includeRead } },
|
|
76
|
+
} as never),
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* UnreadNotification
|
|
82
|
+
*/
|
|
83
|
+
async unread(notificationId: string): Promise<void> {
|
|
84
|
+
return this.request(
|
|
85
|
+
{
|
|
86
|
+
service: "Notification",
|
|
87
|
+
operation: "UnreadNotification",
|
|
88
|
+
resourceType: "notification",
|
|
89
|
+
isMutation: true,
|
|
90
|
+
},
|
|
91
|
+
() => this.client.DELETE("/notifications/{notificationId}/reading.json" as never, {
|
|
92
|
+
params: { path: { notificationId } },
|
|
93
|
+
} as never),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* ReadNotification
|
|
99
|
+
*/
|
|
100
|
+
async read(notificationId: string): Promise<void> {
|
|
101
|
+
return this.request(
|
|
102
|
+
{
|
|
103
|
+
service: "Notification",
|
|
104
|
+
operation: "ReadNotification",
|
|
105
|
+
resourceType: "notification",
|
|
106
|
+
isMutation: true,
|
|
107
|
+
},
|
|
108
|
+
() => this.client.POST("/notifications/{notificationId}/reading.json" as never, {
|
|
109
|
+
params: { path: { notificationId } },
|
|
110
|
+
} as never),
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pins service for the Fizzy API.
|
|
3
|
+
*
|
|
4
|
+
* @generated from OpenAPI spec - do not edit directly
|
|
5
|
+
* Run `npm run generate` to regenerate.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { BaseService, type FetchResponse } from "../../services/base.js";
|
|
9
|
+
import { ListResult, type PaginationOptions } from "../../pagination.js";
|
|
10
|
+
import type { components } from "../schema.js";
|
|
11
|
+
|
|
12
|
+
export class PinsService extends BaseService {
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* ListPins
|
|
16
|
+
*/
|
|
17
|
+
async list(): Promise<ListResult<components["schemas"]["Card"]>> {
|
|
18
|
+
return this.request(
|
|
19
|
+
{
|
|
20
|
+
service: "Pins",
|
|
21
|
+
operation: "ListPins",
|
|
22
|
+
resourceType: "pins",
|
|
23
|
+
isMutation: false,
|
|
24
|
+
},
|
|
25
|
+
() => this.client.GET("/my/pins.json" as never, {
|
|
26
|
+
} as never),
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reactions service for the Fizzy API.
|
|
3
|
+
*
|
|
4
|
+
* @generated from OpenAPI spec - do not edit directly
|
|
5
|
+
* Run `npm run generate` to regenerate.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { BaseService, type FetchResponse } from "../../services/base.js";
|
|
9
|
+
import { ListResult, type PaginationOptions } from "../../pagination.js";
|
|
10
|
+
import type { components } from "../schema.js";
|
|
11
|
+
|
|
12
|
+
export type Reaction = components["schemas"]["Reaction"];
|
|
13
|
+
|
|
14
|
+
export interface CreateCommentReactionRequest {
|
|
15
|
+
/** Text content */
|
|
16
|
+
content: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface CreateCardReactionRequest {
|
|
20
|
+
/** Text content */
|
|
21
|
+
content: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export class ReactionsService extends BaseService {
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* ListCommentReactions
|
|
28
|
+
*/
|
|
29
|
+
async listForComment(cardNumber: number, commentId: string): Promise<ListResult<Reaction>> {
|
|
30
|
+
return this.request(
|
|
31
|
+
{
|
|
32
|
+
service: "Comment reactions",
|
|
33
|
+
operation: "ListCommentReactions",
|
|
34
|
+
resourceType: "comment_reactions",
|
|
35
|
+
isMutation: false,
|
|
36
|
+
},
|
|
37
|
+
() => this.client.GET("/cards/{cardNumber}/comments/{commentId}/reactions.json" as never, {
|
|
38
|
+
params: { path: { cardNumber, commentId } },
|
|
39
|
+
} as never),
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* CreateCommentReaction
|
|
45
|
+
*/
|
|
46
|
+
async createForComment(cardNumber: number, commentId: string, body: CreateCommentReactionRequest): Promise<Reaction> {
|
|
47
|
+
return this.request(
|
|
48
|
+
{
|
|
49
|
+
service: "Comment reaction",
|
|
50
|
+
operation: "CreateCommentReaction",
|
|
51
|
+
resourceType: "comment_reaction",
|
|
52
|
+
isMutation: true,
|
|
53
|
+
},
|
|
54
|
+
() => this.client.POST("/cards/{cardNumber}/comments/{commentId}/reactions.json" as never, {
|
|
55
|
+
params: { path: { cardNumber, commentId } },
|
|
56
|
+
body: { content: body.content } as never,
|
|
57
|
+
} as never),
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* DeleteCommentReaction
|
|
63
|
+
*/
|
|
64
|
+
async deleteForComment(cardNumber: number, commentId: string, reactionId: string): Promise<void> {
|
|
65
|
+
return this.request(
|
|
66
|
+
{
|
|
67
|
+
service: "Comment reaction",
|
|
68
|
+
operation: "DeleteCommentReaction",
|
|
69
|
+
resourceType: "comment_reaction",
|
|
70
|
+
isMutation: true,
|
|
71
|
+
},
|
|
72
|
+
() => this.client.DELETE("/cards/{cardNumber}/comments/{commentId}/reactions/{reactionId}" as never, {
|
|
73
|
+
params: { path: { cardNumber, commentId, reactionId } },
|
|
74
|
+
} as never),
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* ListCardReactions
|
|
80
|
+
*/
|
|
81
|
+
async listForCard(cardNumber: number): Promise<ListResult<Reaction>> {
|
|
82
|
+
return this.request(
|
|
83
|
+
{
|
|
84
|
+
service: "Card reactions",
|
|
85
|
+
operation: "ListCardReactions",
|
|
86
|
+
resourceType: "card_reactions",
|
|
87
|
+
isMutation: false,
|
|
88
|
+
},
|
|
89
|
+
() => this.client.GET("/cards/{cardNumber}/reactions.json" as never, {
|
|
90
|
+
params: { path: { cardNumber } },
|
|
91
|
+
} as never),
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* CreateCardReaction
|
|
97
|
+
*/
|
|
98
|
+
async createForCard(cardNumber: number, body: CreateCardReactionRequest): Promise<Reaction> {
|
|
99
|
+
return this.request(
|
|
100
|
+
{
|
|
101
|
+
service: "Card reaction",
|
|
102
|
+
operation: "CreateCardReaction",
|
|
103
|
+
resourceType: "card_reaction",
|
|
104
|
+
isMutation: true,
|
|
105
|
+
},
|
|
106
|
+
() => this.client.POST("/cards/{cardNumber}/reactions.json" as never, {
|
|
107
|
+
params: { path: { cardNumber } },
|
|
108
|
+
body: { content: body.content } as never,
|
|
109
|
+
} as never),
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* DeleteCardReaction
|
|
115
|
+
*/
|
|
116
|
+
async deleteForCard(cardNumber: number, reactionId: string): Promise<void> {
|
|
117
|
+
return this.request(
|
|
118
|
+
{
|
|
119
|
+
service: "Card reaction",
|
|
120
|
+
operation: "DeleteCardReaction",
|
|
121
|
+
resourceType: "card_reaction",
|
|
122
|
+
isMutation: true,
|
|
123
|
+
},
|
|
124
|
+
() => this.client.DELETE("/cards/{cardNumber}/reactions/{reactionId}" as never, {
|
|
125
|
+
params: { path: { cardNumber, reactionId } },
|
|
126
|
+
} as never),
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
}
|