Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@planet-a/affinity-node

Package Overview
Dependencies
Maintainers
0
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@planet-a/affinity-node - npm Package Compare versions

Comparing version 0.0.1-test.12 to 0.0.1-test.13

5

esm/v1/create_search_iterator_fn.js

@@ -0,1 +1,2 @@

// TODO(@joscha): this is a mess, simplify types here whilst preserving the required paged request/response types
export const createSearchIteratorFn = (searchFn, key) => {

@@ -7,5 +8,3 @@ async function* searchIterator(params) {

// TODO(@joscha): remove cast
(page_token
? { ...params, page_token }
: params));
(page_token ? { ...params, page_token } : params));
// TODO(@joscha): remove cast

@@ -12,0 +11,0 @@ yield response[key];

2

package.json
{
"name": "@planet-a/affinity-node",
"version": "0.0.1-test.12",
"version": "0.0.1-test.13",
"description": "API wrapper for the affinity.co API",

@@ -5,0 +5,0 @@ "keywords": [

import type { PagedResponse } from './paged_response.js';
import type { PagedRequest } from './paged_request.js';
export declare const createSearchIteratorFn: <FN extends (r: PAGED_REQUEST) => Promise<PAGED_RESPONSE>, PAGED_REQUEST extends PagedRequest, PAGED_RESPONSE extends PagedResponse & Record<PAYLOAD_KEY, SINGLE_RESPONSE[]>, PAYLOAD_KEY extends string = Exclude<keyof PAGED_RESPONSE, "next_page_token"> & string, SINGLE_RESPONSE = object>(searchFn: FN, key: PAYLOAD_KEY) => (params: Omit<PAGED_REQUEST, "page_token">) => AsyncGenerator<PAGED_RESPONSE[], any, unknown>;
export declare const createSearchIteratorFn: <FN extends (r: PAGED_REQUEST) => Promise<PAGED_RESPONSE>, PAGED_REQUEST extends PagedRequest, PAGED_RESPONSE extends PagedResponse & Record<PAYLOAD_KEY, SINGLE_RESPONSE[]>, PAYLOAD_KEY extends string = Exclude<keyof PAGED_RESPONSE, "next_page_token"> & string, SINGLE_RESPONSE = object>(searchFn: FN, key: PAYLOAD_KEY) => (params: Omit<Parameters<FN>[0], keyof PagedRequest> & Omit<PAGED_REQUEST, "page_token">) => AsyncGenerator<(ReturnType<FN> extends Promise<infer T> ? T : never) extends { [key in PAYLOAD_KEY]: infer T_1; } ? T_1 : never, any, unknown>;

@@ -88,3 +88,3 @@ /// <reference types="node" />

*/
pagedIterator: (params: Omit<PagedRequest, "page_token">) => AsyncGenerator<(PagedResponse & Record<"entity_files", object[]>)[], any, unknown>;
pagedIterator: (params: Omit<AllEntityFileRequest | undefined, keyof PagedRequest> & Omit<PagedRequest, "page_token">) => AsyncGenerator<EntityFile[], any, unknown>;
/**

@@ -91,0 +91,0 @@ * Fetches an entity with a specified `entity_file_id`.

@@ -271,3 +271,3 @@ import type { AxiosInstance } from 'axios';

*/
searchIterator: (params: Omit<PagedRequest, "page_token">) => AsyncGenerator<(PagedResponse & Record<"organizations", object[]>)[], any, unknown>;
searchIterator: (params: Omit<SearchOrganizationsRequest, keyof PagedRequest> & Omit<PagedRequest, "page_token">) => AsyncGenerator<OrganizationResponse[], any, unknown>;
/**

@@ -274,0 +274,0 @@ * Creates a new organization with the supplied parameters.

@@ -197,3 +197,3 @@ import type { AxiosInstance } from 'axios';

*/
searchIterator: (params: Omit<PagedRequest, "page_token">) => AsyncGenerator<(PagedResponse & Record<"persons", object[]>)[], any, unknown>;
searchIterator: (params: Omit<SearchPersonsRequest, keyof PagedRequest> & Omit<PagedRequest, "page_token">) => AsyncGenerator<PersonResponse[], any, unknown>;
/**

@@ -200,0 +200,0 @@ * Creates a new person with the supplied parameters.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc