@credenza3/partner-sdk 0.0.2-alpha.9 → 1.0.0-alpha.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/index.d.mts +307 -0
- package/dist/index.d.ts +307 -0
- package/dist/index.js +939 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +914 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +11 -124
- package/dist/cjs/accounts/accounts.js +0 -15
- package/dist/cjs/accounts/accounts.js.map +0 -7
- package/dist/cjs/accounts/client/client.js +0 -30
- package/dist/cjs/accounts/client/client.js.map +0 -7
- package/dist/cjs/accounts/client/index.js +0 -24
- package/dist/cjs/accounts/client/index.js.map +0 -7
- package/dist/cjs/accounts/client/jwt-auth/index.js +0 -24
- package/dist/cjs/accounts/client/jwt-auth/index.js.map +0 -7
- package/dist/cjs/accounts/client/jwt-auth/jwt-auth.js +0 -60
- package/dist/cjs/accounts/client/jwt-auth/jwt-auth.js.map +0 -7
- package/dist/cjs/accounts/client/jwt-auth/jwt-auth.spec.js +0 -43
- package/dist/cjs/accounts/client/jwt-auth/jwt-auth.spec.js.map +0 -7
- package/dist/cjs/accounts/client/jwt-auth/jwt-auth.types.js +0 -3
- package/dist/cjs/accounts/client/jwt-auth/jwt-auth.types.js.map +0 -7
- package/dist/cjs/accounts/index.js +0 -24
- package/dist/cjs/accounts/index.js.map +0 -7
- package/dist/cjs/accounts/oauth/index.js +0 -24
- package/dist/cjs/accounts/oauth/index.js.map +0 -7
- package/dist/cjs/accounts/oauth/oauth.js +0 -43
- package/dist/cjs/accounts/oauth/oauth.js.map +0 -7
- package/dist/cjs/accounts/oauth/oauth.spec.js +0 -73
- package/dist/cjs/accounts/oauth/oauth.spec.js.map +0 -7
- package/dist/cjs/accounts/oauth/oauth.types.js +0 -3
- package/dist/cjs/accounts/oauth/oauth.types.js.map +0 -7
- package/dist/cjs/accounts/user/index.js +0 -24
- package/dist/cjs/accounts/user/index.js.map +0 -7
- package/dist/cjs/accounts/user/user.js +0 -19
- package/dist/cjs/accounts/user/user.js.map +0 -7
- package/dist/cjs/accounts/user/user.types.js +0 -3
- package/dist/cjs/accounts/user/user.types.js.map +0 -7
- package/dist/cjs/api/api.js +0 -35
- package/dist/cjs/api/api.js.map +0 -7
- package/dist/cjs/api/index.js +0 -27
- package/dist/cjs/api/index.js.map +0 -7
- package/dist/cjs/api/nfc-id/index.js +0 -25
- package/dist/cjs/api/nfc-id/index.js.map +0 -7
- package/dist/cjs/api/nfc-id/nfc-id.js +0 -72
- package/dist/cjs/api/nfc-id/nfc-id.js.map +0 -7
- package/dist/cjs/api/nfc-id/nfc-id.types.js +0 -3
- package/dist/cjs/api/nfc-id/nfc-id.types.js.map +0 -7
- package/dist/cjs/api/passport-id/index.js +0 -24
- package/dist/cjs/api/passport-id/index.js.map +0 -7
- package/dist/cjs/api/passport-id/passport-id.js +0 -30
- package/dist/cjs/api/passport-id/passport-id.js.map +0 -7
- package/dist/cjs/api/promo/index.js +0 -25
- package/dist/cjs/api/promo/index.js.map +0 -7
- package/dist/cjs/api/promo/offers/index.js +0 -24
- package/dist/cjs/api/promo/offers/index.js.map +0 -7
- package/dist/cjs/api/promo/offers/offers.js +0 -91
- package/dist/cjs/api/promo/offers/offers.js.map +0 -7
- package/dist/cjs/api/promo/offers/offers.spec.js +0 -50
- package/dist/cjs/api/promo/offers/offers.spec.js.map +0 -7
- package/dist/cjs/api/promo/offers/offers.types.js +0 -3
- package/dist/cjs/api/promo/offers/offers.types.js.map +0 -7
- package/dist/cjs/api/promo/rules/index.js +0 -24
- package/dist/cjs/api/promo/rules/index.js.map +0 -7
- package/dist/cjs/api/promo/rules/rules.js +0 -60
- package/dist/cjs/api/promo/rules/rules.js.map +0 -7
- package/dist/cjs/api/promo/rules/rules.spec.js +0 -39
- package/dist/cjs/api/promo/rules/rules.spec.js.map +0 -7
- package/dist/cjs/api/promo/rules/rules.types.js +0 -3
- package/dist/cjs/api/promo/rules/rules.types.js.map +0 -7
- package/dist/cjs/credenza-partner-sdk.js +0 -18
- package/dist/cjs/credenza-partner-sdk.js.map +0 -7
- package/dist/cjs/evm/account/account.js +0 -18
- package/dist/cjs/evm/account/account.js.map +0 -7
- package/dist/cjs/evm/account/index.js +0 -24
- package/dist/cjs/evm/account/index.js.map +0 -7
- package/dist/cjs/evm/contract/contract.js +0 -98
- package/dist/cjs/evm/contract/contract.js.map +0 -7
- package/dist/cjs/evm/contract/index.js +0 -24
- package/dist/cjs/evm/contract/index.js.map +0 -7
- package/dist/cjs/evm/evm.js +0 -35
- package/dist/cjs/evm/evm.js.map +0 -7
- package/dist/cjs/evm/index.js +0 -26
- package/dist/cjs/evm/index.js.map +0 -7
- package/dist/cjs/index.js +0 -24
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/lib/credentials/credentials.js +0 -25
- package/dist/cjs/lib/credentials/credentials.js.map +0 -7
- package/dist/cjs/lib/credentials/credentials.types.js +0 -3
- package/dist/cjs/lib/credentials/credentials.types.js.map +0 -7
- package/dist/cjs/lib/credentials/index.js +0 -25
- package/dist/cjs/lib/credentials/index.js.map +0 -7
- package/dist/cjs/lib/logging/index.js +0 -24
- package/dist/cjs/lib/logging/index.js.map +0 -7
- package/dist/cjs/lib/logging/logging.js +0 -14
- package/dist/cjs/lib/logging/logging.js.map +0 -7
- package/dist/cjs/lib/obj/index.js +0 -24
- package/dist/cjs/lib/obj/index.js.map +0 -7
- package/dist/cjs/lib/obj/obj.js +0 -29
- package/dist/cjs/lib/obj/obj.js.map +0 -7
- package/dist/cjs/lib/obj/obj.spec.js +0 -31
- package/dist/cjs/lib/obj/obj.spec.js.map +0 -7
- package/dist/cjs/lib/sdk-env/index.js +0 -26
- package/dist/cjs/lib/sdk-env/index.js.map +0 -7
- package/dist/cjs/lib/sdk-env/sdk-env.constants.js +0 -9
- package/dist/cjs/lib/sdk-env/sdk-env.constants.js.map +0 -7
- package/dist/cjs/lib/sdk-env/sdk-env.js +0 -13
- package/dist/cjs/lib/sdk-env/sdk-env.js.map +0 -7
- package/dist/cjs/lib/sdk-env/sdk-env.types.js +0 -3
- package/dist/cjs/lib/sdk-env/sdk-env.types.js.map +0 -7
- package/dist/cjs/lib/ws/index.js +0 -24
- package/dist/cjs/lib/ws/index.js.map +0 -7
- package/dist/cjs/lib/ws/ws.js +0 -21
- package/dist/cjs/lib/ws/ws.js.map +0 -7
- package/dist/cjs/package.json +0 -3
- package/dist/cjs/sui/account/account.js +0 -18
- package/dist/cjs/sui/account/account.js.map +0 -7
- package/dist/cjs/sui/account/index.js +0 -24
- package/dist/cjs/sui/account/index.js.map +0 -7
- package/dist/cjs/sui/index.js +0 -44
- package/dist/cjs/sui/index.js.map +0 -7
- package/dist/cjs/sui/sui.js +0 -15
- package/dist/cjs/sui/sui.js.map +0 -7
- package/dist/cjs/sui/zk/account/account.js +0 -18
- package/dist/cjs/sui/zk/account/account.js.map +0 -7
- package/dist/cjs/sui/zk/account/index.js +0 -24
- package/dist/cjs/sui/zk/account/index.js.map +0 -7
- package/dist/cjs/sui/zk/index.js +0 -24
- package/dist/cjs/sui/zk/index.js.map +0 -7
- package/dist/esm/accounts/accounts.d.ts +0 -1
- package/dist/esm/accounts/accounts.js +0 -15
- package/dist/esm/accounts/accounts.js.map +0 -1
- package/dist/esm/accounts/client/client.d.ts +0 -12
- package/dist/esm/accounts/client/client.js +0 -29
- package/dist/esm/accounts/client/client.js.map +0 -1
- package/dist/esm/accounts/client/index.d.ts +0 -1
- package/dist/esm/accounts/client/index.js +0 -18
- package/dist/esm/accounts/client/index.js.map +0 -1
- package/dist/esm/accounts/client/jwt-auth/index.d.ts +0 -1
- package/dist/esm/accounts/client/jwt-auth/index.js +0 -18
- package/dist/esm/accounts/client/jwt-auth/index.js.map +0 -1
- package/dist/esm/accounts/client/jwt-auth/jwt-auth.d.ts +0 -5
- package/dist/esm/accounts/client/jwt-auth/jwt-auth.js +0 -60
- package/dist/esm/accounts/client/jwt-auth/jwt-auth.js.map +0 -1
- package/dist/esm/accounts/client/jwt-auth/jwt-auth.spec.d.ts +0 -1
- package/dist/esm/accounts/client/jwt-auth/jwt-auth.spec.js +0 -43
- package/dist/esm/accounts/client/jwt-auth/jwt-auth.spec.js.map +0 -1
- package/dist/esm/accounts/client/jwt-auth/jwt-auth.types.d.ts +0 -25
- package/dist/esm/accounts/client/jwt-auth/jwt-auth.types.js +0 -3
- package/dist/esm/accounts/client/jwt-auth/jwt-auth.types.js.map +0 -1
- package/dist/esm/accounts/index.d.ts +0 -1
- package/dist/esm/accounts/index.js +0 -18
- package/dist/esm/accounts/index.js.map +0 -1
- package/dist/esm/accounts/oauth/index.d.ts +0 -1
- package/dist/esm/accounts/oauth/index.js +0 -18
- package/dist/esm/accounts/oauth/index.js.map +0 -1
- package/dist/esm/accounts/oauth/oauth.d.ts +0 -3
- package/dist/esm/accounts/oauth/oauth.js +0 -43
- package/dist/esm/accounts/oauth/oauth.js.map +0 -1
- package/dist/esm/accounts/oauth/oauth.spec.d.ts +0 -1
- package/dist/esm/accounts/oauth/oauth.spec.js +0 -78
- package/dist/esm/accounts/oauth/oauth.spec.js.map +0 -1
- package/dist/esm/accounts/oauth/oauth.types.d.ts +0 -10
- package/dist/esm/accounts/oauth/oauth.types.js +0 -3
- package/dist/esm/accounts/oauth/oauth.types.js.map +0 -1
- package/dist/esm/accounts/user/index.d.ts +0 -1
- package/dist/esm/accounts/user/index.js +0 -18
- package/dist/esm/accounts/user/index.js.map +0 -1
- package/dist/esm/accounts/user/user.d.ts +0 -2
- package/dist/esm/accounts/user/user.js +0 -19
- package/dist/esm/accounts/user/user.js.map +0 -1
- package/dist/esm/accounts/user/user.types.d.ts +0 -8
- package/dist/esm/accounts/user/user.types.js +0 -3
- package/dist/esm/accounts/user/user.types.js.map +0 -1
- package/dist/esm/api/api.d.ts +0 -4
- package/dist/esm/api/api.js +0 -35
- package/dist/esm/api/api.js.map +0 -1
- package/dist/esm/api/index.d.ts +0 -4
- package/dist/esm/api/index.js +0 -21
- package/dist/esm/api/index.js.map +0 -1
- package/dist/esm/api/nfc-id/index.d.ts +0 -2
- package/dist/esm/api/nfc-id/index.js +0 -19
- package/dist/esm/api/nfc-id/index.js.map +0 -1
- package/dist/esm/api/nfc-id/nfc-id.d.ts +0 -5
- package/dist/esm/api/nfc-id/nfc-id.js +0 -70
- package/dist/esm/api/nfc-id/nfc-id.js.map +0 -1
- package/dist/esm/api/nfc-id/nfc-id.types.d.ts +0 -9
- package/dist/esm/api/nfc-id/nfc-id.types.js +0 -3
- package/dist/esm/api/nfc-id/nfc-id.types.js.map +0 -1
- package/dist/esm/api/passport-id/index.d.ts +0 -1
- package/dist/esm/api/passport-id/index.js +0 -18
- package/dist/esm/api/passport-id/index.js.map +0 -1
- package/dist/esm/api/passport-id/passport-id.d.ts +0 -3
- package/dist/esm/api/passport-id/passport-id.js +0 -30
- package/dist/esm/api/passport-id/passport-id.js.map +0 -1
- package/dist/esm/api/promo/index.d.ts +0 -2
- package/dist/esm/api/promo/index.js +0 -19
- package/dist/esm/api/promo/index.js.map +0 -1
- package/dist/esm/api/promo/offers/index.d.ts +0 -1
- package/dist/esm/api/promo/offers/index.js +0 -18
- package/dist/esm/api/promo/offers/index.js.map +0 -1
- package/dist/esm/api/promo/offers/offers.d.ts +0 -10
- package/dist/esm/api/promo/offers/offers.js +0 -92
- package/dist/esm/api/promo/offers/offers.js.map +0 -1
- package/dist/esm/api/promo/offers/offers.spec.d.ts +0 -1
- package/dist/esm/api/promo/offers/offers.spec.js +0 -50
- package/dist/esm/api/promo/offers/offers.spec.js.map +0 -1
- package/dist/esm/api/promo/offers/offers.types.d.ts +0 -24
- package/dist/esm/api/promo/offers/offers.types.js +0 -3
- package/dist/esm/api/promo/offers/offers.types.js.map +0 -1
- package/dist/esm/api/promo/rules/index.d.ts +0 -1
- package/dist/esm/api/promo/rules/index.js +0 -18
- package/dist/esm/api/promo/rules/index.js.map +0 -1
- package/dist/esm/api/promo/rules/rules.d.ts +0 -5
- package/dist/esm/api/promo/rules/rules.js +0 -60
- package/dist/esm/api/promo/rules/rules.js.map +0 -1
- package/dist/esm/api/promo/rules/rules.spec.d.ts +0 -1
- package/dist/esm/api/promo/rules/rules.spec.js +0 -39
- package/dist/esm/api/promo/rules/rules.spec.js.map +0 -1
- package/dist/esm/api/promo/rules/rules.types.d.ts +0 -14
- package/dist/esm/api/promo/rules/rules.types.js +0 -3
- package/dist/esm/api/promo/rules/rules.types.js.map +0 -1
- package/dist/esm/credenza-partner-sdk.d.ts +0 -5
- package/dist/esm/credenza-partner-sdk.js +0 -18
- package/dist/esm/credenza-partner-sdk.js.map +0 -1
- package/dist/esm/evm/account/account.d.ts +0 -3
- package/dist/esm/evm/account/account.js +0 -18
- package/dist/esm/evm/account/account.js.map +0 -1
- package/dist/esm/evm/account/index.d.ts +0 -1
- package/dist/esm/evm/account/index.js +0 -18
- package/dist/esm/evm/account/index.js.map +0 -1
- package/dist/esm/evm/contract/contract.d.ts +0 -8
- package/dist/esm/evm/contract/contract.js +0 -98
- package/dist/esm/evm/contract/contract.js.map +0 -1
- package/dist/esm/evm/contract/index.d.ts +0 -1
- package/dist/esm/evm/contract/index.js +0 -18
- package/dist/esm/evm/contract/index.js.map +0 -1
- package/dist/esm/evm/evm.d.ts +0 -4
- package/dist/esm/evm/evm.js +0 -35
- package/dist/esm/evm/evm.js.map +0 -1
- package/dist/esm/evm/index.d.ts +0 -3
- package/dist/esm/evm/index.js +0 -20
- package/dist/esm/evm/index.js.map +0 -1
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +0 -18
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/lib/credentials/credentials.d.ts +0 -4
- package/dist/esm/lib/credentials/credentials.js +0 -25
- package/dist/esm/lib/credentials/credentials.js.map +0 -1
- package/dist/esm/lib/credentials/credentials.types.d.ts +0 -4
- package/dist/esm/lib/credentials/credentials.types.js +0 -3
- package/dist/esm/lib/credentials/credentials.types.js.map +0 -1
- package/dist/esm/lib/credentials/index.d.ts +0 -2
- package/dist/esm/lib/credentials/index.js +0 -19
- package/dist/esm/lib/credentials/index.js.map +0 -1
- package/dist/esm/lib/logging/index.d.ts +0 -1
- package/dist/esm/lib/logging/index.js +0 -18
- package/dist/esm/lib/logging/index.js.map +0 -1
- package/dist/esm/lib/logging/logging.d.ts +0 -2
- package/dist/esm/lib/logging/logging.js +0 -14
- package/dist/esm/lib/logging/logging.js.map +0 -1
- package/dist/esm/lib/obj/index.d.ts +0 -1
- package/dist/esm/lib/obj/index.js +0 -18
- package/dist/esm/lib/obj/index.js.map +0 -1
- package/dist/esm/lib/obj/obj.d.ts +0 -2
- package/dist/esm/lib/obj/obj.js +0 -31
- package/dist/esm/lib/obj/obj.js.map +0 -1
- package/dist/esm/lib/obj/obj.spec.d.ts +0 -1
- package/dist/esm/lib/obj/obj.spec.js +0 -31
- package/dist/esm/lib/obj/obj.spec.js.map +0 -1
- package/dist/esm/lib/sdk-env/index.d.ts +0 -3
- package/dist/esm/lib/sdk-env/index.js +0 -20
- package/dist/esm/lib/sdk-env/index.js.map +0 -1
- package/dist/esm/lib/sdk-env/sdk-env.constants.d.ts +0 -5
- package/dist/esm/lib/sdk-env/sdk-env.constants.js +0 -9
- package/dist/esm/lib/sdk-env/sdk-env.constants.js.map +0 -1
- package/dist/esm/lib/sdk-env/sdk-env.d.ts +0 -3
- package/dist/esm/lib/sdk-env/sdk-env.js +0 -13
- package/dist/esm/lib/sdk-env/sdk-env.js.map +0 -1
- package/dist/esm/lib/sdk-env/sdk-env.types.d.ts +0 -2
- package/dist/esm/lib/sdk-env/sdk-env.types.js +0 -3
- package/dist/esm/lib/sdk-env/sdk-env.types.js.map +0 -1
- package/dist/esm/lib/ws/index.d.ts +0 -1
- package/dist/esm/lib/ws/index.js +0 -18
- package/dist/esm/lib/ws/index.js.map +0 -1
- package/dist/esm/lib/ws/ws.d.ts +0 -2
- package/dist/esm/lib/ws/ws.js +0 -21
- package/dist/esm/lib/ws/ws.js.map +0 -1
- package/dist/esm/package.json +0 -3
- package/dist/esm/sui/account/account.d.ts +0 -3
- package/dist/esm/sui/account/account.js +0 -18
- package/dist/esm/sui/account/account.js.map +0 -1
- package/dist/esm/sui/account/index.d.ts +0 -1
- package/dist/esm/sui/account/index.js +0 -18
- package/dist/esm/sui/account/index.js.map +0 -1
- package/dist/esm/sui/index.d.ts +0 -3
- package/dist/esm/sui/index.js +0 -33
- package/dist/esm/sui/index.js.map +0 -1
- package/dist/esm/sui/sui.d.ts +0 -1
- package/dist/esm/sui/sui.js +0 -15
- package/dist/esm/sui/sui.js.map +0 -1
- package/dist/esm/sui/zk/account/account.d.ts +0 -3
- package/dist/esm/sui/zk/account/account.js +0 -18
- package/dist/esm/sui/zk/account/account.js.map +0 -1
- package/dist/esm/sui/zk/account/index.d.ts +0 -1
- package/dist/esm/sui/zk/account/index.js +0 -18
- package/dist/esm/sui/zk/account/index.js.map +0 -1
- package/dist/esm/sui/zk/index.d.ts +0 -1
- package/dist/esm/sui/zk/index.js +0 -18
- package/dist/esm/sui/zk/index.js.map +0 -1
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import { Socket } from 'socket.io-client';
|
|
2
|
+
|
|
3
|
+
type TCredentials = {
|
|
4
|
+
clientId: string;
|
|
5
|
+
clientSecret: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
declare const SDK_ENV: {
|
|
9
|
+
readonly PROD: "prod";
|
|
10
|
+
readonly STAGING: "staging";
|
|
11
|
+
readonly LOCAL: "local";
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
type TSdkEnv = (typeof SDK_ENV)[keyof typeof SDK_ENV];
|
|
15
|
+
|
|
16
|
+
declare function getOAuthApiUrl(): "https://accounts.credenza3.com" | "https://accounts.staging.credenza3.com" | "http://localhost:8081";
|
|
17
|
+
|
|
18
|
+
type TOAuthAccountInfo = {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
loginType: string;
|
|
22
|
+
picture?: string;
|
|
23
|
+
email?: string;
|
|
24
|
+
phone?: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
declare function getAccountInfo(sub: string): Promise<TOAuthAccountInfo>;
|
|
28
|
+
|
|
29
|
+
declare const index$h_getAccountInfo: typeof getAccountInfo;
|
|
30
|
+
declare namespace index$h {
|
|
31
|
+
export { index$h_getAccountInfo as getAccountInfo };
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare function getCurrentClientInfo(): Promise<{
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
callbackUris: string[];
|
|
38
|
+
confidential: boolean;
|
|
39
|
+
ownerId: string;
|
|
40
|
+
accessTokenTTLMinutes: number;
|
|
41
|
+
availableLoginTypes: string[];
|
|
42
|
+
admins: string[];
|
|
43
|
+
apiPermissions: string[];
|
|
44
|
+
logoUri?: string;
|
|
45
|
+
}>;
|
|
46
|
+
|
|
47
|
+
type TJwtAuthUpdateValidatorParams = {
|
|
48
|
+
validationFields?: string[];
|
|
49
|
+
jwksUrl?: string;
|
|
50
|
+
userinfoRequestConfig?: {
|
|
51
|
+
method?: string;
|
|
52
|
+
url?: string;
|
|
53
|
+
contentType?: string;
|
|
54
|
+
tokenParamName?: string;
|
|
55
|
+
tokenParamKind?: string;
|
|
56
|
+
tokenParamMask?: string;
|
|
57
|
+
};
|
|
58
|
+
profileFieldsMapping?: {
|
|
59
|
+
email?: string;
|
|
60
|
+
phone?: string;
|
|
61
|
+
picture?: string;
|
|
62
|
+
name?: string[];
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
type TJwtAuthValidatorParams = TJwtAuthUpdateValidatorParams & {
|
|
66
|
+
validationFields: string[];
|
|
67
|
+
};
|
|
68
|
+
type TJwtAuthValidator = TJwtAuthValidatorParams & {
|
|
69
|
+
id: string;
|
|
70
|
+
clientId: string;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
declare function addJwtValidator(params: TJwtAuthValidatorParams): Promise<TJwtAuthValidator>;
|
|
74
|
+
declare function updateJwtValidator(id: string, params: TJwtAuthUpdateValidatorParams): Promise<TJwtAuthValidator>;
|
|
75
|
+
declare function removeJwtValidator(id: string): Promise<boolean>;
|
|
76
|
+
declare function getJwtValidators(): Promise<TJwtAuthValidator[]>;
|
|
77
|
+
|
|
78
|
+
declare const index$g_addJwtValidator: typeof addJwtValidator;
|
|
79
|
+
declare const index$g_getJwtValidators: typeof getJwtValidators;
|
|
80
|
+
declare const index$g_removeJwtValidator: typeof removeJwtValidator;
|
|
81
|
+
declare const index$g_updateJwtValidator: typeof updateJwtValidator;
|
|
82
|
+
declare namespace index$g {
|
|
83
|
+
export { index$g_addJwtValidator as addJwtValidator, index$g_getJwtValidators as getJwtValidators, index$g_removeJwtValidator as removeJwtValidator, index$g_updateJwtValidator as updateJwtValidator };
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
declare const index$f_getCurrentClientInfo: typeof getCurrentClientInfo;
|
|
87
|
+
declare namespace index$f {
|
|
88
|
+
export { index$f_getCurrentClientInfo as getCurrentClientInfo, index$g as jwtAuth };
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
type TExchangeTokenParams = {
|
|
92
|
+
code: string;
|
|
93
|
+
codeVerifier: string;
|
|
94
|
+
redirectUri: string | null;
|
|
95
|
+
};
|
|
96
|
+
type TTokenResponse = {
|
|
97
|
+
accessToken: string;
|
|
98
|
+
idToken?: string | null;
|
|
99
|
+
refreshToken?: string | null;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
declare function exchangeCodeForToken(params: TExchangeTokenParams): Promise<TTokenResponse>;
|
|
103
|
+
declare function refreshToken(refreshTokenValue: string): Promise<TTokenResponse>;
|
|
104
|
+
|
|
105
|
+
declare const index$e_exchangeCodeForToken: typeof exchangeCodeForToken;
|
|
106
|
+
declare const index$e_refreshToken: typeof refreshToken;
|
|
107
|
+
declare namespace index$e {
|
|
108
|
+
export { index$e_exchangeCodeForToken as exchangeCodeForToken, index$e_refreshToken as refreshToken };
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
declare const index$d_getOAuthApiUrl: typeof getOAuthApiUrl;
|
|
112
|
+
declare namespace index$d {
|
|
113
|
+
export { index$f as client, index$d_getOAuthApiUrl as getOAuthApiUrl, index$e as oauth, index$h as user };
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
declare function getGeneralApiUrl(): string;
|
|
117
|
+
declare function getGeneralWsUrl(): string;
|
|
118
|
+
declare function getWsConnection$1(): Promise<Socket>;
|
|
119
|
+
|
|
120
|
+
type TNfcId = {
|
|
121
|
+
sub: string;
|
|
122
|
+
serialNumber: string;
|
|
123
|
+
text?: string;
|
|
124
|
+
};
|
|
125
|
+
type TUpdateNfcId = {
|
|
126
|
+
sub?: string;
|
|
127
|
+
text?: string;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
declare function addNfcId(params: TNfcId): Promise<TNfcId>;
|
|
131
|
+
declare function updateNfcId(serialNumber: string, params: TUpdateNfcId): Promise<boolean>;
|
|
132
|
+
declare function removeNfcId(serialNumber: string): Promise<boolean>;
|
|
133
|
+
declare function getNfcId(serialNumber: string): Promise<Omit<TNfcId, 'serialNumber'>>;
|
|
134
|
+
|
|
135
|
+
type index$c_TNfcId = TNfcId;
|
|
136
|
+
type index$c_TUpdateNfcId = TUpdateNfcId;
|
|
137
|
+
declare const index$c_addNfcId: typeof addNfcId;
|
|
138
|
+
declare const index$c_getNfcId: typeof getNfcId;
|
|
139
|
+
declare const index$c_removeNfcId: typeof removeNfcId;
|
|
140
|
+
declare const index$c_updateNfcId: typeof updateNfcId;
|
|
141
|
+
declare namespace index$c {
|
|
142
|
+
export { type index$c_TNfcId as TNfcId, type index$c_TUpdateNfcId as TUpdateNfcId, index$c_addNfcId as addNfcId, index$c_getNfcId as getNfcId, index$c_removeNfcId as removeNfcId, index$c_updateNfcId as updateNfcId };
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
declare function requestPassportIdSignature(sub: string, message: string): Promise<{
|
|
146
|
+
signature: string;
|
|
147
|
+
}>;
|
|
148
|
+
|
|
149
|
+
declare const index$b_requestPassportIdSignature: typeof requestPassportIdSignature;
|
|
150
|
+
declare namespace index$b {
|
|
151
|
+
export { index$b_requestPassportIdSignature as requestPassportIdSignature };
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
type TUpdateRuleParams = {
|
|
155
|
+
title?: string;
|
|
156
|
+
description?: string;
|
|
157
|
+
resourceId?: string;
|
|
158
|
+
chainType?: string;
|
|
159
|
+
chainId?: number;
|
|
160
|
+
type?: string;
|
|
161
|
+
value?: unknown;
|
|
162
|
+
};
|
|
163
|
+
type TCreateRuleParams = Required<TUpdateRuleParams>;
|
|
164
|
+
type TRule = TCreateRuleParams & {
|
|
165
|
+
id: string;
|
|
166
|
+
clientId: string;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
declare function addPromoRule(params: TCreateRuleParams): Promise<TRule>;
|
|
170
|
+
declare function updatePromoRule(id: string, params: TUpdateRuleParams): Promise<TRule>;
|
|
171
|
+
declare function removePromoRule(id: string): Promise<boolean>;
|
|
172
|
+
declare function getPromoRules(): Promise<TRule[]>;
|
|
173
|
+
|
|
174
|
+
declare const index$a_addPromoRule: typeof addPromoRule;
|
|
175
|
+
declare const index$a_getPromoRules: typeof getPromoRules;
|
|
176
|
+
declare const index$a_removePromoRule: typeof removePromoRule;
|
|
177
|
+
declare const index$a_updatePromoRule: typeof updatePromoRule;
|
|
178
|
+
declare namespace index$a {
|
|
179
|
+
export { index$a_addPromoRule as addPromoRule, index$a_getPromoRules as getPromoRules, index$a_removePromoRule as removePromoRule, index$a_updatePromoRule as updatePromoRule };
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
type TUpdateOfferParams = {
|
|
183
|
+
title?: string;
|
|
184
|
+
description?: string;
|
|
185
|
+
includeRules?: string[];
|
|
186
|
+
excludeRules?: string[];
|
|
187
|
+
code?: string;
|
|
188
|
+
};
|
|
189
|
+
type TCreateOfferParams = Required<TUpdateOfferParams>;
|
|
190
|
+
type TOffer = TCreateOfferParams & {
|
|
191
|
+
id: string;
|
|
192
|
+
clientId: string;
|
|
193
|
+
};
|
|
194
|
+
type TOfferRss = {
|
|
195
|
+
code: string;
|
|
196
|
+
offerId: string;
|
|
197
|
+
rss: {
|
|
198
|
+
title: string;
|
|
199
|
+
description: string;
|
|
200
|
+
link: string;
|
|
201
|
+
imageLink: string;
|
|
202
|
+
pubDate: string;
|
|
203
|
+
offerId: string;
|
|
204
|
+
}[];
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
declare function addPromoOffer(params: TCreateOfferParams): Promise<TOffer>;
|
|
208
|
+
declare function updatePromoOffer(id: string, params: TUpdateOfferParams): Promise<TOffer>;
|
|
209
|
+
declare function removePromoOffer(id: string): Promise<boolean>;
|
|
210
|
+
declare function getPromoOffers(): Promise<TOffer[]>;
|
|
211
|
+
declare function checkPromoOffer(id: string, sub: string): Promise<boolean>;
|
|
212
|
+
declare function getPromoOfferRss(params: {
|
|
213
|
+
suiAddress?: string;
|
|
214
|
+
evmAddress?: string;
|
|
215
|
+
}): Promise<TOfferRss[]>;
|
|
216
|
+
|
|
217
|
+
declare const index$9_addPromoOffer: typeof addPromoOffer;
|
|
218
|
+
declare const index$9_checkPromoOffer: typeof checkPromoOffer;
|
|
219
|
+
declare const index$9_getPromoOfferRss: typeof getPromoOfferRss;
|
|
220
|
+
declare const index$9_getPromoOffers: typeof getPromoOffers;
|
|
221
|
+
declare const index$9_removePromoOffer: typeof removePromoOffer;
|
|
222
|
+
declare const index$9_updatePromoOffer: typeof updatePromoOffer;
|
|
223
|
+
declare namespace index$9 {
|
|
224
|
+
export { index$9_addPromoOffer as addPromoOffer, index$9_checkPromoOffer as checkPromoOffer, index$9_getPromoOfferRss as getPromoOfferRss, index$9_getPromoOffers as getPromoOffers, index$9_removePromoOffer as removePromoOffer, index$9_updatePromoOffer as updatePromoOffer };
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
declare namespace index$8 {
|
|
228
|
+
export { index$9 as offers, index$a as rules };
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
declare const index$7_getGeneralApiUrl: typeof getGeneralApiUrl;
|
|
232
|
+
declare const index$7_getGeneralWsUrl: typeof getGeneralWsUrl;
|
|
233
|
+
declare namespace index$7 {
|
|
234
|
+
export { index$7_getGeneralApiUrl as getGeneralApiUrl, index$7_getGeneralWsUrl as getGeneralWsUrl, getWsConnection$1 as getWsConnection, index$c as nfcId, index$b as passportId, index$8 as promo };
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
declare function getEvmApiUrl(): "https://evm.credenza3.com" | "https://evm.staging.credenza3.com" | "http://localhost:8082";
|
|
238
|
+
declare function getEvmWsUrl(): string;
|
|
239
|
+
declare function getWsConnection(): Promise<Socket>;
|
|
240
|
+
|
|
241
|
+
declare function getEvmAddress(sub: string): Promise<{
|
|
242
|
+
address: string;
|
|
243
|
+
}>;
|
|
244
|
+
|
|
245
|
+
declare const index$6_getEvmAddress: typeof getEvmAddress;
|
|
246
|
+
declare namespace index$6 {
|
|
247
|
+
export { index$6_getEvmAddress as getEvmAddress };
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
declare function getAvailableEvmContracts(): Promise<string[]>;
|
|
251
|
+
declare function findEvmContracts(params?: {
|
|
252
|
+
name?: string;
|
|
253
|
+
type?: string;
|
|
254
|
+
chain_id?: number;
|
|
255
|
+
}): Promise<string[]>;
|
|
256
|
+
declare function deployEvmContract(name: string, chainId: number, ownerAddresses: string[]): Promise<unknown>;
|
|
257
|
+
declare function sendEvmMetaTransaction(unsignedSerializedMetaTx: string): Promise<unknown>;
|
|
258
|
+
|
|
259
|
+
declare const index$5_deployEvmContract: typeof deployEvmContract;
|
|
260
|
+
declare const index$5_findEvmContracts: typeof findEvmContracts;
|
|
261
|
+
declare const index$5_getAvailableEvmContracts: typeof getAvailableEvmContracts;
|
|
262
|
+
declare const index$5_sendEvmMetaTransaction: typeof sendEvmMetaTransaction;
|
|
263
|
+
declare namespace index$5 {
|
|
264
|
+
export { index$5_deployEvmContract as deployEvmContract, index$5_findEvmContracts as findEvmContracts, index$5_getAvailableEvmContracts as getAvailableEvmContracts, index$5_sendEvmMetaTransaction as sendEvmMetaTransaction };
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
declare const index$4_getEvmApiUrl: typeof getEvmApiUrl;
|
|
268
|
+
declare const index$4_getEvmWsUrl: typeof getEvmWsUrl;
|
|
269
|
+
declare const index$4_getWsConnection: typeof getWsConnection;
|
|
270
|
+
declare namespace index$4 {
|
|
271
|
+
export { index$6 as account, index$5 as contract, index$4_getEvmApiUrl as getEvmApiUrl, index$4_getEvmWsUrl as getEvmWsUrl, index$4_getWsConnection as getWsConnection };
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
declare function getSuiApiUrl(): "https://sui.credenza3.com" | "https://sui.staging.credenza3.com" | "http://localhost:8083";
|
|
275
|
+
|
|
276
|
+
declare function getSuiAddress(sub: string): Promise<{
|
|
277
|
+
address: string;
|
|
278
|
+
}>;
|
|
279
|
+
|
|
280
|
+
declare const index$3_getSuiAddress: typeof getSuiAddress;
|
|
281
|
+
declare namespace index$3 {
|
|
282
|
+
export { index$3_getSuiAddress as getSuiAddress };
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
declare function getSuiZkAddress(sub: string): Promise<{
|
|
286
|
+
address: string;
|
|
287
|
+
}>;
|
|
288
|
+
|
|
289
|
+
declare const index$2_getSuiZkAddress: typeof getSuiZkAddress;
|
|
290
|
+
declare namespace index$2 {
|
|
291
|
+
export { index$2_getSuiZkAddress as getSuiZkAddress };
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
declare namespace index$1 {
|
|
295
|
+
export { index$2 as account };
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
declare const index_getSuiApiUrl: typeof getSuiApiUrl;
|
|
299
|
+
declare namespace index {
|
|
300
|
+
export { index$3 as account, index_getSuiApiUrl as getSuiApiUrl, index$1 as zk };
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
declare function useAuth(credentials: TCredentials): void;
|
|
304
|
+
declare function useEnv(sdkEnv: TSdkEnv): void;
|
|
305
|
+
declare function useDebug(enableDebug: boolean): void;
|
|
306
|
+
|
|
307
|
+
export { index$d as accounts, index$7 as api, index$4 as evm, index as sui, useAuth, useDebug, useEnv };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import { Socket } from 'socket.io-client';
|
|
2
|
+
|
|
3
|
+
type TCredentials = {
|
|
4
|
+
clientId: string;
|
|
5
|
+
clientSecret: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
declare const SDK_ENV: {
|
|
9
|
+
readonly PROD: "prod";
|
|
10
|
+
readonly STAGING: "staging";
|
|
11
|
+
readonly LOCAL: "local";
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
type TSdkEnv = (typeof SDK_ENV)[keyof typeof SDK_ENV];
|
|
15
|
+
|
|
16
|
+
declare function getOAuthApiUrl(): "https://accounts.credenza3.com" | "https://accounts.staging.credenza3.com" | "http://localhost:8081";
|
|
17
|
+
|
|
18
|
+
type TOAuthAccountInfo = {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
loginType: string;
|
|
22
|
+
picture?: string;
|
|
23
|
+
email?: string;
|
|
24
|
+
phone?: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
declare function getAccountInfo(sub: string): Promise<TOAuthAccountInfo>;
|
|
28
|
+
|
|
29
|
+
declare const index$h_getAccountInfo: typeof getAccountInfo;
|
|
30
|
+
declare namespace index$h {
|
|
31
|
+
export { index$h_getAccountInfo as getAccountInfo };
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare function getCurrentClientInfo(): Promise<{
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
callbackUris: string[];
|
|
38
|
+
confidential: boolean;
|
|
39
|
+
ownerId: string;
|
|
40
|
+
accessTokenTTLMinutes: number;
|
|
41
|
+
availableLoginTypes: string[];
|
|
42
|
+
admins: string[];
|
|
43
|
+
apiPermissions: string[];
|
|
44
|
+
logoUri?: string;
|
|
45
|
+
}>;
|
|
46
|
+
|
|
47
|
+
type TJwtAuthUpdateValidatorParams = {
|
|
48
|
+
validationFields?: string[];
|
|
49
|
+
jwksUrl?: string;
|
|
50
|
+
userinfoRequestConfig?: {
|
|
51
|
+
method?: string;
|
|
52
|
+
url?: string;
|
|
53
|
+
contentType?: string;
|
|
54
|
+
tokenParamName?: string;
|
|
55
|
+
tokenParamKind?: string;
|
|
56
|
+
tokenParamMask?: string;
|
|
57
|
+
};
|
|
58
|
+
profileFieldsMapping?: {
|
|
59
|
+
email?: string;
|
|
60
|
+
phone?: string;
|
|
61
|
+
picture?: string;
|
|
62
|
+
name?: string[];
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
type TJwtAuthValidatorParams = TJwtAuthUpdateValidatorParams & {
|
|
66
|
+
validationFields: string[];
|
|
67
|
+
};
|
|
68
|
+
type TJwtAuthValidator = TJwtAuthValidatorParams & {
|
|
69
|
+
id: string;
|
|
70
|
+
clientId: string;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
declare function addJwtValidator(params: TJwtAuthValidatorParams): Promise<TJwtAuthValidator>;
|
|
74
|
+
declare function updateJwtValidator(id: string, params: TJwtAuthUpdateValidatorParams): Promise<TJwtAuthValidator>;
|
|
75
|
+
declare function removeJwtValidator(id: string): Promise<boolean>;
|
|
76
|
+
declare function getJwtValidators(): Promise<TJwtAuthValidator[]>;
|
|
77
|
+
|
|
78
|
+
declare const index$g_addJwtValidator: typeof addJwtValidator;
|
|
79
|
+
declare const index$g_getJwtValidators: typeof getJwtValidators;
|
|
80
|
+
declare const index$g_removeJwtValidator: typeof removeJwtValidator;
|
|
81
|
+
declare const index$g_updateJwtValidator: typeof updateJwtValidator;
|
|
82
|
+
declare namespace index$g {
|
|
83
|
+
export { index$g_addJwtValidator as addJwtValidator, index$g_getJwtValidators as getJwtValidators, index$g_removeJwtValidator as removeJwtValidator, index$g_updateJwtValidator as updateJwtValidator };
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
declare const index$f_getCurrentClientInfo: typeof getCurrentClientInfo;
|
|
87
|
+
declare namespace index$f {
|
|
88
|
+
export { index$f_getCurrentClientInfo as getCurrentClientInfo, index$g as jwtAuth };
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
type TExchangeTokenParams = {
|
|
92
|
+
code: string;
|
|
93
|
+
codeVerifier: string;
|
|
94
|
+
redirectUri: string | null;
|
|
95
|
+
};
|
|
96
|
+
type TTokenResponse = {
|
|
97
|
+
accessToken: string;
|
|
98
|
+
idToken?: string | null;
|
|
99
|
+
refreshToken?: string | null;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
declare function exchangeCodeForToken(params: TExchangeTokenParams): Promise<TTokenResponse>;
|
|
103
|
+
declare function refreshToken(refreshTokenValue: string): Promise<TTokenResponse>;
|
|
104
|
+
|
|
105
|
+
declare const index$e_exchangeCodeForToken: typeof exchangeCodeForToken;
|
|
106
|
+
declare const index$e_refreshToken: typeof refreshToken;
|
|
107
|
+
declare namespace index$e {
|
|
108
|
+
export { index$e_exchangeCodeForToken as exchangeCodeForToken, index$e_refreshToken as refreshToken };
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
declare const index$d_getOAuthApiUrl: typeof getOAuthApiUrl;
|
|
112
|
+
declare namespace index$d {
|
|
113
|
+
export { index$f as client, index$d_getOAuthApiUrl as getOAuthApiUrl, index$e as oauth, index$h as user };
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
declare function getGeneralApiUrl(): string;
|
|
117
|
+
declare function getGeneralWsUrl(): string;
|
|
118
|
+
declare function getWsConnection$1(): Promise<Socket>;
|
|
119
|
+
|
|
120
|
+
type TNfcId = {
|
|
121
|
+
sub: string;
|
|
122
|
+
serialNumber: string;
|
|
123
|
+
text?: string;
|
|
124
|
+
};
|
|
125
|
+
type TUpdateNfcId = {
|
|
126
|
+
sub?: string;
|
|
127
|
+
text?: string;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
declare function addNfcId(params: TNfcId): Promise<TNfcId>;
|
|
131
|
+
declare function updateNfcId(serialNumber: string, params: TUpdateNfcId): Promise<boolean>;
|
|
132
|
+
declare function removeNfcId(serialNumber: string): Promise<boolean>;
|
|
133
|
+
declare function getNfcId(serialNumber: string): Promise<Omit<TNfcId, 'serialNumber'>>;
|
|
134
|
+
|
|
135
|
+
type index$c_TNfcId = TNfcId;
|
|
136
|
+
type index$c_TUpdateNfcId = TUpdateNfcId;
|
|
137
|
+
declare const index$c_addNfcId: typeof addNfcId;
|
|
138
|
+
declare const index$c_getNfcId: typeof getNfcId;
|
|
139
|
+
declare const index$c_removeNfcId: typeof removeNfcId;
|
|
140
|
+
declare const index$c_updateNfcId: typeof updateNfcId;
|
|
141
|
+
declare namespace index$c {
|
|
142
|
+
export { type index$c_TNfcId as TNfcId, type index$c_TUpdateNfcId as TUpdateNfcId, index$c_addNfcId as addNfcId, index$c_getNfcId as getNfcId, index$c_removeNfcId as removeNfcId, index$c_updateNfcId as updateNfcId };
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
declare function requestPassportIdSignature(sub: string, message: string): Promise<{
|
|
146
|
+
signature: string;
|
|
147
|
+
}>;
|
|
148
|
+
|
|
149
|
+
declare const index$b_requestPassportIdSignature: typeof requestPassportIdSignature;
|
|
150
|
+
declare namespace index$b {
|
|
151
|
+
export { index$b_requestPassportIdSignature as requestPassportIdSignature };
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
type TUpdateRuleParams = {
|
|
155
|
+
title?: string;
|
|
156
|
+
description?: string;
|
|
157
|
+
resourceId?: string;
|
|
158
|
+
chainType?: string;
|
|
159
|
+
chainId?: number;
|
|
160
|
+
type?: string;
|
|
161
|
+
value?: unknown;
|
|
162
|
+
};
|
|
163
|
+
type TCreateRuleParams = Required<TUpdateRuleParams>;
|
|
164
|
+
type TRule = TCreateRuleParams & {
|
|
165
|
+
id: string;
|
|
166
|
+
clientId: string;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
declare function addPromoRule(params: TCreateRuleParams): Promise<TRule>;
|
|
170
|
+
declare function updatePromoRule(id: string, params: TUpdateRuleParams): Promise<TRule>;
|
|
171
|
+
declare function removePromoRule(id: string): Promise<boolean>;
|
|
172
|
+
declare function getPromoRules(): Promise<TRule[]>;
|
|
173
|
+
|
|
174
|
+
declare const index$a_addPromoRule: typeof addPromoRule;
|
|
175
|
+
declare const index$a_getPromoRules: typeof getPromoRules;
|
|
176
|
+
declare const index$a_removePromoRule: typeof removePromoRule;
|
|
177
|
+
declare const index$a_updatePromoRule: typeof updatePromoRule;
|
|
178
|
+
declare namespace index$a {
|
|
179
|
+
export { index$a_addPromoRule as addPromoRule, index$a_getPromoRules as getPromoRules, index$a_removePromoRule as removePromoRule, index$a_updatePromoRule as updatePromoRule };
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
type TUpdateOfferParams = {
|
|
183
|
+
title?: string;
|
|
184
|
+
description?: string;
|
|
185
|
+
includeRules?: string[];
|
|
186
|
+
excludeRules?: string[];
|
|
187
|
+
code?: string;
|
|
188
|
+
};
|
|
189
|
+
type TCreateOfferParams = Required<TUpdateOfferParams>;
|
|
190
|
+
type TOffer = TCreateOfferParams & {
|
|
191
|
+
id: string;
|
|
192
|
+
clientId: string;
|
|
193
|
+
};
|
|
194
|
+
type TOfferRss = {
|
|
195
|
+
code: string;
|
|
196
|
+
offerId: string;
|
|
197
|
+
rss: {
|
|
198
|
+
title: string;
|
|
199
|
+
description: string;
|
|
200
|
+
link: string;
|
|
201
|
+
imageLink: string;
|
|
202
|
+
pubDate: string;
|
|
203
|
+
offerId: string;
|
|
204
|
+
}[];
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
declare function addPromoOffer(params: TCreateOfferParams): Promise<TOffer>;
|
|
208
|
+
declare function updatePromoOffer(id: string, params: TUpdateOfferParams): Promise<TOffer>;
|
|
209
|
+
declare function removePromoOffer(id: string): Promise<boolean>;
|
|
210
|
+
declare function getPromoOffers(): Promise<TOffer[]>;
|
|
211
|
+
declare function checkPromoOffer(id: string, sub: string): Promise<boolean>;
|
|
212
|
+
declare function getPromoOfferRss(params: {
|
|
213
|
+
suiAddress?: string;
|
|
214
|
+
evmAddress?: string;
|
|
215
|
+
}): Promise<TOfferRss[]>;
|
|
216
|
+
|
|
217
|
+
declare const index$9_addPromoOffer: typeof addPromoOffer;
|
|
218
|
+
declare const index$9_checkPromoOffer: typeof checkPromoOffer;
|
|
219
|
+
declare const index$9_getPromoOfferRss: typeof getPromoOfferRss;
|
|
220
|
+
declare const index$9_getPromoOffers: typeof getPromoOffers;
|
|
221
|
+
declare const index$9_removePromoOffer: typeof removePromoOffer;
|
|
222
|
+
declare const index$9_updatePromoOffer: typeof updatePromoOffer;
|
|
223
|
+
declare namespace index$9 {
|
|
224
|
+
export { index$9_addPromoOffer as addPromoOffer, index$9_checkPromoOffer as checkPromoOffer, index$9_getPromoOfferRss as getPromoOfferRss, index$9_getPromoOffers as getPromoOffers, index$9_removePromoOffer as removePromoOffer, index$9_updatePromoOffer as updatePromoOffer };
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
declare namespace index$8 {
|
|
228
|
+
export { index$9 as offers, index$a as rules };
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
declare const index$7_getGeneralApiUrl: typeof getGeneralApiUrl;
|
|
232
|
+
declare const index$7_getGeneralWsUrl: typeof getGeneralWsUrl;
|
|
233
|
+
declare namespace index$7 {
|
|
234
|
+
export { index$7_getGeneralApiUrl as getGeneralApiUrl, index$7_getGeneralWsUrl as getGeneralWsUrl, getWsConnection$1 as getWsConnection, index$c as nfcId, index$b as passportId, index$8 as promo };
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
declare function getEvmApiUrl(): "https://evm.credenza3.com" | "https://evm.staging.credenza3.com" | "http://localhost:8082";
|
|
238
|
+
declare function getEvmWsUrl(): string;
|
|
239
|
+
declare function getWsConnection(): Promise<Socket>;
|
|
240
|
+
|
|
241
|
+
declare function getEvmAddress(sub: string): Promise<{
|
|
242
|
+
address: string;
|
|
243
|
+
}>;
|
|
244
|
+
|
|
245
|
+
declare const index$6_getEvmAddress: typeof getEvmAddress;
|
|
246
|
+
declare namespace index$6 {
|
|
247
|
+
export { index$6_getEvmAddress as getEvmAddress };
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
declare function getAvailableEvmContracts(): Promise<string[]>;
|
|
251
|
+
declare function findEvmContracts(params?: {
|
|
252
|
+
name?: string;
|
|
253
|
+
type?: string;
|
|
254
|
+
chain_id?: number;
|
|
255
|
+
}): Promise<string[]>;
|
|
256
|
+
declare function deployEvmContract(name: string, chainId: number, ownerAddresses: string[]): Promise<unknown>;
|
|
257
|
+
declare function sendEvmMetaTransaction(unsignedSerializedMetaTx: string): Promise<unknown>;
|
|
258
|
+
|
|
259
|
+
declare const index$5_deployEvmContract: typeof deployEvmContract;
|
|
260
|
+
declare const index$5_findEvmContracts: typeof findEvmContracts;
|
|
261
|
+
declare const index$5_getAvailableEvmContracts: typeof getAvailableEvmContracts;
|
|
262
|
+
declare const index$5_sendEvmMetaTransaction: typeof sendEvmMetaTransaction;
|
|
263
|
+
declare namespace index$5 {
|
|
264
|
+
export { index$5_deployEvmContract as deployEvmContract, index$5_findEvmContracts as findEvmContracts, index$5_getAvailableEvmContracts as getAvailableEvmContracts, index$5_sendEvmMetaTransaction as sendEvmMetaTransaction };
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
declare const index$4_getEvmApiUrl: typeof getEvmApiUrl;
|
|
268
|
+
declare const index$4_getEvmWsUrl: typeof getEvmWsUrl;
|
|
269
|
+
declare const index$4_getWsConnection: typeof getWsConnection;
|
|
270
|
+
declare namespace index$4 {
|
|
271
|
+
export { index$6 as account, index$5 as contract, index$4_getEvmApiUrl as getEvmApiUrl, index$4_getEvmWsUrl as getEvmWsUrl, index$4_getWsConnection as getWsConnection };
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
declare function getSuiApiUrl(): "https://sui.credenza3.com" | "https://sui.staging.credenza3.com" | "http://localhost:8083";
|
|
275
|
+
|
|
276
|
+
declare function getSuiAddress(sub: string): Promise<{
|
|
277
|
+
address: string;
|
|
278
|
+
}>;
|
|
279
|
+
|
|
280
|
+
declare const index$3_getSuiAddress: typeof getSuiAddress;
|
|
281
|
+
declare namespace index$3 {
|
|
282
|
+
export { index$3_getSuiAddress as getSuiAddress };
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
declare function getSuiZkAddress(sub: string): Promise<{
|
|
286
|
+
address: string;
|
|
287
|
+
}>;
|
|
288
|
+
|
|
289
|
+
declare const index$2_getSuiZkAddress: typeof getSuiZkAddress;
|
|
290
|
+
declare namespace index$2 {
|
|
291
|
+
export { index$2_getSuiZkAddress as getSuiZkAddress };
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
declare namespace index$1 {
|
|
295
|
+
export { index$2 as account };
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
declare const index_getSuiApiUrl: typeof getSuiApiUrl;
|
|
299
|
+
declare namespace index {
|
|
300
|
+
export { index$3 as account, index_getSuiApiUrl as getSuiApiUrl, index$1 as zk };
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
declare function useAuth(credentials: TCredentials): void;
|
|
304
|
+
declare function useEnv(sdkEnv: TSdkEnv): void;
|
|
305
|
+
declare function useDebug(enableDebug: boolean): void;
|
|
306
|
+
|
|
307
|
+
export { index$d as accounts, index$7 as api, index$4 as evm, index as sui, useAuth, useDebug, useEnv };
|