@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,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Webhooks service for the Fizzy API.
|
|
3
|
+
*
|
|
4
|
+
* @generated from OpenAPI spec - do not edit directly
|
|
5
|
+
* Run `npm run generate` to regenerate.
|
|
6
|
+
*/
|
|
7
|
+
import { BaseService } from "../../services/base.js";
|
|
8
|
+
export class WebhooksService extends BaseService {
|
|
9
|
+
/**
|
|
10
|
+
* ListWebhooks
|
|
11
|
+
*/
|
|
12
|
+
async list(boardId) {
|
|
13
|
+
return this.request({
|
|
14
|
+
service: "Webhooks",
|
|
15
|
+
operation: "ListWebhooks",
|
|
16
|
+
resourceType: "webhooks",
|
|
17
|
+
isMutation: false,
|
|
18
|
+
}, () => this.client.GET("/boards/{boardId}/webhooks.json", {
|
|
19
|
+
params: { path: { boardId } },
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* CreateWebhook
|
|
24
|
+
*/
|
|
25
|
+
async create(boardId, body) {
|
|
26
|
+
return this.request({
|
|
27
|
+
service: "Webhook",
|
|
28
|
+
operation: "CreateWebhook",
|
|
29
|
+
resourceType: "webhook",
|
|
30
|
+
isMutation: true,
|
|
31
|
+
}, () => this.client.POST("/boards/{boardId}/webhooks.json", {
|
|
32
|
+
params: { path: { boardId } },
|
|
33
|
+
body: { name: body.name, url: body.url, subscribed_actions: body.subscribedActions },
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* DeleteWebhook
|
|
38
|
+
*/
|
|
39
|
+
async delete(boardId, webhookId) {
|
|
40
|
+
return this.request({
|
|
41
|
+
service: "Webhook",
|
|
42
|
+
operation: "DeleteWebhook",
|
|
43
|
+
resourceType: "webhook",
|
|
44
|
+
isMutation: true,
|
|
45
|
+
}, () => this.client.DELETE("/boards/{boardId}/webhooks/{webhookId}", {
|
|
46
|
+
params: { path: { boardId, webhookId } },
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* GetWebhook
|
|
51
|
+
*/
|
|
52
|
+
async get(boardId, webhookId) {
|
|
53
|
+
return this.request({
|
|
54
|
+
service: "Webhook",
|
|
55
|
+
operation: "GetWebhook",
|
|
56
|
+
resourceType: "webhook",
|
|
57
|
+
isMutation: false,
|
|
58
|
+
}, () => this.client.GET("/boards/{boardId}/webhooks/{webhookId}", {
|
|
59
|
+
params: { path: { boardId, webhookId } },
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* UpdateWebhook
|
|
64
|
+
*/
|
|
65
|
+
async update(boardId, webhookId, body) {
|
|
66
|
+
return this.request({
|
|
67
|
+
service: "Webhook",
|
|
68
|
+
operation: "UpdateWebhook",
|
|
69
|
+
resourceType: "webhook",
|
|
70
|
+
isMutation: true,
|
|
71
|
+
}, () => this.client.PATCH("/boards/{boardId}/webhooks/{webhookId}", {
|
|
72
|
+
params: { path: { boardId, webhookId } },
|
|
73
|
+
body: { name: body?.name, url: body?.url, subscribed_actions: body?.subscribedActions },
|
|
74
|
+
}));
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* ActivateWebhook
|
|
78
|
+
*/
|
|
79
|
+
async activate(boardId, webhookId) {
|
|
80
|
+
return this.request({
|
|
81
|
+
service: "Webhook",
|
|
82
|
+
operation: "ActivateWebhook",
|
|
83
|
+
resourceType: "webhook",
|
|
84
|
+
isMutation: true,
|
|
85
|
+
}, () => this.client.POST("/boards/{boardId}/webhooks/{webhookId}/activation.json", {
|
|
86
|
+
params: { path: { boardId, webhookId } },
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=webhooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../src/generated/services/webhooks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAsB,MAAM,wBAAwB,CAAC;AAoBzE,MAAM,OAAO,eAAgB,SAAQ,WAAW;IAE9C;;OAEG;IACH,KAAK,CAAC,IAAI,CAAC,OAAe;QACxB,OAAO,IAAI,CAAC,OAAO,CACjB;YACE,OAAO,EAAE,UAAU;YACnB,SAAS,EAAE,cAAc;YACzB,YAAY,EAAE,UAAU;YACxB,UAAU,EAAE,KAAK;SAClB,EACD,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,iCAA0C,EAAE;YAChE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE;SACrB,CAAC,CACZ,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,IAA0B;QACtD,OAAO,IAAI,CAAC,OAAO,CACjB;YACE,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,eAAe;YAC1B,YAAY,EAAE,SAAS;YACvB,UAAU,EAAE,IAAI;SACjB,EACD,GAAG,EAAE,CAAC,IAAI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UAAU,EAAE,IAAI;SACjB,EACD,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,wCAAiD,EAAE;YACzE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE;YACxC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,kBAAkB,EAAE,IAAI,EAAE,iBAAiB,EAAW;SACxF,CAAC,CACZ,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,QAAQ,CAAC,OAAe,EAAE,SAAiB;QAC/C,OAAO,IAAI,CAAC,OAAO,CACjB;YACE,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,iBAAiB;YAC5B,YAAY,EAAE,SAAS;YACvB,UAAU,EAAE,IAAI;SACjB,EACD,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,wDAAiE,EAAE;YACxF,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE;SAChC,CAAC,CACZ,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Webhooks 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 Webhook = components["schemas"]["Webhook"];
|
|
13
|
+
|
|
14
|
+
export interface CreateWebhookRequest {
|
|
15
|
+
/** Display name */
|
|
16
|
+
name: string;
|
|
17
|
+
url: string;
|
|
18
|
+
subscribedActions?: string[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface UpdateWebhookRequest {
|
|
22
|
+
/** Display name */
|
|
23
|
+
name?: string;
|
|
24
|
+
url?: string;
|
|
25
|
+
subscribedActions?: string[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export class WebhooksService extends BaseService {
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* ListWebhooks
|
|
32
|
+
*/
|
|
33
|
+
async list(boardId: string): Promise<ListResult<Webhook>> {
|
|
34
|
+
return this.request(
|
|
35
|
+
{
|
|
36
|
+
service: "Webhooks",
|
|
37
|
+
operation: "ListWebhooks",
|
|
38
|
+
resourceType: "webhooks",
|
|
39
|
+
isMutation: false,
|
|
40
|
+
},
|
|
41
|
+
() => this.client.GET("/boards/{boardId}/webhooks.json" as never, {
|
|
42
|
+
params: { path: { boardId } },
|
|
43
|
+
} as never),
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* CreateWebhook
|
|
49
|
+
*/
|
|
50
|
+
async create(boardId: string, body: CreateWebhookRequest): Promise<Webhook> {
|
|
51
|
+
return this.request(
|
|
52
|
+
{
|
|
53
|
+
service: "Webhook",
|
|
54
|
+
operation: "CreateWebhook",
|
|
55
|
+
resourceType: "webhook",
|
|
56
|
+
isMutation: true,
|
|
57
|
+
},
|
|
58
|
+
() => this.client.POST("/boards/{boardId}/webhooks.json" as never, {
|
|
59
|
+
params: { path: { boardId } },
|
|
60
|
+
body: { name: body.name, url: body.url, subscribed_actions: body.subscribedActions } as never,
|
|
61
|
+
} as never),
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* DeleteWebhook
|
|
67
|
+
*/
|
|
68
|
+
async delete(boardId: string, webhookId: string): Promise<void> {
|
|
69
|
+
return this.request(
|
|
70
|
+
{
|
|
71
|
+
service: "Webhook",
|
|
72
|
+
operation: "DeleteWebhook",
|
|
73
|
+
resourceType: "webhook",
|
|
74
|
+
isMutation: true,
|
|
75
|
+
},
|
|
76
|
+
() => this.client.DELETE("/boards/{boardId}/webhooks/{webhookId}" as never, {
|
|
77
|
+
params: { path: { boardId, webhookId } },
|
|
78
|
+
} as never),
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* GetWebhook
|
|
84
|
+
*/
|
|
85
|
+
async get(boardId: string, webhookId: string): Promise<Webhook> {
|
|
86
|
+
return this.request(
|
|
87
|
+
{
|
|
88
|
+
service: "Webhook",
|
|
89
|
+
operation: "GetWebhook",
|
|
90
|
+
resourceType: "webhook",
|
|
91
|
+
isMutation: false,
|
|
92
|
+
},
|
|
93
|
+
() => this.client.GET("/boards/{boardId}/webhooks/{webhookId}" as never, {
|
|
94
|
+
params: { path: { boardId, webhookId } },
|
|
95
|
+
} as never),
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* UpdateWebhook
|
|
101
|
+
*/
|
|
102
|
+
async update(boardId: string, webhookId: string, body?: UpdateWebhookRequest): Promise<Webhook> {
|
|
103
|
+
return this.request(
|
|
104
|
+
{
|
|
105
|
+
service: "Webhook",
|
|
106
|
+
operation: "UpdateWebhook",
|
|
107
|
+
resourceType: "webhook",
|
|
108
|
+
isMutation: true,
|
|
109
|
+
},
|
|
110
|
+
() => this.client.PATCH("/boards/{boardId}/webhooks/{webhookId}" as never, {
|
|
111
|
+
params: { path: { boardId, webhookId } },
|
|
112
|
+
body: { name: body?.name, url: body?.url, subscribed_actions: body?.subscribedActions } as never,
|
|
113
|
+
} as never),
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* ActivateWebhook
|
|
119
|
+
*/
|
|
120
|
+
async activate(boardId: string, webhookId: string): Promise<void> {
|
|
121
|
+
return this.request(
|
|
122
|
+
{
|
|
123
|
+
service: "Webhook",
|
|
124
|
+
operation: "ActivateWebhook",
|
|
125
|
+
resourceType: "webhook",
|
|
126
|
+
isMutation: true,
|
|
127
|
+
},
|
|
128
|
+
() => this.client.POST("/boards/{boardId}/webhooks/{webhookId}/activation.json" as never, {
|
|
129
|
+
params: { path: { boardId, webhookId } },
|
|
130
|
+
} as never),
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gating hooks — extend standard hooks with a pre-flight gate that can
|
|
3
|
+
* reject operations before they execute (e.g., circuit breaker, rate limiter).
|
|
4
|
+
*/
|
|
5
|
+
import type { FizzyHooks, OperationInfo } from "../hooks.js";
|
|
6
|
+
/**
|
|
7
|
+
* Extended hooks interface that adds a gating check before operations.
|
|
8
|
+
*/
|
|
9
|
+
export interface GatingHooks extends FizzyHooks {
|
|
10
|
+
/**
|
|
11
|
+
* Called before an operation is attempted. Throw to reject the operation.
|
|
12
|
+
* Use this for circuit breakers, rate limiters, bulkheads, etc.
|
|
13
|
+
*/
|
|
14
|
+
onOperationGate?(info: OperationInfo): void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Creates gating hooks from a gate function and optional inner hooks.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const hooks = gatingHooks({
|
|
22
|
+
* gate: (info) => {
|
|
23
|
+
* if (circuitBreaker.isOpen(info.service)) {
|
|
24
|
+
* throw new FizzyError("network", "Circuit breaker is open");
|
|
25
|
+
* }
|
|
26
|
+
* },
|
|
27
|
+
* inner: consoleHooks(),
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function gatingHooks(options: {
|
|
32
|
+
gate: (info: OperationInfo) => void;
|
|
33
|
+
inner?: FizzyHooks;
|
|
34
|
+
}): GatingHooks;
|
|
35
|
+
//# sourceMappingURL=gating.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gating.d.ts","sourceRoot":"","sources":["../../src/hooks/gating.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAA+C,MAAM,aAAa,CAAC;AAG1G;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C;;;OAGG;IACH,eAAe,CAAC,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;CAC7C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE;IACnC,IAAI,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACpC,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB,GAAG,WAAW,CA4Bd"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gating hooks — extend standard hooks with a pre-flight gate that can
|
|
3
|
+
* reject operations before they execute (e.g., circuit breaker, rate limiter).
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Creates gating hooks from a gate function and optional inner hooks.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const hooks = gatingHooks({
|
|
11
|
+
* gate: (info) => {
|
|
12
|
+
* if (circuitBreaker.isOpen(info.service)) {
|
|
13
|
+
* throw new FizzyError("network", "Circuit breaker is open");
|
|
14
|
+
* }
|
|
15
|
+
* },
|
|
16
|
+
* inner: consoleHooks(),
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export function gatingHooks(options) {
|
|
21
|
+
const { gate, inner } = options;
|
|
22
|
+
return {
|
|
23
|
+
onOperationGate(info) {
|
|
24
|
+
gate(info);
|
|
25
|
+
},
|
|
26
|
+
onOperationStart(info) {
|
|
27
|
+
try {
|
|
28
|
+
inner?.onOperationStart?.(info);
|
|
29
|
+
}
|
|
30
|
+
catch { /* hooks must not interrupt */ }
|
|
31
|
+
},
|
|
32
|
+
onOperationEnd(info, result) {
|
|
33
|
+
try {
|
|
34
|
+
inner?.onOperationEnd?.(info, result);
|
|
35
|
+
}
|
|
36
|
+
catch { /* hooks must not interrupt */ }
|
|
37
|
+
},
|
|
38
|
+
onRequestStart(info) {
|
|
39
|
+
try {
|
|
40
|
+
inner?.onRequestStart?.(info);
|
|
41
|
+
}
|
|
42
|
+
catch { /* hooks must not interrupt */ }
|
|
43
|
+
},
|
|
44
|
+
onRequestEnd(info, result) {
|
|
45
|
+
try {
|
|
46
|
+
inner?.onRequestEnd?.(info, result);
|
|
47
|
+
}
|
|
48
|
+
catch { /* hooks must not interrupt */ }
|
|
49
|
+
},
|
|
50
|
+
onRetry(info, attempt, error, delayMs) {
|
|
51
|
+
try {
|
|
52
|
+
inner?.onRetry?.(info, attempt, error, delayMs);
|
|
53
|
+
}
|
|
54
|
+
catch { /* hooks must not interrupt */ }
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=gating.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gating.js","sourceRoot":"","sources":["../../src/hooks/gating.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgBH;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,WAAW,CAAC,OAG3B;IACC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAEhC,OAAO;QACL,eAAe,CAAC,IAAmB;YACjC,IAAI,CAAC,IAAI,CAAC,CAAC;QACb,CAAC;QAED,gBAAgB,CAAC,IAAmB;YAClC,IAAI,CAAC;gBAAC,KAAK,EAAE,gBAAgB,EAAE,CAAC,IAAI,CAAC,CAAC;YAAC,CAAC;YAAC,MAAM,CAAC,CAAC,8BAA8B,CAAC,CAAC;QACnF,CAAC;QAED,cAAc,CAAC,IAAmB,EAAE,MAAuB;YACzD,IAAI,CAAC;gBAAC,KAAK,EAAE,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAAC,CAAC;YAAC,MAAM,CAAC,CAAC,8BAA8B,CAAC,CAAC;QACzF,CAAC;QAED,cAAc,CAAC,IAAiB;YAC9B,IAAI,CAAC;gBAAC,KAAK,EAAE,cAAc,EAAE,CAAC,IAAI,CAAC,CAAC;YAAC,CAAC;YAAC,MAAM,CAAC,CAAC,8BAA8B,CAAC,CAAC;QACjF,CAAC;QAED,YAAY,CAAC,IAAiB,EAAE,MAAqB;YACnD,IAAI,CAAC;gBAAC,KAAK,EAAE,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAAC,CAAC;YAAC,MAAM,CAAC,CAAC,8BAA8B,CAAC,CAAC;QACvF,CAAC;QAED,OAAO,CAAC,IAAiB,EAAE,OAAe,EAAE,KAAY,EAAE,OAAe;YACvE,IAAI,CAAC;gBAAC,KAAK,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;YAAC,CAAC;YAAC,MAAM,CAAC,CAAC,8BAA8B,CAAC,CAAC;QACnG,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenTelemetry hooks for the Fizzy SDK.
|
|
3
|
+
*
|
|
4
|
+
* Provides distributed tracing and metrics for API operations.
|
|
5
|
+
* Requires @opentelemetry/api as an optional peer dependency.
|
|
6
|
+
*/
|
|
7
|
+
import type { FizzyHooks } from "../hooks.js";
|
|
8
|
+
interface OtelSpan {
|
|
9
|
+
setAttribute(key: string, value: string | number | boolean): this;
|
|
10
|
+
setStatus(status: {
|
|
11
|
+
code: number;
|
|
12
|
+
message?: string;
|
|
13
|
+
}): this;
|
|
14
|
+
recordException(exception: Error): this;
|
|
15
|
+
end(): void;
|
|
16
|
+
}
|
|
17
|
+
interface OtelTracer {
|
|
18
|
+
startSpan(name: string, options?: {
|
|
19
|
+
attributes?: Record<string, string | number | boolean>;
|
|
20
|
+
}): OtelSpan;
|
|
21
|
+
}
|
|
22
|
+
interface OtelMeter {
|
|
23
|
+
createHistogram(name: string, options?: {
|
|
24
|
+
description?: string;
|
|
25
|
+
unit?: string;
|
|
26
|
+
}): OtelHistogram;
|
|
27
|
+
createCounter(name: string, options?: {
|
|
28
|
+
description?: string;
|
|
29
|
+
}): OtelCounter;
|
|
30
|
+
}
|
|
31
|
+
interface OtelHistogram {
|
|
32
|
+
record(value: number, attributes?: Record<string, string | number | boolean>): void;
|
|
33
|
+
}
|
|
34
|
+
interface OtelCounter {
|
|
35
|
+
add(value: number, attributes?: Record<string, string | number | boolean>): void;
|
|
36
|
+
}
|
|
37
|
+
export interface OtelHooksOptions {
|
|
38
|
+
tracer?: OtelTracer;
|
|
39
|
+
meter?: OtelMeter;
|
|
40
|
+
recordRequestSpans?: boolean;
|
|
41
|
+
spanPrefix?: string;
|
|
42
|
+
metricPrefix?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Creates OpenTelemetry hooks for distributed tracing and metrics.
|
|
46
|
+
*/
|
|
47
|
+
export declare function otelHooks(options?: OtelHooksOptions): FizzyHooks;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=otel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otel.d.ts","sourceRoot":"","sources":["../../src/hooks/otel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAA8D,MAAM,aAAa,CAAC;AAE1G,UAAU,QAAQ;IAChB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;IAClE,SAAS,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC5D,eAAe,CAAC,SAAS,EAAE,KAAK,GAAG,IAAI,CAAC;IACxC,G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
|
|
3
|
+
*
|
|
4
|
+
* Provides distributed tracing and metrics for API operations.
|
|
5
|
+
* Requires @opentelemetry/api as an optional peer dependency.
|
|
6
|
+
*/
|
|
7
|
+
const SpanStatusCode = {
|
|
8
|
+
UNSET: 0,
|
|
9
|
+
OK: 1,
|
|
10
|
+
ERROR: 2,
|
|
11
|
+
};
|
|
12
|
+
let keyCounter = 0;
|
|
13
|
+
function requestPrefix(info) {
|
|
14
|
+
return `${info.method}:${info.url}:${info.attempt}`;
|
|
15
|
+
}
|
|
16
|
+
function requestKey() {
|
|
17
|
+
return String(++keyCounter);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Creates OpenTelemetry hooks for distributed tracing and metrics.
|
|
21
|
+
*/
|
|
22
|
+
export function otelHooks(options = {}) {
|
|
23
|
+
const { tracer, meter, recordRequestSpans = false, spanPrefix = "fizzy", metricPrefix = "fizzy", } = options;
|
|
24
|
+
const state = {
|
|
25
|
+
operationSpans: new WeakMap(),
|
|
26
|
+
requestSpans: new Map(),
|
|
27
|
+
requestKeyStack: new Map(),
|
|
28
|
+
};
|
|
29
|
+
if (meter) {
|
|
30
|
+
state.operationDuration = meter.createHistogram(`${metricPrefix}.operation.duration`, {
|
|
31
|
+
description: "Duration of Fizzy SDK operations",
|
|
32
|
+
unit: "ms",
|
|
33
|
+
});
|
|
34
|
+
state.requestDuration = meter.createHistogram(`${metricPrefix}.request.duration`, {
|
|
35
|
+
description: "Duration of HTTP requests",
|
|
36
|
+
unit: "ms",
|
|
37
|
+
});
|
|
38
|
+
state.operationCounter = meter.createCounter(`${metricPrefix}.operations.total`, {
|
|
39
|
+
description: "Total number of Fizzy SDK operations",
|
|
40
|
+
});
|
|
41
|
+
state.errorCounter = meter.createCounter(`${metricPrefix}.errors.total`, {
|
|
42
|
+
description: "Total number of errors",
|
|
43
|
+
});
|
|
44
|
+
state.retryCounter = meter.createCounter(`${metricPrefix}.retries.total`, {
|
|
45
|
+
description: "Total number of retry attempts",
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
onOperationStart(info) {
|
|
50
|
+
state.operationCounter?.add(1, {
|
|
51
|
+
service: info.service,
|
|
52
|
+
operation: info.operation,
|
|
53
|
+
is_mutation: info.isMutation,
|
|
54
|
+
});
|
|
55
|
+
if (!tracer)
|
|
56
|
+
return;
|
|
57
|
+
const spanName = `${spanPrefix}.${info.service}.${info.operation}`;
|
|
58
|
+
const attributes = {
|
|
59
|
+
[`${spanPrefix}.service`]: info.service,
|
|
60
|
+
[`${spanPrefix}.operation`]: info.operation,
|
|
61
|
+
[`${spanPrefix}.resource_type`]: info.resourceType,
|
|
62
|
+
[`${spanPrefix}.is_mutation`]: info.isMutation,
|
|
63
|
+
};
|
|
64
|
+
if (info.boardId) {
|
|
65
|
+
attributes[`${spanPrefix}.board_id`] = info.boardId;
|
|
66
|
+
}
|
|
67
|
+
if (info.resourceId) {
|
|
68
|
+
attributes[`${spanPrefix}.resource_id`] = info.resourceId;
|
|
69
|
+
}
|
|
70
|
+
const span = tracer.startSpan(spanName, { attributes });
|
|
71
|
+
state.operationSpans.set(info, span);
|
|
72
|
+
},
|
|
73
|
+
onOperationEnd(info, result) {
|
|
74
|
+
if (tracer) {
|
|
75
|
+
const span = state.operationSpans.get(info);
|
|
76
|
+
if (span) {
|
|
77
|
+
if (result.error) {
|
|
78
|
+
span.setStatus({ code: SpanStatusCode.ERROR, message: result.error.message });
|
|
79
|
+
span.recordException(result.error);
|
|
80
|
+
span.setAttribute("error", true);
|
|
81
|
+
span.setAttribute("error.message", result.error.message);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
span.setStatus({ code: SpanStatusCode.OK });
|
|
85
|
+
}
|
|
86
|
+
span.setAttribute("duration_ms", result.durationMs);
|
|
87
|
+
span.end();
|
|
88
|
+
state.operationSpans.delete(info);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const labels = {
|
|
92
|
+
service: info.service,
|
|
93
|
+
operation: info.operation,
|
|
94
|
+
is_mutation: info.isMutation,
|
|
95
|
+
success: !result.error,
|
|
96
|
+
};
|
|
97
|
+
state.operationDuration?.record(result.durationMs, labels);
|
|
98
|
+
if (result.error) {
|
|
99
|
+
state.errorCounter?.add(1, {
|
|
100
|
+
service: info.service,
|
|
101
|
+
operation: info.operation,
|
|
102
|
+
error_type: result.error.name,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
onRequestStart(info) {
|
|
107
|
+
if (!tracer || !recordRequestSpans)
|
|
108
|
+
return;
|
|
109
|
+
const spanName = `${spanPrefix}.http.${info.method}`;
|
|
110
|
+
const span = tracer.startSpan(spanName, {
|
|
111
|
+
attributes: {
|
|
112
|
+
"http.method": info.method,
|
|
113
|
+
"http.url": info.url,
|
|
114
|
+
"http.attempt": info.attempt,
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
const key = requestKey();
|
|
118
|
+
state.requestSpans.set(key, span);
|
|
119
|
+
const prefix = requestPrefix(info);
|
|
120
|
+
let stack = state.requestKeyStack.get(prefix);
|
|
121
|
+
if (!stack) {
|
|
122
|
+
stack = [];
|
|
123
|
+
state.requestKeyStack.set(prefix, stack);
|
|
124
|
+
}
|
|
125
|
+
stack.push(key);
|
|
126
|
+
},
|
|
127
|
+
onRequestEnd(info, result) {
|
|
128
|
+
if (tracer && recordRequestSpans) {
|
|
129
|
+
const prefix = requestPrefix(info);
|
|
130
|
+
const stack = state.requestKeyStack.get(prefix);
|
|
131
|
+
const key = stack?.pop();
|
|
132
|
+
if (key) {
|
|
133
|
+
if (stack.length === 0) {
|
|
134
|
+
state.requestKeyStack.delete(prefix);
|
|
135
|
+
}
|
|
136
|
+
const span = state.requestSpans.get(key);
|
|
137
|
+
if (span) {
|
|
138
|
+
span.setAttribute("http.status_code", result.statusCode);
|
|
139
|
+
span.setAttribute("http.from_cache", result.fromCache);
|
|
140
|
+
span.setAttribute("duration_ms", result.durationMs);
|
|
141
|
+
if (result.error) {
|
|
142
|
+
span.setStatus({ code: SpanStatusCode.ERROR, message: result.error.message });
|
|
143
|
+
span.recordException(result.error);
|
|
144
|
+
}
|
|
145
|
+
else if (result.statusCode >= 400) {
|
|
146
|
+
span.setStatus({ code: SpanStatusCode.ERROR, message: `HTTP ${result.statusCode}` });
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
span.setStatus({ code: SpanStatusCode.OK });
|
|
150
|
+
}
|
|
151
|
+
span.end();
|
|
152
|
+
state.requestSpans.delete(key);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
state.requestDuration?.record(result.durationMs, {
|
|
157
|
+
method: info.method,
|
|
158
|
+
status_code: result.statusCode,
|
|
159
|
+
from_cache: result.fromCache,
|
|
160
|
+
});
|
|
161
|
+
},
|
|
162
|
+
onRetry(info, attempt, error, _delayMs) {
|
|
163
|
+
state.retryCounter?.add(1, {
|
|
164
|
+
method: info.method,
|
|
165
|
+
attempt,
|
|
166
|
+
error_type: error.name,
|
|
167
|
+
});
|
|
168
|
+
},
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=otel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otel.js","sourceRoot":"","sources":["../../src/hooks/otel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA4BH,MAAM,cAAc,GAAG;IACrB,KAAK,EAAE,CAAC;IACR,EAAE,EAAE,CAAC;IACL,KAAK,EAAE,CAAC;CACA,CAAC;AAqBX,IAAI,UAAU,GAAG,CAAC,CAAC;AAEnB,SAAS,aAAa,CAAC,IAAiB;IACtC,OAAO,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;AACtD,CAAC;AAED,SAAS,UAAU;IACjB,OAAO,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC;AAC9B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,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AM,EAAE,IAAI,CAAC,MAAM;gBACnB,OAAO;gBACP,UAAU,EAAE,KAAK,CAAC,IAAI;aACvB,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/hooks.d.ts
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Observability hooks system for the Fizzy SDK.
|
|
3
|
+
*
|
|
4
|
+
* Provides a way to observe API operations and HTTP requests
|
|
5
|
+
* without modifying the core client logic.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Information about a high-level service operation.
|
|
9
|
+
*/
|
|
10
|
+
export interface OperationInfo {
|
|
11
|
+
/** Service name (e.g., "Cards", "Boards") */
|
|
12
|
+
service: string;
|
|
13
|
+
/** Operation name (e.g., "List", "Get", "Create") */
|
|
14
|
+
operation: string;
|
|
15
|
+
/** Type of resource being accessed */
|
|
16
|
+
resourceType: string;
|
|
17
|
+
/** Whether this operation modifies data */
|
|
18
|
+
isMutation: boolean;
|
|
19
|
+
/** Board ID if the operation is scoped to a board */
|
|
20
|
+
boardId?: number;
|
|
21
|
+
/** Resource ID if the operation targets a specific resource */
|
|
22
|
+
resourceId?: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Information about an HTTP request.
|
|
26
|
+
*/
|
|
27
|
+
export interface RequestInfo {
|
|
28
|
+
/** HTTP method */
|
|
29
|
+
method: string;
|
|
30
|
+
/** Full request URL */
|
|
31
|
+
url: string;
|
|
32
|
+
/** Current attempt number (1-based) */
|
|
33
|
+
attempt: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Result of an HTTP request.
|
|
37
|
+
*/
|
|
38
|
+
export interface RequestResult {
|
|
39
|
+
/** HTTP status code */
|
|
40
|
+
statusCode: number;
|
|
41
|
+
/** Request duration in milliseconds */
|
|
42
|
+
durationMs: number;
|
|
43
|
+
/** Whether the response was served from cache */
|
|
44
|
+
fromCache: boolean;
|
|
45
|
+
/** Error if the request failed */
|
|
46
|
+
error?: Error;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Result of an operation.
|
|
50
|
+
*/
|
|
51
|
+
export interface OperationResult {
|
|
52
|
+
/** Error if the operation failed */
|
|
53
|
+
error?: Error;
|
|
54
|
+
/** Operation duration in milliseconds */
|
|
55
|
+
durationMs: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Hooks interface for observing SDK operations.
|
|
59
|
+
* All hooks are optional — implement only what you need.
|
|
60
|
+
*/
|
|
61
|
+
export interface FizzyHooks {
|
|
62
|
+
/** Called when a service operation starts. */
|
|
63
|
+
onOperationStart?(info: OperationInfo): void;
|
|
64
|
+
/** Called when a service operation completes (success or failure). */
|
|
65
|
+
onOperationEnd?(info: OperationInfo, result: OperationResult): void;
|
|
66
|
+
/** Called when an HTTP request starts (including retries). */
|
|
67
|
+
onRequestStart?(info: RequestInfo): void;
|
|
68
|
+
/** Called when an HTTP request completes (including retries). */
|
|
69
|
+
onRequestEnd?(info: RequestInfo, result: RequestResult): void;
|
|
70
|
+
/** Called before a retry attempt. */
|
|
71
|
+
onRetry?(info: RequestInfo, attempt: number, error: Error, delayMs: number): void;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Combines multiple hooks into a single hooks object.
|
|
75
|
+
*/
|
|
76
|
+
export declare function chainHooks(...hooks: FizzyHooks[]): FizzyHooks;
|
|
77
|
+
/**
|
|
78
|
+
* Options for console logging hooks.
|
|
79
|
+
*/
|
|
80
|
+
export interface ConsoleHooksOptions {
|
|
81
|
+
logOperations?: boolean;
|
|
82
|
+
logRequests?: boolean;
|
|
83
|
+
logRetries?: boolean;
|
|
84
|
+
minDurationMs?: number;
|
|
85
|
+
logger?: Pick<Console, "log" | "warn" | "error">;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Creates hooks that log to the console.
|
|
89
|
+
*/
|
|
90
|
+
export declare function consoleHooks(options?: ConsoleHooksOptions): FizzyHooks;
|
|
91
|
+
/**
|
|
92
|
+
* Creates a no-op hooks object.
|
|
93
|
+
*/
|
|
94
|
+
export declare function noopHooks(): FizzyHooks;
|
|
95
|
+
/**
|
|
96
|
+
* Internal helper to safely invoke a hook.
|
|
97
|
+
*/
|
|
98
|
+
export declare function safeInvoke<K extends keyof FizzyHooks>(hooks: FizzyHooks | undefined, hookName: K, ...args: Parameters<NonNullable<FizzyHooks[K]>>): void;
|
|
99
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,UAAU,EAAE,OAAO,CAAC;IACpB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,uBAAuB;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,SAAS,EAAE,OAAO,CAAC;IACnB,kCAAkC;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,oCAAoC;IACpC,KAAK,CAAC,EAAE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