@rasadov/lumoar-sdk 2.0.9 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.d.ts CHANGED
@@ -3875,6 +3875,24 @@ export interface SignalResponse {
3875
3875
  * @memberof SignalResponse
3876
3876
  */
3877
3877
  'required_resource_types'?: Array<string>;
3878
+ /**
3879
+ *
3880
+ * @type {string}
3881
+ * @memberof SignalResponse
3882
+ */
3883
+ 'status'?: string | null;
3884
+ /**
3885
+ *
3886
+ * @type {string}
3887
+ * @memberof SignalResponse
3888
+ */
3889
+ 'frequency'?: string | null;
3890
+ /**
3891
+ *
3892
+ * @type {string}
3893
+ * @memberof SignalResponse
3894
+ */
3895
+ 'last_run'?: string | null;
3878
3896
  }
3879
3897
  /**
3880
3898
  * Signal result with all relations
@@ -7002,7 +7020,7 @@ export declare const IntegrationsApiAxiosParamCreator: (configuration?: Configur
7002
7020
  * List audit logs from integrations service
7003
7021
  * @summary List Audit Logs
7004
7022
  * @param {string} xCompanyId
7005
- * @param {string | null} [providerId]
7023
+ * @param {string | null} [provider]
7006
7024
  * @param {string | null} [runType]
7007
7025
  * @param {string | null} [status]
7008
7026
  * @param {string | null} [startDate]
@@ -7012,7 +7030,7 @@ export declare const IntegrationsApiAxiosParamCreator: (configuration?: Configur
7012
7030
  * @param {*} [options] Override http request option.
7013
7031
  * @throws {RequiredError}
7014
7032
  */
7015
- integrationListAuditLogs: (xCompanyId: string, providerId?: string | null, runType?: string | null, status?: string | null, startDate?: string | null, endDate?: string | null, limit?: number | null, offset?: number | null, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
7033
+ integrationListAuditLogs: (xCompanyId: string, provider?: string | null, runType?: string | null, status?: string | null, startDate?: string | null, endDate?: string | null, limit?: number | null, offset?: number | null, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
7016
7034
  /**
7017
7035
  * List signal groups by resource type
7018
7036
  * @summary List Signal Groups
@@ -7021,12 +7039,13 @@ export declare const IntegrationsApiAxiosParamCreator: (configuration?: Configur
7021
7039
  */
7022
7040
  integrationListSignalGroups: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
7023
7041
  /**
7024
- * List all available signals
7042
+ * List company-specific signals
7025
7043
  * @summary List Signals
7044
+ * @param {string} xCompanyId
7026
7045
  * @param {*} [options] Override http request option.
7027
7046
  * @throws {RequiredError}
7028
7047
  */
7029
- integrationListSignals: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
7048
+ integrationListSignals: (xCompanyId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
7030
7049
  /**
7031
7050
  * Setup AWS provider via cross-account IAM role access. This endpoint accepts AWS account configuration for cross-account access. Users should create an IAM role in their AWS account with a trust relationship that allows your service to assume the role using the provided external_id. No AWS credentials are stored - only the role ARN and external ID for secure cross-account access.
7032
7051
  * @summary Setup Aws Provider
@@ -7138,7 +7157,7 @@ export declare const IntegrationsApiFp: (configuration?: Configuration) => {
7138
7157
  * List audit logs from integrations service
7139
7158
  * @summary List Audit Logs
7140
7159
  * @param {string} xCompanyId
7141
- * @param {string | null} [providerId]
7160
+ * @param {string | null} [provider]
7142
7161
  * @param {string | null} [runType]
7143
7162
  * @param {string | null} [status]
7144
7163
  * @param {string | null} [startDate]
@@ -7148,7 +7167,7 @@ export declare const IntegrationsApiFp: (configuration?: Configuration) => {
7148
7167
  * @param {*} [options] Override http request option.
7149
7168
  * @throws {RequiredError}
7150
7169
  */
7151
- integrationListAuditLogs(xCompanyId: string, providerId?: string | null, runType?: string | null, status?: string | null, startDate?: string | null, endDate?: string | null, limit?: number | null, offset?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListAuditLogsResponse>>;
7170
+ integrationListAuditLogs(xCompanyId: string, provider?: string | null, runType?: string | null, status?: string | null, startDate?: string | null, endDate?: string | null, limit?: number | null, offset?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListAuditLogsResponse>>;
7152
7171
  /**
7153
7172
  * List signal groups by resource type
7154
7173
  * @summary List Signal Groups
@@ -7157,12 +7176,13 @@ export declare const IntegrationsApiFp: (configuration?: Configuration) => {
7157
7176
  */
7158
7177
  integrationListSignalGroups(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListSignalGroupsResponse>>;
7159
7178
  /**
7160
- * List all available signals
7179
+ * List company-specific signals
7161
7180
  * @summary List Signals
7181
+ * @param {string} xCompanyId
7162
7182
  * @param {*} [options] Override http request option.
7163
7183
  * @throws {RequiredError}
7164
7184
  */
7165
- integrationListSignals(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListSignalsResponse>>;
7185
+ integrationListSignals(xCompanyId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListSignalsResponse>>;
7166
7186
  /**
7167
7187
  * Setup AWS provider via cross-account IAM role access. This endpoint accepts AWS account configuration for cross-account access. Users should create an IAM role in their AWS account with a trust relationship that allows your service to assume the role using the provided external_id. No AWS credentials are stored - only the role ARN and external ID for secure cross-account access.
7168
7188
  * @summary Setup Aws Provider
@@ -7274,7 +7294,7 @@ export declare const IntegrationsApiFactory: (configuration?: Configuration, bas
7274
7294
  * List audit logs from integrations service
7275
7295
  * @summary List Audit Logs
7276
7296
  * @param {string} xCompanyId
7277
- * @param {string | null} [providerId]
7297
+ * @param {string | null} [provider]
7278
7298
  * @param {string | null} [runType]
7279
7299
  * @param {string | null} [status]
7280
7300
  * @param {string | null} [startDate]
@@ -7284,7 +7304,7 @@ export declare const IntegrationsApiFactory: (configuration?: Configuration, bas
7284
7304
  * @param {*} [options] Override http request option.
7285
7305
  * @throws {RequiredError}
7286
7306
  */
7287
- integrationListAuditLogs(xCompanyId: string, providerId?: string | null, runType?: string | null, status?: string | null, startDate?: string | null, endDate?: string | null, limit?: number | null, offset?: number | null, options?: RawAxiosRequestConfig): AxiosPromise<ListAuditLogsResponse>;
7307
+ integrationListAuditLogs(xCompanyId: string, provider?: string | null, runType?: string | null, status?: string | null, startDate?: string | null, endDate?: string | null, limit?: number | null, offset?: number | null, options?: RawAxiosRequestConfig): AxiosPromise<ListAuditLogsResponse>;
7288
7308
  /**
7289
7309
  * List signal groups by resource type
7290
7310
  * @summary List Signal Groups
@@ -7293,12 +7313,13 @@ export declare const IntegrationsApiFactory: (configuration?: Configuration, bas
7293
7313
  */
7294
7314
  integrationListSignalGroups(options?: RawAxiosRequestConfig): AxiosPromise<ListSignalGroupsResponse>;
7295
7315
  /**
7296
- * List all available signals
7316
+ * List company-specific signals
7297
7317
  * @summary List Signals
7318
+ * @param {string} xCompanyId
7298
7319
  * @param {*} [options] Override http request option.
7299
7320
  * @throws {RequiredError}
7300
7321
  */
7301
- integrationListSignals(options?: RawAxiosRequestConfig): AxiosPromise<ListSignalsResponse>;
7322
+ integrationListSignals(xCompanyId: string, options?: RawAxiosRequestConfig): AxiosPromise<ListSignalsResponse>;
7302
7323
  /**
7303
7324
  * Setup AWS provider via cross-account IAM role access. This endpoint accepts AWS account configuration for cross-account access. Users should create an IAM role in their AWS account with a trust relationship that allows your service to assume the role using the provided external_id. No AWS credentials are stored - only the role ARN and external ID for secure cross-account access.
7304
7325
  * @summary Setup Aws Provider
@@ -7418,7 +7439,7 @@ export declare class IntegrationsApi extends BaseAPI {
7418
7439
  * List audit logs from integrations service
7419
7440
  * @summary List Audit Logs
7420
7441
  * @param {string} xCompanyId
7421
- * @param {string | null} [providerId]
7442
+ * @param {string | null} [provider]
7422
7443
  * @param {string | null} [runType]
7423
7444
  * @param {string | null} [status]
7424
7445
  * @param {string | null} [startDate]
@@ -7429,7 +7450,7 @@ export declare class IntegrationsApi extends BaseAPI {
7429
7450
  * @throws {RequiredError}
7430
7451
  * @memberof IntegrationsApi
7431
7452
  */
7432
- integrationListAuditLogs(xCompanyId: string, providerId?: string | null, runType?: string | null, status?: string | null, startDate?: string | null, endDate?: string | null, limit?: number | null, offset?: number | null, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ListAuditLogsResponse, any, {}>>;
7453
+ integrationListAuditLogs(xCompanyId: string, provider?: string | null, runType?: string | null, status?: string | null, startDate?: string | null, endDate?: string | null, limit?: number | null, offset?: number | null, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ListAuditLogsResponse, any, {}>>;
7433
7454
  /**
7434
7455
  * List signal groups by resource type
7435
7456
  * @summary List Signal Groups
@@ -7439,13 +7460,14 @@ export declare class IntegrationsApi extends BaseAPI {
7439
7460
  */
7440
7461
  integrationListSignalGroups(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ListSignalGroupsResponse, any, {}>>;
7441
7462
  /**
7442
- * List all available signals
7463
+ * List company-specific signals
7443
7464
  * @summary List Signals
7465
+ * @param {string} xCompanyId
7444
7466
  * @param {*} [options] Override http request option.
7445
7467
  * @throws {RequiredError}
7446
7468
  * @memberof IntegrationsApi
7447
7469
  */
7448
- integrationListSignals(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ListSignalsResponse, any, {}>>;
7470
+ integrationListSignals(xCompanyId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ListSignalsResponse, any, {}>>;
7449
7471
  /**
7450
7472
  * Setup AWS provider via cross-account IAM role access. This endpoint accepts AWS account configuration for cross-account access. Users should create an IAM role in their AWS account with a trust relationship that allows your service to assume the role using the provided external_id. No AWS credentials are stored - only the role ARN and external ID for secure cross-account access.
7451
7473
  * @summary Setup Aws Provider
@@ -9188,7 +9210,7 @@ export declare const V2ApiAxiosParamCreator: (configuration?: Configuration) =>
9188
9210
  * List audit logs from integrations service
9189
9211
  * @summary List Audit Logs
9190
9212
  * @param {string} xCompanyId
9191
- * @param {string | null} [providerId]
9213
+ * @param {string | null} [provider]
9192
9214
  * @param {string | null} [runType]
9193
9215
  * @param {string | null} [status]
9194
9216
  * @param {string | null} [startDate]
@@ -9198,7 +9220,7 @@ export declare const V2ApiAxiosParamCreator: (configuration?: Configuration) =>
9198
9220
  * @param {*} [options] Override http request option.
9199
9221
  * @throws {RequiredError}
9200
9222
  */
9201
- integrationListAuditLogs: (xCompanyId: string, providerId?: string | null, runType?: string | null, status?: string | null, startDate?: string | null, endDate?: string | null, limit?: number | null, offset?: number | null, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
9223
+ integrationListAuditLogs: (xCompanyId: string, provider?: string | null, runType?: string | null, status?: string | null, startDate?: string | null, endDate?: string | null, limit?: number | null, offset?: number | null, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
9202
9224
  /**
9203
9225
  * List signal groups by resource type
9204
9226
  * @summary List Signal Groups
@@ -9207,12 +9229,13 @@ export declare const V2ApiAxiosParamCreator: (configuration?: Configuration) =>
9207
9229
  */
9208
9230
  integrationListSignalGroups: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
9209
9231
  /**
9210
- * List all available signals
9232
+ * List company-specific signals
9211
9233
  * @summary List Signals
9234
+ * @param {string} xCompanyId
9212
9235
  * @param {*} [options] Override http request option.
9213
9236
  * @throws {RequiredError}
9214
9237
  */
9215
- integrationListSignals: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
9238
+ integrationListSignals: (xCompanyId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
9216
9239
  /**
9217
9240
  * Setup AWS provider via cross-account IAM role access. This endpoint accepts AWS account configuration for cross-account access. Users should create an IAM role in their AWS account with a trust relationship that allows your service to assume the role using the provided external_id. No AWS credentials are stored - only the role ARN and external ID for secure cross-account access.
9218
9241
  * @summary Setup Aws Provider
@@ -9359,7 +9382,7 @@ export declare const V2ApiFp: (configuration?: Configuration) => {
9359
9382
  * List audit logs from integrations service
9360
9383
  * @summary List Audit Logs
9361
9384
  * @param {string} xCompanyId
9362
- * @param {string | null} [providerId]
9385
+ * @param {string | null} [provider]
9363
9386
  * @param {string | null} [runType]
9364
9387
  * @param {string | null} [status]
9365
9388
  * @param {string | null} [startDate]
@@ -9369,7 +9392,7 @@ export declare const V2ApiFp: (configuration?: Configuration) => {
9369
9392
  * @param {*} [options] Override http request option.
9370
9393
  * @throws {RequiredError}
9371
9394
  */
9372
- integrationListAuditLogs(xCompanyId: string, providerId?: string | null, runType?: string | null, status?: string | null, startDate?: string | null, endDate?: string | null, limit?: number | null, offset?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListAuditLogsResponse>>;
9395
+ integrationListAuditLogs(xCompanyId: string, provider?: string | null, runType?: string | null, status?: string | null, startDate?: string | null, endDate?: string | null, limit?: number | null, offset?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListAuditLogsResponse>>;
9373
9396
  /**
9374
9397
  * List signal groups by resource type
9375
9398
  * @summary List Signal Groups
@@ -9378,12 +9401,13 @@ export declare const V2ApiFp: (configuration?: Configuration) => {
9378
9401
  */
9379
9402
  integrationListSignalGroups(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListSignalGroupsResponse>>;
9380
9403
  /**
9381
- * List all available signals
9404
+ * List company-specific signals
9382
9405
  * @summary List Signals
9406
+ * @param {string} xCompanyId
9383
9407
  * @param {*} [options] Override http request option.
9384
9408
  * @throws {RequiredError}
9385
9409
  */
9386
- integrationListSignals(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListSignalsResponse>>;
9410
+ integrationListSignals(xCompanyId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListSignalsResponse>>;
9387
9411
  /**
9388
9412
  * Setup AWS provider via cross-account IAM role access. This endpoint accepts AWS account configuration for cross-account access. Users should create an IAM role in their AWS account with a trust relationship that allows your service to assume the role using the provided external_id. No AWS credentials are stored - only the role ARN and external ID for secure cross-account access.
9389
9413
  * @summary Setup Aws Provider
@@ -9530,7 +9554,7 @@ export declare const V2ApiFactory: (configuration?: Configuration, basePath?: st
9530
9554
  * List audit logs from integrations service
9531
9555
  * @summary List Audit Logs
9532
9556
  * @param {string} xCompanyId
9533
- * @param {string | null} [providerId]
9557
+ * @param {string | null} [provider]
9534
9558
  * @param {string | null} [runType]
9535
9559
  * @param {string | null} [status]
9536
9560
  * @param {string | null} [startDate]
@@ -9540,7 +9564,7 @@ export declare const V2ApiFactory: (configuration?: Configuration, basePath?: st
9540
9564
  * @param {*} [options] Override http request option.
9541
9565
  * @throws {RequiredError}
9542
9566
  */
9543
- integrationListAuditLogs(xCompanyId: string, providerId?: string | null, runType?: string | null, status?: string | null, startDate?: string | null, endDate?: string | null, limit?: number | null, offset?: number | null, options?: RawAxiosRequestConfig): AxiosPromise<ListAuditLogsResponse>;
9567
+ integrationListAuditLogs(xCompanyId: string, provider?: string | null, runType?: string | null, status?: string | null, startDate?: string | null, endDate?: string | null, limit?: number | null, offset?: number | null, options?: RawAxiosRequestConfig): AxiosPromise<ListAuditLogsResponse>;
9544
9568
  /**
9545
9569
  * List signal groups by resource type
9546
9570
  * @summary List Signal Groups
@@ -9549,12 +9573,13 @@ export declare const V2ApiFactory: (configuration?: Configuration, basePath?: st
9549
9573
  */
9550
9574
  integrationListSignalGroups(options?: RawAxiosRequestConfig): AxiosPromise<ListSignalGroupsResponse>;
9551
9575
  /**
9552
- * List all available signals
9576
+ * List company-specific signals
9553
9577
  * @summary List Signals
9578
+ * @param {string} xCompanyId
9554
9579
  * @param {*} [options] Override http request option.
9555
9580
  * @throws {RequiredError}
9556
9581
  */
9557
- integrationListSignals(options?: RawAxiosRequestConfig): AxiosPromise<ListSignalsResponse>;
9582
+ integrationListSignals(xCompanyId: string, options?: RawAxiosRequestConfig): AxiosPromise<ListSignalsResponse>;
9558
9583
  /**
9559
9584
  * Setup AWS provider via cross-account IAM role access. This endpoint accepts AWS account configuration for cross-account access. Users should create an IAM role in their AWS account with a trust relationship that allows your service to assume the role using the provided external_id. No AWS credentials are stored - only the role ARN and external ID for secure cross-account access.
9560
9585
  * @summary Setup Aws Provider
@@ -9709,7 +9734,7 @@ export declare class V2Api extends BaseAPI {
9709
9734
  * List audit logs from integrations service
9710
9735
  * @summary List Audit Logs
9711
9736
  * @param {string} xCompanyId
9712
- * @param {string | null} [providerId]
9737
+ * @param {string | null} [provider]
9713
9738
  * @param {string | null} [runType]
9714
9739
  * @param {string | null} [status]
9715
9740
  * @param {string | null} [startDate]
@@ -9720,7 +9745,7 @@ export declare class V2Api extends BaseAPI {
9720
9745
  * @throws {RequiredError}
9721
9746
  * @memberof V2Api
9722
9747
  */
9723
- integrationListAuditLogs(xCompanyId: string, providerId?: string | null, runType?: string | null, status?: string | null, startDate?: string | null, endDate?: string | null, limit?: number | null, offset?: number | null, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ListAuditLogsResponse, any, {}>>;
9748
+ integrationListAuditLogs(xCompanyId: string, provider?: string | null, runType?: string | null, status?: string | null, startDate?: string | null, endDate?: string | null, limit?: number | null, offset?: number | null, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ListAuditLogsResponse, any, {}>>;
9724
9749
  /**
9725
9750
  * List signal groups by resource type
9726
9751
  * @summary List Signal Groups
@@ -9730,13 +9755,14 @@ export declare class V2Api extends BaseAPI {
9730
9755
  */
9731
9756
  integrationListSignalGroups(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ListSignalGroupsResponse, any, {}>>;
9732
9757
  /**
9733
- * List all available signals
9758
+ * List company-specific signals
9734
9759
  * @summary List Signals
9760
+ * @param {string} xCompanyId
9735
9761
  * @param {*} [options] Override http request option.
9736
9762
  * @throws {RequiredError}
9737
9763
  * @memberof V2Api
9738
9764
  */
9739
- integrationListSignals(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ListSignalsResponse, any, {}>>;
9765
+ integrationListSignals(xCompanyId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ListSignalsResponse, any, {}>>;
9740
9766
  /**
9741
9767
  * Setup AWS provider via cross-account IAM role access. This endpoint accepts AWS account configuration for cross-account access. Users should create an IAM role in their AWS account with a trust relationship that allows your service to assume the role using the provided external_id. No AWS credentials are stored - only the role ARN and external ID for secure cross-account access.
9742
9768
  * @summary Setup Aws Provider
package/dist/api.js CHANGED
@@ -3952,7 +3952,7 @@ export const IntegrationsApiAxiosParamCreator = function (configuration) {
3952
3952
  * List audit logs from integrations service
3953
3953
  * @summary List Audit Logs
3954
3954
  * @param {string} xCompanyId
3955
- * @param {string | null} [providerId]
3955
+ * @param {string | null} [provider]
3956
3956
  * @param {string | null} [runType]
3957
3957
  * @param {string | null} [status]
3958
3958
  * @param {string | null} [startDate]
@@ -3962,7 +3962,7 @@ export const IntegrationsApiAxiosParamCreator = function (configuration) {
3962
3962
  * @param {*} [options] Override http request option.
3963
3963
  * @throws {RequiredError}
3964
3964
  */
3965
- integrationListAuditLogs: (xCompanyId_1, providerId_1, runType_1, status_1, startDate_1, endDate_1, limit_1, offset_1, ...args_1) => __awaiter(this, [xCompanyId_1, providerId_1, runType_1, status_1, startDate_1, endDate_1, limit_1, offset_1, ...args_1], void 0, function* (xCompanyId, providerId, runType, status, startDate, endDate, limit, offset, options = {}) {
3965
+ integrationListAuditLogs: (xCompanyId_1, provider_1, runType_1, status_1, startDate_1, endDate_1, limit_1, offset_1, ...args_1) => __awaiter(this, [xCompanyId_1, provider_1, runType_1, status_1, startDate_1, endDate_1, limit_1, offset_1, ...args_1], void 0, function* (xCompanyId, provider, runType, status, startDate, endDate, limit, offset, options = {}) {
3966
3966
  // verify required parameter 'xCompanyId' is not null or undefined
3967
3967
  assertParamExists('integrationListAuditLogs', 'xCompanyId', xCompanyId);
3968
3968
  const localVarPath = `/v2/integrations/history`;
@@ -3975,8 +3975,8 @@ export const IntegrationsApiAxiosParamCreator = function (configuration) {
3975
3975
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3976
3976
  const localVarHeaderParameter = {};
3977
3977
  const localVarQueryParameter = {};
3978
- if (providerId !== undefined) {
3979
- localVarQueryParameter['provider_id'] = providerId;
3978
+ if (provider !== undefined) {
3979
+ localVarQueryParameter['provider'] = provider;
3980
3980
  }
3981
3981
  if (runType !== undefined) {
3982
3982
  localVarQueryParameter['run_type'] = runType;
@@ -4037,12 +4037,15 @@ export const IntegrationsApiAxiosParamCreator = function (configuration) {
4037
4037
  };
4038
4038
  }),
4039
4039
  /**
4040
- * List all available signals
4040
+ * List company-specific signals
4041
4041
  * @summary List Signals
4042
+ * @param {string} xCompanyId
4042
4043
  * @param {*} [options] Override http request option.
4043
4044
  * @throws {RequiredError}
4044
4045
  */
4045
- integrationListSignals: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
4046
+ integrationListSignals: (xCompanyId_1, ...args_1) => __awaiter(this, [xCompanyId_1, ...args_1], void 0, function* (xCompanyId, options = {}) {
4047
+ // verify required parameter 'xCompanyId' is not null or undefined
4048
+ assertParamExists('integrationListSignals', 'xCompanyId', xCompanyId);
4046
4049
  const localVarPath = `/v2/integrations/signals`;
4047
4050
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4048
4051
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -4053,6 +4056,9 @@ export const IntegrationsApiAxiosParamCreator = function (configuration) {
4053
4056
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
4054
4057
  const localVarHeaderParameter = {};
4055
4058
  const localVarQueryParameter = {};
4059
+ if (xCompanyId != null) {
4060
+ localVarHeaderParameter['X-Company-Id'] = String(xCompanyId);
4061
+ }
4056
4062
  setSearchParams(localVarUrlObj, localVarQueryParameter);
4057
4063
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4058
4064
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -4364,7 +4370,7 @@ export const IntegrationsApiFp = function (configuration) {
4364
4370
  * List audit logs from integrations service
4365
4371
  * @summary List Audit Logs
4366
4372
  * @param {string} xCompanyId
4367
- * @param {string | null} [providerId]
4373
+ * @param {string | null} [provider]
4368
4374
  * @param {string | null} [runType]
4369
4375
  * @param {string | null} [status]
4370
4376
  * @param {string | null} [startDate]
@@ -4374,10 +4380,10 @@ export const IntegrationsApiFp = function (configuration) {
4374
4380
  * @param {*} [options] Override http request option.
4375
4381
  * @throws {RequiredError}
4376
4382
  */
4377
- integrationListAuditLogs(xCompanyId, providerId, runType, status, startDate, endDate, limit, offset, options) {
4383
+ integrationListAuditLogs(xCompanyId, provider, runType, status, startDate, endDate, limit, offset, options) {
4378
4384
  return __awaiter(this, void 0, void 0, function* () {
4379
4385
  var _a, _b, _c;
4380
- const localVarAxiosArgs = yield localVarAxiosParamCreator.integrationListAuditLogs(xCompanyId, providerId, runType, status, startDate, endDate, limit, offset, options);
4386
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.integrationListAuditLogs(xCompanyId, provider, runType, status, startDate, endDate, limit, offset, options);
4381
4387
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4382
4388
  const localVarOperationServerBasePath = (_c = (_b = operationServerMap['IntegrationsApi.integrationListAuditLogs']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4383
4389
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -4399,15 +4405,16 @@ export const IntegrationsApiFp = function (configuration) {
4399
4405
  });
4400
4406
  },
4401
4407
  /**
4402
- * List all available signals
4408
+ * List company-specific signals
4403
4409
  * @summary List Signals
4410
+ * @param {string} xCompanyId
4404
4411
  * @param {*} [options] Override http request option.
4405
4412
  * @throws {RequiredError}
4406
4413
  */
4407
- integrationListSignals(options) {
4414
+ integrationListSignals(xCompanyId, options) {
4408
4415
  return __awaiter(this, void 0, void 0, function* () {
4409
4416
  var _a, _b, _c;
4410
- const localVarAxiosArgs = yield localVarAxiosParamCreator.integrationListSignals(options);
4417
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.integrationListSignals(xCompanyId, options);
4411
4418
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4412
4419
  const localVarOperationServerBasePath = (_c = (_b = operationServerMap['IntegrationsApi.integrationListSignals']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4413
4420
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -4579,7 +4586,7 @@ export const IntegrationsApiFactory = function (configuration, basePath, axios)
4579
4586
  * List audit logs from integrations service
4580
4587
  * @summary List Audit Logs
4581
4588
  * @param {string} xCompanyId
4582
- * @param {string | null} [providerId]
4589
+ * @param {string | null} [provider]
4583
4590
  * @param {string | null} [runType]
4584
4591
  * @param {string | null} [status]
4585
4592
  * @param {string | null} [startDate]
@@ -4589,8 +4596,8 @@ export const IntegrationsApiFactory = function (configuration, basePath, axios)
4589
4596
  * @param {*} [options] Override http request option.
4590
4597
  * @throws {RequiredError}
4591
4598
  */
4592
- integrationListAuditLogs(xCompanyId, providerId, runType, status, startDate, endDate, limit, offset, options) {
4593
- return localVarFp.integrationListAuditLogs(xCompanyId, providerId, runType, status, startDate, endDate, limit, offset, options).then((request) => request(axios, basePath));
4599
+ integrationListAuditLogs(xCompanyId, provider, runType, status, startDate, endDate, limit, offset, options) {
4600
+ return localVarFp.integrationListAuditLogs(xCompanyId, provider, runType, status, startDate, endDate, limit, offset, options).then((request) => request(axios, basePath));
4594
4601
  },
4595
4602
  /**
4596
4603
  * List signal groups by resource type
@@ -4602,13 +4609,14 @@ export const IntegrationsApiFactory = function (configuration, basePath, axios)
4602
4609
  return localVarFp.integrationListSignalGroups(options).then((request) => request(axios, basePath));
4603
4610
  },
4604
4611
  /**
4605
- * List all available signals
4612
+ * List company-specific signals
4606
4613
  * @summary List Signals
4614
+ * @param {string} xCompanyId
4607
4615
  * @param {*} [options] Override http request option.
4608
4616
  * @throws {RequiredError}
4609
4617
  */
4610
- integrationListSignals(options) {
4611
- return localVarFp.integrationListSignals(options).then((request) => request(axios, basePath));
4618
+ integrationListSignals(xCompanyId, options) {
4619
+ return localVarFp.integrationListSignals(xCompanyId, options).then((request) => request(axios, basePath));
4612
4620
  },
4613
4621
  /**
4614
4622
  * Setup AWS provider via cross-account IAM role access. This endpoint accepts AWS account configuration for cross-account access. Users should create an IAM role in their AWS account with a trust relationship that allows your service to assume the role using the provided external_id. No AWS credentials are stored - only the role ARN and external ID for secure cross-account access.
@@ -4752,7 +4760,7 @@ export class IntegrationsApi extends BaseAPI {
4752
4760
  * List audit logs from integrations service
4753
4761
  * @summary List Audit Logs
4754
4762
  * @param {string} xCompanyId
4755
- * @param {string | null} [providerId]
4763
+ * @param {string | null} [provider]
4756
4764
  * @param {string | null} [runType]
4757
4765
  * @param {string | null} [status]
4758
4766
  * @param {string | null} [startDate]
@@ -4763,8 +4771,8 @@ export class IntegrationsApi extends BaseAPI {
4763
4771
  * @throws {RequiredError}
4764
4772
  * @memberof IntegrationsApi
4765
4773
  */
4766
- integrationListAuditLogs(xCompanyId, providerId, runType, status, startDate, endDate, limit, offset, options) {
4767
- return IntegrationsApiFp(this.configuration).integrationListAuditLogs(xCompanyId, providerId, runType, status, startDate, endDate, limit, offset, options).then((request) => request(this.axios, this.basePath));
4774
+ integrationListAuditLogs(xCompanyId, provider, runType, status, startDate, endDate, limit, offset, options) {
4775
+ return IntegrationsApiFp(this.configuration).integrationListAuditLogs(xCompanyId, provider, runType, status, startDate, endDate, limit, offset, options).then((request) => request(this.axios, this.basePath));
4768
4776
  }
4769
4777
  /**
4770
4778
  * List signal groups by resource type
@@ -4777,14 +4785,15 @@ export class IntegrationsApi extends BaseAPI {
4777
4785
  return IntegrationsApiFp(this.configuration).integrationListSignalGroups(options).then((request) => request(this.axios, this.basePath));
4778
4786
  }
4779
4787
  /**
4780
- * List all available signals
4788
+ * List company-specific signals
4781
4789
  * @summary List Signals
4790
+ * @param {string} xCompanyId
4782
4791
  * @param {*} [options] Override http request option.
4783
4792
  * @throws {RequiredError}
4784
4793
  * @memberof IntegrationsApi
4785
4794
  */
4786
- integrationListSignals(options) {
4787
- return IntegrationsApiFp(this.configuration).integrationListSignals(options).then((request) => request(this.axios, this.basePath));
4795
+ integrationListSignals(xCompanyId, options) {
4796
+ return IntegrationsApiFp(this.configuration).integrationListSignals(xCompanyId, options).then((request) => request(this.axios, this.basePath));
4788
4797
  }
4789
4798
  /**
4790
4799
  * Setup AWS provider via cross-account IAM role access. This endpoint accepts AWS account configuration for cross-account access. Users should create an IAM role in their AWS account with a trust relationship that allows your service to assume the role using the provided external_id. No AWS credentials are stored - only the role ARN and external ID for secure cross-account access.
@@ -8234,7 +8243,7 @@ export const V2ApiAxiosParamCreator = function (configuration) {
8234
8243
  * List audit logs from integrations service
8235
8244
  * @summary List Audit Logs
8236
8245
  * @param {string} xCompanyId
8237
- * @param {string | null} [providerId]
8246
+ * @param {string | null} [provider]
8238
8247
  * @param {string | null} [runType]
8239
8248
  * @param {string | null} [status]
8240
8249
  * @param {string | null} [startDate]
@@ -8244,7 +8253,7 @@ export const V2ApiAxiosParamCreator = function (configuration) {
8244
8253
  * @param {*} [options] Override http request option.
8245
8254
  * @throws {RequiredError}
8246
8255
  */
8247
- integrationListAuditLogs: (xCompanyId_1, providerId_1, runType_1, status_1, startDate_1, endDate_1, limit_1, offset_1, ...args_1) => __awaiter(this, [xCompanyId_1, providerId_1, runType_1, status_1, startDate_1, endDate_1, limit_1, offset_1, ...args_1], void 0, function* (xCompanyId, providerId, runType, status, startDate, endDate, limit, offset, options = {}) {
8256
+ integrationListAuditLogs: (xCompanyId_1, provider_1, runType_1, status_1, startDate_1, endDate_1, limit_1, offset_1, ...args_1) => __awaiter(this, [xCompanyId_1, provider_1, runType_1, status_1, startDate_1, endDate_1, limit_1, offset_1, ...args_1], void 0, function* (xCompanyId, provider, runType, status, startDate, endDate, limit, offset, options = {}) {
8248
8257
  // verify required parameter 'xCompanyId' is not null or undefined
8249
8258
  assertParamExists('integrationListAuditLogs', 'xCompanyId', xCompanyId);
8250
8259
  const localVarPath = `/v2/integrations/history`;
@@ -8257,8 +8266,8 @@ export const V2ApiAxiosParamCreator = function (configuration) {
8257
8266
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
8258
8267
  const localVarHeaderParameter = {};
8259
8268
  const localVarQueryParameter = {};
8260
- if (providerId !== undefined) {
8261
- localVarQueryParameter['provider_id'] = providerId;
8269
+ if (provider !== undefined) {
8270
+ localVarQueryParameter['provider'] = provider;
8262
8271
  }
8263
8272
  if (runType !== undefined) {
8264
8273
  localVarQueryParameter['run_type'] = runType;
@@ -8319,12 +8328,15 @@ export const V2ApiAxiosParamCreator = function (configuration) {
8319
8328
  };
8320
8329
  }),
8321
8330
  /**
8322
- * List all available signals
8331
+ * List company-specific signals
8323
8332
  * @summary List Signals
8333
+ * @param {string} xCompanyId
8324
8334
  * @param {*} [options] Override http request option.
8325
8335
  * @throws {RequiredError}
8326
8336
  */
8327
- integrationListSignals: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
8337
+ integrationListSignals: (xCompanyId_1, ...args_1) => __awaiter(this, [xCompanyId_1, ...args_1], void 0, function* (xCompanyId, options = {}) {
8338
+ // verify required parameter 'xCompanyId' is not null or undefined
8339
+ assertParamExists('integrationListSignals', 'xCompanyId', xCompanyId);
8328
8340
  const localVarPath = `/v2/integrations/signals`;
8329
8341
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
8330
8342
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -8335,6 +8347,9 @@ export const V2ApiAxiosParamCreator = function (configuration) {
8335
8347
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
8336
8348
  const localVarHeaderParameter = {};
8337
8349
  const localVarQueryParameter = {};
8350
+ if (xCompanyId != null) {
8351
+ localVarHeaderParameter['X-Company-Id'] = String(xCompanyId);
8352
+ }
8338
8353
  setSearchParams(localVarUrlObj, localVarQueryParameter);
8339
8354
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8340
8355
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -8783,7 +8798,7 @@ export const V2ApiFp = function (configuration) {
8783
8798
  * List audit logs from integrations service
8784
8799
  * @summary List Audit Logs
8785
8800
  * @param {string} xCompanyId
8786
- * @param {string | null} [providerId]
8801
+ * @param {string | null} [provider]
8787
8802
  * @param {string | null} [runType]
8788
8803
  * @param {string | null} [status]
8789
8804
  * @param {string | null} [startDate]
@@ -8793,10 +8808,10 @@ export const V2ApiFp = function (configuration) {
8793
8808
  * @param {*} [options] Override http request option.
8794
8809
  * @throws {RequiredError}
8795
8810
  */
8796
- integrationListAuditLogs(xCompanyId, providerId, runType, status, startDate, endDate, limit, offset, options) {
8811
+ integrationListAuditLogs(xCompanyId, provider, runType, status, startDate, endDate, limit, offset, options) {
8797
8812
  return __awaiter(this, void 0, void 0, function* () {
8798
8813
  var _a, _b, _c;
8799
- const localVarAxiosArgs = yield localVarAxiosParamCreator.integrationListAuditLogs(xCompanyId, providerId, runType, status, startDate, endDate, limit, offset, options);
8814
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.integrationListAuditLogs(xCompanyId, provider, runType, status, startDate, endDate, limit, offset, options);
8800
8815
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
8801
8816
  const localVarOperationServerBasePath = (_c = (_b = operationServerMap['V2Api.integrationListAuditLogs']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
8802
8817
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -8818,15 +8833,16 @@ export const V2ApiFp = function (configuration) {
8818
8833
  });
8819
8834
  },
8820
8835
  /**
8821
- * List all available signals
8836
+ * List company-specific signals
8822
8837
  * @summary List Signals
8838
+ * @param {string} xCompanyId
8823
8839
  * @param {*} [options] Override http request option.
8824
8840
  * @throws {RequiredError}
8825
8841
  */
8826
- integrationListSignals(options) {
8842
+ integrationListSignals(xCompanyId, options) {
8827
8843
  return __awaiter(this, void 0, void 0, function* () {
8828
8844
  var _a, _b, _c;
8829
- const localVarAxiosArgs = yield localVarAxiosParamCreator.integrationListSignals(options);
8845
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.integrationListSignals(xCompanyId, options);
8830
8846
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
8831
8847
  const localVarOperationServerBasePath = (_c = (_b = operationServerMap['V2Api.integrationListSignals']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
8832
8848
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -9065,7 +9081,7 @@ export const V2ApiFactory = function (configuration, basePath, axios) {
9065
9081
  * List audit logs from integrations service
9066
9082
  * @summary List Audit Logs
9067
9083
  * @param {string} xCompanyId
9068
- * @param {string | null} [providerId]
9084
+ * @param {string | null} [provider]
9069
9085
  * @param {string | null} [runType]
9070
9086
  * @param {string | null} [status]
9071
9087
  * @param {string | null} [startDate]
@@ -9075,8 +9091,8 @@ export const V2ApiFactory = function (configuration, basePath, axios) {
9075
9091
  * @param {*} [options] Override http request option.
9076
9092
  * @throws {RequiredError}
9077
9093
  */
9078
- integrationListAuditLogs(xCompanyId, providerId, runType, status, startDate, endDate, limit, offset, options) {
9079
- return localVarFp.integrationListAuditLogs(xCompanyId, providerId, runType, status, startDate, endDate, limit, offset, options).then((request) => request(axios, basePath));
9094
+ integrationListAuditLogs(xCompanyId, provider, runType, status, startDate, endDate, limit, offset, options) {
9095
+ return localVarFp.integrationListAuditLogs(xCompanyId, provider, runType, status, startDate, endDate, limit, offset, options).then((request) => request(axios, basePath));
9080
9096
  },
9081
9097
  /**
9082
9098
  * List signal groups by resource type
@@ -9088,13 +9104,14 @@ export const V2ApiFactory = function (configuration, basePath, axios) {
9088
9104
  return localVarFp.integrationListSignalGroups(options).then((request) => request(axios, basePath));
9089
9105
  },
9090
9106
  /**
9091
- * List all available signals
9107
+ * List company-specific signals
9092
9108
  * @summary List Signals
9109
+ * @param {string} xCompanyId
9093
9110
  * @param {*} [options] Override http request option.
9094
9111
  * @throws {RequiredError}
9095
9112
  */
9096
- integrationListSignals(options) {
9097
- return localVarFp.integrationListSignals(options).then((request) => request(axios, basePath));
9113
+ integrationListSignals(xCompanyId, options) {
9114
+ return localVarFp.integrationListSignals(xCompanyId, options).then((request) => request(axios, basePath));
9098
9115
  },
9099
9116
  /**
9100
9117
  * Setup AWS provider via cross-account IAM role access. This endpoint accepts AWS account configuration for cross-account access. Users should create an IAM role in their AWS account with a trust relationship that allows your service to assume the role using the provided external_id. No AWS credentials are stored - only the role ARN and external ID for secure cross-account access.
@@ -9281,7 +9298,7 @@ export class V2Api extends BaseAPI {
9281
9298
  * List audit logs from integrations service
9282
9299
  * @summary List Audit Logs
9283
9300
  * @param {string} xCompanyId
9284
- * @param {string | null} [providerId]
9301
+ * @param {string | null} [provider]
9285
9302
  * @param {string | null} [runType]
9286
9303
  * @param {string | null} [status]
9287
9304
  * @param {string | null} [startDate]
@@ -9292,8 +9309,8 @@ export class V2Api extends BaseAPI {
9292
9309
  * @throws {RequiredError}
9293
9310
  * @memberof V2Api
9294
9311
  */
9295
- integrationListAuditLogs(xCompanyId, providerId, runType, status, startDate, endDate, limit, offset, options) {
9296
- return V2ApiFp(this.configuration).integrationListAuditLogs(xCompanyId, providerId, runType, status, startDate, endDate, limit, offset, options).then((request) => request(this.axios, this.basePath));
9312
+ integrationListAuditLogs(xCompanyId, provider, runType, status, startDate, endDate, limit, offset, options) {
9313
+ return V2ApiFp(this.configuration).integrationListAuditLogs(xCompanyId, provider, runType, status, startDate, endDate, limit, offset, options).then((request) => request(this.axios, this.basePath));
9297
9314
  }
9298
9315
  /**
9299
9316
  * List signal groups by resource type
@@ -9306,14 +9323,15 @@ export class V2Api extends BaseAPI {
9306
9323
  return V2ApiFp(this.configuration).integrationListSignalGroups(options).then((request) => request(this.axios, this.basePath));
9307
9324
  }
9308
9325
  /**
9309
- * List all available signals
9326
+ * List company-specific signals
9310
9327
  * @summary List Signals
9328
+ * @param {string} xCompanyId
9311
9329
  * @param {*} [options] Override http request option.
9312
9330
  * @throws {RequiredError}
9313
9331
  * @memberof V2Api
9314
9332
  */
9315
- integrationListSignals(options) {
9316
- return V2ApiFp(this.configuration).integrationListSignals(options).then((request) => request(this.axios, this.basePath));
9333
+ integrationListSignals(xCompanyId, options) {
9334
+ return V2ApiFp(this.configuration).integrationListSignals(xCompanyId, options).then((request) => request(this.axios, this.basePath));
9317
9335
  }
9318
9336
  /**
9319
9337
  * Setup AWS provider via cross-account IAM role access. This endpoint accepts AWS account configuration for cross-account access. Users should create an IAM role in their AWS account with a trust relationship that allows your service to assume the role using the provided external_id. No AWS credentials are stored - only the role ARN and external ID for secure cross-account access.
package/dist/sdk.js CHANGED
@@ -52,6 +52,10 @@ export class ApiSDK {
52
52
  config.headers = {};
53
53
  }
54
54
  config.headers['Authorization'] = `Bearer ${this.token}`;
55
+ console.log('[SDK] Adding Authorization header to request');
56
+ }
57
+ else {
58
+ console.log('[SDK] No token available, request will use only session cookie');
55
59
  }
56
60
  return config;
57
61
  }, (error) => {
@@ -59,25 +63,37 @@ export class ApiSDK {
59
63
  });
60
64
  // Response interceptor: Extract and update token from backend responses
61
65
  this.axiosInstance.interceptors.response.use((response) => {
62
- var _a;
63
- const newToken = response.headers['authorization'] || response.headers['Authorization'] || ((_a = response.data) === null || _a === void 0 ? void 0 : _a.newToken);
66
+ var _a, _b, _c;
67
+ // Try multiple sources for the token
68
+ const authHeader = response.headers['authorization'] || response.headers['Authorization'];
69
+ const dataToken = ((_a = response.data) === null || _a === void 0 ? void 0 : _a.token) || ((_b = response.data) === null || _b === void 0 ? void 0 : _b.newToken) || ((_c = response.data) === null || _c === void 0 ? void 0 : _c.authToken);
70
+ const newToken = authHeader || dataToken;
64
71
  if (newToken) {
65
72
  const tokenValue = newToken.replace(/^Bearer /i, '');
66
73
  this.setToken(tokenValue);
67
- console.log('Token automatically updated via backend refresh');
74
+ console.log('[SDK] Token automatically updated from backend response');
75
+ }
76
+ else {
77
+ // Debug: Check if header exists but is blocked by CORS
78
+ console.log('[SDK] Response headers available:', Object.keys(response.headers));
79
+ if (!this.token) {
80
+ console.warn('[SDK] No token found in response. If backend sends "authorization" header, check Access-Control-Expose-Headers');
81
+ }
68
82
  }
69
83
  return response;
70
84
  }, (error) => {
71
- var _a, _b, _c, _d, _e;
85
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
72
86
  // Even on error, check if backend sent a refreshed token
73
- const newToken = ((_b = (_a = error.response) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b['authorization']) || ((_d = (_c = error.response) === null || _c === void 0 ? void 0 : _c.headers) === null || _d === void 0 ? void 0 : _d['Authorization']);
87
+ const authHeader = ((_b = (_a = error.response) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b['authorization']) || ((_d = (_c = error.response) === null || _c === void 0 ? void 0 : _c.headers) === null || _d === void 0 ? void 0 : _d['Authorization']);
88
+ const dataToken = ((_f = (_e = error.response) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.token) || ((_h = (_g = error.response) === null || _g === void 0 ? void 0 : _g.data) === null || _h === void 0 ? void 0 : _h.newToken);
89
+ const newToken = authHeader || dataToken;
74
90
  if (newToken) {
75
91
  const tokenValue = newToken.replace(/^Bearer /i, '');
76
92
  this.setToken(tokenValue);
77
- console.log('Token automatically updated via backend refresh (error response)');
93
+ console.log('[SDK] Token automatically updated from backend error response');
78
94
  }
79
- if (((_e = error.response) === null || _e === void 0 ? void 0 : _e.status) === 401) {
80
- console.error('Authentication failed - session expired');
95
+ if (((_j = error.response) === null || _j === void 0 ? void 0 : _j.status) === 401) {
96
+ console.error('[SDK] Authentication failed - session expired');
81
97
  }
82
98
  return Promise.reject(error);
83
99
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rasadov/lumoar-sdk",
3
- "version": "2.0.9",
3
+ "version": "2.1.0",
4
4
  "description": "Lumoar API SDK for dashboard use (session-based authentication)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -37,4 +37,4 @@
37
37
  "@types/node": "^24.5.2",
38
38
  "typescript": "^5.9.2"
39
39
  }
40
- }
40
+ }
package/sdk.ts CHANGED
@@ -102,6 +102,9 @@ export class ApiSDK {
102
102
  config.headers = {} as any;
103
103
  }
104
104
  config.headers['Authorization'] = `Bearer ${this.token}`;
105
+ console.log('[SDK] Adding Authorization header to request');
106
+ } else {
107
+ console.log('[SDK] No token available, request will use only session cookie');
105
108
  }
106
109
  return config;
107
110
  }, (error) => {
@@ -110,23 +113,36 @@ export class ApiSDK {
110
113
 
111
114
  // Response interceptor: Extract and update token from backend responses
112
115
  this.axiosInstance.interceptors.response.use((response: AxiosResponse) => {
113
- const newToken = response.headers['authorization'] || response.headers['Authorization'] || response.data?.newToken;
116
+ // Try multiple sources for the token
117
+ const authHeader = response.headers['authorization'] || response.headers['Authorization'];
118
+ const dataToken = response.data?.token || response.data?.newToken || response.data?.authToken;
119
+ const newToken = authHeader || dataToken;
120
+
114
121
  if (newToken) {
115
122
  const tokenValue = newToken.replace(/^Bearer /i, '');
116
123
  this.setToken(tokenValue);
117
- console.log('Token automatically updated via backend refresh');
124
+ console.log('[SDK] Token automatically updated from backend response');
125
+ } else {
126
+ // Debug: Check if header exists but is blocked by CORS
127
+ console.log('[SDK] Response headers available:', Object.keys(response.headers));
128
+ if (!this.token) {
129
+ console.warn('[SDK] No token found in response. If backend sends "authorization" header, check Access-Control-Expose-Headers');
130
+ }
118
131
  }
119
132
  return response;
120
133
  }, (error) => {
121
134
  // Even on error, check if backend sent a refreshed token
122
- const newToken = error.response?.headers?.['authorization'] || error.response?.headers?.['Authorization'];
135
+ const authHeader = error.response?.headers?.['authorization'] || error.response?.headers?.['Authorization'];
136
+ const dataToken = error.response?.data?.token || error.response?.data?.newToken;
137
+ const newToken = authHeader || dataToken;
138
+
123
139
  if (newToken) {
124
140
  const tokenValue = newToken.replace(/^Bearer /i, '');
125
141
  this.setToken(tokenValue);
126
- console.log('Token automatically updated via backend refresh (error response)');
142
+ console.log('[SDK] Token automatically updated from backend error response');
127
143
  }
128
144
  if (error.response?.status === 401) {
129
- console.error('Authentication failed - session expired');
145
+ console.error('[SDK] Authentication failed - session expired');
130
146
  }
131
147
  return Promise.reject(error);
132
148
  });