Skip to content

Commit

Permalink
fix: remove per_page from most apollo endpoints; deprecated without w…
Browse files Browse the repository at this point in the history
…arning (#311)
  • Loading branch information
zlalvani authored Sep 19, 2023
1 parent 0792ebe commit c2429c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 26 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vesselapi/integrations",
"version": "1.0.77",
"version": "1.0.78",
"description": "Vessel integrations",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down
29 changes: 4 additions & 25 deletions src/platforms/apollo/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,13 @@ export const client = {
({
q_organization_name,
page,
perPage = DEFAULT_PAGE_SIZE,
}: {
q_organization_name?: string;
page?: number;
perPage?: number;
}) => ({
url: `/accounts/search`,
method: 'POST',
json: shake({ page, q_organization_name, per_page: perPage }),
json: shake({ page, q_organization_name }),
schema: z.object({
accounts: z.array(apolloAccount),
pagination: apolloPaginatedResponse,
Expand Down Expand Up @@ -131,15 +129,13 @@ export const client = {
({
q_keywords,
page,
perPage = DEFAULT_PAGE_SIZE,
contact_label_ids,
emailer_campaign_ids,
sort_by_field,
sort_ascending,
}: {
q_keywords?: string;
page?: number;
perPage?: number;
contact_label_ids?: string[];
emailer_campaign_ids?: string[];
sort_by_field?: string;
Expand All @@ -154,7 +150,6 @@ export const client = {
emailer_campaign_ids,
sort_by_field,
sort_ascending,
per_page: perPage,
}),
schema: z.object({
contacts: z.array(apolloContact),
Expand Down Expand Up @@ -198,15 +193,13 @@ export const client = {
({
emailer_campaign_id,
page,
perPage = DEFAULT_PAGE_SIZE,
}: {
emailer_campaign_id?: string;
page?: number;
perPage?: number;
}) => ({
url: `/emailer_messages/search`,
method: 'POST',
json: shake({ page, emailer_campaign_id, per_page: perPage }),
json: shake({ page, emailer_campaign_id }),
schema: z.object({
emailer_messages: z.array(apolloEmailMessage),
}),
Expand Down Expand Up @@ -248,18 +241,10 @@ export const client = {
),
})),
search: request(
({
q_keywords,
page,
perPage = DEFAULT_PAGE_SIZE,
}: {
q_keywords?: string;
page?: number;
perPage?: number;
}) => ({
({ q_keywords, page }: { q_keywords?: string; page?: number }) => ({
url: `/emailer_campaigns/search`,
method: 'POST',
json: shake({ page, q_keywords, per_page: perPage }),
json: shake({ page, q_keywords }),
schema: z.object({
emailer_campaigns: z.array(apolloSequence),
pagination: apolloPaginatedResponse,
Expand Down Expand Up @@ -377,13 +362,11 @@ export const client = {
contact_label_ids,
emailer_campaign_ids,
page,
perPage = DEFAULT_PAGE_SIZE,
}: {
q_keywords?: string;
contact_label_ids?: string[];
emailer_campaign_ids?: string[];
page?: number;
perPage?: number;
}) => ({
url: `/mixed_people/search`,
method: 'POST',
Expand All @@ -392,7 +375,6 @@ export const client = {
contact_label_ids,
q_keywords,
emailer_campaign_ids,
per_page: perPage,
}),
schema: z.object({
contacts: z.array(apolloContact),
Expand All @@ -410,14 +392,12 @@ export const client = {
page,
sort_ascending,
sort_by_field,
perPage = DEFAULT_PAGE_SIZE,
}: {
user_ids?: string[];
emailer_campaign_ids?: string[];
sort_ascending?: boolean;
sort_by_field?: string;
page?: number;
perPage?: number;
}) => ({
url: `/tasks/search`,
method: 'POST',
Expand All @@ -428,7 +408,6 @@ export const client = {
sort_by_field,
open_factor_names: ['task_types'],
show_suggestions: false,
per_page: perPage,
emailer_campaign_ids,
}),
schema: z.object({
Expand Down

0 comments on commit c2429c3

Please sign in to comment.