@slates/test 1.0.0-rc.27 → 1.0.0-rc.29

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/index.cjs CHANGED
@@ -20,10 +20,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ authenticateSlateTriggerGroupWebhookDelivery: () => authenticateSlateTriggerGroupWebhookDelivery,
23
24
  connectSlateTriggerGroupGateway: () => connectSlateTriggerGroupGateway,
24
25
  createLocalSlateTestClient: () => createLocalSlateTestClient,
25
26
  createSlatesTestClient: () => createSlatesTestClient,
26
27
  describeMcpCompatibleToolSchemas: () => describeMcpCompatibleToolSchemas,
28
+ expandSlateTriggerGroupWebhook: () => expandSlateTriggerGroupWebhook,
27
29
  expectMcpCompatibleToolSchema: () => expectMcpCompatibleToolSchema,
28
30
  expectSlateContract: () => expectSlateContract,
29
31
  expectSlateError: () => expectSlateError,
@@ -31,6 +33,8 @@ __export(index_exports, {
31
33
  getMcpCompatibleToolSchemaCases: () => getMcpCompatibleToolSchemaCases,
32
34
  getSlateContract: () => getSlateContract,
33
35
  getVitestExpect: () => getVitestExpect,
36
+ listSlateOptionListOptions: () => listSlateOptionListOptions,
37
+ listSlateTriggerGroupSelectionOptions: () => listSlateTriggerGroupSelectionOptions,
34
38
  loadSlatesProfile: () => loadSlatesProfile,
35
39
  loadSlatesRuntimeContext: () => loadSlatesRuntimeContext,
36
40
  mapSlateTriggerEvent: () => mapSlateTriggerEvent,
@@ -38,6 +42,7 @@ __export(index_exports, {
38
42
  processSlateTriggerGroupWebhook: () => processSlateTriggerGroupWebhook,
39
43
  receiveSlateTriggerGroupGatewayFrames: () => receiveSlateTriggerGroupGatewayFrames,
40
44
  registerSlateTriggerGroupWebhook: () => registerSlateTriggerGroupWebhook,
45
+ renewSlateTriggerGroupWebhook: () => renewSlateTriggerGroupWebhook,
41
46
  unregisterSlateTriggerGroupWebhook: () => unregisterSlateTriggerGroupWebhook,
42
47
  withSlateProfile: () => withSlateProfile
43
48
  });
@@ -255,19 +260,36 @@ var expectSlateContract = async (d) => {
255
260
  }
256
261
  return contract;
257
262
  };
258
- var registerSlateTriggerGroupWebhook = async (d) => d.client.registerTriggerGroupWebhook({
259
- triggerGroupId: d.triggerGroupId,
260
- webhookTargetIdentifier: d.webhookTargetIdentifier,
261
- webhookTargetPayload: d.webhookTargetPayload,
262
- webhookUrl: d.webhookUrl
263
- });
263
+ var registerSlateTriggerGroupWebhook = async (d) => {
264
+ let { client, ...input } = d;
265
+ return client.registerTriggerGroupWebhook(input);
266
+ };
267
+ var renewSlateTriggerGroupWebhook = async (d) => {
268
+ let { client, ...input } = d;
269
+ return client.renewTriggerGroupWebhook(input);
270
+ };
271
+ var expandSlateTriggerGroupWebhook = async (d) => {
272
+ let { client, ...input } = d;
273
+ return client.expandTriggerGroupWebhook(input);
274
+ };
264
275
  var pollSlateTriggerGroupEvents = async (d) => {
265
276
  d.client.ensureSession();
266
277
  return d.client.pollTriggerGroup({
267
278
  triggerGroupId: d.triggerGroupId,
268
- state: d.state ?? null
279
+ state: d.state ?? null,
280
+ selection: d.selection
269
281
  });
270
282
  };
283
+ var listSlateTriggerGroupSelectionOptions = async (d) => {
284
+ let { client, ...input } = d;
285
+ client.ensureSession();
286
+ return client.listTriggerGroupSelectionOptions(input);
287
+ };
288
+ var listSlateOptionListOptions = async (d) => {
289
+ let { client, ...input } = d;
290
+ client.ensureSession();
291
+ return client.listOptionListOptions(input);
292
+ };
271
293
  var connectSlateTriggerGroupGateway = async (d) => {
272
294
  d.client.ensureSession();
273
295
  return d.client.connectTriggerGroupGateway({
@@ -292,6 +314,14 @@ var processSlateTriggerGroupWebhook = async (d) => d.client.processTriggerGroupW
292
314
  body: d.body,
293
315
  webhookRegistrationPayload: d.webhookRegistrationPayload ?? null
294
316
  });
317
+ var authenticateSlateTriggerGroupWebhookDelivery = async (d) => d.client.authenticateTriggerGroupWebhookDelivery({
318
+ triggerGroupId: d.triggerGroupId,
319
+ url: d.url,
320
+ method: d.method ?? "POST",
321
+ headers: d.headers,
322
+ body: d.body,
323
+ deliveryConfig: d.deliveryConfig
324
+ });
295
325
  var unregisterSlateTriggerGroupWebhook = async (d) => d.client.unregisterTriggerGroupWebhook({
296
326
  triggerGroupId: d.triggerGroupId,
297
327
  webhookRegistrationIdentifier: d.webhookRegistrationIdentifier,
@@ -14885,10 +14915,12 @@ var describeMcpCompatibleToolSchemas = (name, source) => {
14885
14915
  };
14886
14916
  // Annotate the CommonJS export names for ESM import in node:
14887
14917
  0 && (module.exports = {
14918
+ authenticateSlateTriggerGroupWebhookDelivery,
14888
14919
  connectSlateTriggerGroupGateway,
14889
14920
  createLocalSlateTestClient,
14890
14921
  createSlatesTestClient,
14891
14922
  describeMcpCompatibleToolSchemas,
14923
+ expandSlateTriggerGroupWebhook,
14892
14924
  expectMcpCompatibleToolSchema,
14893
14925
  expectSlateContract,
14894
14926
  expectSlateError,
@@ -14896,6 +14928,8 @@ var describeMcpCompatibleToolSchemas = (name, source) => {
14896
14928
  getMcpCompatibleToolSchemaCases,
14897
14929
  getSlateContract,
14898
14930
  getVitestExpect,
14931
+ listSlateOptionListOptions,
14932
+ listSlateTriggerGroupSelectionOptions,
14899
14933
  loadSlatesProfile,
14900
14934
  loadSlatesRuntimeContext,
14901
14935
  mapSlateTriggerEvent,
@@ -14903,6 +14937,7 @@ var describeMcpCompatibleToolSchemas = (name, source) => {
14903
14937
  processSlateTriggerGroupWebhook,
14904
14938
  receiveSlateTriggerGroupGatewayFrames,
14905
14939
  registerSlateTriggerGroupWebhook,
14940
+ renewSlateTriggerGroupWebhook,
14906
14941
  unregisterSlateTriggerGroupWebhook,
14907
14942
  withSlateProfile
14908
14943
  });
package/dist/index.d.cts CHANGED
@@ -246,14 +246,22 @@ declare let getSlateContract: (client: SlatesTestClient) => Promise<{
246
246
  type: "webhook";
247
247
  registration: {
248
248
  mode: "auto";
249
+ deliveryConfig?: {
250
+ userConfigSchema: Record<string, any>;
251
+ fullConfigSchema: Record<string, any>;
252
+ } | undefined;
249
253
  } | {
250
254
  mode: "manual";
251
255
  userConfigSchema: Record<string, any>;
252
256
  fullConfigSchema: Record<string, any>;
253
257
  };
258
+ supportsExpansion?: boolean | undefined;
259
+ supportsRenewal?: boolean | undefined;
260
+ reconcileIntervalSeconds?: number | undefined;
254
261
  };
255
262
  description?: string | undefined;
256
263
  metadata?: Record<string, any> | undefined;
264
+ selectionSchema?: Record<string, any> | undefined;
257
265
  }[];
258
266
  authMethods: {
259
267
  id: string;
@@ -445,14 +453,22 @@ declare let expectSlateContract: (d: {
445
453
  type: "webhook";
446
454
  registration: {
447
455
  mode: "auto";
456
+ deliveryConfig?: {
457
+ userConfigSchema: Record<string, any>;
458
+ fullConfigSchema: Record<string, any>;
459
+ } | undefined;
448
460
  } | {
449
461
  mode: "manual";
450
462
  userConfigSchema: Record<string, any>;
451
463
  fullConfigSchema: Record<string, any>;
452
464
  };
465
+ supportsExpansion?: boolean | undefined;
466
+ supportsRenewal?: boolean | undefined;
467
+ reconcileIntervalSeconds?: number | undefined;
453
468
  };
454
469
  description?: string | undefined;
455
470
  metadata?: Record<string, any> | undefined;
471
+ selectionSchema?: Record<string, any> | undefined;
456
472
  }[];
457
473
  authMethods: {
458
474
  id: string;
@@ -495,13 +511,87 @@ declare let expectSlateContract: (d: {
495
511
  }>;
496
512
  declare let registerSlateTriggerGroupWebhook: (d: {
497
513
  client: SlatesTestClient;
498
- triggerGroupId: string;
499
- webhookTargetIdentifier: string;
500
- webhookTargetPayload: any;
501
- webhookUrl: string;
502
- }) => Promise<{
514
+ } & Parameters<SlatesTestClient["registerTriggerGroupWebhook"]>[0]) => Promise<{
515
+ webhookRegistrationIdentifier: string;
516
+ webhookRegistrationPayload: any;
517
+ expiresAt?: string | null | undefined;
518
+ renewAfter?: string | null | undefined;
519
+ routingKeys?: string[] | undefined;
520
+ requestTraces?: {
521
+ startedAt: string;
522
+ durationMs: number;
523
+ request: {
524
+ method: string;
525
+ url: string;
526
+ headers?: Record<string, string> | undefined;
527
+ body?: {
528
+ text: string;
529
+ contentType?: string | undefined;
530
+ truncated?: boolean | undefined;
531
+ } | undefined;
532
+ };
533
+ response?: {
534
+ status: number;
535
+ statusText?: string | undefined;
536
+ headers?: Record<string, string> | undefined;
537
+ body?: {
538
+ text: string;
539
+ contentType?: string | undefined;
540
+ truncated?: boolean | undefined;
541
+ } | undefined;
542
+ } | undefined;
543
+ error?: {
544
+ message: string;
545
+ code?: string | undefined;
546
+ } | undefined;
547
+ }[] | undefined;
548
+ }>;
549
+ declare let renewSlateTriggerGroupWebhook: (d: {
550
+ client: SlatesTestClient;
551
+ } & Parameters<SlatesTestClient["renewTriggerGroupWebhook"]>[0]) => Promise<{
503
552
  webhookRegistrationIdentifier: string;
504
553
  webhookRegistrationPayload: any;
554
+ expiresAt?: string | null | undefined;
555
+ renewAfter?: string | null | undefined;
556
+ routingKeys?: string[] | undefined;
557
+ requestTraces?: {
558
+ startedAt: string;
559
+ durationMs: number;
560
+ request: {
561
+ method: string;
562
+ url: string;
563
+ headers?: Record<string, string> | undefined;
564
+ body?: {
565
+ text: string;
566
+ contentType?: string | undefined;
567
+ truncated?: boolean | undefined;
568
+ } | undefined;
569
+ };
570
+ response?: {
571
+ status: number;
572
+ statusText?: string | undefined;
573
+ headers?: Record<string, string> | undefined;
574
+ body?: {
575
+ text: string;
576
+ contentType?: string | undefined;
577
+ truncated?: boolean | undefined;
578
+ } | undefined;
579
+ } | undefined;
580
+ error?: {
581
+ message: string;
582
+ code?: string | undefined;
583
+ } | undefined;
584
+ }[] | undefined;
585
+ }>;
586
+ declare let expandSlateTriggerGroupWebhook: (d: {
587
+ client: SlatesTestClient;
588
+ } & Parameters<SlatesTestClient["expandTriggerGroupWebhook"]>[0]) => Promise<{
589
+ events: {
590
+ payload: Record<string, any>;
591
+ triggerIds: string[];
592
+ idempotencyKey?: string | undefined;
593
+ }[];
594
+ updatedState?: any;
505
595
  requestTraces?: {
506
596
  startedAt: string;
507
597
  durationMs: number;
@@ -535,6 +625,7 @@ declare let pollSlateTriggerGroupEvents: (d: {
535
625
  client: SlatesTestClient;
536
626
  triggerGroupId: string;
537
627
  state?: any;
628
+ selection?: Record<string, any>;
538
629
  }) => Promise<{
539
630
  events: {
540
631
  payload: Record<string, any>;
@@ -571,6 +662,91 @@ declare let pollSlateTriggerGroupEvents: (d: {
571
662
  } | undefined;
572
663
  }[] | undefined;
573
664
  }>;
665
+ declare let listSlateTriggerGroupSelectionOptions: (d: {
666
+ client: SlatesTestClient;
667
+ triggerGroupId: string;
668
+ field: string;
669
+ query?: string | null;
670
+ pageToken?: any;
671
+ selection?: Record<string, any>;
672
+ }) => Promise<{
673
+ options: {
674
+ value: string | number;
675
+ label: string;
676
+ description?: string | undefined;
677
+ }[];
678
+ nextPageToken: any;
679
+ requestTraces?: {
680
+ startedAt: string;
681
+ durationMs: number;
682
+ request: {
683
+ method: string;
684
+ url: string;
685
+ headers?: Record<string, string> | undefined;
686
+ body?: {
687
+ text: string;
688
+ contentType?: string | undefined;
689
+ truncated?: boolean | undefined;
690
+ } | undefined;
691
+ };
692
+ response?: {
693
+ status: number;
694
+ statusText?: string | undefined;
695
+ headers?: Record<string, string> | undefined;
696
+ body?: {
697
+ text: string;
698
+ contentType?: string | undefined;
699
+ truncated?: boolean | undefined;
700
+ } | undefined;
701
+ } | undefined;
702
+ error?: {
703
+ message: string;
704
+ code?: string | undefined;
705
+ } | undefined;
706
+ }[] | undefined;
707
+ }>;
708
+ declare let listSlateOptionListOptions: (d: {
709
+ client: SlatesTestClient;
710
+ optionListId: string;
711
+ query?: string | null;
712
+ pageToken?: any;
713
+ params?: Record<string, any>;
714
+ }) => Promise<{
715
+ options: {
716
+ value: string | number;
717
+ label: string;
718
+ description?: string | undefined;
719
+ }[];
720
+ nextPageToken: any;
721
+ requestTraces?: {
722
+ startedAt: string;
723
+ durationMs: number;
724
+ request: {
725
+ method: string;
726
+ url: string;
727
+ headers?: Record<string, string> | undefined;
728
+ body?: {
729
+ text: string;
730
+ contentType?: string | undefined;
731
+ truncated?: boolean | undefined;
732
+ } | undefined;
733
+ };
734
+ response?: {
735
+ status: number;
736
+ statusText?: string | undefined;
737
+ headers?: Record<string, string> | undefined;
738
+ body?: {
739
+ text: string;
740
+ contentType?: string | undefined;
741
+ truncated?: boolean | undefined;
742
+ } | undefined;
743
+ } | undefined;
744
+ error?: {
745
+ message: string;
746
+ code?: string | undefined;
747
+ } | undefined;
748
+ }[] | undefined;
749
+ }>;
574
750
  declare let connectSlateTriggerGroupGateway: (d: {
575
751
  client: SlatesTestClient;
576
752
  triggerGroupId: string;
@@ -678,6 +854,7 @@ declare let processSlateTriggerGroupWebhook: (d: {
678
854
  triggerIds: string[];
679
855
  idempotencyKey?: string | undefined;
680
856
  }[];
857
+ requiresExpansion?: boolean | undefined;
681
858
  response?: {
682
859
  status: number;
683
860
  headers: Record<string, string>;
@@ -718,6 +895,48 @@ declare let processSlateTriggerGroupWebhook: (d: {
718
895
  } | undefined;
719
896
  }[] | undefined;
720
897
  }>;
898
+ declare let authenticateSlateTriggerGroupWebhookDelivery: (d: {
899
+ client: SlatesTestClient;
900
+ triggerGroupId: string;
901
+ url: string;
902
+ method?: string;
903
+ headers?: Record<string, string>;
904
+ body?: string | Uint8Array | null;
905
+ deliveryConfig: unknown;
906
+ }) => Promise<{
907
+ routingKeys: string[];
908
+ rejected?: {
909
+ status: number;
910
+ } | null | undefined;
911
+ requestTraces?: {
912
+ startedAt: string;
913
+ durationMs: number;
914
+ request: {
915
+ method: string;
916
+ url: string;
917
+ headers?: Record<string, string> | undefined;
918
+ body?: {
919
+ text: string;
920
+ contentType?: string | undefined;
921
+ truncated?: boolean | undefined;
922
+ } | undefined;
923
+ };
924
+ response?: {
925
+ status: number;
926
+ statusText?: string | undefined;
927
+ headers?: Record<string, string> | undefined;
928
+ body?: {
929
+ text: string;
930
+ contentType?: string | undefined;
931
+ truncated?: boolean | undefined;
932
+ } | undefined;
933
+ } | undefined;
934
+ error?: {
935
+ message: string;
936
+ code?: string | undefined;
937
+ } | undefined;
938
+ }[] | undefined;
939
+ }>;
721
940
  declare let unregisterSlateTriggerGroupWebhook: (d: {
722
941
  client: SlatesTestClient;
723
942
  triggerGroupId: string;
@@ -763,6 +982,7 @@ declare let mapSlateTriggerEvent: (d: {
763
982
  type: string;
764
983
  id: string;
765
984
  output: Record<string, any>;
985
+ attributes?: Record<string, string[]> | undefined;
766
986
  requestTraces?: {
767
987
  startedAt: string;
768
988
  durationMs: number;
@@ -805,4 +1025,4 @@ declare let getMcpCompatibleToolSchemaCases: (source: ToolSchemaSource) => Reado
805
1025
  declare let expectMcpCompatibleToolSchema: (tool: ToolSchemaTarget) => void;
806
1026
  declare let describeMcpCompatibleToolSchemas: (name: string, source: ToolSchemaSource) => void;
807
1027
 
808
- export { type ExpectedSlateAction, type ExpectedSlateTriggerGroup, type SlatesRuntimeContext, type SlatesTestClient, connectSlateTriggerGroupGateway, createLocalSlateTestClient, createSlatesTestClient, describeMcpCompatibleToolSchemas, expectMcpCompatibleToolSchema, expectSlateContract, expectSlateError, expectToolCall, getMcpCompatibleToolSchemaCases, getSlateContract, getVitestExpect, loadSlatesProfile, loadSlatesRuntimeContext, mapSlateTriggerEvent, pollSlateTriggerGroupEvents, processSlateTriggerGroupWebhook, receiveSlateTriggerGroupGatewayFrames, registerSlateTriggerGroupWebhook, unregisterSlateTriggerGroupWebhook, withSlateProfile };
1028
+ export { type ExpectedSlateAction, type ExpectedSlateTriggerGroup, type SlatesRuntimeContext, type SlatesTestClient, authenticateSlateTriggerGroupWebhookDelivery, connectSlateTriggerGroupGateway, createLocalSlateTestClient, createSlatesTestClient, describeMcpCompatibleToolSchemas, expandSlateTriggerGroupWebhook, expectMcpCompatibleToolSchema, expectSlateContract, expectSlateError, expectToolCall, getMcpCompatibleToolSchemaCases, getSlateContract, getVitestExpect, listSlateOptionListOptions, listSlateTriggerGroupSelectionOptions, loadSlatesProfile, loadSlatesRuntimeContext, mapSlateTriggerEvent, pollSlateTriggerGroupEvents, processSlateTriggerGroupWebhook, receiveSlateTriggerGroupGatewayFrames, registerSlateTriggerGroupWebhook, renewSlateTriggerGroupWebhook, unregisterSlateTriggerGroupWebhook, withSlateProfile };