@superdurable/connector-braze 0.1.0 → 0.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/README.md +4 -2
- package/dex-connector.json +367 -2
- package/dist/chunk-E4CIKIAP.js +400 -0
- package/dist/connection-DIkDjeJK.d.ts +282 -0
- package/dist/index.d.ts +384 -6
- package/dist/index.js +662 -15
- package/dist/mock.d.ts +140 -3
- package/dist/mock.js +342 -3
- package/package.json +2 -2
- package/dist/chunk-VGRZKZ7B.js +0 -108
- package/dist/connection-CJqjLDg0.d.ts +0 -78
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { SecretString, CredentialProvider, Query, ConnectionRef } from '@superdurable/connectors-sdk';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
|
|
4
|
-
/** Connector configuration; omitted fields use manifest defaults. */
|
|
5
|
-
interface Config {
|
|
6
|
-
/** Your account's HTTPS REST endpoint from Braze Dashboard > Settings > APIs and Identifiers > API Keys > REST Endpoint, such as https://rest.iad-01.braze.com. This non-secret endpoint is required; blank prevents calls. */
|
|
7
|
-
baseUrl: string;
|
|
8
|
-
/** Maximum duration of one API request as a positive Go duration such as 15s. Blank uses the displayed default; increase for slow profile exports. Runtime value in milliseconds. */
|
|
9
|
-
timeoutMs?: number;
|
|
10
|
-
/** Maximum complete response in bytes as a positive integer. Blank uses the displayed default; increase for known larger selected profiles. */
|
|
11
|
-
maxResponseBytes?: number;
|
|
12
|
-
}
|
|
13
|
-
/** Runtime schema for manifest configuration. */
|
|
14
|
-
declare const ConfigSchema: z.ZodObject<{
|
|
15
|
-
baseUrl: z.ZodString;
|
|
16
|
-
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
17
|
-
maxResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
18
|
-
}, z.core.$strip>;
|
|
19
|
-
/** Private connector credentials resolved by the host. */
|
|
20
|
-
interface Credentials {
|
|
21
|
-
/** Secret REST API key from Braze Dashboard > Settings > APIs and Identifiers > API Keys. Create or select a key with users.export.ids permission, copy its value into this secret field; blank prevents calls. Dex sends it only as a Bearer token. */
|
|
22
|
-
restApiKey: SecretString;
|
|
23
|
-
}
|
|
24
|
-
/** Decode private credential fields for the connector. */
|
|
25
|
-
declare function decodeCredentials(value: unknown): Credentials;
|
|
26
|
-
/** Host-owned source of private connector credentials. */
|
|
27
|
-
type CredentialSource = CredentialProvider<Credentials>;
|
|
28
|
-
/** GetUserProfileInput selects a Braze user by the application's external ID. */
|
|
29
|
-
interface GetUserProfileInput {
|
|
30
|
-
/** ExternalID is a non-secret stable application user ID. */
|
|
31
|
-
"externalId": string;
|
|
32
|
-
}
|
|
33
|
-
/** UserProfile contains only the selected profile fields, excluding custom attributes. */
|
|
34
|
-
interface UserProfile {
|
|
35
|
-
/** ExternalID is the application-supplied user ID. */
|
|
36
|
-
"externalId": string;
|
|
37
|
-
/** BrazeID is Braze's internal user ID. */
|
|
38
|
-
"brazeId"?: string | undefined;
|
|
39
|
-
/** FirstName is the optional given name. */
|
|
40
|
-
"firstName"?: string | undefined;
|
|
41
|
-
/** LastName is the optional family name. */
|
|
42
|
-
"lastName"?: string | undefined;
|
|
43
|
-
/** Email is the optional email address. */
|
|
44
|
-
"email"?: string | undefined;
|
|
45
|
-
}
|
|
46
|
-
/** Runtime validator for GetUserProfileInput. */
|
|
47
|
-
declare const GetUserProfileInputSchema: z.ZodObject<{
|
|
48
|
-
externalId: z.ZodString;
|
|
49
|
-
}, z.core.$strict>;
|
|
50
|
-
/** Runtime validator for UserProfile. */
|
|
51
|
-
declare const UserProfileSchema: z.ZodObject<{
|
|
52
|
-
externalId: z.ZodString;
|
|
53
|
-
brazeId: z.ZodOptional<z.ZodString>;
|
|
54
|
-
firstName: z.ZodOptional<z.ZodString>;
|
|
55
|
-
lastName: z.ZodOptional<z.ZodString>;
|
|
56
|
-
email: z.ZodOptional<z.ZodString>;
|
|
57
|
-
}, z.core.$strict>;
|
|
58
|
-
|
|
59
|
-
/** Typed operations supplied by a client or mock. */
|
|
60
|
-
interface Operations {
|
|
61
|
-
/** Invoke getUserProfile through this connection. */
|
|
62
|
-
getUserProfile(): Query<GetUserProfileInput, UserProfile>;
|
|
63
|
-
}
|
|
64
|
-
/** Named connector connection kept outside Flow state. */
|
|
65
|
-
declare class Connection<BoundOperations = Operations> {
|
|
66
|
-
/** Stable provider and connection name. */
|
|
67
|
-
readonly reference: ConnectionRef;
|
|
68
|
-
/** Bound provider operations. */
|
|
69
|
-
readonly operations: BoundOperations;
|
|
70
|
-
/** Validate a reference and bind operations. */
|
|
71
|
-
constructor(reference: ConnectionRef, operations: BoundOperations);
|
|
72
|
-
}
|
|
73
|
-
/** Bind a client to a named connection. */
|
|
74
|
-
declare function newConnection(client: Operations, reference: ConnectionRef): Connection;
|
|
75
|
-
/** Bind scripted operations to a named connection. */
|
|
76
|
-
declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
|
|
77
|
-
|
|
78
|
-
export { Connection as C, type GetUserProfileInput as G, type Operations as O, type UserProfile as U, type Config as a, type Credentials as b, ConfigSchema as c, type CredentialSource as d, GetUserProfileInputSchema as e, UserProfileSchema as f, decodeCredentials as g, newConnectionWithOperations as h, newConnection as n };
|