@greensecurity/javascript-sdk 0.45.0-beta.14 → 0.45.0-beta.16
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/commonjs/__tests__/vendors.test.js +1 -1
- package/dist/commonjs/funcs/reportsGetFullReport.d.ts +3 -3
- package/dist/commonjs/funcs/reportsGetFullReport.js +3 -3
- package/dist/commonjs/funcs/validateWebhook.d.ts +1 -1
- package/dist/commonjs/funcs/validateWebhook.d.ts.map +1 -1
- package/dist/commonjs/funcs/validateWebhook.js +3 -0
- package/dist/commonjs/funcs/validateWebhook.js.map +1 -1
- package/dist/commonjs/funcs/vendorsSendDownloadCode.js +1 -1
- package/dist/commonjs/funcs/vendorsSendDownloadCode.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/components/fullreport.d.ts +107 -0
- package/dist/commonjs/models/components/fullreport.d.ts.map +1 -0
- package/dist/commonjs/models/components/fullreport.js +125 -0
- package/dist/commonjs/models/components/fullreport.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +1 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/webhooksubscription.d.ts +3 -0
- package/dist/commonjs/models/components/webhooksubscription.d.ts.map +1 -1
- package/dist/commonjs/models/components/webhooksubscription.js +3 -0
- package/dist/commonjs/models/components/webhooksubscription.js.map +1 -1
- package/dist/commonjs/models/components/webhooksubscriptiondetail.d.ts +1 -0
- package/dist/commonjs/models/components/webhooksubscriptiondetail.d.ts.map +1 -1
- package/dist/commonjs/models/components/webhooksubscriptiondetail.js +1 -0
- package/dist/commonjs/models/components/webhooksubscriptiondetail.js.map +1 -1
- package/dist/commonjs/models/webhooks/index.d.ts +3 -0
- package/dist/commonjs/models/webhooks/index.d.ts.map +1 -1
- package/dist/commonjs/models/webhooks/index.js +3 -0
- package/dist/commonjs/models/webhooks/index.js.map +1 -1
- package/dist/commonjs/models/webhooks/sendfullreportcreated.d.ts +42 -0
- package/dist/commonjs/models/webhooks/sendfullreportcreated.d.ts.map +1 -0
- package/dist/commonjs/models/webhooks/sendfullreportcreated.js +85 -0
- package/dist/commonjs/models/webhooks/sendfullreportcreated.js.map +1 -0
- package/dist/commonjs/models/webhooks/sendfullreportdestroyed.d.ts +42 -0
- package/dist/commonjs/models/webhooks/sendfullreportdestroyed.d.ts.map +1 -0
- package/dist/commonjs/models/webhooks/sendfullreportdestroyed.js +85 -0
- package/dist/commonjs/models/webhooks/sendfullreportdestroyed.js.map +1 -0
- package/dist/commonjs/models/webhooks/sendfullreportupdated.d.ts +42 -0
- package/dist/commonjs/models/webhooks/sendfullreportupdated.d.ts.map +1 -0
- package/dist/commonjs/models/webhooks/sendfullreportupdated.js +85 -0
- package/dist/commonjs/models/webhooks/sendfullreportupdated.js.map +1 -0
- package/dist/commonjs/react-query/reportsGetFullReport.d.ts +6 -6
- package/dist/commonjs/react-query/reportsGetFullReport.js +6 -6
- package/dist/commonjs/sdk/reports.d.ts +3 -3
- package/dist/commonjs/sdk/reports.js +3 -3
- package/dist/commonjs/sdk/sdk.d.ts +1 -1
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/__tests__/vendors.test.js +1 -1
- package/dist/esm/funcs/reportsGetFullReport.d.ts +3 -3
- package/dist/esm/funcs/reportsGetFullReport.js +3 -3
- package/dist/esm/funcs/validateWebhook.d.ts +1 -1
- package/dist/esm/funcs/validateWebhook.d.ts.map +1 -1
- package/dist/esm/funcs/validateWebhook.js +3 -0
- package/dist/esm/funcs/validateWebhook.js.map +1 -1
- package/dist/esm/funcs/vendorsSendDownloadCode.js +1 -1
- package/dist/esm/funcs/vendorsSendDownloadCode.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/components/fullreport.d.ts +107 -0
- package/dist/esm/models/components/fullreport.d.ts.map +1 -0
- package/dist/esm/models/components/fullreport.js +87 -0
- package/dist/esm/models/components/fullreport.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +1 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/webhooksubscription.d.ts +3 -0
- package/dist/esm/models/components/webhooksubscription.d.ts.map +1 -1
- package/dist/esm/models/components/webhooksubscription.js +3 -0
- package/dist/esm/models/components/webhooksubscription.js.map +1 -1
- package/dist/esm/models/components/webhooksubscriptiondetail.d.ts +1 -0
- package/dist/esm/models/components/webhooksubscriptiondetail.d.ts.map +1 -1
- package/dist/esm/models/components/webhooksubscriptiondetail.js +1 -0
- package/dist/esm/models/components/webhooksubscriptiondetail.js.map +1 -1
- package/dist/esm/models/webhooks/index.d.ts +3 -0
- package/dist/esm/models/webhooks/index.d.ts.map +1 -1
- package/dist/esm/models/webhooks/index.js +3 -0
- package/dist/esm/models/webhooks/index.js.map +1 -1
- package/dist/esm/models/webhooks/sendfullreportcreated.d.ts +42 -0
- package/dist/esm/models/webhooks/sendfullreportcreated.d.ts.map +1 -0
- package/dist/esm/models/webhooks/sendfullreportcreated.js +47 -0
- package/dist/esm/models/webhooks/sendfullreportcreated.js.map +1 -0
- package/dist/esm/models/webhooks/sendfullreportdestroyed.d.ts +42 -0
- package/dist/esm/models/webhooks/sendfullreportdestroyed.d.ts.map +1 -0
- package/dist/esm/models/webhooks/sendfullreportdestroyed.js +47 -0
- package/dist/esm/models/webhooks/sendfullreportdestroyed.js.map +1 -0
- package/dist/esm/models/webhooks/sendfullreportupdated.d.ts +42 -0
- package/dist/esm/models/webhooks/sendfullreportupdated.d.ts.map +1 -0
- package/dist/esm/models/webhooks/sendfullreportupdated.js +47 -0
- package/dist/esm/models/webhooks/sendfullreportupdated.js.map +1 -0
- package/dist/esm/react-query/reportsGetFullReport.d.ts +6 -6
- package/dist/esm/react-query/reportsGetFullReport.js +6 -6
- package/dist/esm/sdk/reports.d.ts +3 -3
- package/dist/esm/sdk/reports.js +3 -3
- package/dist/esm/sdk/sdk.d.ts +1 -1
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/vendors.test.ts +1 -1
- package/src/funcs/reportsGetFullReport.ts +3 -3
- package/src/funcs/validateWebhook.ts +6 -0
- package/src/funcs/vendorsSendDownloadCode.ts +1 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/fullreport.ts +193 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/webhooksubscription.ts +3 -0
- package/src/models/components/webhooksubscriptiondetail.ts +1 -0
- package/src/models/webhooks/index.ts +3 -0
- package/src/models/webhooks/sendfullreportcreated.ts +104 -0
- package/src/models/webhooks/sendfullreportdestroyed.ts +104 -0
- package/src/models/webhooks/sendfullreportupdated.ts +104 -0
- package/src/react-query/reportsGetFullReport.ts +6 -6
- package/src/sdk/reports.ts +3 -3
- package/src/sdk/sdk.ts +3 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import * as components from "../components/index.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
|
|
13
|
+
export type SendFullReportCreatedRequest = {
|
|
14
|
+
/**
|
|
15
|
+
* `t=<unix seconds>,v1=<hex hmac>`, one `v1` per active secret. Each is
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* `HMAC-SHA256(secret, "<t>.<raw body>")`. Compare with a constant-time function and
|
|
19
|
+
* reject a timestamp that is not recent.
|
|
20
|
+
*/
|
|
21
|
+
greenSecuritySignature: string;
|
|
22
|
+
/**
|
|
23
|
+
* The event this delivery belongs to. Route on it when one URL serves several events.
|
|
24
|
+
*/
|
|
25
|
+
greenSecurityEvent: string;
|
|
26
|
+
/**
|
|
27
|
+
* Stable per delivery, including across retries. Key your de-duplication on it.
|
|
28
|
+
*/
|
|
29
|
+
greenSecurityIdempotencyKey: string;
|
|
30
|
+
/**
|
|
31
|
+
* The entity in the body.
|
|
32
|
+
*/
|
|
33
|
+
greenWebhookId: string;
|
|
34
|
+
fullReport: components.FullReport;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const SendFullReportCreatedRequest$inboundSchema: z.ZodType<
|
|
39
|
+
SendFullReportCreatedRequest,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({
|
|
43
|
+
"Green-Security-Signature": types.string(),
|
|
44
|
+
"Green-Security-Event": types.string(),
|
|
45
|
+
"Green-Security-Idempotency-Key": types.string(),
|
|
46
|
+
"Green-Webhook-Id": types.string(),
|
|
47
|
+
FullReport: components.FullReport$inboundSchema,
|
|
48
|
+
}).transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
"Green-Security-Signature": "greenSecuritySignature",
|
|
51
|
+
"Green-Security-Event": "greenSecurityEvent",
|
|
52
|
+
"Green-Security-Idempotency-Key": "greenSecurityIdempotencyKey",
|
|
53
|
+
"Green-Webhook-Id": "greenWebhookId",
|
|
54
|
+
"FullReport": "fullReport",
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
/** @internal */
|
|
58
|
+
export type SendFullReportCreatedRequest$Outbound = {
|
|
59
|
+
"Green-Security-Signature": string;
|
|
60
|
+
"Green-Security-Event": string;
|
|
61
|
+
"Green-Security-Idempotency-Key": string;
|
|
62
|
+
"Green-Webhook-Id": string;
|
|
63
|
+
FullReport: components.FullReport$Outbound;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const SendFullReportCreatedRequest$outboundSchema: z.ZodType<
|
|
68
|
+
SendFullReportCreatedRequest$Outbound,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
SendFullReportCreatedRequest
|
|
71
|
+
> = z.object({
|
|
72
|
+
greenSecuritySignature: z.string(),
|
|
73
|
+
greenSecurityEvent: z.string(),
|
|
74
|
+
greenSecurityIdempotencyKey: z.string(),
|
|
75
|
+
greenWebhookId: z.string(),
|
|
76
|
+
fullReport: components.FullReport$outboundSchema,
|
|
77
|
+
}).transform((v) => {
|
|
78
|
+
return remap$(v, {
|
|
79
|
+
greenSecuritySignature: "Green-Security-Signature",
|
|
80
|
+
greenSecurityEvent: "Green-Security-Event",
|
|
81
|
+
greenSecurityIdempotencyKey: "Green-Security-Idempotency-Key",
|
|
82
|
+
greenWebhookId: "Green-Webhook-Id",
|
|
83
|
+
fullReport: "FullReport",
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
export function sendFullReportCreatedRequestToJSON(
|
|
88
|
+
sendFullReportCreatedRequest: SendFullReportCreatedRequest,
|
|
89
|
+
): string {
|
|
90
|
+
return JSON.stringify(
|
|
91
|
+
SendFullReportCreatedRequest$outboundSchema.parse(
|
|
92
|
+
sendFullReportCreatedRequest,
|
|
93
|
+
),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
export function sendFullReportCreatedRequestFromJSON(
|
|
97
|
+
jsonString: string,
|
|
98
|
+
): SafeParseResult<SendFullReportCreatedRequest, SDKValidationError> {
|
|
99
|
+
return safeParse(
|
|
100
|
+
jsonString,
|
|
101
|
+
(x) => SendFullReportCreatedRequest$inboundSchema.parse(JSON.parse(x)),
|
|
102
|
+
`Failed to parse 'SendFullReportCreatedRequest' from JSON`,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import * as components from "../components/index.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
|
|
13
|
+
export type SendFullReportDestroyedRequest = {
|
|
14
|
+
/**
|
|
15
|
+
* `t=<unix seconds>,v1=<hex hmac>`, one `v1` per active secret. Each is
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* `HMAC-SHA256(secret, "<t>.<raw body>")`. Compare with a constant-time function and
|
|
19
|
+
* reject a timestamp that is not recent.
|
|
20
|
+
*/
|
|
21
|
+
greenSecuritySignature: string;
|
|
22
|
+
/**
|
|
23
|
+
* The event this delivery belongs to. Route on it when one URL serves several events.
|
|
24
|
+
*/
|
|
25
|
+
greenSecurityEvent: string;
|
|
26
|
+
/**
|
|
27
|
+
* Stable per delivery, including across retries. Key your de-duplication on it.
|
|
28
|
+
*/
|
|
29
|
+
greenSecurityIdempotencyKey: string;
|
|
30
|
+
/**
|
|
31
|
+
* The entity in the body.
|
|
32
|
+
*/
|
|
33
|
+
greenWebhookId: string;
|
|
34
|
+
fullReport: components.FullReport;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const SendFullReportDestroyedRequest$inboundSchema: z.ZodType<
|
|
39
|
+
SendFullReportDestroyedRequest,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({
|
|
43
|
+
"Green-Security-Signature": types.string(),
|
|
44
|
+
"Green-Security-Event": types.string(),
|
|
45
|
+
"Green-Security-Idempotency-Key": types.string(),
|
|
46
|
+
"Green-Webhook-Id": types.string(),
|
|
47
|
+
FullReport: components.FullReport$inboundSchema,
|
|
48
|
+
}).transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
"Green-Security-Signature": "greenSecuritySignature",
|
|
51
|
+
"Green-Security-Event": "greenSecurityEvent",
|
|
52
|
+
"Green-Security-Idempotency-Key": "greenSecurityIdempotencyKey",
|
|
53
|
+
"Green-Webhook-Id": "greenWebhookId",
|
|
54
|
+
"FullReport": "fullReport",
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
/** @internal */
|
|
58
|
+
export type SendFullReportDestroyedRequest$Outbound = {
|
|
59
|
+
"Green-Security-Signature": string;
|
|
60
|
+
"Green-Security-Event": string;
|
|
61
|
+
"Green-Security-Idempotency-Key": string;
|
|
62
|
+
"Green-Webhook-Id": string;
|
|
63
|
+
FullReport: components.FullReport$Outbound;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const SendFullReportDestroyedRequest$outboundSchema: z.ZodType<
|
|
68
|
+
SendFullReportDestroyedRequest$Outbound,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
SendFullReportDestroyedRequest
|
|
71
|
+
> = z.object({
|
|
72
|
+
greenSecuritySignature: z.string(),
|
|
73
|
+
greenSecurityEvent: z.string(),
|
|
74
|
+
greenSecurityIdempotencyKey: z.string(),
|
|
75
|
+
greenWebhookId: z.string(),
|
|
76
|
+
fullReport: components.FullReport$outboundSchema,
|
|
77
|
+
}).transform((v) => {
|
|
78
|
+
return remap$(v, {
|
|
79
|
+
greenSecuritySignature: "Green-Security-Signature",
|
|
80
|
+
greenSecurityEvent: "Green-Security-Event",
|
|
81
|
+
greenSecurityIdempotencyKey: "Green-Security-Idempotency-Key",
|
|
82
|
+
greenWebhookId: "Green-Webhook-Id",
|
|
83
|
+
fullReport: "FullReport",
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
export function sendFullReportDestroyedRequestToJSON(
|
|
88
|
+
sendFullReportDestroyedRequest: SendFullReportDestroyedRequest,
|
|
89
|
+
): string {
|
|
90
|
+
return JSON.stringify(
|
|
91
|
+
SendFullReportDestroyedRequest$outboundSchema.parse(
|
|
92
|
+
sendFullReportDestroyedRequest,
|
|
93
|
+
),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
export function sendFullReportDestroyedRequestFromJSON(
|
|
97
|
+
jsonString: string,
|
|
98
|
+
): SafeParseResult<SendFullReportDestroyedRequest, SDKValidationError> {
|
|
99
|
+
return safeParse(
|
|
100
|
+
jsonString,
|
|
101
|
+
(x) => SendFullReportDestroyedRequest$inboundSchema.parse(JSON.parse(x)),
|
|
102
|
+
`Failed to parse 'SendFullReportDestroyedRequest' from JSON`,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import * as components from "../components/index.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
|
|
13
|
+
export type SendFullReportUpdatedRequest = {
|
|
14
|
+
/**
|
|
15
|
+
* `t=<unix seconds>,v1=<hex hmac>`, one `v1` per active secret. Each is
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* `HMAC-SHA256(secret, "<t>.<raw body>")`. Compare with a constant-time function and
|
|
19
|
+
* reject a timestamp that is not recent.
|
|
20
|
+
*/
|
|
21
|
+
greenSecuritySignature: string;
|
|
22
|
+
/**
|
|
23
|
+
* The event this delivery belongs to. Route on it when one URL serves several events.
|
|
24
|
+
*/
|
|
25
|
+
greenSecurityEvent: string;
|
|
26
|
+
/**
|
|
27
|
+
* Stable per delivery, including across retries. Key your de-duplication on it.
|
|
28
|
+
*/
|
|
29
|
+
greenSecurityIdempotencyKey: string;
|
|
30
|
+
/**
|
|
31
|
+
* The entity in the body.
|
|
32
|
+
*/
|
|
33
|
+
greenWebhookId: string;
|
|
34
|
+
fullReport: components.FullReport;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const SendFullReportUpdatedRequest$inboundSchema: z.ZodType<
|
|
39
|
+
SendFullReportUpdatedRequest,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({
|
|
43
|
+
"Green-Security-Signature": types.string(),
|
|
44
|
+
"Green-Security-Event": types.string(),
|
|
45
|
+
"Green-Security-Idempotency-Key": types.string(),
|
|
46
|
+
"Green-Webhook-Id": types.string(),
|
|
47
|
+
FullReport: components.FullReport$inboundSchema,
|
|
48
|
+
}).transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
"Green-Security-Signature": "greenSecuritySignature",
|
|
51
|
+
"Green-Security-Event": "greenSecurityEvent",
|
|
52
|
+
"Green-Security-Idempotency-Key": "greenSecurityIdempotencyKey",
|
|
53
|
+
"Green-Webhook-Id": "greenWebhookId",
|
|
54
|
+
"FullReport": "fullReport",
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
/** @internal */
|
|
58
|
+
export type SendFullReportUpdatedRequest$Outbound = {
|
|
59
|
+
"Green-Security-Signature": string;
|
|
60
|
+
"Green-Security-Event": string;
|
|
61
|
+
"Green-Security-Idempotency-Key": string;
|
|
62
|
+
"Green-Webhook-Id": string;
|
|
63
|
+
FullReport: components.FullReport$Outbound;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const SendFullReportUpdatedRequest$outboundSchema: z.ZodType<
|
|
68
|
+
SendFullReportUpdatedRequest$Outbound,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
SendFullReportUpdatedRequest
|
|
71
|
+
> = z.object({
|
|
72
|
+
greenSecuritySignature: z.string(),
|
|
73
|
+
greenSecurityEvent: z.string(),
|
|
74
|
+
greenSecurityIdempotencyKey: z.string(),
|
|
75
|
+
greenWebhookId: z.string(),
|
|
76
|
+
fullReport: components.FullReport$outboundSchema,
|
|
77
|
+
}).transform((v) => {
|
|
78
|
+
return remap$(v, {
|
|
79
|
+
greenSecuritySignature: "Green-Security-Signature",
|
|
80
|
+
greenSecurityEvent: "Green-Security-Event",
|
|
81
|
+
greenSecurityIdempotencyKey: "Green-Security-Idempotency-Key",
|
|
82
|
+
greenWebhookId: "Green-Webhook-Id",
|
|
83
|
+
fullReport: "FullReport",
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
export function sendFullReportUpdatedRequestToJSON(
|
|
88
|
+
sendFullReportUpdatedRequest: SendFullReportUpdatedRequest,
|
|
89
|
+
): string {
|
|
90
|
+
return JSON.stringify(
|
|
91
|
+
SendFullReportUpdatedRequest$outboundSchema.parse(
|
|
92
|
+
sendFullReportUpdatedRequest,
|
|
93
|
+
),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
export function sendFullReportUpdatedRequestFromJSON(
|
|
97
|
+
jsonString: string,
|
|
98
|
+
): SafeParseResult<SendFullReportUpdatedRequest, SDKValidationError> {
|
|
99
|
+
return safeParse(
|
|
100
|
+
jsonString,
|
|
101
|
+
(x) => SendFullReportUpdatedRequest$inboundSchema.parse(JSON.parse(x)),
|
|
102
|
+
`Failed to parse 'SendFullReportUpdatedRequest' from JSON`,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
@@ -72,9 +72,9 @@ export type ReportsGetFullReportQueryError =
|
|
|
72
72
|
* | `404` | No such run, or it is outside your access scope. | Stop. |
|
|
73
73
|
* | `403` | Your account is locked, or lacks the `scheduled_reports` view permission. | Stop. |
|
|
74
74
|
*
|
|
75
|
-
* **Bound your polling.** A `409` is not a promise that the run will finish.
|
|
76
|
-
*
|
|
77
|
-
*
|
|
75
|
+
* **Bound your polling.** A `409` is not a promise that the run will finish. A run that fails
|
|
76
|
+
* while generating is now recorded as `failed` and answers `422`, but a run whose worker died
|
|
77
|
+
* outright still stays in `processing` and keeps answering `409` indefinitely. Apply your own
|
|
78
78
|
* timeout or maximum attempt count and treat exhaustion as a failure; do not retry forever.
|
|
79
79
|
*
|
|
80
80
|
* Access control: the URL's `full_report_id` must be in the caller's read scope for
|
|
@@ -122,9 +122,9 @@ export function useReportsGetFullReport(
|
|
|
122
122
|
* | `404` | No such run, or it is outside your access scope. | Stop. |
|
|
123
123
|
* | `403` | Your account is locked, or lacks the `scheduled_reports` view permission. | Stop. |
|
|
124
124
|
*
|
|
125
|
-
* **Bound your polling.** A `409` is not a promise that the run will finish.
|
|
126
|
-
*
|
|
127
|
-
*
|
|
125
|
+
* **Bound your polling.** A `409` is not a promise that the run will finish. A run that fails
|
|
126
|
+
* while generating is now recorded as `failed` and answers `422`, but a run whose worker died
|
|
127
|
+
* outright still stays in `processing` and keeps answering `409` indefinitely. Apply your own
|
|
128
128
|
* timeout or maximum attempt count and treat exhaustion as a failure; do not retry forever.
|
|
129
129
|
*
|
|
130
130
|
* Access control: the URL's `full_report_id` must be in the caller's read scope for
|
package/src/sdk/reports.ts
CHANGED
|
@@ -62,9 +62,9 @@ export class Reports extends ClientSDK {
|
|
|
62
62
|
* | `404` | No such run, or it is outside your access scope. | Stop. |
|
|
63
63
|
* | `403` | Your account is locked, or lacks the `scheduled_reports` view permission. | Stop. |
|
|
64
64
|
*
|
|
65
|
-
* **Bound your polling.** A `409` is not a promise that the run will finish.
|
|
66
|
-
*
|
|
67
|
-
*
|
|
65
|
+
* **Bound your polling.** A `409` is not a promise that the run will finish. A run that fails
|
|
66
|
+
* while generating is now recorded as `failed` and answers `422`, but a run whose worker died
|
|
67
|
+
* outright still stays in `processing` and keeps answering `409` indefinitely. Apply your own
|
|
68
68
|
* timeout or maximum attempt count and treat exhaustion as a failure; do not retry forever.
|
|
69
69
|
*
|
|
70
70
|
* Access control: the URL's `full_report_id` must be in the caller's read scope for
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -140,6 +140,9 @@ export class GreenSecurity extends ClientSDK {
|
|
|
140
140
|
} | Request;
|
|
141
141
|
secret: string;
|
|
142
142
|
}): Promise<
|
|
143
|
+
| webhooks.SendFullReportCreatedRequest
|
|
144
|
+
| webhooks.SendFullReportUpdatedRequest
|
|
145
|
+
| webhooks.SendFullReportDestroyedRequest
|
|
143
146
|
| webhooks.SendVendorCreatedRequest
|
|
144
147
|
| webhooks.SendVendorUpdatedRequest
|
|
145
148
|
| webhooks.SendVendorDestroyedRequest
|