@tolt/api 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/resources/clicks/client/Client.d.ts +28 -8
- package/dist/api/resources/clicks/client/Client.js +89 -10
- package/dist/api/resources/{links/client/requests/GetLinkRequest.d.ts → clicks/client/requests/GetClicksRequest.d.ts} +1 -1
- package/dist/api/resources/clicks/client/requests/ListClicksRequest.d.ts +33 -0
- package/dist/api/resources/clicks/client/requests/index.d.ts +2 -1
- package/dist/api/resources/clicks/types/CreateClicksRequest.d.ts +1 -0
- package/dist/api/resources/clicks/types/{CreateClickResponse.d.ts → CreateClicksResponse.d.ts} +1 -1
- package/dist/api/resources/clicks/types/{GetClickResponse.d.ts → GetClicksResponse.d.ts} +1 -1
- package/dist/api/resources/clicks/types/ListClicksRequestOrder.d.ts +5 -0
- package/dist/api/resources/{reports/types/ReportsLinksRequestOrder.js → clicks/types/ListClicksRequestOrder.js} +1 -1
- package/dist/api/resources/clicks/types/ListClicksRequestSort.d.ts +6 -0
- package/dist/api/resources/clicks/types/ListClicksRequestSort.js +6 -0
- package/dist/api/resources/clicks/types/ListClicksResponse.d.ts +11 -0
- package/dist/api/resources/clicks/types/index.d.ts +6 -3
- package/dist/api/resources/clicks/types/index.js +6 -3
- package/dist/api/resources/commissions/client/Client.d.ts +39 -35
- package/dist/api/resources/commissions/client/Client.js +48 -44
- package/dist/api/resources/commissions/client/requests/{ApproveCommissionRequest.d.ts → ApproveCommissionsRequest.d.ts} +1 -1
- package/dist/api/resources/commissions/client/requests/DeclineCommissionsRequest.d.ts +9 -0
- package/dist/api/resources/commissions/client/requests/{DeclineCommissionRequest.d.ts → DeleteCommissionsRequest.d.ts} +1 -1
- package/dist/api/resources/commissions/client/requests/{GetCommissionRequest.d.ts → GetCommissionsRequest.d.ts} +1 -1
- package/dist/api/resources/commissions/client/requests/{UpdateCommissionRequest.d.ts → UpdateCommissionsRequest.d.ts} +1 -1
- package/dist/api/resources/commissions/client/requests/index.d.ts +5 -5
- package/dist/api/resources/commissions/types/{CreateCommissionResponse.d.ts → ApproveCommissionsResponse.d.ts} +1 -1
- package/dist/api/resources/commissions/types/CreateCommissionsRequest.d.ts +1 -0
- package/dist/api/resources/commissions/types/{ApproveCommissionResponse.d.ts → CreateCommissionsResponse.d.ts} +1 -1
- package/dist/api/resources/commissions/types/DeclineCommissionsResponse.d.ts +6 -0
- package/dist/api/resources/commissions/types/{DeclineCommissionResponse.d.ts → DeleteCommissionsResponse.d.ts} +1 -1
- package/dist/api/resources/commissions/types/{GetCommissionResponse.d.ts → GetCommissionsResponse.d.ts} +1 -1
- package/dist/api/resources/commissions/types/{DeleteCommissionResponse.d.ts → UpdateCommissionsResponse.d.ts} +1 -1
- package/dist/api/resources/commissions/types/index.d.ts +7 -7
- package/dist/api/resources/commissions/types/index.js +7 -7
- package/dist/api/resources/customers/client/Client.d.ts +22 -19
- package/dist/api/resources/customers/client/Client.js +37 -26
- package/dist/api/resources/customers/client/requests/CreateCustomersRequest.d.ts +29 -0
- package/dist/api/resources/customers/client/requests/CreateCustomersRequest.js +11 -0
- package/dist/api/resources/customers/client/requests/{DeleteCustomerRequest.d.ts → DeleteCustomersRequest.d.ts} +1 -1
- package/dist/api/resources/customers/client/requests/GetCustomersRequest.d.ts +9 -0
- package/dist/api/resources/customers/client/requests/ListCustomersRequest.d.ts +3 -1
- package/dist/api/resources/customers/client/requests/UpdateCustomersRequest.d.ts +31 -0
- package/dist/api/resources/customers/client/requests/UpdateCustomersRequest.js +11 -0
- package/dist/api/resources/customers/client/requests/index.d.ts +4 -4
- package/dist/api/resources/customers/client/requests/index.js +2 -1
- package/dist/api/resources/customers/types/{DeleteCustomerResponse.d.ts → CreateCustomersResponse.d.ts} +1 -1
- package/dist/api/resources/customers/types/{UpdateCustomerResponse.d.ts → DeleteCustomersResponse.d.ts} +1 -1
- package/dist/api/resources/customers/types/{GetCustomerResponse.d.ts → GetCustomersResponse.d.ts} +1 -1
- package/dist/api/resources/customers/types/ListCustomersRequestStatus.d.ts +8 -0
- package/dist/api/resources/customers/types/ListCustomersRequestStatus.js +8 -0
- package/dist/api/resources/customers/types/{CreateCustomerResponse.d.ts → UpdateCustomersResponse.d.ts} +1 -1
- package/dist/api/resources/customers/types/index.d.ts +5 -4
- package/dist/api/resources/customers/types/index.js +5 -4
- package/dist/api/resources/embed/client/Client.d.ts +4 -4
- package/dist/api/resources/embed/client/Client.js +5 -5
- package/dist/api/resources/embed/client/requests/CreateTokenEmbedRequest.d.ts +14 -0
- package/dist/api/resources/embed/client/requests/index.d.ts +1 -1
- package/dist/api/resources/embed/types/{CreateEmbedTokenResponse.d.ts → CreateTokenEmbedResponse.d.ts} +1 -1
- package/dist/api/resources/embed/types/index.d.ts +1 -1
- package/dist/api/resources/embed/types/index.js +1 -1
- package/dist/api/resources/flows/client/Client.d.ts +7 -7
- package/dist/api/resources/flows/client/Client.js +9 -9
- package/dist/api/resources/{clicks/client/requests/GetClickRequest.d.ts → flows/client/requests/GetFlowsRequest.d.ts} +1 -1
- package/dist/api/resources/flows/client/requests/index.d.ts +1 -1
- package/dist/api/resources/flows/types/{GetFlowResponse.d.ts → GetFlowsResponse.d.ts} +1 -1
- package/dist/api/resources/flows/types/index.d.ts +1 -1
- package/dist/api/resources/flows/types/index.js +1 -1
- package/dist/api/resources/groups/client/Client.d.ts +7 -7
- package/dist/api/resources/groups/client/Client.js +9 -9
- package/dist/api/resources/{flows/client/requests/GetFlowRequest.d.ts → groups/client/requests/GetGroupsRequest.d.ts} +1 -1
- package/dist/api/resources/groups/client/requests/index.d.ts +1 -1
- package/dist/api/resources/groups/types/{GetGroupResponse.d.ts → GetGroupsResponse.d.ts} +1 -1
- package/dist/api/resources/groups/types/index.d.ts +1 -1
- package/dist/api/resources/groups/types/index.js +1 -1
- package/dist/api/resources/links/client/Client.d.ts +49 -19
- package/dist/api/resources/links/client/Client.js +108 -25
- package/dist/api/resources/links/client/requests/{CreateLinkRequest.d.ts → CreateLinksRequest.d.ts} +1 -1
- package/dist/api/resources/{customers/client/requests/GetCustomerRequest.d.ts → links/client/requests/DeleteLinksRequest.d.ts} +1 -1
- package/dist/api/resources/links/client/requests/GetByParamValueLinksRequest.d.ts +12 -0
- package/dist/api/resources/{groups/client/requests/GetGroupRequest.d.ts → links/client/requests/GetLinksRequest.d.ts} +1 -1
- package/dist/api/resources/links/client/requests/ListLinksRequest.d.ts +2 -0
- package/dist/api/resources/links/client/requests/{UpdateLinkRequest.d.ts → UpdateLinksRequest.d.ts} +1 -1
- package/dist/api/resources/links/client/requests/index.d.ts +5 -4
- package/dist/api/resources/links/types/{DeleteLinkResponse.d.ts → CreateLinksResponse.d.ts} +1 -1
- package/dist/api/resources/links/types/{CreateLinkResponse.d.ts → DeleteLinksResponse.d.ts} +1 -1
- package/dist/api/resources/links/types/GetByParamValueLinksResponse.d.ts +6 -0
- package/dist/api/resources/links/types/{GetLinkResponse.d.ts → GetLinksResponse.d.ts} +1 -1
- package/dist/api/resources/links/types/{UpdateLinkResponse.d.ts → UpdateLinksResponse.d.ts} +1 -1
- package/dist/api/resources/links/types/index.d.ts +5 -4
- package/dist/api/resources/links/types/index.js +5 -4
- package/dist/api/resources/partners/client/Client.d.ts +33 -33
- package/dist/api/resources/partners/client/Client.js +42 -42
- package/dist/api/resources/partners/client/requests/ApprovePartnersRequest.d.ts +9 -0
- package/dist/api/resources/partners/client/requests/{CreatePartnerRequest.d.ts → CreatePartnersRequest.d.ts} +8 -4
- package/dist/api/resources/partners/client/requests/CreatePartnersRequest.js +8 -0
- package/dist/api/resources/partners/client/requests/GetPartnersRequest.d.ts +9 -0
- package/dist/api/resources/partners/client/requests/{RejectPartnerRequest.d.ts → RejectPartnersRequest.d.ts} +1 -1
- package/dist/api/resources/partners/client/requests/{SuspendPartnerRequest.d.ts → SuspendPartnersRequest.d.ts} +1 -1
- package/dist/api/resources/partners/client/requests/{UpdatePartnerRequest.d.ts → UpdatePartnersRequest.d.ts} +1 -1
- 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/{SuspendPartnerResponse.d.ts → ApprovePartnersResponse.d.ts} +1 -1
- package/dist/api/resources/partners/types/{CreatePartnerResponse.d.ts → CreatePartnersResponse.d.ts} +1 -1
- package/dist/api/resources/partners/types/{GetPartnerResponse.d.ts → GetPartnersResponse.d.ts} +1 -1
- package/dist/api/resources/partners/types/{ApprovePartnerResponse.d.ts → RejectPartnersResponse.d.ts} +1 -1
- package/dist/api/resources/partners/types/{UpdatePartnerResponse.d.ts → SuspendPartnersResponse.d.ts} +1 -1
- package/dist/api/resources/partners/types/{RejectPartnerResponse.d.ts → UpdatePartnersResponse.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 +7 -7
- package/dist/api/resources/programs/client/Client.js +9 -9
- package/dist/api/resources/programs/client/requests/GetProgramsRequest.d.ts +9 -0
- package/dist/api/resources/programs/client/requests/index.d.ts +1 -1
- package/dist/api/resources/programs/types/{GetProgramResponse.d.ts → GetProgramsResponse.d.ts} +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 +19 -19
- package/dist/api/resources/promotionCodes/client/Client.js +25 -25
- package/dist/api/resources/promotionCodes/client/requests/CreatePromotionCodesRequest.d.ts +20 -0
- package/dist/api/resources/promotionCodes/client/requests/CreatePromotionCodesRequest.js +8 -0
- package/dist/api/resources/promotionCodes/client/requests/DeletePromotionCodesRequest.d.ts +9 -0
- package/dist/api/resources/{commissions/client/requests/DeleteCommissionRequest.d.ts → promotionCodes/client/requests/GetPromotionCodesRequest.d.ts} +1 -1
- package/dist/api/resources/promotionCodes/client/requests/ListPromotionCodesRequest.d.ts +1 -1
- package/dist/api/resources/promotionCodes/client/requests/UpdatePromotionCodesRequest.d.ts +19 -0
- package/dist/api/resources/promotionCodes/client/requests/UpdatePromotionCodesRequest.js +8 -0
- package/dist/api/resources/promotionCodes/client/requests/index.d.ts +4 -4
- package/dist/api/resources/promotionCodes/client/requests/index.js +2 -1
- package/dist/api/resources/promotionCodes/types/{CreatePromotionCodeResponse.d.ts → CreatePromotionCodesResponse.d.ts} +1 -1
- package/dist/api/resources/promotionCodes/types/{DeletePromotionCodeResponse.d.ts → DeletePromotionCodesResponse.d.ts} +1 -1
- package/dist/api/resources/promotionCodes/types/{GetPromotionCodeResponse.d.ts → GetPromotionCodesResponse.d.ts} +1 -1
- package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestType.d.ts +5 -0
- package/dist/api/resources/promotionCodes/types/ListPromotionCodesRequestType.js +5 -0
- package/dist/api/resources/promotionCodes/types/{UpdatePromotionCodeResponse.d.ts → UpdatePromotionCodesResponse.d.ts} +1 -1
- package/dist/api/resources/promotionCodes/types/index.d.ts +5 -4
- package/dist/api/resources/promotionCodes/types/index.js +5 -4
- package/dist/api/resources/reports/client/Client.d.ts +10 -10
- package/dist/api/resources/reports/client/Client.js +11 -8
- package/dist/api/resources/reports/client/requests/{ReportsCustomerStatsRequest.d.ts → CustomerStatsReportsRequest.d.ts} +1 -1
- package/dist/api/resources/reports/client/requests/{ReportsLinksRequest.d.ts → LinksReportsRequest.d.ts} +4 -3
- package/dist/api/resources/reports/client/requests/{ReportsOverviewRequest.d.ts → OverviewReportsRequest.d.ts} +1 -1
- package/dist/api/resources/reports/client/requests/{ReportsPartnersRequest.d.ts → PartnersReportsRequest.d.ts} +4 -3
- package/dist/api/resources/reports/client/requests/{ReportsTimeseriesRequest.d.ts → TimeseriesReportsRequest.d.ts} +3 -2
- package/dist/api/resources/reports/client/requests/index.d.ts +5 -5
- package/dist/api/resources/reports/types/{ReportsCustomerStatsResponse.d.ts → CustomerStatsReportsResponse.d.ts} +1 -1
- package/dist/api/resources/reports/types/LinksReportsRequestOrder.d.ts +5 -0
- package/dist/api/resources/reports/types/{ReportsPartnersRequestOrder.js → LinksReportsRequestOrder.js} +1 -1
- package/dist/api/resources/reports/types/LinksReportsRequestSort.d.ts +7 -0
- package/dist/api/resources/reports/types/{ReportsLinksRequestSort.js → LinksReportsRequestSort.js} +1 -1
- package/dist/api/resources/reports/types/{ReportsLinksResponse.d.ts → LinksReportsResponse.d.ts} +1 -1
- package/dist/api/resources/reports/types/{ReportsOverviewResponse.d.ts → OverviewReportsResponse.d.ts} +1 -1
- package/dist/api/resources/reports/types/PartnersReportsRequestOrder.d.ts +5 -0
- package/dist/api/resources/reports/types/PartnersReportsRequestOrder.js +5 -0
- package/dist/api/resources/reports/types/PartnersReportsRequestSort.d.ts +7 -0
- package/dist/api/resources/reports/types/{ReportsPartnersRequestSort.js → PartnersReportsRequestSort.js} +1 -1
- package/dist/api/resources/reports/types/{ReportsPartnersResponse.d.ts → PartnersReportsResponse.d.ts} +1 -1
- package/dist/api/resources/reports/types/TimeseriesReportsRequestGranularity.d.ts +6 -0
- package/dist/api/resources/reports/types/{ReportsTimeseriesRequestGranularity.js → TimeseriesReportsRequestGranularity.js} +1 -1
- package/dist/api/resources/reports/types/{ReportsTimeseriesResponse.d.ts → TimeseriesReportsResponse.d.ts} +1 -1
- package/dist/api/resources/reports/types/index.d.ts +10 -10
- package/dist/api/resources/reports/types/index.js +10 -10
- package/dist/api/resources/transactions/client/Client.d.ts +31 -27
- package/dist/api/resources/transactions/client/Client.js +38 -34
- package/dist/api/resources/transactions/client/requests/{CreateTransactionRequest.d.ts → CreateTransactionsRequest.d.ts} +4 -1
- package/dist/api/resources/transactions/client/requests/DeleteTransactionsRequest.d.ts +9 -0
- package/dist/api/resources/transactions/client/requests/GetTransactionsRequest.d.ts +9 -0
- package/dist/api/resources/transactions/client/requests/RefundTransactionsRequest.d.ts +9 -0
- package/dist/api/resources/transactions/client/requests/RerunFlowsTransactionsRequest.d.ts +9 -0
- package/dist/api/resources/transactions/client/requests/{UpdateTransactionRequest.d.ts → UpdateTransactionsRequest.d.ts} +3 -1
- package/dist/api/resources/transactions/client/requests/index.d.ts +6 -6
- package/dist/api/resources/transactions/types/{CreateTransactionResponse.d.ts → CreateTransactionsResponse.d.ts} +1 -1
- package/dist/api/resources/transactions/types/{DeleteTransactionResponse.d.ts → DeleteTransactionsResponse.d.ts} +1 -1
- package/dist/api/resources/transactions/types/{GetTransactionResponse.d.ts → GetTransactionsResponse.d.ts} +1 -1
- package/dist/api/resources/transactions/types/{RefundTransactionResponse.d.ts → RefundTransactionsResponse.d.ts} +1 -1
- package/dist/api/resources/transactions/types/{RerunTransactionFlowsResponse.d.ts → RerunFlowsTransactionsResponse.d.ts} +1 -1
- package/dist/api/resources/transactions/types/UpdateTransactionsResponse.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/environments.d.ts +1 -1
- package/dist/environments.js +1 -1
- package/package.json +1 -1
- package/dist/api/resources/clicks/types/CreateClickRequest.d.ts +0 -1
- package/dist/api/resources/commissions/types/CreateCommissionRequest.d.ts +0 -1
- package/dist/api/resources/commissions/types/UpdateCommissionResponse.d.ts +0 -6
- package/dist/api/resources/customers/client/requests/CreateCustomerRequest.d.ts +0 -14
- package/dist/api/resources/customers/client/requests/UpdateCustomerRequest.d.ts +0 -18
- package/dist/api/resources/embed/client/requests/CreateEmbedTokenRequest.d.ts +0 -14
- package/dist/api/resources/links/client/requests/DeleteLinkRequest.d.ts +0 -9
- package/dist/api/resources/partners/client/requests/ApprovePartnerRequest.d.ts +0 -9
- package/dist/api/resources/partners/client/requests/CreatePartnerRequest.js +0 -8
- package/dist/api/resources/partners/client/requests/GetPartnerRequest.d.ts +0 -9
- package/dist/api/resources/programs/client/requests/GetProgramRequest.d.ts +0 -9
- package/dist/api/resources/promotionCodes/client/requests/CreatePromotionCodeRequest.d.ts +0 -13
- package/dist/api/resources/promotionCodes/client/requests/DeletePromotionCodeRequest.d.ts +0 -9
- package/dist/api/resources/promotionCodes/client/requests/GetPromotionCodeRequest.d.ts +0 -9
- package/dist/api/resources/promotionCodes/client/requests/UpdatePromotionCodeRequest.d.ts +0 -12
- package/dist/api/resources/reports/types/ReportsLinksRequestOrder.d.ts +0 -5
- package/dist/api/resources/reports/types/ReportsLinksRequestSort.d.ts +0 -7
- package/dist/api/resources/reports/types/ReportsPartnersRequestOrder.d.ts +0 -5
- package/dist/api/resources/reports/types/ReportsPartnersRequestSort.d.ts +0 -7
- package/dist/api/resources/reports/types/ReportsTimeseriesRequestGranularity.d.ts +0 -6
- package/dist/api/resources/transactions/client/requests/DeleteTransactionRequest.d.ts +0 -9
- package/dist/api/resources/transactions/client/requests/GetTransactionRequest.d.ts +0 -9
- package/dist/api/resources/transactions/client/requests/RefundTransactionRequest.d.ts +0 -9
- package/dist/api/resources/transactions/client/requests/RerunTransactionFlowsRequest.d.ts +0 -9
- package/dist/api/resources/transactions/types/UpdateTransactionResponse.d.ts +0 -6
- /package/dist/api/resources/clicks/client/requests/{GetClickRequest.js → GetClicksRequest.js} +0 -0
- /package/dist/api/resources/clicks/{types/CreateClickRequest.js → client/requests/ListClicksRequest.js} +0 -0
- /package/dist/api/resources/clicks/types/{CreateClickResponse.js → CreateClicksRequest.js} +0 -0
- /package/dist/api/resources/clicks/types/{GetClickResponse.js → CreateClicksResponse.js} +0 -0
- /package/dist/api/resources/{commissions/client/requests/ApproveCommissionRequest.js → clicks/types/GetClicksResponse.js} +0 -0
- /package/dist/api/resources/{commissions/client/requests/DeclineCommissionRequest.js → clicks/types/ListClicksResponse.js} +0 -0
- /package/dist/api/resources/commissions/client/requests/{DeleteCommissionRequest.js → ApproveCommissionsRequest.js} +0 -0
- /package/dist/api/resources/commissions/client/requests/{GetCommissionRequest.js → DeclineCommissionsRequest.js} +0 -0
- /package/dist/api/resources/commissions/client/requests/{UpdateCommissionRequest.js → DeleteCommissionsRequest.js} +0 -0
- /package/dist/api/resources/commissions/{types/ApproveCommissionResponse.js → client/requests/GetCommissionsRequest.js} +0 -0
- /package/dist/api/resources/commissions/{types/CreateCommissionRequest.js → client/requests/UpdateCommissionsRequest.js} +0 -0
- /package/dist/api/resources/commissions/types/{CreateCommissionResponse.js → ApproveCommissionsResponse.js} +0 -0
- /package/dist/api/resources/commissions/types/{DeclineCommissionResponse.js → CreateCommissionsRequest.js} +0 -0
- /package/dist/api/resources/commissions/types/{DeleteCommissionResponse.js → CreateCommissionsResponse.js} +0 -0
- /package/dist/api/resources/commissions/types/{GetCommissionResponse.js → DeclineCommissionsResponse.js} +0 -0
- /package/dist/api/resources/commissions/types/{UpdateCommissionResponse.js → DeleteCommissionsResponse.js} +0 -0
- /package/dist/api/resources/{customers/client/requests/CreateCustomerRequest.js → commissions/types/GetCommissionsResponse.js} +0 -0
- /package/dist/api/resources/{customers/client/requests/DeleteCustomerRequest.js → commissions/types/UpdateCommissionsResponse.js} +0 -0
- /package/dist/api/resources/customers/client/requests/{GetCustomerRequest.js → DeleteCustomersRequest.js} +0 -0
- /package/dist/api/resources/customers/client/requests/{UpdateCustomerRequest.js → GetCustomersRequest.js} +0 -0
- /package/dist/api/resources/customers/types/{CreateCustomerResponse.js → CreateCustomersResponse.js} +0 -0
- /package/dist/api/resources/customers/types/{DeleteCustomerResponse.js → DeleteCustomersResponse.js} +0 -0
- /package/dist/api/resources/customers/types/{GetCustomerResponse.js → GetCustomersResponse.js} +0 -0
- /package/dist/api/resources/customers/types/{UpdateCustomerResponse.js → UpdateCustomersResponse.js} +0 -0
- /package/dist/api/resources/embed/client/requests/{CreateEmbedTokenRequest.js → CreateTokenEmbedRequest.js} +0 -0
- /package/dist/api/resources/embed/types/{CreateEmbedTokenResponse.js → CreateTokenEmbedResponse.js} +0 -0
- /package/dist/api/resources/flows/client/requests/{GetFlowRequest.js → GetFlowsRequest.js} +0 -0
- /package/dist/api/resources/flows/types/{GetFlowResponse.js → GetFlowsResponse.js} +0 -0
- /package/dist/api/resources/groups/client/requests/{GetGroupRequest.js → GetGroupsRequest.js} +0 -0
- /package/dist/api/resources/groups/types/{GetGroupResponse.js → GetGroupsResponse.js} +0 -0
- /package/dist/api/resources/links/client/requests/{CreateLinkRequest.js → CreateLinksRequest.js} +0 -0
- /package/dist/api/resources/links/client/requests/{DeleteLinkRequest.js → DeleteLinksRequest.js} +0 -0
- /package/dist/api/resources/links/client/requests/{GetLinkRequest.js → GetByParamValueLinksRequest.js} +0 -0
- /package/dist/api/resources/links/client/requests/{UpdateLinkRequest.js → GetLinksRequest.js} +0 -0
- /package/dist/api/resources/links/{types/CreateLinkResponse.js → client/requests/UpdateLinksRequest.js} +0 -0
- /package/dist/api/resources/links/types/{DeleteLinkResponse.js → CreateLinksResponse.js} +0 -0
- /package/dist/api/resources/links/types/{GetLinkResponse.js → DeleteLinksResponse.js} +0 -0
- /package/dist/api/resources/links/types/{UpdateLinkResponse.js → GetByParamValueLinksResponse.js} +0 -0
- /package/dist/api/resources/{partners/client/requests/ApprovePartnerRequest.js → links/types/GetLinksResponse.js} +0 -0
- /package/dist/api/resources/{partners/client/requests/GetPartnerRequest.js → links/types/UpdateLinksResponse.js} +0 -0
- /package/dist/api/resources/partners/client/requests/{RejectPartnerRequest.js → ApprovePartnersRequest.js} +0 -0
- /package/dist/api/resources/partners/client/requests/{SuspendPartnerRequest.js → GetPartnersRequest.js} +0 -0
- /package/dist/api/resources/partners/client/requests/{UpdatePartnerRequest.js → RejectPartnersRequest.js} +0 -0
- /package/dist/api/resources/partners/{types/ApprovePartnerResponse.js → client/requests/SuspendPartnersRequest.js} +0 -0
- /package/dist/api/resources/partners/{types/CreatePartnerResponse.js → client/requests/UpdatePartnersRequest.js} +0 -0
- /package/dist/api/resources/partners/types/{GetPartnerResponse.js → ApprovePartnersResponse.js} +0 -0
- /package/dist/api/resources/partners/types/{RejectPartnerResponse.js → CreatePartnersResponse.js} +0 -0
- /package/dist/api/resources/partners/types/{SuspendPartnerResponse.js → GetPartnersResponse.js} +0 -0
- /package/dist/api/resources/partners/types/{UpdatePartnerResponse.js → RejectPartnersResponse.js} +0 -0
- /package/dist/api/resources/{programs/client/requests/GetProgramRequest.js → partners/types/SuspendPartnersResponse.js} +0 -0
- /package/dist/api/resources/{programs/types/GetProgramResponse.js → partners/types/UpdatePartnersResponse.js} +0 -0
- /package/dist/api/resources/{promotionCodes/client/requests/CreatePromotionCodeRequest.js → programs/client/requests/GetProgramsRequest.js} +0 -0
- /package/dist/api/resources/{promotionCodes/client/requests/DeletePromotionCodeRequest.js → programs/types/GetProgramsResponse.js} +0 -0
- /package/dist/api/resources/promotionCodes/client/requests/{GetPromotionCodeRequest.js → DeletePromotionCodesRequest.js} +0 -0
- /package/dist/api/resources/promotionCodes/client/requests/{UpdatePromotionCodeRequest.js → GetPromotionCodesRequest.js} +0 -0
- /package/dist/api/resources/promotionCodes/types/{CreatePromotionCodeResponse.js → CreatePromotionCodesResponse.js} +0 -0
- /package/dist/api/resources/promotionCodes/types/{DeletePromotionCodeResponse.js → DeletePromotionCodesResponse.js} +0 -0
- /package/dist/api/resources/promotionCodes/types/{GetPromotionCodeResponse.js → GetPromotionCodesResponse.js} +0 -0
- /package/dist/api/resources/promotionCodes/types/{UpdatePromotionCodeResponse.js → UpdatePromotionCodesResponse.js} +0 -0
- /package/dist/api/resources/reports/client/requests/{ReportsCustomerStatsRequest.js → CustomerStatsReportsRequest.js} +0 -0
- /package/dist/api/resources/reports/client/requests/{ReportsLinksRequest.js → LinksReportsRequest.js} +0 -0
- /package/dist/api/resources/reports/client/requests/{ReportsOverviewRequest.js → OverviewReportsRequest.js} +0 -0
- /package/dist/api/resources/reports/client/requests/{ReportsPartnersRequest.js → PartnersReportsRequest.js} +0 -0
- /package/dist/api/resources/reports/client/requests/{ReportsTimeseriesRequest.js → TimeseriesReportsRequest.js} +0 -0
- /package/dist/api/resources/reports/types/{ReportsCustomerStatsResponse.js → CustomerStatsReportsResponse.js} +0 -0
- /package/dist/api/resources/reports/types/{ReportsLinksResponse.js → LinksReportsResponse.js} +0 -0
- /package/dist/api/resources/reports/types/{ReportsOverviewResponse.js → OverviewReportsResponse.js} +0 -0
- /package/dist/api/resources/reports/types/{ReportsPartnersResponse.js → PartnersReportsResponse.js} +0 -0
- /package/dist/api/resources/reports/types/{ReportsTimeseriesResponse.js → TimeseriesReportsResponse.js} +0 -0
- /package/dist/api/resources/transactions/client/requests/{CreateTransactionRequest.js → CreateTransactionsRequest.js} +0 -0
- /package/dist/api/resources/transactions/client/requests/{DeleteTransactionRequest.js → DeleteTransactionsRequest.js} +0 -0
- /package/dist/api/resources/transactions/client/requests/{GetTransactionRequest.js → GetTransactionsRequest.js} +0 -0
- /package/dist/api/resources/transactions/client/requests/{RefundTransactionRequest.js → RefundTransactionsRequest.js} +0 -0
- /package/dist/api/resources/transactions/client/requests/{RerunTransactionFlowsRequest.js → RerunFlowsTransactionsRequest.js} +0 -0
- /package/dist/api/resources/transactions/client/requests/{UpdateTransactionRequest.js → UpdateTransactionsRequest.js} +0 -0
- /package/dist/api/resources/transactions/types/{CreateTransactionResponse.js → CreateTransactionsResponse.js} +0 -0
- /package/dist/api/resources/transactions/types/{DeleteTransactionResponse.js → DeleteTransactionsResponse.js} +0 -0
- /package/dist/api/resources/transactions/types/{GetTransactionResponse.js → GetTransactionsResponse.js} +0 -0
- /package/dist/api/resources/transactions/types/{RefundTransactionResponse.js → RefundTransactionsResponse.js} +0 -0
- /package/dist/api/resources/transactions/types/{RerunTransactionFlowsResponse.js → RerunFlowsTransactionsResponse.js} +0 -0
- /package/dist/api/resources/transactions/types/{UpdateTransactionResponse.js → UpdateTransactionsResponse.js} +0 -0
|
@@ -21,12 +21,12 @@ export class GroupsClient {
|
|
|
21
21
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
22
22
|
*
|
|
23
23
|
* @example
|
|
24
|
-
* await client.groups.
|
|
24
|
+
* await client.groups.list()
|
|
25
25
|
*/
|
|
26
|
-
|
|
27
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
26
|
+
list(request = {}, requestOptions) {
|
|
27
|
+
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
28
28
|
}
|
|
29
|
-
async
|
|
29
|
+
async __list(request = {}, requestOptions) {
|
|
30
30
|
const { limit, order, sort, starting_after: startingAfter, ending_before: endingBefore, created_after: createdAfter, created_before: createdBefore, updated_after: updatedAfter, updated_before: updatedBefore, program_id: programId, search, default: default_, } = request;
|
|
31
31
|
const _queryParams = {
|
|
32
32
|
limit,
|
|
@@ -83,7 +83,7 @@ export class GroupsClient {
|
|
|
83
83
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/groups");
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
86
|
-
* @param {ToltApi.
|
|
86
|
+
* @param {ToltApi.GetGroupsRequest} request
|
|
87
87
|
* @param {GroupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
88
88
|
*
|
|
89
89
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
@@ -93,14 +93,14 @@ export class GroupsClient {
|
|
|
93
93
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
94
94
|
*
|
|
95
95
|
* @example
|
|
96
|
-
* await client.groups.
|
|
96
|
+
* await client.groups.get({
|
|
97
97
|
* id: "id"
|
|
98
98
|
* })
|
|
99
99
|
*/
|
|
100
|
-
|
|
101
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
100
|
+
get(request, requestOptions) {
|
|
101
|
+
return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
|
|
102
102
|
}
|
|
103
|
-
async
|
|
103
|
+
async __get(request, requestOptions) {
|
|
104
104
|
const { id } = request;
|
|
105
105
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
106
106
|
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type { GetGroupsRequest } from "./GetGroupsRequest.js";
|
|
2
2
|
export type { ListGroupsRequest } from "./ListGroupsRequest.js";
|
|
@@ -11,6 +11,8 @@ export declare class LinksClient {
|
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<LinksClient.Options>;
|
|
12
12
|
constructor(options: LinksClient.Options);
|
|
13
13
|
/**
|
|
14
|
+
* Lists ordinary links. Campaign-managed links are excluded.
|
|
15
|
+
*
|
|
14
16
|
* @param {ToltApi.ListLinksRequest} request
|
|
15
17
|
* @param {LinksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
16
18
|
*
|
|
@@ -21,12 +23,12 @@ export declare class LinksClient {
|
|
|
21
23
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
22
24
|
*
|
|
23
25
|
* @example
|
|
24
|
-
* await client.links.
|
|
26
|
+
* await client.links.list()
|
|
25
27
|
*/
|
|
26
|
-
|
|
27
|
-
private
|
|
28
|
+
list(request?: ToltApi.ListLinksRequest, requestOptions?: LinksClient.RequestOptions): core.HttpResponsePromise<ToltApi.ListLinksResponse>;
|
|
29
|
+
private __list;
|
|
28
30
|
/**
|
|
29
|
-
* @param {ToltApi.
|
|
31
|
+
* @param {ToltApi.CreateLinksRequest} request
|
|
30
32
|
* @param {LinksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
31
33
|
*
|
|
32
34
|
* @throws {@link ToltApi.BadRequestError}
|
|
@@ -36,17 +38,20 @@ export declare class LinksClient {
|
|
|
36
38
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
37
39
|
*
|
|
38
40
|
* @example
|
|
39
|
-
* await client.links.
|
|
41
|
+
* await client.links.create({
|
|
40
42
|
* value: "value",
|
|
41
43
|
* partner_id: "partner_id"
|
|
42
44
|
* })
|
|
43
45
|
*/
|
|
44
|
-
|
|
45
|
-
private
|
|
46
|
+
create(request: ToltApi.CreateLinksRequest, requestOptions?: LinksClient.RequestOptions): core.HttpResponsePromise<ToltApi.CreateLinksResponse>;
|
|
47
|
+
private __create;
|
|
46
48
|
/**
|
|
47
|
-
*
|
|
49
|
+
* Looks up a single link by its parameter and value (value matched case-insensitively). Returns 404 when none matches.
|
|
50
|
+
*
|
|
51
|
+
* @param {ToltApi.GetByParamValueLinksRequest} request
|
|
48
52
|
* @param {LinksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
49
53
|
*
|
|
54
|
+
* @throws {@link ToltApi.BadRequestError}
|
|
50
55
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
51
56
|
* @throws {@link ToltApi.NotFoundError}
|
|
52
57
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
@@ -54,14 +59,36 @@ export declare class LinksClient {
|
|
|
54
59
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
55
60
|
*
|
|
56
61
|
* @example
|
|
57
|
-
* await client.links.
|
|
62
|
+
* await client.links.getByParamValue({
|
|
63
|
+
* param: "ref",
|
|
64
|
+
* value: "sam"
|
|
65
|
+
* })
|
|
66
|
+
*/
|
|
67
|
+
getByParamValue(request: ToltApi.GetByParamValueLinksRequest, requestOptions?: LinksClient.RequestOptions): core.HttpResponsePromise<ToltApi.GetByParamValueLinksResponse>;
|
|
68
|
+
private __getByParamValue;
|
|
69
|
+
/**
|
|
70
|
+
* Gets an ordinary or campaign-managed link by ID.
|
|
71
|
+
*
|
|
72
|
+
* @param {ToltApi.GetLinksRequest} request
|
|
73
|
+
* @param {LinksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link ToltApi.UnauthorizedError}
|
|
76
|
+
* @throws {@link ToltApi.NotFoundError}
|
|
77
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
78
|
+
* @throws {@link errors.ToltApiError}
|
|
79
|
+
* @throws {@link errors.ToltApiTimeoutError}
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* await client.links.get({
|
|
58
83
|
* id: "id"
|
|
59
84
|
* })
|
|
60
85
|
*/
|
|
61
|
-
|
|
62
|
-
private
|
|
86
|
+
get(request: ToltApi.GetLinksRequest, requestOptions?: LinksClient.RequestOptions): core.HttpResponsePromise<ToltApi.GetLinksResponse>;
|
|
87
|
+
private __get;
|
|
63
88
|
/**
|
|
64
|
-
*
|
|
89
|
+
* Updates an ordinary link. Campaign-managed links must be changed through campaigns.
|
|
90
|
+
*
|
|
91
|
+
* @param {ToltApi.UpdateLinksRequest} request
|
|
65
92
|
* @param {LinksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
93
|
*
|
|
67
94
|
* @throws {@link ToltApi.BadRequestError}
|
|
@@ -72,16 +99,19 @@ export declare class LinksClient {
|
|
|
72
99
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
73
100
|
*
|
|
74
101
|
* @example
|
|
75
|
-
* await client.links.
|
|
102
|
+
* await client.links.update({
|
|
76
103
|
* id: "id"
|
|
77
104
|
* })
|
|
78
105
|
*/
|
|
79
|
-
|
|
80
|
-
private
|
|
106
|
+
update(request: ToltApi.UpdateLinksRequest, requestOptions?: LinksClient.RequestOptions): core.HttpResponsePromise<ToltApi.UpdateLinksResponse>;
|
|
107
|
+
private __update;
|
|
81
108
|
/**
|
|
82
|
-
*
|
|
109
|
+
* Deletes an ordinary link. Campaign-managed links must be changed through campaigns.
|
|
110
|
+
*
|
|
111
|
+
* @param {ToltApi.DeleteLinksRequest} request
|
|
83
112
|
* @param {LinksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
84
113
|
*
|
|
114
|
+
* @throws {@link ToltApi.BadRequestError}
|
|
85
115
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
86
116
|
* @throws {@link ToltApi.NotFoundError}
|
|
87
117
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
@@ -89,10 +119,10 @@ export declare class LinksClient {
|
|
|
89
119
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
90
120
|
*
|
|
91
121
|
* @example
|
|
92
|
-
* await client.links.
|
|
122
|
+
* await client.links.delete({
|
|
93
123
|
* id: "id"
|
|
94
124
|
* })
|
|
95
125
|
*/
|
|
96
|
-
|
|
97
|
-
private
|
|
126
|
+
delete(request: ToltApi.DeleteLinksRequest, requestOptions?: LinksClient.RequestOptions): core.HttpResponsePromise<ToltApi.DeleteLinksResponse>;
|
|
127
|
+
private __delete;
|
|
98
128
|
}
|
|
@@ -12,6 +12,8 @@ export class LinksClient {
|
|
|
12
12
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
+
* Lists ordinary links. Campaign-managed links are excluded.
|
|
16
|
+
*
|
|
15
17
|
* @param {ToltApi.ListLinksRequest} request
|
|
16
18
|
* @param {LinksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
17
19
|
*
|
|
@@ -22,13 +24,13 @@ export class LinksClient {
|
|
|
22
24
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
23
25
|
*
|
|
24
26
|
* @example
|
|
25
|
-
* await client.links.
|
|
27
|
+
* await client.links.list()
|
|
26
28
|
*/
|
|
27
|
-
|
|
28
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
29
|
+
list(request = {}, requestOptions) {
|
|
30
|
+
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
29
31
|
}
|
|
30
|
-
async
|
|
31
|
-
const { limit, order, sort, starting_after: startingAfter, ending_before: endingBefore, created_after: createdAfter, created_before: createdBefore, updated_after: updatedAfter, updated_before: updatedBefore, program_id: programId, partner_id: partnerId, search, } = request;
|
|
32
|
+
async __list(request = {}, requestOptions) {
|
|
33
|
+
const { limit, order, sort, starting_after: startingAfter, ending_before: endingBefore, created_after: createdAfter, created_before: createdBefore, updated_after: updatedAfter, updated_before: updatedBefore, program_id: programId, partner_id: partnerId, param, value, search, } = request;
|
|
32
34
|
const _queryParams = {
|
|
33
35
|
limit,
|
|
34
36
|
order: order != null ? order : undefined,
|
|
@@ -41,6 +43,8 @@ export class LinksClient {
|
|
|
41
43
|
updated_before: updatedBefore != null ? updatedBefore : undefined,
|
|
42
44
|
program_id: programId,
|
|
43
45
|
partner_id: partnerId,
|
|
46
|
+
param,
|
|
47
|
+
value,
|
|
44
48
|
search,
|
|
45
49
|
};
|
|
46
50
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
@@ -84,7 +88,7 @@ export class LinksClient {
|
|
|
84
88
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/links");
|
|
85
89
|
}
|
|
86
90
|
/**
|
|
87
|
-
* @param {ToltApi.
|
|
91
|
+
* @param {ToltApi.CreateLinksRequest} request
|
|
88
92
|
* @param {LinksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
89
93
|
*
|
|
90
94
|
* @throws {@link ToltApi.BadRequestError}
|
|
@@ -94,15 +98,15 @@ export class LinksClient {
|
|
|
94
98
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
95
99
|
*
|
|
96
100
|
* @example
|
|
97
|
-
* await client.links.
|
|
101
|
+
* await client.links.create({
|
|
98
102
|
* value: "value",
|
|
99
103
|
* partner_id: "partner_id"
|
|
100
104
|
* })
|
|
101
105
|
*/
|
|
102
|
-
|
|
103
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
106
|
+
create(request, requestOptions) {
|
|
107
|
+
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
104
108
|
}
|
|
105
|
-
async
|
|
109
|
+
async __create(request, requestOptions) {
|
|
106
110
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
107
111
|
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
108
112
|
const _response = await core.fetcher({
|
|
@@ -143,7 +147,79 @@ export class LinksClient {
|
|
|
143
147
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/links");
|
|
144
148
|
}
|
|
145
149
|
/**
|
|
146
|
-
*
|
|
150
|
+
* Looks up a single link by its parameter and value (value matched case-insensitively). Returns 404 when none matches.
|
|
151
|
+
*
|
|
152
|
+
* @param {ToltApi.GetByParamValueLinksRequest} request
|
|
153
|
+
* @param {LinksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
154
|
+
*
|
|
155
|
+
* @throws {@link ToltApi.BadRequestError}
|
|
156
|
+
* @throws {@link ToltApi.UnauthorizedError}
|
|
157
|
+
* @throws {@link ToltApi.NotFoundError}
|
|
158
|
+
* @throws {@link ToltApi.TooManyRequestsError}
|
|
159
|
+
* @throws {@link errors.ToltApiError}
|
|
160
|
+
* @throws {@link errors.ToltApiTimeoutError}
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* await client.links.getByParamValue({
|
|
164
|
+
* param: "ref",
|
|
165
|
+
* value: "sam"
|
|
166
|
+
* })
|
|
167
|
+
*/
|
|
168
|
+
getByParamValue(request, requestOptions) {
|
|
169
|
+
return core.HttpResponsePromise.fromPromise(this.__getByParamValue(request, requestOptions));
|
|
170
|
+
}
|
|
171
|
+
async __getByParamValue(request, requestOptions) {
|
|
172
|
+
const { param, value } = request;
|
|
173
|
+
const _queryParams = {
|
|
174
|
+
param,
|
|
175
|
+
value,
|
|
176
|
+
};
|
|
177
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
178
|
+
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
179
|
+
const _response = await core.fetcher({
|
|
180
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
181
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
182
|
+
environments.ToltApiEnvironment.Production, "v2/links/by-param-value"),
|
|
183
|
+
method: "GET",
|
|
184
|
+
headers: _headers,
|
|
185
|
+
queryString: core.url
|
|
186
|
+
.queryBuilder()
|
|
187
|
+
.addMany(_queryParams)
|
|
188
|
+
.mergeAdditional(requestOptions?.queryParams)
|
|
189
|
+
.build(),
|
|
190
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
191
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
192
|
+
abortSignal: requestOptions?.abortSignal,
|
|
193
|
+
fetchFn: this._options?.fetch,
|
|
194
|
+
logging: this._options.logging,
|
|
195
|
+
});
|
|
196
|
+
if (_response.ok) {
|
|
197
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
198
|
+
}
|
|
199
|
+
if (_response.error.reason === "status-code") {
|
|
200
|
+
switch (_response.error.statusCode) {
|
|
201
|
+
case 400:
|
|
202
|
+
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
203
|
+
case 401:
|
|
204
|
+
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
205
|
+
case 404:
|
|
206
|
+
throw new ToltApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
207
|
+
case 429:
|
|
208
|
+
throw new ToltApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
209
|
+
default:
|
|
210
|
+
throw new errors.ToltApiError({
|
|
211
|
+
statusCode: _response.error.statusCode,
|
|
212
|
+
body: _response.error.body,
|
|
213
|
+
rawResponse: _response.rawResponse,
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/links/by-param-value");
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Gets an ordinary or campaign-managed link by ID.
|
|
221
|
+
*
|
|
222
|
+
* @param {ToltApi.GetLinksRequest} request
|
|
147
223
|
* @param {LinksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
148
224
|
*
|
|
149
225
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
@@ -153,14 +229,14 @@ export class LinksClient {
|
|
|
153
229
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
154
230
|
*
|
|
155
231
|
* @example
|
|
156
|
-
* await client.links.
|
|
232
|
+
* await client.links.get({
|
|
157
233
|
* id: "id"
|
|
158
234
|
* })
|
|
159
235
|
*/
|
|
160
|
-
|
|
161
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
236
|
+
get(request, requestOptions) {
|
|
237
|
+
return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
|
|
162
238
|
}
|
|
163
|
-
async
|
|
239
|
+
async __get(request, requestOptions) {
|
|
164
240
|
const { id } = request;
|
|
165
241
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
166
242
|
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
@@ -199,7 +275,9 @@ export class LinksClient {
|
|
|
199
275
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/links/{id}");
|
|
200
276
|
}
|
|
201
277
|
/**
|
|
202
|
-
*
|
|
278
|
+
* Updates an ordinary link. Campaign-managed links must be changed through campaigns.
|
|
279
|
+
*
|
|
280
|
+
* @param {ToltApi.UpdateLinksRequest} request
|
|
203
281
|
* @param {LinksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
204
282
|
*
|
|
205
283
|
* @throws {@link ToltApi.BadRequestError}
|
|
@@ -210,14 +288,14 @@ export class LinksClient {
|
|
|
210
288
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
211
289
|
*
|
|
212
290
|
* @example
|
|
213
|
-
* await client.links.
|
|
291
|
+
* await client.links.update({
|
|
214
292
|
* id: "id"
|
|
215
293
|
* })
|
|
216
294
|
*/
|
|
217
|
-
|
|
218
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
295
|
+
update(request, requestOptions) {
|
|
296
|
+
return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));
|
|
219
297
|
}
|
|
220
|
-
async
|
|
298
|
+
async __update(request, requestOptions) {
|
|
221
299
|
const { id, ..._body } = request;
|
|
222
300
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
223
301
|
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
@@ -261,9 +339,12 @@ export class LinksClient {
|
|
|
261
339
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/v2/links/{id}");
|
|
262
340
|
}
|
|
263
341
|
/**
|
|
264
|
-
*
|
|
342
|
+
* Deletes an ordinary link. Campaign-managed links must be changed through campaigns.
|
|
343
|
+
*
|
|
344
|
+
* @param {ToltApi.DeleteLinksRequest} request
|
|
265
345
|
* @param {LinksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
266
346
|
*
|
|
347
|
+
* @throws {@link ToltApi.BadRequestError}
|
|
267
348
|
* @throws {@link ToltApi.UnauthorizedError}
|
|
268
349
|
* @throws {@link ToltApi.NotFoundError}
|
|
269
350
|
* @throws {@link ToltApi.TooManyRequestsError}
|
|
@@ -271,14 +352,14 @@ export class LinksClient {
|
|
|
271
352
|
* @throws {@link errors.ToltApiTimeoutError}
|
|
272
353
|
*
|
|
273
354
|
* @example
|
|
274
|
-
* await client.links.
|
|
355
|
+
* await client.links.delete({
|
|
275
356
|
* id: "id"
|
|
276
357
|
* })
|
|
277
358
|
*/
|
|
278
|
-
|
|
279
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
359
|
+
delete(request, requestOptions) {
|
|
360
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));
|
|
280
361
|
}
|
|
281
|
-
async
|
|
362
|
+
async __delete(request, requestOptions) {
|
|
282
363
|
const { id } = request;
|
|
283
364
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
284
365
|
const _headers = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
@@ -300,6 +381,8 @@ export class LinksClient {
|
|
|
300
381
|
}
|
|
301
382
|
if (_response.error.reason === "status-code") {
|
|
302
383
|
switch (_response.error.statusCode) {
|
|
384
|
+
case 400:
|
|
385
|
+
throw new ToltApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
303
386
|
case 401:
|
|
304
387
|
throw new ToltApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
305
388
|
case 404:
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export type {
|
|
3
|
-
export type {
|
|
1
|
+
export type { CreateLinksRequest } from "./CreateLinksRequest.js";
|
|
2
|
+
export type { DeleteLinksRequest } from "./DeleteLinksRequest.js";
|
|
3
|
+
export type { GetByParamValueLinksRequest } from "./GetByParamValueLinksRequest.js";
|
|
4
|
+
export type { GetLinksRequest } from "./GetLinksRequest.js";
|
|
4
5
|
export type { ListLinksRequest } from "./ListLinksRequest.js";
|
|
5
|
-
export type {
|
|
6
|
+
export type { UpdateLinksRequest } from "./UpdateLinksRequest.js";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
1
|
+
export * from "./CreateLinksResponse.js";
|
|
2
|
+
export * from "./DeleteLinksResponse.js";
|
|
3
|
+
export * from "./GetByParamValueLinksResponse.js";
|
|
4
|
+
export * from "./GetLinksResponse.js";
|
|
4
5
|
export * from "./ListLinksRequestOrder.js";
|
|
5
6
|
export * from "./ListLinksRequestSort.js";
|
|
6
7
|
export * from "./ListLinksResponse.js";
|
|
7
|
-
export * from "./
|
|
8
|
+
export * from "./UpdateLinksResponse.js";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
1
|
+
export * from "./CreateLinksResponse.js";
|
|
2
|
+
export * from "./DeleteLinksResponse.js";
|
|
3
|
+
export * from "./GetByParamValueLinksResponse.js";
|
|
4
|
+
export * from "./GetLinksResponse.js";
|
|
4
5
|
export * from "./ListLinksRequestOrder.js";
|
|
5
6
|
export * from "./ListLinksRequestSort.js";
|
|
6
7
|
export * from "./ListLinksResponse.js";
|
|
7
|
-
export * from "./
|
|
8
|
+
export * from "./UpdateLinksResponse.js";
|