@tolt/api 0.6.1 → 1.0.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/BaseClient.js +1 -0
- package/dist/Client.d.ts +3 -3
- package/dist/Client.js +3 -3
- package/dist/api/errors/BadRequestError.d.ts +2 -2
- package/dist/api/errors/ConflictError.d.ts +2 -2
- package/dist/api/errors/ContentTooLargeError.d.ts +7 -0
- package/dist/api/errors/ContentTooLargeError.js +17 -0
- package/dist/api/errors/NotFoundError.d.ts +2 -2
- package/dist/api/errors/TooManyRequestsError.d.ts +2 -2
- package/dist/api/errors/UnauthorizedError.d.ts +2 -2
- package/dist/api/errors/index.d.ts +1 -0
- package/dist/api/errors/index.js +1 -0
- package/dist/api/resources/clicks/client/Client.d.ts +16 -8
- package/dist/api/resources/clicks/client/Client.js +93 -68
- package/dist/api/resources/clicks/client/requests/CreateClickRequest.d.ts +28 -0
- package/dist/api/resources/clicks/client/requests/GetClickRequest.d.ts +9 -0
- package/dist/api/resources/clicks/client/requests/ListClicksRequest.d.ts +10 -5
- package/dist/api/resources/clicks/client/requests/index.d.ts +2 -1
- package/dist/api/resources/clicks/types/{CreateClicksResponse.d.ts → CreateClickResponse.d.ts} +1 -1
- package/dist/api/resources/clicks/types/{GetClicksResponse.d.ts → GetClickResponse.d.ts} +1 -1
- package/dist/api/resources/clicks/types/ListClicksRequestOrder.d.ts +1 -0
- package/dist/api/resources/clicks/types/ListClicksRequestOrder.js +1 -0
- package/dist/api/resources/clicks/types/ListClicksRequestSort.d.ts +1 -1
- package/dist/api/resources/clicks/types/ListClicksRequestSort.js +1 -1
- package/dist/api/resources/clicks/types/index.d.ts +2 -3
- package/dist/api/resources/clicks/types/index.js +2 -3
- package/dist/api/resources/commissions/client/Client.d.ts +48 -22
- package/dist/api/resources/commissions/client/Client.js +142 -84
- package/dist/api/resources/commissions/client/requests/ApproveCommissionRequest.d.ts +9 -0
- package/dist/api/resources/commissions/client/requests/BulkApproveCommissionsRequest.d.ts +2 -2
- package/dist/api/resources/commissions/client/requests/BulkDeclineCommissionsRequest.d.ts +2 -2
- package/dist/api/resources/commissions/client/requests/CreateCommissionRequest.d.ts +40 -0
- package/dist/api/resources/commissions/client/requests/CreateCommissionRequest.js +9 -0
- package/dist/api/resources/commissions/client/requests/DeclineCommissionRequest.d.ts +9 -0
- package/dist/api/resources/commissions/client/requests/DeleteCommissionRequest.d.ts +9 -0
- package/dist/api/resources/commissions/client/requests/GetCommissionRequest.d.ts +9 -0
- package/dist/api/resources/commissions/client/requests/ListCommissionsRequest.d.ts +14 -5
- package/dist/api/resources/commissions/client/requests/UpdateCommissionRequest.d.ts +33 -0
- package/dist/api/resources/commissions/client/requests/UpdateCommissionRequest.js +9 -0
- package/dist/api/resources/commissions/client/requests/index.d.ts +6 -5
- package/dist/api/resources/commissions/client/requests/index.js +2 -1
- package/dist/api/resources/commissions/types/{UpdateCommissionsResponse.d.ts → ApproveCommissionResponse.d.ts} +1 -1
- package/dist/api/resources/commissions/types/{DeleteCommissionsResponse.d.ts → CreateCommissionResponse.d.ts} +1 -1
- package/dist/api/resources/commissions/types/{CreateCommissionsResponse.d.ts → DeclineCommissionResponse.d.ts} +1 -1
- package/dist/api/resources/commissions/types/DeleteCommissionResponse.d.ts +6 -0
- package/dist/api/resources/commissions/types/{GetCommissionsResponse.d.ts → GetCommissionResponse.d.ts} +1 -1
- package/dist/api/resources/commissions/types/ListCommissionsRequestOrder.d.ts +1 -0
- package/dist/api/resources/commissions/types/ListCommissionsRequestOrder.js +1 -0
- package/dist/api/resources/commissions/types/ListCommissionsRequestSort.d.ts +1 -1
- package/dist/api/resources/commissions/types/ListCommissionsRequestSort.js +1 -1
- package/dist/api/resources/commissions/types/UpdateCommissionResponse.d.ts +6 -0
- package/dist/api/resources/commissions/types/index.d.ts +6 -7
- package/dist/api/resources/commissions/types/index.js +6 -7
- package/dist/api/resources/customers/client/Client.d.ts +36 -14
- package/dist/api/resources/customers/client/Client.js +120 -74
- package/dist/api/resources/customers/client/requests/CreateCustomerRequest.d.ts +47 -0
- package/dist/api/resources/customers/client/requests/CreateCustomerRequest.js +12 -0
- package/dist/api/resources/customers/client/requests/DeleteCustomerRequest.d.ts +9 -0
- package/dist/api/resources/customers/client/requests/GetCustomerRequest.d.ts +9 -0
- package/dist/api/resources/customers/client/requests/ListCustomersRequest.d.ts +14 -5
- package/dist/api/resources/customers/client/requests/UpdateCustomerRequest.d.ts +44 -0
- package/dist/api/resources/customers/client/requests/UpdateCustomerRequest.js +12 -0
- package/dist/api/resources/customers/client/requests/index.d.ts +4 -4
- package/dist/api/resources/customers/client/requests/index.js +2 -2
- package/dist/api/resources/customers/types/{DeleteCustomersResponse.d.ts → CreateCustomerResponse.d.ts} +1 -1
- package/dist/api/resources/customers/types/{UpdateCustomersResponse.d.ts → DeleteCustomerResponse.d.ts} +1 -1
- package/dist/api/resources/customers/types/{GetCustomersResponse.d.ts → GetCustomerResponse.d.ts} +1 -1
- package/dist/api/resources/customers/types/ListCustomersRequestOrder.d.ts +1 -0
- package/dist/api/resources/customers/types/ListCustomersRequestOrder.js +1 -0
- package/dist/api/resources/customers/types/ListCustomersRequestSort.d.ts +1 -1
- package/dist/api/resources/customers/types/ListCustomersRequestSort.js +1 -1
- package/dist/api/resources/customers/types/ListCustomersRequestStatus.d.ts +1 -0
- package/dist/api/resources/customers/types/ListCustomersRequestStatus.js +1 -0
- package/dist/api/resources/customers/types/{CreateCustomersResponse.d.ts → UpdateCustomerResponse.d.ts} +1 -1
- package/dist/api/resources/customers/types/index.d.ts +4 -4
- package/dist/api/resources/customers/types/index.js +4 -4
- package/dist/api/resources/{embed → embedTokens}/client/Client.d.ts +10 -9
- package/dist/api/resources/{embed → embedTokens}/client/Client.js +11 -8
- package/dist/api/resources/embedTokens/client/requests/CreateEmbedTokenRequest.d.ts +21 -0
- package/dist/api/resources/embedTokens/client/requests/index.d.ts +1 -0
- package/dist/api/resources/embedTokens/exports.d.ts +2 -0
- package/dist/api/resources/{embed → embedTokens}/exports.js +1 -1
- package/dist/api/resources/{embed/types/CreateTokenEmbedResponse.d.ts → embedTokens/types/CreateEmbedTokenResponse.d.ts} +1 -1
- package/dist/api/resources/embedTokens/types/index.d.ts +1 -0
- package/dist/api/resources/embedTokens/types/index.js +1 -0
- package/dist/api/resources/flows/client/Client.d.ts +10 -5
- package/dist/api/resources/flows/client/Client.js +83 -63
- package/dist/api/resources/flows/client/requests/GetFlowRequest.d.ts +9 -0
- package/dist/api/resources/flows/client/requests/ListFlowsRequest.d.ts +14 -6
- package/dist/api/resources/flows/client/requests/index.d.ts +1 -1
- package/dist/api/resources/flows/types/{GetFlowsResponse.d.ts → GetFlowResponse.d.ts} +1 -1
- package/dist/api/resources/flows/types/ListFlowsRequestOrder.d.ts +1 -0
- package/dist/api/resources/flows/types/ListFlowsRequestOrder.js +1 -0
- package/dist/api/resources/flows/types/ListFlowsRequestSort.d.ts +1 -1
- package/dist/api/resources/flows/types/ListFlowsRequestSort.js +1 -1
- package/dist/api/resources/flows/types/index.d.ts +1 -2
- package/dist/api/resources/flows/types/index.js +1 -2
- package/dist/api/resources/groups/client/Client.d.ts +10 -5
- package/dist/api/resources/groups/client/Client.js +80 -60
- package/dist/api/resources/groups/client/requests/GetGroupRequest.d.ts +9 -0
- package/dist/api/resources/groups/client/requests/ListGroupsRequest.d.ts +11 -6
- package/dist/api/resources/groups/client/requests/index.d.ts +1 -1
- package/dist/api/resources/groups/types/{GetGroupsResponse.d.ts → GetGroupResponse.d.ts} +1 -1
- package/dist/api/resources/groups/types/ListGroupsRequestOrder.d.ts +1 -0
- package/dist/api/resources/groups/types/ListGroupsRequestOrder.js +1 -0
- package/dist/api/resources/groups/types/ListGroupsRequestSort.d.ts +1 -1
- package/dist/api/resources/groups/types/ListGroupsRequestSort.js +1 -1
- package/dist/api/resources/groups/types/index.d.ts +1 -2
- package/dist/api/resources/groups/types/index.js +1 -2
- package/dist/api/resources/index.d.ts +3 -3
- package/dist/api/resources/index.js +3 -3
- package/dist/api/resources/links/client/Client.d.ts +28 -17
- package/dist/api/resources/links/client/Client.js +111 -75
- package/dist/api/resources/links/client/requests/CreateLinkRequest.d.ts +16 -0
- package/dist/api/resources/links/client/requests/DeleteLinkRequest.d.ts +9 -0
- package/dist/api/resources/links/client/requests/{GetByParamValueLinksRequest.d.ts → GetLinkByParamValueRequest.d.ts} +1 -1
- package/dist/api/resources/links/client/requests/GetLinkRequest.d.ts +9 -0
- package/dist/api/resources/links/client/requests/ListLinksRequest.d.ts +12 -5
- package/dist/api/resources/links/client/requests/UpdateLinkRequest.d.ts +15 -0
- package/dist/api/resources/links/client/requests/index.d.ts +5 -5
- package/dist/api/resources/links/types/{DeleteLinksResponse.d.ts → CreateLinkResponse.d.ts} +1 -1
- package/dist/api/resources/links/types/{CreateLinksResponse.d.ts → DeleteLinkResponse.d.ts} +1 -1
- package/dist/api/resources/links/types/GetLinkByParamValueResponse.d.ts +6 -0
- package/dist/api/resources/links/types/{GetLinksResponse.d.ts → GetLinkResponse.d.ts} +1 -1
- package/dist/api/resources/links/types/ListLinksRequestOrder.d.ts +1 -0
- package/dist/api/resources/links/types/ListLinksRequestOrder.js +1 -0
- package/dist/api/resources/links/types/ListLinksRequestSort.d.ts +1 -1
- package/dist/api/resources/links/types/ListLinksRequestSort.js +1 -1
- package/dist/api/resources/links/types/{UpdateLinksResponse.d.ts → UpdateLinkResponse.d.ts} +1 -1
- package/dist/api/resources/links/types/index.d.ts +5 -5
- package/dist/api/resources/links/types/index.js +5 -5
- package/dist/api/resources/partners/client/Client.d.ts +52 -24
- package/dist/api/resources/partners/client/Client.js +140 -85
- package/dist/api/resources/partners/client/requests/ApprovePartnerRequest.d.ts +9 -0
- package/dist/api/resources/partners/client/requests/BulkApprovePartnersRequest.d.ts +2 -2
- package/dist/api/resources/partners/client/requests/BulkRejectPartnersRequest.d.ts +4 -2
- package/dist/api/resources/partners/client/requests/CreatePartnerRequest.d.ts +59 -0
- package/dist/api/resources/partners/client/requests/CreatePartnerRequest.js +9 -0
- package/dist/api/resources/partners/client/requests/GetPartnerRequest.d.ts +9 -0
- package/dist/api/resources/partners/client/requests/ListPartnersRequest.d.ts +11 -5
- package/dist/api/resources/partners/client/requests/RejectPartnerRequest.d.ts +11 -0
- package/dist/api/resources/partners/client/requests/SuspendPartnerRequest.d.ts +11 -0
- package/dist/api/resources/partners/client/requests/UpdatePartnerRequest.d.ts +24 -0
- package/dist/api/resources/partners/client/requests/index.d.ts +6 -6
- package/dist/api/resources/partners/client/requests/index.js +1 -1
- package/dist/api/resources/partners/types/{RejectPartnersResponse.d.ts → ApprovePartnerResponse.d.ts} +1 -1
- package/dist/api/resources/partners/types/{CreatePartnersResponse.d.ts → CreatePartnerResponse.d.ts} +1 -1
- package/dist/api/resources/partners/types/{GetPartnersResponse.d.ts → GetPartnerResponse.d.ts} +1 -1
- package/dist/api/resources/partners/types/ListPartnersRequestOrder.d.ts +1 -0
- package/dist/api/resources/partners/types/ListPartnersRequestOrder.js +1 -0
- package/dist/api/resources/partners/types/ListPartnersRequestSort.d.ts +1 -1
- package/dist/api/resources/partners/types/ListPartnersRequestSort.js +1 -1
- package/dist/api/resources/partners/types/ListPartnersRequestStatus.d.ts +1 -0
- package/dist/api/resources/partners/types/ListPartnersRequestStatus.js +1 -0
- package/dist/api/resources/partners/types/{UpdatePartnersResponse.d.ts → RejectPartnerResponse.d.ts} +1 -1
- package/dist/api/resources/partners/types/{ApprovePartnersResponse.d.ts → SuspendPartnerResponse.d.ts} +1 -1
- package/dist/api/resources/partners/types/{SuspendPartnersResponse.d.ts → UpdatePartnerResponse.d.ts} +1 -1
- package/dist/api/resources/partners/types/index.d.ts +6 -6
- package/dist/api/resources/partners/types/index.js +6 -6
- package/dist/api/resources/programs/client/Client.d.ts +10 -5
- package/dist/api/resources/programs/client/Client.js +78 -58
- package/dist/api/resources/programs/client/requests/GetProgramRequest.d.ts +9 -0
- package/dist/api/resources/programs/client/requests/ListProgramsRequest.d.ts +8 -5
- package/dist/api/resources/programs/client/requests/index.d.ts +1 -1
- package/dist/api/resources/programs/types/{GetProgramsResponse.d.ts → GetProgramResponse.d.ts} +1 -1
- package/dist/api/resources/programs/types/ListProgramsRequestOrder.d.ts +1 -0
- package/dist/api/resources/programs/types/ListProgramsRequestOrder.js +1 -0
- package/dist/api/resources/programs/types/ListProgramsRequestSort.d.ts +1 -1
- package/dist/api/resources/programs/types/ListProgramsRequestSort.js +1 -1
- package/dist/api/resources/programs/types/index.d.ts +1 -1
- package/dist/api/resources/programs/types/index.js +1 -1
- package/dist/api/resources/promotionCodes/client/Client.d.ts +36 -15
- package/dist/api/resources/promotionCodes/client/Client.js +121 -72
- package/dist/api/resources/promotionCodes/client/requests/CreatePromotionCodeRequest.d.ts +27 -0
- package/dist/api/resources/promotionCodes/client/requests/CreatePromotionCodeRequest.js +9 -0
- package/dist/api/resources/promotionCodes/client/requests/DeletePromotionCodeRequest.d.ts +9 -0
- package/dist/api/resources/promotionCodes/client/requests/GetPromotionCodeRequest.d.ts +9 -0
- package/dist/api/resources/promotionCodes/client/requests/ListPromotionCodesRequest.d.ts +11 -5
- package/dist/api/resources/promotionCodes/client/requests/UpdatePromotionCodeRequest.d.ts +26 -0
- package/dist/api/resources/promotionCodes/client/requests/UpdatePromotionCodeRequest.js +9 -0
- package/dist/api/resources/promotionCodes/client/requests/index.d.ts +4 -4
- package/dist/api/resources/promotionCodes/client/requests/index.js +2 -2
- package/dist/api/resources/promotionCodes/types/{CreatePromotionCodesResponse.d.ts → CreatePromotionCodeResponse.d.ts} +1 -1
- package/dist/api/resources/promotionCodes/types/{DeletePromotionCodesResponse.d.ts → DeletePromotionCodeResponse.d.ts} +1 -1
- package/dist/api/resources/promotionCodes/types/{GetPromotionCodesResponse.d.ts → GetPromotionCodeResponse.d.ts} +1 -1
- package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestOrder.d.ts +1 -0
- package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestOrder.js +1 -0
- package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestSort.d.ts +1 -1
- package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestSort.js +1 -1
- package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestType.d.ts +1 -0
- package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestType.js +1 -0
- package/dist/api/resources/promotionCodes/types/{UpdatePromotionCodesResponse.d.ts → UpdatePromotionCodeResponse.d.ts} +1 -1
- package/dist/api/resources/promotionCodes/types/index.d.ts +4 -4
- package/dist/api/resources/promotionCodes/types/index.js +4 -4
- package/dist/api/resources/reports/client/Client.d.ts +27 -14
- package/dist/api/resources/reports/client/Client.js +182 -118
- package/dist/api/resources/reports/client/requests/ReportsCustomersRequest.d.ts +12 -0
- package/dist/api/resources/reports/client/requests/ReportsLinksRequest.d.ts +23 -0
- package/dist/api/resources/reports/client/requests/ReportsOverviewRequest.d.ts +12 -0
- package/dist/api/resources/reports/client/requests/ReportsPartnersRequest.d.ts +23 -0
- package/dist/api/resources/reports/client/requests/ReportsTimeseriesRequest.d.ts +17 -0
- package/dist/api/resources/reports/client/requests/index.d.ts +5 -5
- package/dist/api/resources/reports/types/LinksReportsRequestOrder.d.ts +1 -0
- package/dist/api/resources/reports/types/LinksReportsRequestOrder.js +1 -0
- package/dist/api/resources/reports/types/LinksReportsRequestSort.d.ts +1 -0
- package/dist/api/resources/reports/types/LinksReportsRequestSort.js +1 -0
- package/dist/api/resources/reports/types/PartnersReportsRequestOrder.d.ts +1 -0
- package/dist/api/resources/reports/types/PartnersReportsRequestOrder.js +1 -0
- package/dist/api/resources/reports/types/PartnersReportsRequestSort.d.ts +1 -0
- package/dist/api/resources/reports/types/PartnersReportsRequestSort.js +1 -0
- package/dist/api/resources/reports/types/{CustomerStatsReportsResponse.d.ts → ReportsCustomersResponse.d.ts} +1 -1
- package/dist/api/resources/reports/types/{LinksReportsResponse.d.ts → ReportsLinksResponse.d.ts} +1 -1
- package/dist/api/resources/reports/types/{OverviewReportsResponse.d.ts → ReportsOverviewResponse.d.ts} +1 -1
- package/dist/api/resources/reports/types/{PartnersReportsResponse.d.ts → ReportsPartnersResponse.d.ts} +1 -1
- package/dist/api/resources/reports/types/{TimeseriesReportsResponse.d.ts → ReportsTimeseriesResponse.d.ts} +1 -1
- package/dist/api/resources/reports/types/TimeseriesReportsRequestGranularity.d.ts +1 -0
- package/dist/api/resources/reports/types/TimeseriesReportsRequestGranularity.js +1 -0
- package/dist/api/resources/reports/types/index.d.ts +5 -5
- package/dist/api/resources/reports/types/index.js +5 -5
- package/dist/api/resources/transactions/client/Client.d.ts +43 -21
- package/dist/api/resources/transactions/client/Client.js +132 -80
- package/dist/api/resources/transactions/client/requests/CreateTransactionRequest.d.ts +34 -0
- package/dist/api/resources/transactions/client/requests/DeleteTransactionRequest.d.ts +9 -0
- package/dist/api/resources/transactions/client/requests/GetTransactionRequest.d.ts +9 -0
- package/dist/api/resources/transactions/client/requests/ListTransactionsRequest.d.ts +12 -5
- package/dist/api/resources/transactions/client/requests/RefundTransactionRequest.d.ts +9 -0
- package/dist/api/resources/transactions/client/requests/RerunTransactionFlowsRequest.d.ts +9 -0
- package/dist/api/resources/transactions/client/requests/UpdateTransactionRequest.d.ts +31 -0
- package/dist/api/resources/transactions/client/requests/index.d.ts +6 -6
- package/dist/api/resources/transactions/types/{CreateTransactionsResponse.d.ts → CreateTransactionResponse.d.ts} +1 -1
- package/dist/api/resources/transactions/types/{DeleteTransactionsResponse.d.ts → DeleteTransactionResponse.d.ts} +1 -1
- package/dist/api/resources/transactions/types/{GetTransactionsResponse.d.ts → GetTransactionResponse.d.ts} +1 -1
- package/dist/api/resources/transactions/types/ListTransactionsRequestOrder.d.ts +1 -0
- package/dist/api/resources/transactions/types/ListTransactionsRequestOrder.js +1 -0
- package/dist/api/resources/transactions/types/ListTransactionsRequestSort.d.ts +1 -1
- package/dist/api/resources/transactions/types/ListTransactionsRequestSort.js +1 -1
- package/dist/api/resources/transactions/types/{RefundTransactionsResponse.d.ts → RefundTransactionResponse.d.ts} +1 -1
- package/dist/api/resources/transactions/types/{RerunFlowsTransactionsResponse.d.ts → RerunTransactionFlowsResponse.d.ts} +1 -1
- package/dist/api/resources/transactions/types/UpdateTransactionResponse.d.ts +6 -0
- package/dist/api/resources/transactions/types/index.d.ts +6 -6
- package/dist/api/resources/transactions/types/index.js +6 -6
- package/dist/api/types/Commission.d.ts +1 -1
- package/dist/api/types/Customer.d.ts +2 -2
- package/dist/api/types/{Error_.d.ts → ErrorResponse.d.ts} +5 -4
- package/dist/api/types/{Error_.js → ErrorResponse.js} +5 -4
- package/dist/api/types/index.d.ts +1 -1
- package/dist/api/types/index.js +1 -1
- package/dist/core/exports.d.ts +1 -0
- package/dist/core/exports.js +1 -0
- package/dist/core/fetcher/Fetcher.js +35 -4
- package/dist/core/fetcher/getErrorResponseBody.js +21 -8
- package/dist/core/fetcher/getResponseBody.d.ts +16 -0
- package/dist/core/fetcher/getResponseBody.js +26 -22
- package/dist/core/fetcher/makePassthroughRequest.js +18 -2
- package/dist/core/fetcher/makeRequest.d.ts +6 -1
- package/dist/core/fetcher/makeRequest.js +45 -13
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -1
- package/dist/core/fetcher/requestWithRetries.js +23 -2
- package/dist/core/fetcher/signals.d.ts +1 -0
- package/dist/core/fetcher/signals.js +1 -1
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +2 -0
- package/dist/core/pagination/Page.d.ts +33 -0
- package/dist/core/pagination/Page.js +49 -0
- package/dist/core/pagination/exports.d.ts +1 -0
- package/dist/core/pagination/exports.js +1 -0
- package/dist/core/pagination/index.d.ts +1 -0
- package/dist/core/pagination/index.js +1 -0
- package/dist/core/url/encodePathParam.d.ts +3 -1
- package/dist/core/url/encodePathParam.js +8 -2
- package/dist/core/utils/index.d.ts +1 -0
- package/dist/core/utils/index.js +1 -0
- package/dist/core/utils/setObjectProperty.d.ts +12 -0
- package/dist/core/utils/setObjectProperty.js +45 -0
- package/dist/environments.d.ts +2 -2
- package/dist/environments.js +1 -1
- package/dist/errors/ToltApiError.js +15 -1
- package/package.json +7 -2
- package/dist/api/resources/clicks/client/requests/GetClicksRequest.d.ts +0 -9
- package/dist/api/resources/clicks/types/CreateClicksRequest.d.ts +0 -1
- package/dist/api/resources/commissions/client/requests/ApproveCommissionsRequest.d.ts +0 -9
- package/dist/api/resources/commissions/client/requests/DeclineCommissionsRequest.d.ts +0 -9
- package/dist/api/resources/commissions/client/requests/DeleteCommissionsRequest.d.ts +0 -9
- package/dist/api/resources/commissions/client/requests/GetCommissionsRequest.d.ts +0 -9
- package/dist/api/resources/commissions/client/requests/UpdateCommissionsRequest.d.ts +0 -18
- package/dist/api/resources/commissions/types/ApproveCommissionsResponse.d.ts +0 -6
- package/dist/api/resources/commissions/types/CreateCommissionsRequest.d.ts +0 -1
- package/dist/api/resources/commissions/types/DeclineCommissionsResponse.d.ts +0 -6
- package/dist/api/resources/customers/client/requests/CreateCustomersRequest.d.ts +0 -29
- package/dist/api/resources/customers/client/requests/CreateCustomersRequest.js +0 -11
- package/dist/api/resources/customers/client/requests/DeleteCustomersRequest.d.ts +0 -9
- package/dist/api/resources/customers/client/requests/GetCustomersRequest.d.ts +0 -9
- package/dist/api/resources/customers/client/requests/UpdateCustomersRequest.d.ts +0 -31
- package/dist/api/resources/customers/client/requests/UpdateCustomersRequest.js +0 -11
- package/dist/api/resources/embed/client/requests/CreateTokenEmbedRequest.d.ts +0 -14
- package/dist/api/resources/embed/client/requests/index.d.ts +0 -1
- package/dist/api/resources/embed/exports.d.ts +0 -2
- package/dist/api/resources/embed/types/index.d.ts +0 -1
- package/dist/api/resources/embed/types/index.js +0 -1
- package/dist/api/resources/flows/client/requests/GetFlowsRequest.d.ts +0 -9
- package/dist/api/resources/flows/types/ListFlowsRequestActive.d.ts +0 -5
- package/dist/api/resources/flows/types/ListFlowsRequestActive.js +0 -5
- package/dist/api/resources/groups/client/requests/GetGroupsRequest.d.ts +0 -9
- package/dist/api/resources/groups/types/ListGroupsRequestDefault.d.ts +0 -5
- package/dist/api/resources/groups/types/ListGroupsRequestDefault.js +0 -5
- package/dist/api/resources/links/client/requests/CreateLinksRequest.d.ts +0 -12
- package/dist/api/resources/links/client/requests/DeleteLinksRequest.d.ts +0 -9
- package/dist/api/resources/links/client/requests/GetLinksRequest.d.ts +0 -9
- package/dist/api/resources/links/client/requests/UpdateLinksRequest.d.ts +0 -11
- package/dist/api/resources/links/types/GetByParamValueLinksResponse.d.ts +0 -6
- package/dist/api/resources/partners/client/requests/ApprovePartnersRequest.d.ts +0 -9
- package/dist/api/resources/partners/client/requests/CreatePartnersRequest.d.ts +0 -45
- package/dist/api/resources/partners/client/requests/CreatePartnersRequest.js +0 -8
- package/dist/api/resources/partners/client/requests/GetPartnersRequest.d.ts +0 -9
- package/dist/api/resources/partners/client/requests/RejectPartnersRequest.d.ts +0 -10
- package/dist/api/resources/partners/client/requests/SuspendPartnersRequest.d.ts +0 -10
- package/dist/api/resources/partners/client/requests/UpdatePartnersRequest.d.ts +0 -16
- package/dist/api/resources/programs/client/requests/GetProgramsRequest.d.ts +0 -9
- package/dist/api/resources/promotionCodes/client/requests/CreatePromotionCodesRequest.d.ts +0 -20
- package/dist/api/resources/promotionCodes/client/requests/CreatePromotionCodesRequest.js +0 -8
- package/dist/api/resources/promotionCodes/client/requests/DeletePromotionCodesRequest.d.ts +0 -9
- package/dist/api/resources/promotionCodes/client/requests/GetPromotionCodesRequest.d.ts +0 -9
- package/dist/api/resources/promotionCodes/client/requests/UpdatePromotionCodesRequest.d.ts +0 -19
- package/dist/api/resources/promotionCodes/client/requests/UpdatePromotionCodesRequest.js +0 -8
- package/dist/api/resources/reports/client/requests/CustomerStatsReportsRequest.d.ts +0 -9
- package/dist/api/resources/reports/client/requests/LinksReportsRequest.d.ts +0 -15
- package/dist/api/resources/reports/client/requests/OverviewReportsRequest.d.ts +0 -9
- package/dist/api/resources/reports/client/requests/PartnersReportsRequest.d.ts +0 -15
- package/dist/api/resources/reports/client/requests/TimeseriesReportsRequest.d.ts +0 -12
- package/dist/api/resources/transactions/client/requests/CreateTransactionsRequest.d.ts +0 -20
- package/dist/api/resources/transactions/client/requests/DeleteTransactionsRequest.d.ts +0 -9
- package/dist/api/resources/transactions/client/requests/GetTransactionsRequest.d.ts +0 -9
- package/dist/api/resources/transactions/client/requests/RefundTransactionsRequest.d.ts +0 -9
- package/dist/api/resources/transactions/client/requests/RerunFlowsTransactionsRequest.d.ts +0 -9
- package/dist/api/resources/transactions/client/requests/UpdateTransactionsRequest.d.ts +0 -20
- package/dist/api/resources/transactions/types/RerunFlowsTransactionsResponse.js +0 -2
- package/dist/api/resources/transactions/types/UpdateTransactionsResponse.d.ts +0 -6
- package/dist/api/resources/transactions/types/UpdateTransactionsResponse.js +0 -2
- /package/dist/api/resources/clicks/client/requests/{GetClicksRequest.js → CreateClickRequest.js} +0 -0
- /package/dist/api/resources/clicks/{types/CreateClicksRequest.js → client/requests/GetClickRequest.js} +0 -0
- /package/dist/api/resources/clicks/types/{CreateClicksResponse.js → CreateClickResponse.js} +0 -0
- /package/dist/api/resources/clicks/types/{GetClicksResponse.js → GetClickResponse.js} +0 -0
- /package/dist/api/resources/commissions/client/requests/{ApproveCommissionsRequest.js → ApproveCommissionRequest.js} +0 -0
- /package/dist/api/resources/commissions/client/requests/{DeclineCommissionsRequest.js → DeclineCommissionRequest.js} +0 -0
- /package/dist/api/resources/commissions/client/requests/{DeleteCommissionsRequest.js → DeleteCommissionRequest.js} +0 -0
- /package/dist/api/resources/commissions/client/requests/{GetCommissionsRequest.js → GetCommissionRequest.js} +0 -0
- /package/dist/api/resources/commissions/{client/requests/UpdateCommissionsRequest.js → types/ApproveCommissionResponse.js} +0 -0
- /package/dist/api/resources/commissions/types/{ApproveCommissionsResponse.js → CreateCommissionResponse.js} +0 -0
- /package/dist/api/resources/commissions/types/{CreateCommissionsRequest.js → DeclineCommissionResponse.js} +0 -0
- /package/dist/api/resources/commissions/types/{CreateCommissionsResponse.js → DeleteCommissionResponse.js} +0 -0
- /package/dist/api/resources/commissions/types/{DeclineCommissionsResponse.js → GetCommissionResponse.js} +0 -0
- /package/dist/api/resources/commissions/types/{DeleteCommissionsResponse.js → UpdateCommissionResponse.js} +0 -0
- /package/dist/api/resources/{commissions/types/GetCommissionsResponse.js → customers/client/requests/DeleteCustomerRequest.js} +0 -0
- /package/dist/api/resources/{commissions/types/UpdateCommissionsResponse.js → customers/client/requests/GetCustomerRequest.js} +0 -0
- /package/dist/api/resources/customers/{client/requests/DeleteCustomersRequest.js → types/CreateCustomerResponse.js} +0 -0
- /package/dist/api/resources/customers/{client/requests/GetCustomersRequest.js → types/DeleteCustomerResponse.js} +0 -0
- /package/dist/api/resources/customers/types/{CreateCustomersResponse.js → GetCustomerResponse.js} +0 -0
- /package/dist/api/resources/customers/types/{DeleteCustomersResponse.js → UpdateCustomerResponse.js} +0 -0
- /package/dist/api/resources/{embed → embedTokens}/client/index.d.ts +0 -0
- /package/dist/api/resources/{embed → embedTokens}/client/index.js +0 -0
- /package/dist/api/resources/{customers/types/GetCustomersResponse.js → embedTokens/client/requests/CreateEmbedTokenRequest.js} +0 -0
- /package/dist/api/resources/{embed → embedTokens}/client/requests/index.js +0 -0
- /package/dist/api/resources/{embed → embedTokens}/index.d.ts +0 -0
- /package/dist/api/resources/{embed → embedTokens}/index.js +0 -0
- /package/dist/api/resources/{customers/types/UpdateCustomersResponse.js → embedTokens/types/CreateEmbedTokenResponse.js} +0 -0
- /package/dist/api/resources/{embed/client/requests/CreateTokenEmbedRequest.js → flows/client/requests/GetFlowRequest.js} +0 -0
- /package/dist/api/resources/{embed/types/CreateTokenEmbedResponse.js → flows/types/GetFlowResponse.js} +0 -0
- /package/dist/api/resources/{flows/client/requests/GetFlowsRequest.js → groups/client/requests/GetGroupRequest.js} +0 -0
- /package/dist/api/resources/{flows/types/GetFlowsResponse.js → groups/types/GetGroupResponse.js} +0 -0
- /package/dist/api/resources/{groups/client/requests/GetGroupsRequest.js → links/client/requests/CreateLinkRequest.js} +0 -0
- /package/dist/api/resources/{groups/types/GetGroupsResponse.js → links/client/requests/DeleteLinkRequest.js} +0 -0
- /package/dist/api/resources/links/client/requests/{CreateLinksRequest.js → GetLinkByParamValueRequest.js} +0 -0
- /package/dist/api/resources/links/client/requests/{DeleteLinksRequest.js → GetLinkRequest.js} +0 -0
- /package/dist/api/resources/links/client/requests/{GetByParamValueLinksRequest.js → UpdateLinkRequest.js} +0 -0
- /package/dist/api/resources/links/{client/requests/GetLinksRequest.js → types/CreateLinkResponse.js} +0 -0
- /package/dist/api/resources/links/{client/requests/UpdateLinksRequest.js → types/DeleteLinkResponse.js} +0 -0
- /package/dist/api/resources/links/types/{CreateLinksResponse.js → GetLinkByParamValueResponse.js} +0 -0
- /package/dist/api/resources/links/types/{DeleteLinksResponse.js → GetLinkResponse.js} +0 -0
- /package/dist/api/resources/links/types/{GetByParamValueLinksResponse.js → UpdateLinkResponse.js} +0 -0
- /package/dist/api/resources/{links/types/GetLinksResponse.js → partners/client/requests/ApprovePartnerRequest.js} +0 -0
- /package/dist/api/resources/{links/types/UpdateLinksResponse.js → partners/client/requests/GetPartnerRequest.js} +0 -0
- /package/dist/api/resources/partners/client/requests/{ApprovePartnersRequest.js → RejectPartnerRequest.js} +0 -0
- /package/dist/api/resources/partners/client/requests/{GetPartnersRequest.js → SuspendPartnerRequest.js} +0 -0
- /package/dist/api/resources/partners/client/requests/{RejectPartnersRequest.js → UpdatePartnerRequest.js} +0 -0
- /package/dist/api/resources/partners/{client/requests/SuspendPartnersRequest.js → types/ApprovePartnerResponse.js} +0 -0
- /package/dist/api/resources/partners/{client/requests/UpdatePartnersRequest.js → types/CreatePartnerResponse.js} +0 -0
- /package/dist/api/resources/partners/types/{ApprovePartnersResponse.js → GetPartnerResponse.js} +0 -0
- /package/dist/api/resources/partners/types/{CreatePartnersResponse.js → RejectPartnerResponse.js} +0 -0
- /package/dist/api/resources/partners/types/{GetPartnersResponse.js → SuspendPartnerResponse.js} +0 -0
- /package/dist/api/resources/partners/types/{RejectPartnersResponse.js → UpdatePartnerResponse.js} +0 -0
- /package/dist/api/resources/{partners/types/SuspendPartnersResponse.js → programs/client/requests/GetProgramRequest.js} +0 -0
- /package/dist/api/resources/{partners/types/UpdatePartnersResponse.js → programs/types/GetProgramResponse.js} +0 -0
- /package/dist/api/resources/{programs/client/requests/GetProgramsRequest.js → promotionCodes/client/requests/DeletePromotionCodeRequest.js} +0 -0
- /package/dist/api/resources/{programs/types/GetProgramsResponse.js → promotionCodes/client/requests/GetPromotionCodeRequest.js} +0 -0
- /package/dist/api/resources/promotionCodes/{client/requests/DeletePromotionCodesRequest.js → types/CreatePromotionCodeResponse.js} +0 -0
- /package/dist/api/resources/promotionCodes/{client/requests/GetPromotionCodesRequest.js → types/DeletePromotionCodeResponse.js} +0 -0
- /package/dist/api/resources/promotionCodes/types/{CreatePromotionCodesResponse.js → GetPromotionCodeResponse.js} +0 -0
- /package/dist/api/resources/promotionCodes/types/{DeletePromotionCodesResponse.js → UpdatePromotionCodeResponse.js} +0 -0
- /package/dist/api/resources/{promotionCodes/types/GetPromotionCodesResponse.js → reports/client/requests/ReportsCustomersRequest.js} +0 -0
- /package/dist/api/resources/{promotionCodes/types/UpdatePromotionCodesResponse.js → reports/client/requests/ReportsLinksRequest.js} +0 -0
- /package/dist/api/resources/reports/client/requests/{CustomerStatsReportsRequest.js → ReportsOverviewRequest.js} +0 -0
- /package/dist/api/resources/reports/client/requests/{LinksReportsRequest.js → ReportsPartnersRequest.js} +0 -0
- /package/dist/api/resources/reports/client/requests/{OverviewReportsRequest.js → ReportsTimeseriesRequest.js} +0 -0
- /package/dist/api/resources/reports/{client/requests/PartnersReportsRequest.js → types/ReportsCustomersResponse.js} +0 -0
- /package/dist/api/resources/reports/{client/requests/TimeseriesReportsRequest.js → types/ReportsLinksResponse.js} +0 -0
- /package/dist/api/resources/reports/types/{CustomerStatsReportsResponse.js → ReportsOverviewResponse.js} +0 -0
- /package/dist/api/resources/reports/types/{LinksReportsResponse.js → ReportsPartnersResponse.js} +0 -0
- /package/dist/api/resources/reports/types/{OverviewReportsResponse.js → ReportsTimeseriesResponse.js} +0 -0
- /package/dist/api/resources/{reports/types/PartnersReportsResponse.js → transactions/client/requests/CreateTransactionRequest.js} +0 -0
- /package/dist/api/resources/{reports/types/TimeseriesReportsResponse.js → transactions/client/requests/DeleteTransactionRequest.js} +0 -0
- /package/dist/api/resources/transactions/client/requests/{CreateTransactionsRequest.js → GetTransactionRequest.js} +0 -0
- /package/dist/api/resources/transactions/client/requests/{DeleteTransactionsRequest.js → RefundTransactionRequest.js} +0 -0
- /package/dist/api/resources/transactions/client/requests/{GetTransactionsRequest.js → RerunTransactionFlowsRequest.js} +0 -0
- /package/dist/api/resources/transactions/client/requests/{RefundTransactionsRequest.js → UpdateTransactionRequest.js} +0 -0
- /package/dist/api/resources/transactions/{client/requests/RerunFlowsTransactionsRequest.js → types/CreateTransactionResponse.js} +0 -0
- /package/dist/api/resources/transactions/{client/requests/UpdateTransactionsRequest.js → types/DeleteTransactionResponse.js} +0 -0
- /package/dist/api/resources/transactions/types/{CreateTransactionsResponse.js → GetTransactionResponse.js} +0 -0
- /package/dist/api/resources/transactions/types/{DeleteTransactionsResponse.js → RefundTransactionResponse.js} +0 -0
- /package/dist/api/resources/transactions/types/{GetTransactionsResponse.js → RerunTransactionFlowsResponse.js} +0 -0
- /package/dist/api/resources/transactions/types/{RefundTransactionsResponse.js → UpdateTransactionResponse.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Timestamp to order and page by: created_at follows creation order, updated_at follows each item's most recent change. */
|
|
2
2
|
export declare const ListPromotionCodesRequestSort: {
|
|
3
3
|
readonly CreatedAt: "created_at";
|
|
4
4
|
readonly UpdatedAt: "updated_at";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
/**
|
|
2
|
+
/** Timestamp to order and page by: created_at follows creation order, updated_at follows each item's most recent change. */
|
|
3
3
|
export const ListPromotionCodesRequestSort = {
|
|
4
4
|
CreatedAt: "created_at",
|
|
5
5
|
UpdatedAt: "updated_at",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
1
|
+
export * from "./CreatePromotionCodeResponse.js";
|
|
2
|
+
export * from "./DeletePromotionCodeResponse.js";
|
|
3
|
+
export * from "./GetPromotionCodeResponse.js";
|
|
4
4
|
export * from "./ListPromotionCodesRequestOrder.js";
|
|
5
5
|
export * from "./ListPromotionCodesRequestSort.js";
|
|
6
6
|
export * from "./ListPromotionCodesRequestType.js";
|
|
7
7
|
export * from "./ListPromotionCodesResponse.js";
|
|
8
|
-
export * from "./
|
|
8
|
+
export * from "./UpdatePromotionCodeResponse.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
1
|
+
export * from "./CreatePromotionCodeResponse.js";
|
|
2
|
+
export * from "./DeletePromotionCodeResponse.js";
|
|
3
|
+
export * from "./GetPromotionCodeResponse.js";
|
|
4
4
|
export * from "./ListPromotionCodesRequestOrder.js";
|
|
5
5
|
export * from "./ListPromotionCodesRequestSort.js";
|
|
6
6
|
export * from "./ListPromotionCodesRequestType.js";
|
|
7
7
|
export * from "./ListPromotionCodesResponse.js";
|
|
8
|
-
export * from "./
|
|
8
|
+
export * from "./UpdatePromotionCodeResponse.js";
|
|
@@ -11,11 +11,14 @@ export declare class ReportsClient {
|
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<ReportsClient.Options>;
|
|
12
12
|
constructor(options: ReportsClient.Options);
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Returns revenue, commission, customer and partner totals for the organization or one program over a date range.
|
|
15
|
+
*
|
|
16
|
+
* @param {ToltApi.ReportsOverviewRequest} request
|
|
15
17
|
* @param {ReportsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
16
18
|
*
|
|
17
19
|
* @throws {@link ToltApi.BadRequestError}
|
|
18
20
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
21
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
19
22
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
20
23
|
* @throws {@link errors.ToltApiError}
|
|
21
24
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
@@ -23,14 +26,17 @@ export declare class ReportsClient {
|
|
|
23
26
|
* @example
|
|
24
27
|
* await client.reports.overview()
|
|
25
28
|
*/
|
|
26
|
-
overview(request?: ToltApi.
|
|
29
|
+
overview(request?: ToltApi.ReportsOverviewRequest, requestOptions?: ReportsClient.RequestOptions): core.HttpResponsePromise<ToltApi.ReportsOverviewResponse>;
|
|
27
30
|
private __overview;
|
|
28
31
|
/**
|
|
29
|
-
*
|
|
32
|
+
* Returns one row of revenue, commissions, customers and clicks per partner over a date range, sorted and paged by offset.
|
|
33
|
+
*
|
|
34
|
+
* @param {ToltApi.ReportsPartnersRequest} request
|
|
30
35
|
* @param {ReportsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
31
36
|
*
|
|
32
37
|
* @throws {@link ToltApi.BadRequestError}
|
|
33
38
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
39
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
34
40
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
35
41
|
* @throws {@link errors.ToltApiError}
|
|
36
42
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
@@ -38,14 +44,16 @@ export declare class ReportsClient {
|
|
|
38
44
|
* @example
|
|
39
45
|
* await client.reports.partners()
|
|
40
46
|
*/
|
|
41
|
-
partners(request?: ToltApi.
|
|
42
|
-
private __partners;
|
|
47
|
+
partners(request?: ToltApi.ReportsPartnersRequest, requestOptions?: ReportsClient.RequestOptions): Promise<core.Page<ToltApi.ReportsPartnerRow, ToltApi.ReportsPartnersResponse>>;
|
|
43
48
|
/**
|
|
44
|
-
*
|
|
49
|
+
* Returns one row of revenue, commissions, customers and clicks per link over a date range, sorted and paged by offset.
|
|
50
|
+
*
|
|
51
|
+
* @param {ToltApi.ReportsLinksRequest} request
|
|
45
52
|
* @param {ReportsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
46
53
|
*
|
|
47
54
|
* @throws {@link ToltApi.BadRequestError}
|
|
48
55
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
56
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
49
57
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
50
58
|
* @throws {@link errors.ToltApiError}
|
|
51
59
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
@@ -53,14 +61,16 @@ export declare class ReportsClient {
|
|
|
53
61
|
* @example
|
|
54
62
|
* await client.reports.links()
|
|
55
63
|
*/
|
|
56
|
-
links(request?: ToltApi.
|
|
57
|
-
private __links;
|
|
64
|
+
links(request?: ToltApi.ReportsLinksRequest, requestOptions?: ReportsClient.RequestOptions): Promise<core.Page<ToltApi.ReportsLinkRow, ToltApi.ReportsLinksResponse>>;
|
|
58
65
|
/**
|
|
59
|
-
*
|
|
66
|
+
* Returns revenue, commissions, customers and clicks per day, week or month over a date range, ready to chart.
|
|
67
|
+
*
|
|
68
|
+
* @param {ToltApi.ReportsTimeseriesRequest} request
|
|
60
69
|
* @param {ReportsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
70
|
*
|
|
62
71
|
* @throws {@link ToltApi.BadRequestError}
|
|
63
72
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
73
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
64
74
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
65
75
|
* @throws {@link errors.ToltApiError}
|
|
66
76
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
@@ -68,21 +78,24 @@ export declare class ReportsClient {
|
|
|
68
78
|
* @example
|
|
69
79
|
* await client.reports.timeseries()
|
|
70
80
|
*/
|
|
71
|
-
timeseries(request?: ToltApi.
|
|
81
|
+
timeseries(request?: ToltApi.ReportsTimeseriesRequest, requestOptions?: ReportsClient.RequestOptions): core.HttpResponsePromise<ToltApi.ReportsTimeseriesResponse>;
|
|
72
82
|
private __timeseries;
|
|
73
83
|
/**
|
|
74
|
-
*
|
|
84
|
+
* Returns how many customers are in each subscription status for the organization or one program.
|
|
85
|
+
*
|
|
86
|
+
* @param {ToltApi.ReportsCustomersRequest} request
|
|
75
87
|
* @param {ReportsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
88
|
*
|
|
77
89
|
* @throws {@link ToltApi.BadRequestError}
|
|
78
90
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
91
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
79
92
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
80
93
|
* @throws {@link errors.ToltApiError}
|
|
81
94
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
82
95
|
*
|
|
83
96
|
* @example
|
|
84
|
-
* await client.reports.
|
|
97
|
+
* await client.reports.customers()
|
|
85
98
|
*/
|
|
86
|
-
|
|
87
|
-
private
|
|
99
|
+
customers(request?: ToltApi.ReportsCustomersRequest, requestOptions?: ReportsClient.RequestOptions): core.HttpResponsePromise<ToltApi.ReportsCustomersResponse>;
|
|
100
|
+
private __customers;
|
|
88
101
|
}
|
|
@@ -11,11 +11,14 @@ export class ReportsClient {
|
|
|
11
11
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Returns revenue, commission, customer and partner totals for the organization or one program over a date range.
|
|
15
|
+
*
|
|
16
|
+
* @param {ToltApi.ReportsOverviewRequest} request
|
|
15
17
|
* @param {ReportsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
16
18
|
*
|
|
17
19
|
* @throws {@link ToltApi.BadRequestError}
|
|
18
20
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
21
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
19
22
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
20
23
|
* @throws {@link errors.ToltApiError}
|
|
21
24
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
@@ -38,7 +41,7 @@ export class ReportsClient {
|
|
|
38
41
|
const _response = await core.fetcher({
|
|
39
42
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
40
43
|
(await core.Supplier.get(this._options.environment)) ??
|
|
41
|
-
environments.ToltApiEnvironment.
|
|
44
|
+
environments.ToltApiEnvironment.Default, "v2/reports/overview"),
|
|
42
45
|
method: "GET",
|
|
43
46
|
headers: _headers,
|
|
44
47
|
queryString: core.url
|
|
@@ -61,6 +64,8 @@ export class ReportsClient {
|
|
|
61
64
|
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
62
65
|
case 401:
|
|
63
66
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
67
|
+
case 413:
|
|
68
|
+
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
64
69
|
case 429:
|
|
65
70
|
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
66
71
|
default:
|
|
@@ -74,11 +79,14 @@ export class ReportsClient {
|
|
|
74
79
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/reports/overview");
|
|
75
80
|
}
|
|
76
81
|
/**
|
|
77
|
-
*
|
|
82
|
+
* Returns one row of revenue, commissions, customers and clicks per partner over a date range, sorted and paged by offset.
|
|
83
|
+
*
|
|
84
|
+
* @param {ToltApi.ReportsPartnersRequest} request
|
|
78
85
|
* @param {ReportsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
79
86
|
*
|
|
80
87
|
* @throws {@link ToltApi.BadRequestError}
|
|
81
88
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
89
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
82
90
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
83
91
|
* @throws {@link errors.ToltApiError}
|
|
84
92
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
@@ -86,67 +94,93 @@ export class ReportsClient {
|
|
|
86
94
|
* @example
|
|
87
95
|
* await client.reports.partners()
|
|
88
96
|
*/
|
|
89
|
-
partners(request = {}, requestOptions) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
if (_response.error.reason === "status-code") {
|
|
127
|
-
switch (_response.error.statusCode) {
|
|
128
|
-
case 400:
|
|
129
|
-
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
130
|
-
case 401:
|
|
131
|
-
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
132
|
-
case 429:
|
|
133
|
-
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
134
|
-
default:
|
|
135
|
-
throw new errors.ToltApiError({
|
|
136
|
-
statusCode: _response.error.statusCode,
|
|
137
|
-
body: _response.error.body,
|
|
138
|
-
rawResponse: _response.rawResponse,
|
|
139
|
-
});
|
|
97
|
+
async partners(request = {}, requestOptions) {
|
|
98
|
+
const list = core.HttpResponsePromise.interceptFunction(async (request) => {
|
|
99
|
+
const { program_id: programId, start_date: startDate, end_date: endDate, currency, limit, offset, sort, order, } = request;
|
|
100
|
+
const _queryParams = {
|
|
101
|
+
program_id: programId,
|
|
102
|
+
start_date: startDate != null ? startDate : undefined,
|
|
103
|
+
end_date: endDate != null ? endDate : undefined,
|
|
104
|
+
currency,
|
|
105
|
+
limit,
|
|
106
|
+
offset,
|
|
107
|
+
sort: sort != null ? sort : undefined,
|
|
108
|
+
order: order != null ? order : undefined,
|
|
109
|
+
};
|
|
110
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
111
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
112
|
+
const _response = await core.fetcher({
|
|
113
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
114
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
115
|
+
environments.ToltApiEnvironment.Default, "v2/reports/partners"),
|
|
116
|
+
method: "GET",
|
|
117
|
+
headers: _headers,
|
|
118
|
+
queryString: core.url
|
|
119
|
+
.queryBuilder()
|
|
120
|
+
.addMany(_queryParams)
|
|
121
|
+
.mergeAdditional(requestOptions?.queryParams)
|
|
122
|
+
.build(),
|
|
123
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
124
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
125
|
+
abortSignal: requestOptions?.abortSignal,
|
|
126
|
+
fetchFn: this._options?.fetch,
|
|
127
|
+
logging: this._options.logging,
|
|
128
|
+
});
|
|
129
|
+
if (_response.ok) {
|
|
130
|
+
return {
|
|
131
|
+
data: _response.body,
|
|
132
|
+
rawResponse: _response.rawResponse,
|
|
133
|
+
};
|
|
140
134
|
}
|
|
141
|
-
|
|
142
|
-
|
|
135
|
+
if (_response.error.reason === "status-code") {
|
|
136
|
+
switch (_response.error.statusCode) {
|
|
137
|
+
case 400:
|
|
138
|
+
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
139
|
+
case 401:
|
|
140
|
+
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
141
|
+
case 413:
|
|
142
|
+
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
143
|
+
case 429:
|
|
144
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
145
|
+
default:
|
|
146
|
+
throw new errors.ToltApiError({
|
|
147
|
+
statusCode: _response.error.statusCode,
|
|
148
|
+
body: _response.error.body,
|
|
149
|
+
rawResponse: _response.rawResponse,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/reports/partners");
|
|
154
|
+
});
|
|
155
|
+
let _offset = request?.offset != null ? request?.offset : 0;
|
|
156
|
+
const dataWithRawResponse = await list(request).withRawResponse();
|
|
157
|
+
return new core.Page({
|
|
158
|
+
response: dataWithRawResponse.data,
|
|
159
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
160
|
+
hasNextPage: (response) => response?.has_more ??
|
|
161
|
+
((response?.data ?? []).length > 0 &&
|
|
162
|
+
(request?.limit == null || (response?.data ?? []).length >= request?.limit)),
|
|
163
|
+
getItems: (response) => response?.data ?? [],
|
|
164
|
+
loadPage: (response) => {
|
|
165
|
+
const _nextOffset = _offset + (response?.data != null ? response.data.length : 1);
|
|
166
|
+
return core.HttpResponsePromise.fromPromise(list(core.setObjectProperty(request, "offset", _nextOffset))
|
|
167
|
+
.withRawResponse()
|
|
168
|
+
.then((_pageResponse) => {
|
|
169
|
+
_offset = _nextOffset;
|
|
170
|
+
return _pageResponse;
|
|
171
|
+
}));
|
|
172
|
+
},
|
|
173
|
+
});
|
|
143
174
|
}
|
|
144
175
|
/**
|
|
145
|
-
*
|
|
176
|
+
* Returns one row of revenue, commissions, customers and clicks per link over a date range, sorted and paged by offset.
|
|
177
|
+
*
|
|
178
|
+
* @param {ToltApi.ReportsLinksRequest} request
|
|
146
179
|
* @param {ReportsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
147
180
|
*
|
|
148
181
|
* @throws {@link ToltApi.BadRequestError}
|
|
149
182
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
183
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
150
184
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
151
185
|
* @throws {@link errors.ToltApiError}
|
|
152
186
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
@@ -154,67 +188,90 @@ export class ReportsClient {
|
|
|
154
188
|
* @example
|
|
155
189
|
* await client.reports.links()
|
|
156
190
|
*/
|
|
157
|
-
links(request = {}, requestOptions) {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
.
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
if (_response.ok) {
|
|
192
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
193
|
-
}
|
|
194
|
-
if (_response.error.reason === "status-code") {
|
|
195
|
-
switch (_response.error.statusCode) {
|
|
196
|
-
case 400:
|
|
197
|
-
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
198
|
-
case 401:
|
|
199
|
-
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
200
|
-
case 429:
|
|
201
|
-
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
202
|
-
default:
|
|
203
|
-
throw new errors.ToltApiError({
|
|
204
|
-
statusCode: _response.error.statusCode,
|
|
205
|
-
body: _response.error.body,
|
|
206
|
-
rawResponse: _response.rawResponse,
|
|
207
|
-
});
|
|
191
|
+
async links(request = {}, requestOptions) {
|
|
192
|
+
const list = core.HttpResponsePromise.interceptFunction(async (request) => {
|
|
193
|
+
const { program_id: programId, start_date: startDate, end_date: endDate, currency, limit, offset, sort, order, } = request;
|
|
194
|
+
const _queryParams = {
|
|
195
|
+
program_id: programId,
|
|
196
|
+
start_date: startDate != null ? startDate : undefined,
|
|
197
|
+
end_date: endDate != null ? endDate : undefined,
|
|
198
|
+
currency,
|
|
199
|
+
limit,
|
|
200
|
+
offset,
|
|
201
|
+
sort: sort != null ? sort : undefined,
|
|
202
|
+
order: order != null ? order : undefined,
|
|
203
|
+
};
|
|
204
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
205
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
206
|
+
const _response = await core.fetcher({
|
|
207
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
208
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
209
|
+
environments.ToltApiEnvironment.Default, "v2/reports/links"),
|
|
210
|
+
method: "GET",
|
|
211
|
+
headers: _headers,
|
|
212
|
+
queryString: core.url
|
|
213
|
+
.queryBuilder()
|
|
214
|
+
.addMany(_queryParams)
|
|
215
|
+
.mergeAdditional(requestOptions?.queryParams)
|
|
216
|
+
.build(),
|
|
217
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
218
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
219
|
+
abortSignal: requestOptions?.abortSignal,
|
|
220
|
+
fetchFn: this._options?.fetch,
|
|
221
|
+
logging: this._options.logging,
|
|
222
|
+
});
|
|
223
|
+
if (_response.ok) {
|
|
224
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
208
225
|
}
|
|
209
|
-
|
|
210
|
-
|
|
226
|
+
if (_response.error.reason === "status-code") {
|
|
227
|
+
switch (_response.error.statusCode) {
|
|
228
|
+
case 400:
|
|
229
|
+
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
230
|
+
case 401:
|
|
231
|
+
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
232
|
+
case 413:
|
|
233
|
+
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
234
|
+
case 429:
|
|
235
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
236
|
+
default:
|
|
237
|
+
throw new errors.ToltApiError({
|
|
238
|
+
statusCode: _response.error.statusCode,
|
|
239
|
+
body: _response.error.body,
|
|
240
|
+
rawResponse: _response.rawResponse,
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/reports/links");
|
|
245
|
+
});
|
|
246
|
+
let _offset = request?.offset != null ? request?.offset : 0;
|
|
247
|
+
const dataWithRawResponse = await list(request).withRawResponse();
|
|
248
|
+
return new core.Page({
|
|
249
|
+
response: dataWithRawResponse.data,
|
|
250
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
251
|
+
hasNextPage: (response) => response?.has_more ??
|
|
252
|
+
((response?.data ?? []).length > 0 &&
|
|
253
|
+
(request?.limit == null || (response?.data ?? []).length >= request?.limit)),
|
|
254
|
+
getItems: (response) => response?.data ?? [],
|
|
255
|
+
loadPage: (response) => {
|
|
256
|
+
const _nextOffset = _offset + (response?.data != null ? response.data.length : 1);
|
|
257
|
+
return core.HttpResponsePromise.fromPromise(list(core.setObjectProperty(request, "offset", _nextOffset))
|
|
258
|
+
.withRawResponse()
|
|
259
|
+
.then((_pageResponse) => {
|
|
260
|
+
_offset = _nextOffset;
|
|
261
|
+
return _pageResponse;
|
|
262
|
+
}));
|
|
263
|
+
},
|
|
264
|
+
});
|
|
211
265
|
}
|
|
212
266
|
/**
|
|
213
|
-
*
|
|
267
|
+
* Returns revenue, commissions, customers and clicks per day, week or month over a date range, ready to chart.
|
|
268
|
+
*
|
|
269
|
+
* @param {ToltApi.ReportsTimeseriesRequest} request
|
|
214
270
|
* @param {ReportsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
215
271
|
*
|
|
216
272
|
* @throws {@link ToltApi.BadRequestError}
|
|
217
273
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
274
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
218
275
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
219
276
|
* @throws {@link errors.ToltApiError}
|
|
220
277
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
@@ -239,7 +296,7 @@ export class ReportsClient {
|
|
|
239
296
|
const _response = await core.fetcher({
|
|
240
297
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
241
298
|
(await core.Supplier.get(this._options.environment)) ??
|
|
242
|
-
environments.ToltApiEnvironment.
|
|
299
|
+
environments.ToltApiEnvironment.Default, "v2/reports/timeseries"),
|
|
243
300
|
method: "GET",
|
|
244
301
|
headers: _headers,
|
|
245
302
|
queryString: core.url
|
|
@@ -262,6 +319,8 @@ export class ReportsClient {
|
|
|
262
319
|
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
263
320
|
case 401:
|
|
264
321
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
322
|
+
case 413:
|
|
323
|
+
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
265
324
|
case 429:
|
|
266
325
|
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
267
326
|
default:
|
|
@@ -275,22 +334,25 @@ export class ReportsClient {
|
|
|
275
334
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/reports/timeseries");
|
|
276
335
|
}
|
|
277
336
|
/**
|
|
278
|
-
*
|
|
337
|
+
* Returns how many customers are in each subscription status for the organization or one program.
|
|
338
|
+
*
|
|
339
|
+
* @param {ToltApi.ReportsCustomersRequest} request
|
|
279
340
|
* @param {ReportsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
280
341
|
*
|
|
281
342
|
* @throws {@link ToltApi.BadRequestError}
|
|
282
343
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
344
|
+
* @throws {@link ToltApi.ContentTooLargeError}
|
|
283
345
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
284
346
|
* @throws {@link errors.ToltApiError}
|
|
285
347
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
286
348
|
*
|
|
287
349
|
* @example
|
|
288
|
-
* await client.reports.
|
|
350
|
+
* await client.reports.customers()
|
|
289
351
|
*/
|
|
290
|
-
|
|
291
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
352
|
+
customers(request = {}, requestOptions) {
|
|
353
|
+
return core.HttpResponsePromise.fromPromise(this.__customers(request, requestOptions));
|
|
292
354
|
}
|
|
293
|
-
async
|
|
355
|
+
async __customers(request = {}, requestOptions) {
|
|
294
356
|
const { program_id: programId, start_date: startDate, end_date: endDate } = request;
|
|
295
357
|
const _queryParams = {
|
|
296
358
|
program_id: programId,
|
|
@@ -302,7 +364,7 @@ export class ReportsClient {
|
|
|
302
364
|
const _response = await core.fetcher({
|
|
303
365
|
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
304
366
|
(await core.Supplier.get(this._options.environment)) ??
|
|
305
|
-
environments.ToltApiEnvironment.
|
|
367
|
+
environments.ToltApiEnvironment.Default, "v2/reports/customers"),
|
|
306
368
|
method: "GET",
|
|
307
369
|
headers: _headers,
|
|
308
370
|
queryString: core.url
|
|
@@ -325,6 +387,8 @@ export class ReportsClient {
|
|
|
325
387
|
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
326
388
|
case 401:
|
|
327
389
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
390
|
+
case 413:
|
|
391
|
+
throw new ToltApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
328
392
|
case 429:
|
|
329
393
|
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
330
394
|
default:
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {}
|
|
4
|
+
*/
|
|
5
|
+
export interface ReportsCustomersRequest {
|
|
6
|
+
/** Limit to one program, by its id (prg_...) as returned when listing programs. */
|
|
7
|
+
program_id?: string;
|
|
8
|
+
/** Earliest day to include, by the day customers became active. Leave it out for no lower bound. */
|
|
9
|
+
start_date?: string;
|
|
10
|
+
/** Latest day to include, by the day customers became active; the whole day counts. Leave it out for no upper bound. */
|
|
11
|
+
end_date?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type * as ToltApi from "../../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {}
|
|
5
|
+
*/
|
|
6
|
+
export interface ReportsLinksRequest {
|
|
7
|
+
/** Limit to one program, by its id (prg_...) as returned when listing programs. */
|
|
8
|
+
program_id?: string;
|
|
9
|
+
/** Earliest day to include, by creation date (customers by the day they became active). Leave it out for no lower bound. */
|
|
10
|
+
start_date?: string;
|
|
11
|
+
/** Latest day to include, by creation date (customers by the day they became active); the whole day counts. Leave it out for no upper bound. */
|
|
12
|
+
end_date?: string;
|
|
13
|
+
/** Only include transactions and commissions in this currency, such as USD; matching ignores case. Rows without their own currency use their program's. */
|
|
14
|
+
currency?: string;
|
|
15
|
+
/** How many rows to return in one page. */
|
|
16
|
+
limit?: number;
|
|
17
|
+
/** How many rows to skip before this page begins. */
|
|
18
|
+
offset?: number | null;
|
|
19
|
+
/** Metric to rank by, computed over the date window. */
|
|
20
|
+
sort?: ToltApi.LinksReportsRequestSort;
|
|
21
|
+
/** Ranking direction: desc puts the highest values first. */
|
|
22
|
+
order?: ToltApi.LinksReportsRequestOrder;
|
|
23
|
+
}
|