@gscdump/sdk 4.6.0 → 4.7.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/package.mjs +1 -1
- package/dist/v1/http.mjs +1 -0
- package/dist/webhook.d.mts +11 -3
- package/package.json +3 -3
package/dist/package.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var version = "4.
|
|
1
|
+
var version = "4.7.0";
|
|
2
2
|
export { version };
|
package/dist/v1/http.mjs
CHANGED
|
@@ -366,6 +366,7 @@ function createGscdumpV1Client(options) {
|
|
|
366
366
|
return {
|
|
367
367
|
execute,
|
|
368
368
|
getUserLifecycle: (input, executeOptions) => execute("partner.users.lifecycle.get", input, executeOptions),
|
|
369
|
+
getUserEntitlements: (input, executeOptions) => execute("partner.users.entitlements.get", input, executeOptions),
|
|
369
370
|
listAvailableSites: (input, executeOptions) => execute("partner.users.sites.available.list", input, executeOptions),
|
|
370
371
|
createSite: (input, executeOptions) => execute("partner.users.sites.create", input, executeOptions),
|
|
371
372
|
createUser: (input, executeOptions) => execute("partner.users.create", input, executeOptions),
|
package/dist/webhook.d.mts
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import { CANONICAL_WEBHOOK_EVENTS, PartnerWebhookHeaders, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, WebhookEnvelope } from "@gscdump/contracts";
|
|
1
|
+
import { CANONICAL_WEBHOOK_EVENTS, CanonicalWebhookEnvelope, PartnerWebhookHeaders, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, WebhookEnvelope } from "@gscdump/contracts";
|
|
2
2
|
export declare function signWebhookPayload(payload: string | object, secret: string): Promise<string>;
|
|
3
3
|
export declare function verifyWebhookSignature(payload: string | object, signature: string | null | undefined, secret: string): Promise<boolean>;
|
|
4
|
-
export
|
|
4
|
+
export interface ParseWebhookPayloadOptions {
|
|
5
5
|
secret?: string;
|
|
6
6
|
signature?: string | null;
|
|
7
7
|
headers?: PartnerWebhookHeaders | Headers;
|
|
8
8
|
validateSignature?: boolean;
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Verify and parse a webhook delivery. Without a type argument the result is
|
|
12
|
+
* discriminated on `event`, so narrowing on `'user.allowance.notice'` gives a
|
|
13
|
+
* typed, validated `data`. With a type argument the result is
|
|
14
|
+
* `WebhookEnvelope<TData>`, and only the typed events have validated `data`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function parseWebhookPayload(payload: string | object, options?: ParseWebhookPayloadOptions): Promise<CanonicalWebhookEnvelope>;
|
|
17
|
+
export declare function parseWebhookPayload<TData extends Record<string, unknown>>(payload: string | object, options?: ParseWebhookPayloadOptions): Promise<WebhookEnvelope<TData>>;
|
|
10
18
|
export declare function readWebhookHeaders(headers: Headers | PartnerWebhookHeaders | null | undefined): Required<PartnerWebhookHeaders>;
|
|
11
19
|
export { CANONICAL_WEBHOOK_EVENTS, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gscdump/sdk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.7.0",
|
|
5
5
|
"description": "Consumer SDK for hosted gscdump.com integrations.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -144,8 +144,8 @@
|
|
|
144
144
|
"node": ">=22.13.0"
|
|
145
145
|
},
|
|
146
146
|
"dependencies": {
|
|
147
|
-
"@gscdump/contracts": "^4.
|
|
148
|
-
"gscdump": "^4.
|
|
147
|
+
"@gscdump/contracts": "^4.7.0",
|
|
148
|
+
"gscdump": "^4.7.0",
|
|
149
149
|
"ofetch": "^1.5.1",
|
|
150
150
|
"zod": "^4.6.5"
|
|
151
151
|
},
|