ngx-drupal8-rest
Version:
> A wrapper library to connect to a Drupal8+ based backend
56 lines (55 loc) • 2.21 kB
TypeScript
import { Observable } from 'rxjs';
import { BaseService } from './base.service';
import { WebformEntity, WebformFields, WebformSubmission } from '../models';
import * as i0 from "@angular/core";
export declare class WebformService extends BaseService {
/**
* Implement resource /webform/{webform} GET
* @param name the webform machine name
* @param langCode the language code for the webform
*/
get(machineName: string, langCode?: string): Observable<WebformEntity>;
/**
* Implement resource /webform_rest/{webform_id}/fields GET
* @param machineName the webform machine name
* @param langCode the language code for the webform
*/
fields(machineName: string, langCode?: string): Observable<WebformFields>;
/**
* Implement resource /webform_rest/{webform_id}/submission/{sid} GET
* @param machineName the webform machine name
* @param sid the webform submittion id
*/
getSubmission(machineName: string, sid: string, langCode?: string): Observable<WebformSubmission>;
/**
* Implement resource /webform_rest/{webform_id}/submission/{sid} PATCH
* @param machineName the webform machine name
* @param sid the webform submittion id
* @param webformSubmission the submission content object of fields
*/
updateSubmission(machineName: string, sid: string, webformSubmission: any): Observable<{
sid: string;
} | {
error: {
message: string;
};
}>;
/**
* Implement resource /webform_rest/submit POST
* @param webformSubmission the submission content object of fields
* All required fields should be added or the request will return error 400 :/
*/
submit(webformSubmission: {
webform_id: string;
[key: string]: any;
}): Observable<{
sid: string;
}>;
/**
* Implement resource /webform_rest/{webform_id}/upload/{field_name}: POST
* @param file the file to upload
*/
upload(machineName: string, fieldName: string, file: File): Observable<any>;
static ɵfac: i0.ɵɵFactoryDeclaration<WebformService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<WebformService>;
}