@kard-financial/sdk 14.4.0 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/internalOrganizations/types/index.d.ts +0 -2
- package/dist/cjs/api/resources/internalOrganizations/types/index.js +0 -2
- package/dist/cjs/api/resources/organizations/client/Client.d.ts +2 -3
- package/dist/cjs/api/resources/organizations/client/Client.js +6 -7
- package/dist/cjs/api/resources/organizations/resources/children/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/organizations/resources/children/client/Client.js +12 -3
- package/dist/cjs/api/resources/organizations/resources/children/types/ChildOrganizationAttributes.d.ts +11 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/ChildOrganizationListResponse.d.ts +1 -1
- package/dist/cjs/api/resources/organizations/resources/children/types/ChildOrganizationResponse.d.ts +10 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/ChildOrganizationResponse.js +3 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/organizations/resources/children/types/index.js +2 -0
- package/dist/cjs/api/resources/organizations/types/ExternalOrganizationAttributes.d.ts +6 -16
- 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/api/resources/internalOrganizations/types/index.d.mts +0 -2
- package/dist/esm/api/resources/internalOrganizations/types/index.mjs +0 -2
- package/dist/esm/api/resources/organizations/client/Client.d.mts +2 -3
- package/dist/esm/api/resources/organizations/client/Client.mjs +6 -7
- package/dist/esm/api/resources/organizations/resources/children/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/organizations/resources/children/client/Client.mjs +12 -3
- package/dist/esm/api/resources/organizations/resources/children/types/ChildOrganizationAttributes.d.mts +11 -0
- package/dist/esm/api/resources/organizations/resources/children/types/ChildOrganizationListResponse.d.mts +1 -1
- package/dist/esm/api/resources/organizations/resources/children/types/ChildOrganizationResponse.d.mts +10 -0
- package/dist/esm/api/resources/organizations/resources/children/types/ChildOrganizationResponse.mjs +2 -0
- package/dist/esm/api/resources/organizations/resources/children/types/index.d.mts +2 -0
- package/dist/esm/api/resources/organizations/resources/children/types/index.mjs +2 -0
- package/dist/esm/api/resources/organizations/types/ExternalOrganizationAttributes.d.mts +6 -16
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +5 -13
- package/dist/cjs/api/resources/internalOrganizations/types/MerchantNetwork.d.ts +0 -10
- package/dist/cjs/api/resources/internalOrganizations/types/MerchantNetworkName.d.ts +0 -11
- package/dist/cjs/api/resources/internalOrganizations/types/MerchantNetworkName.js +0 -14
- package/dist/esm/api/resources/internalOrganizations/types/MerchantNetwork.d.mts +0 -10
- package/dist/esm/api/resources/internalOrganizations/types/MerchantNetworkName.d.mts +0 -11
- package/dist/esm/api/resources/internalOrganizations/types/MerchantNetworkName.mjs +0 -11
- /package/dist/cjs/api/resources/{internalOrganizations/types/MerchantNetwork.js → organizations/resources/children/types/ChildOrganizationAttributes.js} +0 -0
- /package/dist/esm/api/resources/{internalOrganizations/types/MerchantNetwork.mjs → organizations/resources/children/types/ChildOrganizationAttributes.mjs} +0 -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": "
|
|
47
|
-
"User-Agent": "@kard-financial/sdk/
|
|
46
|
+
"X-Fern-SDK-Version": "15.0.0",
|
|
47
|
+
"User-Agent": "@kard-financial/sdk/15.0.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);
|
|
@@ -17,6 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./DeleteResourceData.js"), exports);
|
|
18
18
|
__exportStar(require("./DeleteResourceResponse.js"), exports);
|
|
19
19
|
__exportStar(require("./EnrolledReward.js"), exports);
|
|
20
|
-
__exportStar(require("./MerchantNetwork.js"), exports);
|
|
21
|
-
__exportStar(require("./MerchantNetworkName.js"), exports);
|
|
22
20
|
__exportStar(require("./OrganizationPaginationMetadata.js"), exports);
|
|
@@ -19,7 +19,6 @@ export declare class OrganizationsClient {
|
|
|
19
19
|
/**
|
|
20
20
|
* Retrieve organization details for the authenticated issuer
|
|
21
21
|
*
|
|
22
|
-
* @param {string} organizationId - Unique identifier of the organization (must match the authenticated issuer)
|
|
23
22
|
* @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
24
23
|
*
|
|
25
24
|
* @throws {@link KardApi.UnauthorizedError}
|
|
@@ -28,8 +27,8 @@ export declare class OrganizationsClient {
|
|
|
28
27
|
* @throws {@link KardApi.InternalServerError}
|
|
29
28
|
*
|
|
30
29
|
* @example
|
|
31
|
-
* await client.organizations.get(
|
|
30
|
+
* await client.organizations.get()
|
|
32
31
|
*/
|
|
33
|
-
get(
|
|
32
|
+
get(requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<KardApi.ExternalOrganizationResponse>;
|
|
34
33
|
private __get;
|
|
35
34
|
}
|
|
@@ -68,7 +68,6 @@ class OrganizationsClient {
|
|
|
68
68
|
/**
|
|
69
69
|
* Retrieve organization details for the authenticated issuer
|
|
70
70
|
*
|
|
71
|
-
* @param {string} organizationId - Unique identifier of the organization (must match the authenticated issuer)
|
|
72
71
|
* @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
73
72
|
*
|
|
74
73
|
* @throws {@link KardApi.UnauthorizedError}
|
|
@@ -77,18 +76,18 @@ class OrganizationsClient {
|
|
|
77
76
|
* @throws {@link KardApi.InternalServerError}
|
|
78
77
|
*
|
|
79
78
|
* @example
|
|
80
|
-
* await client.organizations.get(
|
|
79
|
+
* await client.organizations.get()
|
|
81
80
|
*/
|
|
82
|
-
get(
|
|
83
|
-
return core.HttpResponsePromise.fromPromise(this.__get(
|
|
81
|
+
get(requestOptions) {
|
|
82
|
+
return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));
|
|
84
83
|
}
|
|
85
|
-
__get(
|
|
84
|
+
__get(requestOptions) {
|
|
86
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
87
86
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
88
87
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
89
88
|
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
89
|
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,
|
|
90
|
+
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/issuer"),
|
|
92
91
|
method: "GET",
|
|
93
92
|
headers: _headers,
|
|
94
93
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -119,7 +118,7 @@ class OrganizationsClient {
|
|
|
119
118
|
});
|
|
120
119
|
}
|
|
121
120
|
}
|
|
122
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v2/
|
|
121
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v2/issuer");
|
|
123
122
|
});
|
|
124
123
|
}
|
|
125
124
|
}
|
|
@@ -50,7 +50,7 @@ export declare class ChildrenClient {
|
|
|
50
50
|
* }
|
|
51
51
|
* })
|
|
52
52
|
*/
|
|
53
|
-
create(organizationId: string, request: KardApi.organizations.CreateChildRequestBody, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.
|
|
53
|
+
create(organizationId: string, request: KardApi.organizations.CreateChildRequestBody, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.ChildOrganizationResponse>;
|
|
54
54
|
private __create;
|
|
55
55
|
/**
|
|
56
56
|
* Retrieve a specific child organization
|
|
@@ -67,7 +67,7 @@ export declare class ChildrenClient {
|
|
|
67
67
|
* @example
|
|
68
68
|
* await client.organizations.children.get("organizationId", "childId")
|
|
69
69
|
*/
|
|
70
|
-
get(organizationId: string, childId: string, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.
|
|
70
|
+
get(organizationId: string, childId: string, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.ChildOrganizationResponse>;
|
|
71
71
|
private __get;
|
|
72
72
|
/**
|
|
73
73
|
* Update a child organization. Only the name can be changed.
|
|
@@ -91,7 +91,7 @@ export declare class ChildrenClient {
|
|
|
91
91
|
* }
|
|
92
92
|
* })
|
|
93
93
|
*/
|
|
94
|
-
update(organizationId: string, childId: string, request: KardApi.organizations.UpdateChildRequestBody, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.
|
|
94
|
+
update(organizationId: string, childId: string, request: KardApi.organizations.UpdateChildRequestBody, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.ChildOrganizationResponse>;
|
|
95
95
|
private __update;
|
|
96
96
|
/**
|
|
97
97
|
* Delete a child organization
|
|
@@ -167,7 +167,10 @@ class ChildrenClient {
|
|
|
167
167
|
logging: this._options.logging,
|
|
168
168
|
});
|
|
169
169
|
if (_response.ok) {
|
|
170
|
-
return {
|
|
170
|
+
return {
|
|
171
|
+
data: _response.body,
|
|
172
|
+
rawResponse: _response.rawResponse,
|
|
173
|
+
};
|
|
171
174
|
}
|
|
172
175
|
if (_response.error.reason === "status-code") {
|
|
173
176
|
switch (_response.error.statusCode) {
|
|
@@ -227,7 +230,10 @@ class ChildrenClient {
|
|
|
227
230
|
logging: this._options.logging,
|
|
228
231
|
});
|
|
229
232
|
if (_response.ok) {
|
|
230
|
-
return {
|
|
233
|
+
return {
|
|
234
|
+
data: _response.body,
|
|
235
|
+
rawResponse: _response.rawResponse,
|
|
236
|
+
};
|
|
231
237
|
}
|
|
232
238
|
if (_response.error.reason === "status-code") {
|
|
233
239
|
switch (_response.error.statusCode) {
|
|
@@ -295,7 +301,10 @@ class ChildrenClient {
|
|
|
295
301
|
logging: this._options.logging,
|
|
296
302
|
});
|
|
297
303
|
if (_response.ok) {
|
|
298
|
-
return {
|
|
304
|
+
return {
|
|
305
|
+
data: _response.body,
|
|
306
|
+
rawResponse: _response.rawResponse,
|
|
307
|
+
};
|
|
299
308
|
}
|
|
300
309
|
if (_response.error.reason === "status-code") {
|
|
301
310
|
switch (_response.error.statusCode) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Limited set of child organization attributes exposed to external consumers
|
|
3
|
+
*/
|
|
4
|
+
export interface ChildOrganizationAttributes {
|
|
5
|
+
/** Name of the child organization (uppercase, no spaces) */
|
|
6
|
+
name: string;
|
|
7
|
+
/** External identifier for the child organization */
|
|
8
|
+
externalId?: string | undefined;
|
|
9
|
+
/** Bank Identification Numbers for the child organization */
|
|
10
|
+
bins: string[];
|
|
11
|
+
}
|
|
@@ -4,7 +4,7 @@ import type * as KardApi from "../../../../../index.js";
|
|
|
4
4
|
*/
|
|
5
5
|
export interface ChildOrganizationListResponse {
|
|
6
6
|
/** Array of child organization resources */
|
|
7
|
-
data: KardApi.
|
|
7
|
+
data: KardApi.organizations.ChildOrganizationResponse[];
|
|
8
8
|
links?: KardApi.Links | undefined;
|
|
9
9
|
/** Pagination metadata */
|
|
10
10
|
meta?: KardApi.OrganizationPaginationMetadata | undefined;
|
package/dist/cjs/api/resources/organizations/resources/children/types/ChildOrganizationResponse.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as KardApi from "../../../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Child organization resource response
|
|
4
|
+
*/
|
|
5
|
+
export interface ChildOrganizationResponse {
|
|
6
|
+
type: "organization";
|
|
7
|
+
/** Unique identifier of the child organization */
|
|
8
|
+
id: string;
|
|
9
|
+
attributes: KardApi.organizations.ChildOrganizationAttributes;
|
|
10
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export * from "./ChildOrganizationAttributes.js";
|
|
1
2
|
export * from "./ChildOrganizationListResponse.js";
|
|
3
|
+
export * from "./ChildOrganizationResponse.js";
|
|
2
4
|
export * from "./CreateChildAttributes.js";
|
|
3
5
|
export * from "./CreateChildRequestBody.js";
|
|
4
6
|
export * from "./CreateChildRequestData.js";
|
|
@@ -14,7 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ChildOrganizationAttributes.js"), exports);
|
|
17
18
|
__exportStar(require("./ChildOrganizationListResponse.js"), exports);
|
|
19
|
+
__exportStar(require("./ChildOrganizationResponse.js"), exports);
|
|
18
20
|
__exportStar(require("./CreateChildAttributes.js"), exports);
|
|
19
21
|
__exportStar(require("./CreateChildRequestBody.js"), exports);
|
|
20
22
|
__exportStar(require("./CreateChildRequestData.js"), exports);
|
|
@@ -5,26 +5,16 @@ import type * as KardApi from "../../../index.js";
|
|
|
5
5
|
export interface ExternalOrganizationAttributes {
|
|
6
6
|
/** Name of the organization (uppercase, no spaces) */
|
|
7
7
|
name: string;
|
|
8
|
-
/** External identifier for the organization */
|
|
9
|
-
externalId?: string | undefined;
|
|
10
|
-
/** ID of the parent organization */
|
|
11
|
-
parentOrganizationId?: string | undefined;
|
|
12
8
|
/** Rewards programs the organization is enrolled in */
|
|
13
9
|
enrolledRewards: KardApi.EnrolledReward[];
|
|
14
10
|
/** Card networks supported by the organization */
|
|
15
11
|
cardNetworks: KardApi.CardNetwork[];
|
|
16
|
-
/** Merchant networks with priority for the organization */
|
|
17
|
-
merchantNetworks?: KardApi.MerchantNetwork[] | undefined;
|
|
18
|
-
/** Whether national offers are enabled */
|
|
19
|
-
nationalOffers: boolean;
|
|
20
|
-
/** Whether local offers are enabled */
|
|
21
|
-
localOffers: boolean;
|
|
22
|
-
/** Whether attribution tracking is enabled */
|
|
23
|
-
useAttribution: boolean;
|
|
24
12
|
/** Bank Identification Numbers for the organization */
|
|
25
13
|
bins: string[];
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
|
|
14
|
+
/** Affiliate commission split percentage */
|
|
15
|
+
affiliateCommissionSplit: number;
|
|
16
|
+
/** Cardlinked commission split percentage */
|
|
17
|
+
cardlinkedCommissionSplit: number;
|
|
18
|
+
/** Cardlinked user commission split percentage */
|
|
19
|
+
cardlinkedUserCommissionSplit: number;
|
|
30
20
|
}
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "
|
|
1
|
+
export declare const SDK_VERSION = "15.0.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@kard-financial/sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "
|
|
10
|
-
"User-Agent": "@kard-financial/sdk/
|
|
9
|
+
"X-Fern-SDK-Version": "15.0.0",
|
|
10
|
+
"User-Agent": "@kard-financial/sdk/15.0.0",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export * from "./DeleteResourceData.mjs";
|
|
2
2
|
export * from "./DeleteResourceResponse.mjs";
|
|
3
3
|
export * from "./EnrolledReward.mjs";
|
|
4
|
-
export * from "./MerchantNetwork.mjs";
|
|
5
|
-
export * from "./MerchantNetworkName.mjs";
|
|
6
4
|
export * from "./OrganizationPaginationMetadata.mjs";
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export * from "./DeleteResourceData.mjs";
|
|
2
2
|
export * from "./DeleteResourceResponse.mjs";
|
|
3
3
|
export * from "./EnrolledReward.mjs";
|
|
4
|
-
export * from "./MerchantNetwork.mjs";
|
|
5
|
-
export * from "./MerchantNetworkName.mjs";
|
|
6
4
|
export * from "./OrganizationPaginationMetadata.mjs";
|
|
@@ -19,7 +19,6 @@ export declare class OrganizationsClient {
|
|
|
19
19
|
/**
|
|
20
20
|
* Retrieve organization details for the authenticated issuer
|
|
21
21
|
*
|
|
22
|
-
* @param {string} organizationId - Unique identifier of the organization (must match the authenticated issuer)
|
|
23
22
|
* @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
24
23
|
*
|
|
25
24
|
* @throws {@link KardApi.UnauthorizedError}
|
|
@@ -28,8 +27,8 @@ export declare class OrganizationsClient {
|
|
|
28
27
|
* @throws {@link KardApi.InternalServerError}
|
|
29
28
|
*
|
|
30
29
|
* @example
|
|
31
|
-
* await client.organizations.get(
|
|
30
|
+
* await client.organizations.get()
|
|
32
31
|
*/
|
|
33
|
-
get(
|
|
32
|
+
get(requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<KardApi.ExternalOrganizationResponse>;
|
|
34
33
|
private __get;
|
|
35
34
|
}
|
|
@@ -32,7 +32,6 @@ export class OrganizationsClient {
|
|
|
32
32
|
/**
|
|
33
33
|
* Retrieve organization details for the authenticated issuer
|
|
34
34
|
*
|
|
35
|
-
* @param {string} organizationId - Unique identifier of the organization (must match the authenticated issuer)
|
|
36
35
|
* @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
36
|
*
|
|
38
37
|
* @throws {@link KardApi.UnauthorizedError}
|
|
@@ -41,18 +40,18 @@ export class OrganizationsClient {
|
|
|
41
40
|
* @throws {@link KardApi.InternalServerError}
|
|
42
41
|
*
|
|
43
42
|
* @example
|
|
44
|
-
* await client.organizations.get(
|
|
43
|
+
* await client.organizations.get()
|
|
45
44
|
*/
|
|
46
|
-
get(
|
|
47
|
-
return core.HttpResponsePromise.fromPromise(this.__get(
|
|
45
|
+
get(requestOptions) {
|
|
46
|
+
return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));
|
|
48
47
|
}
|
|
49
|
-
__get(
|
|
48
|
+
__get(requestOptions) {
|
|
50
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
51
50
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
52
51
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
53
52
|
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);
|
|
54
53
|
const _response = yield core.fetcher({
|
|
55
|
-
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,
|
|
54
|
+
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/issuer"),
|
|
56
55
|
method: "GET",
|
|
57
56
|
headers: _headers,
|
|
58
57
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -83,7 +82,7 @@ export class OrganizationsClient {
|
|
|
83
82
|
});
|
|
84
83
|
}
|
|
85
84
|
}
|
|
86
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/
|
|
85
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v2/issuer");
|
|
87
86
|
});
|
|
88
87
|
}
|
|
89
88
|
}
|
|
@@ -50,7 +50,7 @@ export declare class ChildrenClient {
|
|
|
50
50
|
* }
|
|
51
51
|
* })
|
|
52
52
|
*/
|
|
53
|
-
create(organizationId: string, request: KardApi.organizations.CreateChildRequestBody, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.
|
|
53
|
+
create(organizationId: string, request: KardApi.organizations.CreateChildRequestBody, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.ChildOrganizationResponse>;
|
|
54
54
|
private __create;
|
|
55
55
|
/**
|
|
56
56
|
* Retrieve a specific child organization
|
|
@@ -67,7 +67,7 @@ export declare class ChildrenClient {
|
|
|
67
67
|
* @example
|
|
68
68
|
* await client.organizations.children.get("organizationId", "childId")
|
|
69
69
|
*/
|
|
70
|
-
get(organizationId: string, childId: string, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.
|
|
70
|
+
get(organizationId: string, childId: string, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.ChildOrganizationResponse>;
|
|
71
71
|
private __get;
|
|
72
72
|
/**
|
|
73
73
|
* Update a child organization. Only the name can be changed.
|
|
@@ -91,7 +91,7 @@ export declare class ChildrenClient {
|
|
|
91
91
|
* }
|
|
92
92
|
* })
|
|
93
93
|
*/
|
|
94
|
-
update(organizationId: string, childId: string, request: KardApi.organizations.UpdateChildRequestBody, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.
|
|
94
|
+
update(organizationId: string, childId: string, request: KardApi.organizations.UpdateChildRequestBody, requestOptions?: ChildrenClient.RequestOptions): core.HttpResponsePromise<KardApi.organizations.ChildOrganizationResponse>;
|
|
95
95
|
private __update;
|
|
96
96
|
/**
|
|
97
97
|
* Delete a child organization
|
|
@@ -131,7 +131,10 @@ export class ChildrenClient {
|
|
|
131
131
|
logging: this._options.logging,
|
|
132
132
|
});
|
|
133
133
|
if (_response.ok) {
|
|
134
|
-
return {
|
|
134
|
+
return {
|
|
135
|
+
data: _response.body,
|
|
136
|
+
rawResponse: _response.rawResponse,
|
|
137
|
+
};
|
|
135
138
|
}
|
|
136
139
|
if (_response.error.reason === "status-code") {
|
|
137
140
|
switch (_response.error.statusCode) {
|
|
@@ -191,7 +194,10 @@ export class ChildrenClient {
|
|
|
191
194
|
logging: this._options.logging,
|
|
192
195
|
});
|
|
193
196
|
if (_response.ok) {
|
|
194
|
-
return {
|
|
197
|
+
return {
|
|
198
|
+
data: _response.body,
|
|
199
|
+
rawResponse: _response.rawResponse,
|
|
200
|
+
};
|
|
195
201
|
}
|
|
196
202
|
if (_response.error.reason === "status-code") {
|
|
197
203
|
switch (_response.error.statusCode) {
|
|
@@ -259,7 +265,10 @@ export class ChildrenClient {
|
|
|
259
265
|
logging: this._options.logging,
|
|
260
266
|
});
|
|
261
267
|
if (_response.ok) {
|
|
262
|
-
return {
|
|
268
|
+
return {
|
|
269
|
+
data: _response.body,
|
|
270
|
+
rawResponse: _response.rawResponse,
|
|
271
|
+
};
|
|
263
272
|
}
|
|
264
273
|
if (_response.error.reason === "status-code") {
|
|
265
274
|
switch (_response.error.statusCode) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Limited set of child organization attributes exposed to external consumers
|
|
3
|
+
*/
|
|
4
|
+
export interface ChildOrganizationAttributes {
|
|
5
|
+
/** Name of the child organization (uppercase, no spaces) */
|
|
6
|
+
name: string;
|
|
7
|
+
/** External identifier for the child organization */
|
|
8
|
+
externalId?: string | undefined;
|
|
9
|
+
/** Bank Identification Numbers for the child organization */
|
|
10
|
+
bins: string[];
|
|
11
|
+
}
|
|
@@ -4,7 +4,7 @@ import type * as KardApi from "../../../../../index.mjs";
|
|
|
4
4
|
*/
|
|
5
5
|
export interface ChildOrganizationListResponse {
|
|
6
6
|
/** Array of child organization resources */
|
|
7
|
-
data: KardApi.
|
|
7
|
+
data: KardApi.organizations.ChildOrganizationResponse[];
|
|
8
8
|
links?: KardApi.Links | undefined;
|
|
9
9
|
/** Pagination metadata */
|
|
10
10
|
meta?: KardApi.OrganizationPaginationMetadata | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as KardApi from "../../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Child organization resource response
|
|
4
|
+
*/
|
|
5
|
+
export interface ChildOrganizationResponse {
|
|
6
|
+
type: "organization";
|
|
7
|
+
/** Unique identifier of the child organization */
|
|
8
|
+
id: string;
|
|
9
|
+
attributes: KardApi.organizations.ChildOrganizationAttributes;
|
|
10
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export * from "./ChildOrganizationAttributes.mjs";
|
|
1
2
|
export * from "./ChildOrganizationListResponse.mjs";
|
|
3
|
+
export * from "./ChildOrganizationResponse.mjs";
|
|
2
4
|
export * from "./CreateChildAttributes.mjs";
|
|
3
5
|
export * from "./CreateChildRequestBody.mjs";
|
|
4
6
|
export * from "./CreateChildRequestData.mjs";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export * from "./ChildOrganizationAttributes.mjs";
|
|
1
2
|
export * from "./ChildOrganizationListResponse.mjs";
|
|
3
|
+
export * from "./ChildOrganizationResponse.mjs";
|
|
2
4
|
export * from "./CreateChildAttributes.mjs";
|
|
3
5
|
export * from "./CreateChildRequestBody.mjs";
|
|
4
6
|
export * from "./CreateChildRequestData.mjs";
|
|
@@ -5,26 +5,16 @@ import type * as KardApi from "../../../index.mjs";
|
|
|
5
5
|
export interface ExternalOrganizationAttributes {
|
|
6
6
|
/** Name of the organization (uppercase, no spaces) */
|
|
7
7
|
name: string;
|
|
8
|
-
/** External identifier for the organization */
|
|
9
|
-
externalId?: string | undefined;
|
|
10
|
-
/** ID of the parent organization */
|
|
11
|
-
parentOrganizationId?: string | undefined;
|
|
12
8
|
/** Rewards programs the organization is enrolled in */
|
|
13
9
|
enrolledRewards: KardApi.EnrolledReward[];
|
|
14
10
|
/** Card networks supported by the organization */
|
|
15
11
|
cardNetworks: KardApi.CardNetwork[];
|
|
16
|
-
/** Merchant networks with priority for the organization */
|
|
17
|
-
merchantNetworks?: KardApi.MerchantNetwork[] | undefined;
|
|
18
|
-
/** Whether national offers are enabled */
|
|
19
|
-
nationalOffers: boolean;
|
|
20
|
-
/** Whether local offers are enabled */
|
|
21
|
-
localOffers: boolean;
|
|
22
|
-
/** Whether attribution tracking is enabled */
|
|
23
|
-
useAttribution: boolean;
|
|
24
12
|
/** Bank Identification Numbers for the organization */
|
|
25
13
|
bins: string[];
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
|
|
14
|
+
/** Affiliate commission split percentage */
|
|
15
|
+
affiliateCommissionSplit: number;
|
|
16
|
+
/** Cardlinked commission split percentage */
|
|
17
|
+
cardlinkedCommissionSplit: number;
|
|
18
|
+
/** Cardlinked user commission split percentage */
|
|
19
|
+
cardlinkedUserCommissionSplit: number;
|
|
30
20
|
}
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "
|
|
1
|
+
export declare const SDK_VERSION = "15.0.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "
|
|
1
|
+
export const SDK_VERSION = "15.0.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -377,7 +377,7 @@ await client.notifications.subscriptions.update("organization-123", "subscriptio
|
|
|
377
377
|
</details>
|
|
378
378
|
|
|
379
379
|
## Organizations
|
|
380
|
-
<details><summary><code>client.organizations.<a href="/src/api/resources/organizations/client/Client.ts">get</a>(
|
|
380
|
+
<details><summary><code>client.organizations.<a href="/src/api/resources/organizations/client/Client.ts">get</a>() -> KardApi.ExternalOrganizationResponse</code></summary>
|
|
381
381
|
<dl>
|
|
382
382
|
<dd>
|
|
383
383
|
|
|
@@ -404,7 +404,7 @@ Retrieve organization details for the authenticated issuer
|
|
|
404
404
|
<dd>
|
|
405
405
|
|
|
406
406
|
```typescript
|
|
407
|
-
await client.organizations.get(
|
|
407
|
+
await client.organizations.get();
|
|
408
408
|
|
|
409
409
|
```
|
|
410
410
|
</dd>
|
|
@@ -420,14 +420,6 @@ await client.organizations.get("organizationId");
|
|
|
420
420
|
<dl>
|
|
421
421
|
<dd>
|
|
422
422
|
|
|
423
|
-
**organizationId:** `string` — Unique identifier of the organization (must match the authenticated issuer)
|
|
424
|
-
|
|
425
|
-
</dd>
|
|
426
|
-
</dl>
|
|
427
|
-
|
|
428
|
-
<dl>
|
|
429
|
-
<dd>
|
|
430
|
-
|
|
431
423
|
**requestOptions:** `OrganizationsClient.RequestOptions`
|
|
432
424
|
|
|
433
425
|
</dd>
|
|
@@ -512,7 +504,7 @@ await client.organizations.children.list("organizationId");
|
|
|
512
504
|
</dl>
|
|
513
505
|
</details>
|
|
514
506
|
|
|
515
|
-
<details><summary><code>client.organizations.children.<a href="/src/api/resources/organizations/resources/children/client/Client.ts">create</a>(organizationId, { ...params }) -> KardApi.
|
|
507
|
+
<details><summary><code>client.organizations.children.<a href="/src/api/resources/organizations/resources/children/client/Client.ts">create</a>(organizationId, { ...params }) -> KardApi.ChildOrganizationResponse</code></summary>
|
|
516
508
|
<dl>
|
|
517
509
|
<dd>
|
|
518
510
|
|
|
@@ -590,7 +582,7 @@ await client.organizations.children.create("organizationId", {
|
|
|
590
582
|
</dl>
|
|
591
583
|
</details>
|
|
592
584
|
|
|
593
|
-
<details><summary><code>client.organizations.children.<a href="/src/api/resources/organizations/resources/children/client/Client.ts">get</a>(organizationId, childId) -> KardApi.
|
|
585
|
+
<details><summary><code>client.organizations.children.<a href="/src/api/resources/organizations/resources/children/client/Client.ts">get</a>(organizationId, childId) -> KardApi.ChildOrganizationResponse</code></summary>
|
|
594
586
|
<dl>
|
|
595
587
|
<dd>
|
|
596
588
|
|
|
@@ -661,7 +653,7 @@ await client.organizations.children.get("organizationId", "childId");
|
|
|
661
653
|
</dl>
|
|
662
654
|
</details>
|
|
663
655
|
|
|
664
|
-
<details><summary><code>client.organizations.children.<a href="/src/api/resources/organizations/resources/children/client/Client.ts">update</a>(organizationId, childId, { ...params }) -> KardApi.
|
|
656
|
+
<details><summary><code>client.organizations.children.<a href="/src/api/resources/organizations/resources/children/client/Client.ts">update</a>(organizationId, childId, { ...params }) -> KardApi.ChildOrganizationResponse</code></summary>
|
|
665
657
|
<dl>
|
|
666
658
|
<dd>
|
|
667
659
|
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
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];
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type * as KardApi from "../../../index.mjs";
|
|
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
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
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];
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
/** Merchant network name */
|
|
3
|
-
export const MerchantNetworkName = {
|
|
4
|
-
Empyr: "EMPYR",
|
|
5
|
-
Rewardsnetwork: "REWARDSNETWORK",
|
|
6
|
-
Kard: "KARD",
|
|
7
|
-
Collinson: "COLLINSON",
|
|
8
|
-
Seated: "SEATED",
|
|
9
|
-
Franki: "FRANKI",
|
|
10
|
-
Lux: "LUX",
|
|
11
|
-
};
|
|
File without changes
|