UNPKG

@nestjs-mod/webhook-afat

Version:

Webhook UI components and tools for AFAT (Angular, Formly, Antd, Transloco) and rest-sdk for work with backend of this module from Angular appliaction

80 lines (79 loc) 3.96 kB
import { OnChanges, OnInit, ViewContainerRef } from '@angular/core'; import { FormControl } from '@angular/forms'; import { NzModalService } from 'ng-zorro-antd/modal'; import { NzTableQueryParams } from 'ng-zorro-antd/table'; import { BehaviorSubject, Observable } from 'rxjs'; import { TranslocoService } from '@jsverse/transloco'; import { NgChanges, ValidationService } from '@nestjs-mod/afat'; import { RequestMeta } from '@nestjs-mod/misc'; import { WebhookFormComponent } from '../../forms/webhook-form/webhook-form.component'; import { WebhookLogModel } from '../../services/webhook-log-mapper.service'; import { WebhookMapperService, WebhookModel } from '../../services/webhook-mapper.service'; import { WebhookService } from '../../services/webhook.service'; import * as i0 from "@angular/core"; export declare class WebhookGridComponent implements OnInit, OnChanges { private readonly webhookService; private readonly nzModalService; private readonly viewContainerRef; private readonly translocoService; private readonly webhookMapperService; private readonly validationService; tenantId?: string; forceLoadStream?: Observable<unknown>[]; loadManyTenantsHandler?: (searchText?: string) => Observable<{ label: string; value: string; }[]>; tenantSearchField: FormControl<string | null>; tenantSearchLoading$: BehaviorSubject<boolean>; tenantSearchResult$: BehaviorSubject<{ label: string; value: string; }[]>; items$: BehaviorSubject<WebhookModel[]>; meta$: BehaviorSubject<RequestMeta | undefined>; searchField: FormControl<string | null>; selectedIds$: BehaviorSubject<string[]>; keys: ("headers" | "id" | "eventName" | "endpoint" | "enabled" | "requestTimeout" | "workUntilDate")[]; columns: { id: "webhook.grid.columns.id"; enabled: "webhook.grid.columns.enabled"; endpoint: "webhook.grid.columns.endpoint"; eventName: "webhook.grid.columns.event-name"; headers: "webhook.grid.columns.headers"; requestTimeout: "webhook.grid.columns.request-timeout"; workUntilDate: "webhook.grid.columns.work-until-date"; }; WebhookScalarFieldEnumInterface: { readonly id: "id"; readonly eventName: "eventName"; readonly endpoint: "endpoint"; readonly enabled: "enabled"; readonly headers: "headers"; readonly requestTimeout: "requestTimeout"; readonly externalTenantId: "externalTenantId"; readonly createdBy: "createdBy"; readonly updatedBy: "updatedBy"; readonly createdAt: "createdAt"; readonly updatedAt: "updatedAt"; readonly workUntilDate: "workUntilDate"; }; private filters?; constructor(webhookService: WebhookService, nzModalService: NzModalService, viewContainerRef: ViewContainerRef, translocoService: TranslocoService, webhookMapperService: WebhookMapperService, validationService: ValidationService); onTenantSearch(searchText: string): void; ngOnChanges(changes: NgChanges<WebhookGridComponent>): void; ngOnInit(): void; private loadManyTenants; loadMany(args?: { filters?: Record<string, string>; meta?: RequestMeta; queryParams?: NzTableQueryParams; force?: boolean; }): void; showTestRequestModal(data: WebhookLogModel): void; submitTestRequest(webhookFormComponent: WebhookFormComponent): void; showCreateOrUpdateModal(id?: string): void; showDeleteModal(id?: string): void; static ɵfac: i0.ɵɵFactoryDeclaration<WebhookGridComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<WebhookGridComponent, "webhook-grid", never, { "tenantId": { "alias": "tenantId"; "required": false; }; "forceLoadStream": { "alias": "forceLoadStream"; "required": false; }; "loadManyTenantsHandler": { "alias": "loadManyTenantsHandler"; "required": false; }; }, {}, never, never, true, never>; }