@superdurable/connector-amplitude 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.
@@ -1,74 +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
- /** Dashboard REST API HTTPS root. Blank uses the displayed US-region default; override with https://analytics.eu.amplitude.com for EU data residency or a verified regional host. Do not include path, query, or credentials. */
7
- baseUrl?: string;
8
- /** Maximum duration of one user search as a positive Go duration. Blank uses the displayed default; increase only for slow responses. Runtime value in milliseconds. */
9
- timeoutMs?: number;
10
- /** Maximum complete user-search JSON response in bytes as a positive integer. Blank uses the displayed default; increase if a project returns many matches. */
11
- maxResponseBytes?: number;
12
- }
13
- /** Runtime schema for manifest configuration. */
14
- declare const ConfigSchema: z.ZodObject<{
15
- baseUrl: z.ZodOptional<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 project API key from Amplitude > Organization settings > API Keys > select project > Generate API Key or existing key. Copy its complete value, not the key name; blank prevents calls. Dex sends it as the Basic-auth username. */
22
- apiKey: SecretString;
23
- /** Secret project secret key from Amplitude > Organization settings > API Keys > select project > Generate Secret Key. Copy the complete key at creation; the Key ID is not the secret. Blank prevents calls. Dex sends it as the Basic-auth password. */
24
- secretKey: SecretString;
25
- }
26
- /** Decode private credential fields for the connector. */
27
- declare function decodeCredentials(value: unknown): Credentials;
28
- /** Host-owned source of private connector credentials. */
29
- type CredentialSource = CredentialProvider<Credentials>;
30
- /** SearchUsersInput identifies a user by ID, device ID, Amplitude ID, or user ID prefix. */
31
- interface SearchUsersInput {
32
- /** User is the non-secret search term accepted by Amplitude User Search. */
33
- "user": string;
34
- }
35
- /** UserSearchPage contains the matched user IDs and Amplitude's match type. */
36
- interface UserSearchPage {
37
- /** User is the search term supplied to Amplitude. */
38
- "user": string;
39
- /** UserIDs are the matched user IDs in provider order. */
40
- "userIDs": Array<string> | null;
41
- /** MatchType names the matching strategy reported by Amplitude. */
42
- "matchType": string;
43
- }
44
- /** Runtime validator for SearchUsersInput. */
45
- declare const SearchUsersInputSchema: z.ZodObject<{
46
- user: z.ZodString;
47
- }, z.core.$strict>;
48
- /** Runtime validator for UserSearchPage. */
49
- declare const UserSearchPageSchema: z.ZodObject<{
50
- user: z.ZodString;
51
- userIDs: z.ZodNullable<z.ZodArray<z.ZodString>>;
52
- matchType: z.ZodString;
53
- }, z.core.$strict>;
54
-
55
- /** Typed operations supplied by a client or mock. */
56
- interface Operations {
57
- /** Invoke searchUsers through this connection. */
58
- searchUsers(): Query<SearchUsersInput, UserSearchPage>;
59
- }
60
- /** Named connector connection kept outside Flow state. */
61
- declare class Connection<BoundOperations = Operations> {
62
- /** Stable provider and connection name. */
63
- readonly reference: ConnectionRef;
64
- /** Bound provider operations. */
65
- readonly operations: BoundOperations;
66
- /** Validate a reference and bind operations. */
67
- constructor(reference: ConnectionRef, operations: BoundOperations);
68
- }
69
- /** Bind a client to a named connection. */
70
- declare function newConnection(client: Operations, reference: ConnectionRef): Connection;
71
- /** Bind scripted operations to a named connection. */
72
- declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
73
-
74
- export { Connection as C, type Operations as O, type SearchUsersInput as S, type UserSearchPage as U, type Config as a, type Credentials as b, ConfigSchema as c, type CredentialSource as d, SearchUsersInputSchema as e, UserSearchPageSchema as f, decodeCredentials as g, newConnectionWithOperations as h, newConnection as n };