@or-sdk/billing 10.30.3-beta.2126.0 → 10.30.3-beta.2127.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.
Files changed (232) hide show
  1. package/dist/cjs/Billing.js +0 -1
  2. package/dist/cjs/Billing.js.map +1 -1
  3. package/dist/cjs/api/accountsApi/index.js.map +1 -1
  4. package/dist/cjs/api/billingPlans/index.js.map +1 -1
  5. package/dist/cjs/api/categoriesApi/index.js.map +1 -1
  6. package/dist/cjs/api/contractsApi/index.js.map +1 -1
  7. package/dist/cjs/api/creditsApi/index.js.map +1 -1
  8. package/dist/cjs/api/customSkuApi/index.js.map +1 -1
  9. package/dist/cjs/api/customerUsageApi/index.js.map +1 -1
  10. package/dist/cjs/api/customerUsageApi/types.js +17 -1
  11. package/dist/cjs/api/customerUsageApi/types.js.map +1 -1
  12. package/dist/cjs/api/dataReconciliationApi/index.js.map +1 -1
  13. package/dist/cjs/api/environmentsApi/index.js.map +1 -1
  14. package/dist/cjs/api/index.js +1 -3
  15. package/dist/cjs/api/index.js.map +1 -1
  16. package/dist/cjs/api/patternsApi/index.js.map +1 -1
  17. package/dist/cjs/api/paymentProvidersApi/index.js.map +1 -1
  18. package/dist/cjs/api/prepaymentsApi/index.js.map +1 -1
  19. package/dist/cjs/api/processingStatusesApi/index.js.map +1 -1
  20. package/dist/cjs/api/reportingDatabasesApi/index.js.map +1 -1
  21. package/dist/cjs/api/sageApi/index.js.map +1 -1
  22. package/dist/cjs/api/skuMappingApi/index.js.map +1 -1
  23. package/dist/cjs/api/skusApi/index.js.map +1 -1
  24. package/dist/cjs/api/subscriptionsApi/index.js.map +1 -1
  25. package/dist/cjs/api/thresholdAlertsApi/index.js.map +1 -1
  26. package/dist/cjs/api/thresholdSettingsApi/index.js.map +1 -1
  27. package/dist/cjs/api/tiersApi/index.js.map +1 -1
  28. package/dist/cjs/api/transactionsApi/index.js.map +1 -1
  29. package/dist/cjs/api/vendorMappingApi/index.js.map +1 -1
  30. package/dist/cjs/api/vendorsApi/index.js.map +1 -1
  31. package/dist/cjs/types.js.map +1 -1
  32. package/dist/esm/Billing.js +1 -2
  33. package/dist/esm/Billing.js.map +1 -1
  34. package/dist/esm/api/accountsApi/index.js.map +1 -1
  35. package/dist/esm/api/billingPlans/index.js.map +1 -1
  36. package/dist/esm/api/categoriesApi/index.js.map +1 -1
  37. package/dist/esm/api/contractsApi/index.js.map +1 -1
  38. package/dist/esm/api/creditsApi/index.js.map +1 -1
  39. package/dist/esm/api/customSkuApi/index.js.map +1 -1
  40. package/dist/esm/api/customerUsageApi/index.js.map +1 -1
  41. package/dist/esm/api/customerUsageApi/types.js +16 -0
  42. package/dist/esm/api/customerUsageApi/types.js.map +1 -1
  43. package/dist/esm/api/dataReconciliationApi/index.js.map +1 -1
  44. package/dist/esm/api/environmentsApi/index.js.map +1 -1
  45. package/dist/esm/api/index.js +0 -1
  46. package/dist/esm/api/index.js.map +1 -1
  47. package/dist/esm/api/patternsApi/index.js.map +1 -1
  48. package/dist/esm/api/paymentProvidersApi/index.js.map +1 -1
  49. package/dist/esm/api/prepaymentsApi/index.js.map +1 -1
  50. package/dist/esm/api/processingStatusesApi/index.js.map +1 -1
  51. package/dist/esm/api/reportingDatabasesApi/index.js.map +1 -1
  52. package/dist/esm/api/sageApi/index.js.map +1 -1
  53. package/dist/esm/api/skuMappingApi/index.js.map +1 -1
  54. package/dist/esm/api/skusApi/index.js.map +1 -1
  55. package/dist/esm/api/subscriptionsApi/index.js.map +1 -1
  56. package/dist/esm/api/thresholdAlertsApi/index.js.map +1 -1
  57. package/dist/esm/api/thresholdSettingsApi/index.js.map +1 -1
  58. package/dist/esm/api/tiersApi/index.js.map +1 -1
  59. package/dist/esm/api/transactionsApi/index.js.map +1 -1
  60. package/dist/esm/api/vendorMappingApi/index.js.map +1 -1
  61. package/dist/esm/api/vendorsApi/index.js.map +1 -1
  62. package/dist/esm/types.js.map +1 -1
  63. package/dist/types/Billing.d.ts +1 -2
  64. package/dist/types/Billing.d.ts.map +1 -1
  65. package/dist/types/api/accountsApi/index.d.ts +1 -1
  66. package/dist/types/api/accountsApi/index.d.ts.map +1 -1
  67. package/dist/types/api/accountsApi/types.d.ts +1 -1
  68. package/dist/types/api/accountsApi/types.d.ts.map +1 -1
  69. package/dist/types/api/auditApi/types.d.ts +2 -1
  70. package/dist/types/api/auditApi/types.d.ts.map +1 -1
  71. package/dist/types/api/billingPlans/index.d.ts +1 -1
  72. package/dist/types/api/billingPlans/index.d.ts.map +1 -1
  73. package/dist/types/api/billingPlans/types.d.ts +1 -1
  74. package/dist/types/api/billingPlans/types.d.ts.map +1 -1
  75. package/dist/types/api/categoriesApi/index.d.ts +1 -1
  76. package/dist/types/api/categoriesApi/index.d.ts.map +1 -1
  77. package/dist/types/api/categoriesApi/types.d.ts +1 -1
  78. package/dist/types/api/categoriesApi/types.d.ts.map +1 -1
  79. package/dist/types/api/contractsApi/index.d.ts +1 -2
  80. package/dist/types/api/contractsApi/index.d.ts.map +1 -1
  81. package/dist/types/api/contractsApi/types.d.ts +1 -1
  82. package/dist/types/api/contractsApi/types.d.ts.map +1 -1
  83. package/dist/types/api/creditsApi/index.d.ts +1 -1
  84. package/dist/types/api/creditsApi/index.d.ts.map +1 -1
  85. package/dist/types/api/creditsApi/types.d.ts +1 -2
  86. package/dist/types/api/creditsApi/types.d.ts.map +1 -1
  87. package/dist/types/api/customSkuApi/index.d.ts +1 -1
  88. package/dist/types/api/customSkuApi/index.d.ts.map +1 -1
  89. package/dist/types/api/customSkuApi/types.d.ts +1 -1
  90. package/dist/types/api/customSkuApi/types.d.ts.map +1 -1
  91. package/dist/types/api/customerUsageApi/index.d.ts +1 -2
  92. package/dist/types/api/customerUsageApi/index.d.ts.map +1 -1
  93. package/dist/types/api/customerUsageApi/types.d.ts +17 -1
  94. package/dist/types/api/customerUsageApi/types.d.ts.map +1 -1
  95. package/dist/types/api/customersApi/types.d.ts +2 -2
  96. package/dist/types/api/customersApi/types.d.ts.map +1 -1
  97. package/dist/types/api/dataReconciliationApi/index.d.ts +1 -2
  98. package/dist/types/api/dataReconciliationApi/index.d.ts.map +1 -1
  99. package/dist/types/api/dataReconciliationApi/types.d.ts +3 -2
  100. package/dist/types/api/dataReconciliationApi/types.d.ts.map +1 -1
  101. package/dist/types/api/environmentsApi/index.d.ts +1 -2
  102. package/dist/types/api/environmentsApi/index.d.ts.map +1 -1
  103. package/dist/types/api/environmentsApi/types.d.ts +1 -1
  104. package/dist/types/api/environmentsApi/types.d.ts.map +1 -1
  105. package/dist/types/api/flowsApi/types.d.ts +1 -1
  106. package/dist/types/api/flowsApi/types.d.ts.map +1 -1
  107. package/dist/types/api/index.d.ts +0 -1
  108. package/dist/types/api/index.d.ts.map +1 -1
  109. package/dist/types/api/patternsApi/index.d.ts +1 -1
  110. package/dist/types/api/patternsApi/index.d.ts.map +1 -1
  111. package/dist/types/api/patternsApi/types.d.ts +1 -1
  112. package/dist/types/api/patternsApi/types.d.ts.map +1 -1
  113. package/dist/types/api/paymentProvidersApi/index.d.ts +1 -2
  114. package/dist/types/api/paymentProvidersApi/index.d.ts.map +1 -1
  115. package/dist/types/api/paymentProvidersApi/types.d.ts +1 -1
  116. package/dist/types/api/paymentProvidersApi/types.d.ts.map +1 -1
  117. package/dist/types/api/prepaymentsApi/index.d.ts +1 -1
  118. package/dist/types/api/prepaymentsApi/index.d.ts.map +1 -1
  119. package/dist/types/api/prepaymentsApi/types.d.ts +1 -1
  120. package/dist/types/api/prepaymentsApi/types.d.ts.map +1 -1
  121. package/dist/types/api/processingStatusesApi/index.d.ts +1 -1
  122. package/dist/types/api/processingStatusesApi/index.d.ts.map +1 -1
  123. package/dist/types/api/processingStatusesApi/types.d.ts +1 -1
  124. package/dist/types/api/processingStatusesApi/types.d.ts.map +1 -1
  125. package/dist/types/api/reportingDatabasesApi/index.d.ts +1 -2
  126. package/dist/types/api/reportingDatabasesApi/index.d.ts.map +1 -1
  127. package/dist/types/api/reportingDatabasesApi/types.d.ts +2 -2
  128. package/dist/types/api/reportingDatabasesApi/types.d.ts.map +1 -1
  129. package/dist/types/api/sageApi/index.d.ts +1 -2
  130. package/dist/types/api/sageApi/index.d.ts.map +1 -1
  131. package/dist/types/api/sageApi/types.d.ts +1 -1
  132. package/dist/types/api/sageApi/types.d.ts.map +1 -1
  133. package/dist/types/api/skuMappingApi/index.d.ts +1 -2
  134. package/dist/types/api/skuMappingApi/index.d.ts.map +1 -1
  135. package/dist/types/api/skuMappingApi/types.d.ts +1 -1
  136. package/dist/types/api/skuMappingApi/types.d.ts.map +1 -1
  137. package/dist/types/api/skusApi/index.d.ts +1 -1
  138. package/dist/types/api/skusApi/index.d.ts.map +1 -1
  139. package/dist/types/api/skusApi/types.d.ts +1 -1
  140. package/dist/types/api/skusApi/types.d.ts.map +1 -1
  141. package/dist/types/api/subscriptionsApi/index.d.ts +1 -1
  142. package/dist/types/api/subscriptionsApi/index.d.ts.map +1 -1
  143. package/dist/types/api/subscriptionsApi/types.d.ts +1 -1
  144. package/dist/types/api/subscriptionsApi/types.d.ts.map +1 -1
  145. package/dist/types/api/thresholdAlertsApi/index.d.ts +1 -1
  146. package/dist/types/api/thresholdAlertsApi/index.d.ts.map +1 -1
  147. package/dist/types/api/thresholdAlertsApi/types.d.ts +1 -1
  148. package/dist/types/api/thresholdAlertsApi/types.d.ts.map +1 -1
  149. package/dist/types/api/thresholdSettingsApi/index.d.ts +1 -2
  150. package/dist/types/api/thresholdSettingsApi/index.d.ts.map +1 -1
  151. package/dist/types/api/thresholdSettingsApi/types.d.ts +1 -1
  152. package/dist/types/api/thresholdSettingsApi/types.d.ts.map +1 -1
  153. package/dist/types/api/tiersApi/index.d.ts +1 -1
  154. package/dist/types/api/tiersApi/index.d.ts.map +1 -1
  155. package/dist/types/api/tiersApi/types.d.ts +1 -1
  156. package/dist/types/api/tiersApi/types.d.ts.map +1 -1
  157. package/dist/types/api/transactionsApi/index.d.ts +1 -1
  158. package/dist/types/api/transactionsApi/index.d.ts.map +1 -1
  159. package/dist/types/api/vendorMappingApi/index.d.ts +1 -1
  160. package/dist/types/api/vendorMappingApi/index.d.ts.map +1 -1
  161. package/dist/types/api/vendorMappingApi/types.d.ts +1 -1
  162. package/dist/types/api/vendorMappingApi/types.d.ts.map +1 -1
  163. package/dist/types/api/vendorsApi/index.d.ts +1 -2
  164. package/dist/types/api/vendorsApi/index.d.ts.map +1 -1
  165. package/dist/types/api/vendorsApi/types.d.ts +1 -1
  166. package/dist/types/api/vendorsApi/types.d.ts.map +1 -1
  167. package/dist/types/types.d.ts +13 -0
  168. package/dist/types/types.d.ts.map +1 -1
  169. package/dist/types/utils/fetchPagedData.d.ts +1 -1
  170. package/dist/types/utils/fetchPagedData.d.ts.map +1 -1
  171. package/package.json +3 -3
  172. package/src/Billing.ts +0 -3
  173. package/src/api/accountsApi/index.ts +1 -2
  174. package/src/api/accountsApi/types.ts +1 -1
  175. package/src/api/auditApi/types.ts +3 -1
  176. package/src/api/billingPlans/index.ts +1 -2
  177. package/src/api/billingPlans/types.ts +1 -1
  178. package/src/api/categoriesApi/index.ts +1 -2
  179. package/src/api/categoriesApi/types.ts +1 -1
  180. package/src/api/contractsApi/index.ts +1 -3
  181. package/src/api/contractsApi/types.ts +1 -1
  182. package/src/api/creditsApi/index.ts +1 -2
  183. package/src/api/creditsApi/types.ts +1 -3
  184. package/src/api/customSkuApi/index.ts +1 -2
  185. package/src/api/customSkuApi/types.ts +1 -1
  186. package/src/api/customerUsageApi/index.ts +1 -3
  187. package/src/api/customerUsageApi/types.ts +18 -1
  188. package/src/api/customersApi/types.ts +2 -2
  189. package/src/api/dataReconciliationApi/index.ts +1 -3
  190. package/src/api/dataReconciliationApi/types.ts +3 -2
  191. package/src/api/environmentsApi/index.ts +1 -3
  192. package/src/api/environmentsApi/types.ts +1 -1
  193. package/src/api/flowsApi/types.ts +1 -1
  194. package/src/api/index.ts +0 -1
  195. package/src/api/patternsApi/index.ts +1 -2
  196. package/src/api/patternsApi/types.ts +1 -1
  197. package/src/api/paymentProvidersApi/index.ts +1 -3
  198. package/src/api/paymentProvidersApi/types.ts +1 -1
  199. package/src/api/prepaymentsApi/index.ts +1 -2
  200. package/src/api/prepaymentsApi/types.ts +1 -1
  201. package/src/api/processingStatusesApi/index.ts +1 -2
  202. package/src/api/processingStatusesApi/types.ts +1 -1
  203. package/src/api/reportingDatabasesApi/index.ts +2 -2
  204. package/src/api/reportingDatabasesApi/types.ts +2 -2
  205. package/src/api/sageApi/index.ts +1 -3
  206. package/src/api/sageApi/types.ts +1 -1
  207. package/src/api/skuMappingApi/index.ts +1 -3
  208. package/src/api/skuMappingApi/types.ts +1 -1
  209. package/src/api/skusApi/index.ts +1 -2
  210. package/src/api/skusApi/types.ts +1 -1
  211. package/src/api/subscriptionsApi/index.ts +1 -2
  212. package/src/api/subscriptionsApi/types.ts +1 -1
  213. package/src/api/thresholdAlertsApi/index.ts +1 -2
  214. package/src/api/thresholdAlertsApi/types.ts +1 -1
  215. package/src/api/thresholdSettingsApi/index.ts +1 -3
  216. package/src/api/thresholdSettingsApi/types.ts +1 -1
  217. package/src/api/tiersApi/index.ts +1 -2
  218. package/src/api/tiersApi/types.ts +1 -1
  219. package/src/api/transactionsApi/index.ts +1 -2
  220. package/src/api/vendorMappingApi/index.ts +1 -2
  221. package/src/api/vendorMappingApi/types.ts +1 -2
  222. package/src/api/vendorsApi/index.ts +1 -2
  223. package/src/api/vendorsApi/types.ts +1 -1
  224. package/src/types.ts +16 -0
  225. package/src/utils/fetchPagedData.ts +2 -2
  226. package/dist/cjs/api/cronSettings/index.js +0 -103
  227. package/dist/cjs/api/cronSettings/index.js.map +0 -1
  228. package/dist/esm/api/cronSettings/index.js +0 -32
  229. package/dist/esm/api/cronSettings/index.js.map +0 -1
  230. package/dist/types/api/cronSettings/index.d.ts +0 -10
  231. package/dist/types/api/cronSettings/index.d.ts.map +0 -1
  232. package/src/api/cronSettings/index.ts +0 -51
@@ -1,4 +1,6 @@
1
- import { AuditOperation, ResponseDto, RequestDto } from '@onereach/billing-shared';
1
+ import { AuditOperation } from '@onereach/billing-shared';
2
+
3
+ import { RequestDto, ResponseDto } from '../../types';
2
4
 
3
5
  export interface AuditRecordDto {
4
6
  id: string;
@@ -1,5 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
1
+ import { ResponseDto } from '../../types';
3
2
  import { BaseApi } from '../baseApi';
4
3
 
5
4
  import { BillingPlanDto, CreateBillingPlanDto, FindBillingPlansDto, UpdateBillingPlanDto } from './types';
@@ -1,4 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
1
+ import { RequestDto } from '../../types';
2
2
 
3
3
  export type FindBillingPlansDto = {
4
4
  id?: string;
@@ -1,5 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
1
+ import { ResponseDto } from '../../types';
3
2
  import { BaseApi } from '../baseApi';
4
3
 
5
4
  import { CategoryDto, FindCategoriesDto } from './types';
@@ -1,4 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
1
+ import { RequestDto } from '../../types';
2
2
 
3
3
  export type FindCategoriesDto = {
4
4
  id?: string;
@@ -1,6 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
3
- import { OptionalApiParams } from '../../types';
1
+ import { ResponseDto, OptionalApiParams } from '../../types';
4
2
  import { BaseApi } from '../baseApi';
5
3
 
6
4
  import { ContractResponse, ContractSearchParams, CreateContractDto, UpdateContractDto } from './types';
@@ -1,4 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
1
+ import { RequestDto } from '../../types';
2
2
 
3
3
  export type CreditResponse = {
4
4
  id: string;
@@ -1,5 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
1
+ import { ResponseDto } from '../../types';
3
2
  import { BaseApi } from '../baseApi';
4
3
 
5
4
  import { UpdateCreditsDto, CreateCreditsDto, CreditsDto, FindCreditssDto } from './types';
@@ -1,6 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
2
-
3
- import { PaymentCreditSources } from '../../types';
1
+ import { PaymentCreditSources, RequestDto } from '../../types';
4
2
 
5
3
  export type FindCreditssDto = {
6
4
  id?: string;
@@ -1,5 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
1
+ import { ResponseDto } from '../../types';
3
2
  import { BaseApi } from '../baseApi';
4
3
 
5
4
  import { CustomSkuDto, CustomSkuSearchParams, UpdateCustomSkusDto } from './types';
@@ -1,4 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
1
+ import { RequestDto } from '../../types';
2
2
 
3
3
  export type CustomSkuDto = {
4
4
  category: string;
@@ -1,6 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
3
- import { OptionalApiParams, CursorResponseDto } from '../../types';
1
+ import { OptionalApiParams, ResponseDto, CursorResponseDto } from '../../types';
4
2
  import { BaseApi } from '../baseApi';
5
3
 
6
4
  import {
@@ -1,5 +1,6 @@
1
- import { DataSourceProvider, RequestDto, CategoryNamespace } from '@onereach/billing-shared';
1
+ import { DataSourceProvider } from '@onereach/billing-shared';
2
2
 
3
+ import { RequestDto } from '../../types';
3
4
 
4
5
  export enum LogicalCategoryEnum {
5
6
  USAGE = 'usage',
@@ -19,6 +20,22 @@ export enum BusinessCategoryEnum {
19
20
  DATA_STORAGE = 'Data Storage'
20
21
  }
21
22
 
23
+ export enum CategoryNamespace {
24
+ PROCESSING_FLOW = 'processing-flow',
25
+ PROCESSING_VOICE = 'processing-voice',
26
+ EXECUTABLE_GENERAL = 'executable-general',
27
+ EXECUTABLE_LLM = 'executable-llm',
28
+ LOOKUP = 'lookup',
29
+ TELEPHONY_VOICE = 'telephony-voice',
30
+ MESSAGING_TEXT = 'messaging-text',
31
+ CONVERSATIONS_WAP = 'conversation-wap',
32
+ CARRIER_FEE = 'carrier-fee',
33
+ USER = 'user',
34
+ IDENTIFIER = 'identifier',
35
+ STORAGE_GENERAL = 'storage-general',
36
+ STORAGE_WEAVIATE = 'storage-weaviate',
37
+ }
38
+
22
39
  export type FlowEvents = {
23
40
  flowId: string;
24
41
  amount: number;
@@ -1,7 +1,7 @@
1
1
  import { CustomerDto } from '@onereach/billing-dto';
2
- import { CustomerPaymentStrategies, RequestDto, ResponseDto } from '@onereach/billing-shared';
2
+ import { CustomerPaymentStrategies } from '@onereach/billing-shared';
3
3
 
4
- import { MappedVendor } from '../../types';
4
+ import { MappedVendor, RequestDto, ResponseDto } from '../../types';
5
5
 
6
6
  import { CustomerInvoicingStatuses, CustomerStatuses } from './constants';
7
7
 
@@ -1,6 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
3
- import { OptionalApiParams } from '../../types';
1
+ import { OptionalApiParams, ResponseDto } from '../../types';
4
2
  import { BaseApi } from '../baseApi';
5
3
 
6
4
  import { InitiateReconciliationRequest, ReconciliationJobResponse, ReconciliationRecord, ReconciliationSearchCriteria } from './types';
@@ -1,6 +1,7 @@
1
- import { DataSourceProvider, RequestDto, CategoryNamespace } from '@onereach/billing-shared';
1
+ import { DataSourceProvider } from '@onereach/billing-shared';
2
2
 
3
- import { ProcessingStatus } from '../../types';
3
+ import { ProcessingStatus, RequestDto } from '../../types';
4
+ import { CategoryNamespace } from '../customerUsageApi/types';
4
5
 
5
6
  export type InitiateReconciliationRequest = {
6
7
  dateFrom: string;
@@ -1,6 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
3
- import { OptionalApiParams } from '../../types';
1
+ import { ResponseDto, OptionalApiParams } from '../../types';
4
2
  import { BaseApi } from '../baseApi';
5
3
 
6
4
  import {
@@ -1,6 +1,6 @@
1
- import { RequestDto } from '@onereach/billing-shared';
2
1
  import type { Service } from '@or-sdk/discovery';
3
2
 
3
+ import { RequestDto } from '../../types';
4
4
 
5
5
  export interface EnvironmentDto {
6
6
  id: string;
@@ -1,4 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
1
+ import { RequestDto } from '../../types';
2
2
 
3
3
  export type FlowDto = {
4
4
  flowId: string;
package/src/api/index.ts CHANGED
@@ -28,4 +28,3 @@ export { default as ThresholdAlertsApi } from './thresholdAlertsApi';
28
28
  export { default as ThresholdSettingsApi } from './thresholdSettingsApi';
29
29
  export { default as DataReconciliationApi } from './dataReconciliationApi';
30
30
  export { default as AuditApi } from './auditApi';
31
- export { default as CronSettingsApi } from './cronSettings';
@@ -1,5 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
1
+ import { ResponseDto } from '../../types';
3
2
  import { BaseApi } from '../baseApi';
4
3
 
5
4
  import { CreatePatternDto, UpdatePatternDto, PatternDto, PatternQueryParams, PatternV2Params } from './types';
@@ -1,4 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
1
+ import { RequestDto } from '../../types';
2
2
 
3
3
  import { PatternStatuses } from './constants';
4
4
 
@@ -1,6 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
3
- import { OptionalApiParams } from '../../types';
1
+ import { ResponseDto, OptionalApiParams } from '../../types';
4
2
  import { BaseApi } from '../baseApi';
5
3
 
6
4
  import {
@@ -1,4 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
1
+ import { RequestDto } from '../../types';
2
2
 
3
3
  export type PaymentProviderDto = {
4
4
  id: string;
@@ -1,5 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
1
+ import { ResponseDto } from '../../types';
3
2
  import { BaseApi } from '../baseApi';
4
3
 
5
4
  import {
@@ -1,4 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
1
+ import { RequestDto } from '../../types';
2
2
 
3
3
  import { InvoiceType, PrepaymentBucket, PrepaymentStatus } from './constants';
4
4
 
@@ -1,5 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
1
+ import { ResponseDto } from '../../types';
3
2
  import { BaseApi } from '../baseApi';
4
3
 
5
4
  import {
@@ -1,4 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
1
+ import { RequestDto } from '../../types';
2
2
 
3
3
  export enum ProcessType {
4
4
  DATA_COLLECT = 'data_collect',
@@ -1,6 +1,6 @@
1
- import { SortOrder, ResponseDto } from '@onereach/billing-shared';
1
+ import { SortOrder } from '@onereach/billing-shared';
2
2
 
3
- import { OptionalApiParams } from '../../types';
3
+ import { ResponseDto, OptionalApiParams } from '../../types';
4
4
  import { BaseApi } from '../baseApi';
5
5
 
6
6
  import {
@@ -1,6 +1,6 @@
1
- import { DataSourceProvider, RequestDto, CategoryNamespace } from '@onereach/billing-shared';
1
+ import { DataSourceProvider } from '@onereach/billing-shared';
2
2
 
3
- import { Status } from '../../types';
3
+ import { CategoryNamespace, RequestDto, Status } from '../../types';
4
4
 
5
5
  export type AdditionalDataItemDto = {
6
6
  label: string;
@@ -1,6 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
3
- import { OptionalApiParams } from '../../types';
1
+ import { OptionalApiParams, ResponseDto } from '../../types';
4
2
  import { BaseApi } from '../baseApi';
5
3
 
6
4
  import {
@@ -1,4 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
1
+ import { RequestDto } from '../../types';
2
2
 
3
3
  // TODO: Improve sage integration type coverage after route refactor
4
4
  export type SageCustomer = {
@@ -1,7 +1,5 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import { ResponseDto } from '@onereach/billing-shared';
3
-
4
- import { OptionalApiParams } from '../../types';
2
+ import { ResponseDto, OptionalApiParams } from '../../types';
5
3
  import { BaseApi } from '../baseApi';
6
4
 
7
5
  import {
@@ -1,4 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
1
+ import { RequestDto } from '../../types';
2
2
 
3
3
  export type FindSkuMappingDto = {
4
4
  id?: number;
@@ -1,5 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
1
+ import { ResponseDto } from '../../types';
3
2
  import { BaseApi } from '../baseApi';
4
3
 
5
4
  import { SkuDto, SkuQueryParams, CreateSkuDto, UpdateSkuDto, SkuV2Params } from './types';
@@ -1,4 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
1
+ import { RequestDto } from '../../types';
2
2
 
3
3
  export interface SkuDto {
4
4
  id: string;
@@ -1,5 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
1
+ import { ResponseDto } from '../../types';
3
2
  import { BaseApi } from '../baseApi';
4
3
 
5
4
  import { UpdateSubscriptionDto, CreateSubscriptionDto, SubscriptionDto, FindSubscriptionsDto } from './types';
@@ -1,4 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
1
+ import { RequestDto } from '../../types';
2
2
 
3
3
  export type FindSubscriptionsDto = {
4
4
  id?: string;
@@ -1,5 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
1
+ import { ResponseDto } from '../../types';
3
2
  import { fetchPagedData } from '../../utils/fetchPagedData';
4
3
  import { BaseApi } from '../baseApi';
5
4
 
@@ -1,4 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
1
+ import { RequestDto } from '../../types';
2
2
 
3
3
  export type FindThresholdAlertDto = {
4
4
  id?: string;
@@ -1,6 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
3
- import { OptionalApiParams } from '../../types';
1
+ import { OptionalApiParams, ResponseDto } from '../../types';
4
2
  import { BaseApi } from '../baseApi';
5
3
 
6
4
  import {
@@ -1,4 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
1
+ import { RequestDto } from '../../types';
2
2
 
3
3
  export type NotificationItemDto = {
4
4
  channel: string;
@@ -1,5 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
1
+ import { ResponseDto } from '../../types';
3
2
  import { BaseApi } from '../baseApi';
4
3
 
5
4
  import {
@@ -1,4 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
1
+ import { RequestDto } from '../../types';
2
2
 
3
3
  export interface TierResponse {
4
4
  adjustmentId: string;
@@ -1,5 +1,4 @@
1
- import { ResponseDto, RequestDto } from '@onereach/billing-shared';
2
-
1
+ import { RequestDto, ResponseDto } from '../../types';
3
2
  import { BaseApi } from '../baseApi';
4
3
 
5
4
  import {
@@ -1,5 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
2
-
1
+ import { RequestDto } from '../../types';
3
2
  import { BaseApi } from '../baseApi';
4
3
 
5
4
  import {
@@ -1,5 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
2
-
1
+ import { ResponseDto } from '../../types';
3
2
  import { Customer } from '../customersApi/types';
4
3
 
5
4
  export interface VendorMappingDto {
@@ -1,7 +1,6 @@
1
1
  import { VendorDto } from '@onereach/billing-dto';
2
- import { ResponseDto } from '@onereach/billing-shared';
3
2
 
4
- import { OptionalApiParams } from '../../types';
3
+ import { ResponseDto, OptionalApiParams } from '../../types';
5
4
  import { BaseApi } from '../baseApi';
6
5
 
7
6
  import { CreateVendorDto, UpdateVendorDto, FindVendorsDto } from './types';
@@ -1,4 +1,4 @@
1
- import { RequestDto } from '@onereach/billing-shared';
1
+ import { RequestDto } from '../../types';
2
2
 
3
3
  export interface VendorsDto {
4
4
  name: string;
package/src/types.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { SortOrder } from '@onereach/billing-shared';
1
2
  import { Token } from '@or-sdk/base';
2
3
 
3
4
  export * from './api/flowsApi/types';
@@ -56,12 +57,27 @@ export enum Status {
56
57
  NOT_ACTIVE = 'not_active',
57
58
  }
58
59
 
60
+
61
+ export type ResponseDto<T> = {
62
+ total: number;
63
+ page: number;
64
+ limit: number;
65
+ data: T[];
66
+ };
67
+
59
68
  export type CursorResponseDto<T> = {
60
69
  data: T[];
61
70
  nextCursor: string | null;
62
71
  limit: number;
63
72
  };
64
73
 
74
+ export type RequestDto = {
75
+ page?: number;
76
+ limit?: number;
77
+ sortBy?: string;
78
+ sortOrder?: SortOrder;
79
+ };
80
+
65
81
  export type OptionalApiParams = {
66
82
  signal?: AbortSignal;
67
83
  timeout?: number;
@@ -1,4 +1,4 @@
1
- import { ResponseDto } from '@onereach/billing-shared';
1
+ import { ResponseDto } from '../types';
2
2
 
3
3
 
4
4
  /**
@@ -13,7 +13,7 @@ import { ResponseDto } from '@onereach/billing-shared';
13
13
  */
14
14
  export async function fetchPagedData<T, Params extends object>(
15
15
  fn: (params: Params & { page: number; })=> Promise<ResponseDto<T>>,
16
- params?: Params,
16
+ params?: Params
17
17
  ) {
18
18
  let page = 1;
19
19
  let totalRecords = 0;
@@ -1,103 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __assign = (this && this.__assign) || function () {
18
- __assign = Object.assign || function(t) {
19
- for (var s, i = 1, n = arguments.length; i < n; i++) {
20
- s = arguments[i];
21
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
- t[p] = s[p];
23
- }
24
- return t;
25
- };
26
- return __assign.apply(this, arguments);
27
- };
28
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
- return new (P || (P = Promise))(function (resolve, reject) {
31
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
- step((generator = generator.apply(thisArg, _arguments || [])).next());
35
- });
36
- };
37
- var __generator = (this && this.__generator) || function (thisArg, body) {
38
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
39
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
40
- function verb(n) { return function (v) { return step([n, v]); }; }
41
- function step(op) {
42
- if (f) throw new TypeError("Generator is already executing.");
43
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
44
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
45
- if (y = 0, t) op = [op[0] & 2, t.value];
46
- switch (op[0]) {
47
- case 0: case 1: t = op; break;
48
- case 4: _.label++; return { value: op[1], done: false };
49
- case 5: _.label++; y = op[1]; op = [0]; continue;
50
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
51
- default:
52
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
53
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
54
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
55
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
56
- if (t[2]) _.ops.pop();
57
- _.trys.pop(); continue;
58
- }
59
- op = body.call(thisArg, _);
60
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
61
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
62
- }
63
- };
64
- Object.defineProperty(exports, "__esModule", { value: true });
65
- var baseApi_1 = require("../baseApi");
66
- var CronSettingsApi = (function (_super) {
67
- __extends(CronSettingsApi, _super);
68
- function CronSettingsApi() {
69
- var _this = _super !== null && _super.apply(this, arguments) || this;
70
- _this.apiBasePath = 'cron-settings';
71
- return _this;
72
- }
73
- CronSettingsApi.prototype.getAll = function () {
74
- return __awaiter(this, arguments, void 0, function (params, options) {
75
- if (params === void 0) { params = {}; }
76
- if (options === void 0) { options = {}; }
77
- return __generator(this, function (_a) {
78
- switch (_a.label) {
79
- case 0: return [4, this.apiCall(__assign({ method: 'GET', route: "".concat(this.apiBasePath), params: params }, options))];
80
- case 1: return [2, _a.sent()];
81
- }
82
- });
83
- });
84
- };
85
- CronSettingsApi.prototype.update = function (id, data) {
86
- return __awaiter(this, void 0, void 0, function () {
87
- return __generator(this, function (_a) {
88
- switch (_a.label) {
89
- case 0: return [4, this.apiCall({
90
- method: 'PUT',
91
- route: "".concat(this.apiBasePath),
92
- params: { id: id },
93
- data: data,
94
- })];
95
- case 1: return [2, _a.sent()];
96
- }
97
- });
98
- });
99
- };
100
- return CronSettingsApi;
101
- }(baseApi_1.BaseApi));
102
- exports.default = CronSettingsApi;
103
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/cronSettings/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,sCAAqC;AAGrC;IAA6C,mCAAO;IAApD;;QACmB,iBAAW,GAAG,eAAe,CAAC;;IA0CjD,CAAC;IA1Bc,gCAAM,GAAnB;4DAAoB,MAAsC,EAAE,OAA+B;YAAvE,uBAAA,EAAA,WAAsC;YAAE,wBAAA,EAAA,YAA+B;;;4BAClF,WAAM,IAAI,CAAC,OAAO,YACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE,EAC5B,MAAM,QAAA,IACH,OAAO,EACV,EAAA;4BALF,WAAO,SAKL,EAAC;;;;KACJ;IAWY,gCAAM,GAAnB,UAAoB,EAAU,EAAE,IAA0B;;;;4BACjD,WAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,MAAM,EAAE,KAAK;4BACb,KAAK,EAAE,UAAG,IAAI,CAAC,WAAW,CAAE;4BAC5B,MAAM,EAAE,EAAE,EAAE,IAAA,EAAE;4BACd,IAAI,MAAA;yBACL,CAAC,EAAA;4BALF,WAAO,SAKL,EAAC;;;;KACJ;IACH,sBAAC;AAAD,CAAC,AA3CD,CAA6C,iBAAO,GA2CnD"}
@@ -1,32 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { BaseApi } from '../baseApi';
11
- export default class CronSettingsApi extends BaseApi {
12
- constructor() {
13
- super(...arguments);
14
- this.apiBasePath = 'cron-settings';
15
- }
16
- getAll() {
17
- return __awaiter(this, arguments, void 0, function* (params = {}, options = {}) {
18
- return yield this.apiCall(Object.assign({ method: 'GET', route: `${this.apiBasePath}`, params }, options));
19
- });
20
- }
21
- update(id, data) {
22
- return __awaiter(this, void 0, void 0, function* () {
23
- return yield this.apiCall({
24
- method: 'PUT',
25
- route: `${this.apiBasePath}`,
26
- params: { id },
27
- data,
28
- });
29
- });
30
- }
31
- }
32
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/cronSettings/index.ts"],"names":[],"mappings":";;;;;;;;;AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGrC,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,OAAO;IAApD;;QACmB,gBAAW,GAAG,eAAe,CAAC;IA0CjD,CAAC;IA1Bc,MAAM;6DAAC,SAAoC,EAAE,EAAE,UAA6B,EAAE;YACzF,OAAO,MAAM,IAAI,CAAC,OAAO,iBACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE,EAC5B,MAAM,IACH,OAAO,EACV,CAAC;QACL,CAAC;KAAA;IAWY,MAAM,CAAC,EAAU,EAAE,IAA0B;;YACxD,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC;gBACxB,MAAM,EAAE,KAAK;gBACb,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE;gBAC5B,MAAM,EAAE,EAAE,EAAE,EAAE;gBACd,IAAI;aACL,CAAC,CAAC;QACL,CAAC;KAAA;CACF"}