@frogbotai/piece-pagerduty 0.31.0 → 0.32.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/README.md +8 -8
- package/dist/actions.d.ts +20 -21
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +8 -30
- package/dist/actions.js.map +1 -1
- package/dist/client.d.ts +3 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +11 -3
- package/dist/client.js.map +1 -1
- package/dist/define.d.ts +57 -11
- package/dist/define.d.ts.map +1 -1
- package/dist/define.js +1 -1
- package/dist/define.js.map +1 -1
- package/dist/index.d.ts +56 -33
- package/dist/index.d.ts.map +1 -1
- package/dist/triggers.d.ts +36 -12
- package/dist/triggers.d.ts.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -21,14 +21,14 @@ not claim to create or delete the PagerDuty subscription.
|
|
|
21
21
|
|
|
22
22
|
## Actions
|
|
23
23
|
|
|
24
|
-
| Upstream action slug | Previous wrapper export | Native action | Notes
|
|
25
|
-
| ---------------------- | ----------------------- | --------------------- |
|
|
26
|
-
| `create_incident` | `createIncident` | `createIncident` |
|
|
27
|
-
| `list_incidents` | `listIncidents` | `listIncidents` |
|
|
28
|
-
| `get_incident` | `getIncident` | `getIncident` |
|
|
29
|
-
| `acknowledge_incident` | `acknowledgeIncident` | `acknowledgeIncident` |
|
|
30
|
-
| `resolve_incident` | `resolveIncident` | `resolveIncident` |
|
|
31
|
-
| `custom_api_call` | `customApiCall` | `customApiCall` |
|
|
24
|
+
| Upstream action slug | Previous wrapper export | Native action | Notes |
|
|
25
|
+
| ---------------------- | ----------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
26
|
+
| `create_incident` | `createIncident` | `createIncident` | |
|
|
27
|
+
| `list_incidents` | `listIncidents` | `listIncidents` | |
|
|
28
|
+
| `get_incident` | `getIncident` | `getIncident` | |
|
|
29
|
+
| `acknowledge_incident` | `acknowledgeIncident` | `acknowledgeIncident` | |
|
|
30
|
+
| `resolve_incident` | `resolveIncident` | `resolveIncident` | |
|
|
31
|
+
| `custom_api_call` | `customApiCall` | `customApiCall` | Paths are relative to `https://api.pagerduty.com`; caller headers (such as `From`) cannot replace `Authorization`. |
|
|
32
32
|
|
|
33
33
|
## Triggers
|
|
34
34
|
|
package/dist/actions.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare const createIncident: import("frogbot/pieces").PieceActionDefinit
|
|
|
19
19
|
}, z.core.$loose>, {
|
|
20
20
|
signingSecret?: string | undefined;
|
|
21
21
|
}, {
|
|
22
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
22
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
23
23
|
method: string;
|
|
24
24
|
path: string;
|
|
25
25
|
query?: {
|
|
@@ -27,7 +27,9 @@ export declare const createIncident: import("frogbot/pieces").PieceActionDefinit
|
|
|
27
27
|
};
|
|
28
28
|
body?: unknown;
|
|
29
29
|
fromEmail?: string;
|
|
30
|
+
redirect?: RequestRedirect;
|
|
30
31
|
}) => Promise<unknown>;
|
|
32
|
+
authorize: (headers: Headers) => void;
|
|
31
33
|
}, {
|
|
32
34
|
[x: string]: unknown;
|
|
33
35
|
id: string;
|
|
@@ -60,7 +62,7 @@ export declare const listIncidents: import("frogbot/pieces").PieceActionDefiniti
|
|
|
60
62
|
}, z.core.$loose>, {
|
|
61
63
|
signingSecret?: string | undefined;
|
|
62
64
|
}, {
|
|
63
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
65
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
64
66
|
method: string;
|
|
65
67
|
path: string;
|
|
66
68
|
query?: {
|
|
@@ -68,7 +70,9 @@ export declare const listIncidents: import("frogbot/pieces").PieceActionDefiniti
|
|
|
68
70
|
};
|
|
69
71
|
body?: unknown;
|
|
70
72
|
fromEmail?: string;
|
|
73
|
+
redirect?: RequestRedirect;
|
|
71
74
|
}) => Promise<unknown>;
|
|
75
|
+
authorize: (headers: Headers) => void;
|
|
72
76
|
}, {
|
|
73
77
|
[x: string]: unknown;
|
|
74
78
|
incidents: {
|
|
@@ -90,7 +94,7 @@ export declare const getIncident: import("frogbot/pieces").PieceActionDefinition
|
|
|
90
94
|
}, z.core.$loose>, {
|
|
91
95
|
signingSecret?: string | undefined;
|
|
92
96
|
}, {
|
|
93
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
97
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
94
98
|
method: string;
|
|
95
99
|
path: string;
|
|
96
100
|
query?: {
|
|
@@ -98,7 +102,9 @@ export declare const getIncident: import("frogbot/pieces").PieceActionDefinition
|
|
|
98
102
|
};
|
|
99
103
|
body?: unknown;
|
|
100
104
|
fromEmail?: string;
|
|
105
|
+
redirect?: RequestRedirect;
|
|
101
106
|
}) => Promise<unknown>;
|
|
107
|
+
authorize: (headers: Headers) => void;
|
|
102
108
|
}, {
|
|
103
109
|
[x: string]: unknown;
|
|
104
110
|
id: string;
|
|
@@ -116,7 +122,7 @@ export declare const acknowledgeIncident: import("frogbot/pieces").PieceActionDe
|
|
|
116
122
|
}, z.core.$loose>, {
|
|
117
123
|
signingSecret?: string | undefined;
|
|
118
124
|
}, {
|
|
119
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
125
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
120
126
|
method: string;
|
|
121
127
|
path: string;
|
|
122
128
|
query?: {
|
|
@@ -124,7 +130,9 @@ export declare const acknowledgeIncident: import("frogbot/pieces").PieceActionDe
|
|
|
124
130
|
};
|
|
125
131
|
body?: unknown;
|
|
126
132
|
fromEmail?: string;
|
|
133
|
+
redirect?: RequestRedirect;
|
|
127
134
|
}) => Promise<unknown>;
|
|
135
|
+
authorize: (headers: Headers) => void;
|
|
128
136
|
}, {
|
|
129
137
|
[x: string]: unknown;
|
|
130
138
|
id: string;
|
|
@@ -142,7 +150,7 @@ export declare const resolveIncident: import("frogbot/pieces").PieceActionDefini
|
|
|
142
150
|
}, z.core.$loose>, {
|
|
143
151
|
signingSecret?: string | undefined;
|
|
144
152
|
}, {
|
|
145
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
153
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
146
154
|
method: string;
|
|
147
155
|
path: string;
|
|
148
156
|
query?: {
|
|
@@ -150,7 +158,9 @@ export declare const resolveIncident: import("frogbot/pieces").PieceActionDefini
|
|
|
150
158
|
};
|
|
151
159
|
body?: unknown;
|
|
152
160
|
fromEmail?: string;
|
|
161
|
+
redirect?: RequestRedirect;
|
|
153
162
|
}) => Promise<unknown>;
|
|
163
|
+
authorize: (headers: Headers) => void;
|
|
154
164
|
}, {
|
|
155
165
|
[x: string]: unknown;
|
|
156
166
|
id: string;
|
|
@@ -158,21 +168,10 @@ export declare const resolveIncident: import("frogbot/pieces").PieceActionDefini
|
|
|
158
168
|
}> & {
|
|
159
169
|
slug: "resolveIncident";
|
|
160
170
|
};
|
|
161
|
-
export declare const customApiCall: import("frogbot/pieces").
|
|
162
|
-
method: z.ZodEnum<{
|
|
163
|
-
GET: "GET";
|
|
164
|
-
POST: "POST";
|
|
165
|
-
PATCH: "PATCH";
|
|
166
|
-
PUT: "PUT";
|
|
167
|
-
DELETE: "DELETE";
|
|
168
|
-
}>;
|
|
169
|
-
path: z.ZodString;
|
|
170
|
-
queryParams: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
171
|
-
body: z.ZodOptional<z.ZodJSONSchema>;
|
|
172
|
-
}, z.core.$strip>, z.ZodJSONSchema, {
|
|
171
|
+
export declare const customApiCall: import("frogbot/pieces").CustomApiCallAction<{
|
|
173
172
|
signingSecret?: string | undefined;
|
|
174
173
|
}, {
|
|
175
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
174
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
176
175
|
method: string;
|
|
177
176
|
path: string;
|
|
178
177
|
query?: {
|
|
@@ -180,8 +179,8 @@ export declare const customApiCall: import("frogbot/pieces").PieceActionDefiniti
|
|
|
180
179
|
};
|
|
181
180
|
body?: unknown;
|
|
182
181
|
fromEmail?: string;
|
|
182
|
+
redirect?: RequestRedirect;
|
|
183
183
|
}) => Promise<unknown>;
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
};
|
|
184
|
+
authorize: (headers: Headers) => void;
|
|
185
|
+
}>;
|
|
187
186
|
//# sourceMappingURL=actions.d.ts.map
|
package/dist/actions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA4BxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA4BxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;aAfF,CAAC;;;YAAkB,CAAA;iBAE5C,CADA;gBACqB,CAAC;;;;;;;;;CA6EpB,CAAC;AAoBH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAnGD,CAAC;;;YAAkB,CAAA;iBAE5C,CADA;gBACqB,CAAC;;;;;;;;;;;;;;;CAuHpB,CAAC;AA0CH,eAAO,MAAM,WAAW;;;;;;;;;;;aAnKC,CAAC;;;YAAkB,CAAA;iBAE5C,CADA;gBACqB,CAAC;;;;;;;;;CAiLpB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;aArLP,CAAC;;;YAAkB,CAAA;iBAE5C,CADA;gBACqB,CAAC;;;;;;;;;CAmLkE,CAAC;AACzF,eAAO,MAAM,eAAe;;;;;;;;;;;;;aAtLH,CAAC;;;YAAkB,CAAA;iBAE5C,CADA;gBACqB,CAAC;;;;;;;;;CAoLsD,CAAC;AAE7E,eAAO,MAAM,aAAa;;;;;;aAxLD,CAAC;;;YAAkB,CAAA;iBAE5C,CADA;gBACqB,CAAC;;;EA4LpB,CAAC"}
|
package/dist/actions.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { defineAction } from './define.js';
|
|
2
|
+
import { defineAction, defineCustomApiCall } from './define.js';
|
|
3
3
|
const incident = z.object({
|
|
4
4
|
id: z.string(),
|
|
5
5
|
status: z.string().optional()
|
|
@@ -217,36 +217,14 @@ export const getIncident = defineAction({
|
|
|
217
217
|
});
|
|
218
218
|
export const acknowledgeIncident = updateIncident('acknowledgeIncident', 'acknowledged');
|
|
219
219
|
export const resolveIncident = updateIncident('resolveIncident', 'resolved');
|
|
220
|
-
const
|
|
221
|
-
|
|
222
|
-
'GET',
|
|
223
|
-
'POST',
|
|
224
|
-
'PATCH',
|
|
225
|
-
'PUT',
|
|
226
|
-
'DELETE'
|
|
227
|
-
]),
|
|
228
|
-
path: z.string().startsWith('/'),
|
|
229
|
-
queryParams: z.record(z.string(), z.union([
|
|
230
|
-
z.string(),
|
|
231
|
-
z.array(z.string())
|
|
232
|
-
])).default({}),
|
|
233
|
-
body: z.json().optional()
|
|
234
|
-
});
|
|
235
|
-
const customApiCallOutput = z.json();
|
|
236
|
-
export const customApiCall = defineAction({
|
|
237
|
-
slug: 'customApiCall',
|
|
220
|
+
export const customApiCall = defineCustomApiCall({
|
|
221
|
+
name: 'PagerDuty',
|
|
238
222
|
description: 'Make a custom PagerDuty REST API v2 call.',
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
path: input.path,
|
|
245
|
-
query: input.queryParams,
|
|
246
|
-
body: input.body
|
|
247
|
-
});
|
|
248
|
-
return customApiCallOutput.parse(response);
|
|
249
|
-
}
|
|
223
|
+
baseUrl: 'https://api.pagerduty.com',
|
|
224
|
+
headers: {
|
|
225
|
+
Accept: 'application/vnd.pagerduty+json;version=2'
|
|
226
|
+
},
|
|
227
|
+
authorize: ({ client, headers })=>client.authorize(headers)
|
|
250
228
|
});
|
|
251
229
|
|
|
252
230
|
//# sourceMappingURL=actions.js.map
|
package/dist/actions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/actions.ts"],"names":["z","defineAction","incident","object","id","string","status","optional","passthrough","incidentOutput","incidentResponse","servicesResponse","services","array","name","more","boolean","fromEmail","email","meta","label","incidentId","min","createIncidentInput","serviceId","title","urgency","enum","default","details","incidentKey","assigneeIds","priorityId","conferenceNumber","conferenceUrl","url","createIncident","slug","description","input","output","idempotent","options","client","offset","response","parse","request","method","path","query","limit","String","push","map","value","run","payload","type","service","body","incident_key","length","assignments","assignee","priority","conference_bridge","conference_number","conference_url","listIncidentsInput","statuses","since","until","number","int","listIncidentsOutput","incidents","listIncidents","undefined","Math","max","updateIncident","resolution","values","encodeURIComponent","getIncidentInput","getIncident","acknowledgeIncident","resolveIncident","
|
|
1
|
+
{"version":3,"sources":["../src/actions.ts"],"names":["z","defineAction","defineCustomApiCall","incident","object","id","string","status","optional","passthrough","incidentOutput","incidentResponse","servicesResponse","services","array","name","more","boolean","fromEmail","email","meta","label","incidentId","min","createIncidentInput","serviceId","title","urgency","enum","default","details","incidentKey","assigneeIds","priorityId","conferenceNumber","conferenceUrl","url","createIncident","slug","description","input","output","idempotent","options","client","offset","response","parse","request","method","path","query","limit","String","push","map","value","run","payload","type","service","body","incident_key","length","assignments","assignee","priority","conference_bridge","conference_number","conference_url","listIncidentsInput","statuses","since","until","number","int","listIncidentsOutput","incidents","listIncidents","undefined","Math","max","updateIncident","resolution","values","encodeURIComponent","getIncidentInput","getIncident","acknowledgeIncident","resolveIncident","customApiCall","baseUrl","headers","Accept","authorize"],"mappings":"AAAA,SAASA,C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,EAAEmC,mBAAmBD,OAAO9D,UAAU,GAAG;gBAC3DJ,WAAWkE,OAAOlE,SAAS;gBAC3B2C,MAAM;oBACJ1D,UAAU;wBACRwD,MAAM;wBACNpD;wBACA,GAAI4E,aAAa;4BAAEtB,MAAM;gCAAEF,MAAM;gCAAiB7B,SAASqD;4BAAW;wBAAE,IAAI,CAAC,CAAC;oBAChF;gBACF;YACF;YAGF,OAAOrC,SAAS3C,QAAQ;QAC1B;IACF;AACF;AAEA,MAAMmF,mBAAmBtF,EAAEI,MAAM,CAAC;IAAEkB;AAAW;AAE/C,OAAO,MAAMiE,cAActF,aAAa;IACtCqC,MAAM;IACNC,aAAa;IACbC,OAAO8C;IACP7C,QAAQ/B;IACRgC,YAAY;IACZ,MAAMe,KAAI,EAAEjB,KAAK,EAAEI,MAAM,EAAE;QACzB,MAAME,WAAWnC,iBAAiBoC,KAAK,CACrC,MAAMH,OAAOI,OAAO,CAAC;YACnBC,QAAQ;YACRC,MAAM,CAAC,WAAW,EAAEmC,mBAAmB7C,MAAMlB,UAAU,GAAG;QAC5D;QAGF,OAAOwB,SAAS3C,QAAQ;IAC1B;AACF,GAAG;AAEH,OAAO,MAAMqF,sBAAsBN,eAAe,uBAAuB,gBAAgB;AACzF,OAAO,MAAMO,kBAAkBP,eAAe,mBAAmB,YAAY;AAE7E,OAAO,MAAMQ,gBAAgBxF,oBAAoB;IAC/Ca,MAAM;IACNwB,aAAa;IACboD,SAAS;IACTC,SAAS;QAAEC,QAAQ;IAA2C;IAC9DC,WAAW,CAAC,EAAElD,MAAM,EAAEgD,OAAO,EAAE,GAAKhD,OAAOkD,SAAS,CAACF;AACvD,GAAG","file":"actions.js"}
|
package/dist/client.d.ts
CHANGED
|
@@ -3,13 +3,15 @@ export type PagerdutyClient = ReturnType<typeof createPagerdutyClient>;
|
|
|
3
3
|
export declare function createPagerdutyClient({ auth }: {
|
|
4
4
|
auth: unknown;
|
|
5
5
|
}): {
|
|
6
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
6
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
7
7
|
method: string;
|
|
8
8
|
path: string;
|
|
9
9
|
query?: Query;
|
|
10
10
|
body?: unknown;
|
|
11
11
|
fromEmail?: string;
|
|
12
|
+
redirect?: RequestRedirect;
|
|
12
13
|
}) => Promise<unknown>;
|
|
14
|
+
authorize: (headers: Headers) => void;
|
|
13
15
|
};
|
|
14
16
|
export {};
|
|
15
17
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAIA,KAAK,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;AAE3D,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEvE,wBAAgB,qBAAqB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAIA,KAAK,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;AAE3D,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEvE,wBAAgB,qBAAqB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE;mEAU5D;QACD,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,KAAK,CAAC;QACd,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,eAAe,CAAC;KAC5B;yBA6C2B,OAAO;EAKpC"}
|
package/dist/client.js
CHANGED
|
@@ -2,7 +2,7 @@ import { pagerdutyAuth } from './config.js';
|
|
|
2
2
|
const baseUrl = 'https://api.pagerduty.com';
|
|
3
3
|
export function createPagerdutyClient({ auth }) {
|
|
4
4
|
const { apiKey } = pagerdutyAuth.parse(auth);
|
|
5
|
-
async function request({ method, path, query, body, fromEmail }) {
|
|
5
|
+
async function request({ method, path, query, body, fromEmail, redirect }) {
|
|
6
6
|
const url = new URL(path, baseUrl);
|
|
7
7
|
if (url.origin !== baseUrl || !path.startsWith('/') || path.startsWith('//')) {
|
|
8
8
|
throw new Error('Path must target the PagerDuty API.');
|
|
@@ -25,8 +25,12 @@ export function createPagerdutyClient({ auth }) {
|
|
|
25
25
|
From: fromEmail
|
|
26
26
|
} : {}
|
|
27
27
|
},
|
|
28
|
-
body: body === undefined ? undefined : JSON.stringify(body)
|
|
28
|
+
body: body === undefined ? undefined : JSON.stringify(body),
|
|
29
|
+
redirect
|
|
29
30
|
});
|
|
31
|
+
if (redirect === 'manual' && response.status >= 300 && response.status < 400) {
|
|
32
|
+
throw new Error(`PagerDuty API redirected (${response.status}) to ${response.headers.get('location')}.`);
|
|
33
|
+
}
|
|
30
34
|
const text = await response.text();
|
|
31
35
|
const data = text ? JSON.parse(text) : undefined;
|
|
32
36
|
if (!response.ok) {
|
|
@@ -34,8 +38,12 @@ export function createPagerdutyClient({ auth }) {
|
|
|
34
38
|
}
|
|
35
39
|
return data;
|
|
36
40
|
}
|
|
41
|
+
function authorize(headers) {
|
|
42
|
+
headers.set('authorization', `Token token=${apiKey}`);
|
|
43
|
+
}
|
|
37
44
|
return {
|
|
38
|
-
request
|
|
45
|
+
request,
|
|
46
|
+
authorize
|
|
39
47
|
};
|
|
40
48
|
}
|
|
41
49
|
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/client.ts"],"names":["pagerdutyAuth","baseUrl","createPagerdutyClient","auth","apiKey","parse","request","method","path","query","body","fromEmail","url","URL","origin","startsWith","Error","Object","entries","forEach","key","value","undefined","item","Array","isArray","searchParams","append","response","fetch","headers","Authorization","Accept","From","JSON","stringify","text","data","ok","
|
|
1
|
+
{"version":3,"sources":["../src/client.ts"],"names":["pagerdutyAuth","baseUrl","createPagerdutyClient","auth","apiKey","parse","request","method","path","query","body","fromEmail","redirect","url","URL","origin","startsWith","Error","Object","entries","forEach","key","value","undefined","item","Array","isArray","searchParams","append","response","fetch","headers","Authorization","Accept","From","JSON","stringify","status","get","text","data","ok","statusText","authorize","set"],"mappings":"AAAA,SAASA,aAAa,QAAQ,cAAc;AAE5C,MAAMC,UAAU;AAMhB,OAAO,SAASC,sBAAsB,EAAEC,IAAI,EAAqB;IAC/D,MAAM,EAAEC,MAAM,EAAE,GAAGJ,cAAcK,KAAK,CAACF;IAEvC,eAAeG,QAAQ,EACrBC,MAAM,EACNC,IAAI,EACJC,KAAK,EACLC,IAAI,EACJC,SAAS,EACTC,QAAQ,EAQT;QACC,MAAMC,MAAM,IAAIC,IAAIN,MAAMP;QAE1B,IAAIY,IAAIE,MAAM,KAAKd,WAAW,CAACO,KAAKQ,UAAU,CAAC,QAAQR,KAAKQ,UAAU,CAAC,OAAO;YAC5E,MAAM,IAAIC,MAAM;QAClB;QAEAC,OAAOC,OAAO,CAACV,SAAS,CAAC,GAAGW,OAAO,CAAC,CAAC,CAACC,KAAKC,MAAM;YAC/C,IAAIA,UAAUC,aAAaD,UAAU,IAAI;YAEzC,KAAK,MAAME,QAAQC,MAAMC,OAAO,CAACJ,SAASA,QAAQ;gBAACA;aAAM,CAAE;gBACzDT,IAAIc,YAAY,CAACC,MAAM,CAACP,KAAKG;YAC/B;QACF;QAEA,MAAMK,WAAW,MAAMC,MAAMjB,KAAK;YAChCN;YACAwB,SAAS;gBACPC,eAAe,CAAC,YAAY,EAAE5B,QAAQ;gBACtC6B,QAAQ;gBACR,gBAAgB;gBAChB,GAAItB,YAAY;oBAAEuB,MAAMvB;gBAAU,IAAI,CAAC,CAAC;YAC1C;YACAD,MAAMA,SAASa,YAAYA,YAAYY,KAAKC,SAAS,CAAC1B;YACtDE;QACF;QAEA,IAAIA,aAAa,YAAYiB,SAASQ,MAAM,IAAI,OAAOR,SAASQ,MAAM,GAAG,KAAK;YAC5E,MAAM,IAAIpB,MACR,CAAC,0BAA0B,EAAEY,SAASQ,MAAM,CAAC,KAAK,EAAER,SAASE,OAAO,CAACO,GAAG,CAAC,YAAY,CAAC,CAAC;QAE3F;QAEA,MAAMC,OAAO,MAAMV,SAASU,IAAI;QAChC,MAAMC,OAAOD,OAAQJ,KAAK9B,KAAK,CAACkC,QAAoBhB;QAEpD,IAAI,CAACM,SAASY,EAAE,EAAE;YAChB,MAAM,IAAIxB,MACR,CAAC,8BAA8B,EAAEY,SAASQ,MAAM,CAAC,EAAE,EAAEE,QAAQV,SAASa,UAAU,EAAE;QAEtF;QAEA,OAAOF;IACT;IAEA,SAASG,UAAUZ,OAAgB;QACjCA,QAAQa,GAAG,CAAC,iBAAiB,CAAC,YAAY,EAAExC,QAAQ;IACtD;IAEA,OAAO;QAAEE;QAASqC;IAAU;AAC9B","file":"client.js"}
|
package/dist/define.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const defineAction: <const TSlug extends string, TInput extends import("zod").ZodType, TOutput extends import("zod").ZodType | undefined = undefined, TResult = unknown>(action: TOutput extends unknown ? import("frogbot/pieces").PieceActionDefinition<TInput, TOutput, {
|
|
2
2
|
signingSecret?: string | undefined;
|
|
3
3
|
}, {
|
|
4
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
4
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
5
5
|
method: string;
|
|
6
6
|
path: string;
|
|
7
7
|
query?: {
|
|
@@ -9,13 +9,15 @@ export declare const defineAction: <const TSlug extends string, TInput extends i
|
|
|
9
9
|
};
|
|
10
10
|
body?: unknown;
|
|
11
11
|
fromEmail?: string;
|
|
12
|
+
redirect?: RequestRedirect;
|
|
12
13
|
}) => Promise<unknown>;
|
|
14
|
+
authorize: (headers: Headers) => void;
|
|
13
15
|
}, TOutput extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? import("zod").infer<TOutput> : TResult> & {
|
|
14
16
|
slug: TSlug;
|
|
15
17
|
} : never) => import("frogbot/pieces").PieceActionDefinition<TInput, TOutput, {
|
|
16
18
|
signingSecret?: string | undefined;
|
|
17
19
|
}, {
|
|
18
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
20
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
19
21
|
method: string;
|
|
20
22
|
path: string;
|
|
21
23
|
query?: {
|
|
@@ -23,10 +25,38 @@ export declare const defineAction: <const TSlug extends string, TInput extends i
|
|
|
23
25
|
};
|
|
24
26
|
body?: unknown;
|
|
25
27
|
fromEmail?: string;
|
|
28
|
+
redirect?: RequestRedirect;
|
|
26
29
|
}) => Promise<unknown>;
|
|
30
|
+
authorize: (headers: Headers) => void;
|
|
27
31
|
}, TOutput extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? import("zod").infer<TOutput> : TResult> & {
|
|
28
32
|
slug: TSlug;
|
|
29
|
-
},
|
|
33
|
+
}, defineCustomApiCall: (config: import("frogbot/pieces").CustomApiCallConfig<{
|
|
34
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
35
|
+
method: string;
|
|
36
|
+
path: string;
|
|
37
|
+
query?: {
|
|
38
|
+
[x: string]: string | string[] | undefined;
|
|
39
|
+
};
|
|
40
|
+
body?: unknown;
|
|
41
|
+
fromEmail?: string;
|
|
42
|
+
redirect?: RequestRedirect;
|
|
43
|
+
}) => Promise<unknown>;
|
|
44
|
+
authorize: (headers: Headers) => void;
|
|
45
|
+
}>) => import("frogbot/pieces").CustomApiCallAction<{
|
|
46
|
+
signingSecret?: string | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
49
|
+
method: string;
|
|
50
|
+
path: string;
|
|
51
|
+
query?: {
|
|
52
|
+
[x: string]: string | string[] | undefined;
|
|
53
|
+
};
|
|
54
|
+
body?: unknown;
|
|
55
|
+
fromEmail?: string;
|
|
56
|
+
redirect?: RequestRedirect;
|
|
57
|
+
}) => Promise<unknown>;
|
|
58
|
+
authorize: (headers: Headers) => void;
|
|
59
|
+
}>, defineWebhookTrigger: <const TSlug extends string, TInput extends import("zod").ZodType, TOutput extends import("zod").ZodType | undefined = undefined, TState extends import("frogbot/pieces").PieceResult = import("frogbot/pieces").PieceJSON>(trigger: {
|
|
30
60
|
slug: string;
|
|
31
61
|
label?: string;
|
|
32
62
|
description: string;
|
|
@@ -38,7 +68,7 @@ export declare const defineAction: <const TSlug extends string, TInput extends i
|
|
|
38
68
|
onEnable(args: import("frogbot/pieces").PieceRunArgs<import("zod").infer<TInput>, {
|
|
39
69
|
signingSecret?: string | undefined;
|
|
40
70
|
}, {
|
|
41
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
71
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
42
72
|
method: string;
|
|
43
73
|
path: string;
|
|
44
74
|
query?: {
|
|
@@ -46,14 +76,16 @@ export declare const defineAction: <const TSlug extends string, TInput extends i
|
|
|
46
76
|
};
|
|
47
77
|
body?: unknown;
|
|
48
78
|
fromEmail?: string;
|
|
79
|
+
redirect?: RequestRedirect;
|
|
49
80
|
}) => Promise<unknown>;
|
|
81
|
+
authorize: (headers: Headers) => void;
|
|
50
82
|
}> & {
|
|
51
83
|
webhookUrl: string;
|
|
52
84
|
}): Promise<TState>;
|
|
53
85
|
onDisable(args: import("frogbot/pieces").PieceRunArgs<import("zod").infer<TInput>, {
|
|
54
86
|
signingSecret?: string | undefined;
|
|
55
87
|
}, {
|
|
56
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
88
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
57
89
|
method: string;
|
|
58
90
|
path: string;
|
|
59
91
|
query?: {
|
|
@@ -61,7 +93,9 @@ export declare const defineAction: <const TSlug extends string, TInput extends i
|
|
|
61
93
|
};
|
|
62
94
|
body?: unknown;
|
|
63
95
|
fromEmail?: string;
|
|
96
|
+
redirect?: RequestRedirect;
|
|
64
97
|
}) => Promise<unknown>;
|
|
98
|
+
authorize: (headers: Headers) => void;
|
|
65
99
|
}> & {
|
|
66
100
|
state: TState;
|
|
67
101
|
}): Promise<void>;
|
|
@@ -70,7 +104,7 @@ export declare const defineAction: <const TSlug extends string, TInput extends i
|
|
|
70
104
|
run(args: import("frogbot/pieces").PieceRunArgs<import("zod").infer<TInput>, {
|
|
71
105
|
signingSecret?: string | undefined;
|
|
72
106
|
}, {
|
|
73
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
107
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
74
108
|
method: string;
|
|
75
109
|
path: string;
|
|
76
110
|
query?: {
|
|
@@ -78,7 +112,9 @@ export declare const defineAction: <const TSlug extends string, TInput extends i
|
|
|
78
112
|
};
|
|
79
113
|
body?: unknown;
|
|
80
114
|
fromEmail?: string;
|
|
115
|
+
redirect?: RequestRedirect;
|
|
81
116
|
}) => Promise<unknown>;
|
|
117
|
+
authorize: (headers: Headers) => void;
|
|
82
118
|
}> & {
|
|
83
119
|
state: TState;
|
|
84
120
|
webhookUrl: string;
|
|
@@ -87,7 +123,7 @@ export declare const defineAction: <const TSlug extends string, TInput extends i
|
|
|
87
123
|
run(args: import("frogbot/pieces").PieceRunArgs<import("zod").infer<TInput>, {
|
|
88
124
|
signingSecret?: string | undefined;
|
|
89
125
|
}, {
|
|
90
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
126
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
91
127
|
method: string;
|
|
92
128
|
path: string;
|
|
93
129
|
query?: {
|
|
@@ -95,7 +131,9 @@ export declare const defineAction: <const TSlug extends string, TInput extends i
|
|
|
95
131
|
};
|
|
96
132
|
body?: unknown;
|
|
97
133
|
fromEmail?: string;
|
|
134
|
+
redirect?: RequestRedirect;
|
|
98
135
|
}) => Promise<unknown>;
|
|
136
|
+
authorize: (headers: Headers) => void;
|
|
99
137
|
}> & {
|
|
100
138
|
state: TState;
|
|
101
139
|
}): Promise<import("frogbot/pieces").TriggerEvent<TOutput extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? import("zod").infer<TOutput> : import("frogbot/pieces").PieceJSON>[]>;
|
|
@@ -113,7 +151,7 @@ export declare const defineAction: <const TSlug extends string, TInput extends i
|
|
|
113
151
|
onEnable(args: import("frogbot/pieces").PieceRunArgs<import("zod").infer<TInput>, {
|
|
114
152
|
signingSecret?: string | undefined;
|
|
115
153
|
}, {
|
|
116
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
154
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
117
155
|
method: string;
|
|
118
156
|
path: string;
|
|
119
157
|
query?: {
|
|
@@ -121,14 +159,16 @@ export declare const defineAction: <const TSlug extends string, TInput extends i
|
|
|
121
159
|
};
|
|
122
160
|
body?: unknown;
|
|
123
161
|
fromEmail?: string;
|
|
162
|
+
redirect?: RequestRedirect;
|
|
124
163
|
}) => Promise<unknown>;
|
|
164
|
+
authorize: (headers: Headers) => void;
|
|
125
165
|
}> & {
|
|
126
166
|
webhookUrl: string;
|
|
127
167
|
}): Promise<TState>;
|
|
128
168
|
onDisable(args: import("frogbot/pieces").PieceRunArgs<import("zod").infer<TInput>, {
|
|
129
169
|
signingSecret?: string | undefined;
|
|
130
170
|
}, {
|
|
131
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
171
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
132
172
|
method: string;
|
|
133
173
|
path: string;
|
|
134
174
|
query?: {
|
|
@@ -136,7 +176,9 @@ export declare const defineAction: <const TSlug extends string, TInput extends i
|
|
|
136
176
|
};
|
|
137
177
|
body?: unknown;
|
|
138
178
|
fromEmail?: string;
|
|
179
|
+
redirect?: RequestRedirect;
|
|
139
180
|
}) => Promise<unknown>;
|
|
181
|
+
authorize: (headers: Headers) => void;
|
|
140
182
|
}> & {
|
|
141
183
|
state: TState;
|
|
142
184
|
}): Promise<void>;
|
|
@@ -145,7 +187,7 @@ export declare const defineAction: <const TSlug extends string, TInput extends i
|
|
|
145
187
|
run(args: import("frogbot/pieces").PieceRunArgs<import("zod").infer<TInput>, {
|
|
146
188
|
signingSecret?: string | undefined;
|
|
147
189
|
}, {
|
|
148
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
190
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
149
191
|
method: string;
|
|
150
192
|
path: string;
|
|
151
193
|
query?: {
|
|
@@ -153,7 +195,9 @@ export declare const defineAction: <const TSlug extends string, TInput extends i
|
|
|
153
195
|
};
|
|
154
196
|
body?: unknown;
|
|
155
197
|
fromEmail?: string;
|
|
198
|
+
redirect?: RequestRedirect;
|
|
156
199
|
}) => Promise<unknown>;
|
|
200
|
+
authorize: (headers: Headers) => void;
|
|
157
201
|
}> & {
|
|
158
202
|
state: TState;
|
|
159
203
|
webhookUrl: string;
|
|
@@ -162,7 +206,7 @@ export declare const defineAction: <const TSlug extends string, TInput extends i
|
|
|
162
206
|
run(args: import("frogbot/pieces").PieceRunArgs<import("zod").infer<TInput>, {
|
|
163
207
|
signingSecret?: string | undefined;
|
|
164
208
|
}, {
|
|
165
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
209
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
166
210
|
method: string;
|
|
167
211
|
path: string;
|
|
168
212
|
query?: {
|
|
@@ -170,7 +214,9 @@ export declare const defineAction: <const TSlug extends string, TInput extends i
|
|
|
170
214
|
};
|
|
171
215
|
body?: unknown;
|
|
172
216
|
fromEmail?: string;
|
|
217
|
+
redirect?: RequestRedirect;
|
|
173
218
|
}) => Promise<unknown>;
|
|
219
|
+
authorize: (headers: Headers) => void;
|
|
174
220
|
}> & {
|
|
175
221
|
state: TState;
|
|
176
222
|
}): Promise<import("frogbot/pieces").TriggerEvent<TOutput extends import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>> ? import("zod").infer<TOutput> : import("frogbot/pieces").PieceJSON>[]>;
|
package/dist/define.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAKA,eAAO,MAAQ,YAAY;;;;;;
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAKA,eAAO,MAAQ,YAAY;;;;;;aAI4K,CAAC;;;YAAiB,CAAC;iBAAwB,CAAC;gBAAsB,CAAC;;;;;;;;;;;aAAnE,CAAC;;;YAAiB,CAAC;iBAAwB,CAAC;gBAAsB,CAAC;;;;;GAJ7O,mBAAmB;;;;aAIuJ,CAAC;;;YAAiB,CAAC;iBAAwB,CAAC;gBAAsB,CAAC;;;;;;;;;aAAnE,CAAC;;;YAAiB,CAAC;iBAAwB,CAAC;gBAAsB,CAAC;;;IAJxN,oBAAoB;;;;;;;;;;;;;;;iBAIiI,CAAC;;;gBAAiB,CAAC;qBAAwB,CAAC;oBAAsB,CAAC;;;;;;;;;;;;iBAAnE,CAAC;;;gBAAiB,CAAC;qBAAwB,CAAC;oBAAsB,CAAC;;;;;;;;;;;;;;qBAAnE,CAAC;;;oBAAiB,CAAC;yBAAwB,CAAC;wBAAsB,CAAC;;;;;;;;;;;;;;iBAAnE,CAAC;;;gBAAiB,CAAC;qBAAwB,CAAC;oBAAsB,CAAC;;;;;;;;;;;;;;;;;;;;;;;iBAAnE,CAAC;;;gBAAiB,CAAC;qBAAwB,CAAC;oBAAsB,CAAC;;;;;;;;;;;;iBAAnE,CAAC;;;gBAAiB,CAAC;qBAAwB,CAAC;oBAAsB,CAAC;;;;;;;;;;;;;;qBAAnE,CAAC;;;oBAAiB,CAAC;yBAAwB,CAAC;wBAAsB,CAAC;;;;;;;;;;;;;;iBAAnE,CAAC;;;gBAAiB,CAAC;qBAAwB,CAAC;oBAAsB,CAAC;;;;;;;;CADvQ,CAAC"}
|
package/dist/define.js
CHANGED
package/dist/define.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/define.ts"],"names":["createPieceHelpers","defineAction","defineWebhookTrigger"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,iBAAiB;AAKpD,OAAO,MAAM,EAAEC,YAAY,EAAEC,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"sources":["../src/define.ts"],"names":["createPieceHelpers","defineAction","defineCustomApiCall","defineWebhookTrigger"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,iBAAiB;AAKpD,OAAO,MAAM,EAAEC,YAAY,EAAEC,mBAAmB,EAAEC,oBAAoB,EAAE,GAAGH,qBAGvE","file":"define.js"}
|
package/dist/index.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
36
36
|
}, import("zod/v4/core").$loose>, {
|
|
37
37
|
signingSecret?: string | undefined;
|
|
38
38
|
}, {
|
|
39
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
39
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
40
40
|
method: string;
|
|
41
41
|
path: string;
|
|
42
42
|
query?: {
|
|
@@ -44,7 +44,9 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
44
44
|
};
|
|
45
45
|
body?: unknown;
|
|
46
46
|
fromEmail?: string;
|
|
47
|
+
redirect?: RequestRedirect;
|
|
47
48
|
}) => Promise<unknown>;
|
|
49
|
+
authorize: (headers: Headers) => void;
|
|
48
50
|
}, {
|
|
49
51
|
[x: string]: unknown;
|
|
50
52
|
id: string;
|
|
@@ -76,7 +78,7 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
76
78
|
}, import("zod/v4/core").$loose>, {
|
|
77
79
|
signingSecret?: string | undefined;
|
|
78
80
|
}, {
|
|
79
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
81
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
80
82
|
method: string;
|
|
81
83
|
path: string;
|
|
82
84
|
query?: {
|
|
@@ -84,7 +86,9 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
84
86
|
};
|
|
85
87
|
body?: unknown;
|
|
86
88
|
fromEmail?: string;
|
|
89
|
+
redirect?: RequestRedirect;
|
|
87
90
|
}) => Promise<unknown>;
|
|
91
|
+
authorize: (headers: Headers) => void;
|
|
88
92
|
}, {
|
|
89
93
|
[x: string]: unknown;
|
|
90
94
|
incidents: {
|
|
@@ -105,7 +109,7 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
105
109
|
}, import("zod/v4/core").$loose>, {
|
|
106
110
|
signingSecret?: string | undefined;
|
|
107
111
|
}, {
|
|
108
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
112
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
109
113
|
method: string;
|
|
110
114
|
path: string;
|
|
111
115
|
query?: {
|
|
@@ -113,7 +117,9 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
113
117
|
};
|
|
114
118
|
body?: unknown;
|
|
115
119
|
fromEmail?: string;
|
|
120
|
+
redirect?: RequestRedirect;
|
|
116
121
|
}) => Promise<unknown>;
|
|
122
|
+
authorize: (headers: Headers) => void;
|
|
117
123
|
}, {
|
|
118
124
|
[x: string]: unknown;
|
|
119
125
|
id: string;
|
|
@@ -130,7 +136,7 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
130
136
|
}, import("zod/v4/core").$loose>, {
|
|
131
137
|
signingSecret?: string | undefined;
|
|
132
138
|
}, {
|
|
133
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
139
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
134
140
|
method: string;
|
|
135
141
|
path: string;
|
|
136
142
|
query?: {
|
|
@@ -138,7 +144,9 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
138
144
|
};
|
|
139
145
|
body?: unknown;
|
|
140
146
|
fromEmail?: string;
|
|
147
|
+
redirect?: RequestRedirect;
|
|
141
148
|
}) => Promise<unknown>;
|
|
149
|
+
authorize: (headers: Headers) => void;
|
|
142
150
|
}, {
|
|
143
151
|
[x: string]: unknown;
|
|
144
152
|
id: string;
|
|
@@ -155,7 +163,7 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
155
163
|
}, import("zod/v4/core").$loose>, {
|
|
156
164
|
signingSecret?: string | undefined;
|
|
157
165
|
}, {
|
|
158
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
166
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
159
167
|
method: string;
|
|
160
168
|
path: string;
|
|
161
169
|
query?: {
|
|
@@ -163,28 +171,19 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
163
171
|
};
|
|
164
172
|
body?: unknown;
|
|
165
173
|
fromEmail?: string;
|
|
174
|
+
redirect?: RequestRedirect;
|
|
166
175
|
}) => Promise<unknown>;
|
|
176
|
+
authorize: (headers: Headers) => void;
|
|
167
177
|
}, {
|
|
168
178
|
[x: string]: unknown;
|
|
169
179
|
id: string;
|
|
170
180
|
status?: string | undefined;
|
|
171
181
|
}> & {
|
|
172
182
|
slug: "resolveIncident";
|
|
173
|
-
}, import("frogbot/pieces").
|
|
174
|
-
method: import("zod").ZodEnum<{
|
|
175
|
-
GET: "GET";
|
|
176
|
-
POST: "POST";
|
|
177
|
-
PATCH: "PATCH";
|
|
178
|
-
PUT: "PUT";
|
|
179
|
-
DELETE: "DELETE";
|
|
180
|
-
}>;
|
|
181
|
-
path: import("zod").ZodString;
|
|
182
|
-
queryParams: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>>>;
|
|
183
|
-
body: import("zod").ZodOptional<import("zod").ZodJSONSchema>;
|
|
184
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodJSONSchema, {
|
|
183
|
+
}, import("frogbot/pieces").CustomApiCallAction<{
|
|
185
184
|
signingSecret?: string | undefined;
|
|
186
185
|
}, {
|
|
187
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
186
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
188
187
|
method: string;
|
|
189
188
|
path: string;
|
|
190
189
|
query?: {
|
|
@@ -192,10 +191,10 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
192
191
|
};
|
|
193
192
|
body?: unknown;
|
|
194
193
|
fromEmail?: string;
|
|
194
|
+
redirect?: RequestRedirect;
|
|
195
195
|
}) => Promise<unknown>;
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}];
|
|
196
|
+
authorize: (headers: Headers) => void;
|
|
197
|
+
}>];
|
|
199
198
|
readonly triggers: readonly [{
|
|
200
199
|
slug: string;
|
|
201
200
|
label?: string;
|
|
@@ -220,7 +219,7 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
220
219
|
onEnable(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
221
220
|
signingSecret?: string | undefined;
|
|
222
221
|
}, {
|
|
223
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
222
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
224
223
|
method: string;
|
|
225
224
|
path: string;
|
|
226
225
|
query?: {
|
|
@@ -228,7 +227,9 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
228
227
|
};
|
|
229
228
|
body?: unknown;
|
|
230
229
|
fromEmail?: string;
|
|
230
|
+
redirect?: RequestRedirect;
|
|
231
231
|
}) => Promise<unknown>;
|
|
232
|
+
authorize: (headers: Headers) => void;
|
|
232
233
|
}> & {
|
|
233
234
|
webhookUrl: string;
|
|
234
235
|
}): Promise<{
|
|
@@ -237,7 +238,7 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
237
238
|
onDisable(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
238
239
|
signingSecret?: string | undefined;
|
|
239
240
|
}, {
|
|
240
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
241
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
241
242
|
method: string;
|
|
242
243
|
path: string;
|
|
243
244
|
query?: {
|
|
@@ -245,7 +246,9 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
245
246
|
};
|
|
246
247
|
body?: unknown;
|
|
247
248
|
fromEmail?: string;
|
|
249
|
+
redirect?: RequestRedirect;
|
|
248
250
|
}) => Promise<unknown>;
|
|
251
|
+
authorize: (headers: Headers) => void;
|
|
249
252
|
}> & {
|
|
250
253
|
state: {
|
|
251
254
|
webhookUrl: string;
|
|
@@ -256,7 +259,7 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
256
259
|
run(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
257
260
|
signingSecret?: string | undefined;
|
|
258
261
|
}, {
|
|
259
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
262
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
260
263
|
method: string;
|
|
261
264
|
path: string;
|
|
262
265
|
query?: {
|
|
@@ -264,7 +267,9 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
264
267
|
};
|
|
265
268
|
body?: unknown;
|
|
266
269
|
fromEmail?: string;
|
|
270
|
+
redirect?: RequestRedirect;
|
|
267
271
|
}) => Promise<unknown>;
|
|
272
|
+
authorize: (headers: Headers) => void;
|
|
268
273
|
}> & {
|
|
269
274
|
state: {
|
|
270
275
|
webhookUrl: string;
|
|
@@ -277,7 +282,7 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
277
282
|
run(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
278
283
|
signingSecret?: string | undefined;
|
|
279
284
|
}, {
|
|
280
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
285
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
281
286
|
method: string;
|
|
282
287
|
path: string;
|
|
283
288
|
query?: {
|
|
@@ -285,7 +290,9 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
285
290
|
};
|
|
286
291
|
body?: unknown;
|
|
287
292
|
fromEmail?: string;
|
|
293
|
+
redirect?: RequestRedirect;
|
|
288
294
|
}) => Promise<unknown>;
|
|
295
|
+
authorize: (headers: Headers) => void;
|
|
289
296
|
}> & {
|
|
290
297
|
state: {
|
|
291
298
|
webhookUrl: string;
|
|
@@ -324,7 +331,7 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
324
331
|
onEnable(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
325
332
|
signingSecret?: string | undefined;
|
|
326
333
|
}, {
|
|
327
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
334
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
328
335
|
method: string;
|
|
329
336
|
path: string;
|
|
330
337
|
query?: {
|
|
@@ -332,7 +339,9 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
332
339
|
};
|
|
333
340
|
body?: unknown;
|
|
334
341
|
fromEmail?: string;
|
|
342
|
+
redirect?: RequestRedirect;
|
|
335
343
|
}) => Promise<unknown>;
|
|
344
|
+
authorize: (headers: Headers) => void;
|
|
336
345
|
}> & {
|
|
337
346
|
webhookUrl: string;
|
|
338
347
|
}): Promise<{
|
|
@@ -341,7 +350,7 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
341
350
|
onDisable(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
342
351
|
signingSecret?: string | undefined;
|
|
343
352
|
}, {
|
|
344
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
353
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
345
354
|
method: string;
|
|
346
355
|
path: string;
|
|
347
356
|
query?: {
|
|
@@ -349,7 +358,9 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
349
358
|
};
|
|
350
359
|
body?: unknown;
|
|
351
360
|
fromEmail?: string;
|
|
361
|
+
redirect?: RequestRedirect;
|
|
352
362
|
}) => Promise<unknown>;
|
|
363
|
+
authorize: (headers: Headers) => void;
|
|
353
364
|
}> & {
|
|
354
365
|
state: {
|
|
355
366
|
webhookUrl: string;
|
|
@@ -360,7 +371,7 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
360
371
|
run(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
361
372
|
signingSecret?: string | undefined;
|
|
362
373
|
}, {
|
|
363
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
374
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
364
375
|
method: string;
|
|
365
376
|
path: string;
|
|
366
377
|
query?: {
|
|
@@ -368,7 +379,9 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
368
379
|
};
|
|
369
380
|
body?: unknown;
|
|
370
381
|
fromEmail?: string;
|
|
382
|
+
redirect?: RequestRedirect;
|
|
371
383
|
}) => Promise<unknown>;
|
|
384
|
+
authorize: (headers: Headers) => void;
|
|
372
385
|
}> & {
|
|
373
386
|
state: {
|
|
374
387
|
webhookUrl: string;
|
|
@@ -381,7 +394,7 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
381
394
|
run(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
382
395
|
signingSecret?: string | undefined;
|
|
383
396
|
}, {
|
|
384
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
397
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
385
398
|
method: string;
|
|
386
399
|
path: string;
|
|
387
400
|
query?: {
|
|
@@ -389,7 +402,9 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
389
402
|
};
|
|
390
403
|
body?: unknown;
|
|
391
404
|
fromEmail?: string;
|
|
405
|
+
redirect?: RequestRedirect;
|
|
392
406
|
}) => Promise<unknown>;
|
|
407
|
+
authorize: (headers: Headers) => void;
|
|
393
408
|
}> & {
|
|
394
409
|
state: {
|
|
395
410
|
webhookUrl: string;
|
|
@@ -428,7 +443,7 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
428
443
|
onEnable(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
429
444
|
signingSecret?: string | undefined;
|
|
430
445
|
}, {
|
|
431
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
446
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
432
447
|
method: string;
|
|
433
448
|
path: string;
|
|
434
449
|
query?: {
|
|
@@ -436,7 +451,9 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
436
451
|
};
|
|
437
452
|
body?: unknown;
|
|
438
453
|
fromEmail?: string;
|
|
454
|
+
redirect?: RequestRedirect;
|
|
439
455
|
}) => Promise<unknown>;
|
|
456
|
+
authorize: (headers: Headers) => void;
|
|
440
457
|
}> & {
|
|
441
458
|
webhookUrl: string;
|
|
442
459
|
}): Promise<{
|
|
@@ -445,7 +462,7 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
445
462
|
onDisable(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
446
463
|
signingSecret?: string | undefined;
|
|
447
464
|
}, {
|
|
448
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
465
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
449
466
|
method: string;
|
|
450
467
|
path: string;
|
|
451
468
|
query?: {
|
|
@@ -453,7 +470,9 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
453
470
|
};
|
|
454
471
|
body?: unknown;
|
|
455
472
|
fromEmail?: string;
|
|
473
|
+
redirect?: RequestRedirect;
|
|
456
474
|
}) => Promise<unknown>;
|
|
475
|
+
authorize: (headers: Headers) => void;
|
|
457
476
|
}> & {
|
|
458
477
|
state: {
|
|
459
478
|
webhookUrl: string;
|
|
@@ -464,7 +483,7 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
464
483
|
run(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
465
484
|
signingSecret?: string | undefined;
|
|
466
485
|
}, {
|
|
467
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
486
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
468
487
|
method: string;
|
|
469
488
|
path: string;
|
|
470
489
|
query?: {
|
|
@@ -472,7 +491,9 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
472
491
|
};
|
|
473
492
|
body?: unknown;
|
|
474
493
|
fromEmail?: string;
|
|
494
|
+
redirect?: RequestRedirect;
|
|
475
495
|
}) => Promise<unknown>;
|
|
496
|
+
authorize: (headers: Headers) => void;
|
|
476
497
|
}> & {
|
|
477
498
|
state: {
|
|
478
499
|
webhookUrl: string;
|
|
@@ -485,7 +506,7 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
485
506
|
run(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
486
507
|
signingSecret?: string | undefined;
|
|
487
508
|
}, {
|
|
488
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
509
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
489
510
|
method: string;
|
|
490
511
|
path: string;
|
|
491
512
|
query?: {
|
|
@@ -493,7 +514,9 @@ export declare const createPagerduty: import("frogbot/pieces").PieceFactory<{
|
|
|
493
514
|
};
|
|
494
515
|
body?: unknown;
|
|
495
516
|
fromEmail?: string;
|
|
517
|
+
redirect?: RequestRedirect;
|
|
496
518
|
}) => Promise<unknown>;
|
|
519
|
+
authorize: (headers: Headers) => void;
|
|
497
520
|
}> & {
|
|
498
521
|
state: {
|
|
499
522
|
webhookUrl: string;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAKpD,eAAO,MAAM,gBAAgB,wHAOnB,CAAC;AACX,eAAO,MAAM,iBAAiB,sEAIpB,CAAC;AACX,eAAO,MAAM,eAAe,aAAc,CAAC;AAE3C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAKpD,eAAO,MAAM,gBAAgB,wHAOnB,CAAC;AACX,eAAO,MAAM,iBAAiB,sEAIpB,CAAC;AACX,eAAO,MAAM,eAAe,aAAc,CAAC;AAE3C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAbxB,CAAC;;;gBACF,CAAC;qBACO,CAAC;oBACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAHN,CAAC;;;gBACF,CAAC;qBACO,CAAC;oBACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;iBAHN,CAAC;;;gBACF,CAAC;qB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
|
@@ -23,7 +23,7 @@ export declare const newIncident: {
|
|
|
23
23
|
onEnable(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
24
24
|
signingSecret?: string | undefined;
|
|
25
25
|
}, {
|
|
26
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
26
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
27
27
|
method: string;
|
|
28
28
|
path: string;
|
|
29
29
|
query?: {
|
|
@@ -31,7 +31,9 @@ export declare const newIncident: {
|
|
|
31
31
|
};
|
|
32
32
|
body?: unknown;
|
|
33
33
|
fromEmail?: string;
|
|
34
|
+
redirect?: RequestRedirect;
|
|
34
35
|
}) => Promise<unknown>;
|
|
36
|
+
authorize: (headers: Headers) => void;
|
|
35
37
|
}> & {
|
|
36
38
|
webhookUrl: string;
|
|
37
39
|
}): Promise<{
|
|
@@ -40,7 +42,7 @@ export declare const newIncident: {
|
|
|
40
42
|
onDisable(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
41
43
|
signingSecret?: string | undefined;
|
|
42
44
|
}, {
|
|
43
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
45
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
44
46
|
method: string;
|
|
45
47
|
path: string;
|
|
46
48
|
query?: {
|
|
@@ -48,7 +50,9 @@ export declare const newIncident: {
|
|
|
48
50
|
};
|
|
49
51
|
body?: unknown;
|
|
50
52
|
fromEmail?: string;
|
|
53
|
+
redirect?: RequestRedirect;
|
|
51
54
|
}) => Promise<unknown>;
|
|
55
|
+
authorize: (headers: Headers) => void;
|
|
52
56
|
}> & {
|
|
53
57
|
state: {
|
|
54
58
|
webhookUrl: string;
|
|
@@ -59,7 +63,7 @@ export declare const newIncident: {
|
|
|
59
63
|
run(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
60
64
|
signingSecret?: string | undefined;
|
|
61
65
|
}, {
|
|
62
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
66
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
63
67
|
method: string;
|
|
64
68
|
path: string;
|
|
65
69
|
query?: {
|
|
@@ -67,7 +71,9 @@ export declare const newIncident: {
|
|
|
67
71
|
};
|
|
68
72
|
body?: unknown;
|
|
69
73
|
fromEmail?: string;
|
|
74
|
+
redirect?: RequestRedirect;
|
|
70
75
|
}) => Promise<unknown>;
|
|
76
|
+
authorize: (headers: Headers) => void;
|
|
71
77
|
}> & {
|
|
72
78
|
state: {
|
|
73
79
|
webhookUrl: string;
|
|
@@ -80,7 +86,7 @@ export declare const newIncident: {
|
|
|
80
86
|
run(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
81
87
|
signingSecret?: string | undefined;
|
|
82
88
|
}, {
|
|
83
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
89
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
84
90
|
method: string;
|
|
85
91
|
path: string;
|
|
86
92
|
query?: {
|
|
@@ -88,7 +94,9 @@ export declare const newIncident: {
|
|
|
88
94
|
};
|
|
89
95
|
body?: unknown;
|
|
90
96
|
fromEmail?: string;
|
|
97
|
+
redirect?: RequestRedirect;
|
|
91
98
|
}) => Promise<unknown>;
|
|
99
|
+
authorize: (headers: Headers) => void;
|
|
92
100
|
}> & {
|
|
93
101
|
state: {
|
|
94
102
|
webhookUrl: string;
|
|
@@ -128,7 +136,7 @@ export declare const incidentResolved: {
|
|
|
128
136
|
onEnable(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
129
137
|
signingSecret?: string | undefined;
|
|
130
138
|
}, {
|
|
131
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
139
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
132
140
|
method: string;
|
|
133
141
|
path: string;
|
|
134
142
|
query?: {
|
|
@@ -136,7 +144,9 @@ export declare const incidentResolved: {
|
|
|
136
144
|
};
|
|
137
145
|
body?: unknown;
|
|
138
146
|
fromEmail?: string;
|
|
147
|
+
redirect?: RequestRedirect;
|
|
139
148
|
}) => Promise<unknown>;
|
|
149
|
+
authorize: (headers: Headers) => void;
|
|
140
150
|
}> & {
|
|
141
151
|
webhookUrl: string;
|
|
142
152
|
}): Promise<{
|
|
@@ -145,7 +155,7 @@ export declare const incidentResolved: {
|
|
|
145
155
|
onDisable(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
146
156
|
signingSecret?: string | undefined;
|
|
147
157
|
}, {
|
|
148
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
158
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
149
159
|
method: string;
|
|
150
160
|
path: string;
|
|
151
161
|
query?: {
|
|
@@ -153,7 +163,9 @@ export declare const incidentResolved: {
|
|
|
153
163
|
};
|
|
154
164
|
body?: unknown;
|
|
155
165
|
fromEmail?: string;
|
|
166
|
+
redirect?: RequestRedirect;
|
|
156
167
|
}) => Promise<unknown>;
|
|
168
|
+
authorize: (headers: Headers) => void;
|
|
157
169
|
}> & {
|
|
158
170
|
state: {
|
|
159
171
|
webhookUrl: string;
|
|
@@ -164,7 +176,7 @@ export declare const incidentResolved: {
|
|
|
164
176
|
run(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
165
177
|
signingSecret?: string | undefined;
|
|
166
178
|
}, {
|
|
167
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
179
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
168
180
|
method: string;
|
|
169
181
|
path: string;
|
|
170
182
|
query?: {
|
|
@@ -172,7 +184,9 @@ export declare const incidentResolved: {
|
|
|
172
184
|
};
|
|
173
185
|
body?: unknown;
|
|
174
186
|
fromEmail?: string;
|
|
187
|
+
redirect?: RequestRedirect;
|
|
175
188
|
}) => Promise<unknown>;
|
|
189
|
+
authorize: (headers: Headers) => void;
|
|
176
190
|
}> & {
|
|
177
191
|
state: {
|
|
178
192
|
webhookUrl: string;
|
|
@@ -185,7 +199,7 @@ export declare const incidentResolved: {
|
|
|
185
199
|
run(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
186
200
|
signingSecret?: string | undefined;
|
|
187
201
|
}, {
|
|
188
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
202
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
189
203
|
method: string;
|
|
190
204
|
path: string;
|
|
191
205
|
query?: {
|
|
@@ -193,7 +207,9 @@ export declare const incidentResolved: {
|
|
|
193
207
|
};
|
|
194
208
|
body?: unknown;
|
|
195
209
|
fromEmail?: string;
|
|
210
|
+
redirect?: RequestRedirect;
|
|
196
211
|
}) => Promise<unknown>;
|
|
212
|
+
authorize: (headers: Headers) => void;
|
|
197
213
|
}> & {
|
|
198
214
|
state: {
|
|
199
215
|
webhookUrl: string;
|
|
@@ -233,7 +249,7 @@ export declare const incidentAcknowledged: {
|
|
|
233
249
|
onEnable(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
234
250
|
signingSecret?: string | undefined;
|
|
235
251
|
}, {
|
|
236
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
252
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
237
253
|
method: string;
|
|
238
254
|
path: string;
|
|
239
255
|
query?: {
|
|
@@ -241,7 +257,9 @@ export declare const incidentAcknowledged: {
|
|
|
241
257
|
};
|
|
242
258
|
body?: unknown;
|
|
243
259
|
fromEmail?: string;
|
|
260
|
+
redirect?: RequestRedirect;
|
|
244
261
|
}) => Promise<unknown>;
|
|
262
|
+
authorize: (headers: Headers) => void;
|
|
245
263
|
}> & {
|
|
246
264
|
webhookUrl: string;
|
|
247
265
|
}): Promise<{
|
|
@@ -250,7 +268,7 @@ export declare const incidentAcknowledged: {
|
|
|
250
268
|
onDisable(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
251
269
|
signingSecret?: string | undefined;
|
|
252
270
|
}, {
|
|
253
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
271
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
254
272
|
method: string;
|
|
255
273
|
path: string;
|
|
256
274
|
query?: {
|
|
@@ -258,7 +276,9 @@ export declare const incidentAcknowledged: {
|
|
|
258
276
|
};
|
|
259
277
|
body?: unknown;
|
|
260
278
|
fromEmail?: string;
|
|
279
|
+
redirect?: RequestRedirect;
|
|
261
280
|
}) => Promise<unknown>;
|
|
281
|
+
authorize: (headers: Headers) => void;
|
|
262
282
|
}> & {
|
|
263
283
|
state: {
|
|
264
284
|
webhookUrl: string;
|
|
@@ -269,7 +289,7 @@ export declare const incidentAcknowledged: {
|
|
|
269
289
|
run(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
270
290
|
signingSecret?: string | undefined;
|
|
271
291
|
}, {
|
|
272
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
292
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
273
293
|
method: string;
|
|
274
294
|
path: string;
|
|
275
295
|
query?: {
|
|
@@ -277,7 +297,9 @@ export declare const incidentAcknowledged: {
|
|
|
277
297
|
};
|
|
278
298
|
body?: unknown;
|
|
279
299
|
fromEmail?: string;
|
|
300
|
+
redirect?: RequestRedirect;
|
|
280
301
|
}) => Promise<unknown>;
|
|
302
|
+
authorize: (headers: Headers) => void;
|
|
281
303
|
}> & {
|
|
282
304
|
state: {
|
|
283
305
|
webhookUrl: string;
|
|
@@ -290,7 +312,7 @@ export declare const incidentAcknowledged: {
|
|
|
290
312
|
run(args: import("frogbot/pieces").PieceRunArgs<Record<string, never>, {
|
|
291
313
|
signingSecret?: string | undefined;
|
|
292
314
|
}, {
|
|
293
|
-
request: ({ method, path, query, body, fromEmail, }: {
|
|
315
|
+
request: ({ method, path, query, body, fromEmail, redirect, }: {
|
|
294
316
|
method: string;
|
|
295
317
|
path: string;
|
|
296
318
|
query?: {
|
|
@@ -298,7 +320,9 @@ export declare const incidentAcknowledged: {
|
|
|
298
320
|
};
|
|
299
321
|
body?: unknown;
|
|
300
322
|
fromEmail?: string;
|
|
323
|
+
redirect?: RequestRedirect;
|
|
301
324
|
}) => Promise<unknown>;
|
|
325
|
+
authorize: (headers: Headers) => void;
|
|
302
326
|
}> & {
|
|
303
327
|
state: {
|
|
304
328
|
webhookUrl: string;
|
package/dist/triggers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triggers.d.ts","sourceRoot":"","sources":["../src/triggers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkDxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"triggers.d.ts","sourceRoot":"","sources":["../src/triggers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkDxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAtBnB,CAAC;;;gBAEF,CAAD;qBACO,CAAC;oBAEP,CAAF;;;;;;;;;;;;;;iBALG,CAAC;;;gBAEF,CAAD;qBACO,CAAC;oBAEP,CAAF;;;;;;;;;;;;;;;;qBALG,CAAC;;;oBAEF,CAAD;yBACO,CAAC;wBAEP,CAAF;;;;;;;;;;;;;;;;;;iBALG,CAAC;;;gBAEF,CAAD;qBACO,CAAC;oBAEP,CAAF;;;;;;;;;;;;;;;;;CAsBA,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA7BxB,CAAC;;;gBAEF,CAAD;qBACO,CAAC;oBAEP,CAAF;;;;;;;;;;;;;;iBALG,CAAC;;;gBAEF,CAAD;qBACO,CAAC;oBAEP,CAAF;;;;;;;;;;;;;;;;qBALG,CAAC;;;oBAEF,CAAD;yBACO,CAAC;wBAEP,CAAF;;;;;;;;;;;;;;;;;;iBALG,CAAC;;;gBAEF,CAAD;qBACO,CAAC;oBAEP,CAAF;;;;;;;;;;;;;;;;;CA6BA,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;iBApC5B,CAAC;;;gBAEF,CAAD;qBACO,CAAC;oBAEP,CAAF;;;;;;;;;;;;;;iBALG,CAAC;;;gBAEF,CAAD;qBACO,CAAC;oBAEP,CAAF;;;;;;;;;;;;;;;;qBALG,CAAC;;;oBAEF,CAAD;yBACO,CAAC;wBAEP,CAAF;;;;;;;;;;;;;;;;;;iBALG,CAAC;;;gBAEF,CAAD;qBACO,CAAC;oBAEP,CAAF;;;;;;;;;;;;;;;;;CAoCA,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frogbotai/piece-pagerduty",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"description": "pagerduty tools for FrogBot.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Colby Gilbert",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"zod": "^4.3.6"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"frogbot": "0.
|
|
25
|
+
"frogbot": "0.32.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"typescript": "5.6.2",
|
|
29
|
-
"frogbot": "0.
|
|
29
|
+
"frogbot": "0.32.0"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|