From 9a72dbe437ecd35f259a0db7aad604fc29a0b24d Mon Sep 17 00:00:00 2001 From: maxio-sdk Date: Fri, 13 Dec 2024 15:35:42 +0000 Subject: [PATCH 1/5] Automated commit message --- package.json | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index c8bedb9..4853456 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "lint": "eslint **/*.ts --ignore-path .eslintignore", "lint:fix": "eslint **/*.ts --ignore-path .eslintignore --fix" }, + "peerDependencies": {}, "prettier": { "printWidth": 80, "semi": true, @@ -32,20 +33,20 @@ "email": "maxio-sdk@maxio.com" }, "devDependencies": { - "@types/jest": "^29.5.14", - "@typescript-eslint/eslint-plugin": "^5.62.0", - "@typescript-eslint/parser": "^5.62.0", - "eslint": "^8.57.1", - "jest": "^29.7.0", - "ts-jest": "^29.2.5", - "tslib": "^2.8.1", + "@types/jest": "^29.4.0", + "@typescript-eslint/eslint-plugin": "^5.52.0", + "@typescript-eslint/parser": "^5.52.0", + "eslint": "^8.34.0", + "jest": "^29.4.3", + "ts-jest": "^29.0.5", + "tslib": "^2.5.0", "typescript": "^4.9.5" }, "dependencies": { - "@apimatic/authentication-adapters": "^0.5.6", - "@apimatic/axios-client-adapter": "^0.3.8", - "@apimatic/core": "^0.10.17", - "@apimatic/schema": "^0.7.15" + "@apimatic/authentication-adapters": "^0.5.4", + "@apimatic/axios-client-adapter": "^0.3.7", + "@apimatic/core": "^0.10.16", + "@apimatic/schema": "^0.7.14" }, "repository": { "type": "git", From 221622b52f81dcd2d83d1f57b76a718236b10aa2 Mon Sep 17 00:00:00 2001 From: maxio-sdk Date: Tue, 7 Jan 2025 09:42:33 +0000 Subject: [PATCH 2/5] Automated commit message --- LICENSE | 2 +- README.md | 78 +++++++++--------- package.json | 2 +- src/client.ts | 2 +- src/controllers/aPIExportsController.ts | 14 ++-- src/controllers/billingPortalController.ts | 4 +- .../componentPricePointsController.ts | 18 ++--- src/controllers/componentsController.ts | 40 +++++----- src/controllers/couponsController.ts | 34 ++++---- src/controllers/customFieldsController.ts | 41 +++++----- src/controllers/customersController.ts | 22 ++--- .../eventsBasedBillingSegmentsController.ts | 8 +- src/controllers/eventsController.ts | 40 +++++----- src/controllers/insightsController.ts | 24 +++--- src/controllers/invoicesController.ts | 80 ++++++++++--------- src/controllers/offersController.ts | 8 +- src/controllers/paymentProfilesController.ts | 8 +- src/controllers/productFamiliesController.ts | 32 ++++---- .../productPricePointsController.ts | 20 ++--- src/controllers/productsController.ts | 22 ++--- src/controllers/proformaInvoicesController.ts | 40 +++++----- src/controllers/reasonCodesController.ts | 6 +- src/controllers/referralCodesController.ts | 4 +- src/controllers/salesCommissionsController.ts | 20 ++--- src/controllers/sitesController.ts | 8 +- .../subscriptionComponentsController.ts | 62 +++++++------- ...bscriptionGroupInvoiceAccountController.ts | 8 +- .../subscriptionGroupsController.ts | 13 ++- .../subscriptionInvoiceAccountController.ts | 8 +- .../subscriptionNotesController.ts | 6 +- .../subscriptionStatusController.ts | 5 +- src/controllers/subscriptionsController.ts | 47 ++++++----- src/controllers/webhooksController.ts | 16 ++-- 33 files changed, 385 insertions(+), 357 deletions(-) diff --git a/LICENSE b/LICENSE index b9181f7..b85cedd 100644 --- a/LICENSE +++ b/LICENSE @@ -3,7 +3,7 @@ License: The MIT License (MIT) http://opensource.org/licenses/MIT -Copyright (c) 2014 - 2024 APIMATIC Limited +Copyright (c) 2014 - 2025 APIMATIC Limited Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 0ceccb1..1d27987 100644 --- a/README.md +++ b/README.md @@ -30,14 +30,14 @@ curl -u :x -H Accept:application/json -H Content-Type:application/json Run the following command from your project directory to install the package from npm: ```bash -npm install @maxio-com/advanced-billing-sdk@6.0.0 +npm install @maxio-com/advanced-billing-sdk@6.0.1 ``` -For additional package details, see the [Npm page for the @maxio-com/advanced-billing-sdk@6.0.0 npm](https://www.npmjs.com/package/@maxio-com/advanced-billing-sdk/v/6.0.0). +For additional package details, see the [Npm page for the @maxio-com/advanced-billing-sdk@6.0.1 npm](https://www.npmjs.com/package/@maxio-com/advanced-billing-sdk/v/6.0.1). ## Initialize the API Client -**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/client.md) +**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/client.md) The following parameters are configurable for the API Client: @@ -48,7 +48,7 @@ The following parameters are configurable for the API Client: | `timeout` | `number` | Timeout for API calls.
*Default*: `120000` | | `httpClientOptions` | `Partial` | Stable configurable http client options. | | `unstableHttpClientOptions` | `any` | Unstable configurable http client options. | -| `basicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/auth/basic-authentication.md) | The credential object for basicAuth | +| `basicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/auth/basic-authentication.md) | The credential object for basicAuth | ### HttpClientOptions @@ -100,45 +100,45 @@ The SDK can be configured to use a different environment for making API calls. A This API uses the following authentication schemes. -* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/auth/basic-authentication.md) +* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/auth/basic-authentication.md) ## List of APIs -* [API Exports](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/api-exports.md) -* [Advance Invoice](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/advance-invoice.md) -* [Billing Portal](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/billing-portal.md) -* [Component Price Points](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/component-price-points.md) -* [Custom Fields](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/custom-fields.md) -* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/events-based-billing-segments.md) -* [Payment Profiles](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/payment-profiles.md) -* [Product Families](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/product-families.md) -* [Product Price Points](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/product-price-points.md) -* [Proforma Invoices](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/proforma-invoices.md) -* [Reason Codes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/reason-codes.md) -* [Referral Codes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/referral-codes.md) -* [Sales Commissions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/sales-commissions.md) -* [Subscription Components](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/subscription-components.md) -* [Subscription Groups](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/subscription-groups.md) -* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/subscription-group-invoice-account.md) -* [Subscription Group Status](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/subscription-group-status.md) -* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/subscription-invoice-account.md) -* [Subscription Notes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/subscription-notes.md) -* [Subscription Products](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/subscription-products.md) -* [Subscription Status](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/subscription-status.md) -* [Coupons](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/coupons.md) -* [Components](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/components.md) -* [Customers](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/customers.md) -* [Events](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/events.md) -* [Insights](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/insights.md) -* [Invoices](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/invoices.md) -* [Offers](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/offers.md) -* [Products](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/products.md) -* [Sites](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/sites.md) -* [Subscriptions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/subscriptions.md) -* [Webhooks](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/controllers/webhooks.md) +* [API Exports](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/api-exports.md) +* [Advance Invoice](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/advance-invoice.md) +* [Billing Portal](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/billing-portal.md) +* [Component Price Points](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/component-price-points.md) +* [Custom Fields](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/custom-fields.md) +* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/events-based-billing-segments.md) +* [Payment Profiles](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/payment-profiles.md) +* [Product Families](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/product-families.md) +* [Product Price Points](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/product-price-points.md) +* [Proforma Invoices](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/proforma-invoices.md) +* [Reason Codes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/reason-codes.md) +* [Referral Codes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/referral-codes.md) +* [Sales Commissions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/sales-commissions.md) +* [Subscription Components](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/subscription-components.md) +* [Subscription Groups](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/subscription-groups.md) +* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/subscription-group-invoice-account.md) +* [Subscription Group Status](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/subscription-group-status.md) +* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/subscription-invoice-account.md) +* [Subscription Notes](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/subscription-notes.md) +* [Subscription Products](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/subscription-products.md) +* [Subscription Status](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/subscription-status.md) +* [Coupons](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/coupons.md) +* [Components](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/components.md) +* [Customers](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/customers.md) +* [Events](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/events.md) +* [Insights](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/insights.md) +* [Invoices](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/invoices.md) +* [Offers](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/offers.md) +* [Products](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/products.md) +* [Sites](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/sites.md) +* [Subscriptions](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/subscriptions.md) +* [Webhooks](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/controllers/webhooks.md) ## Classes Documentation -* [ApiResponse](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/api-response.md) -* [ApiError](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.0/doc/api-error.md) +* [ApiResponse](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/api-response.md) +* [ApiError](https://www.github.com/maxio-com/ab-typescript-sdk/tree/6.0.1/doc/api-error.md) diff --git a/package.json b/package.json index 4853456..4c7122c 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "6.0.0", + "version": "6.0.1", "license": "MIT", "sideEffects": false, "main": "dist/cjs/index.js", diff --git a/src/client.ts b/src/client.ts index 6fdd8fb..df00331 100644 --- a/src/client.ts +++ b/src/client.ts @@ -51,7 +51,7 @@ export class Client implements ClientInterface { ? this._config.httpClientOptions.timeout : this._config.timeout; this._userAgent = updateUserAgent( - 'AB SDK TypeScript:6.0.0 on OS {os-info}' + 'AB SDK TypeScript:6.0.1 on OS {os-info}' ); this._requestBuilderFactory = createRequestHandlerFactory( (server) => getBaseUri(server, this._config), diff --git a/src/controllers/aPIExportsController.ts b/src/controllers/aPIExportsController.ts index 17a9596..30d4366 100644 --- a/src/controllers/aPIExportsController.ts +++ b/src/controllers/aPIExportsController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { BatchJobResponse, batchJobResponseSchema, @@ -57,8 +57,8 @@ export class APIExportsController extends BaseController { perPage: [perPage, optional(number())], page: [page, optional(number())], }); - req.query('per_page', mapped.perPage); - req.query('page', mapped.page); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('page', mapped.page, commaPrefix); req.appendTemplatePath`/api_exports/proforma_invoices/${mapped.batchId}/rows.json`; req.throwOn(404, ApiError, true, "Not Found:'{$response.body}'"); req.authenticate([{ basicAuth: true }]); @@ -100,8 +100,8 @@ export class APIExportsController extends BaseController { perPage: [perPage, optional(number())], page: [page, optional(number())], }); - req.query('per_page', mapped.perPage); - req.query('page', mapped.page); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('page', mapped.page, commaPrefix); req.appendTemplatePath`/api_exports/invoices/${mapped.batchId}/rows.json`; req.throwOn(404, ApiError, true, "Not Found:'{$response.body}'"); req.authenticate([{ basicAuth: true }]); @@ -144,8 +144,8 @@ export class APIExportsController extends BaseController { perPage: [perPage, optional(number())], page: [page, optional(number())], }); - req.query('per_page', mapped.perPage); - req.query('page', mapped.page); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('page', mapped.page, commaPrefix); req.appendTemplatePath`/api_exports/subscriptions/${mapped.batchId}/rows.json`; req.throwOn(404, ApiError, true, "Not Found:'{$response.body}'"); req.authenticate([{ basicAuth: true }]); diff --git a/src/controllers/billingPortalController.ts b/src/controllers/billingPortalController.ts index 87b5aca..d23a5a7 100644 --- a/src/controllers/billingPortalController.ts +++ b/src/controllers/billingPortalController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { AutoInvite, autoInviteSchema } from '../models/autoInvite'; import { CustomerResponse, @@ -71,7 +71,7 @@ export class BillingPortalController extends BaseController { customerId: [customerId, number()], autoInvite: [autoInvite, optional(autoInviteSchema)], }); - req.query('auto_invite', mapped.autoInvite); + req.query('auto_invite', mapped.autoInvite, commaPrefix); req.appendTemplatePath`/portal/customers/${mapped.customerId}/enable.json`; req.throwOn( 422, diff --git a/src/controllers/componentPricePointsController.ts b/src/controllers/componentPricePointsController.ts index 4ad1039..fda135a 100644 --- a/src/controllers/componentPricePointsController.ts +++ b/src/controllers/componentPricePointsController.ts @@ -199,9 +199,9 @@ export class ComponentPricePointsController extends BaseController { perPage: [perPage, optional(number())], filterType: [filterType, optional(array(pricePointTypeSchema))], }); - req.query('currency_prices', mapped.currencyPrices); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); + req.query('currency_prices', mapped.currencyPrices, commaPrefix); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); req.query('filter[type]', mapped.filterType, commaPrefix); req.appendTemplatePath`/components/${mapped.componentId}/price_points.json`; req.authenticate([{ basicAuth: true }]); @@ -313,7 +313,7 @@ export class ComponentPricePointsController extends BaseController { pricePointId: [pricePointId, readComponentPricePointPricePointIdSchema], currencyPrices: [currencyPrices, optional(boolean())], }); - req.query('currency_prices', mapped.currencyPrices); + req.query('currency_prices', mapped.currencyPrices, commaPrefix); req.appendTemplatePath`/components/${mapped.componentId}/price_points/${mapped.pricePointId}.json`; req.authenticate([{ basicAuth: true }]); return req.callAsJson(componentPricePointResponseSchema, requestOptions); @@ -501,11 +501,11 @@ export class ComponentPricePointsController extends BaseController { direction: [direction, optional(sortingDirectionSchema)], filter: [filter, optional(listPricePointsFilterSchema)], }); - req.query('include', mapped.include); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('direction', mapped.direction); - req.query('filter', mapped.filter); + req.query('include', mapped.include, commaPrefix); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('direction', mapped.direction, commaPrefix); + req.query('filter', mapped.filter, commaPrefix); req.throwOn( 422, ErrorListResponseError, diff --git a/src/controllers/componentsController.ts b/src/controllers/componentsController.ts index 33fb156..672070c 100644 --- a/src/controllers/componentsController.ts +++ b/src/controllers/componentsController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { BasicDateField, basicDateFieldSchema } from '../models/basicDateField'; import { Component, componentSchema } from '../models/component'; import { @@ -278,7 +278,7 @@ export class ComponentsController extends BaseController { ): Promise> { const req = this.createRequest('GET', '/components/lookup.json'); const mapped = req.prepareArgs({ handle: [handle, string()] }); - req.query('handle', mapped.handle); + req.query('handle', mapped.handle, commaPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson(componentResponseSchema, requestOptions); } @@ -453,15 +453,15 @@ export class ComponentsController extends BaseController { perPage: [perPage, optional(number())], filter: [filter, optional(listComponentsFilterSchema)], }); - req.query('date_field', mapped.dateField); - req.query('start_date', mapped.startDate); - req.query('end_date', mapped.endDate); - req.query('start_datetime', mapped.startDatetime); - req.query('end_datetime', mapped.endDatetime); - req.query('include_archived', mapped.includeArchived); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('filter', mapped.filter); + req.query('date_field', mapped.dateField, commaPrefix); + req.query('start_date', mapped.startDate, commaPrefix); + req.query('end_date', mapped.endDate, commaPrefix); + req.query('start_datetime', mapped.startDatetime, commaPrefix); + req.query('end_datetime', mapped.endDatetime, commaPrefix); + req.query('include_archived', mapped.includeArchived, commaPrefix); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('filter', mapped.filter, commaPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson(array(componentResponseSchema), requestOptions); } @@ -580,15 +580,15 @@ export class ComponentsController extends BaseController { startDate: [startDate, optional(string())], startDatetime: [startDatetime, optional(string())], }); - req.query('include_archived', mapped.includeArchived); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('filter', mapped.filter); - req.query('date_field', mapped.dateField); - req.query('end_date', mapped.endDate); - req.query('end_datetime', mapped.endDatetime); - req.query('start_date', mapped.startDate); - req.query('start_datetime', mapped.startDatetime); + req.query('include_archived', mapped.includeArchived, commaPrefix); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('filter', mapped.filter, commaPrefix); + req.query('date_field', mapped.dateField, commaPrefix); + req.query('end_date', mapped.endDate, commaPrefix); + req.query('end_datetime', mapped.endDatetime, commaPrefix); + req.query('start_date', mapped.startDate, commaPrefix); + req.query('start_datetime', mapped.startDatetime, commaPrefix); req.appendTemplatePath`/product_families/${mapped.productFamilyId}/components.json`; req.authenticate([{ basicAuth: true }]); return req.callAsJson(array(componentResponseSchema), requestOptions); diff --git a/src/controllers/couponsController.ts b/src/controllers/couponsController.ts index 4d18662..569b1ee 100644 --- a/src/controllers/couponsController.ts +++ b/src/controllers/couponsController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { CouponCurrencyRequest, couponCurrencyRequestSchema, @@ -136,10 +136,10 @@ export class CouponsController extends BaseController { filter: [filter, optional(listCouponsFilterSchema)], currencyPrices: [currencyPrices, optional(boolean())], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('filter', mapped.filter); - req.query('currency_prices', mapped.currencyPrices); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('filter', mapped.filter, commaPrefix); + req.query('currency_prices', mapped.currencyPrices, commaPrefix); req.appendTemplatePath`/product_families/${mapped.productFamilyId}/coupons.json`; req.authenticate([{ basicAuth: true }]); return req.callAsJson(array(couponResponseSchema), requestOptions); @@ -172,9 +172,9 @@ export class CouponsController extends BaseController { code: [code, optional(string())], currencyPrices: [currencyPrices, optional(boolean())], }); - req.query('product_family_id', mapped.productFamilyId); - req.query('code', mapped.code); - req.query('currency_prices', mapped.currencyPrices); + req.query('product_family_id', mapped.productFamilyId, commaPrefix); + req.query('code', mapped.code, commaPrefix); + req.query('currency_prices', mapped.currencyPrices, commaPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson(couponResponseSchema, requestOptions); } @@ -211,7 +211,7 @@ export class CouponsController extends BaseController { couponId: [couponId, number()], currencyPrices: [currencyPrices, optional(boolean())], }); - req.query('currency_prices', mapped.currencyPrices); + req.query('currency_prices', mapped.currencyPrices, commaPrefix); req.appendTemplatePath`/product_families/${mapped.productFamilyId}/coupons/${mapped.couponId}.json`; req.authenticate([{ basicAuth: true }]); return req.callAsJson(couponResponseSchema, requestOptions); @@ -330,10 +330,10 @@ export class CouponsController extends BaseController { filter: [filter, optional(listCouponsFilterSchema)], currencyPrices: [currencyPrices, optional(boolean())], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('filter', mapped.filter); - req.query('currency_prices', mapped.currencyPrices); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('filter', mapped.filter, commaPrefix); + req.query('currency_prices', mapped.currencyPrices, commaPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson(array(couponResponseSchema), requestOptions); } @@ -406,8 +406,8 @@ export class CouponsController extends BaseController { code: [code, string()], productFamilyId: [productFamilyId, optional(number())], }); - req.query('code', mapped.code); - req.query('product_family_id', mapped.productFamilyId); + req.query('code', mapped.code, commaPrefix); + req.query('product_family_id', mapped.productFamilyId, commaPrefix); req.throwOn(404, SingleStringErrorResponseError, 'Not Found'); req.authenticate([{ basicAuth: true }]); return req.callAsJson(couponResponseSchema, requestOptions); @@ -552,8 +552,8 @@ export class CouponsController extends BaseController { page: [page, optional(number())], perPage: [perPage, optional(number())], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); req.appendTemplatePath`/coupons/${mapped.couponId}/codes.json`; req.authenticate([{ basicAuth: true }]); return req.callAsJson(couponSubcodesSchema, requestOptions); diff --git a/src/controllers/customFieldsController.ts b/src/controllers/customFieldsController.ts index 34e259a..4c428e8 100644 --- a/src/controllers/customFieldsController.ts +++ b/src/controllers/customFieldsController.ts @@ -4,7 +4,12 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions, unindexedPrefix } from '../core'; +import { + ApiResponse, + commaPrefix, + RequestOptions, + unindexedPrefix, +} from '../core'; import { BasicDateField, basicDateFieldSchema } from '../models/basicDateField'; import { CreateMetadataRequest, @@ -156,10 +161,10 @@ export class CustomFieldsController extends BaseController { perPage: [perPage, optional(number())], direction: [direction, optional(sortingDirectionSchema)], }); - req.query('name', mapped.name); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('direction', mapped.direction); + req.query('name', mapped.name, commaPrefix); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('direction', mapped.direction, commaPrefix); req.appendTemplatePath`/${mapped.resourceType}/metafields.json`; req.authenticate([{ basicAuth: true }]); return req.callAsJson(listMetafieldsResponseSchema, requestOptions); @@ -216,7 +221,7 @@ export class CustomFieldsController extends BaseController { resourceType: [resourceType, resourceTypeSchema], name: [name, optional(string())], }); - req.query('name', mapped.name); + req.query('name', mapped.name, commaPrefix); req.appendTemplatePath`/${mapped.resourceType}/metafields.json`; req.throwOn(404, ApiError, true, "Not Found:'{$response.body}'"); req.authenticate([{ basicAuth: true }]); @@ -332,8 +337,8 @@ export class CustomFieldsController extends BaseController { page: [page, optional(number())], perPage: [perPage, optional(number())], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); req.appendTemplatePath`/${mapped.resourceType}/${mapped.resourceId}/metadata.json`; req.authenticate([{ basicAuth: true }]); return req.callAsJson(paginatedMetadataSchema, requestOptions); @@ -421,7 +426,7 @@ export class CustomFieldsController extends BaseController { name: [name, optional(string())], names: [names, optional(array(string()))], }); - req.query('name', mapped.name); + req.query('name', mapped.name, unindexedPrefix); req.query('names', mapped.names, unindexedPrefix); req.appendTemplatePath`/${mapped.resourceType}/${mapped.resourceId}/metadata.json`; req.throwOn(404, ApiError, true, "Not Found:'{$response.body}'"); @@ -522,16 +527,16 @@ export class CustomFieldsController extends BaseController { resourceIds: [resourceIds, optional(array(number()))], direction: [direction, optional(sortingDirectionSchema)], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('date_field', mapped.dateField); - req.query('start_date', mapped.startDate); - req.query('end_date', mapped.endDate); - req.query('start_datetime', mapped.startDatetime); - req.query('end_datetime', mapped.endDatetime); - req.query('with_deleted', mapped.withDeleted); + req.query('page', mapped.page, unindexedPrefix); + req.query('per_page', mapped.perPage, unindexedPrefix); + req.query('date_field', mapped.dateField, unindexedPrefix); + req.query('start_date', mapped.startDate, unindexedPrefix); + req.query('end_date', mapped.endDate, unindexedPrefix); + req.query('start_datetime', mapped.startDatetime, unindexedPrefix); + req.query('end_datetime', mapped.endDatetime, unindexedPrefix); + req.query('with_deleted', mapped.withDeleted, unindexedPrefix); req.query('resource_ids', mapped.resourceIds, unindexedPrefix); - req.query('direction', mapped.direction); + req.query('direction', mapped.direction, unindexedPrefix); req.appendTemplatePath`/${mapped.resourceType}/metadata.json`; req.authenticate([{ basicAuth: true }]); return req.callAsJson(paginatedMetadataSchema, requestOptions); diff --git a/src/controllers/customersController.ts b/src/controllers/customersController.ts index e31feca..8a792bd 100644 --- a/src/controllers/customersController.ts +++ b/src/controllers/customersController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { BasicDateField, basicDateFieldSchema } from '../models/basicDateField'; import { CreateCustomerRequest, @@ -182,15 +182,15 @@ export class CustomersController extends BaseController { endDatetime: [endDatetime, optional(string())], q: [q, optional(string())], }); - req.query('direction', mapped.direction); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('date_field', mapped.dateField); - req.query('start_date', mapped.startDate); - req.query('end_date', mapped.endDate); - req.query('start_datetime', mapped.startDatetime); - req.query('end_datetime', mapped.endDatetime); - req.query('q', mapped.q); + req.query('direction', mapped.direction, commaPrefix); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('date_field', mapped.dateField, commaPrefix); + req.query('start_date', mapped.startDate, commaPrefix); + req.query('end_date', mapped.endDate, commaPrefix); + req.query('start_datetime', mapped.startDatetime, commaPrefix); + req.query('end_datetime', mapped.endDatetime, commaPrefix); + req.query('q', mapped.q, commaPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson(array(customerResponseSchema), requestOptions); } @@ -273,7 +273,7 @@ export class CustomersController extends BaseController { ): Promise> { const req = this.createRequest('GET', '/customers/lookup.json'); const mapped = req.prepareArgs({ reference: [reference, string()] }); - req.query('reference', mapped.reference); + req.query('reference', mapped.reference, commaPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson(customerResponseSchema, requestOptions); } diff --git a/src/controllers/eventsBasedBillingSegmentsController.ts b/src/controllers/eventsBasedBillingSegmentsController.ts index 37eb469..f4d0193 100644 --- a/src/controllers/eventsBasedBillingSegmentsController.ts +++ b/src/controllers/eventsBasedBillingSegmentsController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { BulkCreateSegments, bulkCreateSegmentsSchema, @@ -131,9 +131,9 @@ export class EventsBasedBillingSegmentsController extends BaseController { perPage: [perPage, optional(number())], filter: [filter, optional(listSegmentsFilterSchema)], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('filter', mapped.filter); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('filter', mapped.filter, commaPrefix); req.appendTemplatePath`/components/${mapped.componentId}/price_points/${mapped.pricePointId}/segments.json`; req.throwOn(404, ApiError, true, "Not Found:'{$response.body}'"); req.throwOn( diff --git a/src/controllers/eventsController.ts b/src/controllers/eventsController.ts index a7167c7..1bcb342 100644 --- a/src/controllers/eventsController.ts +++ b/src/controllers/eventsController.ts @@ -168,17 +168,17 @@ export class EventsController extends BaseController { startDatetime: [startDatetime, optional(string())], endDatetime: [endDatetime, optional(string())], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('since_id', mapped.sinceId); - req.query('max_id', mapped.maxId); - req.query('direction', mapped.direction); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('since_id', mapped.sinceId, commaPrefix); + req.query('max_id', mapped.maxId, commaPrefix); + req.query('direction', mapped.direction, commaPrefix); req.query('filter', mapped.filter, commaPrefix); - req.query('date_field', mapped.dateField); - req.query('start_date', mapped.startDate); - req.query('end_date', mapped.endDate); - req.query('start_datetime', mapped.startDatetime); - req.query('end_datetime', mapped.endDatetime); + req.query('date_field', mapped.dateField, commaPrefix); + req.query('start_date', mapped.startDate, commaPrefix); + req.query('end_date', mapped.endDate, commaPrefix); + req.query('start_datetime', mapped.startDatetime, commaPrefix); + req.query('end_datetime', mapped.endDatetime, commaPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson(array(eventResponseSchema), requestOptions); } @@ -243,11 +243,11 @@ export class EventsController extends BaseController { direction: [direction, optional(directionSchema)], filter: [filter, optional(array(eventKeySchema))], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('since_id', mapped.sinceId); - req.query('max_id', mapped.maxId); - req.query('direction', mapped.direction); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('since_id', mapped.sinceId, commaPrefix); + req.query('max_id', mapped.maxId, commaPrefix); + req.query('direction', mapped.direction, commaPrefix); req.query('filter', mapped.filter, commaPrefix); req.appendTemplatePath`/subscriptions/${mapped.subscriptionId}/events.json`; req.authenticate([{ basicAuth: true }]); @@ -300,11 +300,11 @@ export class EventsController extends BaseController { direction: [direction, optional(directionSchema)], filter: [filter, optional(array(eventKeySchema))], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('since_id', mapped.sinceId); - req.query('max_id', mapped.maxId); - req.query('direction', mapped.direction); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('since_id', mapped.sinceId, commaPrefix); + req.query('max_id', mapped.maxId, commaPrefix); + req.query('direction', mapped.direction, commaPrefix); req.query('filter', mapped.filter, commaPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson(countResponseSchema, requestOptions); diff --git a/src/controllers/insightsController.ts b/src/controllers/insightsController.ts index 7af7957..193b3db 100644 --- a/src/controllers/insightsController.ts +++ b/src/controllers/insightsController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { Direction, directionSchema } from '../models/direction'; import { ListMrrFilter, listMrrFilterSchema } from '../models/listMrrFilter'; import { @@ -68,8 +68,8 @@ export class InsightsController extends BaseController { atTime: [atTime, optional(string())], subscriptionId: [subscriptionId, optional(number())], }); - req.query('at_time', mapped.atTime); - req.query('subscription_id', mapped.subscriptionId); + req.query('at_time', mapped.atTime, commaPrefix); + req.query('subscription_id', mapped.subscriptionId, commaPrefix); req.deprecated('InsightsController.readMrr'); req.authenticate([{ basicAuth: true }]); return req.callAsJson(mRRResponseSchema, requestOptions); @@ -141,10 +141,10 @@ export class InsightsController extends BaseController { perPage: [perPage, optional(number())], direction: [direction, optional(sortingDirectionSchema)], }); - req.query('subscription_id', mapped.subscriptionId); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('direction', mapped.direction); + req.query('subscription_id', mapped.subscriptionId, commaPrefix); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('direction', mapped.direction, commaPrefix); req.deprecated('InsightsController.listMrrMovements'); req.authenticate([{ basicAuth: true }]); return req.callAsJson(listMRRResponseSchema, requestOptions); @@ -197,11 +197,11 @@ export class InsightsController extends BaseController { perPage: [perPage, optional(number())], direction: [direction, optional(directionSchema)], }); - req.query('filter', mapped.filter); - req.query('at_time', mapped.atTime); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('direction', mapped.direction); + req.query('filter', mapped.filter, commaPrefix); + req.query('at_time', mapped.atTime, commaPrefix); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('direction', mapped.direction, commaPrefix); req.deprecated('InsightsController.listMrrPerSubscription'); req.throwOn( 400, diff --git a/src/controllers/invoicesController.ts b/src/controllers/invoicesController.ts index 971e31b..55b64ce 100644 --- a/src/controllers/invoicesController.ts +++ b/src/controllers/invoicesController.ts @@ -269,28 +269,32 @@ export class InvoicesController extends BaseController { productIds: [productIds, optional(array(number()))], sort: [sort, optional(invoiceSortFieldSchema)], }); - req.query('start_date', mapped.startDate); - req.query('end_date', mapped.endDate); - req.query('status', mapped.status); - req.query('subscription_id', mapped.subscriptionId); - req.query('subscription_group_uid', mapped.subscriptionGroupUid); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('direction', mapped.direction); - req.query('line_items', mapped.lineItems); - req.query('discounts', mapped.discounts); - req.query('taxes', mapped.taxes); - req.query('credits', mapped.credits); - req.query('payments', mapped.payments); - req.query('custom_fields', mapped.customFields); - req.query('refunds', mapped.refunds); - req.query('date_field', mapped.dateField); - req.query('start_datetime', mapped.startDatetime); - req.query('end_datetime', mapped.endDatetime); + req.query('start_date', mapped.startDate, commaPrefix); + req.query('end_date', mapped.endDate, commaPrefix); + req.query('status', mapped.status, commaPrefix); + req.query('subscription_id', mapped.subscriptionId, commaPrefix); + req.query( + 'subscription_group_uid', + mapped.subscriptionGroupUid, + commaPrefix + ); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('direction', mapped.direction, commaPrefix); + req.query('line_items', mapped.lineItems, commaPrefix); + req.query('discounts', mapped.discounts, commaPrefix); + req.query('taxes', mapped.taxes, commaPrefix); + req.query('credits', mapped.credits, commaPrefix); + req.query('payments', mapped.payments, commaPrefix); + req.query('custom_fields', mapped.customFields, commaPrefix); + req.query('refunds', mapped.refunds, commaPrefix); + req.query('date_field', mapped.dateField, commaPrefix); + req.query('start_datetime', mapped.startDatetime, commaPrefix); + req.query('end_datetime', mapped.endDatetime, commaPrefix); req.query('customer_ids', mapped.customerIds, commaPrefix); req.query('number', mapped.mNumber, commaPrefix); req.query('product_ids', mapped.productIds, commaPrefix); - req.query('sort', mapped.sort); + req.query('sort', mapped.sort, commaPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson(listInvoicesResponseSchema, requestOptions); } @@ -414,12 +418,16 @@ export class InvoicesController extends BaseController { withChangeInvoiceStatus: [withChangeInvoiceStatus, optional(string())], eventTypes: [eventTypes, optional(array(invoiceEventTypeSchema))], }); - req.query('since_date', mapped.sinceDate); - req.query('since_id', mapped.sinceId); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('invoice_uid', mapped.invoiceUid); - req.query('with_change_invoice_status', mapped.withChangeInvoiceStatus); + req.query('since_date', mapped.sinceDate, commaPrefix); + req.query('since_id', mapped.sinceId, commaPrefix); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('invoice_uid', mapped.invoiceUid, commaPrefix); + req.query( + 'with_change_invoice_status', + mapped.withChangeInvoiceStatus, + commaPrefix + ); req.query('event_types', mapped.eventTypes, commaPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson(listInvoiceEventsResponseSchema, requestOptions); @@ -619,14 +627,14 @@ export class InvoicesController extends BaseController { refunds: [refunds, optional(boolean())], applications: [applications, optional(boolean())], }); - req.query('subscription_id', mapped.subscriptionId); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('line_items', mapped.lineItems); - req.query('discounts', mapped.discounts); - req.query('taxes', mapped.taxes); - req.query('refunds', mapped.refunds); - req.query('applications', mapped.applications); + req.query('subscription_id', mapped.subscriptionId, commaPrefix); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('line_items', mapped.lineItems, commaPrefix); + req.query('discounts', mapped.discounts, commaPrefix); + req.query('taxes', mapped.taxes, commaPrefix); + req.query('refunds', mapped.refunds, commaPrefix); + req.query('applications', mapped.applications, commaPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson(listCreditNotesResponseSchema, requestOptions); } @@ -800,9 +808,9 @@ export class InvoicesController extends BaseController { perPage: [perPage, optional(number())], direction: [direction, optional(directionSchema)], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('direction', mapped.direction); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('direction', mapped.direction, commaPrefix); req.appendTemplatePath`/invoices/${mapped.invoiceUid}/segments.json`; req.authenticate([{ basicAuth: true }]); return req.callAsJson(consolidatedInvoiceSchema, requestOptions); diff --git a/src/controllers/offersController.ts b/src/controllers/offersController.ts index 1d0ecb9..4d0ad7b 100644 --- a/src/controllers/offersController.ts +++ b/src/controllers/offersController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { CreateOfferRequest, createOfferRequestSchema, @@ -95,9 +95,9 @@ export class OffersController extends BaseController { perPage: [perPage, optional(number())], includeArchived: [includeArchived, optional(boolean())], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('include_archived', mapped.includeArchived); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('include_archived', mapped.includeArchived, commaPrefix); req.throwOn( 422, ErrorListResponseError, diff --git a/src/controllers/paymentProfilesController.ts b/src/controllers/paymentProfilesController.ts index a186065..c34391a 100644 --- a/src/controllers/paymentProfilesController.ts +++ b/src/controllers/paymentProfilesController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { BankAccountResponse, bankAccountResponseSchema, @@ -440,9 +440,9 @@ export class PaymentProfilesController extends BaseController { perPage: [perPage, optional(number())], customerId: [customerId, optional(number())], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('customer_id', mapped.customerId); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('customer_id', mapped.customerId, commaPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson(array(paymentProfileResponseSchema), requestOptions); } diff --git a/src/controllers/productFamiliesController.ts b/src/controllers/productFamiliesController.ts index 6fef6b0..9e50afb 100644 --- a/src/controllers/productFamiliesController.ts +++ b/src/controllers/productFamiliesController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { BasicDateField, basicDateFieldSchema } from '../models/basicDateField'; import { CreateProductFamilyRequest, @@ -119,16 +119,16 @@ export class ProductFamiliesController extends BaseController { includeArchived: [includeArchived, optional(boolean())], include: [include, optional(listProductsIncludeSchema)], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('date_field', mapped.dateField); - req.query('filter', mapped.filter); - req.query('start_date', mapped.startDate); - req.query('end_date', mapped.endDate); - req.query('start_datetime', mapped.startDatetime); - req.query('end_datetime', mapped.endDatetime); - req.query('include_archived', mapped.includeArchived); - req.query('include', mapped.include); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('date_field', mapped.dateField, commaPrefix); + req.query('filter', mapped.filter, commaPrefix); + req.query('start_date', mapped.startDate, commaPrefix); + req.query('end_date', mapped.endDate, commaPrefix); + req.query('start_datetime', mapped.startDatetime, commaPrefix); + req.query('end_datetime', mapped.endDatetime, commaPrefix); + req.query('include_archived', mapped.includeArchived, commaPrefix); + req.query('include', mapped.include, commaPrefix); req.appendTemplatePath`/product_families/${mapped.productFamilyId}/products.json`; req.throwOn(404, ApiError, 'Not Found'); req.authenticate([{ basicAuth: true }]); @@ -212,11 +212,11 @@ export class ProductFamiliesController extends BaseController { startDatetime: [startDatetime, optional(string())], endDatetime: [endDatetime, optional(string())], }); - req.query('date_field', mapped.dateField); - req.query('start_date', mapped.startDate); - req.query('end_date', mapped.endDate); - req.query('start_datetime', mapped.startDatetime); - req.query('end_datetime', mapped.endDatetime); + req.query('date_field', mapped.dateField, commaPrefix); + req.query('start_date', mapped.startDate, commaPrefix); + req.query('end_date', mapped.endDate, commaPrefix); + req.query('start_datetime', mapped.startDatetime, commaPrefix); + req.query('end_datetime', mapped.endDatetime, commaPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson(array(productFamilyResponseSchema), requestOptions); } diff --git a/src/controllers/productPricePointsController.ts b/src/controllers/productPricePointsController.ts index 085014a..a77963f 100644 --- a/src/controllers/productPricePointsController.ts +++ b/src/controllers/productPricePointsController.ts @@ -189,11 +189,11 @@ export class ProductPricePointsController extends BaseController { filterType: [filterType, optional(array(pricePointTypeSchema))], archived: [archived, optional(boolean())], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('currency_prices', mapped.currencyPrices); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('currency_prices', mapped.currencyPrices, commaPrefix); req.query('filter[type]', mapped.filterType, commaPrefix); - req.query('archived', mapped.archived); + req.query('archived', mapped.archived, commaPrefix); req.appendTemplatePath`/products/${mapped.productId}/price_points.json`; req.authenticate([{ basicAuth: true }]); return req.callAsJson(listProductPricePointsResponseSchema, requestOptions); @@ -270,7 +270,7 @@ export class ProductPricePointsController extends BaseController { pricePointId: [pricePointId, readProductPricePointPricePointIdSchema], currencyPrices: [currencyPrices, optional(boolean())], }); - req.query('currency_prices', mapped.currencyPrices); + req.query('currency_prices', mapped.currencyPrices, commaPrefix); req.appendTemplatePath`/products/${mapped.productId}/price_points/${mapped.pricePointId}.json`; req.authenticate([{ basicAuth: true }]); return req.callAsJson(productPricePointResponseSchema, requestOptions); @@ -512,11 +512,11 @@ export class ProductPricePointsController extends BaseController { page: [page, optional(number())], perPage: [perPage, optional(number())], }); - req.query('direction', mapped.direction); - req.query('filter', mapped.filter); - req.query('include', mapped.include); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); + req.query('direction', mapped.direction, commaPrefix); + req.query('filter', mapped.filter, commaPrefix); + req.query('include', mapped.include, commaPrefix); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); req.throwOn( 422, ErrorListResponseError, diff --git a/src/controllers/productsController.ts b/src/controllers/productsController.ts index 4c28d14..f516e7f 100644 --- a/src/controllers/productsController.ts +++ b/src/controllers/productsController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { BasicDateField, basicDateFieldSchema } from '../models/basicDateField'; import { CreateOrUpdateProductRequest, @@ -249,16 +249,16 @@ export class ProductsController extends BaseController { includeArchived: [includeArchived, optional(boolean())], include: [include, optional(listProductsIncludeSchema)], }); - req.query('date_field', mapped.dateField); - req.query('filter', mapped.filter); - req.query('end_date', mapped.endDate); - req.query('end_datetime', mapped.endDatetime); - req.query('start_date', mapped.startDate); - req.query('start_datetime', mapped.startDatetime); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('include_archived', mapped.includeArchived); - req.query('include', mapped.include); + req.query('date_field', mapped.dateField, commaPrefix); + req.query('filter', mapped.filter, commaPrefix); + req.query('end_date', mapped.endDate, commaPrefix); + req.query('end_datetime', mapped.endDatetime, commaPrefix); + req.query('start_date', mapped.startDate, commaPrefix); + req.query('start_datetime', mapped.startDatetime, commaPrefix); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('include_archived', mapped.includeArchived, commaPrefix); + req.query('include', mapped.include, commaPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson(array(productResponseSchema), requestOptions); } diff --git a/src/controllers/proformaInvoicesController.ts b/src/controllers/proformaInvoicesController.ts index 5278da2..806257e 100644 --- a/src/controllers/proformaInvoicesController.ts +++ b/src/controllers/proformaInvoicesController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { CreateSignupProformaPreviewInclude, createSignupProformaPreviewIncludeSchema, @@ -123,12 +123,12 @@ export class ProformaInvoicesController extends BaseController { payments: [payments, optional(boolean())], customFields: [customFields, optional(boolean())], }); - req.query('line_items', mapped.lineItems); - req.query('discounts', mapped.discounts); - req.query('taxes', mapped.taxes); - req.query('credits', mapped.credits); - req.query('payments', mapped.payments); - req.query('custom_fields', mapped.customFields); + req.query('line_items', mapped.lineItems, commaPrefix); + req.query('discounts', mapped.discounts, commaPrefix); + req.query('taxes', mapped.taxes, commaPrefix); + req.query('credits', mapped.credits, commaPrefix); + req.query('payments', mapped.payments, commaPrefix); + req.query('custom_fields', mapped.customFields, commaPrefix); req.appendTemplatePath`/subscription_groups/${mapped.uid}/proforma_invoices.json`; req.throwOn(404, ApiError, true, "Not Found:'{$response.body}'"); req.authenticate([{ basicAuth: true }]); @@ -273,18 +273,18 @@ export class ProformaInvoicesController extends BaseController { payments: [payments, optional(boolean())], customFields: [customFields, optional(boolean())], }); - req.query('start_date', mapped.startDate); - req.query('end_date', mapped.endDate); - req.query('status', mapped.status); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('direction', mapped.direction); - req.query('line_items', mapped.lineItems); - req.query('discounts', mapped.discounts); - req.query('taxes', mapped.taxes); - req.query('credits', mapped.credits); - req.query('payments', mapped.payments); - req.query('custom_fields', mapped.customFields); + req.query('start_date', mapped.startDate, commaPrefix); + req.query('end_date', mapped.endDate, commaPrefix); + req.query('status', mapped.status, commaPrefix); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('direction', mapped.direction, commaPrefix); + req.query('line_items', mapped.lineItems, commaPrefix); + req.query('discounts', mapped.discounts, commaPrefix); + req.query('taxes', mapped.taxes, commaPrefix); + req.query('credits', mapped.credits, commaPrefix); + req.query('payments', mapped.payments, commaPrefix); + req.query('custom_fields', mapped.customFields, commaPrefix); req.appendTemplatePath`/subscriptions/${mapped.subscriptionId}/proforma_invoices.json`; req.authenticate([{ basicAuth: true }]); return req.callAsJson(listProformaInvoicesResponseSchema, requestOptions); @@ -453,7 +453,7 @@ export class ProformaInvoicesController extends BaseController { body: [body, optional(createSubscriptionRequestSchema)], }); req.header('Content-Type', 'application/json'); - req.query('include', mapped.include); + req.query('include', mapped.include, commaPrefix); req.json(mapped.body); req.throwOn( 400, diff --git a/src/controllers/reasonCodesController.ts b/src/controllers/reasonCodesController.ts index 18851d9..98d99fd 100644 --- a/src/controllers/reasonCodesController.ts +++ b/src/controllers/reasonCodesController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { CreateReasonCodeRequest, createReasonCodeRequestSchema, @@ -96,8 +96,8 @@ export class ReasonCodesController extends BaseController { page: [page, optional(number())], perPage: [perPage, optional(number())], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); req.throwOn( 422, ErrorListResponseError, diff --git a/src/controllers/referralCodesController.ts b/src/controllers/referralCodesController.ts index e3ad844..e18fcd0 100644 --- a/src/controllers/referralCodesController.ts +++ b/src/controllers/referralCodesController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { ReferralValidationResponse, referralValidationResponseSchema, @@ -37,7 +37,7 @@ export class ReferralCodesController extends BaseController { ): Promise> { const req = this.createRequest('GET', '/referral_codes/validate.json'); const mapped = req.prepareArgs({ code: [code, string()] }); - req.query('code', mapped.code); + req.query('code', mapped.code, commaPrefix); req.throwOn( 404, SingleStringErrorResponseError, diff --git a/src/controllers/salesCommissionsController.ts b/src/controllers/salesCommissionsController.ts index c2ee84e..48df2e0 100644 --- a/src/controllers/salesCommissionsController.ts +++ b/src/controllers/salesCommissionsController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { ListSaleRepItem, listSaleRepItemSchema, @@ -77,9 +77,9 @@ export class SalesCommissionsController extends BaseController { perPage: [perPage, optional(number())], }); req.header('Authorization', mapped.authorization); - req.query('live_mode', mapped.liveMode); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); + req.query('live_mode', mapped.liveMode, commaPrefix); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); req.appendTemplatePath`/sellers/${mapped.sellerId}/sales_commission_settings.json`; req.authenticate([{ basicAuth: true }]); return req.callAsJson(array(saleRepSettingsSchema), requestOptions); @@ -144,9 +144,9 @@ export class SalesCommissionsController extends BaseController { perPage: [perPage, optional(number())], }); req.header('Authorization', mapped.authorization); - req.query('live_mode', mapped.liveMode); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); + req.query('live_mode', mapped.liveMode, commaPrefix); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); req.appendTemplatePath`/sellers/${mapped.sellerId}/sales_reps.json`; req.authenticate([{ basicAuth: true }]); return req.callAsJson(array(listSaleRepItemSchema), requestOptions); @@ -206,9 +206,9 @@ export class SalesCommissionsController extends BaseController { perPage: [perPage, optional(number())], }); req.header('Authorization', mapped.authorization); - req.query('live_mode', mapped.liveMode); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); + req.query('live_mode', mapped.liveMode, commaPrefix); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); req.appendTemplatePath`/sellers/${mapped.sellerId}/sales_reps/${mapped.salesRepId}.json`; req.authenticate([{ basicAuth: true }]); return req.callAsJson(saleRepSchema, requestOptions); diff --git a/src/controllers/sitesController.ts b/src/controllers/sitesController.ts index 0a32210..92417ea 100644 --- a/src/controllers/sitesController.ts +++ b/src/controllers/sitesController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { CleanupScope, cleanupScopeSchema } from '../models/cleanupScope'; import { ListPublicKeysResponse, @@ -67,7 +67,7 @@ export class SitesController extends BaseController { const mapped = req.prepareArgs({ cleanupScope: [cleanupScope, optional(cleanupScopeSchema)], }); - req.query('cleanup_scope', mapped.cleanupScope); + req.query('cleanup_scope', mapped.cleanupScope, commaPrefix); req.authenticate([{ basicAuth: true }]); return req.call(requestOptions); } @@ -100,8 +100,8 @@ export class SitesController extends BaseController { page: [page, optional(number())], perPage: [perPage, optional(number())], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson(listPublicKeysResponseSchema, requestOptions); } diff --git a/src/controllers/subscriptionComponentsController.ts b/src/controllers/subscriptionComponentsController.ts index 3ae387e..a9438fb 100644 --- a/src/controllers/subscriptionComponentsController.ts +++ b/src/controllers/subscriptionComponentsController.ts @@ -236,18 +236,18 @@ export class SubscriptionComponentsController extends BaseController { ], inUse: [inUse, optional(boolean())], }); - req.query('date_field', mapped.dateField); - req.query('direction', mapped.direction); - req.query('filter', mapped.filter); - req.query('end_date', mapped.endDate); - req.query('end_datetime', mapped.endDatetime); - req.query('price_point_ids', mapped.pricePointIds); + req.query('date_field', mapped.dateField, commaPrefix); + req.query('direction', mapped.direction, commaPrefix); + req.query('filter', mapped.filter, commaPrefix); + req.query('end_date', mapped.endDate, commaPrefix); + req.query('end_datetime', mapped.endDatetime, commaPrefix); + req.query('price_point_ids', mapped.pricePointIds, commaPrefix); req.query('product_family_ids', mapped.productFamilyIds, commaPrefix); - req.query('sort', mapped.sort); - req.query('start_date', mapped.startDate); - req.query('start_datetime', mapped.startDatetime); + req.query('sort', mapped.sort, commaPrefix); + req.query('start_date', mapped.startDate, commaPrefix); + req.query('start_datetime', mapped.startDatetime, commaPrefix); req.query('include', mapped.include, commaPrefix); - req.query('in_use', mapped.inUse); + req.query('in_use', mapped.inUse, commaPrefix); req.appendTemplatePath`/subscriptions/${mapped.subscriptionId}/components.json`; req.authenticate([{ basicAuth: true }]); return req.callAsJson( @@ -462,7 +462,7 @@ export class SubscriptionComponentsController extends BaseController { componentId: [componentId, number()], page: [page, optional(number())], }); - req.query('page', mapped.page); + req.query('page', mapped.page, commaPrefix); req.appendTemplatePath`/subscriptions/${mapped.subscriptionId}/components/${mapped.componentId}/allocations.json`; req.throwOn(404, ApiError, true, "Not Found:'{$response.body}'"); req.throwOn( @@ -846,12 +846,12 @@ export class SubscriptionComponentsController extends BaseController { page: [page, optional(number())], perPage: [perPage, optional(number())], }); - req.query('since_id', mapped.sinceId); - req.query('max_id', mapped.maxId); - req.query('since_date', mapped.sinceDate); - req.query('until_date', mapped.untilDate); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); + req.query('since_id', mapped.sinceId, commaPrefix); + req.query('max_id', mapped.maxId, commaPrefix); + req.query('since_date', mapped.sinceDate, commaPrefix); + req.query('until_date', mapped.untilDate, commaPrefix); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); req.appendTemplatePath`/subscriptions/${mapped.subscriptionId}/components/${mapped.componentId}/usages.json`; req.authenticate([{ basicAuth: true }]); return req.callAsJson(array(usageResponseSchema), requestOptions); @@ -963,7 +963,7 @@ export class SubscriptionComponentsController extends BaseController { body: [body, optional(eBBEventSchema)], }); req.header('Content-Type', 'application/json'); - req.query('store_uid', mapped.storeUid); + req.query('store_uid', mapped.storeUid, commaPrefix); req.json(mapped.body); req.appendTemplatePath`/events/${mapped.apiHandle}.json`; req.authenticate([{ basicAuth: true }]); @@ -999,7 +999,7 @@ export class SubscriptionComponentsController extends BaseController { body: [body, optional(array(eBBEventSchema))], }); req.header('Content-Type', 'application/json'); - req.query('store_uid', mapped.storeUid); + req.query('store_uid', mapped.storeUid, commaPrefix); req.json(mapped.body); req.appendTemplatePath`/events/${mapped.apiHandle}/bulk.json`; req.authenticate([{ basicAuth: true }]); @@ -1138,20 +1138,20 @@ export class SubscriptionComponentsController extends BaseController { productFamilyIds: [productFamilyIds, optional(array(number()))], include: [include, optional(listSubscriptionComponentsIncludeSchema)], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('sort', mapped.sort); - req.query('direction', mapped.direction); - req.query('filter', mapped.filter); - req.query('date_field', mapped.dateField); - req.query('start_date', mapped.startDate); - req.query('start_datetime', mapped.startDatetime); - req.query('end_date', mapped.endDate); - req.query('end_datetime', mapped.endDatetime); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('sort', mapped.sort, commaPrefix); + req.query('direction', mapped.direction, commaPrefix); + req.query('filter', mapped.filter, commaPrefix); + req.query('date_field', mapped.dateField, commaPrefix); + req.query('start_date', mapped.startDate, commaPrefix); + req.query('start_datetime', mapped.startDatetime, commaPrefix); + req.query('end_date', mapped.endDate, commaPrefix); + req.query('end_datetime', mapped.endDatetime, commaPrefix); req.query('subscription_ids', mapped.subscriptionIds, commaPrefix); - req.query('price_point_ids', mapped.pricePointIds); + req.query('price_point_ids', mapped.pricePointIds, commaPrefix); req.query('product_family_ids', mapped.productFamilyIds, commaPrefix); - req.query('include', mapped.include); + req.query('include', mapped.include, commaPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson( listSubscriptionComponentsResponseSchema, diff --git a/src/controllers/subscriptionGroupInvoiceAccountController.ts b/src/controllers/subscriptionGroupInvoiceAccountController.ts index 30efe97..739ae34 100644 --- a/src/controllers/subscriptionGroupInvoiceAccountController.ts +++ b/src/controllers/subscriptionGroupInvoiceAccountController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { DeductServiceCreditRequest, deductServiceCreditRequestSchema, @@ -114,9 +114,9 @@ export class SubscriptionGroupInvoiceAccountController extends BaseController { perPage: [perPage, optional(number())], filter: [filter, optional(listPrepaymentsFilterSchema)], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('filter', mapped.filter); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('filter', mapped.filter, commaPrefix); req.appendTemplatePath`/subscription_groups/${mapped.uid}/prepayments.json`; req.throwOn(404, ApiError, true, "Not Found:'{$response.body}'"); req.authenticate([{ basicAuth: true }]); diff --git a/src/controllers/subscriptionGroupsController.ts b/src/controllers/subscriptionGroupsController.ts index ef9095c..ec2da1c 100644 --- a/src/controllers/subscriptionGroupsController.ts +++ b/src/controllers/subscriptionGroupsController.ts @@ -4,7 +4,12 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions, unindexedPrefix } from '../core'; +import { + ApiResponse, + commaPrefix, + RequestOptions, + unindexedPrefix, +} from '../core'; import { AddSubscriptionToAGroup, addSubscriptionToAGroupSchema, @@ -171,8 +176,8 @@ export class SubscriptionGroupsController extends BaseController { perPage: [perPage, optional(number())], include: [include, optional(array(subscriptionGroupsListIncludeSchema))], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); + req.query('page', mapped.page, unindexedPrefix); + req.query('per_page', mapped.perPage, unindexedPrefix); req.query('include', mapped.include, unindexedPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson(listSubscriptionGroupsResponseSchema, requestOptions); @@ -279,7 +284,7 @@ export class SubscriptionGroupsController extends BaseController { const mapped = req.prepareArgs({ subscriptionId: [subscriptionId, string()], }); - req.query('subscription_id', mapped.subscriptionId); + req.query('subscription_id', mapped.subscriptionId, commaPrefix); req.throwOn(404, ApiError, true, "Not Found:'{$response.body}'"); req.authenticate([{ basicAuth: true }]); return req.callAsJson(fullSubscriptionGroupResponseSchema, requestOptions); diff --git a/src/controllers/subscriptionInvoiceAccountController.ts b/src/controllers/subscriptionInvoiceAccountController.ts index 9fddc4a..de4fb91 100644 --- a/src/controllers/subscriptionInvoiceAccountController.ts +++ b/src/controllers/subscriptionInvoiceAccountController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { AccountBalances, accountBalancesSchema, @@ -148,9 +148,9 @@ export class SubscriptionInvoiceAccountController extends BaseController { perPage: [perPage, optional(number())], filter: [filter, optional(listPrepaymentsFilterSchema)], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('filter', mapped.filter); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('filter', mapped.filter, commaPrefix); req.appendTemplatePath`/subscriptions/${mapped.subscriptionId}/prepayments.json`; req.throwOn(404, ApiError, true, "Not Found:'{$response.body}'"); req.authenticate([{ basicAuth: true }]); diff --git a/src/controllers/subscriptionNotesController.ts b/src/controllers/subscriptionNotesController.ts index 64b5f88..2ca2539 100644 --- a/src/controllers/subscriptionNotesController.ts +++ b/src/controllers/subscriptionNotesController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { SubscriptionNoteResponse, subscriptionNoteResponseSchema, @@ -91,8 +91,8 @@ export class SubscriptionNotesController extends BaseController { page: [page, optional(number())], perPage: [perPage, optional(number())], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); req.appendTemplatePath`/subscriptions/${mapped.subscriptionId}/notes.json`; req.throwOn( 422, diff --git a/src/controllers/subscriptionStatusController.ts b/src/controllers/subscriptionStatusController.ts index 6839f00..2b00d09 100644 --- a/src/controllers/subscriptionStatusController.ts +++ b/src/controllers/subscriptionStatusController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { CancellationRequest, cancellationRequestSchema, @@ -132,7 +132,8 @@ export class SubscriptionStatusController extends BaseController { }); req.query( "calendar_billing['resumption_charge']", - mapped.calendarBillingResumptionCharge + mapped.calendarBillingResumptionCharge, + commaPrefix ); req.appendTemplatePath`/subscriptions/${mapped.subscriptionId}/resume.json`; req.throwOn( diff --git a/src/controllers/subscriptionsController.ts b/src/controllers/subscriptionsController.ts index f3cfbe6..35a29b9 100644 --- a/src/controllers/subscriptionsController.ts +++ b/src/controllers/subscriptionsController.ts @@ -4,7 +4,12 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions, unindexedPrefix } from '../core'; +import { + ApiResponse, + commaPrefix, + RequestOptions, + unindexedPrefix, +} from '../core'; import { ActivateSubscriptionRequest, activateSubscriptionRequestSchema, @@ -1081,20 +1086,24 @@ export class SubscriptionsController extends BaseController { sort: [sort, optional(subscriptionSortSchema)], include: [include, optional(array(subscriptionListIncludeSchema))], }); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('state', mapped.state); - req.query('product', mapped.product); - req.query('product_price_point_id', mapped.productPricePointId); - req.query('coupon', mapped.coupon); - req.query('date_field', mapped.dateField); - req.query('start_date', mapped.startDate); - req.query('end_date', mapped.endDate); - req.query('start_datetime', mapped.startDatetime); - req.query('end_datetime', mapped.endDatetime); - req.query('metadata', mapped.metadata); - req.query('direction', mapped.direction); - req.query('sort', mapped.sort); + req.query('page', mapped.page, unindexedPrefix); + req.query('per_page', mapped.perPage, unindexedPrefix); + req.query('state', mapped.state, unindexedPrefix); + req.query('product', mapped.product, unindexedPrefix); + req.query( + 'product_price_point_id', + mapped.productPricePointId, + unindexedPrefix + ); + req.query('coupon', mapped.coupon, unindexedPrefix); + req.query('date_field', mapped.dateField, unindexedPrefix); + req.query('start_date', mapped.startDate, unindexedPrefix); + req.query('end_date', mapped.endDate, unindexedPrefix); + req.query('start_datetime', mapped.startDatetime, unindexedPrefix); + req.query('end_datetime', mapped.endDatetime, unindexedPrefix); + req.query('metadata', mapped.metadata, unindexedPrefix); + req.query('direction', mapped.direction, unindexedPrefix); + req.query('sort', mapped.sort, unindexedPrefix); req.query('include', mapped.include, unindexedPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson(array(subscriptionResponseSchema), requestOptions); @@ -1303,7 +1312,7 @@ export class SubscriptionsController extends BaseController { const mapped = req.prepareArgs({ reference: [reference, optional(string())], }); - req.query('reference', mapped.reference); + req.query('reference', mapped.reference, commaPrefix); req.throwOn(404, ApiError, true, "Not Found:'{$response.body}'"); req.authenticate([{ basicAuth: true }]); return req.callAsJson(subscriptionResponseSchema, requestOptions); @@ -1342,7 +1351,7 @@ export class SubscriptionsController extends BaseController { ack: [ack, number()], cascade: [cascade, optional(array(subscriptionPurgeTypeSchema))], }); - req.query('ack', mapped.ack); + req.query('ack', mapped.ack, unindexedPrefix); req.query('cascade', mapped.cascade, unindexedPrefix); req.appendTemplatePath`/subscriptions/${mapped.subscriptionId}/purge.json`; req.throwOn( @@ -1476,7 +1485,7 @@ export class SubscriptionsController extends BaseController { body: [body, optional(addCouponsRequestSchema)], }); req.header('Content-Type', 'application/json'); - req.query('code', mapped.code); + req.query('code', mapped.code, commaPrefix); req.json(mapped.body); req.appendTemplatePath`/subscriptions/${mapped.subscriptionId}/add_coupon.json`; req.throwOn( @@ -1510,7 +1519,7 @@ export class SubscriptionsController extends BaseController { subscriptionId: [subscriptionId, number()], couponCode: [couponCode, optional(string())], }); - req.query('coupon_code', mapped.couponCode); + req.query('coupon_code', mapped.couponCode, commaPrefix); req.appendTemplatePath`/subscriptions/${mapped.subscriptionId}/remove_coupon.json`; req.throwOn( 422, diff --git a/src/controllers/webhooksController.ts b/src/controllers/webhooksController.ts index cf9ccef..d19098f 100644 --- a/src/controllers/webhooksController.ts +++ b/src/controllers/webhooksController.ts @@ -4,7 +4,7 @@ * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). */ -import { ApiResponse, RequestOptions } from '../core'; +import { ApiResponse, commaPrefix, RequestOptions } from '../core'; import { CreateOrUpdateEndpointRequest, createOrUpdateEndpointRequestSchema, @@ -115,13 +115,13 @@ export class WebhooksController extends BaseController { order: [order, optional(webhookOrderSchema)], subscription: [subscription, optional(number())], }); - req.query('status', mapped.status); - req.query('since_date', mapped.sinceDate); - req.query('until_date', mapped.untilDate); - req.query('page', mapped.page); - req.query('per_page', mapped.perPage); - req.query('order', mapped.order); - req.query('subscription', mapped.subscription); + req.query('status', mapped.status, commaPrefix); + req.query('since_date', mapped.sinceDate, commaPrefix); + req.query('until_date', mapped.untilDate, commaPrefix); + req.query('page', mapped.page, commaPrefix); + req.query('per_page', mapped.perPage, commaPrefix); + req.query('order', mapped.order, commaPrefix); + req.query('subscription', mapped.subscription, commaPrefix); req.authenticate([{ basicAuth: true }]); return req.callAsJson(array(webhookResponseSchema), requestOptions); } From c1252e6c8448799173e8410eaa5d7c9f18172a07 Mon Sep 17 00:00:00 2001 From: Maciej Nedza Date: Tue, 7 Jan 2025 11:04:28 +0100 Subject: [PATCH 3/5] Update pnpm lock --- pnpm-lock.yaml | 126 +++++++++++++++---------------------------------- 1 file changed, 38 insertions(+), 88 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cb0ed7f..e7fa8f3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,38 +9,38 @@ importers: .: dependencies: '@apimatic/authentication-adapters': - specifier: ^0.5.6 + specifier: ^0.5.4 version: 0.5.6 '@apimatic/axios-client-adapter': - specifier: ^0.3.8 + specifier: ^0.3.7 version: 0.3.8 '@apimatic/core': - specifier: ^0.10.17 + specifier: ^0.10.16 version: 0.10.17 '@apimatic/schema': - specifier: ^0.7.15 + specifier: ^0.7.14 version: 0.7.15 devDependencies: '@types/jest': - specifier: ^29.5.14 + specifier: ^29.4.0 version: 29.5.14 '@typescript-eslint/eslint-plugin': - specifier: ^5.62.0 + specifier: ^5.52.0 version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.57.1)(typescript@4.9.5) '@typescript-eslint/parser': - specifier: ^5.62.0 + specifier: ^5.52.0 version: 5.62.0(eslint@8.57.1)(typescript@4.9.5) eslint: - specifier: ^8.57.1 + specifier: ^8.34.0 version: 8.57.1 jest: - specifier: ^29.7.0 + specifier: ^29.4.3 version: 29.7.0 ts-jest: - specifier: ^29.2.5 + specifier: ^29.0.5 version: 29.2.5(@babel/core@7.24.7)(jest@29.7.0)(typescript@4.9.5) tslib: - specifier: ^2.8.1 + specifier: ^2.5.0 version: 2.8.1 typescript: specifier: ^4.9.5 @@ -236,7 +236,7 @@ packages: '@babel/traverse': 7.24.7 '@babel/types': 7.24.7 convert-source-map: 2.0.0 - debug: 4.3.5 + debug: 4.4.0 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -526,7 +526,7 @@ packages: '@babel/helper-split-export-declaration': 7.24.7 '@babel/parser': 7.24.7 '@babel/types': 7.24.7 - debug: 4.3.5 + debug: 4.4.0 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -555,13 +555,13 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.57.1): - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + /@eslint-community/eslint-utils@4.4.1(eslint@8.57.0): + resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.57.1 + eslint: 8.57.0 eslint-visitor-keys: 3.4.3 dev: true @@ -590,10 +590,10 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 - debug: 4.3.5 + debug: 4.4.0 espree: 9.6.1 globals: 13.24.0 - ignore: 5.3.1 + ignore: 5.3.2 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.1.2 @@ -688,14 +688,14 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.10.2 + '@types/node': 20.14.9 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.10.2) + jest-config: 29.7.0(@types/node@20.14.9) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -856,7 +856,7 @@ packages: jest-haste-map: 29.7.0 jest-regex-util: 29.6.3 jest-util: 29.7.0 - micromatch: 4.0.7 + micromatch: 4.0.8 pirates: 4.0.6 slash: 3.0.0 write-file-atomic: 4.0.2 @@ -1023,12 +1023,6 @@ packages: undici-types: 5.26.5 dev: true - /@types/node@22.10.2: - resolution: {integrity: sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==} - dependencies: - undici-types: 6.20.0 - dev: true - /@types/semver@7.5.8: resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} dev: true @@ -1058,17 +1052,17 @@ packages: typescript: optional: true dependencies: - '@eslint-community/regexpp': 4.10.1 + '@eslint-community/regexpp': 4.12.1 '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@4.9.5) '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/type-utils': 5.62.0(eslint@8.57.0)(typescript@4.9.5) '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@4.9.5) - debug: 4.3.5 + debug: 4.4.0 eslint: 8.57.0 graphemer: 1.4.0 - ignore: 5.3.1 + ignore: 5.3.2 natural-compare-lite: 1.4.0 - semver: 7.6.2 + semver: 7.6.3 tsutils: 3.21.0(typescript@4.9.5) typescript: 4.9.5 transitivePeerDependencies: @@ -1163,7 +1157,7 @@ packages: dependencies: '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.9.5) '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@4.9.5) - debug: 4.3.5 + debug: 4.4.0 eslint: 8.57.0 tsutils: 3.21.0(typescript@4.9.5) typescript: 4.9.5 @@ -1183,7 +1177,7 @@ packages: dependencies: '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.9.5) '@typescript-eslint/utils': 5.62.0(eslint@8.57.1)(typescript@4.9.5) - debug: 4.3.5 + debug: 4.4.0 eslint: 8.57.1 tsutils: 3.21.0(typescript@4.9.5) typescript: 4.9.5 @@ -1207,10 +1201,10 @@ packages: dependencies: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/visitor-keys': 5.62.0 - debug: 4.3.5 + debug: 4.4.0 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.6.2 + semver: 7.6.3 tsutils: 3.21.0(typescript@4.9.5) typescript: 4.9.5 transitivePeerDependencies: @@ -1223,7 +1217,7 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 5.62.0 @@ -1231,7 +1225,7 @@ packages: '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.9.5) eslint: 8.57.0 eslint-scope: 5.1.1 - semver: 7.6.2 + semver: 7.6.3 transitivePeerDependencies: - supports-color - typescript @@ -1243,7 +1237,7 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 5.62.0 @@ -1251,7 +1245,7 @@ packages: '@typescript-eslint/typescript-estree': 5.62.0(typescript@4.9.5) eslint: 8.57.1 eslint-scope: 5.1.1 - semver: 7.6.2 + semver: 7.6.3 transitivePeerDependencies: - supports-color - typescript @@ -2435,7 +2429,7 @@ packages: '@babel/parser': 7.24.7 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 - semver: 7.6.2 + semver: 7.6.3 transitivePeerDependencies: - supports-color dev: true @@ -2453,7 +2447,7 @@ packages: resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} engines: {node: '>=10'} dependencies: - debug: 4.3.5 + debug: 4.4.0 istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: @@ -2533,7 +2527,7 @@ packages: chalk: 4.1.2 create-jest: 29.7.0 exit: 0.1.2 - import-local: 3.1.0 + import-local: 3.2.0 jest-config: 29.7.0 jest-util: 29.7.0 jest-validate: 29.7.0 @@ -2652,46 +2646,6 @@ packages: - supports-color dev: true - /jest-config@29.7.0(@types/node@22.10.2): - resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@types/node': '*' - ts-node: '>=9.0.0' - peerDependenciesMeta: - '@types/node': - optional: true - ts-node: - optional: true - dependencies: - '@babel/core': 7.24.7 - '@jest/test-sequencer': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 22.10.2 - babel-jest: 29.7.0(@babel/core@7.24.7) - chalk: 4.1.2 - ci-info: 3.9.0 - deepmerge: 4.3.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-circus: 29.7.0 - jest-environment-node: 29.7.0 - jest-get-type: 29.6.3 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-runner: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - micromatch: 4.0.7 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - dev: true - /jest-diff@29.7.0: resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -2783,7 +2737,7 @@ packages: '@types/stack-utils': 2.0.3 chalk: 4.1.2 graceful-fs: 4.2.11 - micromatch: 4.0.7 + micromatch: 4.0.8 pretty-format: 29.7.0 slash: 3.0.0 stack-utils: 2.0.6 @@ -3183,7 +3137,7 @@ packages: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} dependencies: - semver: 7.6.2 + semver: 7.6.3 dev: true /make-error@1.3.6: @@ -3898,10 +3852,6 @@ packages: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} dev: true - /undici-types@6.20.0: - resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} - dev: true - /update-browserslist-db@1.0.16(browserslist@4.23.1): resolution: {integrity: sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==} hasBin: true From 8c9d825fda7cfb2eecc9b125e863954703051370 Mon Sep 17 00:00:00 2001 From: Maciej Nedza Date: Tue, 7 Jan 2025 11:15:10 +0100 Subject: [PATCH 4/5] Fix tests credit cards expiration dates --- e2e/src/mocks/subscriptions.ts | 2 +- e2e/src/subscriptionsController.spec.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/e2e/src/mocks/subscriptions.ts b/e2e/src/mocks/subscriptions.ts index aafa55a..6bf9cf9 100644 --- a/e2e/src/mocks/subscriptions.ts +++ b/e2e/src/mocks/subscriptions.ts @@ -25,7 +25,7 @@ export const creditCardAttributes = { lastName: 'Smith', firstName: 'Joe', fullNumber: '4111111111111111', - expirationYear: 2024, + expirationYear: new Date().getFullYear(), expirationMonth: 12, cardType: CardType.Visa, billingZip: '02120', diff --git a/e2e/src/subscriptionsController.spec.ts b/e2e/src/subscriptionsController.spec.ts index 6f9358b..890aa04 100644 --- a/e2e/src/subscriptionsController.spec.ts +++ b/e2e/src/subscriptionsController.spec.ts @@ -57,7 +57,7 @@ describe('Subscriptions Controller', () => { lastName: 'Smith', firstName: 'Joe', fullNumber: '4111111111111111', - expirationYear: 2024, + expirationYear: new Date().getFullYear(), expirationMonth: 12, cardType: CardType.Visa, billingZip: '02120', @@ -284,7 +284,7 @@ describe('Subscriptions Controller', () => { subscription: { creditCardAttributes: { fullNumber: '374245455400126', - expirationYear: '2025', + expirationYear: (new Date().getFullYear() + 1).toString(), expirationMonth: '11', }, }, @@ -292,7 +292,7 @@ describe('Subscriptions Controller', () => { ); const updatedCreditCard = updateResponse.result.subscription?.creditCard; expect(updatedCreditCard?.expirationMonth).toBe(11); - expect(updatedCreditCard?.expirationYear).toBe(2025); + expect(updatedCreditCard?.expirationYear).toBe(new Date().getFullYear() + 1); }); test('should throw an error 422 error when user sends invalid data', async () => { @@ -308,7 +308,7 @@ describe('Subscriptions Controller', () => { subscription: { creditCardAttributes: { fullNumber: '000', - expirationYear: '2025', + expirationYear: (new Date().getFullYear() + 1).toString(), expirationMonth: '11', }, }, From 024e0ac2536d2329b5d9452946998e040d27572f Mon Sep 17 00:00:00 2001 From: Maciej Nedza Date: Tue, 7 Jan 2025 11:36:48 +0100 Subject: [PATCH 5/5] [DE-1092] Test nested query parameter serialization --- e2e/src/couponsController.spec.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/e2e/src/couponsController.spec.ts b/e2e/src/couponsController.spec.ts index d7651eb..3efc9a5 100644 --- a/e2e/src/couponsController.spec.ts +++ b/e2e/src/couponsController.spec.ts @@ -166,6 +166,26 @@ describe('Coupons Controller', () => { expect(listResponse.result.length >= 1).toBeTruthy(); }); + test('should list coupons filtering by code for product family', async () => { + const listResponse = await couponsController.listCouponsForProductFamily({ + productFamilyId: productFamily?.id || 0, + filter: { + codes: ['CREATE001'] + } + }); + expect(listResponse.statusCode).toBe(200); + expect(listResponse.result.length >= 1).toBeTruthy(); + + const listResponse2 = await couponsController.listCouponsForProductFamily({ + productFamilyId: productFamily?.id || 0, + filter: { + codes: ['abc'] + } + }); + expect(listResponse2.statusCode).toBe(200); + expect(listResponse2.result.length == 0).toBeTruthy(); + }); + test('should throw and 404 error when user sends incorrect family id ', async () => { const promise = couponsController.listCouponsForProductFamily({ productFamilyId: 2001,