@seekora-ai/admin-api 1.0.97 → 1.0.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/api.js CHANGED
@@ -120,13 +120,6 @@ export const DataTypesCreateTaskRequestTypeEnum = {
120
120
  Manual: 'manual',
121
121
  PluginConnector: 'plugin_connector'
122
122
  };
123
- export const DataTypesCreditTransactionTransactionTypeEnum = {
124
- Purchase: 'purchase',
125
- Consume: 'consume',
126
- Refund: 'refund',
127
- Bonus: 'bonus',
128
- Expire: 'expire'
129
- };
130
123
  export const DataTypesProcessRefundRequestDtoRefundTypeEnum = {
131
124
  Full: 'full',
132
125
  Partial: 'partial',
@@ -7356,6 +7349,37 @@ export const BillingDashboardApiAxiosParamCreator = function (configuration) {
7356
7349
  options: localVarRequestOptions,
7357
7350
  };
7358
7351
  }),
7352
+ /**
7353
+ * Generates invoices for all uninvoiced payments in an order (handles multiple payments for subscriptions)
7354
+ * @summary Generate invoices for an order
7355
+ * @param {number} orderId Order ID
7356
+ * @param {*} [options] Override http request option.
7357
+ * @throws {RequiredError}
7358
+ */
7359
+ adminBillingInvoicesGenerateForOrderOrderIdPost: (orderId_1, ...args_1) => __awaiter(this, [orderId_1, ...args_1], void 0, function* (orderId, options = {}) {
7360
+ // verify required parameter 'orderId' is not null or undefined
7361
+ assertParamExists('adminBillingInvoicesGenerateForOrderOrderIdPost', 'orderId', orderId);
7362
+ const localVarPath = `/admin/billing/invoices/generate-for-order/{orderId}`
7363
+ .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
7364
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7365
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7366
+ let baseOptions;
7367
+ if (configuration) {
7368
+ baseOptions = configuration.baseOptions;
7369
+ }
7370
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
7371
+ const localVarHeaderParameter = {};
7372
+ const localVarQueryParameter = {};
7373
+ // authentication BearerAuth required
7374
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
7375
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
7376
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7377
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
7378
+ return {
7379
+ url: toPathString(localVarUrlObj),
7380
+ options: localVarRequestOptions,
7381
+ };
7382
+ }),
7359
7383
  /**
7360
7384
  * Generates an invoice automatically from a completed payment
7361
7385
  * @summary Generate invoice from payment
@@ -7469,6 +7493,37 @@ export const BillingDashboardApiAxiosParamCreator = function (configuration) {
7469
7493
  options: localVarRequestOptions,
7470
7494
  };
7471
7495
  }),
7496
+ /**
7497
+ * Downloads an invoice as an HTML file (PDF can be added later)
7498
+ * @summary Download invoice
7499
+ * @param {string} id Invoice ID
7500
+ * @param {*} [options] Override http request option.
7501
+ * @throws {RequiredError}
7502
+ */
7503
+ adminBillingInvoicesIdDownloadGet: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
7504
+ // verify required parameter 'id' is not null or undefined
7505
+ assertParamExists('adminBillingInvoicesIdDownloadGet', 'id', id);
7506
+ const localVarPath = `/admin/billing/invoices/{id}/download`
7507
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
7508
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7509
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7510
+ let baseOptions;
7511
+ if (configuration) {
7512
+ baseOptions = configuration.baseOptions;
7513
+ }
7514
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
7515
+ const localVarHeaderParameter = {};
7516
+ const localVarQueryParameter = {};
7517
+ // authentication BearerAuth required
7518
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
7519
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
7520
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7521
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
7522
+ return {
7523
+ url: toPathString(localVarUrlObj),
7524
+ options: localVarRequestOptions,
7525
+ };
7526
+ }),
7472
7527
  /**
7473
7528
  * Retrieves a single invoice by ID
7474
7529
  * @summary Get invoice
@@ -7537,17 +7592,51 @@ export const BillingDashboardApiAxiosParamCreator = function (configuration) {
7537
7592
  };
7538
7593
  }),
7539
7594
  /**
7540
- * Retrieves paginated list of orders with filtering options for the authenticated user\'s organization
7595
+ * Initiates payment for a pending invoice (for subscription orders with failed auto-payments)
7596
+ * @summary Pay a pending invoice
7597
+ * @param {string} invoiceId Invoice ID
7598
+ * @param {DataTypesPayInvoiceRequest} [dataTypesPayInvoiceRequest] Payment details
7599
+ * @param {*} [options] Override http request option.
7600
+ * @throws {RequiredError}
7601
+ */
7602
+ adminBillingInvoicesInvoiceIdPayPost: (invoiceId_1, dataTypesPayInvoiceRequest_1, ...args_1) => __awaiter(this, [invoiceId_1, dataTypesPayInvoiceRequest_1, ...args_1], void 0, function* (invoiceId, dataTypesPayInvoiceRequest, options = {}) {
7603
+ // verify required parameter 'invoiceId' is not null or undefined
7604
+ assertParamExists('adminBillingInvoicesInvoiceIdPayPost', 'invoiceId', invoiceId);
7605
+ const localVarPath = `/admin/billing/invoices/{invoice_id}/pay`
7606
+ .replace(`{${"invoice_id"}}`, encodeURIComponent(String(invoiceId)));
7607
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7608
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7609
+ let baseOptions;
7610
+ if (configuration) {
7611
+ baseOptions = configuration.baseOptions;
7612
+ }
7613
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
7614
+ const localVarHeaderParameter = {};
7615
+ const localVarQueryParameter = {};
7616
+ // authentication BearerAuth required
7617
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
7618
+ localVarHeaderParameter['Content-Type'] = 'application/json';
7619
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
7620
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7621
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
7622
+ localVarRequestOptions.data = serializeDataIfNeeded(dataTypesPayInvoiceRequest, localVarRequestOptions, configuration);
7623
+ return {
7624
+ url: toPathString(localVarUrlObj),
7625
+ options: localVarRequestOptions,
7626
+ };
7627
+ }),
7628
+ /**
7629
+ * Retrieves paginated list of orders with filtering options for the authenticated user\'s organization. Uses page/page_size pagination like analytics APIs.
7541
7630
  * @summary Get orders
7542
7631
  * @param {number} [orgId] Organization ID (defaults to user\'s org)
7543
7632
  * @param {string} [startDate] Start date (YYYY-MM-DD format)
7544
7633
  * @param {string} [endDate] End date (YYYY-MM-DD format)
7545
- * @param {number} [limit] Number of results per page (default: 50, max: 100)
7546
- * @param {number} [offset] Number of results to skip (default: 0)
7634
+ * @param {number} [page] Page number (default: 1)
7635
+ * @param {number} [pageSize] Page size (default: 50, max: 100)
7547
7636
  * @param {*} [options] Override http request option.
7548
7637
  * @throws {RequiredError}
7549
7638
  */
7550
- adminBillingOrdersGet: (orgId_1, startDate_1, endDate_1, limit_1, offset_1, ...args_1) => __awaiter(this, [orgId_1, startDate_1, endDate_1, limit_1, offset_1, ...args_1], void 0, function* (orgId, startDate, endDate, limit, offset, options = {}) {
7639
+ adminBillingOrdersGet: (orgId_1, startDate_1, endDate_1, page_1, pageSize_1, ...args_1) => __awaiter(this, [orgId_1, startDate_1, endDate_1, page_1, pageSize_1, ...args_1], void 0, function* (orgId, startDate, endDate, page, pageSize, options = {}) {
7551
7640
  const localVarPath = `/admin/billing/orders`;
7552
7641
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
7553
7642
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -7569,11 +7658,11 @@ export const BillingDashboardApiAxiosParamCreator = function (configuration) {
7569
7658
  if (endDate !== undefined) {
7570
7659
  localVarQueryParameter['end_date'] = endDate;
7571
7660
  }
7572
- if (limit !== undefined) {
7573
- localVarQueryParameter['limit'] = limit;
7661
+ if (page !== undefined) {
7662
+ localVarQueryParameter['page'] = page;
7574
7663
  }
7575
- if (offset !== undefined) {
7576
- localVarQueryParameter['offset'] = offset;
7664
+ if (pageSize !== undefined) {
7665
+ localVarQueryParameter['page_size'] = pageSize;
7577
7666
  }
7578
7667
  setSearchParams(localVarUrlObj, localVarQueryParameter);
7579
7668
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -7583,6 +7672,37 @@ export const BillingDashboardApiAxiosParamCreator = function (configuration) {
7583
7672
  options: localVarRequestOptions,
7584
7673
  };
7585
7674
  }),
7675
+ /**
7676
+ * Retrieves comprehensive order details including all transactions and invoices (supports multiple invoices for subscriptions)
7677
+ * @summary Get single order with transactions and invoices
7678
+ * @param {number} id Order ID
7679
+ * @param {*} [options] Override http request option.
7680
+ * @throws {RequiredError}
7681
+ */
7682
+ adminBillingOrdersIdGet: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
7683
+ // verify required parameter 'id' is not null or undefined
7684
+ assertParamExists('adminBillingOrdersIdGet', 'id', id);
7685
+ const localVarPath = `/admin/billing/orders/{id}`
7686
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
7687
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7688
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7689
+ let baseOptions;
7690
+ if (configuration) {
7691
+ baseOptions = configuration.baseOptions;
7692
+ }
7693
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
7694
+ const localVarHeaderParameter = {};
7695
+ const localVarQueryParameter = {};
7696
+ // authentication BearerAuth required
7697
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
7698
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
7699
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7700
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
7701
+ return {
7702
+ url: toPathString(localVarUrlObj),
7703
+ options: localVarRequestOptions,
7704
+ };
7705
+ }),
7586
7706
  /**
7587
7707
  * Returns comprehensive billing overview including plan, next charge, balance, and projected runout for org admins
7588
7708
  * @summary Get org admin billing overview
@@ -8034,6 +8154,22 @@ export const BillingDashboardApiFp = function (configuration) {
8034
8154
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
8035
8155
  });
8036
8156
  },
8157
+ /**
8158
+ * Generates invoices for all uninvoiced payments in an order (handles multiple payments for subscriptions)
8159
+ * @summary Generate invoices for an order
8160
+ * @param {number} orderId Order ID
8161
+ * @param {*} [options] Override http request option.
8162
+ * @throws {RequiredError}
8163
+ */
8164
+ adminBillingInvoicesGenerateForOrderOrderIdPost(orderId, options) {
8165
+ return __awaiter(this, void 0, void 0, function* () {
8166
+ var _a, _b, _c;
8167
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminBillingInvoicesGenerateForOrderOrderIdPost(orderId, options);
8168
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
8169
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BillingDashboardApi.adminBillingInvoicesGenerateForOrderOrderIdPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
8170
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
8171
+ });
8172
+ },
8037
8173
  /**
8038
8174
  * Generates an invoice automatically from a completed payment
8039
8175
  * @summary Generate invoice from payment
@@ -8087,6 +8223,22 @@ export const BillingDashboardApiFp = function (configuration) {
8087
8223
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
8088
8224
  });
8089
8225
  },
8226
+ /**
8227
+ * Downloads an invoice as an HTML file (PDF can be added later)
8228
+ * @summary Download invoice
8229
+ * @param {string} id Invoice ID
8230
+ * @param {*} [options] Override http request option.
8231
+ * @throws {RequiredError}
8232
+ */
8233
+ adminBillingInvoicesIdDownloadGet(id, options) {
8234
+ return __awaiter(this, void 0, void 0, function* () {
8235
+ var _a, _b, _c;
8236
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminBillingInvoicesIdDownloadGet(id, options);
8237
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
8238
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BillingDashboardApi.adminBillingInvoicesIdDownloadGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
8239
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
8240
+ });
8241
+ },
8090
8242
  /**
8091
8243
  * Retrieves a single invoice by ID
8092
8244
  * @summary Get invoice
@@ -8121,25 +8273,58 @@ export const BillingDashboardApiFp = function (configuration) {
8121
8273
  });
8122
8274
  },
8123
8275
  /**
8124
- * Retrieves paginated list of orders with filtering options for the authenticated user\'s organization
8276
+ * Initiates payment for a pending invoice (for subscription orders with failed auto-payments)
8277
+ * @summary Pay a pending invoice
8278
+ * @param {string} invoiceId Invoice ID
8279
+ * @param {DataTypesPayInvoiceRequest} [dataTypesPayInvoiceRequest] Payment details
8280
+ * @param {*} [options] Override http request option.
8281
+ * @throws {RequiredError}
8282
+ */
8283
+ adminBillingInvoicesInvoiceIdPayPost(invoiceId, dataTypesPayInvoiceRequest, options) {
8284
+ return __awaiter(this, void 0, void 0, function* () {
8285
+ var _a, _b, _c;
8286
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminBillingInvoicesInvoiceIdPayPost(invoiceId, dataTypesPayInvoiceRequest, options);
8287
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
8288
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BillingDashboardApi.adminBillingInvoicesInvoiceIdPayPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
8289
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
8290
+ });
8291
+ },
8292
+ /**
8293
+ * Retrieves paginated list of orders with filtering options for the authenticated user\'s organization. Uses page/page_size pagination like analytics APIs.
8125
8294
  * @summary Get orders
8126
8295
  * @param {number} [orgId] Organization ID (defaults to user\'s org)
8127
8296
  * @param {string} [startDate] Start date (YYYY-MM-DD format)
8128
8297
  * @param {string} [endDate] End date (YYYY-MM-DD format)
8129
- * @param {number} [limit] Number of results per page (default: 50, max: 100)
8130
- * @param {number} [offset] Number of results to skip (default: 0)
8298
+ * @param {number} [page] Page number (default: 1)
8299
+ * @param {number} [pageSize] Page size (default: 50, max: 100)
8131
8300
  * @param {*} [options] Override http request option.
8132
8301
  * @throws {RequiredError}
8133
8302
  */
8134
- adminBillingOrdersGet(orgId, startDate, endDate, limit, offset, options) {
8303
+ adminBillingOrdersGet(orgId, startDate, endDate, page, pageSize, options) {
8135
8304
  return __awaiter(this, void 0, void 0, function* () {
8136
8305
  var _a, _b, _c;
8137
- const localVarAxiosArgs = yield localVarAxiosParamCreator.adminBillingOrdersGet(orgId, startDate, endDate, limit, offset, options);
8306
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminBillingOrdersGet(orgId, startDate, endDate, page, pageSize, options);
8138
8307
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
8139
8308
  const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BillingDashboardApi.adminBillingOrdersGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
8140
8309
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
8141
8310
  });
8142
8311
  },
8312
+ /**
8313
+ * Retrieves comprehensive order details including all transactions and invoices (supports multiple invoices for subscriptions)
8314
+ * @summary Get single order with transactions and invoices
8315
+ * @param {number} id Order ID
8316
+ * @param {*} [options] Override http request option.
8317
+ * @throws {RequiredError}
8318
+ */
8319
+ adminBillingOrdersIdGet(id, options) {
8320
+ return __awaiter(this, void 0, void 0, function* () {
8321
+ var _a, _b, _c;
8322
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminBillingOrdersIdGet(id, options);
8323
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
8324
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BillingDashboardApi.adminBillingOrdersIdGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
8325
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
8326
+ });
8327
+ },
8143
8328
  /**
8144
8329
  * Returns comprehensive billing overview including plan, next charge, balance, and projected runout for org admins
8145
8330
  * @summary Get org admin billing overview
@@ -8384,6 +8569,16 @@ export const BillingDashboardApiFactory = function (configuration, basePath, axi
8384
8569
  adminBillingInvoicesAutoGeneratePost(options) {
8385
8570
  return localVarFp.adminBillingInvoicesAutoGeneratePost(options).then((request) => request(axios, basePath));
8386
8571
  },
8572
+ /**
8573
+ * Generates invoices for all uninvoiced payments in an order (handles multiple payments for subscriptions)
8574
+ * @summary Generate invoices for an order
8575
+ * @param {number} orderId Order ID
8576
+ * @param {*} [options] Override http request option.
8577
+ * @throws {RequiredError}
8578
+ */
8579
+ adminBillingInvoicesGenerateForOrderOrderIdPost(orderId, options) {
8580
+ return localVarFp.adminBillingInvoicesGenerateForOrderOrderIdPost(orderId, options).then((request) => request(axios, basePath));
8581
+ },
8387
8582
  /**
8388
8583
  * Generates an invoice automatically from a completed payment
8389
8584
  * @summary Generate invoice from payment
@@ -8419,6 +8614,16 @@ export const BillingDashboardApiFactory = function (configuration, basePath, axi
8419
8614
  adminBillingInvoicesIdDelete(id, options) {
8420
8615
  return localVarFp.adminBillingInvoicesIdDelete(id, options).then((request) => request(axios, basePath));
8421
8616
  },
8617
+ /**
8618
+ * Downloads an invoice as an HTML file (PDF can be added later)
8619
+ * @summary Download invoice
8620
+ * @param {string} id Invoice ID
8621
+ * @param {*} [options] Override http request option.
8622
+ * @throws {RequiredError}
8623
+ */
8624
+ adminBillingInvoicesIdDownloadGet(id, options) {
8625
+ return localVarFp.adminBillingInvoicesIdDownloadGet(id, options).then((request) => request(axios, basePath));
8626
+ },
8422
8627
  /**
8423
8628
  * Retrieves a single invoice by ID
8424
8629
  * @summary Get invoice
@@ -8441,18 +8646,39 @@ export const BillingDashboardApiFactory = function (configuration, basePath, axi
8441
8646
  return localVarFp.adminBillingInvoicesIdPut(id, dataTypesUpdateInvoiceRequest, options).then((request) => request(axios, basePath));
8442
8647
  },
8443
8648
  /**
8444
- * Retrieves paginated list of orders with filtering options for the authenticated user\'s organization
8649
+ * Initiates payment for a pending invoice (for subscription orders with failed auto-payments)
8650
+ * @summary Pay a pending invoice
8651
+ * @param {string} invoiceId Invoice ID
8652
+ * @param {DataTypesPayInvoiceRequest} [dataTypesPayInvoiceRequest] Payment details
8653
+ * @param {*} [options] Override http request option.
8654
+ * @throws {RequiredError}
8655
+ */
8656
+ adminBillingInvoicesInvoiceIdPayPost(invoiceId, dataTypesPayInvoiceRequest, options) {
8657
+ return localVarFp.adminBillingInvoicesInvoiceIdPayPost(invoiceId, dataTypesPayInvoiceRequest, options).then((request) => request(axios, basePath));
8658
+ },
8659
+ /**
8660
+ * Retrieves paginated list of orders with filtering options for the authenticated user\'s organization. Uses page/page_size pagination like analytics APIs.
8445
8661
  * @summary Get orders
8446
8662
  * @param {number} [orgId] Organization ID (defaults to user\'s org)
8447
8663
  * @param {string} [startDate] Start date (YYYY-MM-DD format)
8448
8664
  * @param {string} [endDate] End date (YYYY-MM-DD format)
8449
- * @param {number} [limit] Number of results per page (default: 50, max: 100)
8450
- * @param {number} [offset] Number of results to skip (default: 0)
8665
+ * @param {number} [page] Page number (default: 1)
8666
+ * @param {number} [pageSize] Page size (default: 50, max: 100)
8667
+ * @param {*} [options] Override http request option.
8668
+ * @throws {RequiredError}
8669
+ */
8670
+ adminBillingOrdersGet(orgId, startDate, endDate, page, pageSize, options) {
8671
+ return localVarFp.adminBillingOrdersGet(orgId, startDate, endDate, page, pageSize, options).then((request) => request(axios, basePath));
8672
+ },
8673
+ /**
8674
+ * Retrieves comprehensive order details including all transactions and invoices (supports multiple invoices for subscriptions)
8675
+ * @summary Get single order with transactions and invoices
8676
+ * @param {number} id Order ID
8451
8677
  * @param {*} [options] Override http request option.
8452
8678
  * @throws {RequiredError}
8453
8679
  */
8454
- adminBillingOrdersGet(orgId, startDate, endDate, limit, offset, options) {
8455
- return localVarFp.adminBillingOrdersGet(orgId, startDate, endDate, limit, offset, options).then((request) => request(axios, basePath));
8680
+ adminBillingOrdersIdGet(id, options) {
8681
+ return localVarFp.adminBillingOrdersIdGet(id, options).then((request) => request(axios, basePath));
8456
8682
  },
8457
8683
  /**
8458
8684
  * Returns comprehensive billing overview including plan, next charge, balance, and projected runout for org admins
@@ -8665,6 +8891,17 @@ export class BillingDashboardApi extends BaseAPI {
8665
8891
  adminBillingInvoicesAutoGeneratePost(options) {
8666
8892
  return BillingDashboardApiFp(this.configuration).adminBillingInvoicesAutoGeneratePost(options).then((request) => request(this.axios, this.basePath));
8667
8893
  }
8894
+ /**
8895
+ * Generates invoices for all uninvoiced payments in an order (handles multiple payments for subscriptions)
8896
+ * @summary Generate invoices for an order
8897
+ * @param {number} orderId Order ID
8898
+ * @param {*} [options] Override http request option.
8899
+ * @throws {RequiredError}
8900
+ * @memberof BillingDashboardApi
8901
+ */
8902
+ adminBillingInvoicesGenerateForOrderOrderIdPost(orderId, options) {
8903
+ return BillingDashboardApiFp(this.configuration).adminBillingInvoicesGenerateForOrderOrderIdPost(orderId, options).then((request) => request(this.axios, this.basePath));
8904
+ }
8668
8905
  /**
8669
8906
  * Generates an invoice automatically from a completed payment
8670
8907
  * @summary Generate invoice from payment
@@ -8703,6 +8940,17 @@ export class BillingDashboardApi extends BaseAPI {
8703
8940
  adminBillingInvoicesIdDelete(id, options) {
8704
8941
  return BillingDashboardApiFp(this.configuration).adminBillingInvoicesIdDelete(id, options).then((request) => request(this.axios, this.basePath));
8705
8942
  }
8943
+ /**
8944
+ * Downloads an invoice as an HTML file (PDF can be added later)
8945
+ * @summary Download invoice
8946
+ * @param {string} id Invoice ID
8947
+ * @param {*} [options] Override http request option.
8948
+ * @throws {RequiredError}
8949
+ * @memberof BillingDashboardApi
8950
+ */
8951
+ adminBillingInvoicesIdDownloadGet(id, options) {
8952
+ return BillingDashboardApiFp(this.configuration).adminBillingInvoicesIdDownloadGet(id, options).then((request) => request(this.axios, this.basePath));
8953
+ }
8706
8954
  /**
8707
8955
  * Retrieves a single invoice by ID
8708
8956
  * @summary Get invoice
@@ -8727,19 +8975,42 @@ export class BillingDashboardApi extends BaseAPI {
8727
8975
  return BillingDashboardApiFp(this.configuration).adminBillingInvoicesIdPut(id, dataTypesUpdateInvoiceRequest, options).then((request) => request(this.axios, this.basePath));
8728
8976
  }
8729
8977
  /**
8730
- * Retrieves paginated list of orders with filtering options for the authenticated user\'s organization
8978
+ * Initiates payment for a pending invoice (for subscription orders with failed auto-payments)
8979
+ * @summary Pay a pending invoice
8980
+ * @param {string} invoiceId Invoice ID
8981
+ * @param {DataTypesPayInvoiceRequest} [dataTypesPayInvoiceRequest] Payment details
8982
+ * @param {*} [options] Override http request option.
8983
+ * @throws {RequiredError}
8984
+ * @memberof BillingDashboardApi
8985
+ */
8986
+ adminBillingInvoicesInvoiceIdPayPost(invoiceId, dataTypesPayInvoiceRequest, options) {
8987
+ return BillingDashboardApiFp(this.configuration).adminBillingInvoicesInvoiceIdPayPost(invoiceId, dataTypesPayInvoiceRequest, options).then((request) => request(this.axios, this.basePath));
8988
+ }
8989
+ /**
8990
+ * Retrieves paginated list of orders with filtering options for the authenticated user\'s organization. Uses page/page_size pagination like analytics APIs.
8731
8991
  * @summary Get orders
8732
8992
  * @param {number} [orgId] Organization ID (defaults to user\'s org)
8733
8993
  * @param {string} [startDate] Start date (YYYY-MM-DD format)
8734
8994
  * @param {string} [endDate] End date (YYYY-MM-DD format)
8735
- * @param {number} [limit] Number of results per page (default: 50, max: 100)
8736
- * @param {number} [offset] Number of results to skip (default: 0)
8995
+ * @param {number} [page] Page number (default: 1)
8996
+ * @param {number} [pageSize] Page size (default: 50, max: 100)
8737
8997
  * @param {*} [options] Override http request option.
8738
8998
  * @throws {RequiredError}
8739
8999
  * @memberof BillingDashboardApi
8740
9000
  */
8741
- adminBillingOrdersGet(orgId, startDate, endDate, limit, offset, options) {
8742
- return BillingDashboardApiFp(this.configuration).adminBillingOrdersGet(orgId, startDate, endDate, limit, offset, options).then((request) => request(this.axios, this.basePath));
9001
+ adminBillingOrdersGet(orgId, startDate, endDate, page, pageSize, options) {
9002
+ return BillingDashboardApiFp(this.configuration).adminBillingOrdersGet(orgId, startDate, endDate, page, pageSize, options).then((request) => request(this.axios, this.basePath));
9003
+ }
9004
+ /**
9005
+ * Retrieves comprehensive order details including all transactions and invoices (supports multiple invoices for subscriptions)
9006
+ * @summary Get single order with transactions and invoices
9007
+ * @param {number} id Order ID
9008
+ * @param {*} [options] Override http request option.
9009
+ * @throws {RequiredError}
9010
+ * @memberof BillingDashboardApi
9011
+ */
9012
+ adminBillingOrdersIdGet(id, options) {
9013
+ return BillingDashboardApiFp(this.configuration).adminBillingOrdersIdGet(id, options).then((request) => request(this.axios, this.basePath));
8743
9014
  }
8744
9015
  /**
8745
9016
  * Returns comprehensive billing overview including plan, next charge, balance, and projected runout for org admins
@@ -17028,6 +17299,72 @@ export const PaymentGatewayApiAxiosParamCreator = function (configuration) {
17028
17299
  options: localVarRequestOptions,
17029
17300
  };
17030
17301
  }),
17302
+ /**
17303
+ * Returns paginated orders for the authenticated user\'s organization
17304
+ * @summary List orders (paginated)
17305
+ * @param {number} [page] Page number (default 1)
17306
+ * @param {number} [pageSize] Page size (default 20, max 100)
17307
+ * @param {*} [options] Override http request option.
17308
+ * @throws {RequiredError}
17309
+ */
17310
+ adminPaymentGatewayOrdersGet: (page_1, pageSize_1, ...args_1) => __awaiter(this, [page_1, pageSize_1, ...args_1], void 0, function* (page, pageSize, options = {}) {
17311
+ const localVarPath = `/admin/payment-gateway/orders`;
17312
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
17313
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
17314
+ let baseOptions;
17315
+ if (configuration) {
17316
+ baseOptions = configuration.baseOptions;
17317
+ }
17318
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
17319
+ const localVarHeaderParameter = {};
17320
+ const localVarQueryParameter = {};
17321
+ // authentication BearerAuth required
17322
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
17323
+ if (page !== undefined) {
17324
+ localVarQueryParameter['page'] = page;
17325
+ }
17326
+ if (pageSize !== undefined) {
17327
+ localVarQueryParameter['page_size'] = pageSize;
17328
+ }
17329
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
17330
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
17331
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
17332
+ return {
17333
+ url: toPathString(localVarUrlObj),
17334
+ options: localVarRequestOptions,
17335
+ };
17336
+ }),
17337
+ /**
17338
+ * Returns order details, list of payment transactions for that order, and the latest invoice if available. Does not expose raw gateway secrets.
17339
+ * @summary Get single order details with transactions and invoice
17340
+ * @param {number} id Order ID
17341
+ * @param {*} [options] Override http request option.
17342
+ * @throws {RequiredError}
17343
+ */
17344
+ adminPaymentGatewayOrdersIdGet: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
17345
+ // verify required parameter 'id' is not null or undefined
17346
+ assertParamExists('adminPaymentGatewayOrdersIdGet', 'id', id);
17347
+ const localVarPath = `/admin/payment-gateway/orders/{id}`
17348
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
17349
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
17350
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
17351
+ let baseOptions;
17352
+ if (configuration) {
17353
+ baseOptions = configuration.baseOptions;
17354
+ }
17355
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
17356
+ const localVarHeaderParameter = {};
17357
+ const localVarQueryParameter = {};
17358
+ // authentication BearerAuth required
17359
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
17360
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
17361
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
17362
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
17363
+ return {
17364
+ url: toPathString(localVarUrlObj),
17365
+ options: localVarRequestOptions,
17366
+ };
17367
+ }),
17031
17368
  /**
17032
17369
  * Returns payment status in a frontend-friendly format (\"success\", \"pending\", or \"error\") for polling. This endpoint is designed to be polled by the frontend to check payment status. It returns retry intervals and fulfillment information.
17033
17370
  * @summary Get payment status for polling (frontend)
@@ -17296,6 +17633,39 @@ export const PaymentGatewayApiFp = function (configuration) {
17296
17633
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17297
17634
  });
17298
17635
  },
17636
+ /**
17637
+ * Returns paginated orders for the authenticated user\'s organization
17638
+ * @summary List orders (paginated)
17639
+ * @param {number} [page] Page number (default 1)
17640
+ * @param {number} [pageSize] Page size (default 20, max 100)
17641
+ * @param {*} [options] Override http request option.
17642
+ * @throws {RequiredError}
17643
+ */
17644
+ adminPaymentGatewayOrdersGet(page, pageSize, options) {
17645
+ return __awaiter(this, void 0, void 0, function* () {
17646
+ var _a, _b, _c;
17647
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminPaymentGatewayOrdersGet(page, pageSize, options);
17648
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
17649
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PaymentGatewayApi.adminPaymentGatewayOrdersGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
17650
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17651
+ });
17652
+ },
17653
+ /**
17654
+ * Returns order details, list of payment transactions for that order, and the latest invoice if available. Does not expose raw gateway secrets.
17655
+ * @summary Get single order details with transactions and invoice
17656
+ * @param {number} id Order ID
17657
+ * @param {*} [options] Override http request option.
17658
+ * @throws {RequiredError}
17659
+ */
17660
+ adminPaymentGatewayOrdersIdGet(id, options) {
17661
+ return __awaiter(this, void 0, void 0, function* () {
17662
+ var _a, _b, _c;
17663
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminPaymentGatewayOrdersIdGet(id, options);
17664
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
17665
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PaymentGatewayApi.adminPaymentGatewayOrdersIdGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
17666
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
17667
+ });
17668
+ },
17299
17669
  /**
17300
17670
  * Returns payment status in a frontend-friendly format (\"success\", \"pending\", or \"error\") for polling. This endpoint is designed to be polled by the frontend to check payment status. It returns retry intervals and fulfillment information.
17301
17671
  * @summary Get payment status for polling (frontend)
@@ -17445,6 +17815,27 @@ export const PaymentGatewayApiFactory = function (configuration, basePath, axios
17445
17815
  adminPaymentGatewayGatewaysGet(options) {
17446
17816
  return localVarFp.adminPaymentGatewayGatewaysGet(options).then((request) => request(axios, basePath));
17447
17817
  },
17818
+ /**
17819
+ * Returns paginated orders for the authenticated user\'s organization
17820
+ * @summary List orders (paginated)
17821
+ * @param {number} [page] Page number (default 1)
17822
+ * @param {number} [pageSize] Page size (default 20, max 100)
17823
+ * @param {*} [options] Override http request option.
17824
+ * @throws {RequiredError}
17825
+ */
17826
+ adminPaymentGatewayOrdersGet(page, pageSize, options) {
17827
+ return localVarFp.adminPaymentGatewayOrdersGet(page, pageSize, options).then((request) => request(axios, basePath));
17828
+ },
17829
+ /**
17830
+ * Returns order details, list of payment transactions for that order, and the latest invoice if available. Does not expose raw gateway secrets.
17831
+ * @summary Get single order details with transactions and invoice
17832
+ * @param {number} id Order ID
17833
+ * @param {*} [options] Override http request option.
17834
+ * @throws {RequiredError}
17835
+ */
17836
+ adminPaymentGatewayOrdersIdGet(id, options) {
17837
+ return localVarFp.adminPaymentGatewayOrdersIdGet(id, options).then((request) => request(axios, basePath));
17838
+ },
17448
17839
  /**
17449
17840
  * Returns payment status in a frontend-friendly format (\"success\", \"pending\", or \"error\") for polling. This endpoint is designed to be polled by the frontend to check payment status. It returns retry intervals and fulfillment information.
17450
17841
  * @summary Get payment status for polling (frontend)
@@ -17555,6 +17946,29 @@ export class PaymentGatewayApi extends BaseAPI {
17555
17946
  adminPaymentGatewayGatewaysGet(options) {
17556
17947
  return PaymentGatewayApiFp(this.configuration).adminPaymentGatewayGatewaysGet(options).then((request) => request(this.axios, this.basePath));
17557
17948
  }
17949
+ /**
17950
+ * Returns paginated orders for the authenticated user\'s organization
17951
+ * @summary List orders (paginated)
17952
+ * @param {number} [page] Page number (default 1)
17953
+ * @param {number} [pageSize] Page size (default 20, max 100)
17954
+ * @param {*} [options] Override http request option.
17955
+ * @throws {RequiredError}
17956
+ * @memberof PaymentGatewayApi
17957
+ */
17958
+ adminPaymentGatewayOrdersGet(page, pageSize, options) {
17959
+ return PaymentGatewayApiFp(this.configuration).adminPaymentGatewayOrdersGet(page, pageSize, options).then((request) => request(this.axios, this.basePath));
17960
+ }
17961
+ /**
17962
+ * Returns order details, list of payment transactions for that order, and the latest invoice if available. Does not expose raw gateway secrets.
17963
+ * @summary Get single order details with transactions and invoice
17964
+ * @param {number} id Order ID
17965
+ * @param {*} [options] Override http request option.
17966
+ * @throws {RequiredError}
17967
+ * @memberof PaymentGatewayApi
17968
+ */
17969
+ adminPaymentGatewayOrdersIdGet(id, options) {
17970
+ return PaymentGatewayApiFp(this.configuration).adminPaymentGatewayOrdersIdGet(id, options).then((request) => request(this.axios, this.basePath));
17971
+ }
17558
17972
  /**
17559
17973
  * Returns payment status in a frontend-friendly format (\"success\", \"pending\", or \"error\") for polling. This endpoint is designed to be polled by the frontend to check payment status. It returns retry intervals and fulfillment information.
17560
17974
  * @summary Get payment status for polling (frontend)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seekora-ai/admin-api",
3
- "version": "1.0.97",
3
+ "version": "1.0.99",
4
4
  "description": "OpenAPI client for @seekora-ai/admin-api",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {
Binary file