diff --git a/codegen.yml b/codegen.yml index 2b7db06..cfdc304 100644 --- a/codegen.yml +++ b/codegen.yml @@ -9,6 +9,22 @@ config: scalars: ObjectId: string NonEmptyString: string + FilterInput: >- + { + field: string, + operator: 'EQUALS' | 'NOT_EQUALS' | 'CONTAINS' | 'ICONTAINS' | 'GT' | 'GTE' | 'LT' | 'LTE', + value: string | string[] + } | + { + field: string, + operator: 'EQUALS' | 'NOT_EQUALS' | 'CONTAINS' | 'ICONTAINS' | 'GT' | 'GTE' | 'LT' | 'LTE', + value: string | string[] + }[] | + { + field: string, + operator: 'EQUALS' | 'NOT_EQUALS' | 'CONTAINS' | 'ICONTAINS' | 'GT' | 'GTE' | 'LT' | 'LTE', + value: string | string[] + }[][] maybeValue: T hooks: afterAllFileWrite: diff --git a/graphql.schema.json b/graphql.schema.json index 7ee75cb..fa83603 100644 --- a/graphql.schema.json +++ b/graphql.schema.json @@ -11,11 +11,11 @@ "fields": [ { "name": "campaignTemplate", - "description": null, + "description": "Returns a single campaign template identified by a given id", "args": [ { "name": "id", - "description": null, + "description": "Id of the campaign template", "type": { "kind": "NON_NULL", "name": null, @@ -38,11 +38,11 @@ }, { "name": "campaignTemplates", - "description": null, + "description": "Returns a collection of campaign templates", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the campaign templates collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -50,9 +50,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the campaign templates collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -62,10 +72,30 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null @@ -81,11 +111,11 @@ }, { "name": "catalog", - "description": null, + "description": "Returns a single product catalog identified by a given id", "args": [ { "name": "id", - "description": null, + "description": "Id of the product catalog", "type": { "kind": "NON_NULL", "name": null, @@ -108,11 +138,11 @@ }, { "name": "catalogs", - "description": null, + "description": "Returns a collection of product catalogs", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the product catalogs collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -120,9 +150,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the product catalogs collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -132,17 +172,37 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null }, { "name": "showDeleted", - "description": null, + "description": "Toggle to true to retrieve deleted product catalogs in your results", "type": { "kind": "SCALAR", "name": "Boolean", @@ -161,11 +221,11 @@ }, { "name": "entitlement", - "description": null, + "description": "Returns a single entitlement identified by a given id", "args": [ { "name": "id", - "description": null, + "description": "Id of the entitlement to return", "type": { "kind": "NON_NULL", "name": null, @@ -188,11 +248,11 @@ }, { "name": "entitlements", - "description": null, + "description": "Returns a collection of entitlements", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the entitlements collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -200,9 +260,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the entitlements collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -212,10 +282,30 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null @@ -231,11 +321,11 @@ }, { "name": "marketingAd", - "description": null, + "description": "Returns a single marketing ad identified by a given id", "args": [ { "name": "id", - "description": null, + "description": "Id of the marketing ad to return", "type": { "kind": "NON_NULL", "name": null, @@ -258,11 +348,11 @@ }, { "name": "marketingAds", - "description": null, + "description": "Returns a collection of marketing ads", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the marketing ads collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -270,9 +360,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the marketing ads collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -282,10 +382,30 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null @@ -301,11 +421,11 @@ }, { "name": "marketingCampaign", - "description": null, + "description": "Returns a single marketing campaign identified by a given id", "args": [ { "name": "id", - "description": null, + "description": "Id of the marketing campaign to return", "type": { "kind": "NON_NULL", "name": null, @@ -328,11 +448,11 @@ }, { "name": "marketingCampaigns", - "description": null, + "description": "Returns a collection of marketing campaigns", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the marketing campaigns collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -340,9 +460,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the marketing campaigns collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -352,17 +482,37 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null }, { "name": "showDeleted", - "description": null, + "description": "Toggle to true to retrieve deleted marketing campaigns in your results", "type": { "kind": "SCALAR", "name": "Boolean", @@ -381,11 +531,11 @@ }, { "name": "marketplace", - "description": null, + "description": "Returns a single marketplace identified by a given id", "args": [ { "name": "id", - "description": null, + "description": "Id of the marketplace", "type": { "kind": "NON_NULL", "name": null, @@ -408,11 +558,11 @@ }, { "name": "marketplaces", - "description": null, + "description": "Returns a collection of marketplaces", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the marketplaces collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -420,9 +570,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the marketplaces collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -432,17 +592,37 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null }, { "name": "showDeleted", - "description": null, + "description": "Toggle to true to retrieve deleted marketplaces in your results", "type": { "kind": "SCALAR", "name": "Boolean", @@ -461,11 +641,11 @@ }, { "name": "mediaChannel", - "description": null, + "description": "Returns a single product catalog identified by a given id", "args": [ { "name": "id", - "description": null, + "description": "Id of the media channel", "type": { "kind": "NON_NULL", "name": null, @@ -488,11 +668,11 @@ }, { "name": "mediaChannels", - "description": null, + "description": "Returns a collection of media channels", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the media channels collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -500,9 +680,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the media channels collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -512,17 +702,37 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null }, { "name": "showDeleted", - "description": null, + "description": "Toggle to true to retrieve deleted media channels in your results", "type": { "kind": "SCALAR", "name": "Boolean", @@ -541,11 +751,11 @@ }, { "name": "organization", - "description": null, + "description": "Returns a single organization identified by a given id", "args": [ { "name": "id", - "description": null, + "description": "Id of the organization", "type": { "kind": "NON_NULL", "name": null, @@ -568,11 +778,11 @@ }, { "name": "organizations", - "description": null, + "description": "Returns a collection of organizations", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the organizations collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -580,9 +790,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the organizations collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -592,17 +812,37 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null }, { "name": "showDeleted", - "description": null, + "description": "Toggle to true to retrieve deleted organizations in your results", "type": { "kind": "SCALAR", "name": "Boolean", @@ -621,11 +861,11 @@ }, { "name": "product", - "description": null, + "description": "Returns a single product identified by a given id", "args": [ { "name": "id", - "description": null, + "description": "Id of the product", "type": { "kind": "NON_NULL", "name": null, @@ -648,11 +888,11 @@ }, { "name": "products", - "description": null, + "description": "Returns a collection of products", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the products collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -660,9 +900,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the products collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -672,17 +922,37 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null }, { "name": "showDeleted", - "description": null, + "description": "Toggle to true to retrieve dlete products in your results", "type": { "kind": "SCALAR", "name": "Boolean", @@ -701,11 +971,11 @@ }, { "name": "result", - "description": null, + "description": "Returns a single result identified by a given id", "args": [ { "name": "id", - "description": null, + "description": "Id of the result", "type": { "kind": "NON_NULL", "name": null, @@ -728,11 +998,11 @@ }, { "name": "results", - "description": null, + "description": "Returns a collecton of results", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the results collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -740,9 +1010,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the results collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -752,10 +1032,30 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null @@ -771,7 +1071,7 @@ }, { "name": "me", - "description": null, + "description": "Returns the user making this query", "args": [], "type": { "kind": "OBJECT", @@ -783,11 +1083,11 @@ }, { "name": "vendor", - "description": null, + "description": "Returns a single vendor identified by a given id", "args": [ { "name": "id", - "description": null, + "description": "Id of the vendor", "type": { "kind": "NON_NULL", "name": null, @@ -810,11 +1110,11 @@ }, { "name": "vendors", - "description": null, + "description": "Returns a collection of vendors", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the vendors collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -822,9 +1122,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the vendors collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -834,17 +1144,37 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null }, { "name": "showDeleted", - "description": null, + "description": "Toggle to true to retrieve deleted vendors in your results", "type": { "kind": "SCALAR", "name": "Boolean", @@ -880,11 +1210,11 @@ { "kind": "OBJECT", "name": "CampaignTemplate", - "description": null, + "description": "Campaign templates contain targeting and creative information tailored\nto your objectives specific to your goals and business needs", "fields": [ { "name": "id", - "description": null, + "description": "Id of the campaign template", "args": [], "type": { "kind": "NON_NULL", @@ -900,7 +1230,7 @@ }, { "name": "creationDate", - "description": null, + "description": "Date and time the campaign template was created", "args": [], "type": { "kind": "NON_NULL", @@ -916,7 +1246,7 @@ }, { "name": "lastChangeDate", - "description": null, + "description": "Date and time the campaign template was last modified", "args": [], "type": { "kind": "NON_NULL", @@ -932,7 +1262,7 @@ }, { "name": "name", - "description": null, + "description": "Name of the campaign template", "args": [], "type": { "kind": "NON_NULL", @@ -948,7 +1278,7 @@ }, { "name": "description", - "description": null, + "description": "Description of the campaign template", "args": [], "type": { "kind": "NON_NULL", @@ -964,7 +1294,7 @@ }, { "name": "platform", - "description": null, + "description": "Platform the campaign template is available for", "args": [], "type": { "kind": "NON_NULL", @@ -980,7 +1310,7 @@ }, { "name": "remoteId", - "description": null, + "description": "Id of the campaign template on the corresponding platform", "args": [], "type": { "kind": "NON_NULL", @@ -996,7 +1326,7 @@ }, { "name": "marketplace", - "description": null, + "description": "Marketplace the campaign template was created for", "args": [], "type": { "kind": "NON_NULL", @@ -1012,11 +1342,11 @@ }, { "name": "marketingCampaigns", - "description": null, + "description": "Marketing campaigns that are using this campaign template", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the marketing campaigns collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -1024,9 +1354,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the marketing campaigns collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -1036,17 +1376,37 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null }, { "name": "showDeleted", - "description": null, + "description": "Toggle to true to retrieve deleted marketing campaigns in your results", "type": { "kind": "SCALAR", "name": "Boolean", @@ -1102,14 +1462,14 @@ { "kind": "ENUM", "name": "Platform", - "description": null, + "description": "Marketing platform", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [ { "name": "facebook", - "description": null, + "description": "Facebook marketing platform", "isDeprecated": false, "deprecationReason": null } @@ -1119,11 +1479,11 @@ { "kind": "OBJECT", "name": "Marketplace", - "description": null, + "description": "Marketplace represents a collection of media channels, campaign templates\nand vendors. A marketplace belongs to a single organization.", "fields": [ { "name": "id", - "description": null, + "description": "Id of the marketplace", "args": [], "type": { "kind": "NON_NULL", @@ -1139,7 +1499,7 @@ }, { "name": "creationDate", - "description": null, + "description": "Date and time the marketplace was created", "args": [], "type": { "kind": "NON_NULL", @@ -1155,7 +1515,7 @@ }, { "name": "lastChangeDate", - "description": null, + "description": "Date and time the marketplace was last updated", "args": [], "type": { "kind": "NON_NULL", @@ -1171,7 +1531,7 @@ }, { "name": "name", - "description": null, + "description": "Name of the marketplace", "args": [], "type": { "kind": "NON_NULL", @@ -1187,7 +1547,7 @@ }, { "name": "organization", - "description": null, + "description": "Organization related to the marketplace", "args": [], "type": { "kind": "NON_NULL", @@ -1203,11 +1563,11 @@ }, { "name": "mediaChannels", - "description": null, + "description": "Media channels related to the marketplace", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the media channels collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -1215,9 +1575,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the media channels collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -1227,17 +1597,37 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null }, { "name": "showDeleted", - "description": null, + "description": "Toggle to true to retrieve deleted media channels in your results", "type": { "kind": "SCALAR", "name": "Boolean", @@ -1256,11 +1646,11 @@ }, { "name": "campaignTemplates", - "description": null, + "description": "Campaign templates related to the marketplace", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the campaign templates collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -1268,9 +1658,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the campaign templates collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -1280,10 +1680,30 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null @@ -1299,11 +1719,11 @@ }, { "name": "vendors", - "description": null, + "description": "Vendors related to the marketplace", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the vendors collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -1311,9 +1731,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the vendors collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -1323,17 +1753,37 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null }, { "name": "showDeleted", - "description": null, + "description": "Toggle to true to retrieve deleted vendors in your results", "type": { "kind": "SCALAR", "name": "Boolean", @@ -1352,7 +1802,7 @@ }, { "name": "systemStatus", - "description": null, + "description": "System status of the marketplace", "args": [], "type": { "kind": "NON_NULL", @@ -1368,7 +1818,7 @@ }, { "name": "errors", - "description": null, + "description": "Validation errors of the marketplace", "args": [], "type": { "kind": "LIST", @@ -1401,11 +1851,11 @@ { "kind": "INTERFACE", "name": "EntitlementResource", - "description": null, + "description": "Resource targeted by an entitlement", "fields": [ { "name": "id", - "description": null, + "description": "Id of the resource", "args": [], "type": { "kind": "NON_NULL", @@ -1421,7 +1871,7 @@ }, { "name": "name", - "description": null, + "description": "Name of the resource", "args": [], "type": { "kind": "NON_NULL", @@ -1437,7 +1887,7 @@ }, { "name": "systemStatus", - "description": null, + "description": "System status of the resource", "args": [], "type": { "kind": "NON_NULL", @@ -1453,7 +1903,7 @@ }, { "name": "creationDate", - "description": null, + "description": "Date and time the resource was created", "args": [], "type": { "kind": "NON_NULL", @@ -1469,7 +1919,7 @@ }, { "name": "lastChangeDate", - "description": null, + "description": "Date and time the resource was last modified", "args": [], "type": { "kind": "NON_NULL", @@ -1485,7 +1935,7 @@ }, { "name": "errors", - "description": null, + "description": "Validation errors of the resource", "args": [], "type": { "kind": "LIST", @@ -1520,62 +1970,62 @@ { "kind": "ENUM", "name": "SystemStatus", - "description": null, + "description": "System status", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [ { "name": "PENDING", - "description": null, + "description": "Awaiting an update", "isDeprecated": false, "deprecationReason": null }, { "name": "PENDING_DELETION", - "description": null, + "description": "Awaiting deletion", "isDeprecated": false, "deprecationReason": null }, { "name": "PENDING_SYNC", - "description": null, + "description": "Awaiting synchronization", "isDeprecated": false, "deprecationReason": null }, { "name": "PROCESSING", - "description": null, + "description": "Being processed for an update", "isDeprecated": false, "deprecationReason": null }, { "name": "PROCESSING_SYNC", - "description": null, + "description": "Being processed for synchronization", "isDeprecated": false, "deprecationReason": null }, { "name": "PROCESSING_DELETION", - "description": null, + "description": "Being processed for deletion", "isDeprecated": false, "deprecationReason": null }, { "name": "PROCESSED", - "description": null, + "description": "Already been processed", "isDeprecated": false, "deprecationReason": null }, { "name": "ERROR", - "description": null, + "description": "Having errors", "isDeprecated": false, "deprecationReason": null }, { "name": "DELETED", - "description": null, + "description": "Marked as deleted", "isDeprecated": false, "deprecationReason": null } @@ -1595,11 +2045,11 @@ { "kind": "OBJECT", "name": "Organization", - "description": null, + "description": "Organization is the top level of your resources hierarchy\nand links to all owned marketplaces", "fields": [ { "name": "id", - "description": null, + "description": "Id of the organization", "args": [], "type": { "kind": "NON_NULL", @@ -1615,7 +2065,7 @@ }, { "name": "creationDate", - "description": null, + "description": "Date and time the organization was created", "args": [], "type": { "kind": "NON_NULL", @@ -1631,7 +2081,7 @@ }, { "name": "lastChangeDate", - "description": null, + "description": "Date and time the organization was last updated", "args": [], "type": { "kind": "NON_NULL", @@ -1650,18 +2100,28 @@ "description": null, "args": [ { - "name": "filter", - "description": null, + "name": "filter", + "description": "Conditions to filter the users collection with", + "type": { + "kind": "SCALAR", + "name": "FilterInput", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "sort", + "description": "Conditions to sort the users collection with", "type": { - "kind": "SCALAR", - "name": "FilterInput", + "kind": "INPUT_OBJECT", + "name": "SortInput", "ofType": null }, "defaultValue": null }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -1671,10 +2131,30 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null @@ -1694,7 +2174,7 @@ "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the marketplaces collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -1702,9 +2182,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the marketplaces collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -1714,17 +2204,37 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null }, { "name": "showDeleted", - "description": null, + "description": "Toggle to true to retrieve deleted marketplaces in your results", "type": { "kind": "SCALAR", "name": "Boolean", @@ -1743,7 +2253,7 @@ }, { "name": "name", - "description": null, + "description": "Name of the organization", "args": [], "type": { "kind": "NON_NULL", @@ -1759,7 +2269,7 @@ }, { "name": "tier", - "description": null, + "description": "Tier type of the organization", "args": [], "type": { "kind": "NON_NULL", @@ -1775,7 +2285,7 @@ }, { "name": "systemStatus", - "description": null, + "description": "System status of the organization", "args": [], "type": { "kind": "NON_NULL", @@ -1791,7 +2301,7 @@ }, { "name": "errors", - "description": null, + "description": "Validation errors of the organization", "args": [], "type": { "kind": "LIST", @@ -1831,6 +2341,60 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "description": "Sort input data", + "fields": null, + "inputFields": [ + { + "name": "field", + "description": "Field that will be sorted in the specified direction", + "type": { + "kind": "SCALAR", + "name": "NonEmptyString", + "ofType": null + }, + "defaultValue": "\"id\"" + }, + { + "name": "order", + "description": "Sorting direction", + "type": { + "kind": "ENUM", + "name": "SORT_ORDER", + "ofType": null + }, + "defaultValue": "ASC" + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "SORT_ORDER", + "description": "Sorting direction", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ASC", + "description": "Ascending sort order", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DESC", + "description": "Descending sort order", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "SCALAR", "name": "Int", @@ -1844,11 +2408,11 @@ { "kind": "OBJECT", "name": "UserConnection", - "description": null, + "description": "User collection", "fields": [ { "name": "edges", - "description": null, + "description": "Collection of users", "args": [], "type": { "kind": "LIST", @@ -1864,7 +2428,7 @@ }, { "name": "pageInfo", - "description": null, + "description": "Pagination information", "args": [], "type": { "kind": "NON_NULL", @@ -1887,11 +2451,11 @@ { "kind": "OBJECT", "name": "UserEdge", - "description": null, + "description": "User in a collection", "fields": [ { "name": "cursor", - "description": null, + "description": "Id of the contained user", "args": [], "type": { "kind": "NON_NULL", @@ -1907,7 +2471,7 @@ }, { "name": "node", - "description": null, + "description": "Container for a user", "args": [], "type": { "kind": "OBJECT", @@ -1926,11 +2490,11 @@ { "kind": "OBJECT", "name": "User", - "description": null, + "description": "User of the system that is granted access to resources\nthrough entitlements", "fields": [ { "name": "id", - "description": null, + "description": "Id of the user", "args": [], "type": { "kind": "NON_NULL", @@ -1946,7 +2510,7 @@ }, { "name": "creationDate", - "description": null, + "description": "Date and time the user was created", "args": [], "type": { "kind": "NON_NULL", @@ -1962,7 +2526,7 @@ }, { "name": "lastChangeDate", - "description": null, + "description": "Date and time the user was last modified", "args": [], "type": { "kind": "NON_NULL", @@ -1978,7 +2542,7 @@ }, { "name": "email", - "description": null, + "description": "Email of the user", "args": [], "type": { "kind": "NON_NULL", @@ -1994,7 +2558,7 @@ }, { "name": "firstName", - "description": null, + "description": "First name of the user", "args": [], "type": { "kind": "SCALAR", @@ -2006,7 +2570,7 @@ }, { "name": "lastName", - "description": null, + "description": "Last name of the user", "args": [], "type": { "kind": "SCALAR", @@ -2018,11 +2582,11 @@ }, { "name": "organizations", - "description": null, + "description": "Organizations the user is a member of", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the organizations collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -2030,9 +2594,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the organizations collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -2042,17 +2616,37 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null }, { "name": "showDeleted", - "description": null, + "description": "Toggle to true to retrieve deleted organizations in your results", "type": { "kind": "SCALAR", "name": "Boolean", @@ -2071,11 +2665,11 @@ }, { "name": "entitlements", - "description": null, + "description": "Entitlements granting permissions to the user", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the entitlements collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -2083,9 +2677,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the entitlements collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -2095,10 +2699,30 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null @@ -2131,11 +2755,11 @@ { "kind": "OBJECT", "name": "OrganizationConnection", - "description": null, + "description": "Organizations collection", "fields": [ { "name": "edges", - "description": null, + "description": "Collection of organizations", "args": [], "type": { "kind": "LIST", @@ -2151,7 +2775,7 @@ }, { "name": "pageInfo", - "description": null, + "description": "Pagination information", "args": [], "type": { "kind": "NON_NULL", @@ -2174,11 +2798,11 @@ { "kind": "OBJECT", "name": "OrganizationEdge", - "description": null, + "description": "Organization in a collection", "fields": [ { "name": "cursor", - "description": null, + "description": "Id of the contained organization", "args": [], "type": { "kind": "NON_NULL", @@ -2194,7 +2818,7 @@ }, { "name": "node", - "description": null, + "description": "Container for an organization", "args": [], "type": { "kind": "OBJECT", @@ -2213,11 +2837,27 @@ { "kind": "OBJECT", "name": "PageInfo", - "description": null, + "description": "Pagination information", "fields": [ { "name": "hasNextPage", - "description": null, + "description": "Whether there's more pages to retrieve after this page", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasPreviousPage", + "description": "Whether there's more pages to retrieve before this page", "args": [], "type": { "kind": "NON_NULL", @@ -2233,7 +2873,7 @@ }, { "name": "startCursor", - "description": null, + "description": "Id of the first object contained on the page", "args": [], "type": { "kind": "SCALAR", @@ -2245,7 +2885,7 @@ }, { "name": "endCursor", - "description": null, + "description": "Id of the last object contained on the page", "args": [], "type": { "kind": "SCALAR", @@ -2264,11 +2904,11 @@ { "kind": "OBJECT", "name": "EntitlementConnection", - "description": null, + "description": "Entitlement collection", "fields": [ { "name": "edges", - "description": null, + "description": "Collection of entitlements", "args": [], "type": { "kind": "LIST", @@ -2284,7 +2924,7 @@ }, { "name": "pageInfo", - "description": null, + "description": "Pagination information", "args": [], "type": { "kind": "NON_NULL", @@ -2307,11 +2947,11 @@ { "kind": "OBJECT", "name": "EntitlementEdge", - "description": null, + "description": "Entitlement in a collection", "fields": [ { "name": "cursor", - "description": null, + "description": "Id of the contained entitlement", "args": [], "type": { "kind": "NON_NULL", @@ -2327,7 +2967,7 @@ }, { "name": "node", - "description": null, + "description": "Container for an entitlement", "args": [], "type": { "kind": "OBJECT", @@ -2346,11 +2986,11 @@ { "kind": "OBJECT", "name": "Entitlement", - "description": null, + "description": "A set of user permissions related to a resource", "fields": [ { "name": "id", - "description": null, + "description": "Id of the entitlement", "args": [], "type": { "kind": "NON_NULL", @@ -2366,7 +3006,7 @@ }, { "name": "creationDate", - "description": null, + "description": "Date and time the entitlement was created", "args": [], "type": { "kind": "NON_NULL", @@ -2382,7 +3022,7 @@ }, { "name": "lastChangeDate", - "description": null, + "description": "Date and time the entitlement was last modified", "args": [], "type": { "kind": "NON_NULL", @@ -2398,7 +3038,7 @@ }, { "name": "user", - "description": null, + "description": "User the permissions are granted to", "args": [], "type": { "kind": "NON_NULL", @@ -2414,7 +3054,7 @@ }, { "name": "type", - "description": null, + "description": "Type of resource related to the entitlement", "args": [], "type": { "kind": "NON_NULL", @@ -2430,7 +3070,7 @@ }, { "name": "resource", - "description": null, + "description": "Resource related to the entitlement", "args": [], "type": { "kind": "NON_NULL", @@ -2446,7 +3086,7 @@ }, { "name": "permissions", - "description": null, + "description": "Set of permissions granted to the related user", "args": [], "type": { "kind": "NON_NULL", @@ -2477,26 +3117,26 @@ { "kind": "ENUM", "name": "EntitlementResourceTypeEnum", - "description": null, + "description": "Resource types that can be granted permissions to", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [ { "name": "Marketplace", - "description": null, + "description": "Marketplace resource type", "isDeprecated": false, "deprecationReason": null }, { "name": "Organization", - "description": null, + "description": "Organization resource type", "isDeprecated": false, "deprecationReason": null }, { "name": "MediaChannel", - "description": null, + "description": "Media channel resource type", "isDeprecated": false, "deprecationReason": null } @@ -2506,32 +3146,32 @@ { "kind": "ENUM", "name": "AuthPermission", - "description": null, + "description": "Types of permissions that can be granted to resources", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [ { "name": "READ", - "description": null, + "description": "Allows fetching the resource", "isDeprecated": false, "deprecationReason": null }, { "name": "WRITE", - "description": null, + "description": "Allows creation and updating the resource", "isDeprecated": false, "deprecationReason": null }, { "name": "DELETE", - "description": null, + "description": "Allows deleting the resource", "isDeprecated": false, "deprecationReason": null }, { "name": "MANAGE_ENTITLEMENTS", - "description": null, + "description": "Allows managing entitlements targeting the resource ", "isDeprecated": false, "deprecationReason": null } @@ -2541,11 +3181,11 @@ { "kind": "OBJECT", "name": "MarketplaceConnection", - "description": null, + "description": "Marketplaces collection", "fields": [ { "name": "edges", - "description": null, + "description": "Collection of marketplaces", "args": [], "type": { "kind": "LIST", @@ -2561,7 +3201,7 @@ }, { "name": "pageInfo", - "description": null, + "description": "Pagination information", "args": [], "type": { "kind": "NON_NULL", @@ -2584,11 +3224,11 @@ { "kind": "OBJECT", "name": "MarketplaceEdge", - "description": null, + "description": "Marketplace in a collection", "fields": [ { "name": "cursor", - "description": null, + "description": "Id of the contained marketplace", "args": [], "type": { "kind": "NON_NULL", @@ -2604,7 +3244,7 @@ }, { "name": "node", - "description": null, + "description": "Container for a marketplace", "args": [], "type": { "kind": "OBJECT", @@ -2623,7 +3263,7 @@ { "kind": "ENUM", "name": "OrganizationTierEnum", - "description": null, + "description": "Organization tier type", "fields": null, "inputFields": null, "interfaces": null, @@ -2646,11 +3286,11 @@ { "kind": "OBJECT", "name": "MediaChannelConnection", - "description": null, + "description": "Media channels collection", "fields": [ { "name": "edges", - "description": null, + "description": "Collection of media channels", "args": [], "type": { "kind": "LIST", @@ -2666,7 +3306,7 @@ }, { "name": "pageInfo", - "description": null, + "description": "Pagination information", "args": [], "type": { "kind": "NON_NULL", @@ -2689,11 +3329,11 @@ { "kind": "OBJECT", "name": "MediaChannelEdge", - "description": null, + "description": "Media channel in a collection", "fields": [ { "name": "cursor", - "description": null, + "description": "Id of the contained media channel", "args": [], "type": { "kind": "NON_NULL", @@ -2709,7 +3349,7 @@ }, { "name": "node", - "description": null, + "description": "Container for a media channel", "args": [], "type": { "kind": "OBJECT", @@ -2728,11 +3368,11 @@ { "kind": "OBJECT", "name": "MediaChannel", - "description": null, + "description": "Media channel represents an ad account on a specific platform", "fields": [ { "name": "id", - "description": null, + "description": "Id of the media channel", "args": [], "type": { "kind": "NON_NULL", @@ -2748,7 +3388,7 @@ }, { "name": "creationDate", - "description": null, + "description": "Date and time the media channel was created", "args": [], "type": { "kind": "NON_NULL", @@ -2764,7 +3404,7 @@ }, { "name": "lastChangeDate", - "description": null, + "description": "Date and time the media channel was last modified", "args": [], "type": { "kind": "NON_NULL", @@ -2780,7 +3420,7 @@ }, { "name": "name", - "description": null, + "description": "Name of the media channel", "args": [], "type": { "kind": "NON_NULL", @@ -2796,7 +3436,7 @@ }, { "name": "platform", - "description": null, + "description": "Platform the media channel is available for", "args": [], "type": { "kind": "NON_NULL", @@ -2812,7 +3452,7 @@ }, { "name": "remoteId", - "description": null, + "description": "Id of the media channel on the corresponding platform", "args": [], "type": { "kind": "SCALAR", @@ -2824,7 +3464,7 @@ }, { "name": "remoteState", - "description": null, + "description": "Data related to the media channel stored on the remote platform", "args": [], "type": { "kind": "NON_NULL", @@ -2840,7 +3480,7 @@ }, { "name": "currency", - "description": null, + "description": "Currency code of the media channel", "args": [], "type": { "kind": "SCALAR", @@ -2852,7 +3492,7 @@ }, { "name": "timezone", - "description": null, + "description": "Time zone of the media channel", "args": [], "type": { "kind": "SCALAR", @@ -2864,7 +3504,7 @@ }, { "name": "tokenStatus", - "description": null, + "description": "Status of the platform authentication token", "args": [], "type": { "kind": "NON_NULL", @@ -2880,7 +3520,7 @@ }, { "name": "systemStatus", - "description": null, + "description": "System status of the media channel", "args": [], "type": { "kind": "NON_NULL", @@ -2896,7 +3536,7 @@ }, { "name": "errors", - "description": null, + "description": "Validation errors of the media channel", "args": [], "type": { "kind": "LIST", @@ -2916,11 +3556,11 @@ }, { "name": "catalogs", - "description": null, + "description": "Product catalogs referenced by the media channel", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the product catalogs collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -2928,9 +3568,39 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the product catalogs collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "End cursor of the previously retrieved page", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", "type": { "kind": "SCALAR", "name": "Int", @@ -2939,18 +3609,18 @@ "defaultValue": null }, { - "name": "after", - "description": null, + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", "ofType": null }, "defaultValue": null }, { "name": "showDeleted", - "description": null, + "description": "Toggle to true to retrieve deleted products in your results", "type": { "kind": "SCALAR", "name": "Boolean", @@ -2973,7 +3643,7 @@ }, { "name": "marketplace", - "description": null, + "description": "Marketplace related to the media channel", "args": [], "type": { "kind": "NON_NULL", @@ -3002,32 +3672,32 @@ { "kind": "ENUM", "name": "TokenStatus", - "description": null, + "description": "Platform token processing status", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [ { "name": "PENDING", - "description": null, + "description": "Token submitted and awaiting processing", "isDeprecated": false, "deprecationReason": null }, { "name": "MISSING", - "description": null, + "description": "Token not submitted", "isDeprecated": false, "deprecationReason": null }, { "name": "VALID", - "description": null, + "description": "Token successfully validated", "isDeprecated": false, "deprecationReason": null }, { "name": "INVALID", - "description": null, + "description": "Invalid token", "isDeprecated": false, "deprecationReason": null } @@ -3037,11 +3707,11 @@ { "kind": "OBJECT", "name": "CatalogConnection", - "description": null, + "description": "Product catalogs collection", "fields": [ { "name": "edges", - "description": null, + "description": "Collection of product catalogs", "args": [], "type": { "kind": "LIST", @@ -3057,7 +3727,7 @@ }, { "name": "pageInfo", - "description": null, + "description": "Pagination information", "args": [], "type": { "kind": "NON_NULL", @@ -3080,11 +3750,11 @@ { "kind": "OBJECT", "name": "CatalogEdge", - "description": null, + "description": "Product catalog in a collection", "fields": [ { "name": "cursor", - "description": null, + "description": "Id of the contained product catalog", "args": [], "type": { "kind": "NON_NULL", @@ -3100,7 +3770,7 @@ }, { "name": "node", - "description": null, + "description": "Container for a product catalog", "args": [], "type": { "kind": "OBJECT", @@ -3119,11 +3789,11 @@ { "kind": "OBJECT", "name": "Catalog", - "description": null, + "description": "Catalogs contain products linked to a specific platform and media channel", "fields": [ { "name": "id", - "description": null, + "description": "Id of the product catalog", "args": [], "type": { "kind": "NON_NULL", @@ -3139,7 +3809,7 @@ }, { "name": "name", - "description": null, + "description": "Name of the product catalog", "args": [], "type": { "kind": "NON_NULL", @@ -3155,7 +3825,7 @@ }, { "name": "catalogType", - "description": null, + "description": "Category of the products referenced by the product catalog", "args": [], "type": { "kind": "NON_NULL", @@ -3171,7 +3841,7 @@ }, { "name": "creationDate", - "description": null, + "description": "Date and time the product catalog was created", "args": [], "type": { "kind": "NON_NULL", @@ -3187,7 +3857,7 @@ }, { "name": "lastChangeDate", - "description": null, + "description": "Date and time the product catalog was last modified", "args": [], "type": { "kind": "NON_NULL", @@ -3203,7 +3873,7 @@ }, { "name": "remoteId", - "description": null, + "description": "Id of the product catalog on the related platform", "args": [], "type": { "kind": "SCALAR", @@ -3215,7 +3885,7 @@ }, { "name": "systemStatus", - "description": null, + "description": "System status of the product catalog", "args": [], "type": { "kind": "NON_NULL", @@ -3231,7 +3901,7 @@ }, { "name": "remoteState", - "description": null, + "description": "Data related to the product catalog stored on the remote platform", "args": [], "type": { "kind": "NON_NULL", @@ -3247,7 +3917,7 @@ }, { "name": "dataFeedId", - "description": null, + "description": "Facebook data feed id referenced by the product catalog", "args": [], "type": { "kind": "SCALAR", @@ -3259,7 +3929,7 @@ }, { "name": "errors", - "description": null, + "description": "Validation errors of the product catalog", "args": [], "type": { "kind": "LIST", @@ -3279,7 +3949,7 @@ }, { "name": "mediaChannel", - "description": null, + "description": "Media channel related to the product catalog", "args": [], "type": { "kind": "NON_NULL", @@ -3295,11 +3965,11 @@ }, { "name": "products", - "description": null, + "description": "Products referenced by the catalog", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the products collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -3307,9 +3977,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the products collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -3319,17 +3999,37 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null }, { "name": "showDeleted", - "description": null, + "description": "Toggle to true to retrieve deleted products in your results", "type": { "kind": "SCALAR", "name": "Boolean", @@ -3355,68 +4055,68 @@ { "kind": "ENUM", "name": "CatalogType", - "description": null, + "description": "Product catalog type", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [ { "name": "bookable", - "description": null, + "description": "Catalog of bookable services", "isDeprecated": false, "deprecationReason": null }, { "name": "commerce", - "description": null, + "description": "Catalog of standard products or services", "isDeprecated": false, "deprecationReason": null }, { "name": "destinations", - "description": null, + "description": "Catalog of travel destinations", "isDeprecated": false, "deprecationReason": null }, { "name": "flights", - "description": null, + "description": "Catalog of plane tickets", "isDeprecated": false, "deprecationReason": null }, { "name": "home_listings", - "description": null, + "description": "Catalog of home rentals", "isDeprecated": false, "deprecationReason": null }, { "name": "hotels", - "description": null, + "description": "Catalog of hotel rooms", "isDeprecated": false, "deprecationReason": null }, { "name": "offline_commerce", - "description": null, + "description": "Catalog of store-based products or services", "isDeprecated": false, "deprecationReason": null }, { "name": "ticketed_experiences", - "description": null, + "description": "Catalog of event tickets", "isDeprecated": false, "deprecationReason": null }, { "name": "transactable_items", - "description": null, + "description": "Catalog of transactable goods", "isDeprecated": false, "deprecationReason": null }, { "name": "vehicles", - "description": null, + "description": "Catalog of vehicle rentals or sales", "isDeprecated": false, "deprecationReason": null } @@ -3426,11 +4126,11 @@ { "kind": "OBJECT", "name": "ProductConnection", - "description": null, + "description": "Products collection", "fields": [ { "name": "edges", - "description": null, + "description": "Collection of products", "args": [], "type": { "kind": "LIST", @@ -3446,7 +4146,7 @@ }, { "name": "pageInfo", - "description": null, + "description": "Pagination information", "args": [], "type": { "kind": "NON_NULL", @@ -3469,11 +4169,11 @@ { "kind": "OBJECT", "name": "ProductEdge", - "description": null, + "description": "Product in a collection", "fields": [ { "name": "cursor", - "description": null, + "description": "Id of the contained product", "args": [], "type": { "kind": "NON_NULL", @@ -3489,7 +4189,7 @@ }, { "name": "node", - "description": null, + "description": "Container for a product", "args": [], "type": { "kind": "OBJECT", @@ -3508,11 +4208,11 @@ { "kind": "OBJECT", "name": "Product", - "description": null, + "description": "Product is a collection of data representing a\nsingle product associated with a specific catalog\nand vendor which can be used to generate\ndynamic ads via a marekting campaign", "fields": [ { "name": "id", - "description": null, + "description": "Id of the product", "args": [], "type": { "kind": "NON_NULL", @@ -3528,7 +4228,7 @@ }, { "name": "creationDate", - "description": null, + "description": "Date and time the product was created", "args": [], "type": { "kind": "NON_NULL", @@ -3544,7 +4244,7 @@ }, { "name": "lastChangeDate", - "description": null, + "description": "Date and time the product was last modified", "args": [], "type": { "kind": "NON_NULL", @@ -3560,7 +4260,7 @@ }, { "name": "name", - "description": null, + "description": "Name of the product", "args": [], "type": { "kind": "NON_NULL", @@ -3576,7 +4276,7 @@ }, { "name": "sku", - "description": null, + "description": "Stock keeping unit of the product", "args": [], "type": { "kind": "NON_NULL", @@ -3592,7 +4292,7 @@ }, { "name": "remoteState", - "description": null, + "description": "Data related to the product stored on the remote platform", "args": [], "type": { "kind": "SCALAR", @@ -3604,11 +4304,11 @@ }, { "name": "marketingCampaigns", - "description": null, + "description": "Marketing campaigns referenced by the product", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the marketing campaigns collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -3616,9 +4316,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the marketing campaigns collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -3628,17 +4338,37 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null }, { "name": "showDeleted", - "description": null, + "description": "Toggle to true to retrieve deleted marketing campaigns", "type": { "kind": "SCALAR", "name": "Boolean", @@ -3657,7 +4387,7 @@ }, { "name": "catalog", - "description": null, + "description": "Product catalog containing the product", "args": [], "type": { "kind": "NON_NULL", @@ -3673,7 +4403,7 @@ }, { "name": "metadata", - "description": null, + "description": "Data related to the product", "args": [], "type": { "kind": "NON_NULL", @@ -3689,7 +4419,7 @@ }, { "name": "vendor", - "description": null, + "description": "Vendor owning the product", "args": [], "type": { "kind": "NON_NULL", @@ -3705,7 +4435,7 @@ }, { "name": "systemStatus", - "description": null, + "description": "System status of the product", "args": [], "type": { "kind": "NON_NULL", @@ -3721,7 +4451,7 @@ }, { "name": "errors", - "description": null, + "description": "Validation errors of the product", "args": [], "type": { "kind": "LIST", @@ -3741,7 +4471,7 @@ }, { "name": "warnings", - "description": null, + "description": "Validation warnings", "args": [], "type": { "kind": "LIST", @@ -3768,11 +4498,11 @@ { "kind": "OBJECT", "name": "MarketingCampaignConnection", - "description": null, + "description": "Marketing campaign collection", "fields": [ { "name": "edges", - "description": null, + "description": "Collection of marketing campaigns", "args": [], "type": { "kind": "LIST", @@ -3788,7 +4518,7 @@ }, { "name": "pageInfo", - "description": null, + "description": "Pagination information", "args": [], "type": { "kind": "NON_NULL", @@ -3811,11 +4541,11 @@ { "kind": "OBJECT", "name": "MarketingCampaignEdge", - "description": null, + "description": "Marketing campaign in a collection", "fields": [ { "name": "cursor", - "description": null, + "description": "Id of the marketing campaign", "args": [], "type": { "kind": "NON_NULL", @@ -3831,7 +4561,7 @@ }, { "name": "node", - "description": null, + "description": "Container for a marketing campaign", "args": [], "type": { "kind": "OBJECT", @@ -3850,11 +4580,11 @@ { "kind": "OBJECT", "name": "MarketingCampaign", - "description": null, + "description": "Marketing campaign is a collection of dynamic marketing ads\nutilizing a specified campaign template, list of products, run\ntime and creative specifications that are launched on a provided\nmedia channel", "fields": [ { "name": "id", - "description": null, + "description": "Id of the marketing campaign", "args": [], "type": { "kind": "NON_NULL", @@ -3870,7 +4600,7 @@ }, { "name": "creationDate", - "description": null, + "description": "Date and time the marketing campaign was created", "args": [], "type": { "kind": "NON_NULL", @@ -3886,7 +4616,7 @@ }, { "name": "lastChangeDate", - "description": null, + "description": "Date and time the marketing campaign was last modified", "args": [], "type": { "kind": "NON_NULL", @@ -3902,7 +4632,7 @@ }, { "name": "name", - "description": null, + "description": "Name of the marketing campaign", "args": [], "type": { "kind": "NON_NULL", @@ -3918,7 +4648,7 @@ }, { "name": "status", - "description": null, + "description": "Delivering status of the marketing campaign", "args": [], "type": { "kind": "NON_NULL", @@ -3934,11 +4664,11 @@ }, { "name": "marketingAds", - "description": null, + "description": "Marketing ads contained by the marketing campaign", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the marketing ads collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -3946,9 +4676,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the marketing ads collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -3958,10 +4698,30 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null @@ -3977,11 +4737,11 @@ }, { "name": "products", - "description": null, + "description": "Products referenced by the marketing campaign", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the products collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -3989,9 +4749,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the products collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -4001,17 +4771,37 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null }, { "name": "showDeleted", - "description": null, + "description": "Toggle to true to retrieve deleted products in your results", "type": { "kind": "SCALAR", "name": "Boolean", @@ -4030,7 +4820,7 @@ }, { "name": "vendor", - "description": null, + "description": "Vendor related to the marketing campaign", "args": [], "type": { "kind": "NON_NULL", @@ -4046,7 +4836,7 @@ }, { "name": "catalog", - "description": null, + "description": "Catalog related to the marketing campaign", "args": [], "type": { "kind": "NON_NULL", @@ -4062,7 +4852,7 @@ }, { "name": "campaignTemplate", - "description": null, + "description": "Campaign template related to the marketing campaign", "args": [], "type": { "kind": "NON_NULL", @@ -4078,7 +4868,7 @@ }, { "name": "mediaChannel", - "description": null, + "description": "Media channel the marketing campaign is delivering to", "args": [], "type": { "kind": "NON_NULL", @@ -4094,11 +4884,11 @@ }, { "name": "results", - "description": null, + "description": "Results referencing the marketing campaign", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the results collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -4106,9 +4896,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the results collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -4118,10 +4918,30 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null @@ -4137,7 +4957,7 @@ }, { "name": "creativeSpec", - "description": null, + "description": "Marketing campaign creative data", "args": [], "type": { "kind": "NON_NULL", @@ -4153,7 +4973,7 @@ }, { "name": "runTimeSpec", - "description": null, + "description": "Marketing campaign scheduling data", "args": [], "type": { "kind": "NON_NULL", @@ -4169,7 +4989,7 @@ }, { "name": "systemStatus", - "description": null, + "description": "System status of the marketing campaign", "args": [], "type": { "kind": "NON_NULL", @@ -4185,7 +5005,7 @@ }, { "name": "errors", - "description": null, + "description": "Validation errors of the marketing campaign", "args": [], "type": { "kind": "LIST", @@ -4218,11 +5038,11 @@ { "kind": "INTERFACE", "name": "ResultResource", - "description": null, + "description": "Resource referenced by a result", "fields": [ { "name": "id", - "description": null, + "description": "Id of the result resource", "args": [], "type": { "kind": "NON_NULL", @@ -4238,7 +5058,7 @@ }, { "name": "creationDate", - "description": null, + "description": "Date and time the result resource was created", "args": [], "type": { "kind": "NON_NULL", @@ -4254,7 +5074,7 @@ }, { "name": "lastChangeDate", - "description": null, + "description": "Date and time the result resource was last modified", "args": [], "type": { "kind": "NON_NULL", @@ -4270,7 +5090,7 @@ }, { "name": "vendor", - "description": null, + "description": "Vendor related with the result resource", "args": [], "type": { "kind": "NON_NULL", @@ -4300,11 +5120,11 @@ { "kind": "OBJECT", "name": "Vendor", - "description": null, + "description": "Vendor belongs to a marketplace and is granted access to specific\nproducts they can use to create a marketing campaign", "fields": [ { "name": "id", - "description": null, + "description": "Id of the vendor", "args": [], "type": { "kind": "NON_NULL", @@ -4320,7 +5140,7 @@ }, { "name": "creationDate", - "description": null, + "description": "Date and time the vendor was created", "args": [], "type": { "kind": "NON_NULL", @@ -4336,7 +5156,7 @@ }, { "name": "lastChangeDate", - "description": null, + "description": "Date and time the vendor was last updated", "args": [], "type": { "kind": "NON_NULL", @@ -4352,7 +5172,7 @@ }, { "name": "name", - "description": null, + "description": "Name of the vendor", "args": [], "type": { "kind": "NON_NULL", @@ -4368,7 +5188,7 @@ }, { "name": "marketplace", - "description": null, + "description": "Marketplace referenced by the vendor", "args": [], "type": { "kind": "NON_NULL", @@ -4384,11 +5204,11 @@ }, { "name": "products", - "description": null, + "description": "Products related to the vendor", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the products collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -4396,9 +5216,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the products collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -4408,17 +5238,37 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null }, { "name": "showDeleted", - "description": null, + "description": "Toggle to true to retrieve deleted products in your results", "type": { "kind": "SCALAR", "name": "Boolean", @@ -4437,7 +5287,7 @@ }, { "name": "systemStatus", - "description": null, + "description": "System status of the vendor", "args": [], "type": { "kind": "NON_NULL", @@ -4453,7 +5303,7 @@ }, { "name": "errors", - "description": null, + "description": "Validation errors of the vendor", "args": [], "type": { "kind": "LIST", @@ -4480,20 +5330,20 @@ { "kind": "ENUM", "name": "MarketingCampaignStatus", - "description": null, + "description": "Delivering status a of a marketing campaign", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [ { "name": "ACTIVE", - "description": null, + "description": "Active status", "isDeprecated": false, "deprecationReason": null }, { "name": "PAUSED", - "description": null, + "description": "Paused status", "isDeprecated": false, "deprecationReason": null } @@ -4503,11 +5353,11 @@ { "kind": "OBJECT", "name": "MarketingAdConnection", - "description": null, + "description": "Marketing ads collection", "fields": [ { "name": "edges", - "description": null, + "description": "Collection of marketing ads", "args": [], "type": { "kind": "LIST", @@ -4523,7 +5373,7 @@ }, { "name": "pageInfo", - "description": null, + "description": "Pagination information", "args": [], "type": { "kind": "NON_NULL", @@ -4546,11 +5396,11 @@ { "kind": "OBJECT", "name": "MarketingAdEdge", - "description": null, + "description": "Marketing ad in a collection", "fields": [ { "name": "cursor", - "description": null, + "description": "Id of the contained marketing ad", "args": [], "type": { "kind": "NON_NULL", @@ -4566,7 +5416,7 @@ }, { "name": "node", - "description": null, + "description": "Container for a marketing ad", "args": [], "type": { "kind": "OBJECT", @@ -4585,11 +5435,11 @@ { "kind": "OBJECT", "name": "MarketingAd", - "description": null, + "description": "Marketing ad represents an specific ad on a platform belonging\nto a marketing campaign and associated with a single vendor", "fields": [ { "name": "id", - "description": null, + "description": "Id of the marketing ad", "args": [], "type": { "kind": "NON_NULL", @@ -4605,7 +5455,7 @@ }, { "name": "creationDate", - "description": null, + "description": "Date and time the marketing ad was created", "args": [], "type": { "kind": "NON_NULL", @@ -4621,7 +5471,7 @@ }, { "name": "lastChangeDate", - "description": null, + "description": "Date and time the marketing ad was last modified", "args": [], "type": { "kind": "NON_NULL", @@ -4637,7 +5487,7 @@ }, { "name": "remoteId", - "description": null, + "description": "Id of the marketing ad on the related marketing campaign platform", "args": [], "type": { "kind": "NON_NULL", @@ -4653,7 +5503,7 @@ }, { "name": "preview", - "description": null, + "description": "Preview data of the marketing ad", "args": [], "type": { "kind": "NON_NULL", @@ -4669,11 +5519,11 @@ }, { "name": "results", - "description": null, + "description": "Results related to the marketing ad", "args": [ { "name": "filter", - "description": null, + "description": "Conditions to filter the results collection with", "type": { "kind": "SCALAR", "name": "FilterInput", @@ -4681,9 +5531,19 @@ }, "defaultValue": null }, + { + "name": "sort", + "description": "Conditions to sort the results collection with", + "type": { + "kind": "INPUT_OBJECT", + "name": "SortInput", + "ofType": null + }, + "defaultValue": null + }, { "name": "first", - "description": null, + "description": "Page size when paging forward using `after` or no cursor", "type": { "kind": "SCALAR", "name": "Int", @@ -4693,10 +5553,30 @@ }, { "name": "after", - "description": null, + "description": "End cursor of the previously retrieved page", "type": { "kind": "SCALAR", - "name": "ObjectId", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Page size when paging backwards using `before`", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Start cursor of the previously retrieved page when paging backwards", + "type": { + "kind": "SCALAR", + "name": "String", "ofType": null }, "defaultValue": null @@ -4712,7 +5592,7 @@ }, { "name": "marketingCampaign", - "description": null, + "description": "Marketing campaigns related to the marketing ad", "args": [], "type": { "kind": "NON_NULL", @@ -4728,7 +5608,7 @@ }, { "name": "vendor", - "description": null, + "description": "Vendor related to the marketing ad", "args": [], "type": { "kind": "NON_NULL", @@ -4757,11 +5637,11 @@ { "kind": "OBJECT", "name": "ResultConnection", - "description": null, + "description": "Results collection", "fields": [ { "name": "edges", - "description": null, + "description": "Collection of results", "args": [], "type": { "kind": "LIST", @@ -4777,7 +5657,7 @@ }, { "name": "pageInfo", - "description": null, + "description": "Pagination information", "args": [], "type": { "kind": "NON_NULL", @@ -4800,11 +5680,11 @@ { "kind": "OBJECT", "name": "ResultEdge", - "description": null, + "description": "Result in a collection", "fields": [ { "name": "cursor", - "description": null, + "description": "Id of the contained result", "args": [], "type": { "kind": "NON_NULL", @@ -4820,7 +5700,7 @@ }, { "name": "node", - "description": null, + "description": "Container for a result", "args": [], "type": { "kind": "OBJECT", @@ -4839,11 +5719,11 @@ { "kind": "OBJECT", "name": "Result", - "description": null, + "description": "Result", "fields": [ { "name": "id", - "description": null, + "description": "Id of the result", "args": [], "type": { "kind": "NON_NULL", @@ -4859,7 +5739,7 @@ }, { "name": "creationDate", - "description": null, + "description": "Date and time the result was created", "args": [], "type": { "kind": "NON_NULL", @@ -4875,7 +5755,7 @@ }, { "name": "lastChangeDate", - "description": null, + "description": "Date and time the result was last modified", "args": [], "type": { "kind": "NON_NULL", @@ -4891,7 +5771,7 @@ }, { "name": "date", - "description": null, + "description": "Date and time the result data was generated", "args": [], "type": { "kind": "NON_NULL", @@ -4907,7 +5787,7 @@ }, { "name": "analytics", - "description": null, + "description": "Analytics data related to the result", "args": [], "type": { "kind": "NON_NULL", @@ -4923,7 +5803,7 @@ }, { "name": "type", - "description": null, + "description": "Resource type related to the result", "args": [], "type": { "kind": "NON_NULL", @@ -4939,7 +5819,7 @@ }, { "name": "resource", - "description": null, + "description": "Resource related to the result", "args": [], "type": { "kind": "NON_NULL", @@ -4955,7 +5835,7 @@ }, { "name": "vendor", - "description": null, + "description": "Vendor related to the result", "args": [], "type": { "kind": "NON_NULL", @@ -4978,11 +5858,11 @@ { "kind": "OBJECT", "name": "ResultAnalytics", - "description": null, + "description": "Analytics data referenced by a result", "fields": [ { "name": "results", - "description": null, + "description": "Number of results", "args": [], "type": { "kind": "SCALAR", @@ -4994,7 +5874,7 @@ }, { "name": "impressions", - "description": null, + "description": "Number of impressions", "args": [], "type": { "kind": "SCALAR", @@ -5006,7 +5886,7 @@ }, { "name": "clicks", - "description": null, + "description": "Number of clicks", "args": [], "type": { "kind": "SCALAR", @@ -5018,7 +5898,7 @@ }, { "name": "spend", - "description": null, + "description": "Amount spent", "args": [], "type": { "kind": "SCALAR", @@ -5047,7 +5927,7 @@ { "kind": "ENUM", "name": "ResultResourceTypeEnum", - "description": null, + "description": "Resource related to a result", "fields": null, "inputFields": null, "interfaces": null, @@ -5070,11 +5950,11 @@ { "kind": "OBJECT", "name": "CampaignTemplateConnection", - "description": null, + "description": "Campaign templates collection", "fields": [ { "name": "edges", - "description": null, + "description": "Collection of campaign templates", "args": [], "type": { "kind": "LIST", @@ -5090,7 +5970,7 @@ }, { "name": "pageInfo", - "description": null, + "description": "Pagination information", "args": [], "type": { "kind": "NON_NULL", @@ -5113,11 +5993,11 @@ { "kind": "OBJECT", "name": "CampaignTemplateEdge", - "description": null, + "description": "Campaign template in a collection", "fields": [ { "name": "cursor", - "description": null, + "description": "Id of the contained campaign template", "args": [], "type": { "kind": "NON_NULL", @@ -5133,7 +6013,7 @@ }, { "name": "node", - "description": null, + "description": "Container for a campaign template", "args": [], "type": { "kind": "OBJECT", @@ -5152,11 +6032,11 @@ { "kind": "OBJECT", "name": "VendorConnection", - "description": null, + "description": "Vendors collection", "fields": [ { "name": "edges", - "description": null, + "description": "Collection of vendors", "args": [], "type": { "kind": "LIST", @@ -5172,7 +6052,7 @@ }, { "name": "pageInfo", - "description": null, + "description": "Pagination information", "args": [], "type": { "kind": "NON_NULL", @@ -5195,11 +6075,11 @@ { "kind": "OBJECT", "name": "VendorEdge", - "description": null, + "description": "Vendor in a collection", "fields": [ { "name": "cursor", - "description": null, + "description": "Id of the contained vendor", "args": [], "type": { "kind": "NON_NULL", @@ -5215,7 +6095,7 @@ }, { "name": "node", - "description": null, + "description": "Container for a vendor", "args": [], "type": { "kind": "OBJECT", @@ -5238,11 +6118,11 @@ "fields": [ { "name": "createCatalog", - "description": null, + "description": "Creates a product catalog using input data", "args": [ { "name": "input", - "description": null, + "description": "Product catalog creation input data", "type": { "kind": "NON_NULL", "name": null, @@ -5265,11 +6145,11 @@ }, { "name": "importCatalog", - "description": null, + "description": "Imports a product catalog using input data", "args": [ { "name": "input", - "description": null, + "description": "Product catalog import input data", "type": { "kind": "NON_NULL", "name": null, @@ -5292,11 +6172,11 @@ }, { "name": "deleteCatalog", - "description": null, + "description": "Deletes a product catalog identified by a given id", "args": [ { "name": "id", - "description": null, + "description": "Id of the product catalog to delete", "type": { "kind": "NON_NULL", "name": null, @@ -5319,11 +6199,11 @@ }, { "name": "updateCatalog", - "description": null, + "description": "Updates a product catalog identified by an id using input data", "args": [ { "name": "id", - "description": null, + "description": "Id of the product catalog to update", "type": { "kind": "NON_NULL", "name": null, @@ -5337,7 +6217,7 @@ }, { "name": "input", - "description": null, + "description": "Product catalog update input data", "type": { "kind": "NON_NULL", "name": null, @@ -5360,11 +6240,11 @@ }, { "name": "createEntitlement", - "description": null, + "description": "Creates an entitlement using input data", "args": [ { "name": "input", - "description": null, + "description": "Entitlement creation input data", "type": { "kind": "NON_NULL", "name": null, @@ -5387,11 +6267,11 @@ }, { "name": "updateEntitlement", - "description": null, + "description": "Updates an entitlement identified by an id using input data", "args": [ { "name": "id", - "description": null, + "description": "Id of the entitlement to update", "type": { "kind": "NON_NULL", "name": null, @@ -5405,7 +6285,7 @@ }, { "name": "input", - "description": null, + "description": "Entitlement update input data", "type": { "kind": "NON_NULL", "name": null, @@ -5428,11 +6308,11 @@ }, { "name": "deleteEntitlement", - "description": null, + "description": "Deletes an entitlement identified by an id", "args": [ { "name": "id", - "description": null, + "description": "Id of the entitlement to delete", "type": { "kind": "NON_NULL", "name": null, @@ -5455,11 +6335,11 @@ }, { "name": "createMarketingCampaign", - "description": null, + "description": "Creates a marketing campaign using input data", "args": [ { "name": "input", - "description": null, + "description": "Marketing campaign creation input data", "type": { "kind": "NON_NULL", "name": null, @@ -5482,11 +6362,11 @@ }, { "name": "updateMarketingCampaign", - "description": null, + "description": "Updates a marketing campaign identified by a given id using input data", "args": [ { "name": "id", - "description": null, + "description": "Id of the marketing campaign to update", "type": { "kind": "NON_NULL", "name": null, @@ -5500,7 +6380,7 @@ }, { "name": "input", - "description": null, + "description": "Marketing campaign update input data", "type": { "kind": "NON_NULL", "name": null, @@ -5523,11 +6403,11 @@ }, { "name": "deleteMarketingCampaign", - "description": null, + "description": "Deletes a marketing campaign identified by a given id", "args": [ { "name": "id", - "description": null, + "description": "Id of the marketing campaign to delete", "type": { "kind": "NON_NULL", "name": null, @@ -5550,11 +6430,11 @@ }, { "name": "createMarketplace", - "description": null, + "description": "Creates a marketplace using input data", "args": [ { "name": "input", - "description": null, + "description": "Marketplace creation input data", "type": { "kind": "NON_NULL", "name": null, @@ -5577,11 +6457,11 @@ }, { "name": "updateMarketplace", - "description": null, + "description": "Updates a marketplace identified by a given id using input data", "args": [ { "name": "id", - "description": null, + "description": "Id of the marketplace to update", "type": { "kind": "NON_NULL", "name": null, @@ -5595,7 +6475,7 @@ }, { "name": "input", - "description": null, + "description": "Marketplace update input data", "type": { "kind": "NON_NULL", "name": null, @@ -5618,11 +6498,11 @@ }, { "name": "deleteMarketplace", - "description": null, + "description": "Deletes a marketplace identified by an id", "args": [ { "name": "id", - "description": null, + "description": "Id of the marketplace to delete", "type": { "kind": "NON_NULL", "name": null, @@ -5645,11 +6525,11 @@ }, { "name": "createMediaChannel", - "description": null, + "description": "Creates a media channel using input data", "args": [ { "name": "input", - "description": null, + "description": "Media channel creation input data", "type": { "kind": "NON_NULL", "name": null, @@ -5672,11 +6552,11 @@ }, { "name": "importMediaChannel", - "description": null, + "description": "Imports a media channel using input data", "args": [ { "name": "input", - "description": null, + "description": "Media channel import input data", "type": { "kind": "NON_NULL", "name": null, @@ -5699,11 +6579,11 @@ }, { "name": "updateMediaChannel", - "description": null, + "description": "Updates a media channel identified by an id using input data", "args": [ { "name": "id", - "description": null, + "description": "Id of the media channel to update", "type": { "kind": "NON_NULL", "name": null, @@ -5717,7 +6597,7 @@ }, { "name": "input", - "description": null, + "description": "Media channel update input data", "type": { "kind": "NON_NULL", "name": null, @@ -5740,11 +6620,11 @@ }, { "name": "deleteMediaChannel", - "description": null, + "description": "Deletes a media channel identified by an id", "args": [ { "name": "id", - "description": null, + "description": "Id of the media channel to delete", "type": { "kind": "NON_NULL", "name": null, @@ -5767,11 +6647,11 @@ }, { "name": "createOrganization", - "description": null, + "description": "Creates an organization using input data", "args": [ { "name": "input", - "description": null, + "description": "Organization creation input data", "type": { "kind": "NON_NULL", "name": null, @@ -5794,11 +6674,11 @@ }, { "name": "updateOrganization", - "description": null, + "description": "Updates an organization identified by a given id using input data", "args": [ { "name": "id", - "description": null, + "description": "Id of the organization to update", "type": { "kind": "NON_NULL", "name": null, @@ -5812,7 +6692,7 @@ }, { "name": "input", - "description": null, + "description": "Organization update input data", "type": { "kind": "NON_NULL", "name": null, @@ -5835,11 +6715,11 @@ }, { "name": "deleteOrganization", - "description": null, + "description": "Deletes an organization identified by a given id", "args": [ { "name": "id", - "description": null, + "description": "Id of the organization to delete", "type": { "kind": "NON_NULL", "name": null, @@ -5862,11 +6742,11 @@ }, { "name": "createProduct", - "description": null, + "description": "Creates a product using input data", "args": [ { "name": "input", - "description": null, + "description": "Product creation input data", "type": { "kind": "NON_NULL", "name": null, @@ -5889,11 +6769,11 @@ }, { "name": "updateProduct", - "description": null, + "description": "Updates a product identified by an id using input data", "args": [ { "name": "id", - "description": null, + "description": "Id of the product to update", "type": { "kind": "NON_NULL", "name": null, @@ -5907,7 +6787,7 @@ }, { "name": "input", - "description": null, + "description": "Product update input data", "type": { "kind": "NON_NULL", "name": null, @@ -5930,11 +6810,11 @@ }, { "name": "deleteProduct", - "description": null, + "description": "Deletes a product identified by a given id", "args": [ { "name": "id", - "description": null, + "description": "Id of the product to delete", "type": { "kind": "NON_NULL", "name": null, @@ -5957,11 +6837,11 @@ }, { "name": "login", - "description": null, + "description": "Authenticates the user using login input data", "args": [ { "name": "input", - "description": null, + "description": "Login input data", "type": { "kind": "NON_NULL", "name": null, @@ -5984,11 +6864,11 @@ }, { "name": "updateUser", - "description": null, + "description": "Updates the user using update input data", "args": [ { "name": "input", - "description": null, + "description": "User update input", "type": { "kind": "NON_NULL", "name": null, @@ -6011,11 +6891,11 @@ }, { "name": "refreshLogin", - "description": null, + "description": "Refreshed the user authentication using refresh login input data", "args": [ { "name": "input", - "description": null, + "description": "Refresh login input data", "type": { "kind": "NON_NULL", "name": null, @@ -6038,11 +6918,11 @@ }, { "name": "createVendor", - "description": null, + "description": "Creates a vendor using input data", "args": [ { "name": "input", - "description": null, + "description": "Vendor creation input data", "type": { "kind": "NON_NULL", "name": null, @@ -6065,11 +6945,11 @@ }, { "name": "updateVendor", - "description": null, + "description": "Updates a vendor identified by a given id using input data", "args": [ { "name": "id", - "description": null, + "description": "Id of the vendor to update", "type": { "kind": "NON_NULL", "name": null, @@ -6083,7 +6963,7 @@ }, { "name": "input", - "description": null, + "description": "Vendor update input data", "type": { "kind": "NON_NULL", "name": null, @@ -6106,11 +6986,11 @@ }, { "name": "deleteVendor", - "description": null, + "description": "Deletes a vendor identified by a given id", "args": [ { "name": "id", - "description": null, + "description": "Id of the vendor to delete", "type": { "kind": "NON_NULL", "name": null, @@ -6140,12 +7020,12 @@ { "kind": "INPUT_OBJECT", "name": "CatalogCreateInput", - "description": null, + "description": "Product catalog creation input data", "fields": null, "inputFields": [ { "name": "name", - "description": null, + "description": "Name of the product catalog", "type": { "kind": "NON_NULL", "name": null, @@ -6159,7 +7039,7 @@ }, { "name": "mediaChannelId", - "description": null, + "description": "Media channel id referenced by the product catalog", "type": { "kind": "NON_NULL", "name": null, @@ -6173,7 +7053,7 @@ }, { "name": "catalogType", - "description": null, + "description": "Category of the products referenced by the catalog", "type": { "kind": "NON_NULL", "name": null, @@ -6193,12 +7073,12 @@ { "kind": "INPUT_OBJECT", "name": "CatalogImportInput", - "description": null, + "description": "Product catalog import input data", "fields": null, "inputFields": [ { "name": "mediaChannelId", - "description": null, + "description": "Media channel id referenced by the product catalog", "type": { "kind": "NON_NULL", "name": null, @@ -6212,7 +7092,7 @@ }, { "name": "remoteId", - "description": null, + "description": "Id of the product catalog on the related platform", "type": { "kind": "NON_NULL", "name": null, @@ -6232,11 +7112,11 @@ { "kind": "OBJECT", "name": "Deletion", - "description": null, + "description": "Object deletion operation result", "fields": [ { "name": "id", - "description": null, + "description": "Id of the deleted object", "args": [], "type": { "kind": "NON_NULL", @@ -6259,12 +7139,12 @@ { "kind": "INPUT_OBJECT", "name": "CatalogUpdateInput", - "description": null, + "description": "Product catalog update input data", "fields": null, "inputFields": [ { "name": "name", - "description": null, + "description": "Name of the product catalog", "type": { "kind": "SCALAR", "name": "NonEmptyString", @@ -6280,12 +7160,12 @@ { "kind": "INPUT_OBJECT", "name": "EntitlementInput", - "description": null, + "description": "Entitlement creation input data", "fields": null, "inputFields": [ { "name": "userId", - "description": null, + "description": "Id of the user the permissions are granted to", "type": { "kind": "NON_NULL", "name": null, @@ -6299,7 +7179,7 @@ }, { "name": "resourceId", - "description": null, + "description": "Id of the resource related to the entitlement", "type": { "kind": "NON_NULL", "name": null, @@ -6313,7 +7193,7 @@ }, { "name": "permissions", - "description": null, + "description": "Set of permissions granted to the related user", "type": { "kind": "NON_NULL", "name": null, @@ -6341,12 +7221,12 @@ { "kind": "INPUT_OBJECT", "name": "EntitlementUpdateInput", - "description": null, + "description": "Entitlement update input data", "fields": null, "inputFields": [ { "name": "permissions", - "description": null, + "description": "Set of permissions granted to the related user", "type": { "kind": "NON_NULL", "name": null, @@ -6374,12 +7254,12 @@ { "kind": "INPUT_OBJECT", "name": "MarketingCampaignInput", - "description": null, + "description": "Marketing campaign creation input data", "fields": null, "inputFields": [ { "name": "campaignTemplateId", - "description": null, + "description": "Id of the campaign template referenced by the marketing campaign", "type": { "kind": "NON_NULL", "name": null, @@ -6393,7 +7273,7 @@ }, { "name": "creativeSpec", - "description": null, + "description": "Marketing campaign creative data", "type": { "kind": "NON_NULL", "name": null, @@ -6407,7 +7287,7 @@ }, { "name": "runTimeSpec", - "description": null, + "description": "Marketing campaign scheduling data", "type": { "kind": "NON_NULL", "name": null, @@ -6421,7 +7301,7 @@ }, { "name": "productIds", - "description": null, + "description": "Ids of the products advertised in the marketing campaign", "type": { "kind": "LIST", "name": null, @@ -6439,7 +7319,7 @@ }, { "name": "status", - "description": null, + "description": "Delivering status of the marketing campaign", "type": { "kind": "ENUM", "name": "MarketingCampaignStatus", @@ -6465,12 +7345,12 @@ { "kind": "INPUT_OBJECT", "name": "MarketingCampaignUpdateInput", - "description": null, + "description": "Marketing campaign update input data", "fields": null, "inputFields": [ { "name": "creativeSpec", - "description": null, + "description": "Marketing campaign creative data", "type": { "kind": "SCALAR", "name": "JSONObject", @@ -6480,7 +7360,7 @@ }, { "name": "runTimeSpec", - "description": null, + "description": "Marketing campaign scheduling data", "type": { "kind": "SCALAR", "name": "JSONObject", @@ -6490,7 +7370,7 @@ }, { "name": "status", - "description": null, + "description": "Delivering status of the marketing campaign", "type": { "kind": "ENUM", "name": "MarketingCampaignStatus", @@ -6516,12 +7396,12 @@ { "kind": "INPUT_OBJECT", "name": "MarketplaceInput", - "description": null, + "description": "Marketplace creation input", "fields": null, "inputFields": [ { "name": "name", - "description": null, + "description": "Name of the marketplace", "type": { "kind": "NON_NULL", "name": null, @@ -6535,7 +7415,7 @@ }, { "name": "organizationId", - "description": null, + "description": "Id of the organization referenced by the marketplace", "type": { "kind": "NON_NULL", "name": null, @@ -6555,12 +7435,12 @@ { "kind": "INPUT_OBJECT", "name": "MarketplaceUpdateInput", - "description": null, + "description": "Marketplace update input", "fields": null, "inputFields": [ { "name": "name", - "description": null, + "description": "Name of the marketplace", "type": { "kind": "SCALAR", "name": "NonEmptyString", @@ -6576,12 +7456,12 @@ { "kind": "INPUT_OBJECT", "name": "MediaChannelCreateInput", - "description": null, + "description": "Media channel creation input data", "fields": null, "inputFields": [ { "name": "name", - "description": null, + "description": "Name of the media channel", "type": { "kind": "NON_NULL", "name": null, @@ -6595,7 +7475,7 @@ }, { "name": "marketplaceId", - "description": null, + "description": "Id of the marketplace referenced by the media channel", "type": { "kind": "NON_NULL", "name": null, @@ -6609,7 +7489,7 @@ }, { "name": "platform", - "description": null, + "description": "Platform the media channel is available for", "type": { "kind": "NON_NULL", "name": null, @@ -6623,7 +7503,7 @@ }, { "name": "token", - "description": null, + "description": "Media channel platform authentication token", "type": { "kind": "NON_NULL", "name": null, @@ -6643,12 +7523,12 @@ { "kind": "INPUT_OBJECT", "name": "MediaChannelImportInput", - "description": null, + "description": "Media channel import input data", "fields": null, "inputFields": [ { "name": "marketplaceId", - "description": null, + "description": "Id of the marketplace referenced by the media channel", "type": { "kind": "NON_NULL", "name": null, @@ -6662,7 +7542,7 @@ }, { "name": "platform", - "description": null, + "description": "Platform the media channel is available for", "type": { "kind": "NON_NULL", "name": null, @@ -6676,7 +7556,7 @@ }, { "name": "remoteId", - "description": null, + "description": "Id of the media channel on the corresponding platform", "type": { "kind": "NON_NULL", "name": null, @@ -6690,7 +7570,7 @@ }, { "name": "token", - "description": null, + "description": "Media channel platform authentication token", "type": { "kind": "NON_NULL", "name": null, @@ -6710,12 +7590,12 @@ { "kind": "INPUT_OBJECT", "name": "MediaChannelUpdateInput", - "description": null, + "description": "Media channel update input data", "fields": null, "inputFields": [ { "name": "name", - "description": null, + "description": "Name of the media channel", "type": { "kind": "SCALAR", "name": "NonEmptyString", @@ -6725,7 +7605,7 @@ }, { "name": "token", - "description": null, + "description": "Media channel platform authentication token", "type": { "kind": "SCALAR", "name": "NonEmptyString", @@ -6741,12 +7621,12 @@ { "kind": "INPUT_OBJECT", "name": "OrganizationInput", - "description": null, + "description": "Organization creation input data", "fields": null, "inputFields": [ { "name": "name", - "description": null, + "description": "Name of the organization", "type": { "kind": "NON_NULL", "name": null, @@ -6766,12 +7646,12 @@ { "kind": "INPUT_OBJECT", "name": "OrganizationUpdateInput", - "description": null, + "description": "Organization update input data", "fields": null, "inputFields": [ { "name": "name", - "description": null, + "description": "Name of the organization", "type": { "kind": "SCALAR", "name": "NonEmptyString", @@ -6787,12 +7667,12 @@ { "kind": "INPUT_OBJECT", "name": "ProductInput", - "description": null, + "description": "Product creation input", "fields": null, "inputFields": [ { "name": "vendorId", - "description": null, + "description": "Id of the vendor that owns the product", "type": { "kind": "NON_NULL", "name": null, @@ -6806,7 +7686,7 @@ }, { "name": "catalogId", - "description": null, + "description": "Id of the product catalog containing the product", "type": { "kind": "NON_NULL", "name": null, @@ -6820,7 +7700,7 @@ }, { "name": "metadata", - "description": null, + "description": "Data related to the product", "type": { "kind": "NON_NULL", "name": null, @@ -6840,12 +7720,12 @@ { "kind": "INPUT_OBJECT", "name": "ProductUpdateInput", - "description": null, + "description": "Product update input data", "fields": null, "inputFields": [ { "name": "metadata", - "description": null, + "description": "Data related to the product", "type": { "kind": "NON_NULL", "name": null, @@ -6865,12 +7745,12 @@ { "kind": "INPUT_OBJECT", "name": "UserLoginInput", - "description": null, + "description": "User login input data", "fields": null, "inputFields": [ { "name": "password", - "description": null, + "description": "Password used for the login", "type": { "kind": "NON_NULL", "name": null, @@ -6884,7 +7764,7 @@ }, { "name": "email", - "description": null, + "description": "Email used for the login", "type": { "kind": "NON_NULL", "name": null, @@ -6904,11 +7784,11 @@ { "kind": "OBJECT", "name": "Token", - "description": null, + "description": "Authentication token", "fields": [ { "name": "token", - "description": null, + "description": "Token value", "args": [], "type": { "kind": "NON_NULL", @@ -6924,7 +7804,7 @@ }, { "name": "refreshToken", - "description": null, + "description": "Secondary token used to refresh authentication", "args": [], "type": { "kind": "NON_NULL", @@ -6940,7 +7820,7 @@ }, { "name": "expiryDate", - "description": null, + "description": "Date and time the token will expire", "args": [], "type": { "kind": "NON_NULL", @@ -6956,7 +7836,7 @@ }, { "name": "user", - "description": null, + "description": "User the token was created for", "args": [], "type": { "kind": "NON_NULL", @@ -6979,12 +7859,12 @@ { "kind": "INPUT_OBJECT", "name": "UserUpdateInput", - "description": null, + "description": "User update input data", "fields": null, "inputFields": [ { "name": "firstName", - "description": null, + "description": "First name of the user", "type": { "kind": "SCALAR", "name": "NonEmptyString", @@ -6994,7 +7874,7 @@ }, { "name": "lastName", - "description": null, + "description": "Last name of the user", "type": { "kind": "SCALAR", "name": "NonEmptyString", @@ -7004,7 +7884,7 @@ }, { "name": "password", - "description": null, + "description": "Password of the user", "type": { "kind": "SCALAR", "name": "NonEmptyString", @@ -7014,7 +7894,7 @@ }, { "name": "email", - "description": null, + "description": "Email of the user", "type": { "kind": "SCALAR", "name": "NonEmptyString", @@ -7030,12 +7910,12 @@ { "kind": "INPUT_OBJECT", "name": "RefreshTokenInput", - "description": null, + "description": "Refresh login input data", "fields": null, "inputFields": [ { "name": "refreshToken", - "description": null, + "description": "Secondary token value", "type": { "kind": "NON_NULL", "name": null, @@ -7055,12 +7935,12 @@ { "kind": "INPUT_OBJECT", "name": "VendorInput", - "description": null, + "description": "Vendor creation input data", "fields": null, "inputFields": [ { "name": "name", - "description": null, + "description": "Name of the vendor", "type": { "kind": "NON_NULL", "name": null, @@ -7074,7 +7954,7 @@ }, { "name": "marketplaceId", - "description": null, + "description": "Id of the marketplace referenced by the vendor", "type": { "kind": "NON_NULL", "name": null, @@ -7094,12 +7974,12 @@ { "kind": "INPUT_OBJECT", "name": "VendorUpdateInput", - "description": null, + "description": "Vendor update input data", "fields": null, "inputFields": [ { "name": "name", - "description": null, + "description": "Name of the vendor", "type": { "kind": "SCALAR", "name": "NonEmptyString", @@ -7911,68 +8791,68 @@ { "kind": "ENUM", "name": "AuthField", - "description": null, + "description": "Authorization field type", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [ { "name": "id", - "description": null, + "description": "Generic object id", "isDeprecated": false, "deprecationReason": null }, { "name": "userId", - "description": null, + "description": "User id", "isDeprecated": false, "deprecationReason": null }, { "name": "vendorId", - "description": null, + "description": "Vendor id", "isDeprecated": false, "deprecationReason": null }, { "name": "organizationId", - "description": null, + "description": "Organization id", "isDeprecated": false, "deprecationReason": null }, { "name": "marketplaceId", - "description": null, + "description": "Marketplace id", "isDeprecated": false, "deprecationReason": null }, { "name": "mediaChannelId", - "description": null, + "description": "Media channel id", "isDeprecated": false, "deprecationReason": null }, { "name": "campaignTemplateId", - "description": null, + "description": "Campaign template id", "isDeprecated": false, "deprecationReason": null }, { "name": "resourceId", - "description": null, + "description": "Entitlement target resource id", "isDeprecated": false, "deprecationReason": null }, { "name": "catalogId", - "description": null, + "description": "Product catalog id", "isDeprecated": false, "deprecationReason": null }, { "name": "productIds", - "description": null, + "description": "Product ids", "isDeprecated": false, "deprecationReason": null } @@ -7982,80 +8862,80 @@ { "kind": "ENUM", "name": "AuthLocation", - "description": null, + "description": "Location of the authorization operation", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [ { "name": "ARG", - "description": null, + "description": "On the query arguments", "isDeprecated": false, "deprecationReason": null }, { "name": "INPUT", - "description": null, + "description": "On the mutation input", "isDeprecated": false, "deprecationReason": null }, { "name": "PARENT", - "description": null, + "description": "On the parent object", "isDeprecated": false, "deprecationReason": null }, { "name": "CATALOG", - "description": null, + "description": "On the referenced catalog", "isDeprecated": false, "deprecationReason": null }, { "name": "ENTITLEMENT", - "description": null, + "description": "On the referenced entitlement", "isDeprecated": false, "deprecationReason": null }, { "name": "MARKETING_AD", - "description": null, + "description": "On the referenced marketing ad", "isDeprecated": false, "deprecationReason": null }, { "name": "MARKETING_CAMPAIGN", - "description": null, + "description": "On the referenced marketing campaign", "isDeprecated": false, "deprecationReason": null }, { "name": "CAMPAIGN_TEMPLATE", - "description": null, + "description": "On the referenced campaign template", "isDeprecated": false, "deprecationReason": null }, { "name": "MEDIA_CHANNEL", - "description": null, + "description": "On the referenced media channel", "isDeprecated": false, "deprecationReason": null }, { "name": "PRODUCT", - "description": null, + "description": "On the referenced product", "isDeprecated": false, "deprecationReason": null }, { "name": "RESULT", - "description": null, + "description": "On the referenced result", "isDeprecated": false, "deprecationReason": null }, { "name": "VENDOR", - "description": null, + "description": "On the referenced vendor", "isDeprecated": false, "deprecationReason": null } @@ -8065,26 +8945,26 @@ { "kind": "ENUM", "name": "AuthType", - "description": null, + "description": "Permission check type", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [ { "name": "ENTITLEMENT", - "description": null, + "description": "Permission granted by entitlement", "isDeprecated": false, "deprecationReason": null }, { "name": "VENDOR", - "description": null, + "description": "Permission granted by vendor relationship", "isDeprecated": false, "deprecationReason": null }, { "name": "USER_ONLY", - "description": null, + "description": "Permission granted by user ownership", "isDeprecated": false, "deprecationReason": null } @@ -8117,68 +8997,68 @@ { "kind": "ENUM", "name": "OPERATOR", - "description": null, + "description": "Filter operator", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [ { "name": "EQUALS", - "description": null, + "description": "Field value equals the given value", "isDeprecated": false, "deprecationReason": null }, { "name": "NOT_EQUALS", - "description": null, + "description": "Field value is not equal to the given value", "isDeprecated": false, "deprecationReason": null }, { "name": "CONTAINS", - "description": null, + "description": "Field contains the given value (case sensitive)", "isDeprecated": false, "deprecationReason": null }, { "name": "ICONTAINS", - "description": null, + "description": "Field contains the given value (case insensitive)", "isDeprecated": false, "deprecationReason": null }, { "name": "GT", - "description": null, + "description": "Field value is greater than the given value", "isDeprecated": false, "deprecationReason": null }, { "name": "GTE", - "description": null, + "description": "Field value is equal or greater than the given value", "isDeprecated": false, "deprecationReason": null }, { "name": "LT", - "description": null, + "description": "Field value is lower than the given value", "isDeprecated": false, "deprecationReason": null }, { "name": "LTE", - "description": null, + "description": "Field value is equal or lower than the given value", "isDeprecated": false, "deprecationReason": null }, { "name": "IN", - "description": null, + "description": "Field value is contained in the given list of values", "isDeprecated": false, "deprecationReason": null }, { "name": "IS_NULL", - "description": null, + "description": "Field value is null", "isDeprecated": false, "deprecationReason": null } @@ -8199,12 +9079,12 @@ "directives": [ { "name": "auth", - "description": null, + "description": "Authorization directive", "locations": ["OBJECT", "FIELD_DEFINITION"], "args": [ { "name": "field", - "description": null, + "description": "Internal field referencing the related object by id", "type": { "kind": "ENUM", "name": "AuthField", @@ -8214,7 +9094,7 @@ }, { "name": "location", - "description": null, + "description": "Authorization location", "type": { "kind": "ENUM", "name": "AuthLocation", @@ -8224,7 +9104,7 @@ }, { "name": "type", - "description": null, + "description": "Permission grant type", "type": { "kind": "ENUM", "name": "AuthType", @@ -8234,7 +9114,7 @@ }, { "name": "permissions", - "description": null, + "description": "Permissions required to resolve the field", "type": { "kind": "LIST", "name": null, diff --git a/index.node.js b/index.node.js index f209b0a..c1babe3 100644 --- a/index.node.js +++ b/index.node.js @@ -1 +1 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(global,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=10)}([function(t,e){t.exports=require("stream")},function(t,e){t.exports=require("zlib")},function(t,e){t.exports=require("url")},function(t,e){t.exports=require("http")},function(t,e,n){var r=n(8),i=r.default||r,o=function(t,e){return/^\/\//.test(t)&&(t="https:"+t),i.call(this,t,e)};t.exports=e=o,e.fetch=o,e.Headers=r.Headers,e.Request=r.Request,e.Response=r.Response,e.default=o},function(t,e){t.exports=require("https")},function(t,e){var n="Expected a function",r="__lodash_hash_undefined__",i=1/0,o="[object Function]",a="[object GeneratorFunction]",s="[object Symbol]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,d=/^\./,l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,h="object"==typeof global&&global&&global.Object===Object&&global,m="object"==typeof self&&self&&self.Object===Object&&self,y=h||m||Function("return this")();var v,g=Array.prototype,b=Function.prototype,I=Object.prototype,w=y["__core-js_shared__"],E=(v=/[^.]+$/.exec(w&&w.keys&&w.keys.IE_PROTO||""))?"Symbol(src)_1."+v:"",C=b.toString,$=I.hasOwnProperty,T=I.toString,j=RegExp("^"+C.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=y.Symbol,S=g.splice,P=B(y,"Map"),_=B(Object,"create"),k=O?O.prototype:void 0,A=k?k.toString:void 0;function N(t){var e=-1,n=t?t.length:0;for(this.clear();++e-1},D.prototype.set=function(t,e){var n=this.__data__,r=x(n,t);return r<0?n.push([t,e]):n[r][1]=e,this},M.prototype.clear=function(){this.__data__={hash:new N,map:new(P||D),string:new N}},M.prototype.delete=function(t){return U(this,t).delete(t)},M.prototype.get=function(t){return U(this,t).get(t)},M.prototype.has=function(t){return U(this,t).has(t)},M.prototype.set=function(t,e){return U(this,t).set(t,e),this};var z=q((function(t){var e;t=null==(e=t)?"":function(t){if("string"==typeof t)return t;if(H(t))return A?A.call(t):"";var e=t+"";return"0"==e&&1/t==-i?"-0":e}(e);var n=[];return d.test(t)&&n.push(""),t.replace(l,(function(t,e,r,i){n.push(r?i.replace(p,"$1"):e||t)})),n}));function F(t){if("string"==typeof t||H(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}function q(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(n);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a),a};return r.cache=new(q.Cache||M),r}q.Cache=M;var V=Array.isArray;function G(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function H(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&T.call(t)==s}t.exports=function(t,e,n){var r=null==t?void 0:R(t,e);return void 0===r?n:r}},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),(r=e.codes||(e.codes={})).OBJECT_DUPLICATE="OBJECT_DUPLICATE",r.OBJECT_NOT_FOUND="OBJECT_NOT_FOUND",r.TOKEN_EXPIRED="TOKEN_EXPIRED",r.TOKEN_MALFORMED="TOKEN_MALFORMED",r.ACCESS_DENIED="ACCESS_DENIED",r.INVALID_CREDENTIALS="INVALID_CREDENTIALS",r.QUERY_DEPTH_EXCEEDED="QUERY_DEPTH_EXCEEDED",r.QUERY_COMPLEXITY_EXCEEDED="QUERY_COMPLEXITY_EXCEEDED",r.QUERY_BREADTH_EXCEEDED="QUERY_BREADTH_EXCEEDED",r.INPUT_LIST_EMPTY="INPUT_LIST_EMPTY",r.INPUT_LIST_MIN="INPUT_LIST_MIN",r.INPUT_LIST_MAX="INPUT_LIST_MAX",r.INPUT_INVALID="INPUT_INVALID",r.UNKNOWN_ERROR="UKNOWN_ERROR";e.isValidCode=function(t){return Object.keys(e.codes).includes(t)}},function(t,e,n){"use strict";n.r(e),n.d(e,"Headers",(function(){return P})),n.d(e,"Request",(function(){return q})),n.d(e,"Response",(function(){return R})),n.d(e,"FetchError",(function(){return p}));var r=n(0),i=n(3),o=n(2),a=n(5),s=n(1);const u=r.Readable,c=Symbol("buffer"),d=Symbol("type");class l{constructor(){this[d]="";const t=arguments[0],e=arguments[1],n=[];let r=0;if(t){const e=t,i=Number(e.length);for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:{},i=n.size;let o=void 0===i?0:i;var a=n.timeout;let s=void 0===a?0:a;null==t?t=null:g(t)?t=Buffer.from(t.toString()):b(t)||Buffer.isBuffer(t)||("[object ArrayBuffer]"===Object.prototype.toString.call(t)?t=Buffer.from(t):ArrayBuffer.isView(t)?t=Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof r||(t=Buffer.from(String(t)))),this[h]={body:t,disturbed:!1,error:null},this.size=o,this.timeout=s,t instanceof r&&t.on("error",(function(t){const n="AbortError"===t.name?t:new p(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t);e[h].error=n}))}function v(){var t=this;if(this[h].disturbed)return y.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[h].disturbed=!0,this[h].error)return y.Promise.reject(this[h].error);let e=this.body;if(null===e)return y.Promise.resolve(Buffer.alloc(0));if(b(e)&&(e=e.stream()),Buffer.isBuffer(e))return y.Promise.resolve(e);if(!(e instanceof r))return y.Promise.resolve(Buffer.alloc(0));let n=[],i=0,o=!1;return new y.Promise((function(r,a){let s;t.timeout&&(s=setTimeout((function(){o=!0,a(new p(`Response timeout while trying to fetch ${t.url} (over ${t.timeout}ms)`,"body-timeout"))}),t.timeout)),e.on("error",(function(e){"AbortError"===e.name?(o=!0,a(e)):a(new p(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e))})),e.on("data",(function(e){if(!o&&null!==e){if(t.size&&i+e.length>t.size)return o=!0,void a(new p(`content size at ${t.url} over limit: ${t.size}`,"max-size"));i+=e.length,n.push(e)}})),e.on("end",(function(){if(!o){clearTimeout(s);try{r(Buffer.concat(n,i))}catch(e){a(new p(`Could not create Buffer from response body for ${t.url}: ${e.message}`,"system",e))}}}))}))}function g(t){return"object"==typeof t&&"function"==typeof t.append&&"function"==typeof t.delete&&"function"==typeof t.get&&"function"==typeof t.getAll&&"function"==typeof t.has&&"function"==typeof t.set&&("URLSearchParams"===t.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(t)||"function"==typeof t.sort)}function b(t){return"object"==typeof t&&"function"==typeof t.arrayBuffer&&"string"==typeof t.type&&"function"==typeof t.stream&&"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}function I(t){let e,n,i=t.body;if(t.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof r&&"function"!=typeof i.getBoundary&&(e=new m,n=new m,i.pipe(e),i.pipe(n),t[h].body=e,i=n),i}function w(t){return null===t?null:"string"==typeof t?"text/plain;charset=UTF-8":g(t)?"application/x-www-form-urlencoded;charset=UTF-8":b(t)?t.type||null:Buffer.isBuffer(t)?null:"[object ArrayBuffer]"===Object.prototype.toString.call(t)?null:ArrayBuffer.isView(t)?null:"function"==typeof t.getBoundary?`multipart/form-data;boundary=${t.getBoundary()}`:t instanceof r?null:"text/plain;charset=UTF-8"}function E(t){const e=t.body;return null===e?0:b(e)?e.size:Buffer.isBuffer(e)?e.length:e&&"function"==typeof e.getLengthSync&&(e._lengthRetrievers&&0==e._lengthRetrievers.length||e.hasKnownLength&&e.hasKnownLength())?e.getLengthSync():null}y.prototype={get body(){return this[h].body},get bodyUsed(){return this[h].disturbed},arrayBuffer(){return v.call(this).then((function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}))},blob(){let t=this.headers&&this.headers.get("content-type")||"";return v.call(this).then((function(e){return Object.assign(new l([],{type:t.toLowerCase()}),{[c]:e})}))},json(){var t=this;return v.call(this).then((function(e){try{return JSON.parse(e.toString())}catch(e){return y.Promise.reject(new p(`invalid json response body at ${t.url} reason: ${e.message}`,"invalid-json"))}}))},text(){return v.call(this).then((function(t){return t.toString()}))},buffer(){return v.call(this)},textConverted(){var t=this;return v.call(this).then((function(e){return function(t,e){if("function"!=typeof f)throw new Error("The package `encoding` must be installed to use the textConverted() function");const n=e.get("content-type");let r,i,o="utf-8";n&&(r=/charset=([^;]*)/i.exec(n));i=t.slice(0,1024).toString(),!r&&i&&(r=/0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[S]=Object.create(null),t instanceof P){const e=t.raw(),n=Object.keys(e);for(const t of n)for(const n of e[t])this.append(t,n)}else if(null==t);else{if("object"!=typeof t)throw new TypeError("Provided initializer must be an object");{const e=t[Symbol.iterator];if(null!=e){if("function"!=typeof e)throw new TypeError("Header pairs must be iterable");const n=[];for(const e of t){if("object"!=typeof e||"function"!=typeof e[Symbol.iterator])throw new TypeError("Each header pair must be iterable");n.push(Array.from(e))}for(const t of n){if(2!==t.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(t[0],t[1])}}else for(const e of Object.keys(t)){const n=t[e];this.append(e,n)}}}}get(t){T(t=`${t}`);const e=O(this[S],t);return void 0===e?null:this[S][e].join(", ")}forEach(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=_(this),r=0;for(;r1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(t[S]).sort().map("key"===e?function(t){return t.toLowerCase()}:"value"===e?function(e){return t[S][e].join(", ")}:function(e){return[e.toLowerCase(),t[S][e].join(", ")]})}P.prototype.entries=P.prototype[Symbol.iterator],Object.defineProperty(P.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(P.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const k=Symbol("internal");function A(t,e){const n=Object.create(N);return n[k]={target:t,kind:e,index:0},n}const N=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==N)throw new TypeError("Value of `this` is not a HeadersIterator");var t=this[k];const e=t.target,n=t.kind,r=t.index,i=_(e,n);return r>=i.length?{value:void 0,done:!0}:(this[k].index=r+1,{value:i[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function D(t){const e=Object.assign({__proto__:null},t[S]),n=O(t[S],"Host");return void 0!==n&&(e[n]=e[n][0]),e}Object.defineProperty(N,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const M=Symbol("Response internals"),x=i.STATUS_CODES;class R{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y.call(this,t,e);const n=e.status||200,r=new P(e.headers);if(null!=t&&!r.has("Content-Type")){const e=w(t);e&&r.append("Content-Type",e)}this[M]={url:e.url,status:n,statusText:e.statusText||x[n],headers:r,counter:e.counter}}get url(){return this[M].url||""}get status(){return this[M].status}get ok(){return this[M].status>=200&&this[M].status<300}get redirected(){return this[M].counter>0}get statusText(){return this[M].statusText}get headers(){return this[M].headers}clone(){return new R(I(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}y.mixIn(R.prototype),Object.defineProperties(R.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(R.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const L=Symbol("Request internals"),U=o.parse,B=o.format,z="destroy"in r.Readable.prototype;function F(t){return"object"==typeof t&&"object"==typeof t[L]}class q{constructor(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};F(t)?e=U(t.url):(e=t&&t.href?U(t.href):U(`${t}`),t={});let r=n.method||t.method||"GET";if(r=r.toUpperCase(),(null!=n.body||F(t)&&null!==t.body)&&("GET"===r||"HEAD"===r))throw new TypeError("Request with GET/HEAD method cannot have body");let i=null!=n.body?n.body:F(t)&&null!==t.body?I(t):null;y.call(this,i,{timeout:n.timeout||t.timeout||0,size:n.size||t.size||0});const o=new P(n.headers||t.headers||{});if(null!=i&&!o.has("Content-Type")){const t=w(i);t&&o.append("Content-Type",t)}let a=F(t)?t.signal:null;if("signal"in n&&(a=n.signal),null!=a&&!function(t){const e=t&&"object"==typeof t&&Object.getPrototypeOf(t);return!(!e||"AbortSignal"!==e.constructor.name)}(a))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[L]={method:r,redirect:n.redirect||t.redirect||"follow",headers:o,parsedURL:e,signal:a},this.follow=void 0!==n.follow?n.follow:void 0!==t.follow?t.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===t.compress||t.compress,this.counter=n.counter||t.counter||0,this.agent=n.agent||t.agent}get method(){return this[L].method}get url(){return B(this[L].parsedURL)}get headers(){return this[L].headers}get redirect(){return this[L].redirect}get signal(){return this[L].signal}clone(){return new q(this)}}function V(t){Error.call(this,t),this.type="aborted",this.message=t,Error.captureStackTrace(this,this.constructor)}y.mixIn(q.prototype),Object.defineProperty(q.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(q.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),V.prototype=Object.create(Error.prototype),V.prototype.constructor=V,V.prototype.name="AbortError";const G=r.PassThrough,H=o.resolve;function Y(t,e){if(!Y.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return y.Promise=Y.Promise,new Y.Promise((function(n,o){const u=new q(t,e),c=function(t){const e=t[L].parsedURL,n=new P(t[L].headers);if(n.has("Accept")||n.set("Accept","*/*"),!e.protocol||!e.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(e.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(t.signal&&t.body instanceof r.Readable&&!z)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let i=null;if(null==t.body&&/^(POST|PUT)$/i.test(t.method)&&(i="0"),null!=t.body){const e=E(t);"number"==typeof e&&(i=String(e))}i&&n.set("Content-Length",i),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),t.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let o=t.agent;return"function"==typeof o&&(o=o(e)),n.has("Connection")||o||n.set("Connection","close"),Object.assign({},e,{method:t.method,headers:D(n),agent:o})}(u),d=("https:"===c.protocol?a:i).request,l=u.signal;let f=null;const h=function(){let t=new V("The user aborted a request.");o(t),u.body&&u.body instanceof r.Readable&&u.body.destroy(t),f&&f.body&&f.body.emit("error",t)};if(l&&l.aborted)return void h();const m=function(){h(),g()},y=d(c);let v;function g(){y.abort(),l&&l.removeEventListener("abort",m),clearTimeout(v)}l&&l.addEventListener("abort",m),u.timeout&&y.once("socket",(function(t){v=setTimeout((function(){o(new p(`network timeout at: ${u.url}`,"request-timeout")),g()}),u.timeout)})),y.on("error",(function(t){o(new p(`request to ${u.url} failed, reason: ${t.message}`,"system",t)),g()})),y.on("response",(function(t){clearTimeout(v);const e=function(t){const e=new P;for(const n of Object.keys(t))if(!C.test(n))if(Array.isArray(t[n]))for(const r of t[n])$.test(r)||(void 0===e[S][n]?e[S][n]=[r]:e[S][n].push(r));else $.test(t[n])||(e[S][n]=[t[n]]);return e}(t.headers);if(Y.isRedirect(t.statusCode)){const r=e.get("Location"),i=null===r?null:H(u.url,r);switch(u.redirect){case"error":return o(new p(`redirect mode is set to error: ${u.url}`,"no-redirect")),void g();case"manual":if(null!==i)try{e.set("Location",i)}catch(t){o(t)}break;case"follow":if(null===i)break;if(u.counter>=u.follow)return o(new p(`maximum redirect reached at: ${u.url}`,"max-redirect")),void g();const r={headers:new P(u.headers),follow:u.follow,counter:u.counter+1,agent:u.agent,compress:u.compress,method:u.method,body:u.body,signal:u.signal,timeout:u.timeout};return 303!==t.statusCode&&u.body&&null===E(u)?(o(new p("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void g()):(303!==t.statusCode&&(301!==t.statusCode&&302!==t.statusCode||"POST"!==u.method)||(r.method="GET",r.body=void 0,r.headers.delete("content-length")),n(Y(new q(i,r))),void g())}}t.once("end",(function(){l&&l.removeEventListener("abort",m)}));let r=t.pipe(new G);const i={url:u.url,status:t.statusCode,statusText:t.statusMessage,headers:e,size:u.size,timeout:u.timeout,counter:u.counter},a=e.get("Content-Encoding");if(!u.compress||"HEAD"===u.method||null===a||204===t.statusCode||304===t.statusCode)return f=new R(r,i),void n(f);const c={flush:s.Z_SYNC_FLUSH,finishFlush:s.Z_SYNC_FLUSH};if("gzip"==a||"x-gzip"==a)return r=r.pipe(s.createGunzip(c)),f=new R(r,i),void n(f);if("deflate"!=a&&"x-deflate"!=a){if("br"==a&&"function"==typeof s.createBrotliDecompress)return r=r.pipe(s.createBrotliDecompress()),f=new R(r,i),void n(f);f=new R(r,i),n(f)}else{t.pipe(new G).once("data",(function(t){r=8==(15&t[0])?r.pipe(s.createInflate()):r.pipe(s.createInflateRaw()),f=new R(r,i),n(f)}))}})),function(t,e){const n=e.body;null===n?t.end():b(n)?n.stream().pipe(t):Buffer.isBuffer(n)?(t.write(n),t.end()):n.pipe(t)}(y,u)}))}Y.isRedirect=function(t){return 301===t||302===t||303===t||307===t||308===t},Y.Promise=global.Promise,e.default=Y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";n.r(e);var r,i,o,a,s,u,c,d,l,p,f,h,m,y,v=n(4),g=n.n(v),b=n(6),I=n.n(b),w=n(7),E=(n(9),function(){return(E=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1},A.prototype.set=function(e,t){var n=this.__data__,r=D(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},q.prototype.clear=function(){this.__data__={hash:new F,map:new(S||A),string:new F}},q.prototype.delete=function(e){return R(this,e).delete(e)},q.prototype.get=function(e){return R(this,e).get(e)},q.prototype.has=function(e){return R(this,e).has(e)},q.prototype.set=function(e,t){return R(this,e).set(e,t),this};var U=B((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(H(e))return M?M.call(e):"";var t=e+"";return"0"==t&&1/e==-i?"-0":t}(t);var n=[];return l.test(e)&&n.push(""),e.replace(c,(function(e,t,r,i){n.push(r?i.replace(f,"$1"):t||e)})),n}));function z(e){if("string"==typeof e||H(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}function B(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(n);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a),a};return r.cache=new(B.Cache||q),r}B.Cache=q;var V=Array.isArray;function G(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&w.call(e)==s}e.exports=function(e,t,n){var r=null==e?void 0:N(e,t);return void 0===r?n:r}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),(r=t.codes||(t.codes={})).OBJECT_DUPLICATE="OBJECT_DUPLICATE",r.OBJECT_NOT_FOUND="OBJECT_NOT_FOUND",r.TOKEN_EXPIRED="TOKEN_EXPIRED",r.TOKEN_MALFORMED="TOKEN_MALFORMED",r.ACCESS_DENIED="ACCESS_DENIED",r.INVALID_CREDENTIALS="INVALID_CREDENTIALS",r.QUERY_DEPTH_EXCEEDED="QUERY_DEPTH_EXCEEDED",r.QUERY_COMPLEXITY_EXCEEDED="QUERY_COMPLEXITY_EXCEEDED",r.QUERY_BREADTH_EXCEEDED="QUERY_BREADTH_EXCEEDED",r.INPUT_LIST_EMPTY="INPUT_LIST_EMPTY",r.INPUT_LIST_MIN="INPUT_LIST_MIN",r.INPUT_LIST_MAX="INPUT_LIST_MAX",r.INPUT_INVALID="INPUT_INVALID",r.UNKNOWN_ERROR="UKNOWN_ERROR";t.isValidCode=function(e){return Object.keys(t.codes).includes(e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"Headers",(function(){return S})),n.d(t,"Request",(function(){return B})),n.d(t,"Response",(function(){return N})),n.d(t,"FetchError",(function(){return f}));var r=n(0),i=n(3),o=n(2),a=n(5),s=n(1);const u=r.Readable,d=Symbol("buffer"),l=Symbol("type");class c{constructor(){this[l]="";const e=arguments[0],t=arguments[1],n=[];let r=0;if(e){const t=e,i=Number(t.length);for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:{},i=n.size;let o=void 0===i?0:i;var a=n.timeout;let s=void 0===a?0:a;null==e?e=null:g(e)?e=Buffer.from(e.toString()):b(e)||Buffer.isBuffer(e)||("[object ArrayBuffer]"===Object.prototype.toString.call(e)?e=Buffer.from(e):ArrayBuffer.isView(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof r||(e=Buffer.from(String(e)))),this[h]={body:e,disturbed:!1,error:null},this.size=o,this.timeout=s,e instanceof r&&e.on("error",(function(e){const n="AbortError"===e.name?e:new f(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[h].error=n}))}function m(){var e=this;if(this[h].disturbed)return y.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[h].disturbed=!0,this[h].error)return y.Promise.reject(this[h].error);let t=this.body;if(null===t)return y.Promise.resolve(Buffer.alloc(0));if(b(t)&&(t=t.stream()),Buffer.isBuffer(t))return y.Promise.resolve(t);if(!(t instanceof r))return y.Promise.resolve(Buffer.alloc(0));let n=[],i=0,o=!1;return new y.Promise((function(r,a){let s;e.timeout&&(s=setTimeout((function(){o=!0,a(new f(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))}),e.timeout)),t.on("error",(function(t){"AbortError"===t.name?(o=!0,a(t)):a(new f(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))})),t.on("data",(function(t){if(!o&&null!==t){if(e.size&&i+t.length>e.size)return o=!0,void a(new f(`content size at ${e.url} over limit: ${e.size}`,"max-size"));i+=t.length,n.push(t)}})),t.on("end",(function(){if(!o){clearTimeout(s);try{r(Buffer.concat(n,i))}catch(t){a(new f(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}}))}))}function g(e){return"object"==typeof e&&"function"==typeof e.append&&"function"==typeof e.delete&&"function"==typeof e.get&&"function"==typeof e.getAll&&"function"==typeof e.has&&"function"==typeof e.set&&("URLSearchParams"===e.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(e)||"function"==typeof e.sort)}function b(e){return"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&"function"==typeof e.constructor&&"string"==typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function k(e){let t,n,i=e.body;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof r&&"function"!=typeof i.getBoundary&&(t=new v,n=new v,i.pipe(t),i.pipe(n),e[h].body=t,i=n),i}function C(e){return null===e?null:"string"==typeof e?"text/plain;charset=UTF-8":g(e)?"application/x-www-form-urlencoded;charset=UTF-8":b(e)?e.type||null:Buffer.isBuffer(e)?null:"[object ArrayBuffer]"===Object.prototype.toString.call(e)?null:ArrayBuffer.isView(e)?null:"function"==typeof e.getBoundary?`multipart/form-data;boundary=${e.getBoundary()}`:e instanceof r?null:"text/plain;charset=UTF-8"}function $(e){const t=e.body;return null===t?0:b(t)?t.size:Buffer.isBuffer(t)?t.length:t&&"function"==typeof t.getLengthSync&&(t._lengthRetrievers&&0==t._lengthRetrievers.length||t.hasKnownLength&&t.hasKnownLength())?t.getLengthSync():null}y.prototype={get body(){return this[h].body},get bodyUsed(){return this[h].disturbed},arrayBuffer(){return m.call(this).then((function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}))},blob(){let e=this.headers&&this.headers.get("content-type")||"";return m.call(this).then((function(t){return Object.assign(new c([],{type:e.toLowerCase()}),{[d]:t})}))},json(){var e=this;return m.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(t){return y.Promise.reject(new f(`invalid json response body at ${e.url} reason: ${t.message}`,"invalid-json"))}}))},text(){return m.call(this).then((function(e){return e.toString()}))},buffer(){return m.call(this)},textConverted(){var e=this;return m.call(this).then((function(t){return function(e,t){if("function"!=typeof p)throw new Error("The package `encoding` must be installed to use the textConverted() function");const n=t.get("content-type");let r,i,o="utf-8";n&&(r=/charset=([^;]*)/i.exec(n));i=e.slice(0,1024).toString(),!r&&i&&(r=/0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[j]=Object.create(null),e instanceof S){const t=e.raw(),n=Object.keys(t);for(const e of n)for(const n of t[e])this.append(e,n)}else if(null==e);else{if("object"!=typeof e)throw new TypeError("Provided initializer must be an object");{const t=e[Symbol.iterator];if(null!=t){if("function"!=typeof t)throw new TypeError("Header pairs must be iterable");const n=[];for(const t of e){if("object"!=typeof t||"function"!=typeof t[Symbol.iterator])throw new TypeError("Each header pair must be iterable");n.push(Array.from(t))}for(const e of n){if(2!==e.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(e[0],e[1])}}else for(const t of Object.keys(e)){const n=e[t];this.append(t,n)}}}}get(e){w(e=`${e}`);const t=O(this[j],e);return void 0===t?null:this[j][t].join(", ")}forEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=P(this),r=0;for(;r1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(e[j]).sort().map("key"===t?function(e){return e.toLowerCase()}:"value"===t?function(t){return e[j][t].join(", ")}:function(t){return[t.toLowerCase(),e[j][t].join(", ")]})}S.prototype.entries=S.prototype[Symbol.iterator],Object.defineProperty(S.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(S.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const _=Symbol("internal");function M(e,t){const n=Object.create(F);return n[_]={target:e,kind:t,index:0},n}const F=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==F)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[_];const t=e.target,n=e.kind,r=e.index,i=P(t,n);return r>=i.length?{value:void 0,done:!0}:(this[_].index=r+1,{value:i[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function A(e){const t=Object.assign({__proto__:null},e[j]),n=O(e[j],"Host");return void 0!==n&&(t[n]=t[n][0]),t}Object.defineProperty(F,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const q=Symbol("Response internals"),D=i.STATUS_CODES;class N{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y.call(this,e,t);const n=t.status||200,r=new S(t.headers);if(null!=e&&!r.has("Content-Type")){const t=C(e);t&&r.append("Content-Type",t)}this[q]={url:t.url,status:n,statusText:t.statusText||D[n],headers:r,counter:t.counter}}get url(){return this[q].url||""}get status(){return this[q].status}get ok(){return this[q].status>=200&&this[q].status<300}get redirected(){return this[q].counter>0}get statusText(){return this[q].statusText}get headers(){return this[q].headers}clone(){return new N(k(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}y.mixIn(N.prototype),Object.defineProperties(N.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(N.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const x=Symbol("Request internals"),R=o.parse,L=o.format,U="destroy"in r.Readable.prototype;function z(e){return"object"==typeof e&&"object"==typeof e[x]}class B{constructor(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};z(e)?t=R(e.url):(t=e&&e.href?R(e.href):R(`${e}`),e={});let r=n.method||e.method||"GET";if(r=r.toUpperCase(),(null!=n.body||z(e)&&null!==e.body)&&("GET"===r||"HEAD"===r))throw new TypeError("Request with GET/HEAD method cannot have body");let i=null!=n.body?n.body:z(e)&&null!==e.body?k(e):null;y.call(this,i,{timeout:n.timeout||e.timeout||0,size:n.size||e.size||0});const o=new S(n.headers||e.headers||{});if(null!=i&&!o.has("Content-Type")){const e=C(i);e&&o.append("Content-Type",e)}let a=z(e)?e.signal:null;if("signal"in n&&(a=n.signal),null!=a&&!function(e){const t=e&&"object"==typeof e&&Object.getPrototypeOf(e);return!(!t||"AbortSignal"!==t.constructor.name)}(a))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[x]={method:r,redirect:n.redirect||e.redirect||"follow",headers:o,parsedURL:t,signal:a},this.follow=void 0!==n.follow?n.follow:void 0!==e.follow?e.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===e.compress||e.compress,this.counter=n.counter||e.counter||0,this.agent=n.agent||e.agent}get method(){return this[x].method}get url(){return L(this[x].parsedURL)}get headers(){return this[x].headers}get redirect(){return this[x].redirect}get signal(){return this[x].signal}clone(){return new B(this)}}function V(e){Error.call(this,e),this.type="aborted",this.message=e,Error.captureStackTrace(this,this.constructor)}y.mixIn(B.prototype),Object.defineProperty(B.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(B.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),V.prototype=Object.create(Error.prototype),V.prototype.constructor=V,V.prototype.name="AbortError";const G=r.PassThrough,H=o.resolve;function Y(e,t){if(!Y.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return y.Promise=Y.Promise,new Y.Promise((function(n,o){const u=new B(e,t),d=function(e){const t=e[x].parsedURL,n=new S(e[x].headers);if(n.has("Accept")||n.set("Accept","*/*"),!t.protocol||!t.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&e.body instanceof r.Readable&&!U)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let i=null;if(null==e.body&&/^(POST|PUT)$/i.test(e.method)&&(i="0"),null!=e.body){const t=$(e);"number"==typeof t&&(i=String(t))}i&&n.set("Content-Length",i),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),e.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let o=e.agent;return"function"==typeof o&&(o=o(t)),n.has("Connection")||o||n.set("Connection","close"),Object.assign({},t,{method:e.method,headers:A(n),agent:o})}(u),l=("https:"===d.protocol?a:i).request,c=u.signal;let p=null;const h=function(){let e=new V("The user aborted a request.");o(e),u.body&&u.body instanceof r.Readable&&u.body.destroy(e),p&&p.body&&p.body.emit("error",e)};if(c&&c.aborted)return void h();const v=function(){h(),g()},y=l(d);let m;function g(){y.abort(),c&&c.removeEventListener("abort",v),clearTimeout(m)}c&&c.addEventListener("abort",v),u.timeout&&y.once("socket",(function(e){m=setTimeout((function(){o(new f(`network timeout at: ${u.url}`,"request-timeout")),g()}),u.timeout)})),y.on("error",(function(e){o(new f(`request to ${u.url} failed, reason: ${e.message}`,"system",e)),g()})),y.on("response",(function(e){clearTimeout(m);const t=function(e){const t=new S;for(const n of Object.keys(e))if(!E.test(n))if(Array.isArray(e[n]))for(const r of e[n])I.test(r)||(void 0===t[j][n]?t[j][n]=[r]:t[j][n].push(r));else I.test(e[n])||(t[j][n]=[e[n]]);return t}(e.headers);if(Y.isRedirect(e.statusCode)){const r=t.get("Location"),i=null===r?null:H(u.url,r);switch(u.redirect){case"error":return o(new f(`redirect mode is set to error: ${u.url}`,"no-redirect")),void g();case"manual":if(null!==i)try{t.set("Location",i)}catch(e){o(e)}break;case"follow":if(null===i)break;if(u.counter>=u.follow)return o(new f(`maximum redirect reached at: ${u.url}`,"max-redirect")),void g();const r={headers:new S(u.headers),follow:u.follow,counter:u.counter+1,agent:u.agent,compress:u.compress,method:u.method,body:u.body,signal:u.signal,timeout:u.timeout};return 303!==e.statusCode&&u.body&&null===$(u)?(o(new f("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void g()):(303!==e.statusCode&&(301!==e.statusCode&&302!==e.statusCode||"POST"!==u.method)||(r.method="GET",r.body=void 0,r.headers.delete("content-length")),n(Y(new B(i,r))),void g())}}e.once("end",(function(){c&&c.removeEventListener("abort",v)}));let r=e.pipe(new G);const i={url:u.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:u.size,timeout:u.timeout,counter:u.counter},a=t.get("Content-Encoding");if(!u.compress||"HEAD"===u.method||null===a||204===e.statusCode||304===e.statusCode)return p=new N(r,i),void n(p);const d={flush:s.Z_SYNC_FLUSH,finishFlush:s.Z_SYNC_FLUSH};if("gzip"==a||"x-gzip"==a)return r=r.pipe(s.createGunzip(d)),p=new N(r,i),void n(p);if("deflate"!=a&&"x-deflate"!=a){if("br"==a&&"function"==typeof s.createBrotliDecompress)return r=r.pipe(s.createBrotliDecompress()),p=new N(r,i),void n(p);p=new N(r,i),n(p)}else{e.pipe(new G).once("data",(function(e){r=8==(15&e[0])?r.pipe(s.createInflate()):r.pipe(s.createInflateRaw()),p=new N(r,i),n(p)}))}})),function(e,t){const n=t.body;null===n?e.end():b(n)?n.stream().pipe(e):Buffer.isBuffer(n)?(e.write(n),e.end()):n.pipe(e)}(y,u)}))}Y.isRedirect=function(e){return 301===e||302===e||303===e||307===e||308===e},Y.Promise=global.Promise,t.default=Y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";n.r(t);var r,i,o,a,s,u,d,l,c,f,p,h,v,y,m,g=n(4),b=n.n(g),k=n(6),C=n.n(k),$=n(7),E=(n(9),function(){return(E=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1};function o(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!=typeof t&&(t=String(t)),t}function s(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n.iterable&&(e[Symbol.iterator]=function(){return e}),e}function u(t){this.map={},t instanceof u?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function d(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function c(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function p(t){var e=new FileReader,n=c(e);return e.readAsArrayBuffer(t),n}function l(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function f(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:n.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:n.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():n.arrayBuffer&&n.blob&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=l(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||i(t))?this._bodyArrayBuffer=l(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var t=d(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var t,e,n,r=d(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=c(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function y(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function m(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new u(e.headers),this.url=e.url||"",this._initBody(t)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},f.call(v.prototype),f.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},m.error=function(){var t=new m(null,{status:0,statusText:""});return t.type="error",t};var g=[301,302,303,307,308];m.redirect=function(t,e){if(-1===g.indexOf(e))throw new RangeError("Invalid status code");return new m(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function b(t,r){return new Promise((function(i,o){var a=new v(t,r);if(a.signal&&a.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function d(){s.abort()}s.onload=function(){var t,e,n={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new u,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}})),e)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var r="response"in s?s.response:s.responseText;i(new m(r,n))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&n.blob&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",d),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",d)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}b.polyfill=!0,t.fetch||(t.fetch=b,t.Headers=u,t.Request=v,t.Response=m),e.Headers=u,e.Request=v,e.Response=m,e.fetch=b}({})}(n),delete n.fetch.polyfill,(e=n.fetch).default=n.fetch,e.fetch=n.fetch,e.Headers=n.Headers,e.Request=n.Request,e.Response=n.Response,t.exports=e},function(t,e,n){(function(e){var n="Expected a function",r="__lodash_hash_undefined__",i=1/0,o="[object Function]",a="[object GeneratorFunction]",s="[object Symbol]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d=/^\w*$/,c=/^\./,p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,h="object"==typeof e&&e&&e.Object===Object&&e,v="object"==typeof self&&self&&self.Object===Object&&self,y=h||v||Function("return this")();var m,g=Array.prototype,b=Function.prototype,I=Object.prototype,E=y["__core-js_shared__"],_=(m=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+m:"",C=b.toString,w=I.hasOwnProperty,O=I.toString,$=RegExp("^"+C.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),T=y.Symbol,j=g.splice,P=F(y,"Map"),S=F(Object,"create"),k=T?T.prototype:void 0,D=k?k.toString:void 0;function A(t){var e=-1,n=t?t.length:0;for(this.clear();++e-1},M.prototype.set=function(t,e){var n=this.__data__,r=x(n,t);return r<0?n.push([t,e]):n[r][1]=e,this},N.prototype.clear=function(){this.__data__={hash:new A,map:new(P||M),string:new A}},N.prototype.delete=function(t){return L(this,t).delete(t)},N.prototype.get=function(t){return L(this,t).get(t)},N.prototype.has=function(t){return L(this,t).has(t)},N.prototype.set=function(t,e){return L(this,t).set(t,e),this};var B=V((function(t){var e;t=null==(e=t)?"":function(t){if("string"==typeof t)return t;if(H(t))return D?D.call(t):"";var e=t+"";return"0"==e&&1/t==-i?"-0":e}(e);var n=[];return c.test(t)&&n.push(""),t.replace(p,(function(t,e,r,i){n.push(r?i.replace(l,"$1"):e||t)})),n}));function q(t){if("string"==typeof t||H(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}function V(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(n);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a),a};return r.cache=new(V.Cache||N),r}V.Cache=N;var z=Array.isArray;function G(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function H(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&O.call(t)==s}t.exports=function(t,e,n){var r=null==t?void 0:R(t,e);return void 0===r?n:r}}).call(this,n(3))},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),(r=e.codes||(e.codes={})).OBJECT_DUPLICATE="OBJECT_DUPLICATE",r.OBJECT_NOT_FOUND="OBJECT_NOT_FOUND",r.TOKEN_EXPIRED="TOKEN_EXPIRED",r.TOKEN_MALFORMED="TOKEN_MALFORMED",r.ACCESS_DENIED="ACCESS_DENIED",r.INVALID_CREDENTIALS="INVALID_CREDENTIALS",r.QUERY_DEPTH_EXCEEDED="QUERY_DEPTH_EXCEEDED",r.QUERY_COMPLEXITY_EXCEEDED="QUERY_COMPLEXITY_EXCEEDED",r.QUERY_BREADTH_EXCEEDED="QUERY_BREADTH_EXCEEDED",r.INPUT_LIST_EMPTY="INPUT_LIST_EMPTY",r.INPUT_LIST_MIN="INPUT_LIST_MIN",r.INPUT_LIST_MAX="INPUT_LIST_MAX",r.INPUT_INVALID="INPUT_INVALID",r.UNKNOWN_ERROR="UKNOWN_ERROR";e.isValidCode=function(t){return Object.keys(e.codes).includes(t)}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";n.r(e);var r,i,o,a,s,u,d,c,p,l,f,h,v,y,m=n(0),g=n.n(m),b=n(1),I=n.n(b),E=n(2),_=(n(4),function(){return(_=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1};function a(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function o(t){return"string"!=typeof t&&(t=String(t)),t}function s(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n.iterable&&(e[Symbol.iterator]=function(){return e}),e}function u(t){this.map={},t instanceof u?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function d(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function l(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function c(t){var e=new FileReader,n=l(e);return e.readAsArrayBuffer(t),n}function f(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:n.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:n.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():n.arrayBuffer&&n.blob&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=f(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||i(t))?this._bodyArrayBuffer=f(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var t=d(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(c)}),this.text=function(){var t,e,n,r=d(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=l(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function y(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function m(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new u(e.headers),this.url=e.url||"",this._initBody(t)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},p.call(v.prototype),p.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},m.error=function(){var t=new m(null,{status:0,statusText:""});return t.type="error",t};var g=[301,302,303,307,308];m.redirect=function(t,e){if(-1===g.indexOf(e))throw new RangeError("Invalid status code");return new m(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function b(t,r){return new Promise((function(i,a){var o=new v(t,r);if(o.signal&&o.signal.aborted)return a(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function d(){s.abort()}s.onload=function(){var t,e,n={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new u,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}})),e)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var r="response"in s?s.response:s.responseText;i(new m(r,n))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new e.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&n.blob&&(s.responseType="blob"),o.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),o.signal&&(o.signal.addEventListener("abort",d),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",d)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}b.polyfill=!0,t.fetch||(t.fetch=b,t.Headers=u,t.Request=v,t.Response=m),e.Headers=u,e.Request=v,e.Response=m,e.fetch=b}({})}(n),delete n.fetch.polyfill,(e=n.fetch).default=n.fetch,e.fetch=n.fetch,e.Headers=n.Headers,e.Request=n.Request,e.Response=n.Response,t.exports=e},function(t,e,n){(function(e){var n="Expected a function",r="__lodash_hash_undefined__",i=1/0,a="[object Function]",o="[object GeneratorFunction]",s="[object Symbol]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d=/^\w*$/,l=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f=/\\(\\)?/g,p=/^\[object .+?Constructor\]$/,h="object"==typeof e&&e&&e.Object===Object&&e,v="object"==typeof self&&self&&self.Object===Object&&self,y=h||v||Function("return this")();var m,g=Array.prototype,b=Function.prototype,k=Object.prototype,E=y["__core-js_shared__"],I=(m=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+m:"",C=b.toString,_=k.hasOwnProperty,$=k.toString,T=RegExp("^"+C.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),w=y.Symbol,O=g.splice,P=U(y,"Map"),j=U(Object,"create"),M=w?w.prototype:void 0,A=M?M.toString:void 0;function S(t){var e=-1,n=t?t.length:0;for(this.clear();++e-1},D.prototype.set=function(t,e){var n=this.__data__,r=N(n,t);return r<0?n.push([t,e]):n[r][1]=e,this},F.prototype.clear=function(){this.__data__={hash:new S,map:new(P||D),string:new S}},F.prototype.delete=function(t){return x(this,t).delete(t)},F.prototype.get=function(t){return x(this,t).get(t)},F.prototype.has=function(t){return x(this,t).has(t)},F.prototype.set=function(t,e){return x(this,t).set(t,e),this};var L=V((function(t){var e;t=null==(e=t)?"":function(t){if("string"==typeof t)return t;if(H(t))return A?A.call(t):"";var e=t+"";return"0"==e&&1/t==-i?"-0":e}(e);var n=[];return l.test(t)&&n.push(""),t.replace(c,(function(t,e,r,i){n.push(r?i.replace(f,"$1"):e||t)})),n}));function B(t){if("string"==typeof t||H(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}function V(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(n);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o),o};return r.cache=new(V.Cache||F),r}V.Cache=F;var z=Array.isArray;function G(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function H(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&$.call(t)==s}t.exports=function(t,e,n){var r=null==t?void 0:q(t,e);return void 0===r?n:r}}).call(this,n(3))},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),(r=e.codes||(e.codes={})).OBJECT_DUPLICATE="OBJECT_DUPLICATE",r.OBJECT_NOT_FOUND="OBJECT_NOT_FOUND",r.TOKEN_EXPIRED="TOKEN_EXPIRED",r.TOKEN_MALFORMED="TOKEN_MALFORMED",r.ACCESS_DENIED="ACCESS_DENIED",r.INVALID_CREDENTIALS="INVALID_CREDENTIALS",r.QUERY_DEPTH_EXCEEDED="QUERY_DEPTH_EXCEEDED",r.QUERY_COMPLEXITY_EXCEEDED="QUERY_COMPLEXITY_EXCEEDED",r.QUERY_BREADTH_EXCEEDED="QUERY_BREADTH_EXCEEDED",r.INPUT_LIST_EMPTY="INPUT_LIST_EMPTY",r.INPUT_LIST_MIN="INPUT_LIST_MIN",r.INPUT_LIST_MAX="INPUT_LIST_MAX",r.INPUT_INVALID="INPUT_INVALID",r.UNKNOWN_ERROR="UKNOWN_ERROR";e.isValidCode=function(t){return Object.keys(e.codes).includes(t)}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,n){"use strict";n.r(e);var r,i,a,o,s,u,d,l,c,f,p,h,v,y,m,g=n(0),b=n.n(g),k=n(1),E=n.n(k),I=n(2),C=(n(4),function(){return(C=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]; }; +/** + * Campaign templates contain targeting and creative information tailored + * to your objectives specific to your goals and business needs + **/ export declare type CampaignTemplateMarketingCampaignsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** Campaign templates collection */ export declare type CampaignTemplateConnection = { + /** Collection of campaign templates */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Campaign template in a collection */ export declare type CampaignTemplateEdge = { + /** Id of the contained campaign template */ cursor: Scalars['ObjectId']; + /** Container for a campaign template */ node?: Maybe; }; +/** Catalogs contain products linked to a specific platform and media channel */ export declare type Catalog = { + /** Id of the product catalog */ id: Scalars['ObjectId']; + /** Name of the product catalog */ name: Scalars['NonEmptyString']; + /** Category of the products referenced by the product catalog */ catalogType: CatalogType; + /** Date and time the product catalog was created */ creationDate: Scalars['DateISO']; + /** Date and time the product catalog was last modified */ lastChangeDate: Scalars['DateISO']; + /** Id of the product catalog on the related platform */ remoteId?: Maybe; + /** System status of the product catalog */ systemStatus: SystemStatus; + /** Data related to the product catalog stored on the remote platform */ remoteState: Scalars['JSONObject']; + /** Facebook data feed id referenced by the product catalog */ dataFeedId?: Maybe; + /** Validation errors of the product catalog */ errors?: Maybe>; + /** Media channel related to the product catalog */ mediaChannel: MediaChannel; + /** Products referenced by the catalog */ products?: Maybe; }; +/** Catalogs contain products linked to a specific platform and media channel */ export declare type CatalogProductsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** Product catalogs collection */ export declare type CatalogConnection = { + /** Collection of product catalogs */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Product catalog creation input data */ export declare type CatalogCreateInput = { + /** Name of the product catalog */ name: Scalars['NonEmptyString']; + /** Media channel id referenced by the product catalog */ mediaChannelId: Scalars['ObjectId']; + /** Category of the products referenced by the catalog */ catalogType: CatalogType; }; +/** Product catalog in a collection */ export declare type CatalogEdge = { + /** Id of the contained product catalog */ cursor: Scalars['ObjectId']; + /** Container for a product catalog */ node?: Maybe; }; +/** Product catalog import input data */ export declare type CatalogImportInput = { + /** Media channel id referenced by the product catalog */ mediaChannelId: Scalars['ObjectId']; + /** Id of the product catalog on the related platform */ remoteId: Scalars['String']; }; +/** Product catalog type */ export declare enum CatalogType { + /** Catalog of bookable services */ Bookable = "bookable", + /** Catalog of standard products or services */ Commerce = "commerce", + /** Catalog of travel destinations */ Destinations = "destinations", + /** Catalog of plane tickets */ Flights = "flights", + /** Catalog of home rentals */ HomeListings = "home_listings", + /** Catalog of hotel rooms */ Hotels = "hotels", + /** Catalog of store-based products or services */ OfflineCommerce = "offline_commerce", + /** Catalog of event tickets */ TicketedExperiences = "ticketed_experiences", + /** Catalog of transactable goods */ TransactableItems = "transactable_items", + /** Catalog of vehicle rentals or sales */ Vehicles = "vehicles" } +/** Product catalog update input data */ export declare type CatalogUpdateInput = { + /** Name of the product catalog */ name?: Maybe; }; +/** Object deletion operation result */ export declare type Deletion = { + /** Id of the deleted object */ id: Scalars['String']; }; +/** A set of user permissions related to a resource */ export declare type Entitlement = { + /** Id of the entitlement */ id: Scalars['ObjectId']; + /** Date and time the entitlement was created */ creationDate: Scalars['DateISO']; + /** Date and time the entitlement was last modified */ lastChangeDate: Scalars['DateISO']; + /** User the permissions are granted to */ user: User; + /** Type of resource related to the entitlement */ type: EntitlementResourceTypeEnum; + /** Resource related to the entitlement */ resource: EntitlementResource; + /** Set of permissions granted to the related user */ permissions: Array; }; +/** Entitlement collection */ export declare type EntitlementConnection = { + /** Collection of entitlements */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Entitlement in a collection */ export declare type EntitlementEdge = { + /** Id of the contained entitlement */ cursor: Scalars['ObjectId']; + /** Container for an entitlement */ node?: Maybe; }; +/** Entitlement creation input data */ export declare type EntitlementInput = { + /** Id of the user the permissions are granted to */ userId: Scalars['ObjectId']; + /** Id of the resource related to the entitlement */ resourceId: Scalars['ObjectId']; + /** Set of permissions granted to the related user */ permissions: Array; }; +/** Resource targeted by an entitlement */ export declare type EntitlementResource = { + /** Id of the resource */ id: Scalars['ObjectId']; + /** Name of the resource */ name: Scalars['NonEmptyString']; + /** System status of the resource */ systemStatus: SystemStatus; + /** Date and time the resource was created */ creationDate: Scalars['DateISO']; + /** Date and time the resource was last modified */ lastChangeDate: Scalars['DateISO']; + /** Validation errors of the resource */ errors?: Maybe>; }; +/** Resource types that can be granted permissions to */ export declare enum EntitlementResourceTypeEnum { + /** Marketplace resource type */ Marketplace = "Marketplace", + /** Organization resource type */ Organization = "Organization", + /** Media channel resource type */ MediaChannel = "MediaChannel" } +/** Entitlement update input data */ export declare type EntitlementUpdateInput = { + /** Set of permissions granted to the related user */ permissions: Array; }; +/** + * Marketing ad represents an specific ad on a platform belonging + * to a marketing campaign and associated with a single vendor + **/ export declare type MarketingAd = ResultResource & { + /** Id of the marketing ad */ id: Scalars['ObjectId']; + /** Date and time the marketing ad was created */ creationDate: Scalars['DateISO']; + /** Date and time the marketing ad was last modified */ lastChangeDate: Scalars['DateISO']; + /** Id of the marketing ad on the related marketing campaign platform */ remoteId: Scalars['String']; + /** Preview data of the marketing ad */ preview: Scalars['String']; + /** Results related to the marketing ad */ results?: Maybe; + /** Marketing campaigns related to the marketing ad */ marketingCampaign: MarketingCampaign; + /** Vendor related to the marketing ad */ vendor: Vendor; }; +/** + * Marketing ad represents an specific ad on a platform belonging + * to a marketing campaign and associated with a single vendor + **/ export declare type MarketingAdResultsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; +/** Marketing ads collection */ export declare type MarketingAdConnection = { + /** Collection of marketing ads */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Marketing ad in a collection */ export declare type MarketingAdEdge = { + /** Id of the contained marketing ad */ cursor: Scalars['ObjectId']; + /** Container for a marketing ad */ node?: Maybe; }; +/** + * Marketing campaign is a collection of dynamic marketing ads + * utilizing a specified campaign template, list of products, run + * time and creative specifications that are launched on a provided + * media channel + **/ export declare type MarketingCampaign = ResultResource & { + /** Id of the marketing campaign */ id: Scalars['ObjectId']; + /** Date and time the marketing campaign was created */ creationDate: Scalars['DateISO']; + /** Date and time the marketing campaign was last modified */ lastChangeDate: Scalars['DateISO']; + /** Name of the marketing campaign */ name: Scalars['NonEmptyString']; + /** Delivering status of the marketing campaign */ status: MarketingCampaignStatus; + /** Marketing ads contained by the marketing campaign */ marketingAds?: Maybe; + /** Products referenced by the marketing campaign */ products?: Maybe; + /** Vendor related to the marketing campaign */ vendor: Vendor; + /** Catalog related to the marketing campaign */ catalog: Catalog; + /** Campaign template related to the marketing campaign */ campaignTemplate: CampaignTemplate; + /** Media channel the marketing campaign is delivering to */ mediaChannel: MediaChannel; + /** Results referencing the marketing campaign */ results?: Maybe; + /** Marketing campaign creative data */ creativeSpec: Scalars['JSONObject']; + /** Marketing campaign scheduling data */ runTimeSpec: Scalars['JSONObject']; + /** System status of the marketing campaign */ systemStatus: SystemStatus; + /** Validation errors of the marketing campaign */ errors?: Maybe>; }; +/** + * Marketing campaign is a collection of dynamic marketing ads + * utilizing a specified campaign template, list of products, run + * time and creative specifications that are launched on a provided + * media channel + **/ export declare type MarketingCampaignMarketingAdsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; +/** + * Marketing campaign is a collection of dynamic marketing ads + * utilizing a specified campaign template, list of products, run + * time and creative specifications that are launched on a provided + * media channel + **/ export declare type MarketingCampaignProductsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** + * Marketing campaign is a collection of dynamic marketing ads + * utilizing a specified campaign template, list of products, run + * time and creative specifications that are launched on a provided + * media channel + **/ export declare type MarketingCampaignResultsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; +/** Marketing campaign collection */ export declare type MarketingCampaignConnection = { + /** Collection of marketing campaigns */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Marketing campaign in a collection */ export declare type MarketingCampaignEdge = { + /** Id of the marketing campaign */ cursor: Scalars['ObjectId']; + /** Container for a marketing campaign */ node?: Maybe; }; +/** Marketing campaign creation input data */ export declare type MarketingCampaignInput = { + /** Id of the campaign template referenced by the marketing campaign */ campaignTemplateId: Scalars['ObjectId']; + /** Marketing campaign creative data */ creativeSpec: Scalars['JSONObject']; + /** Marketing campaign scheduling data */ runTimeSpec: Scalars['JSONObject']; + /** Ids of the products advertised in the marketing campaign */ productIds?: Maybe>; + /** Delivering status of the marketing campaign */ status?: Maybe; name?: Maybe; }; +/** Delivering status a of a marketing campaign */ export declare enum MarketingCampaignStatus { + /** Active status */ Active = "ACTIVE", + /** Paused status */ Paused = "PAUSED" } +/** Marketing campaign update input data */ export declare type MarketingCampaignUpdateInput = { + /** Marketing campaign creative data */ creativeSpec?: Maybe; + /** Marketing campaign scheduling data */ runTimeSpec?: Maybe; + /** Delivering status of the marketing campaign */ status?: Maybe; name?: Maybe; }; +/** + * Marketplace represents a collection of media channels, campaign templates + * and vendors. A marketplace belongs to a single organization. + **/ export declare type Marketplace = EntitlementResource & { + /** Id of the marketplace */ id: Scalars['ObjectId']; + /** Date and time the marketplace was created */ creationDate: Scalars['DateISO']; + /** Date and time the marketplace was last updated */ lastChangeDate: Scalars['DateISO']; + /** Name of the marketplace */ name: Scalars['NonEmptyString']; + /** Organization related to the marketplace */ organization: Organization; + /** Media channels related to the marketplace */ mediaChannels?: Maybe; + /** Campaign templates related to the marketplace */ campaignTemplates?: Maybe; + /** Vendors related to the marketplace */ vendors?: Maybe; + /** System status of the marketplace */ systemStatus: SystemStatus; + /** Validation errors of the marketplace */ errors?: Maybe>; }; +/** + * Marketplace represents a collection of media channels, campaign templates + * and vendors. A marketplace belongs to a single organization. + **/ export declare type MarketplaceMediaChannelsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** + * Marketplace represents a collection of media channels, campaign templates + * and vendors. A marketplace belongs to a single organization. + **/ export declare type MarketplaceCampaignTemplatesArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; +/** + * Marketplace represents a collection of media channels, campaign templates + * and vendors. A marketplace belongs to a single organization. + **/ export declare type MarketplaceVendorsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** Marketplaces collection */ export declare type MarketplaceConnection = { + /** Collection of marketplaces */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Marketplace in a collection */ export declare type MarketplaceEdge = { + /** Id of the contained marketplace */ cursor: Scalars['ObjectId']; + /** Container for a marketplace */ node?: Maybe; }; +/** Marketplace creation input */ export declare type MarketplaceInput = { + /** Name of the marketplace */ name: Scalars['NonEmptyString']; + /** Id of the organization referenced by the marketplace */ organizationId: Scalars['ObjectId']; }; +/** Marketplace update input */ export declare type MarketplaceUpdateInput = { + /** Name of the marketplace */ name?: Maybe; }; +/** Media channel represents an ad account on a specific platform */ export declare type MediaChannel = EntitlementResource & { + /** Id of the media channel */ id: Scalars['ObjectId']; + /** Date and time the media channel was created */ creationDate: Scalars['DateISO']; + /** Date and time the media channel was last modified */ lastChangeDate: Scalars['DateISO']; + /** Name of the media channel */ name: Scalars['NonEmptyString']; + /** Platform the media channel is available for */ platform: Platform; + /** Id of the media channel on the corresponding platform */ remoteId?: Maybe; + /** Data related to the media channel stored on the remote platform */ remoteState: Scalars['JSONObject']; + /** Currency code of the media channel */ currency?: Maybe; + /** Time zone of the media channel */ timezone?: Maybe; + /** Status of the platform authentication token */ tokenStatus: TokenStatus; + /** System status of the media channel */ systemStatus: SystemStatus; + /** Validation errors of the media channel */ errors?: Maybe>; + /** Product catalogs referenced by the media channel */ catalogs: CatalogConnection; + /** Marketplace related to the media channel */ marketplace: Marketplace; }; +/** Media channel represents an ad account on a specific platform */ export declare type MediaChannelCatalogsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** Media channels collection */ export declare type MediaChannelConnection = { + /** Collection of media channels */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Media channel creation input data */ export declare type MediaChannelCreateInput = { + /** Name of the media channel */ name: Scalars['NonEmptyString']; + /** Id of the marketplace referenced by the media channel */ marketplaceId: Scalars['ObjectId']; + /** Platform the media channel is available for */ platform: Platform; + /** Media channel platform authentication token */ token: Scalars['NonEmptyString']; }; +/** Media channel in a collection */ export declare type MediaChannelEdge = { + /** Id of the contained media channel */ cursor: Scalars['ObjectId']; + /** Container for a media channel */ node?: Maybe; }; +/** Media channel import input data */ export declare type MediaChannelImportInput = { + /** Id of the marketplace referenced by the media channel */ marketplaceId: Scalars['ObjectId']; + /** Platform the media channel is available for */ platform: Platform; + /** Id of the media channel on the corresponding platform */ remoteId: Scalars['String']; + /** Media channel platform authentication token */ token: Scalars['NonEmptyString']; }; +/** Media channel update input data */ export declare type MediaChannelUpdateInput = { + /** Name of the media channel */ name?: Maybe; + /** Media channel platform authentication token */ token?: Maybe; }; export declare type Mutation = { + /** Creates a product catalog using input data */ createCatalog?: Maybe; + /** Imports a product catalog using input data */ importCatalog?: Maybe; + /** Deletes a product catalog identified by a given id */ deleteCatalog?: Maybe; + /** Updates a product catalog identified by an id using input data */ updateCatalog?: Maybe; + /** Creates an entitlement using input data */ createEntitlement?: Maybe; + /** Updates an entitlement identified by an id using input data */ updateEntitlement?: Maybe; + /** Deletes an entitlement identified by an id */ deleteEntitlement?: Maybe; + /** Creates a marketing campaign using input data */ createMarketingCampaign?: Maybe; + /** Updates a marketing campaign identified by a given id using input data */ updateMarketingCampaign?: Maybe; + /** Deletes a marketing campaign identified by a given id */ deleteMarketingCampaign?: Maybe; + /** Creates a marketplace using input data */ createMarketplace?: Maybe; + /** Updates a marketplace identified by a given id using input data */ updateMarketplace?: Maybe; + /** Deletes a marketplace identified by an id */ deleteMarketplace?: Maybe; + /** Creates a media channel using input data */ createMediaChannel?: Maybe; + /** Imports a media channel using input data */ importMediaChannel?: Maybe; + /** Updates a media channel identified by an id using input data */ updateMediaChannel?: Maybe; + /** Deletes a media channel identified by an id */ deleteMediaChannel?: Maybe; + /** Creates an organization using input data */ createOrganization?: Maybe; + /** Updates an organization identified by a given id using input data */ updateOrganization?: Maybe; + /** Deletes an organization identified by a given id */ deleteOrganization?: Maybe; + /** Creates a product using input data */ createProduct?: Maybe; + /** Updates a product identified by an id using input data */ updateProduct?: Maybe; + /** Deletes a product identified by a given id */ deleteProduct?: Maybe; + /** Authenticates the user using login input data */ login?: Maybe; + /** Updates the user using update input data */ updateUser?: Maybe; + /** Refreshed the user authentication using refresh login input data */ refreshLogin?: Maybe; + /** Creates a vendor using input data */ createVendor?: Maybe; + /** Updates a vendor identified by a given id using input data */ updateVendor?: Maybe; + /** Deletes a vendor identified by a given id */ deleteVendor?: Maybe; }; export declare type MutationCreateCatalogArgs = { @@ -601,126 +954,244 @@ export declare type MutationUpdateVendorArgs = { export declare type MutationDeleteVendorArgs = { id: Scalars['ObjectId']; }; +/** Filter operator */ export declare enum Operator { + /** Field value equals the given value */ Equals = "EQUALS", + /** Field value is not equal to the given value */ NotEquals = "NOT_EQUALS", + /** Field contains the given value (case sensitive) */ Contains = "CONTAINS", + /** Field contains the given value (case insensitive) */ Icontains = "ICONTAINS", + /** Field value is greater than the given value */ Gt = "GT", + /** Field value is equal or greater than the given value */ Gte = "GTE", + /** Field value is lower than the given value */ Lt = "LT", + /** Field value is equal or lower than the given value */ Lte = "LTE", + /** Field value is contained in the given list of values */ In = "IN", + /** Field value is null */ IsNull = "IS_NULL" } +/** + * Organization is the top level of your resources hierarchy + * and links to all owned marketplaces + **/ export declare type Organization = EntitlementResource & { + /** Id of the organization */ id: Scalars['ObjectId']; + /** Date and time the organization was created */ creationDate: Scalars['DateISO']; + /** Date and time the organization was last updated */ lastChangeDate: Scalars['DateISO']; users?: Maybe; marketplaces?: Maybe; + /** Name of the organization */ name: Scalars['NonEmptyString']; + /** Tier type of the organization */ tier: OrganizationTierEnum; + /** System status of the organization */ systemStatus: SystemStatus; + /** Validation errors of the organization */ errors?: Maybe>; }; +/** + * Organization is the top level of your resources hierarchy + * and links to all owned marketplaces + **/ export declare type OrganizationUsersArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; +/** + * Organization is the top level of your resources hierarchy + * and links to all owned marketplaces + **/ export declare type OrganizationMarketplacesArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** Organizations collection */ export declare type OrganizationConnection = { + /** Collection of organizations */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Organization in a collection */ export declare type OrganizationEdge = { + /** Id of the contained organization */ cursor: Scalars['ObjectId']; + /** Container for an organization */ node?: Maybe; }; +/** Organization creation input data */ export declare type OrganizationInput = { + /** Name of the organization */ name: Scalars['NonEmptyString']; }; +/** Organization tier type */ export declare enum OrganizationTierEnum { Standard = "Standard", Developer = "Developer" } +/** Organization update input data */ export declare type OrganizationUpdateInput = { + /** Name of the organization */ name?: Maybe; }; +/** Pagination information */ export declare type PageInfo = { + /** Whether there's more pages to retrieve after this page */ hasNextPage: Scalars['Boolean']; + /** Whether there's more pages to retrieve before this page */ + hasPreviousPage: Scalars['Boolean']; + /** Id of the first object contained on the page */ startCursor?: Maybe; + /** Id of the last object contained on the page */ endCursor?: Maybe; }; +/** Marketing platform */ export declare enum Platform { + /** Facebook marketing platform */ Facebook = "facebook" } +/** + * Product is a collection of data representing a + * single product associated with a specific catalog + * and vendor which can be used to generate + * dynamic ads via a marekting campaign + **/ export declare type Product = { + /** Id of the product */ id: Scalars['ObjectId']; + /** Date and time the product was created */ creationDate: Scalars['DateISO']; + /** Date and time the product was last modified */ lastChangeDate: Scalars['DateISO']; + /** Name of the product */ name: Scalars['NonEmptyString']; + /** Stock keeping unit of the product */ sku: Scalars['NonEmptyString']; + /** Data related to the product stored on the remote platform */ remoteState?: Maybe; + /** Marketing campaigns referenced by the product */ marketingCampaigns?: Maybe; + /** Product catalog containing the product */ catalog: Catalog; + /** Data related to the product */ metadata: Scalars['JSONObject']; + /** Vendor owning the product */ vendor: Vendor; + /** System status of the product */ systemStatus: SystemStatus; + /** Validation errors of the product */ errors?: Maybe>; + /** Validation warnings */ warnings?: Maybe>; }; +/** + * Product is a collection of data representing a + * single product associated with a specific catalog + * and vendor which can be used to generate + * dynamic ads via a marekting campaign + **/ export declare type ProductMarketingCampaignsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** Products collection */ export declare type ProductConnection = { + /** Collection of products */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Product in a collection */ export declare type ProductEdge = { + /** Id of the contained product */ cursor: Scalars['ObjectId']; + /** Container for a product */ node?: Maybe; }; +/** Product creation input */ export declare type ProductInput = { + /** Id of the vendor that owns the product */ vendorId: Scalars['ObjectId']; + /** Id of the product catalog containing the product */ catalogId: Scalars['ObjectId']; + /** Data related to the product */ metadata: Scalars['JSONObject']; }; +/** Product update input data */ export declare type ProductUpdateInput = { + /** Data related to the product */ metadata: Scalars['JSONObject']; }; export declare type Query = { + /** Returns a single campaign template identified by a given id */ campaignTemplate?: Maybe; + /** Returns a collection of campaign templates */ campaignTemplates?: Maybe; + /** Returns a single product catalog identified by a given id */ catalog?: Maybe; + /** Returns a collection of product catalogs */ catalogs?: Maybe; + /** Returns a single entitlement identified by a given id */ entitlement?: Maybe; + /** Returns a collection of entitlements */ entitlements?: Maybe; + /** Returns a single marketing ad identified by a given id */ marketingAd?: Maybe; + /** Returns a collection of marketing ads */ marketingAds?: Maybe; + /** Returns a single marketing campaign identified by a given id */ marketingCampaign?: Maybe; + /** Returns a collection of marketing campaigns */ marketingCampaigns?: Maybe; + /** Returns a single marketplace identified by a given id */ marketplace?: Maybe; + /** Returns a collection of marketplaces */ marketplaces?: Maybe; + /** Returns a single product catalog identified by a given id */ mediaChannel?: Maybe; + /** Returns a collection of media channels */ mediaChannels?: Maybe; + /** Returns a single organization identified by a given id */ organization?: Maybe; + /** Returns a collection of organizations */ organizations?: Maybe; + /** Returns a single product identified by a given id */ product?: Maybe; + /** Returns a collection of products */ products?: Maybe; + /** Returns a single result identified by a given id */ result?: Maybe; + /** Returns a collecton of results */ results?: Maybe; + /** Returns the user making this query */ me?: Maybe; + /** Returns a single vendor identified by a given id */ vendor?: Maybe; + /** Returns a collection of vendors */ vendors?: Maybe; }; export declare type QueryCampaignTemplateArgs = { @@ -728,16 +1199,22 @@ export declare type QueryCampaignTemplateArgs = { }; export declare type QueryCampaignTemplatesArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; export declare type QueryCatalogArgs = { id: Scalars['ObjectId']; }; export declare type QueryCatalogsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; export declare type QueryEntitlementArgs = { @@ -745,24 +1222,33 @@ export declare type QueryEntitlementArgs = { }; export declare type QueryEntitlementsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; export declare type QueryMarketingAdArgs = { id: Scalars['ObjectId']; }; export declare type QueryMarketingAdsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; export declare type QueryMarketingCampaignArgs = { id: Scalars['ObjectId']; }; export declare type QueryMarketingCampaignsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; export declare type QueryMarketplaceArgs = { @@ -770,8 +1256,11 @@ export declare type QueryMarketplaceArgs = { }; export declare type QueryMarketplacesArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; export declare type QueryMediaChannelArgs = { @@ -779,8 +1268,11 @@ export declare type QueryMediaChannelArgs = { }; export declare type QueryMediaChannelsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; export declare type QueryOrganizationArgs = { @@ -788,8 +1280,11 @@ export declare type QueryOrganizationArgs = { }; export declare type QueryOrganizationsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; export declare type QueryProductArgs = { @@ -797,8 +1292,11 @@ export declare type QueryProductArgs = { }; export declare type QueryProductsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; export declare type QueryResultArgs = { @@ -806,146 +1304,284 @@ export declare type QueryResultArgs = { }; export declare type QueryResultsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; export declare type QueryVendorArgs = { id: Scalars['ObjectId']; }; export declare type QueryVendorsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** Refresh login input data */ export declare type RefreshTokenInput = { + /** Secondary token value */ refreshToken: Scalars['String']; }; +/** Result */ export declare type Result = { + /** Id of the result */ id: Scalars['ObjectId']; + /** Date and time the result was created */ creationDate: Scalars['DateISO']; + /** Date and time the result was last modified */ lastChangeDate: Scalars['DateISO']; + /** Date and time the result data was generated */ date: Scalars['DateISO']; + /** Analytics data related to the result */ analytics: ResultAnalytics; + /** Resource type related to the result */ type: ResultResourceTypeEnum; + /** Resource related to the result */ resource: ResultResource; + /** Vendor related to the result */ vendor: Vendor; }; +/** Analytics data referenced by a result */ export declare type ResultAnalytics = { + /** Number of results */ results?: Maybe; + /** Number of impressions */ impressions?: Maybe; + /** Number of clicks */ clicks?: Maybe; + /** Amount spent */ spend?: Maybe; }; +/** Results collection */ export declare type ResultConnection = { + /** Collection of results */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Result in a collection */ export declare type ResultEdge = { + /** Id of the contained result */ cursor: Scalars['ObjectId']; + /** Container for a result */ node?: Maybe; }; +/** Resource referenced by a result */ export declare type ResultResource = { + /** Id of the result resource */ id: Scalars['ObjectId']; + /** Date and time the result resource was created */ creationDate: Scalars['DateISO']; + /** Date and time the result resource was last modified */ lastChangeDate: Scalars['DateISO']; + /** Vendor related with the result resource */ vendor: Vendor; }; +/** Resource related to a result */ export declare enum ResultResourceTypeEnum { MarketingAd = "MarketingAd", MarketingCampaign = "MarketingCampaign" } +/** Sorting direction */ +export declare enum Sort_Order { + /** Ascending sort order */ + Asc = "ASC", + /** Descending sort order */ + Desc = "DESC" +} +/** Sort input data */ +export declare type SortInput = { + /** Field that will be sorted in the specified direction */ + field?: Maybe; + /** Sorting direction */ + order?: Maybe; +}; +/** System status */ export declare enum SystemStatus { + /** Awaiting an update */ Pending = "PENDING", + /** Awaiting deletion */ PendingDeletion = "PENDING_DELETION", + /** Awaiting synchronization */ PendingSync = "PENDING_SYNC", + /** Being processed for an update */ Processing = "PROCESSING", + /** Being processed for synchronization */ ProcessingSync = "PROCESSING_SYNC", + /** Being processed for deletion */ ProcessingDeletion = "PROCESSING_DELETION", + /** Already been processed */ Processed = "PROCESSED", + /** Having errors */ Error = "ERROR", + /** Marked as deleted */ Deleted = "DELETED" } +/** Authentication token */ export declare type Token = { + /** Token value */ token: Scalars['String']; + /** Secondary token used to refresh authentication */ refreshToken: Scalars['String']; + /** Date and time the token will expire */ expiryDate: Scalars['DateISO']; + /** User the token was created for */ user: User; }; +/** Platform token processing status */ export declare enum TokenStatus { + /** Token submitted and awaiting processing */ Pending = "PENDING", + /** Token not submitted */ Missing = "MISSING", + /** Token successfully validated */ Valid = "VALID", + /** Invalid token */ Invalid = "INVALID" } +/** + * User of the system that is granted access to resources + * through entitlements + **/ export declare type User = { + /** Id of the user */ id: Scalars['ObjectId']; + /** Date and time the user was created */ creationDate: Scalars['DateISO']; + /** Date and time the user was last modified */ lastChangeDate: Scalars['DateISO']; + /** Email of the user */ email: Scalars['NonEmptyString']; + /** First name of the user */ firstName?: Maybe; + /** Last name of the user */ lastName?: Maybe; + /** Organizations the user is a member of */ organizations?: Maybe; + /** Entitlements granting permissions to the user */ entitlements?: Maybe; }; +/** + * User of the system that is granted access to resources + * through entitlements + **/ export declare type UserOrganizationsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** + * User of the system that is granted access to resources + * through entitlements + **/ export declare type UserEntitlementsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; +/** User collection */ export declare type UserConnection = { + /** Collection of users */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** User in a collection */ export declare type UserEdge = { + /** Id of the contained user */ cursor: Scalars['ObjectId']; + /** Container for a user */ node?: Maybe; }; +/** User login input data */ export declare type UserLoginInput = { + /** Password used for the login */ password: Scalars['NonEmptyString']; + /** Email used for the login */ email: Scalars['NonEmptyString']; }; +/** User update input data */ export declare type UserUpdateInput = { + /** First name of the user */ firstName?: Maybe; + /** Last name of the user */ lastName?: Maybe; + /** Password of the user */ password?: Maybe; + /** Email of the user */ email?: Maybe; }; +/** + * Vendor belongs to a marketplace and is granted access to specific + * products they can use to create a marketing campaign + **/ export declare type Vendor = { + /** Id of the vendor */ id: Scalars['ObjectId']; + /** Date and time the vendor was created */ creationDate: Scalars['DateISO']; + /** Date and time the vendor was last updated */ lastChangeDate: Scalars['DateISO']; + /** Name of the vendor */ name: Scalars['NonEmptyString']; + /** Marketplace referenced by the vendor */ marketplace: Marketplace; + /** Products related to the vendor */ products?: Maybe; + /** System status of the vendor */ systemStatus: SystemStatus; + /** Validation errors of the vendor */ errors?: Maybe>; }; +/** + * Vendor belongs to a marketplace and is granted access to specific + * products they can use to create a marketing campaign + **/ export declare type VendorProductsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** Vendors collection */ export declare type VendorConnection = { + /** Collection of vendors */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Vendor in a collection */ export declare type VendorEdge = { + /** Id of the contained vendor */ cursor: Scalars['ObjectId']; + /** Container for a vendor */ node?: Maybe; }; +/** Vendor creation input data */ export declare type VendorInput = { + /** Name of the vendor */ name: Scalars['NonEmptyString']; + /** Id of the marketplace referenced by the vendor */ marketplaceId: Scalars['ObjectId']; }; +/** Vendor update input data */ export declare type VendorUpdateInput = { + /** Name of the vendor */ name?: Maybe; }; export declare type ResolverTypeWrapper = Promise | T; @@ -989,6 +1625,8 @@ export declare type ResolversTypes = { JSONObject: ResolverTypeWrapper; Organization: ResolverTypeWrapper; FilterInput: ResolverTypeWrapper; + SortInput: SortInput; + SORT_ORDER: Sort_Order; Int: ResolverTypeWrapper; UserConnection: ResolverTypeWrapper; UserEdge: ResolverTypeWrapper; @@ -1081,6 +1719,8 @@ export declare type ResolversParentTypes = { JSONObject: Scalars['JSONObject']; Organization: Organization; FilterInput: Scalars['FilterInput']; + SortInput: SortInput; + SORT_ORDER: Sort_Order; Int: Scalars['Int']; UserConnection: UserConnection; UserEdge: UserEdge; @@ -1393,6 +2033,7 @@ export declare type OrganizationEdgeResolvers = { hasNextPage?: Resolver; + hasPreviousPage?: Resolver; startCursor?: Resolver, ParentType, ContextType>; endCursor?: Resolver, ParentType, ContextType>; }; diff --git a/src/generated/graphql.ts b/src/generated/graphql.ts index 8f7107d..f9d29a8 100644 --- a/src/generated/graphql.ts +++ b/src/generated/graphql.ts @@ -142,49 +142,121 @@ export type Scalars = { * } * ``` **/ - FilterInput: any; + FilterInput: + | { + field: string; + operator: + | 'EQUALS' + | 'NOT_EQUALS' + | 'CONTAINS' + | 'ICONTAINS' + | 'GT' + | 'GTE' + | 'LT' + | 'LTE'; + value: string | string[]; + } + | { + field: string; + operator: + | 'EQUALS' + | 'NOT_EQUALS' + | 'CONTAINS' + | 'ICONTAINS' + | 'GT' + | 'GTE' + | 'LT' + | 'LTE'; + value: string | string[]; + }[] + | { + field: string; + operator: + | 'EQUALS' + | 'NOT_EQUALS' + | 'CONTAINS' + | 'ICONTAINS' + | 'GT' + | 'GTE' + | 'LT' + | 'LTE'; + value: string | string[]; + }[][]; /** The `Upload` scalar type represents a file upload. */ Upload: any; }; +/** Authorization field type */ export enum AuthField { + /** Generic object id */ Id = 'id', + /** User id */ UserId = 'userId', + /** Vendor id */ VendorId = 'vendorId', + /** Organization id */ OrganizationId = 'organizationId', + /** Marketplace id */ MarketplaceId = 'marketplaceId', + /** Media channel id */ MediaChannelId = 'mediaChannelId', + /** Campaign template id */ CampaignTemplateId = 'campaignTemplateId', + /** Entitlement target resource id */ ResourceId = 'resourceId', + /** Product catalog id */ CatalogId = 'catalogId', + /** Product ids */ ProductIds = 'productIds', } +/** Location of the authorization operation */ export enum AuthLocation { + /** On the query arguments */ Arg = 'ARG', + /** On the mutation input */ Input = 'INPUT', + /** On the parent object */ Parent = 'PARENT', + /** On the referenced catalog */ Catalog = 'CATALOG', + /** On the referenced entitlement */ Entitlement = 'ENTITLEMENT', + /** On the referenced marketing ad */ MarketingAd = 'MARKETING_AD', + /** On the referenced marketing campaign */ MarketingCampaign = 'MARKETING_CAMPAIGN', + /** On the referenced campaign template */ CampaignTemplate = 'CAMPAIGN_TEMPLATE', + /** On the referenced media channel */ MediaChannel = 'MEDIA_CHANNEL', + /** On the referenced product */ Product = 'PRODUCT', + /** On the referenced result */ Result = 'RESULT', + /** On the referenced vendor */ Vendor = 'VENDOR', } +/** Types of permissions that can be granted to resources */ export enum AuthPermission { + /** Allows fetching the resource */ Read = 'READ', + /** Allows creation and updating the resource */ Write = 'WRITE', + /** Allows deleting the resource */ Delete = 'DELETE', + /** Allows managing entitlements targeting the resource */ ManageEntitlements = 'MANAGE_ENTITLEMENTS', } +/** Permission check type */ export enum AuthType { + /** Permission granted by entitlement */ Entitlement = 'ENTITLEMENT', + /** Permission granted by vendor relationship */ Vendor = 'VENDOR', + /** Permission granted by user ownership */ UserOnly = 'USER_ONLY', } @@ -193,374 +265,682 @@ export enum CacheControlScope { Private = 'PRIVATE', } +/** + * Campaign templates contain targeting and creative information tailored + * to your objectives specific to your goals and business needs + **/ export type CampaignTemplate = { + /** Id of the campaign template */ id: Scalars['ObjectId']; + /** Date and time the campaign template was created */ creationDate: Scalars['DateISO']; + /** Date and time the campaign template was last modified */ lastChangeDate: Scalars['DateISO']; + /** Name of the campaign template */ name: Scalars['NonEmptyString']; + /** Description of the campaign template */ description: Scalars['String']; + /** Platform the campaign template is available for */ platform: Platform; + /** Id of the campaign template on the corresponding platform */ remoteId: Scalars['String']; + /** Marketplace the campaign template was created for */ marketplace: Marketplace; + /** Marketing campaigns that are using this campaign template */ marketingCampaigns?: Maybe; }; +/** + * Campaign templates contain targeting and creative information tailored + * to your objectives specific to your goals and business needs + **/ export type CampaignTemplateMarketingCampaignsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** Campaign templates collection */ export type CampaignTemplateConnection = { + /** Collection of campaign templates */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Campaign template in a collection */ export type CampaignTemplateEdge = { + /** Id of the contained campaign template */ cursor: Scalars['ObjectId']; + /** Container for a campaign template */ node?: Maybe; }; +/** Catalogs contain products linked to a specific platform and media channel */ export type Catalog = { + /** Id of the product catalog */ id: Scalars['ObjectId']; + /** Name of the product catalog */ name: Scalars['NonEmptyString']; + /** Category of the products referenced by the product catalog */ catalogType: CatalogType; + /** Date and time the product catalog was created */ creationDate: Scalars['DateISO']; + /** Date and time the product catalog was last modified */ lastChangeDate: Scalars['DateISO']; + /** Id of the product catalog on the related platform */ remoteId?: Maybe; + /** System status of the product catalog */ systemStatus: SystemStatus; + /** Data related to the product catalog stored on the remote platform */ remoteState: Scalars['JSONObject']; + /** Facebook data feed id referenced by the product catalog */ dataFeedId?: Maybe; + /** Validation errors of the product catalog */ errors?: Maybe>; + /** Media channel related to the product catalog */ mediaChannel: MediaChannel; + /** Products referenced by the catalog */ products?: Maybe; }; +/** Catalogs contain products linked to a specific platform and media channel */ export type CatalogProductsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** Product catalogs collection */ export type CatalogConnection = { + /** Collection of product catalogs */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Product catalog creation input data */ export type CatalogCreateInput = { + /** Name of the product catalog */ name: Scalars['NonEmptyString']; + /** Media channel id referenced by the product catalog */ mediaChannelId: Scalars['ObjectId']; + /** Category of the products referenced by the catalog */ catalogType: CatalogType; }; +/** Product catalog in a collection */ export type CatalogEdge = { + /** Id of the contained product catalog */ cursor: Scalars['ObjectId']; + /** Container for a product catalog */ node?: Maybe; }; +/** Product catalog import input data */ export type CatalogImportInput = { + /** Media channel id referenced by the product catalog */ mediaChannelId: Scalars['ObjectId']; + /** Id of the product catalog on the related platform */ remoteId: Scalars['String']; }; +/** Product catalog type */ export enum CatalogType { + /** Catalog of bookable services */ Bookable = 'bookable', + /** Catalog of standard products or services */ Commerce = 'commerce', + /** Catalog of travel destinations */ Destinations = 'destinations', + /** Catalog of plane tickets */ Flights = 'flights', + /** Catalog of home rentals */ HomeListings = 'home_listings', + /** Catalog of hotel rooms */ Hotels = 'hotels', + /** Catalog of store-based products or services */ OfflineCommerce = 'offline_commerce', + /** Catalog of event tickets */ TicketedExperiences = 'ticketed_experiences', + /** Catalog of transactable goods */ TransactableItems = 'transactable_items', + /** Catalog of vehicle rentals or sales */ Vehicles = 'vehicles', } +/** Product catalog update input data */ export type CatalogUpdateInput = { + /** Name of the product catalog */ name?: Maybe; }; +/** Object deletion operation result */ export type Deletion = { + /** Id of the deleted object */ id: Scalars['String']; }; +/** A set of user permissions related to a resource */ export type Entitlement = { + /** Id of the entitlement */ id: Scalars['ObjectId']; + /** Date and time the entitlement was created */ creationDate: Scalars['DateISO']; + /** Date and time the entitlement was last modified */ lastChangeDate: Scalars['DateISO']; + /** User the permissions are granted to */ user: User; + /** Type of resource related to the entitlement */ type: EntitlementResourceTypeEnum; + /** Resource related to the entitlement */ resource: EntitlementResource; + /** Set of permissions granted to the related user */ permissions: Array; }; +/** Entitlement collection */ export type EntitlementConnection = { + /** Collection of entitlements */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Entitlement in a collection */ export type EntitlementEdge = { + /** Id of the contained entitlement */ cursor: Scalars['ObjectId']; + /** Container for an entitlement */ node?: Maybe; }; +/** Entitlement creation input data */ export type EntitlementInput = { + /** Id of the user the permissions are granted to */ userId: Scalars['ObjectId']; + /** Id of the resource related to the entitlement */ resourceId: Scalars['ObjectId']; + /** Set of permissions granted to the related user */ permissions: Array; }; +/** Resource targeted by an entitlement */ export type EntitlementResource = { + /** Id of the resource */ id: Scalars['ObjectId']; + /** Name of the resource */ name: Scalars['NonEmptyString']; + /** System status of the resource */ systemStatus: SystemStatus; + /** Date and time the resource was created */ creationDate: Scalars['DateISO']; + /** Date and time the resource was last modified */ lastChangeDate: Scalars['DateISO']; + /** Validation errors of the resource */ errors?: Maybe>; }; +/** Resource types that can be granted permissions to */ export enum EntitlementResourceTypeEnum { + /** Marketplace resource type */ Marketplace = 'Marketplace', + /** Organization resource type */ Organization = 'Organization', + /** Media channel resource type */ MediaChannel = 'MediaChannel', } +/** Entitlement update input data */ export type EntitlementUpdateInput = { + /** Set of permissions granted to the related user */ permissions: Array; }; +/** + * Marketing ad represents an specific ad on a platform belonging + * to a marketing campaign and associated with a single vendor + **/ export type MarketingAd = ResultResource & { + /** Id of the marketing ad */ id: Scalars['ObjectId']; + /** Date and time the marketing ad was created */ creationDate: Scalars['DateISO']; + /** Date and time the marketing ad was last modified */ lastChangeDate: Scalars['DateISO']; + /** Id of the marketing ad on the related marketing campaign platform */ remoteId: Scalars['String']; + /** Preview data of the marketing ad */ preview: Scalars['String']; + /** Results related to the marketing ad */ results?: Maybe; + /** Marketing campaigns related to the marketing ad */ marketingCampaign: MarketingCampaign; + /** Vendor related to the marketing ad */ vendor: Vendor; }; +/** + * Marketing ad represents an specific ad on a platform belonging + * to a marketing campaign and associated with a single vendor + **/ export type MarketingAdResultsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; +/** Marketing ads collection */ export type MarketingAdConnection = { + /** Collection of marketing ads */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Marketing ad in a collection */ export type MarketingAdEdge = { + /** Id of the contained marketing ad */ cursor: Scalars['ObjectId']; + /** Container for a marketing ad */ node?: Maybe; }; +/** + * Marketing campaign is a collection of dynamic marketing ads + * utilizing a specified campaign template, list of products, run + * time and creative specifications that are launched on a provided + * media channel + **/ export type MarketingCampaign = ResultResource & { + /** Id of the marketing campaign */ id: Scalars['ObjectId']; + /** Date and time the marketing campaign was created */ creationDate: Scalars['DateISO']; + /** Date and time the marketing campaign was last modified */ lastChangeDate: Scalars['DateISO']; + /** Name of the marketing campaign */ name: Scalars['NonEmptyString']; + /** Delivering status of the marketing campaign */ status: MarketingCampaignStatus; + /** Marketing ads contained by the marketing campaign */ marketingAds?: Maybe; + /** Products referenced by the marketing campaign */ products?: Maybe; + /** Vendor related to the marketing campaign */ vendor: Vendor; + /** Catalog related to the marketing campaign */ catalog: Catalog; + /** Campaign template related to the marketing campaign */ campaignTemplate: CampaignTemplate; + /** Media channel the marketing campaign is delivering to */ mediaChannel: MediaChannel; + /** Results referencing the marketing campaign */ results?: Maybe; + /** Marketing campaign creative data */ creativeSpec: Scalars['JSONObject']; + /** Marketing campaign scheduling data */ runTimeSpec: Scalars['JSONObject']; + /** System status of the marketing campaign */ systemStatus: SystemStatus; + /** Validation errors of the marketing campaign */ errors?: Maybe>; }; +/** + * Marketing campaign is a collection of dynamic marketing ads + * utilizing a specified campaign template, list of products, run + * time and creative specifications that are launched on a provided + * media channel + **/ export type MarketingCampaignMarketingAdsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; +/** + * Marketing campaign is a collection of dynamic marketing ads + * utilizing a specified campaign template, list of products, run + * time and creative specifications that are launched on a provided + * media channel + **/ export type MarketingCampaignProductsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** + * Marketing campaign is a collection of dynamic marketing ads + * utilizing a specified campaign template, list of products, run + * time and creative specifications that are launched on a provided + * media channel + **/ export type MarketingCampaignResultsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; +/** Marketing campaign collection */ export type MarketingCampaignConnection = { + /** Collection of marketing campaigns */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Marketing campaign in a collection */ export type MarketingCampaignEdge = { + /** Id of the marketing campaign */ cursor: Scalars['ObjectId']; + /** Container for a marketing campaign */ node?: Maybe; }; +/** Marketing campaign creation input data */ export type MarketingCampaignInput = { + /** Id of the campaign template referenced by the marketing campaign */ campaignTemplateId: Scalars['ObjectId']; + /** Marketing campaign creative data */ creativeSpec: Scalars['JSONObject']; + /** Marketing campaign scheduling data */ runTimeSpec: Scalars['JSONObject']; + /** Ids of the products advertised in the marketing campaign */ productIds?: Maybe>; + /** Delivering status of the marketing campaign */ status?: Maybe; name?: Maybe; }; +/** Delivering status a of a marketing campaign */ export enum MarketingCampaignStatus { + /** Active status */ Active = 'ACTIVE', + /** Paused status */ Paused = 'PAUSED', } +/** Marketing campaign update input data */ export type MarketingCampaignUpdateInput = { + /** Marketing campaign creative data */ creativeSpec?: Maybe; + /** Marketing campaign scheduling data */ runTimeSpec?: Maybe; + /** Delivering status of the marketing campaign */ status?: Maybe; name?: Maybe; }; +/** + * Marketplace represents a collection of media channels, campaign templates + * and vendors. A marketplace belongs to a single organization. + **/ export type Marketplace = EntitlementResource & { + /** Id of the marketplace */ id: Scalars['ObjectId']; + /** Date and time the marketplace was created */ creationDate: Scalars['DateISO']; + /** Date and time the marketplace was last updated */ lastChangeDate: Scalars['DateISO']; + /** Name of the marketplace */ name: Scalars['NonEmptyString']; + /** Organization related to the marketplace */ organization: Organization; + /** Media channels related to the marketplace */ mediaChannels?: Maybe; + /** Campaign templates related to the marketplace */ campaignTemplates?: Maybe; + /** Vendors related to the marketplace */ vendors?: Maybe; + /** System status of the marketplace */ systemStatus: SystemStatus; + /** Validation errors of the marketplace */ errors?: Maybe>; }; +/** + * Marketplace represents a collection of media channels, campaign templates + * and vendors. A marketplace belongs to a single organization. + **/ export type MarketplaceMediaChannelsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** + * Marketplace represents a collection of media channels, campaign templates + * and vendors. A marketplace belongs to a single organization. + **/ export type MarketplaceCampaignTemplatesArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; +/** + * Marketplace represents a collection of media channels, campaign templates + * and vendors. A marketplace belongs to a single organization. + **/ export type MarketplaceVendorsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** Marketplaces collection */ export type MarketplaceConnection = { + /** Collection of marketplaces */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Marketplace in a collection */ export type MarketplaceEdge = { + /** Id of the contained marketplace */ cursor: Scalars['ObjectId']; + /** Container for a marketplace */ node?: Maybe; }; +/** Marketplace creation input */ export type MarketplaceInput = { + /** Name of the marketplace */ name: Scalars['NonEmptyString']; + /** Id of the organization referenced by the marketplace */ organizationId: Scalars['ObjectId']; }; +/** Marketplace update input */ export type MarketplaceUpdateInput = { + /** Name of the marketplace */ name?: Maybe; }; +/** Media channel represents an ad account on a specific platform */ export type MediaChannel = EntitlementResource & { + /** Id of the media channel */ id: Scalars['ObjectId']; + /** Date and time the media channel was created */ creationDate: Scalars['DateISO']; + /** Date and time the media channel was last modified */ lastChangeDate: Scalars['DateISO']; + /** Name of the media channel */ name: Scalars['NonEmptyString']; + /** Platform the media channel is available for */ platform: Platform; + /** Id of the media channel on the corresponding platform */ remoteId?: Maybe; + /** Data related to the media channel stored on the remote platform */ remoteState: Scalars['JSONObject']; + /** Currency code of the media channel */ currency?: Maybe; + /** Time zone of the media channel */ timezone?: Maybe; + /** Status of the platform authentication token */ tokenStatus: TokenStatus; + /** System status of the media channel */ systemStatus: SystemStatus; + /** Validation errors of the media channel */ errors?: Maybe>; + /** Product catalogs referenced by the media channel */ catalogs: CatalogConnection; + /** Marketplace related to the media channel */ marketplace: Marketplace; }; +/** Media channel represents an ad account on a specific platform */ export type MediaChannelCatalogsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** Media channels collection */ export type MediaChannelConnection = { + /** Collection of media channels */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Media channel creation input data */ export type MediaChannelCreateInput = { + /** Name of the media channel */ name: Scalars['NonEmptyString']; + /** Id of the marketplace referenced by the media channel */ marketplaceId: Scalars['ObjectId']; + /** Platform the media channel is available for */ platform: Platform; + /** Media channel platform authentication token */ token: Scalars['NonEmptyString']; }; +/** Media channel in a collection */ export type MediaChannelEdge = { + /** Id of the contained media channel */ cursor: Scalars['ObjectId']; + /** Container for a media channel */ node?: Maybe; }; +/** Media channel import input data */ export type MediaChannelImportInput = { + /** Id of the marketplace referenced by the media channel */ marketplaceId: Scalars['ObjectId']; + /** Platform the media channel is available for */ platform: Platform; + /** Id of the media channel on the corresponding platform */ remoteId: Scalars['String']; + /** Media channel platform authentication token */ token: Scalars['NonEmptyString']; }; +/** Media channel update input data */ export type MediaChannelUpdateInput = { + /** Name of the media channel */ name?: Maybe; + /** Media channel platform authentication token */ token?: Maybe; }; export type Mutation = { + /** Creates a product catalog using input data */ createCatalog?: Maybe; + /** Imports a product catalog using input data */ importCatalog?: Maybe; + /** Deletes a product catalog identified by a given id */ deleteCatalog?: Maybe; + /** Updates a product catalog identified by an id using input data */ updateCatalog?: Maybe; + /** Creates an entitlement using input data */ createEntitlement?: Maybe; + /** Updates an entitlement identified by an id using input data */ updateEntitlement?: Maybe; + /** Deletes an entitlement identified by an id */ deleteEntitlement?: Maybe; + /** Creates a marketing campaign using input data */ createMarketingCampaign?: Maybe; + /** Updates a marketing campaign identified by a given id using input data */ updateMarketingCampaign?: Maybe; + /** Deletes a marketing campaign identified by a given id */ deleteMarketingCampaign?: Maybe; + /** Creates a marketplace using input data */ createMarketplace?: Maybe; + /** Updates a marketplace identified by a given id using input data */ updateMarketplace?: Maybe; + /** Deletes a marketplace identified by an id */ deleteMarketplace?: Maybe; + /** Creates a media channel using input data */ createMediaChannel?: Maybe; + /** Imports a media channel using input data */ importMediaChannel?: Maybe; + /** Updates a media channel identified by an id using input data */ updateMediaChannel?: Maybe; + /** Deletes a media channel identified by an id */ deleteMediaChannel?: Maybe; + /** Creates an organization using input data */ createOrganization?: Maybe; + /** Updates an organization identified by a given id using input data */ updateOrganization?: Maybe; + /** Deletes an organization identified by a given id */ deleteOrganization?: Maybe; + /** Creates a product using input data */ createProduct?: Maybe; + /** Updates a product identified by an id using input data */ updateProduct?: Maybe; + /** Deletes a product identified by a given id */ deleteProduct?: Maybe; + /** Authenticates the user using login input data */ login?: Maybe; + /** Updates the user using update input data */ updateUser?: Maybe; + /** Refreshed the user authentication using refresh login input data */ refreshLogin?: Maybe; + /** Creates a vendor using input data */ createVendor?: Maybe; + /** Updates a vendor identified by a given id using input data */ updateVendor?: Maybe; + /** Deletes a vendor identified by a given id */ deleteVendor?: Maybe; }; @@ -688,143 +1068,261 @@ export type MutationDeleteVendorArgs = { id: Scalars['ObjectId']; }; +/** Filter operator */ export enum Operator { + /** Field value equals the given value */ Equals = 'EQUALS', + /** Field value is not equal to the given value */ NotEquals = 'NOT_EQUALS', + /** Field contains the given value (case sensitive) */ Contains = 'CONTAINS', + /** Field contains the given value (case insensitive) */ Icontains = 'ICONTAINS', + /** Field value is greater than the given value */ Gt = 'GT', + /** Field value is equal or greater than the given value */ Gte = 'GTE', + /** Field value is lower than the given value */ Lt = 'LT', + /** Field value is equal or lower than the given value */ Lte = 'LTE', + /** Field value is contained in the given list of values */ In = 'IN', + /** Field value is null */ IsNull = 'IS_NULL', } +/** + * Organization is the top level of your resources hierarchy + * and links to all owned marketplaces + **/ export type Organization = EntitlementResource & { + /** Id of the organization */ id: Scalars['ObjectId']; + /** Date and time the organization was created */ creationDate: Scalars['DateISO']; + /** Date and time the organization was last updated */ lastChangeDate: Scalars['DateISO']; users?: Maybe; marketplaces?: Maybe; + /** Name of the organization */ name: Scalars['NonEmptyString']; + /** Tier type of the organization */ tier: OrganizationTierEnum; + /** System status of the organization */ systemStatus: SystemStatus; + /** Validation errors of the organization */ errors?: Maybe>; }; +/** + * Organization is the top level of your resources hierarchy + * and links to all owned marketplaces + **/ export type OrganizationUsersArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; +/** + * Organization is the top level of your resources hierarchy + * and links to all owned marketplaces + **/ export type OrganizationMarketplacesArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** Organizations collection */ export type OrganizationConnection = { + /** Collection of organizations */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Organization in a collection */ export type OrganizationEdge = { + /** Id of the contained organization */ cursor: Scalars['ObjectId']; + /** Container for an organization */ node?: Maybe; }; +/** Organization creation input data */ export type OrganizationInput = { + /** Name of the organization */ name: Scalars['NonEmptyString']; }; +/** Organization tier type */ export enum OrganizationTierEnum { Standard = 'Standard', Developer = 'Developer', } +/** Organization update input data */ export type OrganizationUpdateInput = { + /** Name of the organization */ name?: Maybe; }; +/** Pagination information */ export type PageInfo = { + /** Whether there's more pages to retrieve after this page */ hasNextPage: Scalars['Boolean']; + /** Whether there's more pages to retrieve before this page */ + hasPreviousPage: Scalars['Boolean']; + /** Id of the first object contained on the page */ startCursor?: Maybe; + /** Id of the last object contained on the page */ endCursor?: Maybe; }; +/** Marketing platform */ export enum Platform { + /** Facebook marketing platform */ Facebook = 'facebook', } +/** + * Product is a collection of data representing a + * single product associated with a specific catalog + * and vendor which can be used to generate + * dynamic ads via a marekting campaign + **/ export type Product = { + /** Id of the product */ id: Scalars['ObjectId']; + /** Date and time the product was created */ creationDate: Scalars['DateISO']; + /** Date and time the product was last modified */ lastChangeDate: Scalars['DateISO']; + /** Name of the product */ name: Scalars['NonEmptyString']; + /** Stock keeping unit of the product */ sku: Scalars['NonEmptyString']; + /** Data related to the product stored on the remote platform */ remoteState?: Maybe; + /** Marketing campaigns referenced by the product */ marketingCampaigns?: Maybe; + /** Product catalog containing the product */ catalog: Catalog; + /** Data related to the product */ metadata: Scalars['JSONObject']; + /** Vendor owning the product */ vendor: Vendor; + /** System status of the product */ systemStatus: SystemStatus; + /** Validation errors of the product */ errors?: Maybe>; + /** Validation warnings */ warnings?: Maybe>; }; +/** + * Product is a collection of data representing a + * single product associated with a specific catalog + * and vendor which can be used to generate + * dynamic ads via a marekting campaign + **/ export type ProductMarketingCampaignsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** Products collection */ export type ProductConnection = { + /** Collection of products */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Product in a collection */ export type ProductEdge = { + /** Id of the contained product */ cursor: Scalars['ObjectId']; + /** Container for a product */ node?: Maybe; }; +/** Product creation input */ export type ProductInput = { + /** Id of the vendor that owns the product */ vendorId: Scalars['ObjectId']; + /** Id of the product catalog containing the product */ catalogId: Scalars['ObjectId']; + /** Data related to the product */ metadata: Scalars['JSONObject']; }; +/** Product update input data */ export type ProductUpdateInput = { + /** Data related to the product */ metadata: Scalars['JSONObject']; }; export type Query = { + /** Returns a single campaign template identified by a given id */ campaignTemplate?: Maybe; + /** Returns a collection of campaign templates */ campaignTemplates?: Maybe; + /** Returns a single product catalog identified by a given id */ catalog?: Maybe; + /** Returns a collection of product catalogs */ catalogs?: Maybe; + /** Returns a single entitlement identified by a given id */ entitlement?: Maybe; + /** Returns a collection of entitlements */ entitlements?: Maybe; + /** Returns a single marketing ad identified by a given id */ marketingAd?: Maybe; + /** Returns a collection of marketing ads */ marketingAds?: Maybe; + /** Returns a single marketing campaign identified by a given id */ marketingCampaign?: Maybe; + /** Returns a collection of marketing campaigns */ marketingCampaigns?: Maybe; + /** Returns a single marketplace identified by a given id */ marketplace?: Maybe; + /** Returns a collection of marketplaces */ marketplaces?: Maybe; + /** Returns a single product catalog identified by a given id */ mediaChannel?: Maybe; + /** Returns a collection of media channels */ mediaChannels?: Maybe; + /** Returns a single organization identified by a given id */ organization?: Maybe; + /** Returns a collection of organizations */ organizations?: Maybe; + /** Returns a single product identified by a given id */ product?: Maybe; + /** Returns a collection of products */ products?: Maybe; + /** Returns a single result identified by a given id */ result?: Maybe; + /** Returns a collecton of results */ results?: Maybe; + /** Returns the user making this query */ me?: Maybe; + /** Returns a single vendor identified by a given id */ vendor?: Maybe; + /** Returns a collection of vendors */ vendors?: Maybe; }; @@ -834,8 +1332,11 @@ export type QueryCampaignTemplateArgs = { export type QueryCampaignTemplatesArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; export type QueryCatalogArgs = { @@ -844,8 +1345,11 @@ export type QueryCatalogArgs = { export type QueryCatalogsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; @@ -855,8 +1359,11 @@ export type QueryEntitlementArgs = { export type QueryEntitlementsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; export type QueryMarketingAdArgs = { @@ -865,8 +1372,11 @@ export type QueryMarketingAdArgs = { export type QueryMarketingAdsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; export type QueryMarketingCampaignArgs = { @@ -875,8 +1385,11 @@ export type QueryMarketingCampaignArgs = { export type QueryMarketingCampaignsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; @@ -886,8 +1399,11 @@ export type QueryMarketplaceArgs = { export type QueryMarketplacesArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; @@ -897,8 +1413,11 @@ export type QueryMediaChannelArgs = { export type QueryMediaChannelsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; @@ -908,8 +1427,11 @@ export type QueryOrganizationArgs = { export type QueryOrganizationsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; @@ -919,8 +1441,11 @@ export type QueryProductArgs = { export type QueryProductsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; @@ -930,8 +1455,11 @@ export type QueryResultArgs = { export type QueryResultsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; export type QueryVendorArgs = { @@ -940,161 +1468,298 @@ export type QueryVendorArgs = { export type QueryVendorsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** Refresh login input data */ export type RefreshTokenInput = { + /** Secondary token value */ refreshToken: Scalars['String']; }; +/** Result */ export type Result = { + /** Id of the result */ id: Scalars['ObjectId']; + /** Date and time the result was created */ creationDate: Scalars['DateISO']; + /** Date and time the result was last modified */ lastChangeDate: Scalars['DateISO']; + /** Date and time the result data was generated */ date: Scalars['DateISO']; + /** Analytics data related to the result */ analytics: ResultAnalytics; + /** Resource type related to the result */ type: ResultResourceTypeEnum; + /** Resource related to the result */ resource: ResultResource; + /** Vendor related to the result */ vendor: Vendor; }; +/** Analytics data referenced by a result */ export type ResultAnalytics = { + /** Number of results */ results?: Maybe; + /** Number of impressions */ impressions?: Maybe; + /** Number of clicks */ clicks?: Maybe; + /** Amount spent */ spend?: Maybe; }; +/** Results collection */ export type ResultConnection = { + /** Collection of results */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Result in a collection */ export type ResultEdge = { + /** Id of the contained result */ cursor: Scalars['ObjectId']; + /** Container for a result */ node?: Maybe; }; +/** Resource referenced by a result */ export type ResultResource = { + /** Id of the result resource */ id: Scalars['ObjectId']; + /** Date and time the result resource was created */ creationDate: Scalars['DateISO']; + /** Date and time the result resource was last modified */ lastChangeDate: Scalars['DateISO']; + /** Vendor related with the result resource */ vendor: Vendor; }; +/** Resource related to a result */ export enum ResultResourceTypeEnum { MarketingAd = 'MarketingAd', MarketingCampaign = 'MarketingCampaign', } +/** Sorting direction */ +export enum Sort_Order { + /** Ascending sort order */ + Asc = 'ASC', + /** Descending sort order */ + Desc = 'DESC', +} + +/** Sort input data */ +export type SortInput = { + /** Field that will be sorted in the specified direction */ + field?: Maybe; + /** Sorting direction */ + order?: Maybe; +}; + +/** System status */ export enum SystemStatus { + /** Awaiting an update */ Pending = 'PENDING', + /** Awaiting deletion */ PendingDeletion = 'PENDING_DELETION', + /** Awaiting synchronization */ PendingSync = 'PENDING_SYNC', + /** Being processed for an update */ Processing = 'PROCESSING', + /** Being processed for synchronization */ ProcessingSync = 'PROCESSING_SYNC', + /** Being processed for deletion */ ProcessingDeletion = 'PROCESSING_DELETION', + /** Already been processed */ Processed = 'PROCESSED', + /** Having errors */ Error = 'ERROR', + /** Marked as deleted */ Deleted = 'DELETED', } +/** Authentication token */ export type Token = { + /** Token value */ token: Scalars['String']; + /** Secondary token used to refresh authentication */ refreshToken: Scalars['String']; + /** Date and time the token will expire */ expiryDate: Scalars['DateISO']; + /** User the token was created for */ user: User; }; +/** Platform token processing status */ export enum TokenStatus { + /** Token submitted and awaiting processing */ Pending = 'PENDING', + /** Token not submitted */ Missing = 'MISSING', + /** Token successfully validated */ Valid = 'VALID', + /** Invalid token */ Invalid = 'INVALID', } +/** + * User of the system that is granted access to resources + * through entitlements + **/ export type User = { + /** Id of the user */ id: Scalars['ObjectId']; + /** Date and time the user was created */ creationDate: Scalars['DateISO']; + /** Date and time the user was last modified */ lastChangeDate: Scalars['DateISO']; + /** Email of the user */ email: Scalars['NonEmptyString']; + /** First name of the user */ firstName?: Maybe; + /** Last name of the user */ lastName?: Maybe; + /** Organizations the user is a member of */ organizations?: Maybe; + /** Entitlements granting permissions to the user */ entitlements?: Maybe; }; +/** + * User of the system that is granted access to resources + * through entitlements + **/ export type UserOrganizationsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** + * User of the system that is granted access to resources + * through entitlements + **/ export type UserEntitlementsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; }; +/** User collection */ export type UserConnection = { + /** Collection of users */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** User in a collection */ export type UserEdge = { + /** Id of the contained user */ cursor: Scalars['ObjectId']; + /** Container for a user */ node?: Maybe; }; +/** User login input data */ export type UserLoginInput = { + /** Password used for the login */ password: Scalars['NonEmptyString']; + /** Email used for the login */ email: Scalars['NonEmptyString']; }; +/** User update input data */ export type UserUpdateInput = { + /** First name of the user */ firstName?: Maybe; + /** Last name of the user */ lastName?: Maybe; + /** Password of the user */ password?: Maybe; + /** Email of the user */ email?: Maybe; }; +/** + * Vendor belongs to a marketplace and is granted access to specific + * products they can use to create a marketing campaign + **/ export type Vendor = { + /** Id of the vendor */ id: Scalars['ObjectId']; + /** Date and time the vendor was created */ creationDate: Scalars['DateISO']; + /** Date and time the vendor was last updated */ lastChangeDate: Scalars['DateISO']; + /** Name of the vendor */ name: Scalars['NonEmptyString']; + /** Marketplace referenced by the vendor */ marketplace: Marketplace; + /** Products related to the vendor */ products?: Maybe; + /** System status of the vendor */ systemStatus: SystemStatus; + /** Validation errors of the vendor */ errors?: Maybe>; }; +/** + * Vendor belongs to a marketplace and is granted access to specific + * products they can use to create a marketing campaign + **/ export type VendorProductsArgs = { filter?: Maybe; + sort?: Maybe; first?: Maybe; - after?: Maybe; + after?: Maybe; + last?: Maybe; + before?: Maybe; showDeleted?: Maybe; }; +/** Vendors collection */ export type VendorConnection = { + /** Collection of vendors */ edges?: Maybe>>; + /** Pagination information */ pageInfo: PageInfo; }; +/** Vendor in a collection */ export type VendorEdge = { + /** Id of the contained vendor */ cursor: Scalars['ObjectId']; + /** Container for a vendor */ node?: Maybe; }; +/** Vendor creation input data */ export type VendorInput = { + /** Name of the vendor */ name: Scalars['NonEmptyString']; + /** Id of the marketplace referenced by the vendor */ marketplaceId: Scalars['ObjectId']; }; +/** Vendor update input data */ export type VendorUpdateInput = { + /** Name of the vendor */ name?: Maybe; }; @@ -1214,6 +1879,8 @@ export type ResolversTypes = { JSONObject: ResolverTypeWrapper; Organization: ResolverTypeWrapper; FilterInput: ResolverTypeWrapper; + SortInput: SortInput; + SORT_ORDER: Sort_Order; Int: ResolverTypeWrapper; UserConnection: ResolverTypeWrapper; UserEdge: ResolverTypeWrapper; @@ -1309,6 +1976,8 @@ export type ResolversParentTypes = { JSONObject: Scalars['JSONObject']; Organization: Organization; FilterInput: Scalars['FilterInput']; + SortInput: SortInput; + SORT_ORDER: Sort_Order; Int: Scalars['Int']; UserConnection: UserConnection; UserEdge: UserEdge; @@ -2200,6 +2869,11 @@ export type PageInfoResolvers< ParentType extends ResolversParentTypes['PageInfo'] = ResolversParentTypes['PageInfo'] > = { hasNextPage?: Resolver; + hasPreviousPage?: Resolver< + ResolversTypes['Boolean'], + ParentType, + ContextType + >; startCursor?: Resolver< Maybe, ParentType, diff --git a/src/index.d.ts b/src/index.d.ts index cca8d63..49a271a 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -1,5 +1,5 @@ import { codes } from '@adgorithmics/graphql-errors'; -import { PageInfo, Scalars, Mutation, Query, UserLoginInput, UserUpdateInput, RefreshTokenInput, Organization, OrganizationInput, OrganizationUpdateInput, Marketplace, MarketplaceInput, MarketplaceUpdateInput, MediaChannel, MediaChannelCreateInput, MediaChannelUpdateInput, MediaChannelImportInput, CampaignTemplate, Vendor, VendorInput, VendorUpdateInput, Catalog, CatalogCreateInput, CatalogImportInput, CatalogUpdateInput, Product, ProductInput, ProductUpdateInput, MarketingCampaign, MarketingCampaignInput, MarketingCampaignUpdateInput, MarketingAd, Result, Entitlement, EntitlementInput, EntitlementUpdateInput } from './generated/graphql'; +import { PageInfo, Scalars, Mutation, Query, SortInput, UserLoginInput, UserUpdateInput, RefreshTokenInput, Organization, OrganizationInput, OrganizationUpdateInput, Marketplace, MarketplaceInput, MarketplaceUpdateInput, MediaChannel, MediaChannelCreateInput, MediaChannelUpdateInput, MediaChannelImportInput, CampaignTemplate, Vendor, VendorInput, VendorUpdateInput, Catalog, CatalogCreateInput, CatalogImportInput, CatalogUpdateInput, Product, ProductInput, ProductUpdateInput, MarketingCampaign, MarketingCampaignInput, MarketingCampaignUpdateInput, MarketingAd, Result, Entitlement, EntitlementInput, EntitlementUpdateInput } from './generated/graphql'; import { OrganizationFields, UserFields, MarketplaceFields, MediaChannelFields, CampaignTemplateFields, VendorFields, CatalogFields, ProductFields, MarketingCampaignFields, MarketingAdFields, ResultFields, EntitlementFields } from './inputFields'; export interface Config { url: string; @@ -22,73 +22,424 @@ export declare class Cinnamon { refreshToken: string; token: string; constructor(config: Config); - api(query: string, variables?: object, headers?: Headers, token?: string): Promise>; + api({ query, variables, headers, token, }: { + query: string; + variables: object; + headers?: Headers; + token?: string; + }): Promise>; allPages(fetchRelayConnection: (after: PageInfo['endCursor']) => Promise<{ - pageInfo?: PageInfo; - edges?: any; + pageInfo: PageInfo; + edges?: Array<{ + node?: T; + }>; }>): Promise; login(input: UserLoginInput): Promise; refreshLogin(input: RefreshTokenInput): Promise; - me(fields?: Array, headers?: Headers, token?: string): Promise; - updateUser(input: UserUpdateInput, fields?: Array, headers?: Headers, token?: string): Promise; - organization(id: Scalars['ObjectId'], fields?: Array, headers?: Headers, token?: string): Promise; - organizations(filter?: Scalars['FilterInput'], after?: PageInfo['endCursor'], fields?: Array, headers?: Headers, token?: string): Promise; - organizationsAll(filter?: Scalars['FilterInput'], fields?: Array, headers?: Headers, token?: string): Promise; - createOrganization(input: OrganizationInput, fields?: Array, headers?: Headers, token?: string): Promise; - updateOrganization(id: Scalars['ObjectId'], input: OrganizationUpdateInput, fields?: Array, headers?: Headers, token?: string): Promise; - marketplace(id: Scalars['ObjectId'], fields?: Array, headers?: Headers, token?: string): Promise; - marketplaces(filter?: Scalars['FilterInput'], after?: PageInfo['endCursor'], fields?: Array, headers?: Headers, token?: string): Promise; - marketplacesAll(filter?: Scalars['FilterInput'], fields?: Array, headers?: Headers, token?: string): Promise; - createMarketplace(input: MarketplaceInput, fields?: Array, headers?: Headers, token?: string): Promise; - updateMarketplace(id: Scalars['ObjectId'], input: MarketplaceUpdateInput, fields?: Array, headers?: Headers, token?: string): Promise; - deleteMarketplace(id: Scalars['ObjectId'], headers?: Headers, token?: string): Promise; - mediaChannel(id: Scalars['ObjectId'], fields?: Array, headers?: Headers, token?: string): Promise; - mediaChannels(filter?: Scalars['FilterInput'], after?: PageInfo['endCursor'], fields?: Array, headers?: Headers, token?: string): Promise; - mediaChannelsAll(filter?: Scalars['FilterInput'], fields?: Array, headers?: Headers, token?: string): Promise; - createMediaChannel(input: MediaChannelCreateInput, fields?: Array, headers?: Headers, token?: string): Promise; - importMediaChannel(input: MediaChannelImportInput, fields?: Array, headers?: Headers, token?: string): Promise; - updateMediaChannel(id: Scalars['ObjectId'], input: MediaChannelUpdateInput, fields?: Array, headers?: Headers, token?: string): Promise; - deleteMediaChannel(id: Scalars['ObjectId'], headers?: Headers, token?: string): Promise; - campaignTemplate(id: Scalars['ObjectId'], fields?: Array, headers?: Headers, token?: string): Promise; - campaignTemplates(filter?: Scalars['FilterInput'], after?: PageInfo['endCursor'], fields?: Array, headers?: Headers, token?: string): Promise; - campaignTemplatesAll(filter?: Scalars['FilterInput'], fields?: Array, headers?: Headers, token?: string): Promise; - vendor(id: Scalars['ObjectId'], fields?: Array, headers?: Headers, token?: string): Promise; - vendors(filter?: Scalars['FilterInput'], after?: PageInfo['endCursor'], fields?: Array, headers?: Headers, token?: string): Promise; - vendorsAll(filter?: Scalars['FilterInput'], fields?: Array, headers?: Headers, token?: string): Promise; - createVendor(input: VendorInput, fields?: Array, headers?: Headers, token?: string): Promise; - updateVendor(id: Scalars['ObjectId'], input: VendorUpdateInput, fields?: Array, headers?: Headers, token?: string): Promise; - deleteVendor(id: Scalars['ObjectId'], headers?: Headers, token?: string): Promise; - catalog(id: Scalars['ObjectId'], fields?: Array, headers?: Headers, token?: string): Promise; - catalogs(filter?: Scalars['FilterInput'], after?: PageInfo['endCursor'], fields?: Array, headers?: Headers, token?: string): Promise; - catalogsAll(filter?: Scalars['FilterInput'], fields?: Array, headers?: Headers, token?: string): Promise; - createCatalog(input: CatalogCreateInput, fields?: Array, headers?: Headers, token?: string): Promise; - importCatalog(input: CatalogImportInput, fields?: Array, headers?: Headers, token?: string): Promise; - updateCatalog(id: Scalars['ObjectId'], input: CatalogUpdateInput, fields?: Array, headers?: Headers, token?: string): Promise; - deleteCatalog(id: Scalars['ObjectId'], headers?: Headers, token?: string): Promise; - product(id: Scalars['ObjectId'], fields?: Array, headers?: Headers, token?: string): Promise; - products(filter?: Scalars['FilterInput'], after?: PageInfo['endCursor'], fields?: Array, headers?: Headers, token?: string): Promise; - productsAll(filter?: Scalars['FilterInput'], fields?: Array, headers?: Headers, token?: string): Promise; - createProduct(input: ProductInput, fields?: Array, headers?: Headers, token?: string): Promise; - updateProduct(id: Scalars['ObjectId'], input: ProductUpdateInput, fields?: Array, headers?: Headers, token?: string): Promise; - deleteProduct(id: Scalars['ObjectId'], headers?: Headers, token?: string): Promise; - marketingCampaign(id: Scalars['ObjectId'], fields?: Array, headers?: Headers, token?: string): Promise; - marketingCampaigns(filter?: Scalars['FilterInput'], after?: PageInfo['endCursor'], fields?: Array, headers?: Headers, token?: string): Promise; - marketingCampaignsAll(filter?: Scalars['FilterInput'], fields?: Array, headers?: Headers, token?: string): Promise; - createMarketingCampaign(input: MarketingCampaignInput, fields?: Array, headers?: Headers, token?: string): Promise; - updateMarketingCampaign(id: Scalars['ObjectId'], input: MarketingCampaignUpdateInput, fields?: Array, headers?: Headers, token?: string): Promise; - deleteMarketingCampaign(id: Scalars['ObjectId'], headers?: Headers, token?: string): Promise; - marketingAd(id: Scalars['ObjectId'], fields?: Array, headers?: Headers, token?: string): Promise; - marketingAds(filter?: Scalars['FilterInput'], after?: PageInfo['endCursor'], fields?: Array, headers?: Headers, token?: string): Promise; - marketingAdsAll(filter?: Scalars['FilterInput'], fields?: Array, headers?: Headers, token?: string): Promise; - result(id: Scalars['ObjectId'], fields?: Array, headers?: Headers, token?: string): Promise; - results(filter?: Scalars['FilterInput'], after?: PageInfo['endCursor'], fields?: Array, headers?: Headers, token?: string): Promise; - resultsAll(filter?: Scalars['FilterInput'], fields?: Array, headers?: Headers, token?: string): Promise; - entitlement(id: Scalars['ObjectId'], fields?: Array, headers?: Headers, token?: string): Promise; - entitlements(filter?: Scalars['FilterInput'], after?: PageInfo['endCursor'], fields?: Array, headers?: Headers, token?: string): Promise; - entitlementsAll(filter?: Scalars['FilterInput'], fields?: Array, headers?: Headers, token?: string): Promise; - createEntitlement(input: EntitlementInput, fields?: Array, headers?: Headers, token?: string): Promise; - updateEntitlement(id: Scalars['ObjectId'], input: EntitlementUpdateInput, fields?: Array, headers?: Headers, token?: string): Promise; - deleteEntitlement(id: Scalars['ObjectId'], headers?: Headers, token?: string): Promise; + me({ fields, headers, token, }?: { + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + updateUser({ input, fields, headers, token, }: { + input: UserUpdateInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + private defaultOrganizationFields; + organization({ id, fields, headers, token, }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + organizations({ filter, sort, after, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + organizationsAll({ filter, sort, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + createOrganization({ input, fields, headers, token, }: { + input: OrganizationInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + updateOrganization({ id, input, fields, headers, token, }: { + id: Scalars['ObjectId']; + input: OrganizationUpdateInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + private defaultMarketplaceFields; + marketplace({ id, fields, headers, token, }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + marketplaces({ filter, sort, after, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + marketplacesAll({ filter, sort, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + createMarketplace({ input, fields, headers, token, }: { + input: MarketplaceInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + updateMarketplace({ id, input, fields, headers, token, }: { + id: Scalars['ObjectId']; + input: MarketplaceUpdateInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + deleteMarketplace({ id, headers, token, }: { + id: Scalars['ObjectId']; + headers?: Headers; + token?: string; + }): Promise; + private defaultMediaChannelFields; + mediaChannel({ id, fields, headers, token, }: { + id: Scalars['ObjectId']; + fields: Array; + headers?: Headers; + token?: string; + }): Promise; + mediaChannels({ filter, sort, after, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + mediaChannelsAll({ filter, sort, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + createMediaChannel({ input, fields, headers, token, }: { + input: MediaChannelCreateInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + importMediaChannel({ input, fields, headers, token, }: { + input: MediaChannelImportInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + updateMediaChannel({ id, input, fields, headers, token, }: { + id: Scalars['ObjectId']; + input: MediaChannelUpdateInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + deleteMediaChannel({ id, headers, token, }: { + id: Scalars['ObjectId']; + headers?: Headers; + token?: string; + }): Promise; + private defaultCampaignTemplateFields; + campaignTemplate({ id, fields, headers, token, }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + campaignTemplates({ filter, sort, after, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + campaignTemplatesAll({ filter, sort, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + private defaultVendorFields; + vendor({ id, fields, headers, token, }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + vendors({ filter, sort, after, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + vendorsAll({ filter, sort, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + createVendor({ input, fields, headers, token, }: { + input: VendorInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + updateVendor({ id, input, fields, headers, token, }: { + id: Scalars['ObjectId']; + input: VendorUpdateInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + deleteVendor({ id, headers, token, }: { + id: Scalars['ObjectId']; + headers?: Headers; + token?: string; + }): Promise; + private defaultCatalogFields; + catalog({ id, fields, headers, token, }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + catalogs({ filter, sort, after, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + catalogsAll({ filter, sort, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + createCatalog({ input, fields, headers, token, }: { + input: CatalogCreateInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + importCatalog({ input, fields, headers, token, }: { + input: CatalogImportInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + updateCatalog({ id, input, fields, headers, token, }: { + id: Scalars['ObjectId']; + input: CatalogUpdateInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + deleteCatalog({ id, headers, token, }: { + id: Scalars['ObjectId']; + headers?: Headers; + token?: string; + }): Promise; + private defaultProductFields; + product({ id, fields, headers, token, }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + products({ filter, sort, after, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + productsAll({ filter, sort, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + createProduct({ input, fields, headers, token, }: { + input: ProductInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + updateProduct({ id, input, fields, headers, token, }: { + id: Scalars['ObjectId']; + input: ProductUpdateInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + deleteProduct({ id, headers, token, }: { + id: Scalars['ObjectId']; + headers?: Headers; + token?: string; + }): Promise; + private defaultMarketingCampaignFields; + marketingCampaign({ id, fields, headers, token, }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + marketingCampaigns({ filter, sort, after, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + marketingCampaignsAll({ filter, sort, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + createMarketingCampaign({ input, fields, headers, token, }: { + input: MarketingCampaignInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + updateMarketingCampaign({ id, input, fields, headers, token, }: { + id: Scalars['ObjectId']; + input: MarketingCampaignUpdateInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + deleteMarketingCampaign({ id, headers, token, }: { + id: Scalars['ObjectId']; + headers?: Headers; + token?: string; + }): Promise; + private defaultMarketingAdFields; + marketingAd({ id, fields, headers, token, }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + marketingAds({ filter, sort, after, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + marketingAdsAll({ filter, sort, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + private defaultResultFields; + result({ id, fields, headers, token, }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + results({ filter, sort, after, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + resultsAll({ filter, sort, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + private defaultEntitlementFields; + entitlement({ id, fields, headers, token, }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + entitlements({ filter, sort, after, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + entitlementsAll({ filter, sort, fields, headers, token, }?: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + createEntitlement({ input, fields, headers, token, }: { + input: EntitlementInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + updateEntitlement({ id, input, fields, headers, token, }: { + id: Scalars['ObjectId']; + input: EntitlementUpdateInput; + fields?: Array; + headers?: Headers; + token?: string; + }): Promise; + deleteEntitlement({ id, headers, token, }: { + id: Scalars['ObjectId']; + headers?: Headers; + token?: string; + }): Promise; } export * from './generated/graphql'; export * from './inputFields'; diff --git a/src/index.ts b/src/index.ts index 531edbe..dd7d374 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,6 +7,7 @@ import { Scalars, Mutation, Query, + SortInput, UserLoginInput, UserUpdateInput, RefreshTokenInput, @@ -84,12 +85,17 @@ export class Cinnamon { this.config = config; } - async api( - query: string, - variables: object = {}, - headers: Headers = {}, - token?: string, - ): Promise> { + async api({ + query, + variables = {}, + headers = {}, + token, + }: { + query: string; + variables: object; + headers?: Headers; + token?: string; + }): Promise> { const response = await fetch(this.config.url, { method: 'POST', headers: { @@ -111,7 +117,7 @@ export class Cinnamon { !token ) { await this.refreshLogin({ refreshToken: this.refreshToken }); - return this.api(query, variables, headers, token); + return this.api({ query, variables, headers, token }); } throw new Error( json.errors.map((error: Error) => error.message).join('\n'), @@ -124,20 +130,19 @@ export class Cinnamon { fetchRelayConnection: ( after: PageInfo['endCursor'], ) => Promise<{ - pageInfo?: PageInfo; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - edges?: any; + pageInfo: PageInfo; + edges?: Array<{ node?: T }>; }>, ) { const result: T[] = []; const getPage = async ( after: PageInfo['endCursor'] = '', ): Promise => { - const { edges, pageInfo } = await fetchRelayConnection(after); + const { edges = [], pageInfo } = await fetchRelayConnection(after); - result.push(...edges.map(({ node }: { node: T }) => node)); + edges.forEach(edge => edge.node && result.push(edge.node)); - if (pageInfo && pageInfo.hasNextPage) { + if (pageInfo.hasNextPage) { await getPage(pageInfo.endCursor); } }; @@ -150,8 +155,8 @@ export class Cinnamon { // #################################### async login(input: UserLoginInput) { - const result = (await this.api<'login'>( - `mutation($input: UserLoginInput!) { + const result = (await this.api<'login'>({ + query: `mutation($input: UserLoginInput!) { login(input: $input) { ${[ TokenFields.expiryDate, @@ -160,8 +165,8 @@ export class Cinnamon { ].join(' ')} } }`, - { input }, - )).data.login; + variables: { input }, + })).data.login; if (result.token && result.refreshToken) { this.token = result.token; @@ -172,8 +177,8 @@ export class Cinnamon { } async refreshLogin(input: RefreshTokenInput) { - const result = (await this.api<'refreshLogin'>( - `mutation($input: RefreshTokenInput!) { + const result = (await this.api<'refreshLogin'>({ + query: `mutation($input: RefreshTokenInput!) { refreshLogin(input: $input) { ${[ TokenFields.expiryDate, @@ -182,8 +187,8 @@ export class Cinnamon { ].join(' ')} } }`, - { input }, - )).data.refreshLogin; + variables: { input }, + })).data.refreshLogin; if (result.token && result.refreshToken) { this.token = result.token; @@ -193,89 +198,102 @@ export class Cinnamon { return result; } - async me( - fields: Array = [ - UserFields.id, - UserFields.email, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'me'>( - `query { + async me({ + fields = [UserFields.id, UserFields.email], + headers, + token, + }: { + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { + return (await this.api<'me'>({ + query: `query { me { ${fields.join(' ')} } }`, - {}, + variables: {}, headers, token, - )).data.me; - } - - async updateUser( - input: UserUpdateInput, - fields: Array = [ - UserFields.id, - UserFields.email, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'updateUser'>( - `mutation($input: UserUpdateInput!) { + })).data.me; + } + + async updateUser({ + input, + fields = [UserFields.id, UserFields.email], + headers, + token, + }: { + input: UserUpdateInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'updateUser'>({ + query: `mutation($input: UserUpdateInput!) { updateUser(input: $input) { ${fields.join(' ')} } }`, - { input }, + variables: { input }, headers, token, - )).data.updateUser; + })).data.updateUser; } // #################################### // Organization // #################################### - async organization( - id: Scalars['ObjectId'], - fields: Array = [ - OrganizationFields.id, - OrganizationFields.name, - OrganizationFields.systemStatus, - OrganizationFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'organization'>( - `query($id: ObjectId!) { + private defaultOrganizationFields = [ + OrganizationFields.id, + OrganizationFields.name, + OrganizationFields.systemStatus, + OrganizationFields.errors, + ]; + + async organization({ + id, + fields = this.defaultOrganizationFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'organization'>({ + query: `query($id: ObjectId!) { organization(id: $id) { ${fields.join(' ')} } }`, - { id }, + variables: { id }, headers, token, - )).data.organization; - } - - async organizations( - filter: Scalars['FilterInput'] = [], - after: PageInfo['endCursor'] = '', - fields: Array = [ - OrganizationFields.id, - OrganizationFields.name, - OrganizationFields.systemStatus, - OrganizationFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'organizations'>( - `query($filter: FilterInput, $after: ObjectId!) { - organizations(filter: $filter, after: $after) { + })).data.organization; + } + + async organizations({ + filter, + sort, + after, + fields = this.defaultOrganizationFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { + return (await this.api<'organizations'>({ + query: `query($filter: FilterInput, $sort: SortInput, $after: String) { + organizations(filter: $filter, sort: $sort, after: $after) { pageInfo { hasNextPage endCursor @@ -287,117 +305,130 @@ export class Cinnamon { } } }`, - { filter, after }, + variables: { filter, sort, after }, headers, token, - )).data.organizations; - } - - organizationsAll( - filter: Scalars['FilterInput'] = [], - fields: Array = [ - OrganizationFields.id, - OrganizationFields.name, - OrganizationFields.systemStatus, - OrganizationFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { + })).data.organizations; + } + + organizationsAll({ + filter, + sort, + fields = this.defaultOrganizationFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { return this.allPages((after: PageInfo['endCursor']) => - this.organizations(filter, after, fields, headers, token), + this.organizations({ filter, sort, after, fields, headers, token }), ); } - async createOrganization( - input: OrganizationInput, - fields: Array = [ - OrganizationFields.id, - OrganizationFields.name, - OrganizationFields.systemStatus, - OrganizationFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'createOrganization'>( - `mutation($input: OrganizationInput!) { + async createOrganization({ + input, + fields = this.defaultOrganizationFields, + headers, + token, + }: { + input: OrganizationInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'createOrganization'>({ + query: `mutation($input: OrganizationInput!) { createOrganization(input: $input) { ${fields.join(' ')} } }`, - { input }, + variables: { input }, headers, token, - )).data.createOrganization; - } - - async updateOrganization( - id: Scalars['ObjectId'], - input: OrganizationUpdateInput, - fields: Array = [ - OrganizationFields.id, - OrganizationFields.name, - OrganizationFields.systemStatus, - OrganizationFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'updateOrganization'>( - `mutation($id: ObjectId!, $input: OrganizationUpdateInput!) { + })).data.createOrganization; + } + + async updateOrganization({ + id, + input, + fields = this.defaultOrganizationFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + input: OrganizationUpdateInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'updateOrganization'>({ + query: `mutation($id: ObjectId!, $input: OrganizationUpdateInput!) { updateOrganization(id: $id, input: $input) { ${fields.join(' ')} } }`, - { id, input }, + variables: { id, input }, headers, token, - )).data.updateOrganization; + })).data.updateOrganization; } // #################################### // Marketplace // #################################### - async marketplace( - id: Scalars['ObjectId'], - fields: Array = [ - MarketplaceFields.id, - MarketplaceFields.name, - MarketplaceFields.systemStatus, - MarketplaceFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'marketplace'>( - `query($id: ObjectId!) { + private defaultMarketplaceFields = [ + MarketplaceFields.id, + MarketplaceFields.name, + MarketplaceFields.systemStatus, + MarketplaceFields.errors, + ]; + + async marketplace({ + id, + fields = this.defaultMarketplaceFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'marketplace'>({ + query: `query($id: ObjectId!) { marketplace(id: $id) { ${fields.join(' ')} } }`, - { id }, + variables: { id }, headers, token, - )).data.marketplace; - } - - async marketplaces( - filter: Scalars['FilterInput'] = [], - after: PageInfo['endCursor'] = '', - fields: Array = [ - MarketplaceFields.id, - MarketplaceFields.name, - MarketplaceFields.systemStatus, - MarketplaceFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'marketplaces'>( - `query($filter: FilterInput, $after: ObjectId!) { - marketplaces(filter: $filter, after: $after) { + })).data.marketplace; + } + + async marketplaces({ + filter, + sort, + after, + fields = this.defaultMarketplaceFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { + return (await this.api<'marketplaces'>({ + query: `query($filter: FilterInput, $sort: SortInput, $after: String) { + marketplaces(filter: $filter, sort: $sort, after: $after) { pageInfo { hasNextPage endCursor @@ -409,134 +440,151 @@ export class Cinnamon { } } }`, - { filter, after }, + variables: { filter, sort, after }, headers, token, - )).data.marketplaces; - } - - marketplacesAll( - filter: Scalars['FilterInput'] = [], - fields: Array = [ - MarketplaceFields.id, - MarketplaceFields.name, - MarketplaceFields.systemStatus, - MarketplaceFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { + })).data.marketplaces; + } + + marketplacesAll({ + filter, + sort, + fields = this.defaultMarketplaceFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { return this.allPages((after: PageInfo['endCursor']) => - this.marketplaces(filter, after, fields, headers, token), + this.marketplaces({ filter, sort, after, fields, headers, token }), ); } - async createMarketplace( - input: MarketplaceInput, - fields: Array = [ - MarketplaceFields.id, - MarketplaceFields.name, - MarketplaceFields.systemStatus, - MarketplaceFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'createMarketplace'>( - `mutation($input: MarketplaceInput!) { + async createMarketplace({ + input, + fields = this.defaultMarketplaceFields, + headers, + token, + }: { + input: MarketplaceInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'createMarketplace'>({ + query: `mutation($input: MarketplaceInput!) { createMarketplace(input: $input) { ${fields.join(' ')} } }`, - { input }, + variables: { input }, headers, token, - )).data.createMarketplace; - } - - async updateMarketplace( - id: Scalars['ObjectId'], - input: MarketplaceUpdateInput, - fields: Array = [ - MarketplaceFields.id, - MarketplaceFields.name, - MarketplaceFields.systemStatus, - MarketplaceFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'updateMarketplace'>( - `mutation($id: ObjectId!, $input: MarketplaceUpdateInput!) { + })).data.createMarketplace; + } + + async updateMarketplace({ + id, + input, + fields = this.defaultMarketplaceFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + input: MarketplaceUpdateInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'updateMarketplace'>({ + query: `mutation($id: ObjectId!, $input: MarketplaceUpdateInput!) { updateMarketplace(id: $id, input: $input) { ${fields.join(' ')} } }`, - { id, input }, + variables: { id, input }, headers, token, - )).data.updateMarketplace; - } - - async deleteMarketplace( - id: Scalars['ObjectId'], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'deleteMarketplace'>( - `mutation($id: ObjectId!) { + })).data.updateMarketplace; + } + + async deleteMarketplace({ + id, + headers, + token, + }: { + id: Scalars['ObjectId']; + headers?: Headers; + token?: string; + }) { + return (await this.api<'deleteMarketplace'>({ + query: `mutation($id: ObjectId!) { deleteMarketplace(id: $id) { id } }`, - { id }, + variables: { id }, headers, token, - )).data.deleteMarketplace; + })).data.deleteMarketplace; } // #################################### // MediaChannel // #################################### - async mediaChannel( - id: Scalars['ObjectId'], - fields: Array = [ - MediaChannelFields.id, - MediaChannelFields.name, - MediaChannelFields.systemStatus, - MediaChannelFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'mediaChannel'>( - `query($id: ObjectId!) { + private defaultMediaChannelFields = [ + MarketplaceFields.id, + MarketplaceFields.name, + MarketplaceFields.systemStatus, + MarketplaceFields.errors, + ]; + + async mediaChannel({ + id, + fields = this.defaultMediaChannelFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + fields: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'mediaChannel'>({ + query: `query($id: ObjectId!) { mediaChannel(id: $id) { ${fields.join(' ')} } }`, - { id }, + variables: { id }, headers, token, - )).data.mediaChannel; - } - - async mediaChannels( - filter: Scalars['FilterInput'] = [], - after: PageInfo['endCursor'] = '', - fields: Array = [ - MediaChannelFields.id, - MediaChannelFields.name, - MediaChannelFields.systemStatus, - MediaChannelFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'mediaChannels'>( - `query($filter: FilterInput, $after: ObjectId!) { - mediaChannels(filter: $filter, after: $after) { + })).data.mediaChannel; + } + + async mediaChannels({ + filter, + sort, + after, + fields = this.defaultMediaChannelFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { + return (await this.api<'mediaChannels'>({ + query: `query($filter: FilterInput, $sort: SortInput, $after: String) { + mediaChannels(filter: $filter, sort: $sort, after: $after) { pageInfo { hasNextPage endCursor @@ -548,153 +596,172 @@ export class Cinnamon { } } }`, - { filter, after }, + variables: { filter, sort, after }, headers, token, - )).data.mediaChannels; - } - - mediaChannelsAll( - filter: Scalars['FilterInput'] = [], - fields: Array = [ - MediaChannelFields.id, - MediaChannelFields.name, - MediaChannelFields.systemStatus, - MediaChannelFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { + })).data.mediaChannels; + } + + mediaChannelsAll({ + filter, + sort, + fields = this.defaultMediaChannelFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { return this.allPages((after: PageInfo['endCursor']) => - this.mediaChannels(filter, after, fields, headers, token), + this.mediaChannels({ filter, sort, after, fields, headers, token }), ); } - async createMediaChannel( - input: MediaChannelCreateInput, - fields: Array = [ - MediaChannelFields.id, - MediaChannelFields.name, - MediaChannelFields.systemStatus, - MediaChannelFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'createMediaChannel'>( - `mutation($input: MediaChannelCreateInput!) { + async createMediaChannel({ + input, + fields = this.defaultMediaChannelFields, + headers, + token, + }: { + input: MediaChannelCreateInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'createMediaChannel'>({ + query: `mutation($input: MediaChannelCreateInput!) { createMediaChannel(input: $input) { ${fields.join(' ')} } }`, - { input }, + variables: { input }, headers, token, - )).data.createMediaChannel; - } - - async importMediaChannel( - input: MediaChannelImportInput, - fields: Array = [ - MediaChannelFields.id, - MediaChannelFields.name, - MediaChannelFields.systemStatus, - MediaChannelFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'importMediaChannel'>( - `mutation($input: MediaChannelImportInput!) { + })).data.createMediaChannel; + } + + async importMediaChannel({ + input, + fields = this.defaultMediaChannelFields, + headers, + token, + }: { + input: MediaChannelImportInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'importMediaChannel'>({ + query: `mutation($input: MediaChannelImportInput!) { importMediaChannel(input: $input) { ${fields.join(' ')} } }`, - { input }, + variables: { input }, headers, token, - )).data.importMediaChannel; - } - - async updateMediaChannel( - id: Scalars['ObjectId'], - input: MediaChannelUpdateInput, - fields: Array = [ - MediaChannelFields.id, - MediaChannelFields.name, - MediaChannelFields.systemStatus, - MediaChannelFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'updateMediaChannel'>( - `mutation($id: ObjectId!, $input: MediaChannelUpdateInput!) { + })).data.importMediaChannel; + } + + async updateMediaChannel({ + id, + input, + fields = this.defaultMediaChannelFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + input: MediaChannelUpdateInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'updateMediaChannel'>({ + query: `mutation($id: ObjectId!, $input: MediaChannelUpdateInput!) { updateMediaChannel(id: $id, input: $input) { ${fields.join(' ')} } }`, - { id, input }, + variables: { id, input }, headers, token, - )).data.updateMediaChannel; - } - - async deleteMediaChannel( - id: Scalars['ObjectId'], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'deleteMediaChannel'>( - `mutation($id: ObjectId!) { + })).data.updateMediaChannel; + } + + async deleteMediaChannel({ + id, + headers, + token, + }: { + id: Scalars['ObjectId']; + headers?: Headers; + token?: string; + }) { + return (await this.api<'deleteMediaChannel'>({ + query: `mutation($id: ObjectId!) { deleteMediaChannel(id: $id) { id } }`, - { id }, + variables: { id }, headers, token, - )).data.deleteMediaChannel; + })).data.deleteMediaChannel; } // #################################### // CampaignTemplate // #################################### - async campaignTemplate( - id: Scalars['ObjectId'], - fields: Array = [ - CampaignTemplateFields.id, - CampaignTemplateFields.name, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'campaignTemplate'>( - `query($id: ObjectId!) { + private defaultCampaignTemplateFields = [ + CampaignTemplateFields.id, + CampaignTemplateFields.name, + ]; + + async campaignTemplate({ + id, + fields = this.defaultCampaignTemplateFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'campaignTemplate'>({ + query: `query($id: ObjectId!) { campaignTemplate(id: $id) { ${fields.join(' ')} } }`, - { id }, + variables: { id }, headers, token, - )).data.campaignTemplate; - } - - async campaignTemplates( - filter: Scalars['FilterInput'] = [], - after: PageInfo['endCursor'] = '', - fields: Array = [ - CampaignTemplateFields.id, - CampaignTemplateFields.name, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'campaignTemplates'>( - `query($filter: FilterInput, $after: ObjectId!) { - campaignTemplates(filter: $filter, after: $after) { + })).data.campaignTemplate; + } + + async campaignTemplates({ + filter, + sort, + after, + fields = this.defaultCampaignTemplateFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { + return (await this.api<'campaignTemplates'>({ + query: `query($filter: FilterInput, $sort: SortInput, $after: String) { + campaignTemplates(filter: $filter, sort: $sort, after: $after) { pageInfo { hasNextPage endCursor @@ -706,23 +773,34 @@ export class Cinnamon { } } }`, - { filter, after }, + variables: { filter, sort, after }, headers, token, - )).data.campaignTemplates; - } - - campaignTemplatesAll( - filter: Scalars['FilterInput'] = [], - fields: Array = [ - CampaignTemplateFields.id, - CampaignTemplateFields.name, - ], - headers: Headers = {}, - token?: string, - ) { + })).data.campaignTemplates; + } + + campaignTemplatesAll({ + filter, + sort, + fields = this.defaultCampaignTemplateFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { return this.allPages((after: PageInfo['endCursor']) => - this.campaignTemplates(filter, after, fields, headers, token), + this.campaignTemplates({ + filter, + sort, + after, + fields, + headers, + token, + }), ); } @@ -730,44 +808,54 @@ export class Cinnamon { // Vendor // #################################### - async vendor( - id: Scalars['ObjectId'], - fields: Array = [ - VendorFields.id, - VendorFields.name, - VendorFields.systemStatus, - VendorFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'vendor'>( - `query($id: ObjectId!) { + private defaultVendorFields = [ + VendorFields.id, + VendorFields.name, + VendorFields.systemStatus, + VendorFields.errors, + ]; + + async vendor({ + id, + fields = this.defaultVendorFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'vendor'>({ + query: `query($id: ObjectId!) { vendor(id: $id) { ${fields.join(' ')} } }`, - { id }, + variables: { id }, headers, token, - )).data.vendor; - } - - async vendors( - filter: Scalars['FilterInput'] = [], - after: PageInfo['endCursor'] = '', - fields: Array = [ - VendorFields.id, - VendorFields.name, - VendorFields.systemStatus, - VendorFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'vendors'>( - `query($filter: FilterInput, $after: ObjectId!) { - vendors(filter: $filter, after: $after) { + })).data.vendor; + } + + async vendors({ + filter, + sort, + after, + fields = this.defaultVendorFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { + return (await this.api<'vendors'>({ + query: `query($filter: FilterInput, $sort: SortInput, $after: String) { + vendors(filter: $filter, sort: $sort, after: $after) { pageInfo { hasNextPage endCursor @@ -779,136 +867,152 @@ export class Cinnamon { } } }`, - { filter, after }, + variables: { filter, sort, after }, headers, token, - )).data.vendors; - } - - vendorsAll( - filter: Scalars['FilterInput'] = [], - fields: Array = [ - VendorFields.id, - VendorFields.name, - VendorFields.systemStatus, - VendorFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { + })).data.vendors; + } + + vendorsAll({ + filter, + sort, + fields = this.defaultVendorFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { return this.allPages((after: PageInfo['endCursor']) => - this.vendors(filter, after, fields, headers, token), + this.vendors({ filter, sort, after, fields, headers, token }), ); } - async createVendor( - input: VendorInput, - fields: Array = [ - VendorFields.id, - VendorFields.name, - VendorFields.systemStatus, - VendorFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'createVendor'>( - `mutation($input: VendorInput!) { + async createVendor({ + input, + fields = this.defaultVendorFields, + headers, + token, + }: { + input: VendorInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'createVendor'>({ + query: `mutation($input: VendorInput!) { createVendor(input: $input) { ${fields.join(' ')} } }`, - { input }, + variables: { input }, headers, token, - )).data.createVendor; - } - - async updateVendor( - id: Scalars['ObjectId'], - input: VendorUpdateInput, - fields: Array = [ - VendorFields.id, - VendorFields.name, - VendorFields.systemStatus, - VendorFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'updateVendor'>( - `mutation($id: ObjectId!, $input: VendorUpdateInput!) { + })).data.createVendor; + } + + async updateVendor({ + id, + input, + fields = this.defaultVendorFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + input: VendorUpdateInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'updateVendor'>({ + query: `mutation($id: ObjectId!, $input: VendorUpdateInput!) { updateVendor(id: $id, input: $input) { ${fields.join(' ')} } }`, - { id, input }, + variables: { id, input }, headers, token, - )).data.updateVendor; - } - - async deleteVendor( - id: Scalars['ObjectId'], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'deleteVendor'>( - `mutation($id: ObjectId!) { + })).data.updateVendor; + } + + async deleteVendor({ + id, + headers, + token, + }: { + id: Scalars['ObjectId']; + headers?: Headers; + token?: string; + }) { + return (await this.api<'deleteVendor'>({ + query: `mutation($id: ObjectId!) { deleteVendor(id: $id) { id } }`, - { id }, + variables: { id }, headers, token, - )).data.deleteVendor; + })).data.deleteVendor; } // #################################### // Catalog // #################################### - async catalog( - id: Scalars['ObjectId'], - fields: Array = [ - CatalogFields.id, - CatalogFields.name, - CatalogFields.remoteId, - CatalogFields.systemStatus, - CatalogFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'catalog'>( - `query($id: ObjectId!) { + private defaultCatalogFields = [ + CatalogFields.id, + CatalogFields.name, + CatalogFields.remoteId, + CatalogFields.systemStatus, + CatalogFields.errors, + ]; + + async catalog({ + id, + fields = this.defaultCatalogFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'catalog'>({ + query: `query($id: ObjectId!) { catalog(id: $id) { ${fields.join(' ')} } }`, - { id }, + variables: { id }, headers, token, - )).data.catalog; - } - - async catalogs( - filter: Scalars['FilterInput'] = [], - after: PageInfo['endCursor'] = '', - fields: Array = [ - CatalogFields.id, - CatalogFields.name, - CatalogFields.remoteId, - CatalogFields.systemStatus, - CatalogFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'catalogs'>( - `query($filter: FilterInput, $after: ObjectId!) { - catalogs(filter: $filter, after: $after) { + })).data.catalog; + } + + async catalogs({ + filter, + sort, + after, + fields = this.defaultCatalogFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { + return (await this.api<'catalogs'>({ + query: `query($filter: FilterInput, $sort: SortInput, $after: String) { + catalogs(filter: $filter, sort: $sort, after: $after) { pageInfo { hasNextPage endCursor @@ -920,165 +1024,176 @@ export class Cinnamon { } } }`, - { filter, after }, + variables: { filter, sort, after }, headers, token, - )).data.catalogs; - } - - catalogsAll( - filter: Scalars['FilterInput'] = [], - fields: Array = [ - CatalogFields.id, - CatalogFields.name, - CatalogFields.remoteId, - CatalogFields.systemStatus, - CatalogFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { + })).data.catalogs; + } + + catalogsAll({ + filter, + sort, + fields = this.defaultCatalogFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { return this.allPages((after: PageInfo['endCursor']) => - this.catalogs(filter, after, fields, headers, token), + this.catalogs({ filter, sort, after, fields, headers, token }), ); } - async createCatalog( - input: CatalogCreateInput, - fields: Array = [ - CatalogFields.id, - CatalogFields.name, - CatalogFields.remoteId, - CatalogFields.systemStatus, - CatalogFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'createCatalog'>( - `mutation($input: CatalogCreateInput!) { + async createCatalog({ + input, + fields = this.defaultCatalogFields, + headers, + token, + }: { + input: CatalogCreateInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'createCatalog'>({ + query: `mutation($input: CatalogCreateInput!) { createCatalog(input: $input) { ${fields.join(' ')} } }`, - { input }, + variables: { input }, headers, token, - )).data.createCatalog; - } - - async importCatalog( - input: CatalogImportInput, - fields: Array = [ - CatalogFields.id, - CatalogFields.name, - CatalogFields.remoteId, - CatalogFields.systemStatus, - CatalogFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'createCatalog'>( - `mutation($input: CatalogImportInput!) { + })).data.createCatalog; + } + + async importCatalog({ + input, + fields = this.defaultCatalogFields, + headers, + token, + }: { + input: CatalogImportInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'createCatalog'>({ + query: `mutation($input: CatalogImportInput!) { createCatalog(input: $input) { ${fields.join(' ')} } }`, - { input }, + variables: { input }, headers, token, - )).data.createCatalog; - } - - async updateCatalog( - id: Scalars['ObjectId'], - input: CatalogUpdateInput, - fields: Array = [ - CatalogFields.id, - CatalogFields.name, - CatalogFields.remoteId, - CatalogFields.systemStatus, - CatalogFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'updateCatalog'>( - `mutation($id: ObjectId!, $input: CatalogUpdateInput!) { + })).data.createCatalog; + } + + async updateCatalog({ + id, + input, + fields = this.defaultCatalogFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + input: CatalogUpdateInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'updateCatalog'>({ + query: `mutation($id: ObjectId!, $input: CatalogUpdateInput!) { updateCatalog(id: $id, input: $input) { ${fields.join(' ')} } }`, - { id, input }, + variables: { id, input }, headers, token, - )).data.updateCatalog; - } - - async deleteCatalog( - id: Scalars['ObjectId'], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'deleteCatalog'>( - `mutation($id: ObjectId!) { + })).data.updateCatalog; + } + + async deleteCatalog({ + id, + headers, + token, + }: { + id: Scalars['ObjectId']; + headers?: Headers; + token?: string; + }) { + return (await this.api<'deleteCatalog'>({ + query: `mutation($id: ObjectId!) { deleteCatalog(id: $id) { id } }`, - { id }, + variables: { id }, headers, token, - )).data.deleteCatalog; + })).data.deleteCatalog; } // #################################### // Product // #################################### - async product( - id: Scalars['ObjectId'], - fields: Array = [ - ProductFields.id, - ProductFields.name, - ProductFields.sku, - ProductFields.systemStatus, - ProductFields.errors, - ProductFields.warnings, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'product'>( - `query($id: ObjectId!) { + private defaultProductFields = [ + ProductFields.id, + ProductFields.name, + ProductFields.sku, + ProductFields.systemStatus, + ProductFields.errors, + ProductFields.warnings, + ]; + + async product({ + id, + fields = this.defaultProductFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'product'>({ + query: `query($id: ObjectId!) { product(id: $id) { ${fields.join(' ')} } }`, - { id }, + variables: { id }, headers, token, - )).data.product; - } - - async products( - filter: Scalars['FilterInput'] = [], - after: PageInfo['endCursor'] = '', - fields: Array = [ - ProductFields.id, - ProductFields.name, - ProductFields.sku, - ProductFields.systemStatus, - ProductFields.errors, - ProductFields.warnings, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'products'>( - `query($filter: FilterInput, $after: ObjectId!) { - products(filter: $filter, after: $after) { + })).data.product; + } + + async products({ + filter, + sort, + after, + fields = this.defaultProductFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { + return (await this.api<'products'>({ + query: `query($filter: FilterInput, $sort: SortInput, $after: String) { + products(filter: $filter, sort: $sort, after: $after) { pageInfo { hasNextPage endCursor @@ -1090,140 +1205,151 @@ export class Cinnamon { } } }`, - { filter, after }, + variables: { filter, sort, after }, headers, token, - )).data.products; - } - - productsAll( - filter: Scalars['FilterInput'] = [], - fields: Array = [ - ProductFields.id, - ProductFields.name, - ProductFields.sku, - ProductFields.systemStatus, - ProductFields.errors, - ProductFields.warnings, - ], - headers: Headers = {}, - token?: string, - ) { + })).data.products; + } + + productsAll({ + filter, + sort, + fields = this.defaultProductFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { return this.allPages((after: PageInfo['endCursor']) => - this.products(filter, after, fields, headers, token), + this.products({ filter, sort, after, fields, headers, token }), ); } - async createProduct( - input: ProductInput, - fields: Array = [ - ProductFields.id, - ProductFields.name, - ProductFields.sku, - ProductFields.systemStatus, - ProductFields.errors, - ProductFields.warnings, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'createProduct'>( - `mutation($input: ProductInput!) { + async createProduct({ + input, + fields = this.defaultProductFields, + headers, + token, + }: { + input: ProductInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'createProduct'>({ + query: `mutation($input: ProductInput!) { createProduct(input: $input) { ${fields.join(' ')} } }`, - { input }, + variables: { input }, headers, token, - )).data.createProduct; - } - - async updateProduct( - id: Scalars['ObjectId'], - input: ProductUpdateInput, - fields: Array = [ - ProductFields.id, - ProductFields.name, - ProductFields.sku, - ProductFields.systemStatus, - ProductFields.errors, - ProductFields.warnings, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'updateProduct'>( - `mutation($id: ObjectId!, $input: ProductUpdateInput!) { + })).data.createProduct; + } + + async updateProduct({ + id, + input, + fields = this.defaultProductFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + input: ProductUpdateInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'updateProduct'>({ + query: `mutation($id: ObjectId!, $input: ProductUpdateInput!) { updateProduct(id: $id, input: $input) { ${fields.join(' ')} } }`, - { id, input }, + variables: { id, input }, headers, token, - )).data.updateProduct; - } - - async deleteProduct( - id: Scalars['ObjectId'], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'deleteProduct'>( - `mutation($id: ObjectId!) { + })).data.updateProduct; + } + + async deleteProduct({ + id, + headers, + token, + }: { + id: Scalars['ObjectId']; + headers?: Headers; + token?: string; + }) { + return (await this.api<'deleteProduct'>({ + query: `mutation($id: ObjectId!) { deleteProduct(id: $id) { id } }`, - { id }, + variables: { id }, headers, token, - )).data.deleteProduct; + })).data.deleteProduct; } // #################################### // MarketingCampaign // #################################### - async marketingCampaign( - id: Scalars['ObjectId'], - fields: Array = [ - MarketingCampaignFields.id, - MarketingCampaignFields.status, - MarketingCampaignFields.systemStatus, - MarketingCampaignFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'marketingCampaign'>( - `query($id: ObjectId!) { + private defaultMarketingCampaignFields = [ + MarketingCampaignFields.id, + MarketingCampaignFields.status, + MarketingCampaignFields.systemStatus, + MarketingCampaignFields.errors, + ]; + + async marketingCampaign({ + id, + fields = this.defaultMarketingCampaignFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'marketingCampaign'>({ + query: `query($id: ObjectId!) { marketingCampaign(id: $id) { ${fields.join(' ')} } }`, - { id }, + variables: { id }, headers, token, - )).data.marketingCampaign; - } - - async marketingCampaigns( - filter: Scalars['FilterInput'] = [], - after: PageInfo['endCursor'] = '', - fields: Array = [ - MarketingCampaignFields.id, - MarketingCampaignFields.status, - MarketingCampaignFields.systemStatus, - MarketingCampaignFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'marketingCampaigns'>( - `query($filter: FilterInput, $after: ObjectId!) { - marketingCampaigns(filter: $filter, after: $after) { + })).data.marketingCampaign; + } + + async marketingCampaigns({ + filter, + sort, + after, + fields = this.defaultMarketingCampaignFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { + return (await this.api<'marketingCampaigns'>({ + query: `query($filter: FilterInput, $sort: SortInput, $after: String) { + marketingCampaigns(filter: $filter, sort: $sort, after: $after) { pageInfo { hasNextPage endCursor @@ -1235,131 +1361,157 @@ export class Cinnamon { } } }`, - { filter, after }, + variables: { filter, sort, after }, headers, token, - )).data.marketingCampaigns; - } - - marketingCampaignsAll( - filter: Scalars['FilterInput'] = [], - fields: Array = [ - MarketingCampaignFields.id, - MarketingCampaignFields.status, - MarketingCampaignFields.systemStatus, - MarketingCampaignFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { + })).data.marketingCampaigns; + } + + marketingCampaignsAll({ + filter, + sort, + fields = this.defaultMarketingCampaignFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { return this.allPages( (after: PageInfo['endCursor']) => - this.marketingCampaigns(filter, after, fields, headers, token), + this.marketingCampaigns({ + filter, + sort, + after, + fields, + headers, + token, + }), ); } - async createMarketingCampaign( - input: MarketingCampaignInput, - fields: Array = [ - MarketingCampaignFields.id, - MarketingCampaignFields.status, - MarketingCampaignFields.systemStatus, - MarketingCampaignFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'createMarketingCampaign'>( - `mutation($input: MarketingCampaignInput!) { + async createMarketingCampaign({ + input, + fields = this.defaultMarketingCampaignFields, + headers, + token, + }: { + input: MarketingCampaignInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'createMarketingCampaign'>({ + query: `mutation($input: MarketingCampaignInput!) { createMarketingCampaign(input: $input) { ${fields.join(' ')} } }`, - { input }, + variables: { input }, headers, token, - )).data.createMarketingCampaign; - } - - async updateMarketingCampaign( - id: Scalars['ObjectId'], - input: MarketingCampaignUpdateInput, - fields: Array = [ - MarketingCampaignFields.id, - MarketingCampaignFields.status, - MarketingCampaignFields.systemStatus, - MarketingCampaignFields.errors, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'updateMarketingCampaign'>( - `mutation($id: ObjectId!, $input: MarketingCampaignUpdateInput!) { + })).data.createMarketingCampaign; + } + + async updateMarketingCampaign({ + id, + input, + fields = this.defaultMarketingCampaignFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + input: MarketingCampaignUpdateInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'updateMarketingCampaign'>({ + query: `mutation($id: ObjectId!, $input: MarketingCampaignUpdateInput!) { updateMarketingCampaign(id: $id, input: $input) { ${fields.join(' ')} } }`, - { id, input }, + variables: { id, input }, headers, token, - )).data.updateMarketingCampaign; - } - - async deleteMarketingCampaign( - id: Scalars['ObjectId'], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'deleteMarketingCampaign'>( - `mutation($id: ObjectId!) { + })).data.updateMarketingCampaign; + } + + async deleteMarketingCampaign({ + id, + headers, + token, + }: { + id: Scalars['ObjectId']; + headers?: Headers; + token?: string; + }) { + return (await this.api<'deleteMarketingCampaign'>({ + query: `mutation($id: ObjectId!) { deleteMarketingCampaign(id: $id) { id } }`, - { id }, + variables: { id }, headers, token, - )).data.deleteMarketingCampaign; + })).data.deleteMarketingCampaign; } // #################################### // MarketingAd // #################################### - async marketingAd( - id: Scalars['ObjectId'], - fields: Array = [ - MarketingAdFields.id, - MarketingAdFields.remoteId, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'marketingAd'>( - `query($id: ObjectId!) { + private defaultMarketingAdFields = [ + MarketingAdFields.id, + MarketingAdFields.remoteId, + ]; + + async marketingAd({ + id, + fields = this.defaultMarketingAdFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'marketingAd'>({ + query: `query($id: ObjectId!) { marketingAd(id: $id) { ${fields.join(' ')} } }`, - { id }, + variables: { id }, headers, token, - )).data.marketingAd; - } - - async marketingAds( - filter: Scalars['FilterInput'] = [], - after: PageInfo['endCursor'] = '', - fields: Array = [ - MarketingAdFields.id, - MarketingAdFields.remoteId, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'marketingAds'>( - `query($filter: FilterInput, $after: ObjectId!) { - marketingAds(filter: $filter, after: $after) { + })).data.marketingAd; + } + + async marketingAds({ + filter, + sort, + after, + fields = this.defaultMarketingAdFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { + return (await this.api<'marketingAds'>({ + query: `query($filter: FilterInput, $sort: SortInput, $after: String) { + marketingAds(filter: $filter, sort: $sort, after: $after) { pageInfo { hasNextPage endCursor @@ -1371,23 +1523,27 @@ export class Cinnamon { } } }`, - { filter, after }, + variables: { filter, sort, after }, headers, token, - )).data.marketingAds; - } - - marketingAdsAll( - filter: Scalars['FilterInput'] = [], - fields: Array = [ - MarketingAdFields.id, - MarketingAdFields.remoteId, - ], - headers: Headers = {}, - token?: string, - ) { + })).data.marketingAds; + } + + marketingAdsAll({ + filter, + sort, + fields = this.defaultMarketingAdFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { return this.allPages((after: PageInfo['endCursor']) => - this.marketingAds(filter, after, fields, headers, token), + this.marketingAds({ filter, sort, after, fields, headers, token }), ); } @@ -1395,42 +1551,53 @@ export class Cinnamon { // Result // #################################### - async result( - id: Scalars['ObjectId'], - fields: Array = [ - ResultFields.id, - ResultFields.date, - 'analytics {results}', - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'result'>( - `query($id: ObjectId!) { + private defaultResultFields = [ + ResultFields.id, + ResultFields.date, + 'analytics {results}', + ]; + + async result({ + id, + fields = this.defaultResultFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'result'>({ + query: `query($id: ObjectId!) { result(id: $id) { ${fields.join(' ')} } }`, - { id }, + variables: { id }, headers, token, - )).data.result; - } - - async results( - filter: Scalars['FilterInput'] = [], - after: PageInfo['endCursor'] = '', - fields: Array = [ - ResultFields.id, - ResultFields.date, - 'analytics {results}', - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'results'>( - `query($filter: FilterInput, $after: ObjectId!) { - results(filter: $filter, after: $after) { + })).data.result; + } + + async results({ + filter, + sort, + after, + fields = this.defaultResultFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { + return (await this.api<'results'>({ + query: `query($filter: FilterInput, $sort: SortInput, $after: String) { + results(filter: $filter, sort: $sort, after: $after) { pageInfo { hasNextPage endCursor @@ -1442,24 +1609,27 @@ export class Cinnamon { } } }`, - { filter, after }, + variables: { filter, sort, after }, headers, token, - )).data.results; - } - - resultsAll( - filter: Scalars['FilterInput'] = [], - fields: Array = [ - ResultFields.id, - ResultFields.date, - 'analytics {results}', - ], - headers: Headers = {}, - token?: string, - ) { + })).data.results; + } + + resultsAll({ + filter, + sort, + fields = this.defaultResultFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { return this.allPages((after: PageInfo['endCursor']) => - this.results(filter, after, fields, headers, token), + this.results({ filter, sort, after, fields, headers, token }), ); } @@ -1467,42 +1637,53 @@ export class Cinnamon { // Entitlement // #################################### - async entitlement( - id: Scalars['ObjectId'], - fields: Array = [ - EntitlementFields.id, - EntitlementFields.permissions, - EntitlementFields.type, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'entitlement'>( - `query($id: ObjectId!) { + private defaultEntitlementFields = [ + EntitlementFields.id, + EntitlementFields.permissions, + EntitlementFields.type, + ]; + + async entitlement({ + id, + fields = this.defaultEntitlementFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'entitlement'>({ + query: `query($id: ObjectId!) { entitlement(id: $id) { ${fields.join(' ')} } }`, - { id }, + variables: { id }, headers, token, - )).data.entitlement; - } - - async entitlements( - filter: Scalars['FilterInput'] = [], - after: PageInfo['endCursor'] = '', - fields: Array = [ - EntitlementFields.id, - EntitlementFields.permissions, - EntitlementFields.type, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'entitlements'>( - `query($filter: FilterInput, $after: ObjectId!) { - entitlements(filter: $filter, after: $after) { + })).data.entitlement; + } + + async entitlements({ + filter, + sort, + after, + fields = this.defaultEntitlementFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + after?: PageInfo['endCursor']; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { + return (await this.api<'entitlements'>({ + query: `query($filter: FilterInput, $sort: SortInput, $after: String) { + entitlements(filter: $filter, sort: $sort, after: $after) { pageInfo { hasNextPage endCursor @@ -1514,87 +1695,97 @@ export class Cinnamon { } } }`, - { filter, after }, + variables: { filter, sort, after }, headers, token, - )).data.entitlements; - } - - entitlementsAll( - filter: Scalars['FilterInput'] = [], - fields: Array = [ - EntitlementFields.id, - EntitlementFields.permissions, - EntitlementFields.type, - ], - headers: Headers = {}, - token?: string, - ) { + })).data.entitlements; + } + + entitlementsAll({ + filter, + sort, + fields = this.defaultEntitlementFields, + headers, + token, + }: { + filter?: Scalars['FilterInput']; + sort?: SortInput; + fields?: Array; + headers?: Headers; + token?: string; + } = {}) { return this.allPages((after: PageInfo['endCursor']) => - this.entitlements(filter, after, fields, headers, token), + this.entitlements({ filter, sort, after, fields, headers, token }), ); } - async createEntitlement( - input: EntitlementInput, - fields: Array = [ - EntitlementFields.id, - EntitlementFields.permissions, - EntitlementFields.type, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'createEntitlement'>( - `mutation($input: EntitlementInput!) { + async createEntitlement({ + input, + fields = this.defaultEntitlementFields, + headers, + token, + }: { + input: EntitlementInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'createEntitlement'>({ + query: `mutation($input: EntitlementInput!) { createEntitlement(input: $input) { ${fields.join(' ')} } }`, - { input }, + variables: { input }, headers, token, - )).data.createEntitlement; - } - - async updateEntitlement( - id: Scalars['ObjectId'], - input: EntitlementUpdateInput, - fields: Array = [ - EntitlementFields.id, - EntitlementFields.permissions, - EntitlementFields.type, - ], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'updateEntitlement'>( - `mutation($id: ObjectId!, $input: EntitlementUpdateInput!) { + })).data.createEntitlement; + } + + async updateEntitlement({ + id, + input, + fields = this.defaultEntitlementFields, + headers, + token, + }: { + id: Scalars['ObjectId']; + input: EntitlementUpdateInput; + fields?: Array; + headers?: Headers; + token?: string; + }) { + return (await this.api<'updateEntitlement'>({ + query: `mutation($id: ObjectId!, $input: EntitlementUpdateInput!) { updateEntitlement(id: $id, input: $input) { ${fields.join(' ')} } }`, - { id, input }, + variables: { id, input }, headers, token, - )).data.updateEntitlement; - } - - async deleteEntitlement( - id: Scalars['ObjectId'], - headers: Headers = {}, - token?: string, - ) { - return (await this.api<'deleteEntitlement'>( - `mutation($id: ObjectId!) { + })).data.updateEntitlement; + } + + async deleteEntitlement({ + id, + headers, + token, + }: { + id: Scalars['ObjectId']; + headers?: Headers; + token?: string; + }) { + return (await this.api<'deleteEntitlement'>({ + query: `mutation($id: ObjectId!) { deleteEntitlement(id: $id) { id } }`, - { id }, + variables: { id }, headers, token, - )).data.deleteEntitlement; + })).data.deleteEntitlement; } }