@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
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@kard-financial/sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "14.
|
|
47
|
-
"User-Agent": "@kard-financial/sdk/14.
|
|
46
|
+
"X-Fern-SDK-Version": "14.2.0",
|
|
47
|
+
"User-Agent": "@kard-financial/sdk/14.2.0",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AuthClient } from "./api/resources/auth/client/Client.js";
|
|
2
2
|
import { FilesClient } from "./api/resources/files/client/Client.js";
|
|
3
3
|
import { NotificationsClient } from "./api/resources/notifications/client/Client.js";
|
|
4
|
+
import { OrganizationsClient } from "./api/resources/organizations/client/Client.js";
|
|
4
5
|
import { PingClient } from "./api/resources/ping/client/Client.js";
|
|
5
6
|
import { TransactionsClient } from "./api/resources/transactions/client/Client.js";
|
|
6
7
|
import { UsersClient } from "./api/resources/users/client/Client.js";
|
|
@@ -17,6 +18,7 @@ export declare class KardApiClient {
|
|
|
17
18
|
protected _auth: AuthClient | undefined;
|
|
18
19
|
protected _files: FilesClient | undefined;
|
|
19
20
|
protected _notifications: NotificationsClient | undefined;
|
|
21
|
+
protected _organizations: OrganizationsClient | undefined;
|
|
20
22
|
protected _ping: PingClient | undefined;
|
|
21
23
|
protected _transactions: TransactionsClient | undefined;
|
|
22
24
|
protected _users: UsersClient | undefined;
|
|
@@ -24,6 +26,7 @@ export declare class KardApiClient {
|
|
|
24
26
|
get auth(): AuthClient;
|
|
25
27
|
get files(): FilesClient;
|
|
26
28
|
get notifications(): NotificationsClient;
|
|
29
|
+
get organizations(): OrganizationsClient;
|
|
27
30
|
get ping(): PingClient;
|
|
28
31
|
get transactions(): TransactionsClient;
|
|
29
32
|
get users(): UsersClient;
|
package/dist/cjs/Client.js
CHANGED
|
@@ -47,9 +47,10 @@ exports.KardApiClient = void 0;
|
|
|
47
47
|
const Client_js_1 = require("./api/resources/auth/client/Client.js");
|
|
48
48
|
const Client_js_2 = require("./api/resources/files/client/Client.js");
|
|
49
49
|
const Client_js_3 = require("./api/resources/notifications/client/Client.js");
|
|
50
|
-
const Client_js_4 = require("./api/resources/
|
|
51
|
-
const Client_js_5 = require("./api/resources/
|
|
52
|
-
const Client_js_6 = require("./api/resources/
|
|
50
|
+
const Client_js_4 = require("./api/resources/organizations/client/Client.js");
|
|
51
|
+
const Client_js_5 = require("./api/resources/ping/client/Client.js");
|
|
52
|
+
const Client_js_6 = require("./api/resources/transactions/client/Client.js");
|
|
53
|
+
const Client_js_7 = require("./api/resources/users/client/Client.js");
|
|
53
54
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
54
55
|
const core = __importStar(require("./core/index.js"));
|
|
55
56
|
class KardApiClient {
|
|
@@ -68,17 +69,21 @@ class KardApiClient {
|
|
|
68
69
|
var _a;
|
|
69
70
|
return ((_a = this._notifications) !== null && _a !== void 0 ? _a : (this._notifications = new Client_js_3.NotificationsClient(this._options)));
|
|
70
71
|
}
|
|
72
|
+
get organizations() {
|
|
73
|
+
var _a;
|
|
74
|
+
return ((_a = this._organizations) !== null && _a !== void 0 ? _a : (this._organizations = new Client_js_4.OrganizationsClient(this._options)));
|
|
75
|
+
}
|
|
71
76
|
get ping() {
|
|
72
77
|
var _a;
|
|
73
|
-
return ((_a = this._ping) !== null && _a !== void 0 ? _a : (this._ping = new
|
|
78
|
+
return ((_a = this._ping) !== null && _a !== void 0 ? _a : (this._ping = new Client_js_5.PingClient(this._options)));
|
|
74
79
|
}
|
|
75
80
|
get transactions() {
|
|
76
81
|
var _a;
|
|
77
|
-
return ((_a = this._transactions) !== null && _a !== void 0 ? _a : (this._transactions = new
|
|
82
|
+
return ((_a = this._transactions) !== null && _a !== void 0 ? _a : (this._transactions = new Client_js_6.TransactionsClient(this._options)));
|
|
78
83
|
}
|
|
79
84
|
get users() {
|
|
80
85
|
var _a;
|
|
81
|
-
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new
|
|
86
|
+
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_7.UsersClient(this._options)));
|
|
82
87
|
}
|
|
83
88
|
/**
|
|
84
89
|
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
|
|
@@ -7,8 +7,12 @@ export * from "./commons/types/index.js";
|
|
|
7
7
|
export * from "./files/client/requests/index.js";
|
|
8
8
|
export * as files from "./files/index.js";
|
|
9
9
|
export * from "./files/types/index.js";
|
|
10
|
+
export * as internalOrganizations from "./internalOrganizations/index.js";
|
|
11
|
+
export * from "./internalOrganizations/types/index.js";
|
|
10
12
|
export * as notifications from "./notifications/index.js";
|
|
11
13
|
export * from "./notifications/types/index.js";
|
|
14
|
+
export * as organizations from "./organizations/index.js";
|
|
15
|
+
export * from "./organizations/types/index.js";
|
|
12
16
|
export * from "./ping/errors/index.js";
|
|
13
17
|
export * as ping from "./ping/index.js";
|
|
14
18
|
export * from "./ping/types/index.js";
|
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.users = exports.transactions = exports.ping = exports.notifications = exports.files = exports.commons = exports.auth = void 0;
|
|
39
|
+
exports.users = exports.transactions = exports.ping = exports.organizations = exports.notifications = exports.internalOrganizations = exports.files = exports.commons = exports.auth = void 0;
|
|
40
40
|
__exportStar(require("./auth/client/requests/index.js"), exports);
|
|
41
41
|
exports.auth = __importStar(require("./auth/index.js"));
|
|
42
42
|
__exportStar(require("./auth/types/index.js"), exports);
|
|
@@ -46,8 +46,12 @@ __exportStar(require("./commons/types/index.js"), exports);
|
|
|
46
46
|
__exportStar(require("./files/client/requests/index.js"), exports);
|
|
47
47
|
exports.files = __importStar(require("./files/index.js"));
|
|
48
48
|
__exportStar(require("./files/types/index.js"), exports);
|
|
49
|
+
exports.internalOrganizations = __importStar(require("./internalOrganizations/index.js"));
|
|
50
|
+
__exportStar(require("./internalOrganizations/types/index.js"), exports);
|
|
49
51
|
exports.notifications = __importStar(require("./notifications/index.js"));
|
|
50
52
|
__exportStar(require("./notifications/types/index.js"), exports);
|
|
53
|
+
exports.organizations = __importStar(require("./organizations/index.js"));
|
|
54
|
+
__exportStar(require("./organizations/types/index.js"), exports);
|
|
51
55
|
__exportStar(require("./ping/errors/index.js"), exports);
|
|
52
56
|
exports.ping = __importStar(require("./ping/index.js"));
|
|
53
57
|
__exportStar(require("./ping/types/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./index.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
__exportStar(require("./index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./types/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types/index.js"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as KardApi from "../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Deleted resource stub
|
|
4
|
+
*/
|
|
5
|
+
export interface DeleteResourceData {
|
|
6
|
+
/** Resource type identifier */
|
|
7
|
+
type: string;
|
|
8
|
+
/** ID of the deleted resource */
|
|
9
|
+
id: string;
|
|
10
|
+
attributes: KardApi.EmptyObject;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.EnrolledReward = void 0;
|
|
5
|
+
/** Rewards programs an organization is enrolled in */
|
|
6
|
+
exports.EnrolledReward = {
|
|
7
|
+
Cardlinked: "CARDLINKED",
|
|
8
|
+
Affiliate: "AFFILIATE",
|
|
9
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as KardApi from "../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Merchant network with priority for an organization
|
|
4
|
+
*/
|
|
5
|
+
export interface MerchantNetwork {
|
|
6
|
+
/** Name of the merchant network */
|
|
7
|
+
name: KardApi.MerchantNetworkName;
|
|
8
|
+
/** Priority of the merchant network (higher = more preferred) */
|
|
9
|
+
priority: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Merchant network name */
|
|
2
|
+
export declare const MerchantNetworkName: {
|
|
3
|
+
readonly Empyr: "EMPYR";
|
|
4
|
+
readonly Rewardsnetwork: "REWARDSNETWORK";
|
|
5
|
+
readonly Kard: "KARD";
|
|
6
|
+
readonly Collinson: "COLLINSON";
|
|
7
|
+
readonly Seated: "SEATED";
|
|
8
|
+
readonly Franki: "FRANKI";
|
|
9
|
+
readonly Lux: "LUX";
|
|
10
|
+
};
|
|
11
|
+
export type MerchantNetworkName = (typeof MerchantNetworkName)[keyof typeof MerchantNetworkName];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.MerchantNetworkName = void 0;
|
|
5
|
+
/** Merchant network name */
|
|
6
|
+
exports.MerchantNetworkName = {
|
|
7
|
+
Empyr: "EMPYR",
|
|
8
|
+
Rewardsnetwork: "REWARDSNETWORK",
|
|
9
|
+
Kard: "KARD",
|
|
10
|
+
Collinson: "COLLINSON",
|
|
11
|
+
Seated: "SEATED",
|
|
12
|
+
Franki: "FRANKI",
|
|
13
|
+
Lux: "LUX",
|
|
14
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./DeleteResourceData.js"), exports);
|
|
18
|
+
__exportStar(require("./DeleteResourceResponse.js"), exports);
|
|
19
|
+
__exportStar(require("./EnrolledReward.js"), exports);
|
|
20
|
+
__exportStar(require("./MerchantNetwork.js"), exports);
|
|
21
|
+
__exportStar(require("./MerchantNetworkName.js"), exports);
|
|
22
|
+
__exportStar(require("./OrganizationPaginationMetadata.js"), exports);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../core/index.js";
|
|
4
|
+
import * as KardApi from "../../../index.js";
|
|
5
|
+
import { ChildrenClient } from "../resources/children/client/Client.js";
|
|
6
|
+
import { PlacementsClient } from "../resources/placements/client/Client.js";
|
|
7
|
+
export declare namespace OrganizationsClient {
|
|
8
|
+
type Options = BaseClientOptions;
|
|
9
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export declare class OrganizationsClient {
|
|
13
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<OrganizationsClient.Options>;
|
|
14
|
+
protected _children: ChildrenClient | undefined;
|
|
15
|
+
protected _placements: PlacementsClient | undefined;
|
|
16
|
+
constructor(options?: OrganizationsClient.Options);
|
|
17
|
+
get children(): ChildrenClient;
|
|
18
|
+
get placements(): PlacementsClient;
|
|
19
|
+
/**
|
|
20
|
+
* Retrieve organization details for the authenticated issuer
|
|
21
|
+
*
|
|
22
|
+
* @param {string} organizationId - Unique identifier of the organization (must match the authenticated issuer)
|
|
23
|
+
* @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
24
|
+
*
|
|
25
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
26
|
+
* @throws {@link KardApi.ForbiddenError}
|
|
27
|
+
* @throws {@link KardApi.DoesNotExistError}
|
|
28
|
+
* @throws {@link KardApi.InternalServerError}
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* await client.organizations.get("organizationId")
|
|
32
|
+
*/
|
|
33
|
+
get(organizationId: string, requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<KardApi.ExternalOrganizationResponse>;
|
|
34
|
+
private __get;
|
|
35
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.OrganizationsClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
48
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
49
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
50
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
52
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
53
|
+
const KardApi = __importStar(require("../../../index.js"));
|
|
54
|
+
const Client_js_1 = require("../resources/children/client/Client.js");
|
|
55
|
+
const Client_js_2 = require("../resources/placements/client/Client.js");
|
|
56
|
+
class OrganizationsClient {
|
|
57
|
+
constructor(options = {}) {
|
|
58
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
59
|
+
}
|
|
60
|
+
get children() {
|
|
61
|
+
var _a;
|
|
62
|
+
return ((_a = this._children) !== null && _a !== void 0 ? _a : (this._children = new Client_js_1.ChildrenClient(this._options)));
|
|
63
|
+
}
|
|
64
|
+
get placements() {
|
|
65
|
+
var _a;
|
|
66
|
+
return ((_a = this._placements) !== null && _a !== void 0 ? _a : (this._placements = new Client_js_2.PlacementsClient(this._options)));
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Retrieve organization details for the authenticated issuer
|
|
70
|
+
*
|
|
71
|
+
* @param {string} organizationId - Unique identifier of the organization (must match the authenticated issuer)
|
|
72
|
+
* @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
73
|
+
*
|
|
74
|
+
* @throws {@link KardApi.UnauthorizedError}
|
|
75
|
+
* @throws {@link KardApi.ForbiddenError}
|
|
76
|
+
* @throws {@link KardApi.DoesNotExistError}
|
|
77
|
+
* @throws {@link KardApi.InternalServerError}
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* await client.organizations.get("organizationId")
|
|
81
|
+
*/
|
|
82
|
+
get(organizationId, requestOptions) {
|
|
83
|
+
return core.HttpResponsePromise.fromPromise(this.__get(organizationId, requestOptions));
|
|
84
|
+
}
|
|
85
|
+
__get(organizationId, requestOptions) {
|
|
86
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
87
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
88
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
89
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
90
|
+
const _response = yield core.fetcher({
|
|
91
|
+
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)}`),
|
|
92
|
+
method: "GET",
|
|
93
|
+
headers: _headers,
|
|
94
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
95
|
+
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,
|
|
96
|
+
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,
|
|
97
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
98
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
99
|
+
logging: this._options.logging,
|
|
100
|
+
});
|
|
101
|
+
if (_response.ok) {
|
|
102
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
103
|
+
}
|
|
104
|
+
if (_response.error.reason === "status-code") {
|
|
105
|
+
switch (_response.error.statusCode) {
|
|
106
|
+
case 401:
|
|
107
|
+
throw new KardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
108
|
+
case 403:
|
|
109
|
+
throw new KardApi.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
110
|
+
case 404:
|
|
111
|
+
throw new KardApi.DoesNotExistError(_response.error.body, _response.rawResponse);
|
|
112
|
+
case 500:
|
|
113
|
+
throw new KardApi.InternalServerError(_response.error.body, _response.rawResponse);
|
|
114
|
+
default:
|
|
115
|
+
throw new errors.KardApiError({
|
|
116
|
+
statusCode: _response.error.statusCode,
|
|
117
|
+
body: _response.error.body,
|
|
118
|
+
rawResponse: _response.rawResponse,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v2/issuers/{organizationId}");
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
exports.OrganizationsClient = OrganizationsClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.OrganizationsClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "OrganizationsClient", { enumerable: true, get: function () { return Client_js_1.OrganizationsClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
22
|
+
__exportStar(require("./resources/index.js"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
18
|
+
__exportStar(require("./resources/index.js"), exports);
|
|
19
|
+
__exportStar(require("./types/index.js"), exports);
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../../../core/index.js";
|
|
4
|
+
import * as KardApi from "../../../../../index.js";
|
|
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
|
+
}
|