rename UIWebhookSummary type

pull/832/head
CamilleLegeron 3 months ago
parent b19d169405
commit f6a9199c4a

@ -135,7 +135,7 @@ class WebhookExternalTable implements IExternalTable {
public saveableFields = [
'tableId', 'watchedColIdsText', 'url', 'eventTypes', 'enabled', 'name', 'memo', 'isReadyColumn',
];
public webhooks: ObservableArray<WebhookPageSummary> = observableArray<WebhookPageSummary>([]);
public webhooks: ObservableArray<UIWebhookSummary> = observableArray<UIWebhookSummary>([]);
public constructor(private _docApi: DocAPI) {
}
@ -278,7 +278,7 @@ class WebhookExternalTable implements IExternalTable {
this.webhooks.removeAll();
this.webhooks.push(
...webhooks.map(webhook => {
const uiWebhook: WebhookPageSummary = {...webhook};
const uiWebhook: UIWebhookSummary = {...webhook};
uiWebhook.fields.watchedColIdsText = webhook.fields.watchedColIds ? webhook.fields.watchedColIds.join(";") : "";
return uiWebhook;
}));
@ -458,7 +458,7 @@ function _prepareWebhookInitialActions(tableId: string): DocAction[] {
* `status` is converted to a string,
* and `watchedColIdsText` is converted to list in a cell format.
*/
function _mapWebhookValues(webhookSummary: WebhookPageSummary): Partial<WebhookSchemaType> {
function _mapWebhookValues(webhookSummary: UIWebhookSummary): Partial<WebhookSchemaType> {
const fields = webhookSummary.fields;
const {eventTypes, watchedColIdsText} = fields;
const watchedColIds = watchedColIdsText
@ -482,6 +482,6 @@ type WebhookSchemaType = {
webhookId: string;
}
type WebhookPageSummary = WebhookSummary & {
type UIWebhookSummary = WebhookSummary & {
fields: {watchedColIdsText?: string;}
}

@ -254,7 +254,7 @@ describe('WebhookPage', function () {
* Checks that a particular route to modifying cells in a virtual table
* is in place (previously it was not).
*/
it('can paste into a cell without clicking into it', async function () {
it('can paste into a cell without clicking into it', async function() {
await openWebhookPage();
await setField(1, 'Name', '1234');
await gu.waitForServer();

Loading…
Cancel
Save