@epilot/pricing-client 3.47.3 → 3.47.5

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/openapi.d.ts CHANGED
@@ -1109,9 +1109,6 @@ declare namespace Components {
1109
1109
  */
1110
1110
  Coupon)[];
1111
1111
  }
1112
- /**
1113
- * The basic auth credentials
1114
- */
1115
1112
  export interface BasicAuthCredentials {
1116
1113
  /**
1117
1114
  * The username
@@ -1125,6 +1122,21 @@ declare namespace Components {
1125
1122
  * 123456
1126
1123
  */
1127
1124
  password: string;
1125
+ }
1126
+ export interface BasicAuthIntegration {
1127
+ /**
1128
+ * The username
1129
+ * example:
1130
+ * username
1131
+ */
1132
+ username: string;
1133
+ /**
1134
+ * The password
1135
+ * example:
1136
+ * 123456
1137
+ */
1138
+ password: string;
1139
+ auth_type?: "basic_auth";
1128
1140
  /**
1129
1141
  * The base URL
1130
1142
  * example:
@@ -2831,7 +2843,11 @@ declare namespace Components {
2831
2843
  bidding_zone: /* The bidding zone for a spot market price. */ SpotMarketBiddingZone;
2832
2844
  prices: /* A market price at a given point in time. */ HistoricMarketPriceRecord[];
2833
2845
  }
2834
- export type IntegrationCredentialsResult = /* The basic auth credentials */ BasicAuthCredentials;
2846
+ /**
2847
+ * The auth credentials for external integrations
2848
+ */
2849
+ export type IntegrationAuthCredentials = /* The auth credentials for external integrations */ BasicAuthIntegration | OAuthIntegration;
2850
+ export type IntegrationCredentialsResult = /* The auth credentials for external integrations */ IntegrationAuthCredentials;
2835
2851
  export type IntegrationId = "getag" | "ikom";
2836
2852
  export interface JourneyContext {
2837
2853
  /**
@@ -2919,6 +2935,64 @@ declare namespace Components {
2919
2935
  */
2920
2936
  value?: string;
2921
2937
  })[];
2938
+ export interface OAuthCredentials {
2939
+ /**
2940
+ * The OAuth client ID
2941
+ * example:
2942
+ * client_id_123
2943
+ */
2944
+ client_id: string;
2945
+ /**
2946
+ * The OAuth client secret
2947
+ * example:
2948
+ * client_secret_456
2949
+ */
2950
+ client_secret: string;
2951
+ /**
2952
+ * The URL to obtain OAuth tokens
2953
+ * example:
2954
+ * https://api.example.com/oauth/token
2955
+ */
2956
+ authorization_url: string;
2957
+ /**
2958
+ * The OAuth grant type
2959
+ */
2960
+ grant_type: "client_credentials";
2961
+ /**
2962
+ * The OAuth scope
2963
+ * example:
2964
+ * read:user write:user
2965
+ */
2966
+ scope?: string;
2967
+ /**
2968
+ * The OAuth access token
2969
+ * example:
2970
+ * access_token_789
2971
+ */
2972
+ access_token?: string;
2973
+ /**
2974
+ * The expiration time of the OAuth access token in seconds
2975
+ * example:
2976
+ * 3600
2977
+ */
2978
+ access_token_expires_in?: number;
2979
+ /**
2980
+ * The expiration time of the OAuth access token
2981
+ * example:
2982
+ * 1715731200
2983
+ */
2984
+ access_token_expires_at?: number;
2985
+ }
2986
+ export interface OAuthIntegration {
2987
+ auth_type: "oauth";
2988
+ oauth: OAuthCredentials;
2989
+ /**
2990
+ * The base URL
2991
+ * example:
2992
+ * https://api.example.com
2993
+ */
2994
+ base_url?: string;
2995
+ }
2922
2996
  /**
2923
2997
  * The opportunity entity
2924
2998
  * example:
@@ -5107,7 +5181,7 @@ declare namespace Components {
5107
5181
  CouponWithoutPromoCodes[];
5108
5182
  }
5109
5183
  export type SalesTax = "nontaxable" | "reduced" | "standard";
5110
- export type SaveIntegrationCredentialsParams = /* The basic auth credentials */ BasicAuthCredentials;
5184
+ export type SaveIntegrationCredentialsParams = /* The auth credentials for external integrations */ IntegrationAuthCredentials;
5111
5185
  export interface SearchExternalCatalogParams {
5112
5186
  context: JourneyContext;
5113
5187
  }
@@ -5236,7 +5310,7 @@ declare namespace Components {
5236
5310
  _updated_at: string; // date-time
5237
5311
  type: "VAT" | "GST" | "Custom";
5238
5312
  description?: string;
5239
- rate: number;
5313
+ rate: number | null;
5240
5314
  active?: boolean;
5241
5315
  region?: string;
5242
5316
  region_label?: string;
@@ -5337,7 +5411,7 @@ declare namespace Components {
5337
5411
  Tax;
5338
5412
  }
5339
5413
  export interface TaxBreakdownInfo {
5340
- rate?: number;
5414
+ rate?: number | null;
5341
5415
  type?: "VAT" | "GST" | "Custom";
5342
5416
  _id?: string;
5343
5417
  }
@@ -6234,6 +6308,7 @@ export type BasePriceItem = Components.Schemas.BasePriceItem;
6234
6308
  export type BasePriceItemCommon = Components.Schemas.BasePriceItemCommon;
6235
6309
  export type BasePriceItemDto = Components.Schemas.BasePriceItemDto;
6236
6310
  export type BasicAuthCredentials = Components.Schemas.BasicAuthCredentials;
6311
+ export type BasicAuthIntegration = Components.Schemas.BasicAuthIntegration;
6237
6312
  export type BillingPeriod = Components.Schemas.BillingPeriod;
6238
6313
  export type Cart = Components.Schemas.Cart;
6239
6314
  export type CartDto = Components.Schemas.CartDto;
@@ -6274,11 +6349,14 @@ export type File = Components.Schemas.File;
6274
6349
  export type GasConcessionType = Components.Schemas.GasConcessionType;
6275
6350
  export type HistoricMarketPriceRecord = Components.Schemas.HistoricMarketPriceRecord;
6276
6351
  export type HistoricMarketPricesResult = Components.Schemas.HistoricMarketPricesResult;
6352
+ export type IntegrationAuthCredentials = Components.Schemas.IntegrationAuthCredentials;
6277
6353
  export type IntegrationCredentialsResult = Components.Schemas.IntegrationCredentialsResult;
6278
6354
  export type IntegrationId = Components.Schemas.IntegrationId;
6279
6355
  export type JourneyContext = Components.Schemas.JourneyContext;
6280
6356
  export type MarkupPricingModel = Components.Schemas.MarkupPricingModel;
6281
6357
  export type MetaData = Components.Schemas.MetaData;
6358
+ export type OAuthCredentials = Components.Schemas.OAuthCredentials;
6359
+ export type OAuthIntegration = Components.Schemas.OAuthIntegration;
6282
6360
  export type Opportunity = Components.Schemas.Opportunity;
6283
6361
  export type OpportunitySource = Components.Schemas.OpportunitySource;
6284
6362
  export type Order = Components.Schemas.Order;
package/dist/openapi.json CHANGED
@@ -3298,10 +3298,10 @@
3298
3298
  ]
3299
3299
  },
3300
3300
  "IntegrationCredentialsResult": {
3301
- "$ref": "#/components/schemas/BasicAuthCredentials"
3301
+ "$ref": "#/components/schemas/IntegrationAuthCredentials"
3302
3302
  },
3303
3303
  "SaveIntegrationCredentialsParams": {
3304
- "$ref": "#/components/schemas/BasicAuthCredentials"
3304
+ "$ref": "#/components/schemas/IntegrationAuthCredentials"
3305
3305
  },
3306
3306
  "ComputePriceParamsBase": {
3307
3307
  "type": "object",
@@ -3733,8 +3733,61 @@
3733
3733
  "unit_amount_currency"
3734
3734
  ]
3735
3735
  },
3736
+ "OAuthCredentials": {
3737
+ "type": "object",
3738
+ "properties": {
3739
+ "client_id": {
3740
+ "description": "The OAuth client ID",
3741
+ "type": "string",
3742
+ "example": "client_id_123"
3743
+ },
3744
+ "client_secret": {
3745
+ "description": "The OAuth client secret",
3746
+ "type": "string",
3747
+ "example": "client_secret_456"
3748
+ },
3749
+ "authorization_url": {
3750
+ "description": "The URL to obtain OAuth tokens",
3751
+ "type": "string",
3752
+ "example": "https://api.example.com/oauth/token"
3753
+ },
3754
+ "grant_type": {
3755
+ "description": "The OAuth grant type",
3756
+ "type": "string",
3757
+ "enum": [
3758
+ "client_credentials"
3759
+ ],
3760
+ "default": "client_credentials"
3761
+ },
3762
+ "scope": {
3763
+ "description": "The OAuth scope",
3764
+ "type": "string",
3765
+ "example": "read:user write:user"
3766
+ },
3767
+ "access_token": {
3768
+ "description": "The OAuth access token",
3769
+ "type": "string",
3770
+ "example": "access_token_789"
3771
+ },
3772
+ "access_token_expires_in": {
3773
+ "description": "The expiration time of the OAuth access token in seconds",
3774
+ "type": "number",
3775
+ "example": 3600
3776
+ },
3777
+ "access_token_expires_at": {
3778
+ "description": "The expiration time of the OAuth access token",
3779
+ "type": "number",
3780
+ "example": 1715731200
3781
+ }
3782
+ },
3783
+ "required": [
3784
+ "client_id",
3785
+ "client_secret",
3786
+ "authorization_url",
3787
+ "grant_type"
3788
+ ]
3789
+ },
3736
3790
  "BasicAuthCredentials": {
3737
- "description": "The basic auth credentials",
3738
3791
  "type": "object",
3739
3792
  "properties": {
3740
3793
  "username": {
@@ -3746,6 +3799,48 @@
3746
3799
  "description": "The password",
3747
3800
  "type": "string",
3748
3801
  "example": "123456"
3802
+ }
3803
+ },
3804
+ "required": [
3805
+ "username",
3806
+ "password"
3807
+ ]
3808
+ },
3809
+ "BasicAuthIntegration": {
3810
+ "type": "object",
3811
+ "allOf": [
3812
+ {
3813
+ "$ref": "#/components/schemas/BasicAuthCredentials"
3814
+ },
3815
+ {
3816
+ "type": "object",
3817
+ "properties": {
3818
+ "auth_type": {
3819
+ "type": "string",
3820
+ "enum": [
3821
+ "basic_auth"
3822
+ ]
3823
+ },
3824
+ "base_url": {
3825
+ "description": "The base URL",
3826
+ "type": "string",
3827
+ "example": "https://api.example.com"
3828
+ }
3829
+ }
3830
+ }
3831
+ ]
3832
+ },
3833
+ "OAuthIntegration": {
3834
+ "type": "object",
3835
+ "properties": {
3836
+ "auth_type": {
3837
+ "type": "string",
3838
+ "enum": [
3839
+ "oauth"
3840
+ ]
3841
+ },
3842
+ "oauth": {
3843
+ "$ref": "#/components/schemas/OAuthCredentials"
3749
3844
  },
3750
3845
  "base_url": {
3751
3846
  "description": "The base URL",
@@ -3754,8 +3849,20 @@
3754
3849
  }
3755
3850
  },
3756
3851
  "required": [
3757
- "username",
3758
- "password"
3852
+ "auth_type",
3853
+ "oauth"
3854
+ ]
3855
+ },
3856
+ "IntegrationAuthCredentials": {
3857
+ "description": "The auth credentials for external integrations",
3858
+ "type": "object",
3859
+ "oneOf": [
3860
+ {
3861
+ "$ref": "#/components/schemas/BasicAuthIntegration"
3862
+ },
3863
+ {
3864
+ "$ref": "#/components/schemas/OAuthIntegration"
3865
+ }
3759
3866
  ]
3760
3867
  },
3761
3868
  "SearchStreetsResult": {
@@ -5500,7 +5607,8 @@
5500
5607
  "type": "string"
5501
5608
  },
5502
5609
  "rate": {
5503
- "type": "number"
5610
+ "type": "number",
5611
+ "nullable": true
5504
5612
  },
5505
5613
  "active": {
5506
5614
  "type": "boolean"
@@ -5533,7 +5641,8 @@
5533
5641
  "type": "object",
5534
5642
  "properties": {
5535
5643
  "rate": {
5536
- "type": "number"
5644
+ "type": "number",
5645
+ "nullable": true
5537
5646
  },
5538
5647
  "type": {
5539
5648
  "type": "string",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/pricing-client",
3
- "version": "3.47.3",
3
+ "version": "3.47.5",
4
4
  "description": "Client for epilot Pricing APIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",