@intellia/workflow-sdk 0.2.2 → 0.3.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/cjs/define-webhook.js +1 -0
- package/dist/cjs/define-webhook.js.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/define-webhook.js +1 -0
- package/dist/esm/define-webhook.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +15 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-webhook.js","sourceRoot":"","sources":["../../src/define-webhook.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"define-webhook.js","sourceRoot":"","sources":["../../src/define-webhook.ts"],"names":[],"mappings":";;;AAwDO,MAAM,aAAa,GAAG,CAAC,IAAiB,EAAiB,EAAE,CAAC,CAAC;IAClE,MAAM;QACJ,OAAO;YACL,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;SAClD,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAXU,QAAA,aAAa,iBAWvB"}
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAAwD;AAA/C,8FAAA,CAAC,OAAA;AAAE,yGAAA,YAAY,OAAA;AAAE,qGAAA,QAAQ,OAAA;AAClC,qCAQmB;AAPjB,oGAAA,SAAS,OAAA;AACT,gGAAA,KAAK,OAAA;AACL,kGAAA,OAAO,OAAA;AACP,gGAAA,KAAK,OAAA;AACL,kGAAA,OAAO,OAAA;AACP,8FAAA,GAAG,OAA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AAAE,yGAAA,QAAQ,OAAA;AAAE,uGAAA,MAAM,OAAA;AAAE,0GAAA,SAAS,OAAA;AAAE,wGAAA,OAAO,OAAA;AAEnE,qEAA+D;AAAtD,6HAAA,kBAAkB,OAAA;AAE3B,+DAA2D;AAAlD,yHAAA,iBAAiB,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-webhook.js","sourceRoot":"","sources":["../../src/define-webhook.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"define-webhook.js","sourceRoot":"","sources":["../../src/define-webhook.ts"],"names":[],"mappings":"AAwDA,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAiB,EAAiB,EAAE,CAAC,CAAC;IAClE,MAAM;QACJ,OAAO;YACL,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;SAClD,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,SAAS,EACT,KAAK,EACL,OAAO,EACP,KAAK,EACL,OAAO,EACP,GAAG,EACH,WAAW,GACZ,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAE5E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAS9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,SAAS,EACT,KAAK,EACL,OAAO,EACP,KAAK,EACL,OAAO,EACP,GAAG,EACH,WAAW,GACZ,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAE5E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAS9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAUpD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAYtD,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -233,6 +233,16 @@ interface WebhookResponseRuleSpec {
|
|
|
233
233
|
responseBody?: Record<string, string>;
|
|
234
234
|
skipHandlers?: boolean;
|
|
235
235
|
}
|
|
236
|
+
interface WebhookSignatureSpec {
|
|
237
|
+
/** The request header carrying the signature, e.g. `x-xero-signature`. */
|
|
238
|
+
header: string;
|
|
239
|
+
/** Default `hmac-sha256`, the only one supported. */
|
|
240
|
+
algorithm?: "hmac-sha256";
|
|
241
|
+
/** Default `base64`. */
|
|
242
|
+
encoding?: "base64" | "hex";
|
|
243
|
+
/** Stripped from the header value before comparing, e.g. `sha256=`. */
|
|
244
|
+
prefix?: string;
|
|
245
|
+
}
|
|
236
246
|
interface WebhookSpec {
|
|
237
247
|
name: string;
|
|
238
248
|
description?: string;
|
|
@@ -241,6 +251,9 @@ interface WebhookSpec {
|
|
|
241
251
|
* slug-less webhook retargets which row it updates. */
|
|
242
252
|
slug?: string;
|
|
243
253
|
responseRules?: WebhookResponseRuleSpec[];
|
|
254
|
+
/** Verify each call's HMAC signature. Omitted: the deployed webhook keeps
|
|
255
|
+
* whatever check it has. In a module, a webhook with a check needs a `slug`. */
|
|
256
|
+
signatureVerification?: WebhookSignatureSpec;
|
|
244
257
|
}
|
|
245
258
|
interface RecordedWebhook {
|
|
246
259
|
kind: "webhook";
|
|
@@ -248,6 +261,7 @@ interface RecordedWebhook {
|
|
|
248
261
|
description?: string;
|
|
249
262
|
slug?: string;
|
|
250
263
|
responseRules?: WebhookResponseRuleSpec[];
|
|
264
|
+
signatureVerification?: WebhookSignatureSpec;
|
|
251
265
|
}
|
|
252
266
|
interface WebhookModule {
|
|
253
267
|
record(): RecordedWebhook;
|
|
@@ -593,4 +607,4 @@ type NodeTypeSupport = {
|
|
|
593
607
|
declare const NODE_TYPE_SUPPORT: Record<WorkflowNodeType, NodeTypeSupport>;
|
|
594
608
|
|
|
595
609
|
export { Builder, IdAllocator, NODE_TYPE_SUPPORT, artifact, contains, defineAgentRef, defineFunction, defineKnowledgeBase, defineSchedule, defineTool, defineToolWorkflow, defineWebhook, defineWholeStateFunction, defineWorkflow, encodeValue, eq, gt, gte, handleFor, isNull, isPresent, isRecordedResource, isRef, isTpl, jsonata, lt, lte, refPath, toJsonSchema, tpl, tplText };
|
|
596
|
-
export type { AgentRefDef, AgentSpec, ApprovalSpec, BashSpec, Cond, ExecuteWorkflowSpec, FunctionDef, Handle, HutlyApi, KnowledgeBaseDef, NodeInput, NodeSpec, NodeTypeSupport, OnFailure, RecordedEntry, RecordedSchedule, RecordedWebhook, RecordedWorkflow, RefLike, ScheduleModule, ScheduleSpec, ScheduleTriggerSpec, Scope, ToolBuilder, ToolCallInput, ToolConfigFor, ToolConfigRegistry, ToolDef, ToolInstanceRegistry, ToolInstanceShape, ToolInstancesFor, ToolWorkflowSpec, TplLike, TriggerBindingsSpec, TriggerSpec, WaitForCallbackSpec, WebhookModule, WebhookResponseRuleSpec, WebhookSpec, WebhookTriggerSpec, WholeStateFunctionDef, WorkflowModule, WorkflowSpec };
|
|
610
|
+
export type { AgentRefDef, AgentSpec, ApprovalSpec, BashSpec, Cond, ExecuteWorkflowSpec, FunctionDef, Handle, HutlyApi, KnowledgeBaseDef, NodeInput, NodeSpec, NodeTypeSupport, OnFailure, RecordedEntry, RecordedSchedule, RecordedWebhook, RecordedWorkflow, RefLike, ScheduleModule, ScheduleSpec, ScheduleTriggerSpec, Scope, ToolBuilder, ToolCallInput, ToolConfigFor, ToolConfigRegistry, ToolDef, ToolInstanceRegistry, ToolInstanceShape, ToolInstancesFor, ToolWorkflowSpec, TplLike, TriggerBindingsSpec, TriggerSpec, WaitForCallbackSpec, WebhookModule, WebhookResponseRuleSpec, WebhookSignatureSpec, WebhookSpec, WebhookTriggerSpec, WholeStateFunctionDef, WorkflowModule, WorkflowSpec };
|