Ejemplo n.º 1
0
 const computed = origin.filterx(number$ => number$.pipe(map(n => n % 2 === 0)));
Ejemplo n.º 2
0
 createLabel(label: LabelModel, url: string): Observable<LabelModel> {
   return this.http.post<{data: LabelModel}>(url, {data: label})
     .pipe(map(r => r.data));
 }
Ejemplo n.º 3
0
 public addOrUpdate(faq: Faq): Observable<Faq> {
     let contentItem: ContentItem = faq.ToContentItem();
     return this.contentItemService.addOrUpdate(contentItem).pipe(
         map(contentItem => new Faq(contentItem)),
         catchError(this.handleError));
 }
Ejemplo n.º 4
0
 discover(query: string) : Observable<Feed[]> {
     return this.api.get<FeedsResponse>(`feed/discover?query=${query}`).pipe(
         map(response => response.feeds)
     );
 }
Ejemplo n.º 5
0
 deleteFeed(id: number) : Observable<boolean> {
     return this.api.delete<Status>(`feed/${id}`).pipe(
         map(response => response.success)
     );
 }
Ejemplo n.º 6
0
 concatMap(tree => this._engine.transformOptions(this, options).pipe(
   map(o => [tree, o]),
 )),
Ejemplo n.º 7
0
 switchMap(run => run.output.pipe(map(output => ({ run, output })))),
 getStorage(storageId: string): Observable<StorageEntity> {
     return this.http
         .get(`/api/configuration/strongbox/storages/${storageId}`)
         .pipe(map((r: any) => plainToClass(StorageEntity, r) as any));
 }
 getRepository(storageId: string, repositoryId: string): Observable<Repository> {
     return this.http
         .get(`/api/configuration/strongbox/storages/${storageId}/${repositoryId}`)
         .pipe(map((r: any) => plainToClass(Repository, r) as any));
 }
Ejemplo n.º 10
0
 ({ project, repoName, prID }) =>
     get<PRResponse>(buildURL(project, repoName, `/pull-requests/${prID}`)).pipe(
         map(({ fromRef, toRef }) => ({ baseCommitID: toRef.latestCommit, headCommitID: fromRef.latestCommit }))
     ),