@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 +42 -7
- package/dist/index.d.cts +226 -6
- package/dist/index.d.ts +226 -6
- package/dist/index.module.js +37 -7
- package/package.json +4 -4
- package/src/optionList.test.ts +194 -0
- package/src/runtime.ts +70 -14
- package/src/triggerLifecycle.test.ts +618 -0
package/src/runtime.ts
CHANGED
|
@@ -352,32 +352,70 @@ export let expectSlateContract = async (d: {
|
|
|
352
352
|
return contract;
|
|
353
353
|
};
|
|
354
354
|
|
|
355
|
-
export let registerSlateTriggerGroupWebhook = async (
|
|
356
|
-
client: SlatesTestClient
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
}
|
|
355
|
+
export let registerSlateTriggerGroupWebhook = async (
|
|
356
|
+
d: { client: SlatesTestClient } & Parameters<
|
|
357
|
+
SlatesTestClient['registerTriggerGroupWebhook']
|
|
358
|
+
>[0]
|
|
359
|
+
) => {
|
|
360
|
+
let { client, ...input } = d;
|
|
361
|
+
return client.registerTriggerGroupWebhook(input);
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
export let renewSlateTriggerGroupWebhook = async (
|
|
365
|
+
d: { client: SlatesTestClient } & Parameters<SlatesTestClient['renewTriggerGroupWebhook']>[0]
|
|
366
|
+
) => {
|
|
367
|
+
let { client, ...input } = d;
|
|
368
|
+
return client.renewTriggerGroupWebhook(input);
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
export let expandSlateTriggerGroupWebhook = async (
|
|
372
|
+
d: { client: SlatesTestClient } & Parameters<
|
|
373
|
+
SlatesTestClient['expandTriggerGroupWebhook']
|
|
374
|
+
>[0]
|
|
375
|
+
) => {
|
|
376
|
+
let { client, ...input } = d;
|
|
377
|
+
return client.expandTriggerGroupWebhook(input);
|
|
378
|
+
};
|
|
368
379
|
|
|
369
380
|
export let pollSlateTriggerGroupEvents = async (d: {
|
|
370
381
|
client: SlatesTestClient;
|
|
371
382
|
triggerGroupId: string;
|
|
372
383
|
state?: any;
|
|
384
|
+
selection?: Record<string, any>;
|
|
373
385
|
}) => {
|
|
374
386
|
d.client.ensureSession();
|
|
375
387
|
return d.client.pollTriggerGroup({
|
|
376
388
|
triggerGroupId: d.triggerGroupId,
|
|
377
|
-
state: d.state ?? null
|
|
389
|
+
state: d.state ?? null,
|
|
390
|
+
selection: d.selection
|
|
378
391
|
});
|
|
379
392
|
};
|
|
380
393
|
|
|
394
|
+
export let listSlateTriggerGroupSelectionOptions = async (d: {
|
|
395
|
+
client: SlatesTestClient;
|
|
396
|
+
triggerGroupId: string;
|
|
397
|
+
field: string;
|
|
398
|
+
query?: string | null;
|
|
399
|
+
pageToken?: any;
|
|
400
|
+
selection?: Record<string, any>;
|
|
401
|
+
}) => {
|
|
402
|
+
let { client, ...input } = d;
|
|
403
|
+
client.ensureSession();
|
|
404
|
+
return client.listTriggerGroupSelectionOptions(input);
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
export let listSlateOptionListOptions = async (d: {
|
|
408
|
+
client: SlatesTestClient;
|
|
409
|
+
optionListId: string;
|
|
410
|
+
query?: string | null;
|
|
411
|
+
pageToken?: any;
|
|
412
|
+
params?: Record<string, any>;
|
|
413
|
+
}) => {
|
|
414
|
+
let { client, ...input } = d;
|
|
415
|
+
client.ensureSession();
|
|
416
|
+
return client.listOptionListOptions(input);
|
|
417
|
+
};
|
|
418
|
+
|
|
381
419
|
export let connectSlateTriggerGroupGateway = async (d: {
|
|
382
420
|
client: SlatesTestClient;
|
|
383
421
|
triggerGroupId: string;
|
|
@@ -424,6 +462,24 @@ export let processSlateTriggerGroupWebhook = async (d: {
|
|
|
424
462
|
webhookRegistrationPayload: d.webhookRegistrationPayload ?? null
|
|
425
463
|
});
|
|
426
464
|
|
|
465
|
+
export let authenticateSlateTriggerGroupWebhookDelivery = async (d: {
|
|
466
|
+
client: SlatesTestClient;
|
|
467
|
+
triggerGroupId: string;
|
|
468
|
+
url: string;
|
|
469
|
+
method?: string;
|
|
470
|
+
headers?: Record<string, string>;
|
|
471
|
+
body?: string | Uint8Array | null;
|
|
472
|
+
deliveryConfig: unknown;
|
|
473
|
+
}) =>
|
|
474
|
+
d.client.authenticateTriggerGroupWebhookDelivery({
|
|
475
|
+
triggerGroupId: d.triggerGroupId,
|
|
476
|
+
url: d.url,
|
|
477
|
+
method: d.method ?? 'POST',
|
|
478
|
+
headers: d.headers,
|
|
479
|
+
body: d.body,
|
|
480
|
+
deliveryConfig: d.deliveryConfig
|
|
481
|
+
});
|
|
482
|
+
|
|
427
483
|
export let unregisterSlateTriggerGroupWebhook = async (d: {
|
|
428
484
|
client: SlatesTestClient;
|
|
429
485
|
triggerGroupId: string;
|