@kard-financial/sdk 14.0.0 → 14.2.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/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +11 -6
- package/dist/cjs/api/resources/index.d.ts +4 -0
- package/dist/cjs/api/resources/index.js +5 -1
- package/dist/cjs/api/resources/internalOrganizations/exports.d.ts +1 -0
- package/dist/cjs/api/resources/internalOrganizations/exports.js +18 -0
- package/dist/cjs/api/resources/internalOrganizations/index.d.ts +1 -0
- package/dist/cjs/api/resources/internalOrganizations/index.js +17 -0
- package/dist/cjs/api/resources/internalOrganizations/types/DeleteResourceData.d.ts +11 -0
- package/dist/cjs/api/resources/internalOrganizations/types/DeleteResourceData.js +3 -0
- package/dist/cjs/api/resources/internalOrganizations/types/DeleteResourceResponse.d.ts +7 -0
- package/dist/cjs/api/resources/internalOrganizations/types/DeleteResourceResponse.js +3 -0
- package/dist/cjs/api/resources/internalOrganizations/types/EnrolledReward.d.ts +6 -0
- package/dist/cjs/api/resources/internalOrganizations/types/EnrolledReward.js +9 -0
- package/dist/cjs/api/resources/internalOrganizations/types/MerchantNetwork.d.ts +10 -0
- package/dist/cjs/api/resources/internalOrganizations/types/MerchantNetwork.js +3 -0
- package/dist/cjs/api/resources/internalOrganizations/types/MerchantNetworkName.d.ts +11 -0
- package/dist/cjs/api/resources/internalOrganizations/types/MerchantNetworkName.js +14 -0
- package/dist/cjs/api/resources/internalOrganizations/types/OrganizationPaginationMetadata.d.ts +9 -0
- package/dist/cjs/api/resources/internalOrganizations/types/OrganizationPaginationMetadata.js +3 -0
- package/dist/cjs/api/resources/internalOrganizations/types/index.d.ts +6 -0
- package/dist/cjs/api/resources/internalOrganizations/types/index.js +22 -0
- package/dist/cjs/api/resources/organizations/client/Client.d.ts +35 -0
- package/dist/cjs/api/resources/organizations/client/Client.js +126 -0
- package/dist/cjs/api/resources/organizations/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/organizations/client/index.js +2 -0
- package/dist/cjs/api/resources/organizations/exports.d.ts +3 -0
- package/dist/cjs/api/resources/organizations/exports.js +22 -0
- package/dist/cjs/api/resources/organizations/index.d.ts +3 -0
- package/dist/cjs/api/resources/organizations/index.js +19 -0
- package/dist/cjs/api/resources/organizations/resources/children/client/Client.d.ts +113 -0
- package/dist/cjs/api/resources/organizations/resources/children/client/Client.js +382 -0
- package/dist/cjs/api/resources/organizations/resources/children/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/organizations/resources/children/client/index.js +17 -0
- package/dist/cjs/api/resources/organizations/resources/children/client/requests/ListChildrenRequest.d.ts +10 -0
- package/dist/cjs/api/resources/organizations/resources/children/client/requests/ListChildrenRequest.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/children/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/organizations/resources/children/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/organizations/resources/children/exports.d.ts +2 -0
- package/dist/cjs/api/resources/organizations/resources/children/exports.js +21 -0
- package/dist/cjs/api/resources/organizations/resources/children/index.d.ts +2 -0
- package/dist/cjs/api/resources/organizations/resources/children/index.js +18 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/ChildOrganizationListResponse.d.ts +11 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/ChildOrganizationListResponse.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/CreateChildAttributes.d.ts +18 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/CreateChildAttributes.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/CreateChildRequestBody.d.ts +8 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/CreateChildRequestBody.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/CreateChildRequestData.d.ts +10 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/CreateChildRequestData.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/UpdateChildAttributes.d.ts +21 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/UpdateChildAttributes.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/UpdateChildRequestBody.d.ts +8 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/UpdateChildRequestBody.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/UpdateChildRequestData.d.ts +10 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/UpdateChildRequestData.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/index.d.ts +7 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/index.js +23 -0
- package/dist/cjs/api/resources/organizations/resources/index.d.ts +6 -0
- package/dist/cjs/api/resources/organizations/resources/index.js +45 -0
- package/dist/cjs/api/resources/organizations/resources/placements/client/Client.d.ts +131 -0
- package/dist/cjs/api/resources/organizations/resources/placements/client/Client.js +409 -0
- package/dist/cjs/api/resources/organizations/resources/placements/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/organizations/resources/placements/client/index.js +17 -0
- package/dist/cjs/api/resources/organizations/resources/placements/client/requests/ListPlacementsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/organizations/resources/placements/client/requests/ListPlacementsRequest.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/organizations/resources/placements/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/organizations/resources/placements/exports.d.ts +2 -0
- package/dist/cjs/api/resources/organizations/resources/placements/exports.js +21 -0
- package/dist/cjs/api/resources/organizations/resources/placements/index.d.ts +2 -0
- package/dist/cjs/api/resources/organizations/resources/placements/index.js +18 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/Cadence.d.ts +14 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/Cadence.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CadenceFrequency.d.ts +7 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CadenceFrequency.js +10 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreateMainPageAttributes.d.ts +15 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreateMainPageAttributes.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreateMainPagePlacementData.d.ts +8 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreateMainPagePlacementData.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePlacementDataUnion.d.ts +13 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePlacementDataUnion.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePlacementRequestBody.d.ts +33 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePlacementRequestBody.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePushNotificationAttributes.d.ts +19 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePushNotificationAttributes.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePushNotificationPlacementData.d.ts +8 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/CreatePushNotificationPlacementData.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/DayOfWeek.d.ts +11 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/DayOfWeek.js +14 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/MainPagePlacementAttributes.d.ts +15 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/MainPagePlacementAttributes.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/MainPagePlacementData.d.ts +9 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/MainPagePlacementData.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementFormatUnion.d.ts +42 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementFormatUnion.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementListResponse.d.ts +11 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/PlacementListResponse.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/PushNotificationPlacementAttributes.d.ts +16 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/PushNotificationPlacementAttributes.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/PushNotificationPlacementData.d.ts +9 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/PushNotificationPlacementData.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateMainPageAttributes.d.ts +15 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateMainPageAttributes.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateMainPagePlacementData.d.ts +8 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdateMainPagePlacementData.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePlacementDataUnion.d.ts +13 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePlacementDataUnion.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePlacementRequestBody.d.ts +8 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePlacementRequestBody.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePushNotificationAttributes.d.ts +20 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePushNotificationAttributes.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePushNotificationPlacementData.d.ts +8 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/UpdatePushNotificationPlacementData.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/index.d.ts +21 -0
- package/dist/cjs/api/resources/organizations/resources/placements/types/index.js +37 -0
- package/dist/cjs/api/resources/organizations/types/ExternalOrganizationAttributes.d.ts +30 -0
- package/dist/cjs/api/resources/organizations/types/ExternalOrganizationAttributes.js +3 -0
- package/dist/cjs/api/resources/organizations/types/ExternalOrganizationResponse.d.ts +10 -0
- package/dist/cjs/api/resources/organizations/types/ExternalOrganizationResponse.js +3 -0
- package/dist/cjs/api/resources/organizations/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/organizations/types/index.js +18 -0
- package/dist/cjs/api/resources/users/resources/rewards/client/Client.d.ts +21 -0
- package/dist/cjs/api/resources/users/resources/rewards/client/Client.js +75 -0
- package/dist/cjs/api/resources/users/resources/rewards/client/requests/GetOffersByPlacementRequest.d.ts +16 -0
- package/dist/cjs/api/resources/users/resources/rewards/client/requests/GetOffersByPlacementRequest.js +3 -0
- package/dist/cjs/api/resources/users/resources/rewards/client/requests/index.d.ts +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +5 -0
- package/dist/esm/api/resources/index.d.mts +4 -0
- package/dist/esm/api/resources/index.mjs +4 -0
- package/dist/esm/api/resources/internalOrganizations/exports.d.mts +1 -0
- package/dist/esm/api/resources/internalOrganizations/exports.mjs +2 -0
- package/dist/esm/api/resources/internalOrganizations/index.d.mts +1 -0
- package/dist/esm/api/resources/internalOrganizations/index.mjs +1 -0
- package/dist/esm/api/resources/internalOrganizations/types/DeleteResourceData.d.mts +11 -0
- package/dist/esm/api/resources/internalOrganizations/types/DeleteResourceData.mjs +2 -0
- package/dist/esm/api/resources/internalOrganizations/types/DeleteResourceResponse.d.mts +7 -0
- package/dist/esm/api/resources/internalOrganizations/types/DeleteResourceResponse.mjs +2 -0
- package/dist/esm/api/resources/internalOrganizations/types/EnrolledReward.d.mts +6 -0
- package/dist/esm/api/resources/internalOrganizations/types/EnrolledReward.mjs +6 -0
- package/dist/esm/api/resources/internalOrganizations/types/MerchantNetwork.d.mts +10 -0
- package/dist/esm/api/resources/internalOrganizations/types/MerchantNetwork.mjs +2 -0
- package/dist/esm/api/resources/internalOrganizations/types/MerchantNetworkName.d.mts +11 -0
- package/dist/esm/api/resources/internalOrganizations/types/MerchantNetworkName.mjs +11 -0
- package/dist/esm/api/resources/internalOrganizations/types/OrganizationPaginationMetadata.d.mts +9 -0
- package/dist/esm/api/resources/internalOrganizations/types/OrganizationPaginationMetadata.mjs +2 -0
- package/dist/esm/api/resources/internalOrganizations/types/index.d.mts +6 -0
- package/dist/esm/api/resources/internalOrganizations/types/index.mjs +6 -0
- package/dist/esm/api/resources/organizations/client/Client.d.mts +35 -0
- package/dist/esm/api/resources/organizations/client/Client.mjs +89 -0
- package/dist/esm/api/resources/organizations/client/index.d.mts +1 -0
- package/dist/esm/api/resources/organizations/client/index.mjs +1 -0
- package/dist/esm/api/resources/organizations/exports.d.mts +3 -0
- package/dist/esm/api/resources/organizations/exports.mjs +4 -0
- package/dist/esm/api/resources/organizations/index.d.mts +3 -0
- package/dist/esm/api/resources/organizations/index.mjs +3 -0
- package/dist/esm/api/resources/organizations/resources/children/client/Client.d.mts +113 -0
- package/dist/esm/api/resources/organizations/resources/children/client/Client.mjs +345 -0
- package/dist/esm/api/resources/organizations/resources/children/client/index.d.mts +1 -0
- package/dist/esm/api/resources/organizations/resources/children/client/index.mjs +1 -0
- package/dist/esm/api/resources/organizations/resources/children/client/requests/ListChildrenRequest.d.mts +10 -0
- package/dist/esm/api/resources/organizations/resources/children/client/requests/ListChildrenRequest.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/children/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/organizations/resources/children/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/organizations/resources/children/exports.d.mts +2 -0
- package/dist/esm/api/resources/organizations/resources/children/exports.mjs +3 -0
- package/dist/esm/api/resources/organizations/resources/children/index.d.mts +2 -0
- package/dist/esm/api/resources/organizations/resources/children/index.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/children/types/ChildOrganizationListResponse.d.mts +11 -0
- package/dist/esm/api/resources/organizations/resources/children/types/ChildOrganizationListResponse.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/children/types/CreateChildAttributes.d.mts +18 -0
- package/dist/esm/api/resources/organizations/resources/children/types/CreateChildAttributes.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/children/types/CreateChildRequestBody.d.mts +8 -0
- package/dist/esm/api/resources/organizations/resources/children/types/CreateChildRequestBody.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/children/types/CreateChildRequestData.d.mts +10 -0
- package/dist/esm/api/resources/organizations/resources/children/types/CreateChildRequestData.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/children/types/UpdateChildAttributes.d.mts +21 -0
- package/dist/esm/api/resources/organizations/resources/children/types/UpdateChildAttributes.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/children/types/UpdateChildRequestBody.d.mts +8 -0
- package/dist/esm/api/resources/organizations/resources/children/types/UpdateChildRequestBody.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/children/types/UpdateChildRequestData.d.mts +10 -0
- package/dist/esm/api/resources/organizations/resources/children/types/UpdateChildRequestData.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/children/types/index.d.mts +7 -0
- package/dist/esm/api/resources/organizations/resources/children/types/index.mjs +7 -0
- package/dist/esm/api/resources/organizations/resources/index.d.mts +6 -0
- package/dist/esm/api/resources/organizations/resources/index.mjs +6 -0
- package/dist/esm/api/resources/organizations/resources/placements/client/Client.d.mts +131 -0
- package/dist/esm/api/resources/organizations/resources/placements/client/Client.mjs +372 -0
- package/dist/esm/api/resources/organizations/resources/placements/client/index.d.mts +1 -0
- package/dist/esm/api/resources/organizations/resources/placements/client/index.mjs +1 -0
- package/dist/esm/api/resources/organizations/resources/placements/client/requests/ListPlacementsRequest.d.mts +10 -0
- package/dist/esm/api/resources/organizations/resources/placements/client/requests/ListPlacementsRequest.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/organizations/resources/placements/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/organizations/resources/placements/exports.d.mts +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/exports.mjs +3 -0
- package/dist/esm/api/resources/organizations/resources/placements/index.d.mts +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/index.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/Cadence.d.mts +14 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/Cadence.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CadenceFrequency.d.mts +7 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CadenceFrequency.mjs +7 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreateMainPageAttributes.d.mts +15 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreateMainPageAttributes.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreateMainPagePlacementData.d.mts +8 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreateMainPagePlacementData.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreatePlacementDataUnion.d.mts +13 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreatePlacementDataUnion.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreatePlacementRequestBody.d.mts +33 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreatePlacementRequestBody.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreatePushNotificationAttributes.d.mts +19 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreatePushNotificationAttributes.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreatePushNotificationPlacementData.d.mts +8 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/CreatePushNotificationPlacementData.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/DayOfWeek.d.mts +11 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/DayOfWeek.mjs +11 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/MainPagePlacementAttributes.d.mts +15 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/MainPagePlacementAttributes.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/MainPagePlacementData.d.mts +9 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/MainPagePlacementData.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/PlacementFormatUnion.d.mts +42 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/PlacementFormatUnion.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/PlacementListResponse.d.mts +11 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/PlacementListResponse.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/PushNotificationPlacementAttributes.d.mts +16 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/PushNotificationPlacementAttributes.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/PushNotificationPlacementData.d.mts +9 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/PushNotificationPlacementData.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdateMainPageAttributes.d.mts +15 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdateMainPageAttributes.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdateMainPagePlacementData.d.mts +8 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdateMainPagePlacementData.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePlacementDataUnion.d.mts +13 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePlacementDataUnion.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePlacementRequestBody.d.mts +8 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePlacementRequestBody.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePushNotificationAttributes.d.mts +20 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePushNotificationAttributes.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePushNotificationPlacementData.d.mts +8 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/UpdatePushNotificationPlacementData.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/index.d.mts +21 -0
- package/dist/esm/api/resources/organizations/resources/placements/types/index.mjs +21 -0
- package/dist/esm/api/resources/organizations/types/ExternalOrganizationAttributes.d.mts +30 -0
- package/dist/esm/api/resources/organizations/types/ExternalOrganizationAttributes.mjs +2 -0
- package/dist/esm/api/resources/organizations/types/ExternalOrganizationResponse.d.mts +10 -0
- package/dist/esm/api/resources/organizations/types/ExternalOrganizationResponse.mjs +2 -0
- package/dist/esm/api/resources/organizations/types/index.d.mts +2 -0
- package/dist/esm/api/resources/organizations/types/index.mjs +2 -0
- package/dist/esm/api/resources/users/resources/rewards/client/Client.d.mts +21 -0
- package/dist/esm/api/resources/users/resources/rewards/client/Client.mjs +75 -0
- package/dist/esm/api/resources/users/resources/rewards/client/requests/GetOffersByPlacementRequest.d.mts +16 -0
- package/dist/esm/api/resources/users/resources/rewards/client/requests/GetOffersByPlacementRequest.mjs +2 -0
- package/dist/esm/api/resources/users/resources/rewards/client/requests/index.d.mts +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +34 -1
- package/reference.md +909 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
3
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
4
|
+
import * as KardApi from "../../../../../index.mjs";
|
|
5
|
+
export declare namespace ChildrenClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class ChildrenClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ChildrenClient.Options>;
|
|
12
|
+
constructor(options?: ChildrenClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* List child organizations belonging to the authenticated issuer
|
|
15
|
+
*
|
|
16
|
+
* @param {string} organizationId - Unique identifier of the parent organization
|
|
17
|
+
* @param {KardApi.organizations.ListChildrenRequest} request
|
|
18
|
+
* @param {ChildrenClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
19
|
+
*
|
|
20
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
21
|
+
* @throws {@link KardApi.ForbiddenError}
|
|
22
|
+
* @throws {@link KardApi.DoesNotExistError}
|
|
23
|
+
* @throws {@link KardApi.InternalServerError}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* await client.organizations.children.list("organizationId")
|
|
27
|
+
*/
|
|
28
|
+
list(organizationId: string, request?: KardApi.organizations.ListChildrenRequest, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.ChildOrganizationListResponse>;
|
|
29
|
+
private __list;
|
|
30
|
+
/**
|
|
31
|
+
* Create a child organization by cloning the parent and overriding specified fields. An 8-digit numeric ID is generated automatically. The name is required, must be uppercase, and must not contain spaces.
|
|
32
|
+
*
|
|
33
|
+
* @param {string} organizationId - Unique identifier of the parent organization
|
|
34
|
+
* @param {KardApi.organizations.CreateChildRequestBody} request
|
|
35
|
+
* @param {ChildrenClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
|
+
*
|
|
37
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
38
|
+
* @throws {@link KardApi.ForbiddenError}
|
|
39
|
+
* @throws {@link KardApi.InvalidRequest}
|
|
40
|
+
* @throws {@link KardApi.ConflictError}
|
|
41
|
+
* @throws {@link KardApi.InternalServerError}
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* await client.organizations.children.create("organizationId", {
|
|
45
|
+
* data: {
|
|
46
|
+
* type: "organization",
|
|
47
|
+
* attributes: {
|
|
48
|
+
* name: "name"
|
|
49
|
+
* }
|
|
50
|
+
* }
|
|
51
|
+
* })
|
|
52
|
+
*/
|
|
53
|
+
create(organizationId: string, request: KardApi.organizations.CreateChildRequestBody, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.ExternalOrganizationResponse>;
|
|
54
|
+
private __create;
|
|
55
|
+
/**
|
|
56
|
+
* Retrieve a specific child organization
|
|
57
|
+
*
|
|
58
|
+
* @param {string} organizationId - Unique identifier of the parent organization
|
|
59
|
+
* @param {string} childId - Unique identifier of the child organization
|
|
60
|
+
* @param {ChildrenClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
63
|
+
* @throws {@link KardApi.ForbiddenError}
|
|
64
|
+
* @throws {@link KardApi.DoesNotExistError}
|
|
65
|
+
* @throws {@link KardApi.InternalServerError}
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* await client.organizations.children.get("organizationId", "childId")
|
|
69
|
+
*/
|
|
70
|
+
get(organizationId: string, childId: string, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.ExternalOrganizationResponse>;
|
|
71
|
+
private __get;
|
|
72
|
+
/**
|
|
73
|
+
* Update a child organization. Only the name can be changed.
|
|
74
|
+
*
|
|
75
|
+
* @param {string} organizationId - Unique identifier of the parent organization
|
|
76
|
+
* @param {string} childId - Unique identifier of the child organization
|
|
77
|
+
* @param {KardApi.organizations.UpdateChildRequestBody} request
|
|
78
|
+
* @param {ChildrenClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
79
|
+
*
|
|
80
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
81
|
+
* @throws {@link KardApi.ForbiddenError}
|
|
82
|
+
* @throws {@link KardApi.InvalidRequest}
|
|
83
|
+
* @throws {@link KardApi.DoesNotExistError}
|
|
84
|
+
* @throws {@link KardApi.InternalServerError}
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* await client.organizations.children.update("organizationId", "childId", {
|
|
88
|
+
* data: {
|
|
89
|
+
* type: "organization",
|
|
90
|
+
* attributes: {}
|
|
91
|
+
* }
|
|
92
|
+
* })
|
|
93
|
+
*/
|
|
94
|
+
update(organizationId: string, childId: string, request: KardApi.organizations.UpdateChildRequestBody, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.ExternalOrganizationResponse>;
|
|
95
|
+
private __update;
|
|
96
|
+
/**
|
|
97
|
+
* Delete a child organization
|
|
98
|
+
*
|
|
99
|
+
* @param {string} organizationId - Unique identifier of the parent organization
|
|
100
|
+
* @param {string} childId - Unique identifier of the child organization
|
|
101
|
+
* @param {ChildrenClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
102
|
+
*
|
|
103
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
104
|
+
* @throws {@link KardApi.ForbiddenError}
|
|
105
|
+
* @throws {@link KardApi.DoesNotExistError}
|
|
106
|
+
* @throws {@link KardApi.InternalServerError}
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* await client.organizations.children.delete("organizationId", "childId")
|
|
110
|
+
*/
|
|
111
|
+
delete(organizationId: string, childId: string, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.DeleteResourceResponse>;
|
|
112
|
+
private __delete;
|
|
113
|
+
}
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
13
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
14
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
+
import * as errors from "../../../../../../errors/index.mjs";
|
|
17
|
+
import * as KardApi from "../../../../../index.mjs";
|
|
18
|
+
export class ChildrenClient {
|
|
19
|
+
constructor(options = {}) {
|
|
20
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* List child organizations belonging to the authenticated issuer
|
|
24
|
+
*
|
|
25
|
+
* @param {string} organizationId - Unique identifier of the parent organization
|
|
26
|
+
* @param {KardApi.organizations.ListChildrenRequest} request
|
|
27
|
+
* @param {ChildrenClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
+
*
|
|
29
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
30
|
+
* @throws {@link KardApi.ForbiddenError}
|
|
31
|
+
* @throws {@link KardApi.DoesNotExistError}
|
|
32
|
+
* @throws {@link KardApi.InternalServerError}
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* await client.organizations.children.list("organizationId")
|
|
36
|
+
*/
|
|
37
|
+
list(organizationId, request = {}, requestOptions) {
|
|
38
|
+
return core.HttpResponsePromise.fromPromise(this.__list(organizationId, request, requestOptions));
|
|
39
|
+
}
|
|
40
|
+
__list(organizationId_1) {
|
|
41
|
+
return __awaiter(this, arguments, void 0, function* (organizationId, request = {}, requestOptions) {
|
|
42
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
43
|
+
const { "page[after]": pageAfter, "page[size]": pageSize } = request;
|
|
44
|
+
const _queryParams = {
|
|
45
|
+
"page[after]": pageAfter,
|
|
46
|
+
"page[size]": pageSize,
|
|
47
|
+
};
|
|
48
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
49
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
50
|
+
const _response = yield core.fetcher({
|
|
51
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/children`),
|
|
52
|
+
method: "GET",
|
|
53
|
+
headers: _headers,
|
|
54
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
55
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
56
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
57
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
58
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
59
|
+
logging: this._options.logging,
|
|
60
|
+
});
|
|
61
|
+
if (_response.ok) {
|
|
62
|
+
return {
|
|
63
|
+
data: _response.body,
|
|
64
|
+
rawResponse: _response.rawResponse,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
if (_response.error.reason === "status-code") {
|
|
68
|
+
switch (_response.error.statusCode) {
|
|
69
|
+
case 401:
|
|
70
|
+
throw new KardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
71
|
+
case 403:
|
|
72
|
+
throw new KardApi.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
73
|
+
case 404:
|
|
74
|
+
throw new KardApi.DoesNotExistError(_response.error.body, _response.rawResponse);
|
|
75
|
+
case 500:
|
|
76
|
+
throw new KardApi.InternalServerError(_response.error.body, _response.rawResponse);
|
|
77
|
+
default:
|
|
78
|
+
throw new errors.KardApiError({
|
|
79
|
+
statusCode: _response.error.statusCode,
|
|
80
|
+
body: _response.error.body,
|
|
81
|
+
rawResponse: _response.rawResponse,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}/children");
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Create a child organization by cloning the parent and overriding specified fields. An 8-digit numeric ID is generated automatically. The name is required, must be uppercase, and must not contain spaces.
|
|
90
|
+
*
|
|
91
|
+
* @param {string} organizationId - Unique identifier of the parent organization
|
|
92
|
+
* @param {KardApi.organizations.CreateChildRequestBody} request
|
|
93
|
+
* @param {ChildrenClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
94
|
+
*
|
|
95
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
96
|
+
* @throws {@link KardApi.ForbiddenError}
|
|
97
|
+
* @throws {@link KardApi.InvalidRequest}
|
|
98
|
+
* @throws {@link KardApi.ConflictError}
|
|
99
|
+
* @throws {@link KardApi.InternalServerError}
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* await client.organizations.children.create("organizationId", {
|
|
103
|
+
* data: {
|
|
104
|
+
* type: "organization",
|
|
105
|
+
* attributes: {
|
|
106
|
+
* name: "name"
|
|
107
|
+
* }
|
|
108
|
+
* }
|
|
109
|
+
* })
|
|
110
|
+
*/
|
|
111
|
+
create(organizationId, request, requestOptions) {
|
|
112
|
+
return core.HttpResponsePromise.fromPromise(this.__create(organizationId, request, requestOptions));
|
|
113
|
+
}
|
|
114
|
+
__create(organizationId, request, requestOptions) {
|
|
115
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
116
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
117
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
118
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
119
|
+
const _response = yield core.fetcher({
|
|
120
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/children`),
|
|
121
|
+
method: "POST",
|
|
122
|
+
headers: _headers,
|
|
123
|
+
contentType: "application/json",
|
|
124
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
125
|
+
requestType: "json",
|
|
126
|
+
body: request,
|
|
127
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
128
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
129
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
130
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
131
|
+
logging: this._options.logging,
|
|
132
|
+
});
|
|
133
|
+
if (_response.ok) {
|
|
134
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
135
|
+
}
|
|
136
|
+
if (_response.error.reason === "status-code") {
|
|
137
|
+
switch (_response.error.statusCode) {
|
|
138
|
+
case 401:
|
|
139
|
+
throw new KardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
140
|
+
case 403:
|
|
141
|
+
throw new KardApi.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
142
|
+
case 400:
|
|
143
|
+
throw new KardApi.InvalidRequest(_response.error.body, _response.rawResponse);
|
|
144
|
+
case 409:
|
|
145
|
+
throw new KardApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
146
|
+
case 500:
|
|
147
|
+
throw new KardApi.InternalServerError(_response.error.body, _response.rawResponse);
|
|
148
|
+
default:
|
|
149
|
+
throw new errors.KardApiError({
|
|
150
|
+
statusCode: _response.error.statusCode,
|
|
151
|
+
body: _response.error.body,
|
|
152
|
+
rawResponse: _response.rawResponse,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v2/issuers/{organizationId}/children");
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Retrieve a specific child organization
|
|
161
|
+
*
|
|
162
|
+
* @param {string} organizationId - Unique identifier of the parent organization
|
|
163
|
+
* @param {string} childId - Unique identifier of the child organization
|
|
164
|
+
* @param {ChildrenClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
165
|
+
*
|
|
166
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
167
|
+
* @throws {@link KardApi.ForbiddenError}
|
|
168
|
+
* @throws {@link KardApi.DoesNotExistError}
|
|
169
|
+
* @throws {@link KardApi.InternalServerError}
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* await client.organizations.children.get("organizationId", "childId")
|
|
173
|
+
*/
|
|
174
|
+
get(organizationId, childId, requestOptions) {
|
|
175
|
+
return core.HttpResponsePromise.fromPromise(this.__get(organizationId, childId, requestOptions));
|
|
176
|
+
}
|
|
177
|
+
__get(organizationId, childId, requestOptions) {
|
|
178
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
179
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
180
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
181
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
182
|
+
const _response = yield core.fetcher({
|
|
183
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/children/${core.url.encodePathParam(childId)}`),
|
|
184
|
+
method: "GET",
|
|
185
|
+
headers: _headers,
|
|
186
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
187
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
188
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
189
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
190
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
191
|
+
logging: this._options.logging,
|
|
192
|
+
});
|
|
193
|
+
if (_response.ok) {
|
|
194
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
195
|
+
}
|
|
196
|
+
if (_response.error.reason === "status-code") {
|
|
197
|
+
switch (_response.error.statusCode) {
|
|
198
|
+
case 401:
|
|
199
|
+
throw new KardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
200
|
+
case 403:
|
|
201
|
+
throw new KardApi.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
202
|
+
case 404:
|
|
203
|
+
throw new KardApi.DoesNotExistError(_response.error.body, _response.rawResponse);
|
|
204
|
+
case 500:
|
|
205
|
+
throw new KardApi.InternalServerError(_response.error.body, _response.rawResponse);
|
|
206
|
+
default:
|
|
207
|
+
throw new errors.KardApiError({
|
|
208
|
+
statusCode: _response.error.statusCode,
|
|
209
|
+
body: _response.error.body,
|
|
210
|
+
rawResponse: _response.rawResponse,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}/children/{childId}");
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Update a child organization. Only the name can be changed.
|
|
219
|
+
*
|
|
220
|
+
* @param {string} organizationId - Unique identifier of the parent organization
|
|
221
|
+
* @param {string} childId - Unique identifier of the child organization
|
|
222
|
+
* @param {KardApi.organizations.UpdateChildRequestBody} request
|
|
223
|
+
* @param {ChildrenClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
224
|
+
*
|
|
225
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
226
|
+
* @throws {@link KardApi.ForbiddenError}
|
|
227
|
+
* @throws {@link KardApi.InvalidRequest}
|
|
228
|
+
* @throws {@link KardApi.DoesNotExistError}
|
|
229
|
+
* @throws {@link KardApi.InternalServerError}
|
|
230
|
+
*
|
|
231
|
+
* @example
|
|
232
|
+
* await client.organizations.children.update("organizationId", "childId", {
|
|
233
|
+
* data: {
|
|
234
|
+
* type: "organization",
|
|
235
|
+
* attributes: {}
|
|
236
|
+
* }
|
|
237
|
+
* })
|
|
238
|
+
*/
|
|
239
|
+
update(organizationId, childId, request, requestOptions) {
|
|
240
|
+
return core.HttpResponsePromise.fromPromise(this.__update(organizationId, childId, request, requestOptions));
|
|
241
|
+
}
|
|
242
|
+
__update(organizationId, childId, request, requestOptions) {
|
|
243
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
244
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
245
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
246
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
247
|
+
const _response = yield core.fetcher({
|
|
248
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/children/${core.url.encodePathParam(childId)}`),
|
|
249
|
+
method: "PATCH",
|
|
250
|
+
headers: _headers,
|
|
251
|
+
contentType: "application/json",
|
|
252
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
253
|
+
requestType: "json",
|
|
254
|
+
body: request,
|
|
255
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
256
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
257
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
258
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
259
|
+
logging: this._options.logging,
|
|
260
|
+
});
|
|
261
|
+
if (_response.ok) {
|
|
262
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
263
|
+
}
|
|
264
|
+
if (_response.error.reason === "status-code") {
|
|
265
|
+
switch (_response.error.statusCode) {
|
|
266
|
+
case 401:
|
|
267
|
+
throw new KardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
268
|
+
case 403:
|
|
269
|
+
throw new KardApi.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
270
|
+
case 400:
|
|
271
|
+
throw new KardApi.InvalidRequest(_response.error.body, _response.rawResponse);
|
|
272
|
+
case 404:
|
|
273
|
+
throw new KardApi.DoesNotExistError(_response.error.body, _response.rawResponse);
|
|
274
|
+
case 500:
|
|
275
|
+
throw new KardApi.InternalServerError(_response.error.body, _response.rawResponse);
|
|
276
|
+
default:
|
|
277
|
+
throw new errors.KardApiError({
|
|
278
|
+
statusCode: _response.error.statusCode,
|
|
279
|
+
body: _response.error.body,
|
|
280
|
+
rawResponse: _response.rawResponse,
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/v2/issuers/{organizationId}/children/{childId}");
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Delete a child organization
|
|
289
|
+
*
|
|
290
|
+
* @param {string} organizationId - Unique identifier of the parent organization
|
|
291
|
+
* @param {string} childId - Unique identifier of the child organization
|
|
292
|
+
* @param {ChildrenClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
293
|
+
*
|
|
294
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
295
|
+
* @throws {@link KardApi.ForbiddenError}
|
|
296
|
+
* @throws {@link KardApi.DoesNotExistError}
|
|
297
|
+
* @throws {@link KardApi.InternalServerError}
|
|
298
|
+
*
|
|
299
|
+
* @example
|
|
300
|
+
* await client.organizations.children.delete("organizationId", "childId")
|
|
301
|
+
*/
|
|
302
|
+
delete(organizationId, childId, requestOptions) {
|
|
303
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(organizationId, childId, requestOptions));
|
|
304
|
+
}
|
|
305
|
+
__delete(organizationId, childId, requestOptions) {
|
|
306
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
307
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
308
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
309
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
310
|
+
const _response = yield core.fetcher({
|
|
311
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.KardApiEnvironment.Production, `v2/issuers/${core.url.encodePathParam(organizationId)}/children/${core.url.encodePathParam(childId)}`),
|
|
312
|
+
method: "DELETE",
|
|
313
|
+
headers: _headers,
|
|
314
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
315
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
316
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
317
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
318
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
319
|
+
logging: this._options.logging,
|
|
320
|
+
});
|
|
321
|
+
if (_response.ok) {
|
|
322
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
323
|
+
}
|
|
324
|
+
if (_response.error.reason === "status-code") {
|
|
325
|
+
switch (_response.error.statusCode) {
|
|
326
|
+
case 401:
|
|
327
|
+
throw new KardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
328
|
+
case 403:
|
|
329
|
+
throw new KardApi.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
330
|
+
case 404:
|
|
331
|
+
throw new KardApi.DoesNotExistError(_response.error.body, _response.rawResponse);
|
|
332
|
+
case 500:
|
|
333
|
+
throw new KardApi.InternalServerError(_response.error.body, _response.rawResponse);
|
|
334
|
+
default:
|
|
335
|
+
throw new errors.KardApiError({
|
|
336
|
+
statusCode: _response.error.statusCode,
|
|
337
|
+
body: _response.error.body,
|
|
338
|
+
rawResponse: _response.rawResponse,
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v2/issuers/{organizationId}/children/{childId}");
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ListChildrenRequest } from "./ListChildrenRequest.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as KardApi from "../../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Paginated list of child organizations
|
|
4
|
+
*/
|
|
5
|
+
export interface ChildOrganizationListResponse {
|
|
6
|
+
/** Array of child organization resources */
|
|
7
|
+
data: KardApi.ExternalOrganizationResponse[];
|
|
8
|
+
links?: KardApi.Links | undefined;
|
|
9
|
+
/** Pagination metadata */
|
|
10
|
+
meta?: KardApi.OrganizationPaginationMetadata | undefined;
|
|
11
|
+
}
|
package/dist/esm/api/resources/organizations/resources/children/types/CreateChildAttributes.d.mts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Attributes for creating a child organization. Only name is required. All other fields are optional and default to the parent organization's values.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* {
|
|
6
|
+
* name: "ACMECHILDBANK",
|
|
7
|
+
* externalId: "ext-123",
|
|
8
|
+
* bins: ["123456", "789012"]
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface CreateChildAttributes {
|
|
12
|
+
/** Name of the child organization (must be uppercase, no spaces) */
|
|
13
|
+
name: string;
|
|
14
|
+
/** External identifier for the child organization */
|
|
15
|
+
externalId?: string | undefined;
|
|
16
|
+
/** Bank Identification Numbers for the child organization */
|
|
17
|
+
bins?: string[] | undefined;
|
|
18
|
+
}
|
package/dist/esm/api/resources/organizations/resources/children/types/CreateChildRequestBody.d.mts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as KardApi from "../../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Request body for creating a child organization
|
|
4
|
+
*/
|
|
5
|
+
export interface CreateChildRequestBody {
|
|
6
|
+
/** Child organization data for creation */
|
|
7
|
+
data: KardApi.organizations.CreateChildRequestData;
|
|
8
|
+
}
|
package/dist/esm/api/resources/organizations/resources/children/types/CreateChildRequestData.d.mts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as KardApi from "../../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Child organization data structure for creation
|
|
4
|
+
*/
|
|
5
|
+
export interface CreateChildRequestData {
|
|
6
|
+
/** Resource type identifier */
|
|
7
|
+
type: "organization";
|
|
8
|
+
/** Child organization attributes for creation */
|
|
9
|
+
attributes: KardApi.organizations.CreateChildAttributes;
|
|
10
|
+
}
|
package/dist/esm/api/resources/organizations/resources/children/types/UpdateChildAttributes.d.mts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Attributes for updating a child organization. All fields are optional; only provided fields are changed.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* {
|
|
6
|
+
* name: "NEWCHILDNAME"
|
|
7
|
+
* }
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* {
|
|
11
|
+
* bins: ["123456", "789012"]
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
export interface UpdateChildAttributes {
|
|
15
|
+
/** New name for the child organization (must be uppercase, no spaces) */
|
|
16
|
+
name?: string | undefined;
|
|
17
|
+
/** External identifier for the child organization */
|
|
18
|
+
externalId?: string | undefined;
|
|
19
|
+
/** Bank Identification Numbers for the child organization */
|
|
20
|
+
bins?: string[] | undefined;
|
|
21
|
+
}
|
package/dist/esm/api/resources/organizations/resources/children/types/UpdateChildRequestData.d.mts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as KardApi from "../../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Child organization data structure for update
|
|
4
|
+
*/
|
|
5
|
+
export interface UpdateChildRequestData {
|
|
6
|
+
/** Resource type identifier */
|
|
7
|
+
type: "organization";
|
|
8
|
+
/** Child organization attributes for update */
|
|
9
|
+
attributes: KardApi.organizations.UpdateChildAttributes;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./ChildOrganizationListResponse.mjs";
|
|
2
|
+
export * from "./CreateChildAttributes.mjs";
|
|
3
|
+
export * from "./CreateChildRequestBody.mjs";
|
|
4
|
+
export * from "./CreateChildRequestData.mjs";
|
|
5
|
+
export * from "./UpdateChildAttributes.mjs";
|
|
6
|
+
export * from "./UpdateChildRequestBody.mjs";
|
|
7
|
+
export * from "./UpdateChildRequestData.mjs";
|