casedev 0.54.0 → 0.55.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.
Files changed (106) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/client.d.mts +3 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/index.d.mts +1 -0
  12. package/resources/index.d.mts.map +1 -1
  13. package/resources/index.d.ts +1 -0
  14. package/resources/index.d.ts.map +1 -1
  15. package/resources/index.js +3 -1
  16. package/resources/index.js.map +1 -1
  17. package/resources/index.mjs +1 -0
  18. package/resources/index.mjs.map +1 -1
  19. package/resources/webhooks/index.d.mts +3 -0
  20. package/resources/webhooks/index.d.mts.map +1 -0
  21. package/resources/webhooks/index.d.ts +3 -0
  22. package/resources/webhooks/index.d.ts.map +1 -0
  23. package/resources/webhooks/index.js +9 -0
  24. package/resources/webhooks/index.js.map +1 -0
  25. package/resources/webhooks/index.mjs +4 -0
  26. package/resources/webhooks/index.mjs.map +1 -0
  27. package/resources/webhooks/v1/deliveries.d.mts +42 -0
  28. package/resources/webhooks/v1/deliveries.d.mts.map +1 -0
  29. package/resources/webhooks/v1/deliveries.d.ts +42 -0
  30. package/resources/webhooks/v1/deliveries.d.ts.map +1 -0
  31. package/resources/webhooks/v1/deliveries.js +48 -0
  32. package/resources/webhooks/v1/deliveries.js.map +1 -0
  33. package/resources/webhooks/v1/deliveries.mjs +44 -0
  34. package/resources/webhooks/v1/deliveries.mjs.map +1 -0
  35. package/resources/webhooks/v1/endpoints.d.mts +121 -0
  36. package/resources/webhooks/v1/endpoints.d.mts.map +1 -0
  37. package/resources/webhooks/v1/endpoints.d.ts +121 -0
  38. package/resources/webhooks/v1/endpoints.d.ts.map +1 -0
  39. package/resources/webhooks/v1/endpoints.js +96 -0
  40. package/resources/webhooks/v1/endpoints.js.map +1 -0
  41. package/resources/webhooks/v1/endpoints.mjs +92 -0
  42. package/resources/webhooks/v1/endpoints.mjs.map +1 -0
  43. package/resources/webhooks/v1/event-types.d.mts +15 -0
  44. package/resources/webhooks/v1/event-types.d.mts.map +1 -0
  45. package/resources/webhooks/v1/event-types.d.ts +15 -0
  46. package/resources/webhooks/v1/event-types.d.ts.map +1 -0
  47. package/resources/webhooks/v1/event-types.js +24 -0
  48. package/resources/webhooks/v1/event-types.js.map +1 -0
  49. package/resources/webhooks/v1/event-types.mjs +20 -0
  50. package/resources/webhooks/v1/event-types.mjs.map +1 -0
  51. package/resources/webhooks/v1/index.d.mts +5 -0
  52. package/resources/webhooks/v1/index.d.mts.map +1 -0
  53. package/resources/webhooks/v1/index.d.ts +5 -0
  54. package/resources/webhooks/v1/index.d.ts.map +1 -0
  55. package/resources/webhooks/v1/index.js +13 -0
  56. package/resources/webhooks/v1/index.js.map +1 -0
  57. package/resources/webhooks/v1/index.mjs +6 -0
  58. package/resources/webhooks/v1/index.mjs.map +1 -0
  59. package/resources/webhooks/v1/v1.d.mts +18 -0
  60. package/resources/webhooks/v1/v1.d.mts.map +1 -0
  61. package/resources/webhooks/v1/v1.d.ts +18 -0
  62. package/resources/webhooks/v1/v1.d.ts.map +1 -0
  63. package/resources/webhooks/v1/v1.js +25 -0
  64. package/resources/webhooks/v1/v1.js.map +1 -0
  65. package/resources/webhooks/v1/v1.mjs +20 -0
  66. package/resources/webhooks/v1/v1.mjs.map +1 -0
  67. package/resources/webhooks/v1.d.mts +2 -0
  68. package/resources/webhooks/v1.d.mts.map +1 -0
  69. package/resources/webhooks/v1.d.ts +2 -0
  70. package/resources/webhooks/v1.d.ts.map +1 -0
  71. package/resources/webhooks/v1.js +6 -0
  72. package/resources/webhooks/v1.js.map +1 -0
  73. package/resources/webhooks/v1.mjs +3 -0
  74. package/resources/webhooks/v1.mjs.map +1 -0
  75. package/resources/webhooks/webhooks.d.mts +10 -0
  76. package/resources/webhooks/webhooks.d.mts.map +1 -0
  77. package/resources/webhooks/webhooks.d.ts +10 -0
  78. package/resources/webhooks/webhooks.d.ts.map +1 -0
  79. package/resources/webhooks/webhooks.js +17 -0
  80. package/resources/webhooks/webhooks.js.map +1 -0
  81. package/resources/webhooks/webhooks.mjs +12 -0
  82. package/resources/webhooks/webhooks.mjs.map +1 -0
  83. package/resources/webhooks.d.mts +2 -0
  84. package/resources/webhooks.d.mts.map +1 -0
  85. package/resources/webhooks.d.ts +2 -0
  86. package/resources/webhooks.d.ts.map +1 -0
  87. package/resources/webhooks.js +6 -0
  88. package/resources/webhooks.js.map +1 -0
  89. package/resources/webhooks.mjs +3 -0
  90. package/resources/webhooks.mjs.map +1 -0
  91. package/src/client.ts +5 -0
  92. package/src/resources/index.ts +1 -0
  93. package/src/resources/webhooks/index.ts +4 -0
  94. package/src/resources/webhooks/v1/deliveries.ts +74 -0
  95. package/src/resources/webhooks/v1/endpoints.ts +204 -0
  96. package/src/resources/webhooks/v1/event-types.ts +23 -0
  97. package/src/resources/webhooks/v1/index.ts +13 -0
  98. package/src/resources/webhooks/v1/v1.ts +45 -0
  99. package/src/resources/webhooks/v1.ts +3 -0
  100. package/src/resources/webhooks/webhooks.ts +15 -0
  101. package/src/resources/webhooks.ts +3 -0
  102. package/src/version.ts +1 -1
  103. package/version.d.mts +1 -1
  104. package/version.d.ts +1 -1
  105. package/version.js +1 -1
  106. package/version.mjs +1 -1
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Deliveries = void 0;
5
+ const resource_1 = require("../../../core/resource.js");
6
+ const headers_1 = require("../../../internal/headers.js");
7
+ const path_1 = require("../../../internal/utils/path.js");
8
+ /**
9
+ * Webhook endpoint management
10
+ */
11
+ class Deliveries extends resource_1.APIResource {
12
+ /**
13
+ * Get webhook delivery
14
+ */
15
+ retrieve(id, options) {
16
+ return this._client.get((0, path_1.path) `/webhooks/v1/deliveries/${id}`, {
17
+ ...options,
18
+ headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
19
+ });
20
+ }
21
+ /**
22
+ * Returns delivery attempts for the organization, newest first. Filter by
23
+ * endpoint_id or status to narrow results.
24
+ */
25
+ list(query = {}, options) {
26
+ return this._client.get('/webhooks/v1/deliveries', {
27
+ query,
28
+ ...options,
29
+ headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
30
+ });
31
+ }
32
+ /**
33
+ * Re-sends the original event to its endpoint. The payload is reconstructed from
34
+ * the delivery record (same eventId, eventType, and occurred_at). The signature
35
+ * header includes `svix-delivery-attempt: replay` so receivers can distinguish
36
+ * replays from first-time deliveries. Uses the endpoint's current signing secret —
37
+ * not the one in force at the original delivery time.
38
+ */
39
+ replay(id, body = {}, options) {
40
+ return this._client.post((0, path_1.path) `/webhooks/v1/deliveries/${id}/replay`, {
41
+ body,
42
+ ...options,
43
+ headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
44
+ });
45
+ }
46
+ }
47
+ exports.Deliveries = Deliveries;
48
+ //# sourceMappingURL=deliveries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deliveries.js","sourceRoot":"","sources":["../../../src/resources/webhooks/v1/deliveries.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,0DAAyD;AAEzD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,UAAW,SAAQ,sBAAW;IACzC;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,2BAA2B,EAAE,EAAE,EAAE;YAC3D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,QAA+C,EAAE,EAAE,OAAwB;QAC9E,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE;YACjD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CACJ,EAAU,EACV,OAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,2BAA2B,EAAE,SAAS,EAAE;YACnE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAzCD,gCAyCC"}
@@ -0,0 +1,44 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../../core/resource.mjs";
3
+ import { buildHeaders } from "../../../internal/headers.mjs";
4
+ import { path } from "../../../internal/utils/path.mjs";
5
+ /**
6
+ * Webhook endpoint management
7
+ */
8
+ export class Deliveries extends APIResource {
9
+ /**
10
+ * Get webhook delivery
11
+ */
12
+ retrieve(id, options) {
13
+ return this._client.get(path `/webhooks/v1/deliveries/${id}`, {
14
+ ...options,
15
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
16
+ });
17
+ }
18
+ /**
19
+ * Returns delivery attempts for the organization, newest first. Filter by
20
+ * endpoint_id or status to narrow results.
21
+ */
22
+ list(query = {}, options) {
23
+ return this._client.get('/webhooks/v1/deliveries', {
24
+ query,
25
+ ...options,
26
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
27
+ });
28
+ }
29
+ /**
30
+ * Re-sends the original event to its endpoint. The payload is reconstructed from
31
+ * the delivery record (same eventId, eventType, and occurred_at). The signature
32
+ * header includes `svix-delivery-attempt: replay` so receivers can distinguish
33
+ * replays from first-time deliveries. Uses the endpoint's current signing secret —
34
+ * not the one in force at the original delivery time.
35
+ */
36
+ replay(id, body = {}, options) {
37
+ return this._client.post(path `/webhooks/v1/deliveries/${id}/replay`, {
38
+ body,
39
+ ...options,
40
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
41
+ });
42
+ }
43
+ }
44
+ //# sourceMappingURL=deliveries.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deliveries.mjs","sourceRoot":"","sources":["../../../src/resources/webhooks/v1/deliveries.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,2BAA2B,EAAE,EAAE,EAAE;YAC3D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,QAA+C,EAAE,EAAE,OAAwB;QAC9E,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE;YACjD,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CACJ,EAAU,EACV,OAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,2BAA2B,EAAE,SAAS,EAAE;YACnE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,121 @@
1
+ import { APIResource } from "../../../core/resource.mjs";
2
+ import { APIPromise } from "../../../core/api-promise.mjs";
3
+ import { RequestOptions } from "../../../internal/request-options.mjs";
4
+ /**
5
+ * Webhook endpoint management
6
+ */
7
+ export declare class Endpoints extends APIResource {
8
+ /**
9
+ * Creates a webhook endpoint that receives platform events matching the supplied
10
+ * event-type filters. Returns the generated signing secret ONCE — the response is
11
+ * the only time it is shown in plaintext.
12
+ */
13
+ create(body: EndpointCreateParams, options?: RequestOptions): APIPromise<void>;
14
+ /**
15
+ * Get webhook endpoint
16
+ */
17
+ retrieve(id: string, options?: RequestOptions): APIPromise<void>;
18
+ /**
19
+ * Partially updates a webhook endpoint. Any omitted field is left unchanged.
20
+ * Signing secrets are rotated via the separate /rotate_secret endpoint.
21
+ */
22
+ update(id: string, body: EndpointUpdateParams, options?: RequestOptions): APIPromise<void>;
23
+ /**
24
+ * Returns the organization's webhook endpoints, newest first. Signing secrets are
25
+ * never included.
26
+ */
27
+ list(query?: EndpointListParams | null | undefined, options?: RequestOptions): APIPromise<void>;
28
+ /**
29
+ * Soft-deletes a webhook endpoint. Delivery stops immediately and the endpoint no
30
+ * longer appears in list results. Delivery history is preserved (and can be
31
+ * fetched via GET /deliveries with the endpoint_id filter) so audit trails and
32
+ * post-mortem debugging remain possible.
33
+ */
34
+ delete(id: string, options?: RequestOptions): APIPromise<void>;
35
+ /**
36
+ * Generates a new signing secret for the endpoint. The previous secret remains
37
+ * valid until `previousSecretExpiresInSec` elapses (default 24h, max 30 days).
38
+ * During the grace window deliveries are signed with both secrets so receivers can
39
+ * migrate without downtime. Returns the new secret — this is the only time it is
40
+ * shown in plaintext.
41
+ */
42
+ rotateSecret(id: string, body?: EndpointRotateSecretParams | null | undefined, options?: RequestOptions): APIPromise<void>;
43
+ /**
44
+ * Synchronously delivers a synthetic `webhook.test` event to the endpoint and
45
+ * returns the HTTP result. No retries. Useful for validating that a new endpoint
46
+ * is reachable and its signature verifier works. The delivery is not persisted in
47
+ * the delivery history.
48
+ */
49
+ test(id: string, body?: EndpointTestParams | null | undefined, options?: RequestOptions): APIPromise<void>;
50
+ }
51
+ export interface EndpointCreateParams {
52
+ /**
53
+ * Glob patterns of event types to deliver (e.g. "vault._", "ocr.job.completed",
54
+ * "_")
55
+ */
56
+ eventTypeFilters: Array<string>;
57
+ /**
58
+ * HTTPS callback URL that will receive event deliveries
59
+ */
60
+ url: string;
61
+ /**
62
+ * Human-readable label for this endpoint
63
+ */
64
+ description?: string;
65
+ /**
66
+ * Optional per-resource allowlists. If vaultIds is set, only events for those
67
+ * vaults are delivered. Same for matterIds.
68
+ */
69
+ resourceScopes?: EndpointCreateParams.ResourceScopes;
70
+ }
71
+ export declare namespace EndpointCreateParams {
72
+ /**
73
+ * Optional per-resource allowlists. If vaultIds is set, only events for those
74
+ * vaults are delivered. Same for matterIds.
75
+ */
76
+ interface ResourceScopes {
77
+ matterIds?: Array<string>;
78
+ vaultIds?: Array<string>;
79
+ }
80
+ }
81
+ export interface EndpointUpdateParams {
82
+ description?: string | null;
83
+ eventTypeFilters?: Array<string>;
84
+ resourceScopes?: EndpointUpdateParams.ResourceScopes | null;
85
+ status?: 'active' | 'disabled';
86
+ url?: string;
87
+ }
88
+ export declare namespace EndpointUpdateParams {
89
+ interface ResourceScopes {
90
+ matterIds?: Array<string>;
91
+ vaultIds?: Array<string>;
92
+ }
93
+ }
94
+ export interface EndpointListParams {
95
+ limit?: number;
96
+ /**
97
+ * Filter by endpoint status
98
+ */
99
+ status?: 'active' | 'disabled' | 'auto_disabled';
100
+ }
101
+ export interface EndpointRotateSecretParams {
102
+ /**
103
+ * How long (seconds) the old secret continues to be accepted. 0 invalidates
104
+ * immediately. Default: 86400 (24h).
105
+ */
106
+ previousSecretExpiresInSec?: number;
107
+ }
108
+ export interface EndpointTestParams {
109
+ /**
110
+ * Event type to simulate. Defaults to "webhook.test".
111
+ */
112
+ eventType?: string;
113
+ /**
114
+ * Custom `data` payload. Defaults to a small placeholder.
115
+ */
116
+ payload?: unknown;
117
+ }
118
+ export declare namespace Endpoints {
119
+ export { type EndpointCreateParams as EndpointCreateParams, type EndpointUpdateParams as EndpointUpdateParams, type EndpointListParams as EndpointListParams, type EndpointRotateSecretParams as EndpointRotateSecretParams, type EndpointTestParams as EndpointTestParams, };
120
+ }
121
+ //# sourceMappingURL=endpoints.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoints.d.mts","sourceRoot":"","sources":["../../../src/resources/webhooks/v1/endpoints.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAQ9E;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOhE;;;OAGG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAQ1F;;;OAGG;IACH,IAAI,CAAC,KAAK,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EAAE,OAAO,CAAC,EAAE,c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pC,UAAiB,cAAc;QAC7B,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAE1B,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;KAC1B;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,eAAe,CAAC;CAClD;AAED,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACrC;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
@@ -0,0 +1,121 @@
1
+ import { APIResource } from "../../../core/resource.js";
2
+ import { APIPromise } from "../../../core/api-promise.js";
3
+ import { RequestOptions } from "../../../internal/request-options.js";
4
+ /**
5
+ * Webhook endpoint management
6
+ */
7
+ export declare class Endpoints extends APIResource {
8
+ /**
9
+ * Creates a webhook endpoint that receives platform events matching the supplied
10
+ * event-type filters. Returns the generated signing secret ONCE — the response is
11
+ * the only time it is shown in plaintext.
12
+ */
13
+ create(body: EndpointCreateParams, options?: RequestOptions): APIPromise<void>;
14
+ /**
15
+ * Get webhook endpoint
16
+ */
17
+ retrieve(id: string, options?: RequestOptions): APIPromise<void>;
18
+ /**
19
+ * Partially updates a webhook endpoint. Any omitted field is left unchanged.
20
+ * Signing secrets are rotated via the separate /rotate_secret endpoint.
21
+ */
22
+ update(id: string, body: EndpointUpdateParams, options?: RequestOptions): APIPromise<void>;
23
+ /**
24
+ * Returns the organization's webhook endpoints, newest first. Signing secrets are
25
+ * never included.
26
+ */
27
+ list(query?: EndpointListParams | null | undefined, options?: RequestOptions): APIPromise<void>;
28
+ /**
29
+ * Soft-deletes a webhook endpoint. Delivery stops immediately and the endpoint no
30
+ * longer appears in list results. Delivery history is preserved (and can be
31
+ * fetched via GET /deliveries with the endpoint_id filter) so audit trails and
32
+ * post-mortem debugging remain possible.
33
+ */
34
+ delete(id: string, options?: RequestOptions): APIPromise<void>;
35
+ /**
36
+ * Generates a new signing secret for the endpoint. The previous secret remains
37
+ * valid until `previousSecretExpiresInSec` elapses (default 24h, max 30 days).
38
+ * During the grace window deliveries are signed with both secrets so receivers can
39
+ * migrate without downtime. Returns the new secret — this is the only time it is
40
+ * shown in plaintext.
41
+ */
42
+ rotateSecret(id: string, body?: EndpointRotateSecretParams | null | undefined, options?: RequestOptions): APIPromise<void>;
43
+ /**
44
+ * Synchronously delivers a synthetic `webhook.test` event to the endpoint and
45
+ * returns the HTTP result. No retries. Useful for validating that a new endpoint
46
+ * is reachable and its signature verifier works. The delivery is not persisted in
47
+ * the delivery history.
48
+ */
49
+ test(id: string, body?: EndpointTestParams | null | undefined, options?: RequestOptions): APIPromise<void>;
50
+ }
51
+ export interface EndpointCreateParams {
52
+ /**
53
+ * Glob patterns of event types to deliver (e.g. "vault._", "ocr.job.completed",
54
+ * "_")
55
+ */
56
+ eventTypeFilters: Array<string>;
57
+ /**
58
+ * HTTPS callback URL that will receive event deliveries
59
+ */
60
+ url: string;
61
+ /**
62
+ * Human-readable label for this endpoint
63
+ */
64
+ description?: string;
65
+ /**
66
+ * Optional per-resource allowlists. If vaultIds is set, only events for those
67
+ * vaults are delivered. Same for matterIds.
68
+ */
69
+ resourceScopes?: EndpointCreateParams.ResourceScopes;
70
+ }
71
+ export declare namespace EndpointCreateParams {
72
+ /**
73
+ * Optional per-resource allowlists. If vaultIds is set, only events for those
74
+ * vaults are delivered. Same for matterIds.
75
+ */
76
+ interface ResourceScopes {
77
+ matterIds?: Array<string>;
78
+ vaultIds?: Array<string>;
79
+ }
80
+ }
81
+ export interface EndpointUpdateParams {
82
+ description?: string | null;
83
+ eventTypeFilters?: Array<string>;
84
+ resourceScopes?: EndpointUpdateParams.ResourceScopes | null;
85
+ status?: 'active' | 'disabled';
86
+ url?: string;
87
+ }
88
+ export declare namespace EndpointUpdateParams {
89
+ interface ResourceScopes {
90
+ matterIds?: Array<string>;
91
+ vaultIds?: Array<string>;
92
+ }
93
+ }
94
+ export interface EndpointListParams {
95
+ limit?: number;
96
+ /**
97
+ * Filter by endpoint status
98
+ */
99
+ status?: 'active' | 'disabled' | 'auto_disabled';
100
+ }
101
+ export interface EndpointRotateSecretParams {
102
+ /**
103
+ * How long (seconds) the old secret continues to be accepted. 0 invalidates
104
+ * immediately. Default: 86400 (24h).
105
+ */
106
+ previousSecretExpiresInSec?: number;
107
+ }
108
+ export interface EndpointTestParams {
109
+ /**
110
+ * Event type to simulate. Defaults to "webhook.test".
111
+ */
112
+ eventType?: string;
113
+ /**
114
+ * Custom `data` payload. Defaults to a small placeholder.
115
+ */
116
+ payload?: unknown;
117
+ }
118
+ export declare namespace Endpoints {
119
+ export { type EndpointCreateParams as EndpointCreateParams, type EndpointUpdateParams as EndpointUpdateParams, type EndpointListParams as EndpointListParams, type EndpointRotateSecretParams as EndpointRotateSecretParams, type EndpointTestParams as EndpointTestParams, };
120
+ }
121
+ //# sourceMappingURL=endpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../src/resources/webhooks/v1/endpoints.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE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BUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Endpoints = void 0;
5
+ const resource_1 = require("../../../core/resource.js");
6
+ const headers_1 = require("../../../internal/headers.js");
7
+ const path_1 = require("../../../internal/utils/path.js");
8
+ /**
9
+ * Webhook endpoint management
10
+ */
11
+ class Endpoints extends resource_1.APIResource {
12
+ /**
13
+ * Creates a webhook endpoint that receives platform events matching the supplied
14
+ * event-type filters. Returns the generated signing secret ONCE — the response is
15
+ * the only time it is shown in plaintext.
16
+ */
17
+ create(body, options) {
18
+ return this._client.post('/webhooks/v1/endpoints', {
19
+ body,
20
+ ...options,
21
+ headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
22
+ });
23
+ }
24
+ /**
25
+ * Get webhook endpoint
26
+ */
27
+ retrieve(id, options) {
28
+ return this._client.get((0, path_1.path) `/webhooks/v1/endpoints/${id}`, {
29
+ ...options,
30
+ headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
31
+ });
32
+ }
33
+ /**
34
+ * Partially updates a webhook endpoint. Any omitted field is left unchanged.
35
+ * Signing secrets are rotated via the separate /rotate_secret endpoint.
36
+ */
37
+ update(id, body, options) {
38
+ return this._client.patch((0, path_1.path) `/webhooks/v1/endpoints/${id}`, {
39
+ body,
40
+ ...options,
41
+ headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
42
+ });
43
+ }
44
+ /**
45
+ * Returns the organization's webhook endpoints, newest first. Signing secrets are
46
+ * never included.
47
+ */
48
+ list(query = {}, options) {
49
+ return this._client.get('/webhooks/v1/endpoints', {
50
+ query,
51
+ ...options,
52
+ headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
53
+ });
54
+ }
55
+ /**
56
+ * Soft-deletes a webhook endpoint. Delivery stops immediately and the endpoint no
57
+ * longer appears in list results. Delivery history is preserved (and can be
58
+ * fetched via GET /deliveries with the endpoint_id filter) so audit trails and
59
+ * post-mortem debugging remain possible.
60
+ */
61
+ delete(id, options) {
62
+ return this._client.delete((0, path_1.path) `/webhooks/v1/endpoints/${id}`, {
63
+ ...options,
64
+ headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
65
+ });
66
+ }
67
+ /**
68
+ * Generates a new signing secret for the endpoint. The previous secret remains
69
+ * valid until `previousSecretExpiresInSec` elapses (default 24h, max 30 days).
70
+ * During the grace window deliveries are signed with both secrets so receivers can
71
+ * migrate without downtime. Returns the new secret — this is the only time it is
72
+ * shown in plaintext.
73
+ */
74
+ rotateSecret(id, body = {}, options) {
75
+ return this._client.post((0, path_1.path) `/webhooks/v1/endpoints/${id}/rotate_secret`, {
76
+ body,
77
+ ...options,
78
+ headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
79
+ });
80
+ }
81
+ /**
82
+ * Synchronously delivers a synthetic `webhook.test` event to the endpoint and
83
+ * returns the HTTP result. No retries. Useful for validating that a new endpoint
84
+ * is reachable and its signature verifier works. The delivery is not persisted in
85
+ * the delivery history.
86
+ */
87
+ test(id, body = {}, options) {
88
+ return this._client.post((0, path_1.path) `/webhooks/v1/endpoints/${id}/test`, {
89
+ body,
90
+ ...options,
91
+ headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
92
+ });
93
+ }
94
+ }
95
+ exports.Endpoints = Endpoints;
96
+ //# sourceMappingURL=endpoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../../src/resources/webhooks/v1/endpoints.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,0DAAyD;AAEzD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;OAIG;IACH,MAAM,CAAC,IAA0B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE;YACjD,IAAI;YACJ,GAAG,OAAO;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IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,YAAY,CACV,EAAU,EACV,OAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,0BAA0B,EAAE,gBAAgB,EAAE;YACzE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,IAAI,CACF,EAAU,EACV,OAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,0BAA0B,EAAE,OAAO,EAAE;YAChE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAjGD,8BAiGC"}
@@ -0,0 +1,92 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../../core/resource.mjs";
3
+ import { buildHeaders } from "../../../internal/headers.mjs";
4
+ import { path } from "../../../internal/utils/path.mjs";
5
+ /**
6
+ * Webhook endpoint management
7
+ */
8
+ export class Endpoints extends APIResource {
9
+ /**
10
+ * Creates a webhook endpoint that receives platform events matching the supplied
11
+ * event-type filters. Returns the generated signing secret ONCE — the response is
12
+ * the only time it is shown in plaintext.
13
+ */
14
+ create(body, options) {
15
+ return this._client.post('/webhooks/v1/endpoints', {
16
+ body,
17
+ ...options,
18
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
19
+ });
20
+ }
21
+ /**
22
+ * Get webhook endpoint
23
+ */
24
+ retrieve(id, options) {
25
+ return this._client.get(path `/webhooks/v1/endpoints/${id}`, {
26
+ ...options,
27
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
28
+ });
29
+ }
30
+ /**
31
+ * Partially updates a webhook endpoint. Any omitted field is left unchanged.
32
+ * Signing secrets are rotated via the separate /rotate_secret endpoint.
33
+ */
34
+ update(id, body, options) {
35
+ return this._client.patch(path `/webhooks/v1/endpoints/${id}`, {
36
+ body,
37
+ ...options,
38
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
39
+ });
40
+ }
41
+ /**
42
+ * Returns the organization's webhook endpoints, newest first. Signing secrets are
43
+ * never included.
44
+ */
45
+ list(query = {}, options) {
46
+ return this._client.get('/webhooks/v1/endpoints', {
47
+ query,
48
+ ...options,
49
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
50
+ });
51
+ }
52
+ /**
53
+ * Soft-deletes a webhook endpoint. Delivery stops immediately and the endpoint no
54
+ * longer appears in list results. Delivery history is preserved (and can be
55
+ * fetched via GET /deliveries with the endpoint_id filter) so audit trails and
56
+ * post-mortem debugging remain possible.
57
+ */
58
+ delete(id, options) {
59
+ return this._client.delete(path `/webhooks/v1/endpoints/${id}`, {
60
+ ...options,
61
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
62
+ });
63
+ }
64
+ /**
65
+ * Generates a new signing secret for the endpoint. The previous secret remains
66
+ * valid until `previousSecretExpiresInSec` elapses (default 24h, max 30 days).
67
+ * During the grace window deliveries are signed with both secrets so receivers can
68
+ * migrate without downtime. Returns the new secret — this is the only time it is
69
+ * shown in plaintext.
70
+ */
71
+ rotateSecret(id, body = {}, options) {
72
+ return this._client.post(path `/webhooks/v1/endpoints/${id}/rotate_secret`, {
73
+ body,
74
+ ...options,
75
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
76
+ });
77
+ }
78
+ /**
79
+ * Synchronously delivers a synthetic `webhook.test` event to the endpoint and
80
+ * returns the HTTP result. No retries. Useful for validating that a new endpoint
81
+ * is reachable and its signature verifier works. The delivery is not persisted in
82
+ * the delivery history.
83
+ */
84
+ test(id, body = {}, options) {
85
+ return this._client.post(path `/webhooks/v1/endpoints/${id}/test`, {
86
+ body,
87
+ ...options,
88
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
89
+ });
90
+ }
91
+ }
92
+ //# sourceMappingURL=endpoints.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoints.mjs","sourceRoot":"","sources":["../../../src/resources/webhooks/v1/endpoints.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;OAIG;IACH,MAAM,CAAC,IAA0B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE;YACjD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,0BAA0B,EAAE,EAAE,EAAE;YAC1D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,EAAU,EAAE,IAA0B,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,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,OAAO,EAAE;YAChE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,15 @@
1
+ import { APIResource } from "../../../core/resource.mjs";
2
+ import { APIPromise } from "../../../core/api-promise.mjs";
3
+ import { RequestOptions } from "../../../internal/request-options.mjs";
4
+ /**
5
+ * Webhook endpoint management
6
+ */
7
+ export declare class EventTypes extends APIResource {
8
+ /**
9
+ * Returns the catalog of event types that can be subscribed to via webhook
10
+ * endpoints. Each entry lists the required service scope the API key must carry to
11
+ * subscribe, plus the stability level.
12
+ */
13
+ list(options?: RequestOptions): APIPromise<void>;
14
+ }
15
+ //# sourceMappingURL=event-types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-types.d.mts","sourceRoot":"","sources":["../../../src/resources/webhooks/v1/event-types.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;OAIG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAMjD"}
@@ -0,0 +1,15 @@
1
+ import { APIResource } from "../../../core/resource.js";
2
+ import { APIPromise } from "../../../core/api-promise.js";
3
+ import { RequestOptions } from "../../../internal/request-options.js";
4
+ /**
5
+ * Webhook endpoint management
6
+ */
7
+ export declare class EventTypes extends APIResource {
8
+ /**
9
+ * Returns the catalog of event types that can be subscribed to via webhook
10
+ * endpoints. Each entry lists the required service scope the API key must carry to
11
+ * subscribe, plus the stability level.
12
+ */
13
+ list(options?: RequestOptions): APIPromise<void>;
14
+ }
15
+ //# sourceMappingURL=event-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-types.d.ts","sourceRoot":"","sources":["../../../src/resources/webhooks/v1/event-types.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;OAIG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAMjD"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.EventTypes = void 0;
5
+ const resource_1 = require("../../../core/resource.js");
6
+ const headers_1 = require("../../../internal/headers.js");
7
+ /**
8
+ * Webhook endpoint management
9
+ */
10
+ class EventTypes extends resource_1.APIResource {
11
+ /**
12
+ * Returns the catalog of event types that can be subscribed to via webhook
13
+ * endpoints. Each entry lists the required service scope the API key must carry to
14
+ * subscribe, plus the stability level.
15
+ */
16
+ list(options) {
17
+ return this._client.get('/webhooks/v1/event_types', {
18
+ ...options,
19
+ headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
20
+ });
21
+ }
22
+ }
23
+ exports.EventTypes = EventTypes;
24
+ //# sourceMappingURL=event-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-types.js","sourceRoot":"","sources":["../../../src/resources/webhooks/v1/event-types.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,0DAAyD;AAGzD;;GAEG;AACH,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;OAIG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE;YAClD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAZD,gCAYC"}
@@ -0,0 +1,20 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../../core/resource.mjs";
3
+ import { buildHeaders } from "../../../internal/headers.mjs";
4
+ /**
5
+ * Webhook endpoint management
6
+ */
7
+ export class EventTypes extends APIResource {
8
+ /**
9
+ * Returns the catalog of event types that can be subscribed to via webhook
10
+ * endpoints. Each entry lists the required service scope the API key must carry to
11
+ * subscribe, plus the stability level.
12
+ */
13
+ list(options) {
14
+ return this._client.get('/webhooks/v1/event_types', {
15
+ ...options,
16
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
17
+ });
18
+ }
19
+ }
20
+ //# sourceMappingURL=event-types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-types.mjs","sourceRoot":"","sources":["../../../src/resources/webhooks/v1/event-types.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;AAGvB;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;OAIG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE;YAClD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}