@seekora-ai/admin-api 1.2.4 → 1.2.6

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/api.ts CHANGED
@@ -13034,6 +13034,12 @@ export interface DataTypesBillingAlertRequest {
13034
13034
  * @memberof DataTypesBillingAlertRequest
13035
13035
  */
13036
13036
  'alert_type'?: DataTypesBillingAlertRequestAlertTypeEnum;
13037
+ /**
13038
+ *
13039
+ * @type {boolean}
13040
+ * @memberof DataTypesBillingAlertRequest
13041
+ */
13042
+ 'applies_to_all_stores'?: boolean;
13037
13043
  /**
13038
13044
  * Minutes between alerts (default: 60)
13039
13045
  * @type {number}
@@ -13058,6 +13064,12 @@ export interface DataTypesBillingAlertRequest {
13058
13064
  * @memberof DataTypesBillingAlertRequest
13059
13065
  */
13060
13066
  'notification_channels'?: { [key: string]: any; };
13067
+ /**
13068
+ *
13069
+ * @type {number}
13070
+ * @memberof DataTypesBillingAlertRequest
13071
+ */
13072
+ 'rolling_days'?: number;
13061
13073
  /**
13062
13074
  * Percentage threshold 0-100 (exclusive with threshold_value)
13063
13075
  * @type {number}
@@ -13076,6 +13088,12 @@ export interface DataTypesBillingAlertRequest {
13076
13088
  * @memberof DataTypesBillingAlertRequest
13077
13089
  */
13078
13090
  'threshold_value'?: number;
13091
+ /**
13092
+ *
13093
+ * @type {string}
13094
+ * @memberof DataTypesBillingAlertRequest
13095
+ */
13096
+ 'window_type'?: string;
13079
13097
  /**
13080
13098
  * Alternative to store_id - will be converted to store_id
13081
13099
  * @type {string}
@@ -14947,7 +14965,8 @@ export interface DataTypesCreatePaymentOrderRequest {
14947
14965
  export const DataTypesCreatePaymentOrderRequestPaymentTypeEnum = {
14948
14966
  Generic: 'generic',
14949
14967
  Subscription: 'subscription',
14950
- CreditTopup: 'credit_topup'
14968
+ CreditTopup: 'credit_topup',
14969
+ PlanChange: 'plan_change'
14951
14970
  } as const;
14952
14971
 
14953
14972
  export type DataTypesCreatePaymentOrderRequestPaymentTypeEnum = typeof DataTypesCreatePaymentOrderRequestPaymentTypeEnum[keyof typeof DataTypesCreatePaymentOrderRequestPaymentTypeEnum];
@@ -16079,6 +16098,12 @@ export interface DataTypesCurrentPlanInfo {
16079
16098
  * @memberof DataTypesCurrentPlanInfo
16080
16099
  */
16081
16100
  'billing_cycle'?: string;
16101
+ /**
16102
+ * Currency of the subscription (INR, USD)
16103
+ * @type {string}
16104
+ * @memberof DataTypesCurrentPlanInfo
16105
+ */
16106
+ 'currency_code'?: string;
16082
16107
  /**
16083
16108
  *
16084
16109
  * @type {string}
@@ -22346,6 +22371,18 @@ export interface DataTypesInvoice {
22346
22371
  * @memberof DataTypesInvoice
22347
22372
  */
22348
22373
  'created_at'?: string;
22374
+ /**
22375
+ *
22376
+ * @type {string}
22377
+ * @memberof DataTypesInvoice
22378
+ */
22379
+ 'credit_note_reason'?: string;
22380
+ /**
22381
+ *
22382
+ * @type {string}
22383
+ * @memberof DataTypesInvoice
22384
+ */
22385
+ 'credit_note_status'?: string;
22349
22386
  /**
22350
22387
  *
22351
22388
  * @type {string}
@@ -22382,6 +22419,12 @@ export interface DataTypesInvoice {
22382
22419
  * @memberof DataTypesInvoice
22383
22420
  */
22384
22421
  'invoice_pdf_url'?: string;
22422
+ /**
22423
+ * Credit note fields (only populated when invoice_type = \'credit_note\')
22424
+ * @type {string}
22425
+ * @memberof DataTypesInvoice
22426
+ */
22427
+ 'invoice_type'?: string;
22385
22428
  /**
22386
22429
  *
22387
22430
  * @type {string}
@@ -22418,6 +22461,18 @@ export interface DataTypesInvoice {
22418
22461
  * @memberof DataTypesInvoice
22419
22462
  */
22420
22463
  'org_name'?: string;
22464
+ /**
22465
+ *
22466
+ * @type {string}
22467
+ * @memberof DataTypesInvoice
22468
+ */
22469
+ 'original_invoice_id'?: string;
22470
+ /**
22471
+ *
22472
+ * @type {string}
22473
+ * @memberof DataTypesInvoice
22474
+ */
22475
+ 'original_invoice_number'?: string;
22421
22476
  /**
22422
22477
  *
22423
22478
  * @type {string}
@@ -22460,6 +22515,12 @@ export interface DataTypesInvoice {
22460
22515
  * @memberof DataTypesInvoice
22461
22516
  */
22462
22517
  'receipt_pdf_url'?: string;
22518
+ /**
22519
+ *
22520
+ * @type {number}
22521
+ * @memberof DataTypesInvoice
22522
+ */
22523
+ 'refund_request_id'?: number;
22463
22524
  /**
22464
22525
  * \"draft\", \"sent\", \"paid\", \"overdue\", \"cancelled\"
22465
22526
  * @type {string}
@@ -22496,6 +22557,12 @@ export interface DataTypesInvoice {
22496
22557
  * @memberof DataTypesInvoice
22497
22558
  */
22498
22559
  'updated_at'?: string;
22560
+ /**
22561
+ *
22562
+ * @type {string}
22563
+ * @memberof DataTypesInvoice
22564
+ */
22565
+ 'voided_at'?: string;
22499
22566
  }
22500
22567
  /**
22501
22568
  *
@@ -29985,6 +30052,95 @@ export interface DataTypesSendNotificationResponse {
29985
30052
  */
29986
30053
  'status'?: number;
29987
30054
  }
30055
+ /**
30056
+ *
30057
+ * @export
30058
+ * @interface DataTypesSendOrgNotificationData
30059
+ */
30060
+ export interface DataTypesSendOrgNotificationData {
30061
+ /**
30062
+ *
30063
+ * @type {string}
30064
+ * @memberof DataTypesSendOrgNotificationData
30065
+ */
30066
+ 'scope'?: string;
30067
+ /**
30068
+ *
30069
+ * @type {number}
30070
+ * @memberof DataTypesSendOrgNotificationData
30071
+ */
30072
+ 'sent_count'?: number;
30073
+ }
30074
+ /**
30075
+ *
30076
+ * @export
30077
+ * @interface DataTypesSendOrgNotificationRequest
30078
+ */
30079
+ export interface DataTypesSendOrgNotificationRequest {
30080
+ /**
30081
+ *
30082
+ * @type {Array<DataTypesNotificationChannel>}
30083
+ * @memberof DataTypesSendOrgNotificationRequest
30084
+ */
30085
+ 'channels'?: Array<DataTypesNotificationChannel>;
30086
+ /**
30087
+ *
30088
+ * @type {string}
30089
+ * @memberof DataTypesSendOrgNotificationRequest
30090
+ */
30091
+ 'message'?: string;
30092
+ /**
30093
+ *
30094
+ * @type {DataTypesNotificationPriority}
30095
+ * @memberof DataTypesSendOrgNotificationRequest
30096
+ */
30097
+ 'priority'?: DataTypesNotificationPriority;
30098
+ /**
30099
+ * \"all\" | \"owners_admins\"
30100
+ * @type {string}
30101
+ * @memberof DataTypesSendOrgNotificationRequest
30102
+ */
30103
+ 'scope'?: string;
30104
+ /**
30105
+ *
30106
+ * @type {string}
30107
+ * @memberof DataTypesSendOrgNotificationRequest
30108
+ */
30109
+ 'title'?: string;
30110
+ /**
30111
+ *
30112
+ * @type {DataTypesNotificationType}
30113
+ * @memberof DataTypesSendOrgNotificationRequest
30114
+ */
30115
+ 'type'?: DataTypesNotificationType;
30116
+ }
30117
+
30118
+
30119
+ /**
30120
+ *
30121
+ * @export
30122
+ * @interface DataTypesSendOrgNotificationResponse
30123
+ */
30124
+ export interface DataTypesSendOrgNotificationResponse {
30125
+ /**
30126
+ *
30127
+ * @type {DataTypesSendOrgNotificationData}
30128
+ * @memberof DataTypesSendOrgNotificationResponse
30129
+ */
30130
+ 'data'?: DataTypesSendOrgNotificationData;
30131
+ /**
30132
+ *
30133
+ * @type {string}
30134
+ * @memberof DataTypesSendOrgNotificationResponse
30135
+ */
30136
+ 'message'?: string;
30137
+ /**
30138
+ *
30139
+ * @type {number}
30140
+ * @memberof DataTypesSendOrgNotificationResponse
30141
+ */
30142
+ 'status'?: number;
30143
+ }
29988
30144
  /**
29989
30145
  *
29990
30146
  * @export
@@ -32019,6 +32175,49 @@ export interface DataTypesStoreLevelMenuRightWithMenu {
32019
32175
  */
32020
32176
  'xStoreId'?: string;
32021
32177
  }
32178
+ /**
32179
+ *
32180
+ * @export
32181
+ * @interface DataTypesStoreQuotaRequest
32182
+ */
32183
+ export interface DataTypesStoreQuotaRequest {
32184
+ /**
32185
+ *
32186
+ * @type {string}
32187
+ * @memberof DataTypesStoreQuotaRequest
32188
+ */
32189
+ 'enforcement_mode'?: string;
32190
+ /**
32191
+ *
32192
+ * @type {boolean}
32193
+ * @memberof DataTypesStoreQuotaRequest
32194
+ */
32195
+ 'is_enabled'?: boolean;
32196
+ /**
32197
+ *
32198
+ * @type {number}
32199
+ * @memberof DataTypesStoreQuotaRequest
32200
+ */
32201
+ 'quota_amount'?: number;
32202
+ /**
32203
+ *
32204
+ * @type {number}
32205
+ * @memberof DataTypesStoreQuotaRequest
32206
+ */
32207
+ 'rolling_days'?: number;
32208
+ /**
32209
+ *
32210
+ * @type {string}
32211
+ * @memberof DataTypesStoreQuotaRequest
32212
+ */
32213
+ 'store_id'?: string;
32214
+ /**
32215
+ *
32216
+ * @type {string}
32217
+ * @memberof DataTypesStoreQuotaRequest
32218
+ */
32219
+ 'window_type'?: string;
32220
+ }
32022
32221
  /**
32023
32222
  *
32024
32223
  * @export
@@ -40433,6 +40632,31 @@ export interface SubscriptionRouteCancelProcessRequest {
40433
40632
  */
40434
40633
  'subscription_id'?: string;
40435
40634
  }
40635
+ /**
40636
+ *
40637
+ * @export
40638
+ * @interface SubscriptionRouteImmediatePlanChangeOrderHTTPRequest
40639
+ */
40640
+ export interface SubscriptionRouteImmediatePlanChangeOrderHTTPRequest {
40641
+ /**
40642
+ *
40643
+ * @type {string}
40644
+ * @memberof SubscriptionRouteImmediatePlanChangeOrderHTTPRequest
40645
+ */
40646
+ 'billing_cycle'?: string;
40647
+ /**
40648
+ *
40649
+ * @type {string}
40650
+ * @memberof SubscriptionRouteImmediatePlanChangeOrderHTTPRequest
40651
+ */
40652
+ 'currency'?: string;
40653
+ /**
40654
+ *
40655
+ * @type {string}
40656
+ * @memberof SubscriptionRouteImmediatePlanChangeOrderHTTPRequest
40657
+ */
40658
+ 'new_plan_identifier'?: string;
40659
+ }
40436
40660
  /**
40437
40661
  *
40438
40662
  * @export
@@ -40464,6 +40688,31 @@ export interface SubscriptionRoutePlanChangePreviewHTTPRequest {
40464
40688
  */
40465
40689
  'new_plan_identifier'?: string;
40466
40690
  }
40691
+ /**
40692
+ *
40693
+ * @export
40694
+ * @interface SubscriptionRouteSchedulePlanChangeHTTPRequest
40695
+ */
40696
+ export interface SubscriptionRouteSchedulePlanChangeHTTPRequest {
40697
+ /**
40698
+ *
40699
+ * @type {string}
40700
+ * @memberof SubscriptionRouteSchedulePlanChangeHTTPRequest
40701
+ */
40702
+ 'billing_cycle'?: string;
40703
+ /**
40704
+ *
40705
+ * @type {string}
40706
+ * @memberof SubscriptionRouteSchedulePlanChangeHTTPRequest
40707
+ */
40708
+ 'currency'?: string;
40709
+ /**
40710
+ *
40711
+ * @type {string}
40712
+ * @memberof SubscriptionRouteSchedulePlanChangeHTTPRequest
40713
+ */
40714
+ 'new_plan_identifier'?: string;
40715
+ }
40467
40716
  /**
40468
40717
  *
40469
40718
  * @export
@@ -42623,6 +42872,45 @@ export const AdminNotificationsApiAxiosParamCreator = function (configuration?:
42623
42872
  options: localVarRequestOptions,
42624
42873
  };
42625
42874
  },
42875
+ /**
42876
+ * Sends a notification to all active members of the caller\'s organization. The caller must be an org owner or admin. Scope \"all\" includes every member; \"owners_admins\" targets owners and admins only.
42877
+ * @summary Send org-wide notification (Admin)
42878
+ * @param {DataTypesSendOrgNotificationRequest} dataTypesSendOrgNotificationRequest Org notification details
42879
+ * @param {*} [options] Override http request option.
42880
+ * @throws {RequiredError}
42881
+ */
42882
+ v1AdminNotificationsSendOrgPost: async (dataTypesSendOrgNotificationRequest: DataTypesSendOrgNotificationRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
42883
+ // verify required parameter 'dataTypesSendOrgNotificationRequest' is not null or undefined
42884
+ assertParamExists('v1AdminNotificationsSendOrgPost', 'dataTypesSendOrgNotificationRequest', dataTypesSendOrgNotificationRequest)
42885
+ const localVarPath = `/v1/admin/notifications/send-org`;
42886
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
42887
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
42888
+ let baseOptions;
42889
+ if (configuration) {
42890
+ baseOptions = configuration.baseOptions;
42891
+ }
42892
+
42893
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
42894
+ const localVarHeaderParameter = {} as any;
42895
+ const localVarQueryParameter = {} as any;
42896
+
42897
+ // authentication BearerAuth required
42898
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
42899
+
42900
+
42901
+
42902
+ localVarHeaderParameter['Content-Type'] = 'application/json';
42903
+
42904
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
42905
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
42906
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
42907
+ localVarRequestOptions.data = serializeDataIfNeeded(dataTypesSendOrgNotificationRequest, localVarRequestOptions, configuration)
42908
+
42909
+ return {
42910
+ url: toPathString(localVarUrlObj),
42911
+ options: localVarRequestOptions,
42912
+ };
42913
+ },
42626
42914
  /**
42627
42915
  * Sends a notification to specified users (requires admin privileges)
42628
42916
  * @summary Send notification (Admin)
@@ -42891,6 +43179,19 @@ export const AdminNotificationsApiFp = function(configuration?: Configuration) {
42891
43179
  const localVarOperationServerBasePath = operationServerMap['AdminNotificationsApi.v1AdminNotificationsSendBulkPost']?.[localVarOperationServerIndex]?.url;
42892
43180
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
42893
43181
  },
43182
+ /**
43183
+ * Sends a notification to all active members of the caller\'s organization. The caller must be an org owner or admin. Scope \"all\" includes every member; \"owners_admins\" targets owners and admins only.
43184
+ * @summary Send org-wide notification (Admin)
43185
+ * @param {DataTypesSendOrgNotificationRequest} dataTypesSendOrgNotificationRequest Org notification details
43186
+ * @param {*} [options] Override http request option.
43187
+ * @throws {RequiredError}
43188
+ */
43189
+ async v1AdminNotificationsSendOrgPost(dataTypesSendOrgNotificationRequest: DataTypesSendOrgNotificationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesSendOrgNotificationResponse>> {
43190
+ const localVarAxiosArgs = await localVarAxiosParamCreator.v1AdminNotificationsSendOrgPost(dataTypesSendOrgNotificationRequest, options);
43191
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
43192
+ const localVarOperationServerBasePath = operationServerMap['AdminNotificationsApi.v1AdminNotificationsSendOrgPost']?.[localVarOperationServerIndex]?.url;
43193
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
43194
+ },
42894
43195
  /**
42895
43196
  * Sends a notification to specified users (requires admin privileges)
42896
43197
  * @summary Send notification (Admin)
@@ -43024,6 +43325,16 @@ export const AdminNotificationsApiFactory = function (configuration?: Configurat
43024
43325
  v1AdminNotificationsSendBulkPost(dataTypesNotificationBatch: DataTypesNotificationBatch, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesSendBulkNotificationResponse> {
43025
43326
  return localVarFp.v1AdminNotificationsSendBulkPost(dataTypesNotificationBatch, options).then((request) => request(axios, basePath));
43026
43327
  },
43328
+ /**
43329
+ * Sends a notification to all active members of the caller\'s organization. The caller must be an org owner or admin. Scope \"all\" includes every member; \"owners_admins\" targets owners and admins only.
43330
+ * @summary Send org-wide notification (Admin)
43331
+ * @param {DataTypesSendOrgNotificationRequest} dataTypesSendOrgNotificationRequest Org notification details
43332
+ * @param {*} [options] Override http request option.
43333
+ * @throws {RequiredError}
43334
+ */
43335
+ v1AdminNotificationsSendOrgPost(dataTypesSendOrgNotificationRequest: DataTypesSendOrgNotificationRequest, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesSendOrgNotificationResponse> {
43336
+ return localVarFp.v1AdminNotificationsSendOrgPost(dataTypesSendOrgNotificationRequest, options).then((request) => request(axios, basePath));
43337
+ },
43027
43338
  /**
43028
43339
  * Sends a notification to specified users (requires admin privileges)
43029
43340
  * @summary Send notification (Admin)
@@ -43159,6 +43470,18 @@ export class AdminNotificationsApi extends BaseAPI {
43159
43470
  return AdminNotificationsApiFp(this.configuration).v1AdminNotificationsSendBulkPost(dataTypesNotificationBatch, options).then((request) => request(this.axios, this.basePath));
43160
43471
  }
43161
43472
 
43473
+ /**
43474
+ * Sends a notification to all active members of the caller\'s organization. The caller must be an org owner or admin. Scope \"all\" includes every member; \"owners_admins\" targets owners and admins only.
43475
+ * @summary Send org-wide notification (Admin)
43476
+ * @param {DataTypesSendOrgNotificationRequest} dataTypesSendOrgNotificationRequest Org notification details
43477
+ * @param {*} [options] Override http request option.
43478
+ * @throws {RequiredError}
43479
+ * @memberof AdminNotificationsApi
43480
+ */
43481
+ public v1AdminNotificationsSendOrgPost(dataTypesSendOrgNotificationRequest: DataTypesSendOrgNotificationRequest, options?: RawAxiosRequestConfig) {
43482
+ return AdminNotificationsApiFp(this.configuration).v1AdminNotificationsSendOrgPost(dataTypesSendOrgNotificationRequest, options).then((request) => request(this.axios, this.basePath));
43483
+ }
43484
+
43162
43485
  /**
43163
43486
  * Sends a notification to specified users (requires admin privileges)
43164
43487
  * @summary Send notification (Admin)
@@ -55824,6 +56147,74 @@ export const BillingDashboardApiAxiosParamCreator = function (configuration?: Co
55824
56147
 
55825
56148
 
55826
56149
 
56150
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
56151
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
56152
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
56153
+
56154
+ return {
56155
+ url: toPathString(localVarUrlObj),
56156
+ options: localVarRequestOptions,
56157
+ };
56158
+ },
56159
+ /**
56160
+ * Returns paginated alert trigger history with optional filters
56161
+ * @summary Get alert trigger history
56162
+ * @param {string} [storeId] Filter by store xStoreID
56163
+ * @param {string} [from] Start date (YYYY-MM-DD)
56164
+ * @param {string} [to] End date (YYYY-MM-DD)
56165
+ * @param {string} [alertType] Filter by alert type (store_usage_threshold, store_usage_approaching, quota_hard_block)
56166
+ * @param {string} [status] Filter by status (resolved, unresolved)
56167
+ * @param {number} [page] Page number
56168
+ * @param {number} [perPage] Items per page
56169
+ * @param {*} [options] Override http request option.
56170
+ * @throws {RequiredError}
56171
+ */
56172
+ adminBillingAlertHistoryGet: async (storeId?: string, from?: string, to?: string, alertType?: string, status?: string, page?: number, perPage?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
56173
+ const localVarPath = `/admin/billing/alert-history`;
56174
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
56175
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
56176
+ let baseOptions;
56177
+ if (configuration) {
56178
+ baseOptions = configuration.baseOptions;
56179
+ }
56180
+
56181
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
56182
+ const localVarHeaderParameter = {} as any;
56183
+ const localVarQueryParameter = {} as any;
56184
+
56185
+ // authentication BearerAuth required
56186
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
56187
+
56188
+ if (storeId !== undefined) {
56189
+ localVarQueryParameter['store_id'] = storeId;
56190
+ }
56191
+
56192
+ if (from !== undefined) {
56193
+ localVarQueryParameter['from'] = from;
56194
+ }
56195
+
56196
+ if (to !== undefined) {
56197
+ localVarQueryParameter['to'] = to;
56198
+ }
56199
+
56200
+ if (alertType !== undefined) {
56201
+ localVarQueryParameter['alert_type'] = alertType;
56202
+ }
56203
+
56204
+ if (status !== undefined) {
56205
+ localVarQueryParameter['status'] = status;
56206
+ }
56207
+
56208
+ if (page !== undefined) {
56209
+ localVarQueryParameter['page'] = page;
56210
+ }
56211
+
56212
+ if (perPage !== undefined) {
56213
+ localVarQueryParameter['per_page'] = perPage;
56214
+ }
56215
+
56216
+
56217
+
55827
56218
  setSearchParams(localVarUrlObj, localVarQueryParameter);
55828
56219
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
55829
56220
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -56185,6 +56576,54 @@ export const BillingDashboardApiAxiosParamCreator = function (configuration?: Co
56185
56576
 
56186
56577
 
56187
56578
 
56579
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
56580
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
56581
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
56582
+
56583
+ return {
56584
+ url: toPathString(localVarUrlObj),
56585
+ options: localVarRequestOptions,
56586
+ };
56587
+ },
56588
+ /**
56589
+ * Exports credit notes as a CSV file formatted for GSTR-1 filing. Includes credit note number, original invoice reference, GST breakdown, and SAC code.
56590
+ * @summary Export credit notes for GSTR-1
56591
+ * @param {string} [startDate] Start date (YYYY-MM-DD format)
56592
+ * @param {string} [endDate] End date (YYYY-MM-DD format)
56593
+ * @param {string} [fiscalYear] Fiscal year (e.g., 2526)
56594
+ * @param {*} [options] Override http request option.
56595
+ * @throws {RequiredError}
56596
+ */
56597
+ adminBillingCreditNotesExportGet: async (startDate?: string, endDate?: string, fiscalYear?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
56598
+ const localVarPath = `/admin/billing/credit-notes/export`;
56599
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
56600
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
56601
+ let baseOptions;
56602
+ if (configuration) {
56603
+ baseOptions = configuration.baseOptions;
56604
+ }
56605
+
56606
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
56607
+ const localVarHeaderParameter = {} as any;
56608
+ const localVarQueryParameter = {} as any;
56609
+
56610
+ // authentication BearerAuth required
56611
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
56612
+
56613
+ if (startDate !== undefined) {
56614
+ localVarQueryParameter['start_date'] = startDate;
56615
+ }
56616
+
56617
+ if (endDate !== undefined) {
56618
+ localVarQueryParameter['end_date'] = endDate;
56619
+ }
56620
+
56621
+ if (fiscalYear !== undefined) {
56622
+ localVarQueryParameter['fiscal_year'] = fiscalYear;
56623
+ }
56624
+
56625
+
56626
+
56188
56627
  setSearchParams(localVarUrlObj, localVarQueryParameter);
56189
56628
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
56190
56629
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -56470,10 +56909,11 @@ export const BillingDashboardApiAxiosParamCreator = function (configuration?: Co
56470
56909
  * @param {number} [limit] Number of results per page (default: 20, max: 100) - alternative to page_size
56471
56910
  * @param {AdminBillingInvoicesGetSortByEnum} [sortBy] Field to sort by
56472
56911
  * @param {AdminBillingInvoicesGetSortOrderEnum} [sortOrder] Sort direction
56912
+ * @param {AdminBillingInvoicesGetInvoiceTypeEnum} [invoiceType] Filter by invoice type
56473
56913
  * @param {*} [options] Override http request option.
56474
56914
  * @throws {RequiredError}
56475
56915
  */
56476
- adminBillingInvoicesGet: async (orgId?: number, status?: string, startDate?: string, endDate?: string, search?: string, page?: number, pageSize?: number, limit?: number, sortBy?: AdminBillingInvoicesGetSortByEnum, sortOrder?: AdminBillingInvoicesGetSortOrderEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
56916
+ adminBillingInvoicesGet: async (orgId?: number, status?: string, startDate?: string, endDate?: string, search?: string, page?: number, pageSize?: number, limit?: number, sortBy?: AdminBillingInvoicesGetSortByEnum, sortOrder?: AdminBillingInvoicesGetSortOrderEnum, invoiceType?: AdminBillingInvoicesGetInvoiceTypeEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
56477
56917
  const localVarPath = `/admin/billing/invoices`;
56478
56918
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
56479
56919
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -56529,6 +56969,10 @@ export const BillingDashboardApiAxiosParamCreator = function (configuration?: Co
56529
56969
  localVarQueryParameter['sort_order'] = sortOrder;
56530
56970
  }
56531
56971
 
56972
+ if (invoiceType !== undefined) {
56973
+ localVarQueryParameter['invoice_type'] = invoiceType;
56974
+ }
56975
+
56532
56976
 
56533
56977
 
56534
56978
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -56731,6 +57175,43 @@ export const BillingDashboardApiAxiosParamCreator = function (configuration?: Co
56731
57175
  options: localVarRequestOptions,
56732
57176
  };
56733
57177
  },
57178
+ /**
57179
+ * Voids an issued credit note by setting credit_note_status to \'voided\'. Only credit notes with status \'issued\' can be voided.
57180
+ * @summary Void a credit note
57181
+ * @param {string} id Invoice ID (UUID)
57182
+ * @param {*} [options] Override http request option.
57183
+ * @throws {RequiredError}
57184
+ */
57185
+ adminBillingInvoicesIdVoidPost: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
57186
+ // verify required parameter 'id' is not null or undefined
57187
+ assertParamExists('adminBillingInvoicesIdVoidPost', 'id', id)
57188
+ const localVarPath = `/admin/billing/invoices/{id}/void`
57189
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
57190
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
57191
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
57192
+ let baseOptions;
57193
+ if (configuration) {
57194
+ baseOptions = configuration.baseOptions;
57195
+ }
57196
+
57197
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
57198
+ const localVarHeaderParameter = {} as any;
57199
+ const localVarQueryParameter = {} as any;
57200
+
57201
+ // authentication BearerAuth required
57202
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
57203
+
57204
+
57205
+
57206
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
57207
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
57208
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
57209
+
57210
+ return {
57211
+ url: toPathString(localVarUrlObj),
57212
+ options: localVarRequestOptions,
57213
+ };
57214
+ },
56734
57215
  /**
56735
57216
  * Initiates payment for a pending invoice (for subscription orders with failed auto-payments)
56736
57217
  * @summary Pay a pending invoice
@@ -57410,6 +57891,290 @@ export const BillingDashboardApiAxiosParamCreator = function (configuration?: Co
57410
57891
 
57411
57892
 
57412
57893
 
57894
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
57895
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
57896
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
57897
+
57898
+ return {
57899
+ url: toPathString(localVarUrlObj),
57900
+ options: localVarRequestOptions,
57901
+ };
57902
+ },
57903
+ /**
57904
+ * Returns paginated list of per-store credit quotas for the organization
57905
+ * @summary List store credit quotas
57906
+ * @param {number} [page] Page number
57907
+ * @param {number} [perPage] Items per page
57908
+ * @param {string} [search] Search by store name
57909
+ * @param {*} [options] Override http request option.
57910
+ * @throws {RequiredError}
57911
+ */
57912
+ adminBillingStoreQuotasGet: async (page?: number, perPage?: number, search?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
57913
+ const localVarPath = `/admin/billing/store-quotas`;
57914
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
57915
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
57916
+ let baseOptions;
57917
+ if (configuration) {
57918
+ baseOptions = configuration.baseOptions;
57919
+ }
57920
+
57921
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
57922
+ const localVarHeaderParameter = {} as any;
57923
+ const localVarQueryParameter = {} as any;
57924
+
57925
+ // authentication BearerAuth required
57926
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
57927
+
57928
+ if (page !== undefined) {
57929
+ localVarQueryParameter['page'] = page;
57930
+ }
57931
+
57932
+ if (perPage !== undefined) {
57933
+ localVarQueryParameter['per_page'] = perPage;
57934
+ }
57935
+
57936
+ if (search !== undefined) {
57937
+ localVarQueryParameter['search'] = search;
57938
+ }
57939
+
57940
+
57941
+
57942
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
57943
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
57944
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
57945
+
57946
+ return {
57947
+ url: toPathString(localVarUrlObj),
57948
+ options: localVarRequestOptions,
57949
+ };
57950
+ },
57951
+ /**
57952
+ * Creates a per-store credit quota with configurable window and enforcement
57953
+ * @summary Create store credit quota
57954
+ * @param {DataTypesStoreQuotaRequest} dataTypesStoreQuotaRequest Quota configuration
57955
+ * @param {*} [options] Override http request option.
57956
+ * @throws {RequiredError}
57957
+ */
57958
+ adminBillingStoreQuotasPost: async (dataTypesStoreQuotaRequest: DataTypesStoreQuotaRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
57959
+ // verify required parameter 'dataTypesStoreQuotaRequest' is not null or undefined
57960
+ assertParamExists('adminBillingStoreQuotasPost', 'dataTypesStoreQuotaRequest', dataTypesStoreQuotaRequest)
57961
+ const localVarPath = `/admin/billing/store-quotas`;
57962
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
57963
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
57964
+ let baseOptions;
57965
+ if (configuration) {
57966
+ baseOptions = configuration.baseOptions;
57967
+ }
57968
+
57969
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
57970
+ const localVarHeaderParameter = {} as any;
57971
+ const localVarQueryParameter = {} as any;
57972
+
57973
+ // authentication BearerAuth required
57974
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
57975
+
57976
+
57977
+
57978
+ localVarHeaderParameter['Content-Type'] = 'application/json';
57979
+
57980
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
57981
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
57982
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
57983
+ localVarRequestOptions.data = serializeDataIfNeeded(dataTypesStoreQuotaRequest, localVarRequestOptions, configuration)
57984
+
57985
+ return {
57986
+ url: toPathString(localVarUrlObj),
57987
+ options: localVarRequestOptions,
57988
+ };
57989
+ },
57990
+ /**
57991
+ * Deletes a per-store credit quota by UUID
57992
+ * @summary Delete store credit quota
57993
+ * @param {string} quotaUuid Quota UUID
57994
+ * @param {*} [options] Override http request option.
57995
+ * @throws {RequiredError}
57996
+ */
57997
+ adminBillingStoreQuotasQuotaUuidDelete: async (quotaUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
57998
+ // verify required parameter 'quotaUuid' is not null or undefined
57999
+ assertParamExists('adminBillingStoreQuotasQuotaUuidDelete', 'quotaUuid', quotaUuid)
58000
+ const localVarPath = `/admin/billing/store-quotas/{quotaUuid}`
58001
+ .replace(`{${"quotaUuid"}}`, encodeURIComponent(String(quotaUuid)));
58002
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
58003
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
58004
+ let baseOptions;
58005
+ if (configuration) {
58006
+ baseOptions = configuration.baseOptions;
58007
+ }
58008
+
58009
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
58010
+ const localVarHeaderParameter = {} as any;
58011
+ const localVarQueryParameter = {} as any;
58012
+
58013
+ // authentication BearerAuth required
58014
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
58015
+
58016
+
58017
+
58018
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
58019
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
58020
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
58021
+
58022
+ return {
58023
+ url: toPathString(localVarUrlObj),
58024
+ options: localVarRequestOptions,
58025
+ };
58026
+ },
58027
+ /**
58028
+ * Returns a single store credit quota by UUID
58029
+ * @summary Get store credit quota
58030
+ * @param {string} quotaUuid Quota UUID
58031
+ * @param {*} [options] Override http request option.
58032
+ * @throws {RequiredError}
58033
+ */
58034
+ adminBillingStoreQuotasQuotaUuidGet: async (quotaUuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
58035
+ // verify required parameter 'quotaUuid' is not null or undefined
58036
+ assertParamExists('adminBillingStoreQuotasQuotaUuidGet', 'quotaUuid', quotaUuid)
58037
+ const localVarPath = `/admin/billing/store-quotas/{quotaUuid}`
58038
+ .replace(`{${"quotaUuid"}}`, encodeURIComponent(String(quotaUuid)));
58039
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
58040
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
58041
+ let baseOptions;
58042
+ if (configuration) {
58043
+ baseOptions = configuration.baseOptions;
58044
+ }
58045
+
58046
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
58047
+ const localVarHeaderParameter = {} as any;
58048
+ const localVarQueryParameter = {} as any;
58049
+
58050
+ // authentication BearerAuth required
58051
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
58052
+
58053
+
58054
+
58055
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
58056
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
58057
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
58058
+
58059
+ return {
58060
+ url: toPathString(localVarUrlObj),
58061
+ options: localVarRequestOptions,
58062
+ };
58063
+ },
58064
+ /**
58065
+ * Updates an existing per-store credit quota
58066
+ * @summary Update store credit quota
58067
+ * @param {string} quotaUuid Quota UUID
58068
+ * @param {DataTypesStoreQuotaRequest} dataTypesStoreQuotaRequest Updated quota configuration
58069
+ * @param {*} [options] Override http request option.
58070
+ * @throws {RequiredError}
58071
+ */
58072
+ adminBillingStoreQuotasQuotaUuidPut: async (quotaUuid: string, dataTypesStoreQuotaRequest: DataTypesStoreQuotaRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
58073
+ // verify required parameter 'quotaUuid' is not null or undefined
58074
+ assertParamExists('adminBillingStoreQuotasQuotaUuidPut', 'quotaUuid', quotaUuid)
58075
+ // verify required parameter 'dataTypesStoreQuotaRequest' is not null or undefined
58076
+ assertParamExists('adminBillingStoreQuotasQuotaUuidPut', 'dataTypesStoreQuotaRequest', dataTypesStoreQuotaRequest)
58077
+ const localVarPath = `/admin/billing/store-quotas/{quotaUuid}`
58078
+ .replace(`{${"quotaUuid"}}`, encodeURIComponent(String(quotaUuid)));
58079
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
58080
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
58081
+ let baseOptions;
58082
+ if (configuration) {
58083
+ baseOptions = configuration.baseOptions;
58084
+ }
58085
+
58086
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
58087
+ const localVarHeaderParameter = {} as any;
58088
+ const localVarQueryParameter = {} as any;
58089
+
58090
+ // authentication BearerAuth required
58091
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
58092
+
58093
+
58094
+
58095
+ localVarHeaderParameter['Content-Type'] = 'application/json';
58096
+
58097
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
58098
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
58099
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
58100
+ localVarRequestOptions.data = serializeDataIfNeeded(dataTypesStoreQuotaRequest, localVarRequestOptions, configuration)
58101
+
58102
+ return {
58103
+ url: toPathString(localVarUrlObj),
58104
+ options: localVarRequestOptions,
58105
+ };
58106
+ },
58107
+ /**
58108
+ * Returns paginated usage summary for all stores in the organization
58109
+ * @summary Get all stores usage summary
58110
+ * @param {number} [page] Page number
58111
+ * @param {number} [perPage] Items per page
58112
+ * @param {*} [options] Override http request option.
58113
+ * @throws {RequiredError}
58114
+ */
58115
+ adminBillingStoreUsageGet: async (page?: number, perPage?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
58116
+ const localVarPath = `/admin/billing/store-usage`;
58117
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
58118
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
58119
+ let baseOptions;
58120
+ if (configuration) {
58121
+ baseOptions = configuration.baseOptions;
58122
+ }
58123
+
58124
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
58125
+ const localVarHeaderParameter = {} as any;
58126
+ const localVarQueryParameter = {} as any;
58127
+
58128
+ // authentication BearerAuth required
58129
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
58130
+
58131
+ if (page !== undefined) {
58132
+ localVarQueryParameter['page'] = page;
58133
+ }
58134
+
58135
+ if (perPage !== undefined) {
58136
+ localVarQueryParameter['per_page'] = perPage;
58137
+ }
58138
+
58139
+
58140
+
58141
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
58142
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
58143
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
58144
+
58145
+ return {
58146
+ url: toPathString(localVarUrlObj),
58147
+ options: localVarRequestOptions,
58148
+ };
58149
+ },
58150
+ /**
58151
+ * Returns detailed usage breakdown for a single store
58152
+ * @summary Get single store usage detail
58153
+ * @param {string} xStoreId Store external ID
58154
+ * @param {*} [options] Override http request option.
58155
+ * @throws {RequiredError}
58156
+ */
58157
+ adminBillingStoreUsageXStoreIdGet: async (xStoreId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
58158
+ // verify required parameter 'xStoreId' is not null or undefined
58159
+ assertParamExists('adminBillingStoreUsageXStoreIdGet', 'xStoreId', xStoreId)
58160
+ const localVarPath = `/admin/billing/store-usage/{xStoreId}`
58161
+ .replace(`{${"xStoreId"}}`, encodeURIComponent(String(xStoreId)));
58162
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
58163
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
58164
+ let baseOptions;
58165
+ if (configuration) {
58166
+ baseOptions = configuration.baseOptions;
58167
+ }
58168
+
58169
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
58170
+ const localVarHeaderParameter = {} as any;
58171
+ const localVarQueryParameter = {} as any;
58172
+
58173
+ // authentication BearerAuth required
58174
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
58175
+
58176
+
58177
+
57413
58178
  setSearchParams(localVarUrlObj, localVarQueryParameter);
57414
58179
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
57415
58180
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -57673,6 +58438,25 @@ export const BillingDashboardApiFp = function(configuration?: Configuration) {
57673
58438
  const localVarOperationServerBasePath = operationServerMap['BillingDashboardApi.adminBillingActivePlanGet']?.[localVarOperationServerIndex]?.url;
57674
58439
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
57675
58440
  },
58441
+ /**
58442
+ * Returns paginated alert trigger history with optional filters
58443
+ * @summary Get alert trigger history
58444
+ * @param {string} [storeId] Filter by store xStoreID
58445
+ * @param {string} [from] Start date (YYYY-MM-DD)
58446
+ * @param {string} [to] End date (YYYY-MM-DD)
58447
+ * @param {string} [alertType] Filter by alert type (store_usage_threshold, store_usage_approaching, quota_hard_block)
58448
+ * @param {string} [status] Filter by status (resolved, unresolved)
58449
+ * @param {number} [page] Page number
58450
+ * @param {number} [perPage] Items per page
58451
+ * @param {*} [options] Override http request option.
58452
+ * @throws {RequiredError}
58453
+ */
58454
+ async adminBillingAlertHistoryGet(storeId?: string, from?: string, to?: string, alertType?: string, status?: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesResponse>> {
58455
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminBillingAlertHistoryGet(storeId, from, to, alertType, status, page, perPage, options);
58456
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
58457
+ const localVarOperationServerBasePath = operationServerMap['BillingDashboardApi.adminBillingAlertHistoryGet']?.[localVarOperationServerIndex]?.url;
58458
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
58459
+ },
57676
58460
  /**
57677
58461
  * Retrieves paginated billing alerts with store filtering and full-text search across: alert ID, alert name, alert type, threshold values, units, org/store name, created by name, emails, and JSON fields.
57678
58462
  * @summary Get billing alerts
@@ -57783,6 +58567,21 @@ export const BillingDashboardApiFp = function(configuration?: Configuration) {
57783
58567
  const localVarOperationServerBasePath = operationServerMap['BillingDashboardApi.adminBillingCreditLedgerGet']?.[localVarOperationServerIndex]?.url;
57784
58568
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
57785
58569
  },
58570
+ /**
58571
+ * Exports credit notes as a CSV file formatted for GSTR-1 filing. Includes credit note number, original invoice reference, GST breakdown, and SAC code.
58572
+ * @summary Export credit notes for GSTR-1
58573
+ * @param {string} [startDate] Start date (YYYY-MM-DD format)
58574
+ * @param {string} [endDate] End date (YYYY-MM-DD format)
58575
+ * @param {string} [fiscalYear] Fiscal year (e.g., 2526)
58576
+ * @param {*} [options] Override http request option.
58577
+ * @throws {RequiredError}
58578
+ */
58579
+ async adminBillingCreditNotesExportGet(startDate?: string, endDate?: string, fiscalYear?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
58580
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminBillingCreditNotesExportGet(startDate, endDate, fiscalYear, options);
58581
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
58582
+ const localVarOperationServerBasePath = operationServerMap['BillingDashboardApi.adminBillingCreditNotesExportGet']?.[localVarOperationServerIndex]?.url;
58583
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
58584
+ },
57786
58585
  /**
57787
58586
  * Retrieves paginated list of credit purchases with filtering options for the authenticated user\'s organization. Uses page/page_size pagination like analytics APIs.
57788
58587
  * @summary Get credit purchases
@@ -57876,11 +58675,12 @@ export const BillingDashboardApiFp = function(configuration?: Configuration) {
57876
58675
  * @param {number} [limit] Number of results per page (default: 20, max: 100) - alternative to page_size
57877
58676
  * @param {AdminBillingInvoicesGetSortByEnum} [sortBy] Field to sort by
57878
58677
  * @param {AdminBillingInvoicesGetSortOrderEnum} [sortOrder] Sort direction
58678
+ * @param {AdminBillingInvoicesGetInvoiceTypeEnum} [invoiceType] Filter by invoice type
57879
58679
  * @param {*} [options] Override http request option.
57880
58680
  * @throws {RequiredError}
57881
58681
  */
57882
- async adminBillingInvoicesGet(orgId?: number, status?: string, startDate?: string, endDate?: string, search?: string, page?: number, pageSize?: number, limit?: number, sortBy?: AdminBillingInvoicesGetSortByEnum, sortOrder?: AdminBillingInvoicesGetSortOrderEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesResponse>> {
57883
- const localVarAxiosArgs = await localVarAxiosParamCreator.adminBillingInvoicesGet(orgId, status, startDate, endDate, search, page, pageSize, limit, sortBy, sortOrder, options);
58682
+ async adminBillingInvoicesGet(orgId?: number, status?: string, startDate?: string, endDate?: string, search?: string, page?: number, pageSize?: number, limit?: number, sortBy?: AdminBillingInvoicesGetSortByEnum, sortOrder?: AdminBillingInvoicesGetSortOrderEnum, invoiceType?: AdminBillingInvoicesGetInvoiceTypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesResponse>> {
58683
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminBillingInvoicesGet(orgId, status, startDate, endDate, search, page, pageSize, limit, sortBy, sortOrder, invoiceType, options);
57884
58684
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
57885
58685
  const localVarOperationServerBasePath = operationServerMap['BillingDashboardApi.adminBillingInvoicesGet']?.[localVarOperationServerIndex]?.url;
57886
58686
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -57951,6 +58751,19 @@ export const BillingDashboardApiFp = function(configuration?: Configuration) {
57951
58751
  const localVarOperationServerBasePath = operationServerMap['BillingDashboardApi.adminBillingInvoicesIdPut']?.[localVarOperationServerIndex]?.url;
57952
58752
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
57953
58753
  },
58754
+ /**
58755
+ * Voids an issued credit note by setting credit_note_status to \'voided\'. Only credit notes with status \'issued\' can be voided.
58756
+ * @summary Void a credit note
58757
+ * @param {string} id Invoice ID (UUID)
58758
+ * @param {*} [options] Override http request option.
58759
+ * @throws {RequiredError}
58760
+ */
58761
+ async adminBillingInvoicesIdVoidPost(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesResponse>> {
58762
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminBillingInvoicesIdVoidPost(id, options);
58763
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
58764
+ const localVarOperationServerBasePath = operationServerMap['BillingDashboardApi.adminBillingInvoicesIdVoidPost']?.[localVarOperationServerIndex]?.url;
58765
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
58766
+ },
57954
58767
  /**
57955
58768
  * Initiates payment for a pending invoice (for subscription orders with failed auto-payments)
57956
58769
  * @summary Pay a pending invoice
@@ -58171,6 +58984,101 @@ export const BillingDashboardApiFp = function(configuration?: Configuration) {
58171
58984
  const localVarOperationServerBasePath = operationServerMap['BillingDashboardApi.adminBillingSavedCardsGet']?.[localVarOperationServerIndex]?.url;
58172
58985
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
58173
58986
  },
58987
+ /**
58988
+ * Returns paginated list of per-store credit quotas for the organization
58989
+ * @summary List store credit quotas
58990
+ * @param {number} [page] Page number
58991
+ * @param {number} [perPage] Items per page
58992
+ * @param {string} [search] Search by store name
58993
+ * @param {*} [options] Override http request option.
58994
+ * @throws {RequiredError}
58995
+ */
58996
+ async adminBillingStoreQuotasGet(page?: number, perPage?: number, search?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesResponse>> {
58997
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminBillingStoreQuotasGet(page, perPage, search, options);
58998
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
58999
+ const localVarOperationServerBasePath = operationServerMap['BillingDashboardApi.adminBillingStoreQuotasGet']?.[localVarOperationServerIndex]?.url;
59000
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
59001
+ },
59002
+ /**
59003
+ * Creates a per-store credit quota with configurable window and enforcement
59004
+ * @summary Create store credit quota
59005
+ * @param {DataTypesStoreQuotaRequest} dataTypesStoreQuotaRequest Quota configuration
59006
+ * @param {*} [options] Override http request option.
59007
+ * @throws {RequiredError}
59008
+ */
59009
+ async adminBillingStoreQuotasPost(dataTypesStoreQuotaRequest: DataTypesStoreQuotaRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesResponse>> {
59010
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminBillingStoreQuotasPost(dataTypesStoreQuotaRequest, options);
59011
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
59012
+ const localVarOperationServerBasePath = operationServerMap['BillingDashboardApi.adminBillingStoreQuotasPost']?.[localVarOperationServerIndex]?.url;
59013
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
59014
+ },
59015
+ /**
59016
+ * Deletes a per-store credit quota by UUID
59017
+ * @summary Delete store credit quota
59018
+ * @param {string} quotaUuid Quota UUID
59019
+ * @param {*} [options] Override http request option.
59020
+ * @throws {RequiredError}
59021
+ */
59022
+ async adminBillingStoreQuotasQuotaUuidDelete(quotaUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesResponse>> {
59023
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminBillingStoreQuotasQuotaUuidDelete(quotaUuid, options);
59024
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
59025
+ const localVarOperationServerBasePath = operationServerMap['BillingDashboardApi.adminBillingStoreQuotasQuotaUuidDelete']?.[localVarOperationServerIndex]?.url;
59026
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
59027
+ },
59028
+ /**
59029
+ * Returns a single store credit quota by UUID
59030
+ * @summary Get store credit quota
59031
+ * @param {string} quotaUuid Quota UUID
59032
+ * @param {*} [options] Override http request option.
59033
+ * @throws {RequiredError}
59034
+ */
59035
+ async adminBillingStoreQuotasQuotaUuidGet(quotaUuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesResponse>> {
59036
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminBillingStoreQuotasQuotaUuidGet(quotaUuid, options);
59037
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
59038
+ const localVarOperationServerBasePath = operationServerMap['BillingDashboardApi.adminBillingStoreQuotasQuotaUuidGet']?.[localVarOperationServerIndex]?.url;
59039
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
59040
+ },
59041
+ /**
59042
+ * Updates an existing per-store credit quota
59043
+ * @summary Update store credit quota
59044
+ * @param {string} quotaUuid Quota UUID
59045
+ * @param {DataTypesStoreQuotaRequest} dataTypesStoreQuotaRequest Updated quota configuration
59046
+ * @param {*} [options] Override http request option.
59047
+ * @throws {RequiredError}
59048
+ */
59049
+ async adminBillingStoreQuotasQuotaUuidPut(quotaUuid: string, dataTypesStoreQuotaRequest: DataTypesStoreQuotaRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesResponse>> {
59050
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminBillingStoreQuotasQuotaUuidPut(quotaUuid, dataTypesStoreQuotaRequest, options);
59051
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
59052
+ const localVarOperationServerBasePath = operationServerMap['BillingDashboardApi.adminBillingStoreQuotasQuotaUuidPut']?.[localVarOperationServerIndex]?.url;
59053
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
59054
+ },
59055
+ /**
59056
+ * Returns paginated usage summary for all stores in the organization
59057
+ * @summary Get all stores usage summary
59058
+ * @param {number} [page] Page number
59059
+ * @param {number} [perPage] Items per page
59060
+ * @param {*} [options] Override http request option.
59061
+ * @throws {RequiredError}
59062
+ */
59063
+ async adminBillingStoreUsageGet(page?: number, perPage?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesResponse>> {
59064
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminBillingStoreUsageGet(page, perPage, options);
59065
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
59066
+ const localVarOperationServerBasePath = operationServerMap['BillingDashboardApi.adminBillingStoreUsageGet']?.[localVarOperationServerIndex]?.url;
59067
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
59068
+ },
59069
+ /**
59070
+ * Returns detailed usage breakdown for a single store
59071
+ * @summary Get single store usage detail
59072
+ * @param {string} xStoreId Store external ID
59073
+ * @param {*} [options] Override http request option.
59074
+ * @throws {RequiredError}
59075
+ */
59076
+ async adminBillingStoreUsageXStoreIdGet(xStoreId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesResponse>> {
59077
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminBillingStoreUsageXStoreIdGet(xStoreId, options);
59078
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
59079
+ const localVarOperationServerBasePath = operationServerMap['BillingDashboardApi.adminBillingStoreUsageXStoreIdGet']?.[localVarOperationServerIndex]?.url;
59080
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
59081
+ },
58174
59082
  /**
58175
59083
  * Returns detailed usage information with charts and breakdown, supports time granularity and pagination
58176
59084
  * @summary Get usage details with granularity and pagination
@@ -58263,6 +59171,22 @@ export const BillingDashboardApiFactory = function (configuration?: Configuratio
58263
59171
  adminBillingActivePlanGet(options?: RawAxiosRequestConfig): AxiosPromise<DataTypesGenericResponseDataTypesCurrentPlanInfo> {
58264
59172
  return localVarFp.adminBillingActivePlanGet(options).then((request) => request(axios, basePath));
58265
59173
  },
59174
+ /**
59175
+ * Returns paginated alert trigger history with optional filters
59176
+ * @summary Get alert trigger history
59177
+ * @param {string} [storeId] Filter by store xStoreID
59178
+ * @param {string} [from] Start date (YYYY-MM-DD)
59179
+ * @param {string} [to] End date (YYYY-MM-DD)
59180
+ * @param {string} [alertType] Filter by alert type (store_usage_threshold, store_usage_approaching, quota_hard_block)
59181
+ * @param {string} [status] Filter by status (resolved, unresolved)
59182
+ * @param {number} [page] Page number
59183
+ * @param {number} [perPage] Items per page
59184
+ * @param {*} [options] Override http request option.
59185
+ * @throws {RequiredError}
59186
+ */
59187
+ adminBillingAlertHistoryGet(storeId?: string, from?: string, to?: string, alertType?: string, status?: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
59188
+ return localVarFp.adminBillingAlertHistoryGet(storeId, from, to, alertType, status, page, perPage, options).then((request) => request(axios, basePath));
59189
+ },
58266
59190
  /**
58267
59191
  * Retrieves paginated billing alerts with store filtering and full-text search across: alert ID, alert name, alert type, threshold values, units, org/store name, created by name, emails, and JSON fields.
58268
59192
  * @summary Get billing alerts
@@ -58352,6 +59276,18 @@ export const BillingDashboardApiFactory = function (configuration?: Configuratio
58352
59276
  adminBillingCreditLedgerGet(orgId?: number, startDate?: string, endDate?: string, page?: number, pageSize?: number, limit?: number, offset?: number, sortBy?: AdminBillingCreditLedgerGetSortByEnum, sortOrder?: AdminBillingCreditLedgerGetSortOrderEnum, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
58353
59277
  return localVarFp.adminBillingCreditLedgerGet(orgId, startDate, endDate, page, pageSize, limit, offset, sortBy, sortOrder, options).then((request) => request(axios, basePath));
58354
59278
  },
59279
+ /**
59280
+ * Exports credit notes as a CSV file formatted for GSTR-1 filing. Includes credit note number, original invoice reference, GST breakdown, and SAC code.
59281
+ * @summary Export credit notes for GSTR-1
59282
+ * @param {string} [startDate] Start date (YYYY-MM-DD format)
59283
+ * @param {string} [endDate] End date (YYYY-MM-DD format)
59284
+ * @param {string} [fiscalYear] Fiscal year (e.g., 2526)
59285
+ * @param {*} [options] Override http request option.
59286
+ * @throws {RequiredError}
59287
+ */
59288
+ adminBillingCreditNotesExportGet(startDate?: string, endDate?: string, fiscalYear?: string, options?: RawAxiosRequestConfig): AxiosPromise<any> {
59289
+ return localVarFp.adminBillingCreditNotesExportGet(startDate, endDate, fiscalYear, options).then((request) => request(axios, basePath));
59290
+ },
58355
59291
  /**
58356
59292
  * Retrieves paginated list of credit purchases with filtering options for the authenticated user\'s organization. Uses page/page_size pagination like analytics APIs.
58357
59293
  * @summary Get credit purchases
@@ -58430,11 +59366,12 @@ export const BillingDashboardApiFactory = function (configuration?: Configuratio
58430
59366
  * @param {number} [limit] Number of results per page (default: 20, max: 100) - alternative to page_size
58431
59367
  * @param {AdminBillingInvoicesGetSortByEnum} [sortBy] Field to sort by
58432
59368
  * @param {AdminBillingInvoicesGetSortOrderEnum} [sortOrder] Sort direction
59369
+ * @param {AdminBillingInvoicesGetInvoiceTypeEnum} [invoiceType] Filter by invoice type
58433
59370
  * @param {*} [options] Override http request option.
58434
59371
  * @throws {RequiredError}
58435
59372
  */
58436
- adminBillingInvoicesGet(orgId?: number, status?: string, startDate?: string, endDate?: string, search?: string, page?: number, pageSize?: number, limit?: number, sortBy?: AdminBillingInvoicesGetSortByEnum, sortOrder?: AdminBillingInvoicesGetSortOrderEnum, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
58437
- return localVarFp.adminBillingInvoicesGet(orgId, status, startDate, endDate, search, page, pageSize, limit, sortBy, sortOrder, options).then((request) => request(axios, basePath));
59373
+ adminBillingInvoicesGet(orgId?: number, status?: string, startDate?: string, endDate?: string, search?: string, page?: number, pageSize?: number, limit?: number, sortBy?: AdminBillingInvoicesGetSortByEnum, sortOrder?: AdminBillingInvoicesGetSortOrderEnum, invoiceType?: AdminBillingInvoicesGetInvoiceTypeEnum, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
59374
+ return localVarFp.adminBillingInvoicesGet(orgId, status, startDate, endDate, search, page, pageSize, limit, sortBy, sortOrder, invoiceType, options).then((request) => request(axios, basePath));
58438
59375
  },
58439
59376
  /**
58440
59377
  * Deletes an invoice (soft delete by setting status to cancelled)
@@ -58487,6 +59424,16 @@ export const BillingDashboardApiFactory = function (configuration?: Configuratio
58487
59424
  adminBillingInvoicesIdPut(id: string, dataTypesUpdateInvoiceRequest: DataTypesUpdateInvoiceRequest, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
58488
59425
  return localVarFp.adminBillingInvoicesIdPut(id, dataTypesUpdateInvoiceRequest, options).then((request) => request(axios, basePath));
58489
59426
  },
59427
+ /**
59428
+ * Voids an issued credit note by setting credit_note_status to \'voided\'. Only credit notes with status \'issued\' can be voided.
59429
+ * @summary Void a credit note
59430
+ * @param {string} id Invoice ID (UUID)
59431
+ * @param {*} [options] Override http request option.
59432
+ * @throws {RequiredError}
59433
+ */
59434
+ adminBillingInvoicesIdVoidPost(id: string, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
59435
+ return localVarFp.adminBillingInvoicesIdVoidPost(id, options).then((request) => request(axios, basePath));
59436
+ },
58490
59437
  /**
58491
59438
  * Initiates payment for a pending invoice (for subscription orders with failed auto-payments)
58492
59439
  * @summary Pay a pending invoice
@@ -58662,6 +59609,80 @@ export const BillingDashboardApiFactory = function (configuration?: Configuratio
58662
59609
  adminBillingSavedCardsGet(options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
58663
59610
  return localVarFp.adminBillingSavedCardsGet(options).then((request) => request(axios, basePath));
58664
59611
  },
59612
+ /**
59613
+ * Returns paginated list of per-store credit quotas for the organization
59614
+ * @summary List store credit quotas
59615
+ * @param {number} [page] Page number
59616
+ * @param {number} [perPage] Items per page
59617
+ * @param {string} [search] Search by store name
59618
+ * @param {*} [options] Override http request option.
59619
+ * @throws {RequiredError}
59620
+ */
59621
+ adminBillingStoreQuotasGet(page?: number, perPage?: number, search?: string, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
59622
+ return localVarFp.adminBillingStoreQuotasGet(page, perPage, search, options).then((request) => request(axios, basePath));
59623
+ },
59624
+ /**
59625
+ * Creates a per-store credit quota with configurable window and enforcement
59626
+ * @summary Create store credit quota
59627
+ * @param {DataTypesStoreQuotaRequest} dataTypesStoreQuotaRequest Quota configuration
59628
+ * @param {*} [options] Override http request option.
59629
+ * @throws {RequiredError}
59630
+ */
59631
+ adminBillingStoreQuotasPost(dataTypesStoreQuotaRequest: DataTypesStoreQuotaRequest, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
59632
+ return localVarFp.adminBillingStoreQuotasPost(dataTypesStoreQuotaRequest, options).then((request) => request(axios, basePath));
59633
+ },
59634
+ /**
59635
+ * Deletes a per-store credit quota by UUID
59636
+ * @summary Delete store credit quota
59637
+ * @param {string} quotaUuid Quota UUID
59638
+ * @param {*} [options] Override http request option.
59639
+ * @throws {RequiredError}
59640
+ */
59641
+ adminBillingStoreQuotasQuotaUuidDelete(quotaUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
59642
+ return localVarFp.adminBillingStoreQuotasQuotaUuidDelete(quotaUuid, options).then((request) => request(axios, basePath));
59643
+ },
59644
+ /**
59645
+ * Returns a single store credit quota by UUID
59646
+ * @summary Get store credit quota
59647
+ * @param {string} quotaUuid Quota UUID
59648
+ * @param {*} [options] Override http request option.
59649
+ * @throws {RequiredError}
59650
+ */
59651
+ adminBillingStoreQuotasQuotaUuidGet(quotaUuid: string, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
59652
+ return localVarFp.adminBillingStoreQuotasQuotaUuidGet(quotaUuid, options).then((request) => request(axios, basePath));
59653
+ },
59654
+ /**
59655
+ * Updates an existing per-store credit quota
59656
+ * @summary Update store credit quota
59657
+ * @param {string} quotaUuid Quota UUID
59658
+ * @param {DataTypesStoreQuotaRequest} dataTypesStoreQuotaRequest Updated quota configuration
59659
+ * @param {*} [options] Override http request option.
59660
+ * @throws {RequiredError}
59661
+ */
59662
+ adminBillingStoreQuotasQuotaUuidPut(quotaUuid: string, dataTypesStoreQuotaRequest: DataTypesStoreQuotaRequest, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
59663
+ return localVarFp.adminBillingStoreQuotasQuotaUuidPut(quotaUuid, dataTypesStoreQuotaRequest, options).then((request) => request(axios, basePath));
59664
+ },
59665
+ /**
59666
+ * Returns paginated usage summary for all stores in the organization
59667
+ * @summary Get all stores usage summary
59668
+ * @param {number} [page] Page number
59669
+ * @param {number} [perPage] Items per page
59670
+ * @param {*} [options] Override http request option.
59671
+ * @throws {RequiredError}
59672
+ */
59673
+ adminBillingStoreUsageGet(page?: number, perPage?: number, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
59674
+ return localVarFp.adminBillingStoreUsageGet(page, perPage, options).then((request) => request(axios, basePath));
59675
+ },
59676
+ /**
59677
+ * Returns detailed usage breakdown for a single store
59678
+ * @summary Get single store usage detail
59679
+ * @param {string} xStoreId Store external ID
59680
+ * @param {*} [options] Override http request option.
59681
+ * @throws {RequiredError}
59682
+ */
59683
+ adminBillingStoreUsageXStoreIdGet(xStoreId: string, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
59684
+ return localVarFp.adminBillingStoreUsageXStoreIdGet(xStoreId, options).then((request) => request(axios, basePath));
59685
+ },
58665
59686
  /**
58666
59687
  * Returns detailed usage information with charts and breakdown, supports time granularity and pagination
58667
59688
  * @summary Get usage details with granularity and pagination
@@ -58741,6 +59762,24 @@ export class BillingDashboardApi extends BaseAPI {
58741
59762
  return BillingDashboardApiFp(this.configuration).adminBillingActivePlanGet(options).then((request) => request(this.axios, this.basePath));
58742
59763
  }
58743
59764
 
59765
+ /**
59766
+ * Returns paginated alert trigger history with optional filters
59767
+ * @summary Get alert trigger history
59768
+ * @param {string} [storeId] Filter by store xStoreID
59769
+ * @param {string} [from] Start date (YYYY-MM-DD)
59770
+ * @param {string} [to] End date (YYYY-MM-DD)
59771
+ * @param {string} [alertType] Filter by alert type (store_usage_threshold, store_usage_approaching, quota_hard_block)
59772
+ * @param {string} [status] Filter by status (resolved, unresolved)
59773
+ * @param {number} [page] Page number
59774
+ * @param {number} [perPage] Items per page
59775
+ * @param {*} [options] Override http request option.
59776
+ * @throws {RequiredError}
59777
+ * @memberof BillingDashboardApi
59778
+ */
59779
+ public adminBillingAlertHistoryGet(storeId?: string, from?: string, to?: string, alertType?: string, status?: string, page?: number, perPage?: number, options?: RawAxiosRequestConfig) {
59780
+ return BillingDashboardApiFp(this.configuration).adminBillingAlertHistoryGet(storeId, from, to, alertType, status, page, perPage, options).then((request) => request(this.axios, this.basePath));
59781
+ }
59782
+
58744
59783
  /**
58745
59784
  * Retrieves paginated billing alerts with store filtering and full-text search across: alert ID, alert name, alert type, threshold values, units, org/store name, created by name, emails, and JSON fields.
58746
59785
  * @summary Get billing alerts
@@ -58844,6 +59883,20 @@ export class BillingDashboardApi extends BaseAPI {
58844
59883
  return BillingDashboardApiFp(this.configuration).adminBillingCreditLedgerGet(orgId, startDate, endDate, page, pageSize, limit, offset, sortBy, sortOrder, options).then((request) => request(this.axios, this.basePath));
58845
59884
  }
58846
59885
 
59886
+ /**
59887
+ * Exports credit notes as a CSV file formatted for GSTR-1 filing. Includes credit note number, original invoice reference, GST breakdown, and SAC code.
59888
+ * @summary Export credit notes for GSTR-1
59889
+ * @param {string} [startDate] Start date (YYYY-MM-DD format)
59890
+ * @param {string} [endDate] End date (YYYY-MM-DD format)
59891
+ * @param {string} [fiscalYear] Fiscal year (e.g., 2526)
59892
+ * @param {*} [options] Override http request option.
59893
+ * @throws {RequiredError}
59894
+ * @memberof BillingDashboardApi
59895
+ */
59896
+ public adminBillingCreditNotesExportGet(startDate?: string, endDate?: string, fiscalYear?: string, options?: RawAxiosRequestConfig) {
59897
+ return BillingDashboardApiFp(this.configuration).adminBillingCreditNotesExportGet(startDate, endDate, fiscalYear, options).then((request) => request(this.axios, this.basePath));
59898
+ }
59899
+
58847
59900
  /**
58848
59901
  * Retrieves paginated list of credit purchases with filtering options for the authenticated user\'s organization. Uses page/page_size pagination like analytics APIs.
58849
59902
  * @summary Get credit purchases
@@ -58932,12 +59985,13 @@ export class BillingDashboardApi extends BaseAPI {
58932
59985
  * @param {number} [limit] Number of results per page (default: 20, max: 100) - alternative to page_size
58933
59986
  * @param {AdminBillingInvoicesGetSortByEnum} [sortBy] Field to sort by
58934
59987
  * @param {AdminBillingInvoicesGetSortOrderEnum} [sortOrder] Sort direction
59988
+ * @param {AdminBillingInvoicesGetInvoiceTypeEnum} [invoiceType] Filter by invoice type
58935
59989
  * @param {*} [options] Override http request option.
58936
59990
  * @throws {RequiredError}
58937
59991
  * @memberof BillingDashboardApi
58938
59992
  */
58939
- public adminBillingInvoicesGet(orgId?: number, status?: string, startDate?: string, endDate?: string, search?: string, page?: number, pageSize?: number, limit?: number, sortBy?: AdminBillingInvoicesGetSortByEnum, sortOrder?: AdminBillingInvoicesGetSortOrderEnum, options?: RawAxiosRequestConfig) {
58940
- return BillingDashboardApiFp(this.configuration).adminBillingInvoicesGet(orgId, status, startDate, endDate, search, page, pageSize, limit, sortBy, sortOrder, options).then((request) => request(this.axios, this.basePath));
59993
+ public adminBillingInvoicesGet(orgId?: number, status?: string, startDate?: string, endDate?: string, search?: string, page?: number, pageSize?: number, limit?: number, sortBy?: AdminBillingInvoicesGetSortByEnum, sortOrder?: AdminBillingInvoicesGetSortOrderEnum, invoiceType?: AdminBillingInvoicesGetInvoiceTypeEnum, options?: RawAxiosRequestConfig) {
59994
+ return BillingDashboardApiFp(this.configuration).adminBillingInvoicesGet(orgId, status, startDate, endDate, search, page, pageSize, limit, sortBy, sortOrder, invoiceType, options).then((request) => request(this.axios, this.basePath));
58941
59995
  }
58942
59996
 
58943
59997
  /**
@@ -59001,6 +60055,18 @@ export class BillingDashboardApi extends BaseAPI {
59001
60055
  return BillingDashboardApiFp(this.configuration).adminBillingInvoicesIdPut(id, dataTypesUpdateInvoiceRequest, options).then((request) => request(this.axios, this.basePath));
59002
60056
  }
59003
60057
 
60058
+ /**
60059
+ * Voids an issued credit note by setting credit_note_status to \'voided\'. Only credit notes with status \'issued\' can be voided.
60060
+ * @summary Void a credit note
60061
+ * @param {string} id Invoice ID (UUID)
60062
+ * @param {*} [options] Override http request option.
60063
+ * @throws {RequiredError}
60064
+ * @memberof BillingDashboardApi
60065
+ */
60066
+ public adminBillingInvoicesIdVoidPost(id: string, options?: RawAxiosRequestConfig) {
60067
+ return BillingDashboardApiFp(this.configuration).adminBillingInvoicesIdVoidPost(id, options).then((request) => request(this.axios, this.basePath));
60068
+ }
60069
+
59004
60070
  /**
59005
60071
  * Initiates payment for a pending invoice (for subscription orders with failed auto-payments)
59006
60072
  * @summary Pay a pending invoice
@@ -59206,6 +60272,94 @@ export class BillingDashboardApi extends BaseAPI {
59206
60272
  return BillingDashboardApiFp(this.configuration).adminBillingSavedCardsGet(options).then((request) => request(this.axios, this.basePath));
59207
60273
  }
59208
60274
 
60275
+ /**
60276
+ * Returns paginated list of per-store credit quotas for the organization
60277
+ * @summary List store credit quotas
60278
+ * @param {number} [page] Page number
60279
+ * @param {number} [perPage] Items per page
60280
+ * @param {string} [search] Search by store name
60281
+ * @param {*} [options] Override http request option.
60282
+ * @throws {RequiredError}
60283
+ * @memberof BillingDashboardApi
60284
+ */
60285
+ public adminBillingStoreQuotasGet(page?: number, perPage?: number, search?: string, options?: RawAxiosRequestConfig) {
60286
+ return BillingDashboardApiFp(this.configuration).adminBillingStoreQuotasGet(page, perPage, search, options).then((request) => request(this.axios, this.basePath));
60287
+ }
60288
+
60289
+ /**
60290
+ * Creates a per-store credit quota with configurable window and enforcement
60291
+ * @summary Create store credit quota
60292
+ * @param {DataTypesStoreQuotaRequest} dataTypesStoreQuotaRequest Quota configuration
60293
+ * @param {*} [options] Override http request option.
60294
+ * @throws {RequiredError}
60295
+ * @memberof BillingDashboardApi
60296
+ */
60297
+ public adminBillingStoreQuotasPost(dataTypesStoreQuotaRequest: DataTypesStoreQuotaRequest, options?: RawAxiosRequestConfig) {
60298
+ return BillingDashboardApiFp(this.configuration).adminBillingStoreQuotasPost(dataTypesStoreQuotaRequest, options).then((request) => request(this.axios, this.basePath));
60299
+ }
60300
+
60301
+ /**
60302
+ * Deletes a per-store credit quota by UUID
60303
+ * @summary Delete store credit quota
60304
+ * @param {string} quotaUuid Quota UUID
60305
+ * @param {*} [options] Override http request option.
60306
+ * @throws {RequiredError}
60307
+ * @memberof BillingDashboardApi
60308
+ */
60309
+ public adminBillingStoreQuotasQuotaUuidDelete(quotaUuid: string, options?: RawAxiosRequestConfig) {
60310
+ return BillingDashboardApiFp(this.configuration).adminBillingStoreQuotasQuotaUuidDelete(quotaUuid, options).then((request) => request(this.axios, this.basePath));
60311
+ }
60312
+
60313
+ /**
60314
+ * Returns a single store credit quota by UUID
60315
+ * @summary Get store credit quota
60316
+ * @param {string} quotaUuid Quota UUID
60317
+ * @param {*} [options] Override http request option.
60318
+ * @throws {RequiredError}
60319
+ * @memberof BillingDashboardApi
60320
+ */
60321
+ public adminBillingStoreQuotasQuotaUuidGet(quotaUuid: string, options?: RawAxiosRequestConfig) {
60322
+ return BillingDashboardApiFp(this.configuration).adminBillingStoreQuotasQuotaUuidGet(quotaUuid, options).then((request) => request(this.axios, this.basePath));
60323
+ }
60324
+
60325
+ /**
60326
+ * Updates an existing per-store credit quota
60327
+ * @summary Update store credit quota
60328
+ * @param {string} quotaUuid Quota UUID
60329
+ * @param {DataTypesStoreQuotaRequest} dataTypesStoreQuotaRequest Updated quota configuration
60330
+ * @param {*} [options] Override http request option.
60331
+ * @throws {RequiredError}
60332
+ * @memberof BillingDashboardApi
60333
+ */
60334
+ public adminBillingStoreQuotasQuotaUuidPut(quotaUuid: string, dataTypesStoreQuotaRequest: DataTypesStoreQuotaRequest, options?: RawAxiosRequestConfig) {
60335
+ return BillingDashboardApiFp(this.configuration).adminBillingStoreQuotasQuotaUuidPut(quotaUuid, dataTypesStoreQuotaRequest, options).then((request) => request(this.axios, this.basePath));
60336
+ }
60337
+
60338
+ /**
60339
+ * Returns paginated usage summary for all stores in the organization
60340
+ * @summary Get all stores usage summary
60341
+ * @param {number} [page] Page number
60342
+ * @param {number} [perPage] Items per page
60343
+ * @param {*} [options] Override http request option.
60344
+ * @throws {RequiredError}
60345
+ * @memberof BillingDashboardApi
60346
+ */
60347
+ public adminBillingStoreUsageGet(page?: number, perPage?: number, options?: RawAxiosRequestConfig) {
60348
+ return BillingDashboardApiFp(this.configuration).adminBillingStoreUsageGet(page, perPage, options).then((request) => request(this.axios, this.basePath));
60349
+ }
60350
+
60351
+ /**
60352
+ * Returns detailed usage breakdown for a single store
60353
+ * @summary Get single store usage detail
60354
+ * @param {string} xStoreId Store external ID
60355
+ * @param {*} [options] Override http request option.
60356
+ * @throws {RequiredError}
60357
+ * @memberof BillingDashboardApi
60358
+ */
60359
+ public adminBillingStoreUsageXStoreIdGet(xStoreId: string, options?: RawAxiosRequestConfig) {
60360
+ return BillingDashboardApiFp(this.configuration).adminBillingStoreUsageXStoreIdGet(xStoreId, options).then((request) => request(this.axios, this.basePath));
60361
+ }
60362
+
59209
60363
  /**
59210
60364
  * Returns detailed usage information with charts and breakdown, supports time granularity and pagination
59211
60365
  * @summary Get usage details with granularity and pagination
@@ -59361,6 +60515,14 @@ export const AdminBillingInvoicesGetSortOrderEnum = {
59361
60515
  Desc2: 'DESC'
59362
60516
  } as const;
59363
60517
  export type AdminBillingInvoicesGetSortOrderEnum = typeof AdminBillingInvoicesGetSortOrderEnum[keyof typeof AdminBillingInvoicesGetSortOrderEnum];
60518
+ /**
60519
+ * @export
60520
+ */
60521
+ export const AdminBillingInvoicesGetInvoiceTypeEnum = {
60522
+ TaxInvoice: 'tax_invoice',
60523
+ CreditNote: 'credit_note'
60524
+ } as const;
60525
+ export type AdminBillingInvoicesGetInvoiceTypeEnum = typeof AdminBillingInvoicesGetInvoiceTypeEnum[keyof typeof AdminBillingInvoicesGetInvoiceTypeEnum];
59364
60526
  /**
59365
60527
  * @export
59366
60528
  */
@@ -94344,6 +95506,45 @@ export const SubscriptionsApiAxiosParamCreator = function (configuration?: Confi
94344
95506
  options: localVarRequestOptions,
94345
95507
  };
94346
95508
  },
95509
+ /**
95510
+ * Creates a one-time Razorpay order for the net charge amount (new_plan_price - prorated_refund). Frontend opens Razorpay checkout. On payment.captured, the existing subscription is patched to the new plan.
95511
+ * @summary Create an immediate plan change order
95512
+ * @param {SubscriptionRouteImmediatePlanChangeOrderHTTPRequest} subscriptionRouteImmediatePlanChangeOrderHTTPRequest Immediate plan change order request
95513
+ * @param {*} [options] Override http request option.
95514
+ * @throws {RequiredError}
95515
+ */
95516
+ adminSubscriptionsPlanChangeImmediateOrderPost: async (subscriptionRouteImmediatePlanChangeOrderHTTPRequest: SubscriptionRouteImmediatePlanChangeOrderHTTPRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
95517
+ // verify required parameter 'subscriptionRouteImmediatePlanChangeOrderHTTPRequest' is not null or undefined
95518
+ assertParamExists('adminSubscriptionsPlanChangeImmediateOrderPost', 'subscriptionRouteImmediatePlanChangeOrderHTTPRequest', subscriptionRouteImmediatePlanChangeOrderHTTPRequest)
95519
+ const localVarPath = `/admin/subscriptions/plan-change/immediate/order`;
95520
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
95521
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
95522
+ let baseOptions;
95523
+ if (configuration) {
95524
+ baseOptions = configuration.baseOptions;
95525
+ }
95526
+
95527
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
95528
+ const localVarHeaderParameter = {} as any;
95529
+ const localVarQueryParameter = {} as any;
95530
+
95531
+ // authentication BearerAuth required
95532
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
95533
+
95534
+
95535
+
95536
+ localVarHeaderParameter['Content-Type'] = 'application/json';
95537
+
95538
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
95539
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
95540
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
95541
+ localVarRequestOptions.data = serializeDataIfNeeded(subscriptionRouteImmediatePlanChangeOrderHTTPRequest, localVarRequestOptions, configuration)
95542
+
95543
+ return {
95544
+ url: toPathString(localVarUrlObj),
95545
+ options: localVarRequestOptions,
95546
+ };
95547
+ },
94347
95548
  /**
94348
95549
  * Shows a read-only preview of what happens when changing plans: refund for current plan, credits removed/added, new plan cost. Org ID is automatically extracted from JWT session.
94349
95550
  * @summary Preview plan change details
@@ -94383,6 +95584,111 @@ export const SubscriptionsApiAxiosParamCreator = function (configuration?: Confi
94383
95584
  options: localVarRequestOptions,
94384
95585
  };
94385
95586
  },
95587
+ /**
95588
+ * Cancels a pending scheduled plan change, reverting the Razorpay subscription to the original plan.
95589
+ * @summary Cancel a scheduled plan change
95590
+ * @param {*} [options] Override http request option.
95591
+ * @throws {RequiredError}
95592
+ */
95593
+ adminSubscriptionsPlanChangeScheduleDelete: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
95594
+ const localVarPath = `/admin/subscriptions/plan-change/schedule`;
95595
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
95596
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
95597
+ let baseOptions;
95598
+ if (configuration) {
95599
+ baseOptions = configuration.baseOptions;
95600
+ }
95601
+
95602
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
95603
+ const localVarHeaderParameter = {} as any;
95604
+ const localVarQueryParameter = {} as any;
95605
+
95606
+ // authentication BearerAuth required
95607
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
95608
+
95609
+
95610
+
95611
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
95612
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
95613
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
95614
+
95615
+ return {
95616
+ url: toPathString(localVarUrlObj),
95617
+ options: localVarRequestOptions,
95618
+ };
95619
+ },
95620
+ /**
95621
+ * Returns the pending scheduled plan change for the organization, or null if none.
95622
+ * @summary Get pending scheduled plan change
95623
+ * @param {*} [options] Override http request option.
95624
+ * @throws {RequiredError}
95625
+ */
95626
+ adminSubscriptionsPlanChangeScheduleGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
95627
+ const localVarPath = `/admin/subscriptions/plan-change/schedule`;
95628
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
95629
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
95630
+ let baseOptions;
95631
+ if (configuration) {
95632
+ baseOptions = configuration.baseOptions;
95633
+ }
95634
+
95635
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
95636
+ const localVarHeaderParameter = {} as any;
95637
+ const localVarQueryParameter = {} as any;
95638
+
95639
+ // authentication BearerAuth required
95640
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
95641
+
95642
+
95643
+
95644
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
95645
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
95646
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
95647
+
95648
+ return {
95649
+ url: toPathString(localVarUrlObj),
95650
+ options: localVarRequestOptions,
95651
+ };
95652
+ },
95653
+ /**
95654
+ * Creates a one-time Razorpay order for the net charge amount. Payment is collected now; plan activation is deferred to cycle end. Returns 409 if a pending scheduled change already exists. For free switches (proration covers full cost), schedules directly without payment.
95655
+ * @summary Schedule a plan change at end of billing cycle
95656
+ * @param {SubscriptionRouteSchedulePlanChangeHTTPRequest} subscriptionRouteSchedulePlanChangeHTTPRequest Schedule plan change request
95657
+ * @param {*} [options] Override http request option.
95658
+ * @throws {RequiredError}
95659
+ */
95660
+ adminSubscriptionsPlanChangeSchedulePost: async (subscriptionRouteSchedulePlanChangeHTTPRequest: SubscriptionRouteSchedulePlanChangeHTTPRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
95661
+ // verify required parameter 'subscriptionRouteSchedulePlanChangeHTTPRequest' is not null or undefined
95662
+ assertParamExists('adminSubscriptionsPlanChangeSchedulePost', 'subscriptionRouteSchedulePlanChangeHTTPRequest', subscriptionRouteSchedulePlanChangeHTTPRequest)
95663
+ const localVarPath = `/admin/subscriptions/plan-change/schedule`;
95664
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
95665
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
95666
+ let baseOptions;
95667
+ if (configuration) {
95668
+ baseOptions = configuration.baseOptions;
95669
+ }
95670
+
95671
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
95672
+ const localVarHeaderParameter = {} as any;
95673
+ const localVarQueryParameter = {} as any;
95674
+
95675
+ // authentication BearerAuth required
95676
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
95677
+
95678
+
95679
+
95680
+ localVarHeaderParameter['Content-Type'] = 'application/json';
95681
+
95682
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
95683
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
95684
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
95685
+ localVarRequestOptions.data = serializeDataIfNeeded(subscriptionRouteSchedulePlanChangeHTTPRequest, localVarRequestOptions, configuration)
95686
+
95687
+ return {
95688
+ url: toPathString(localVarUrlObj),
95689
+ options: localVarRequestOptions,
95690
+ };
95691
+ },
94386
95692
  /**
94387
95693
  * Updates Subscription information by ID.
94388
95694
  * @summary Update an existing Subscription
@@ -94612,6 +95918,19 @@ export const SubscriptionsApiFp = function(configuration?: Configuration) {
94612
95918
  const localVarOperationServerBasePath = operationServerMap['SubscriptionsApi.adminSubscriptionsCancelProcessPost']?.[localVarOperationServerIndex]?.url;
94613
95919
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
94614
95920
  },
95921
+ /**
95922
+ * Creates a one-time Razorpay order for the net charge amount (new_plan_price - prorated_refund). Frontend opens Razorpay checkout. On payment.captured, the existing subscription is patched to the new plan.
95923
+ * @summary Create an immediate plan change order
95924
+ * @param {SubscriptionRouteImmediatePlanChangeOrderHTTPRequest} subscriptionRouteImmediatePlanChangeOrderHTTPRequest Immediate plan change order request
95925
+ * @param {*} [options] Override http request option.
95926
+ * @throws {RequiredError}
95927
+ */
95928
+ async adminSubscriptionsPlanChangeImmediateOrderPost(subscriptionRouteImmediatePlanChangeOrderHTTPRequest: SubscriptionRouteImmediatePlanChangeOrderHTTPRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesResponse>> {
95929
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminSubscriptionsPlanChangeImmediateOrderPost(subscriptionRouteImmediatePlanChangeOrderHTTPRequest, options);
95930
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
95931
+ const localVarOperationServerBasePath = operationServerMap['SubscriptionsApi.adminSubscriptionsPlanChangeImmediateOrderPost']?.[localVarOperationServerIndex]?.url;
95932
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
95933
+ },
94615
95934
  /**
94616
95935
  * Shows a read-only preview of what happens when changing plans: refund for current plan, credits removed/added, new plan cost. Org ID is automatically extracted from JWT session.
94617
95936
  * @summary Preview plan change details
@@ -94625,6 +95944,43 @@ export const SubscriptionsApiFp = function(configuration?: Configuration) {
94625
95944
  const localVarOperationServerBasePath = operationServerMap['SubscriptionsApi.adminSubscriptionsPlanChangePreviewPost']?.[localVarOperationServerIndex]?.url;
94626
95945
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
94627
95946
  },
95947
+ /**
95948
+ * Cancels a pending scheduled plan change, reverting the Razorpay subscription to the original plan.
95949
+ * @summary Cancel a scheduled plan change
95950
+ * @param {*} [options] Override http request option.
95951
+ * @throws {RequiredError}
95952
+ */
95953
+ async adminSubscriptionsPlanChangeScheduleDelete(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesResponse>> {
95954
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminSubscriptionsPlanChangeScheduleDelete(options);
95955
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
95956
+ const localVarOperationServerBasePath = operationServerMap['SubscriptionsApi.adminSubscriptionsPlanChangeScheduleDelete']?.[localVarOperationServerIndex]?.url;
95957
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
95958
+ },
95959
+ /**
95960
+ * Returns the pending scheduled plan change for the organization, or null if none.
95961
+ * @summary Get pending scheduled plan change
95962
+ * @param {*} [options] Override http request option.
95963
+ * @throws {RequiredError}
95964
+ */
95965
+ async adminSubscriptionsPlanChangeScheduleGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesResponse>> {
95966
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminSubscriptionsPlanChangeScheduleGet(options);
95967
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
95968
+ const localVarOperationServerBasePath = operationServerMap['SubscriptionsApi.adminSubscriptionsPlanChangeScheduleGet']?.[localVarOperationServerIndex]?.url;
95969
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
95970
+ },
95971
+ /**
95972
+ * Creates a one-time Razorpay order for the net charge amount. Payment is collected now; plan activation is deferred to cycle end. Returns 409 if a pending scheduled change already exists. For free switches (proration covers full cost), schedules directly without payment.
95973
+ * @summary Schedule a plan change at end of billing cycle
95974
+ * @param {SubscriptionRouteSchedulePlanChangeHTTPRequest} subscriptionRouteSchedulePlanChangeHTTPRequest Schedule plan change request
95975
+ * @param {*} [options] Override http request option.
95976
+ * @throws {RequiredError}
95977
+ */
95978
+ async adminSubscriptionsPlanChangeSchedulePost(subscriptionRouteSchedulePlanChangeHTTPRequest: SubscriptionRouteSchedulePlanChangeHTTPRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesResponse>> {
95979
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminSubscriptionsPlanChangeSchedulePost(subscriptionRouteSchedulePlanChangeHTTPRequest, options);
95980
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
95981
+ const localVarOperationServerBasePath = operationServerMap['SubscriptionsApi.adminSubscriptionsPlanChangeSchedulePost']?.[localVarOperationServerIndex]?.url;
95982
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
95983
+ },
94628
95984
  /**
94629
95985
  * Updates Subscription information by ID.
94630
95986
  * @summary Update an existing Subscription
@@ -94721,6 +96077,16 @@ export const SubscriptionsApiFactory = function (configuration?: Configuration,
94721
96077
  adminSubscriptionsCancelProcessPost(subscriptionRouteCancelProcessRequest: SubscriptionRouteCancelProcessRequest, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
94722
96078
  return localVarFp.adminSubscriptionsCancelProcessPost(subscriptionRouteCancelProcessRequest, options).then((request) => request(axios, basePath));
94723
96079
  },
96080
+ /**
96081
+ * Creates a one-time Razorpay order for the net charge amount (new_plan_price - prorated_refund). Frontend opens Razorpay checkout. On payment.captured, the existing subscription is patched to the new plan.
96082
+ * @summary Create an immediate plan change order
96083
+ * @param {SubscriptionRouteImmediatePlanChangeOrderHTTPRequest} subscriptionRouteImmediatePlanChangeOrderHTTPRequest Immediate plan change order request
96084
+ * @param {*} [options] Override http request option.
96085
+ * @throws {RequiredError}
96086
+ */
96087
+ adminSubscriptionsPlanChangeImmediateOrderPost(subscriptionRouteImmediatePlanChangeOrderHTTPRequest: SubscriptionRouteImmediatePlanChangeOrderHTTPRequest, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
96088
+ return localVarFp.adminSubscriptionsPlanChangeImmediateOrderPost(subscriptionRouteImmediatePlanChangeOrderHTTPRequest, options).then((request) => request(axios, basePath));
96089
+ },
94724
96090
  /**
94725
96091
  * Shows a read-only preview of what happens when changing plans: refund for current plan, credits removed/added, new plan cost. Org ID is automatically extracted from JWT session.
94726
96092
  * @summary Preview plan change details
@@ -94731,6 +96097,34 @@ export const SubscriptionsApiFactory = function (configuration?: Configuration,
94731
96097
  adminSubscriptionsPlanChangePreviewPost(subscriptionRoutePlanChangePreviewHTTPRequest: SubscriptionRoutePlanChangePreviewHTTPRequest, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
94732
96098
  return localVarFp.adminSubscriptionsPlanChangePreviewPost(subscriptionRoutePlanChangePreviewHTTPRequest, options).then((request) => request(axios, basePath));
94733
96099
  },
96100
+ /**
96101
+ * Cancels a pending scheduled plan change, reverting the Razorpay subscription to the original plan.
96102
+ * @summary Cancel a scheduled plan change
96103
+ * @param {*} [options] Override http request option.
96104
+ * @throws {RequiredError}
96105
+ */
96106
+ adminSubscriptionsPlanChangeScheduleDelete(options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
96107
+ return localVarFp.adminSubscriptionsPlanChangeScheduleDelete(options).then((request) => request(axios, basePath));
96108
+ },
96109
+ /**
96110
+ * Returns the pending scheduled plan change for the organization, or null if none.
96111
+ * @summary Get pending scheduled plan change
96112
+ * @param {*} [options] Override http request option.
96113
+ * @throws {RequiredError}
96114
+ */
96115
+ adminSubscriptionsPlanChangeScheduleGet(options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
96116
+ return localVarFp.adminSubscriptionsPlanChangeScheduleGet(options).then((request) => request(axios, basePath));
96117
+ },
96118
+ /**
96119
+ * Creates a one-time Razorpay order for the net charge amount. Payment is collected now; plan activation is deferred to cycle end. Returns 409 if a pending scheduled change already exists. For free switches (proration covers full cost), schedules directly without payment.
96120
+ * @summary Schedule a plan change at end of billing cycle
96121
+ * @param {SubscriptionRouteSchedulePlanChangeHTTPRequest} subscriptionRouteSchedulePlanChangeHTTPRequest Schedule plan change request
96122
+ * @param {*} [options] Override http request option.
96123
+ * @throws {RequiredError}
96124
+ */
96125
+ adminSubscriptionsPlanChangeSchedulePost(subscriptionRouteSchedulePlanChangeHTTPRequest: SubscriptionRouteSchedulePlanChangeHTTPRequest, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesResponse> {
96126
+ return localVarFp.adminSubscriptionsPlanChangeSchedulePost(subscriptionRouteSchedulePlanChangeHTTPRequest, options).then((request) => request(axios, basePath));
96127
+ },
94734
96128
  /**
94735
96129
  * Updates Subscription information by ID.
94736
96130
  * @summary Update an existing Subscription
@@ -94816,6 +96210,18 @@ export class SubscriptionsApi extends BaseAPI {
94816
96210
  return SubscriptionsApiFp(this.configuration).adminSubscriptionsCancelProcessPost(subscriptionRouteCancelProcessRequest, options).then((request) => request(this.axios, this.basePath));
94817
96211
  }
94818
96212
 
96213
+ /**
96214
+ * Creates a one-time Razorpay order for the net charge amount (new_plan_price - prorated_refund). Frontend opens Razorpay checkout. On payment.captured, the existing subscription is patched to the new plan.
96215
+ * @summary Create an immediate plan change order
96216
+ * @param {SubscriptionRouteImmediatePlanChangeOrderHTTPRequest} subscriptionRouteImmediatePlanChangeOrderHTTPRequest Immediate plan change order request
96217
+ * @param {*} [options] Override http request option.
96218
+ * @throws {RequiredError}
96219
+ * @memberof SubscriptionsApi
96220
+ */
96221
+ public adminSubscriptionsPlanChangeImmediateOrderPost(subscriptionRouteImmediatePlanChangeOrderHTTPRequest: SubscriptionRouteImmediatePlanChangeOrderHTTPRequest, options?: RawAxiosRequestConfig) {
96222
+ return SubscriptionsApiFp(this.configuration).adminSubscriptionsPlanChangeImmediateOrderPost(subscriptionRouteImmediatePlanChangeOrderHTTPRequest, options).then((request) => request(this.axios, this.basePath));
96223
+ }
96224
+
94819
96225
  /**
94820
96226
  * Shows a read-only preview of what happens when changing plans: refund for current plan, credits removed/added, new plan cost. Org ID is automatically extracted from JWT session.
94821
96227
  * @summary Preview plan change details
@@ -94828,6 +96234,40 @@ export class SubscriptionsApi extends BaseAPI {
94828
96234
  return SubscriptionsApiFp(this.configuration).adminSubscriptionsPlanChangePreviewPost(subscriptionRoutePlanChangePreviewHTTPRequest, options).then((request) => request(this.axios, this.basePath));
94829
96235
  }
94830
96236
 
96237
+ /**
96238
+ * Cancels a pending scheduled plan change, reverting the Razorpay subscription to the original plan.
96239
+ * @summary Cancel a scheduled plan change
96240
+ * @param {*} [options] Override http request option.
96241
+ * @throws {RequiredError}
96242
+ * @memberof SubscriptionsApi
96243
+ */
96244
+ public adminSubscriptionsPlanChangeScheduleDelete(options?: RawAxiosRequestConfig) {
96245
+ return SubscriptionsApiFp(this.configuration).adminSubscriptionsPlanChangeScheduleDelete(options).then((request) => request(this.axios, this.basePath));
96246
+ }
96247
+
96248
+ /**
96249
+ * Returns the pending scheduled plan change for the organization, or null if none.
96250
+ * @summary Get pending scheduled plan change
96251
+ * @param {*} [options] Override http request option.
96252
+ * @throws {RequiredError}
96253
+ * @memberof SubscriptionsApi
96254
+ */
96255
+ public adminSubscriptionsPlanChangeScheduleGet(options?: RawAxiosRequestConfig) {
96256
+ return SubscriptionsApiFp(this.configuration).adminSubscriptionsPlanChangeScheduleGet(options).then((request) => request(this.axios, this.basePath));
96257
+ }
96258
+
96259
+ /**
96260
+ * Creates a one-time Razorpay order for the net charge amount. Payment is collected now; plan activation is deferred to cycle end. Returns 409 if a pending scheduled change already exists. For free switches (proration covers full cost), schedules directly without payment.
96261
+ * @summary Schedule a plan change at end of billing cycle
96262
+ * @param {SubscriptionRouteSchedulePlanChangeHTTPRequest} subscriptionRouteSchedulePlanChangeHTTPRequest Schedule plan change request
96263
+ * @param {*} [options] Override http request option.
96264
+ * @throws {RequiredError}
96265
+ * @memberof SubscriptionsApi
96266
+ */
96267
+ public adminSubscriptionsPlanChangeSchedulePost(subscriptionRouteSchedulePlanChangeHTTPRequest: SubscriptionRouteSchedulePlanChangeHTTPRequest, options?: RawAxiosRequestConfig) {
96268
+ return SubscriptionsApiFp(this.configuration).adminSubscriptionsPlanChangeSchedulePost(subscriptionRouteSchedulePlanChangeHTTPRequest, options).then((request) => request(this.axios, this.basePath));
96269
+ }
96270
+
94831
96271
  /**
94832
96272
  * Updates Subscription information by ID.
94833
96273
  * @summary Update an existing Subscription