@compilot/js-sdk 2.3.11-dev → 2.3.14-dev
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/compilot-js-sdk.cjs.dev.js +48 -0
- package/dist/compilot-js-sdk.cjs.prod.js +48 -0
- package/dist/compilot-js-sdk.esm.js +48 -0
- package/dist/declarations/src/actions/getCustomerSessionData.d.ts +28 -0
- package/dist/declarations/src/actions/getCustomerSessionData.d.ts.map +1 -0
- package/dist/declarations/src/configuration/createSdk.d.ts +1 -0
- package/dist/declarations/src/configuration/createSdk.d.ts.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +5 -5
|
@@ -706,6 +706,51 @@ var createWeb3ChallengeFactory = function createWeb3ChallengeFactory(deps) {
|
|
|
706
706
|
}();
|
|
707
707
|
};
|
|
708
708
|
|
|
709
|
+
/**
|
|
710
|
+
* Get the customer current session data
|
|
711
|
+
*
|
|
712
|
+
* @param params.authSession The auth session of the customer
|
|
713
|
+
* @returns The wallets of the customer
|
|
714
|
+
*
|
|
715
|
+
* @category Actions
|
|
716
|
+
*
|
|
717
|
+
* @example
|
|
718
|
+
* ```typescript
|
|
719
|
+
* import { createSdk } from "@compilot/js-sdk";
|
|
720
|
+
*
|
|
721
|
+
* const compilotSdk = createSdk({ apiKey });
|
|
722
|
+
*
|
|
723
|
+
* const data = await compilotSdk.getCustomerSessionData({
|
|
724
|
+
* authSession,
|
|
725
|
+
* });
|
|
726
|
+
* ```
|
|
727
|
+
*/
|
|
728
|
+
|
|
729
|
+
/** @hidden */
|
|
730
|
+
var getCustomerSessionDataFactory = function getCustomerSessionDataFactory(deps) {
|
|
731
|
+
return /*#__PURE__*/function () {
|
|
732
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
733
|
+
var identityApiClient$1;
|
|
734
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
735
|
+
while (1) switch (_context.prev = _context.next) {
|
|
736
|
+
case 0:
|
|
737
|
+
identityApiClient$1 = identityApiClient.createIdentityApiClient({
|
|
738
|
+
env: deps.env,
|
|
739
|
+
jwt: params.authSession.token
|
|
740
|
+
});
|
|
741
|
+
return _context.abrupt("return", identityApiClient$1.identity.getIdentitySessionIds());
|
|
742
|
+
case 2:
|
|
743
|
+
case "end":
|
|
744
|
+
return _context.stop();
|
|
745
|
+
}
|
|
746
|
+
}, _callee);
|
|
747
|
+
}));
|
|
748
|
+
return function (_x) {
|
|
749
|
+
return _ref.apply(this, arguments);
|
|
750
|
+
};
|
|
751
|
+
}();
|
|
752
|
+
};
|
|
753
|
+
|
|
709
754
|
/**
|
|
710
755
|
* Get the status of a customer by their customer ID
|
|
711
756
|
*
|
|
@@ -1458,6 +1503,9 @@ var createSdk = function createSdk(_ref) {
|
|
|
1458
1503
|
validateWebhookEvent: validateWebhookEventFactory({
|
|
1459
1504
|
webhookSecret: webhookSecret,
|
|
1460
1505
|
logger: logger$1
|
|
1506
|
+
}),
|
|
1507
|
+
getCustomerSessionData: getCustomerSessionDataFactory({
|
|
1508
|
+
env: getEnv()
|
|
1461
1509
|
})
|
|
1462
1510
|
};
|
|
1463
1511
|
};
|
|
@@ -706,6 +706,51 @@ var createWeb3ChallengeFactory = function createWeb3ChallengeFactory(deps) {
|
|
|
706
706
|
}();
|
|
707
707
|
};
|
|
708
708
|
|
|
709
|
+
/**
|
|
710
|
+
* Get the customer current session data
|
|
711
|
+
*
|
|
712
|
+
* @param params.authSession The auth session of the customer
|
|
713
|
+
* @returns The wallets of the customer
|
|
714
|
+
*
|
|
715
|
+
* @category Actions
|
|
716
|
+
*
|
|
717
|
+
* @example
|
|
718
|
+
* ```typescript
|
|
719
|
+
* import { createSdk } from "@compilot/js-sdk";
|
|
720
|
+
*
|
|
721
|
+
* const compilotSdk = createSdk({ apiKey });
|
|
722
|
+
*
|
|
723
|
+
* const data = await compilotSdk.getCustomerSessionData({
|
|
724
|
+
* authSession,
|
|
725
|
+
* });
|
|
726
|
+
* ```
|
|
727
|
+
*/
|
|
728
|
+
|
|
729
|
+
/** @hidden */
|
|
730
|
+
var getCustomerSessionDataFactory = function getCustomerSessionDataFactory(deps) {
|
|
731
|
+
return /*#__PURE__*/function () {
|
|
732
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
733
|
+
var identityApiClient$1;
|
|
734
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
735
|
+
while (1) switch (_context.prev = _context.next) {
|
|
736
|
+
case 0:
|
|
737
|
+
identityApiClient$1 = identityApiClient.createIdentityApiClient({
|
|
738
|
+
env: deps.env,
|
|
739
|
+
jwt: params.authSession.token
|
|
740
|
+
});
|
|
741
|
+
return _context.abrupt("return", identityApiClient$1.identity.getIdentitySessionIds());
|
|
742
|
+
case 2:
|
|
743
|
+
case "end":
|
|
744
|
+
return _context.stop();
|
|
745
|
+
}
|
|
746
|
+
}, _callee);
|
|
747
|
+
}));
|
|
748
|
+
return function (_x) {
|
|
749
|
+
return _ref.apply(this, arguments);
|
|
750
|
+
};
|
|
751
|
+
}();
|
|
752
|
+
};
|
|
753
|
+
|
|
709
754
|
/**
|
|
710
755
|
* Get the status of a customer by their customer ID
|
|
711
756
|
*
|
|
@@ -1458,6 +1503,9 @@ var createSdk = function createSdk(_ref) {
|
|
|
1458
1503
|
validateWebhookEvent: validateWebhookEventFactory({
|
|
1459
1504
|
webhookSecret: webhookSecret,
|
|
1460
1505
|
logger: logger$1
|
|
1506
|
+
}),
|
|
1507
|
+
getCustomerSessionData: getCustomerSessionDataFactory({
|
|
1508
|
+
env: getEnv()
|
|
1461
1509
|
})
|
|
1462
1510
|
};
|
|
1463
1511
|
};
|
|
@@ -704,6 +704,51 @@ var createWeb3ChallengeFactory = function createWeb3ChallengeFactory(deps) {
|
|
|
704
704
|
}();
|
|
705
705
|
};
|
|
706
706
|
|
|
707
|
+
/**
|
|
708
|
+
* Get the customer current session data
|
|
709
|
+
*
|
|
710
|
+
* @param params.authSession The auth session of the customer
|
|
711
|
+
* @returns The wallets of the customer
|
|
712
|
+
*
|
|
713
|
+
* @category Actions
|
|
714
|
+
*
|
|
715
|
+
* @example
|
|
716
|
+
* ```typescript
|
|
717
|
+
* import { createSdk } from "@compilot/js-sdk";
|
|
718
|
+
*
|
|
719
|
+
* const compilotSdk = createSdk({ apiKey });
|
|
720
|
+
*
|
|
721
|
+
* const data = await compilotSdk.getCustomerSessionData({
|
|
722
|
+
* authSession,
|
|
723
|
+
* });
|
|
724
|
+
* ```
|
|
725
|
+
*/
|
|
726
|
+
|
|
727
|
+
/** @hidden */
|
|
728
|
+
var getCustomerSessionDataFactory = function getCustomerSessionDataFactory(deps) {
|
|
729
|
+
return /*#__PURE__*/function () {
|
|
730
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
731
|
+
var identityApiClient;
|
|
732
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
733
|
+
while (1) switch (_context.prev = _context.next) {
|
|
734
|
+
case 0:
|
|
735
|
+
identityApiClient = createIdentityApiClient({
|
|
736
|
+
env: deps.env,
|
|
737
|
+
jwt: params.authSession.token
|
|
738
|
+
});
|
|
739
|
+
return _context.abrupt("return", identityApiClient.identity.getIdentitySessionIds());
|
|
740
|
+
case 2:
|
|
741
|
+
case "end":
|
|
742
|
+
return _context.stop();
|
|
743
|
+
}
|
|
744
|
+
}, _callee);
|
|
745
|
+
}));
|
|
746
|
+
return function (_x) {
|
|
747
|
+
return _ref.apply(this, arguments);
|
|
748
|
+
};
|
|
749
|
+
}();
|
|
750
|
+
};
|
|
751
|
+
|
|
707
752
|
/**
|
|
708
753
|
* Get the status of a customer by their customer ID
|
|
709
754
|
*
|
|
@@ -1456,6 +1501,9 @@ var createSdk = function createSdk(_ref) {
|
|
|
1456
1501
|
validateWebhookEvent: validateWebhookEventFactory({
|
|
1457
1502
|
webhookSecret: webhookSecret,
|
|
1458
1503
|
logger: logger
|
|
1504
|
+
}),
|
|
1505
|
+
getCustomerSessionData: getCustomerSessionDataFactory({
|
|
1506
|
+
env: getEnv()
|
|
1459
1507
|
})
|
|
1460
1508
|
};
|
|
1461
1509
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AuthSession, AuthSessionData, Environment } from "@nexeraid/identity-schemas";
|
|
2
|
+
/**
|
|
3
|
+
* Get the customer current session data
|
|
4
|
+
*
|
|
5
|
+
* @param params.authSession The auth session of the customer
|
|
6
|
+
* @returns The wallets of the customer
|
|
7
|
+
*
|
|
8
|
+
* @category Actions
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import { createSdk } from "@compilot/js-sdk";
|
|
13
|
+
*
|
|
14
|
+
* const compilotSdk = createSdk({ apiKey });
|
|
15
|
+
*
|
|
16
|
+
* const data = await compilotSdk.getCustomerSessionData({
|
|
17
|
+
* authSession,
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export type GetCustomerSessionDataFn = (params: {
|
|
22
|
+
authSession: AuthSession;
|
|
23
|
+
}) => Promise<AuthSessionData>;
|
|
24
|
+
/** @hidden */
|
|
25
|
+
export declare const getCustomerSessionDataFactory: (deps: {
|
|
26
|
+
env: Environment;
|
|
27
|
+
}) => GetCustomerSessionDataFn;
|
|
28
|
+
//# sourceMappingURL=getCustomerSessionData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCustomerSessionData.d.ts","sourceRoot":"../../../../src/actions","sources":["getCustomerSessionData.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,eAAe,EACf,WAAW,EACZ,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,MAAM,EAAE;IAC9C,WAAW,EAAE,WAAW,CAAC;CAC1B,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;AAE/B,cAAc;AACd,eAAO,MAAM,6BAA6B,SACjC;IAAE,GAAG,EAAE,WAAW,CAAA;CAAE,KAAG,wBAQ7B,CAAC"}
|
|
@@ -23,6 +23,7 @@ export declare const createSdk: ({ apiKey, webhookSecret, logLevel, }: {
|
|
|
23
23
|
getCustomerStatusByCustomerId: import("../actions/getCustomerStatusByCustomerId.js").GetCustomerStatusByCustomerIdFn;
|
|
24
24
|
getCustomerWallets: import("../actions/getCustomerWallets.js").GetCustomerWalletsFn;
|
|
25
25
|
validateWebhookEvent: import("../actions/validateWebhookEvent.js").ValidateWebhookEventFn;
|
|
26
|
+
getCustomerSessionData: import("../actions/getCustomerSessionData.js").GetCustomerSessionDataFn;
|
|
26
27
|
};
|
|
27
28
|
export { GenerateWalletChallengeRequest, VerifyWalletChallengeRequest, } from "@nexeraid/identity-schemas";
|
|
28
29
|
//# sourceMappingURL=createSdk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSdk.d.ts","sourceRoot":"../../../../src/configuration","sources":["createSdk.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"createSdk.d.ts","sourceRoot":"../../../../src/configuration","sources":["createSdk.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAiBpD;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,yCAInB;IACD,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;CA8CA,CAAC;AAEF,OAAO,EACL,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,4BAA4B,CAAC"}
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compilot/js-sdk",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.14-dev",
|
|
4
4
|
"description": "ComPilot JS SDK",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "ISC",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"pino": "^9.4.0",
|
|
29
29
|
"svix": "1.21.0",
|
|
30
30
|
"zod": "^3.23.8",
|
|
31
|
-
"@nexeraid/
|
|
32
|
-
"@nexeraid/identity-schemas": "2.3.
|
|
33
|
-
"@nexeraid/
|
|
34
|
-
"@nexeraid/
|
|
31
|
+
"@nexeraid/api-client": "2.3.13-dev",
|
|
32
|
+
"@nexeraid/identity-schemas": "2.3.14-dev",
|
|
33
|
+
"@nexeraid/identity-api-client": "2.3.13-dev",
|
|
34
|
+
"@nexeraid/logger": "2.3.13-dev"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"prettier": "^3.3.3",
|