@rawdash/connector-launchdarkly 0.17.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 +119 -0
- package/dist/index.d.ts +492 -0
- package/dist/index.js +731 -0
- package/dist/index.js.map +1 -0
- package/package.json +43 -0
package/README.md
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<!-- This file is generated from connector metadata by scripts/generate-connector-docs.ts. Do not edit by hand. -->
|
|
2
|
+
|
|
3
|
+
# @rawdash/connector-launchdarkly
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@rawdash/connector-launchdarkly)
|
|
6
|
+
[](https://github.com/rawdash/rawdash/blob/main/LICENSE)
|
|
7
|
+
|
|
8
|
+
Sync LaunchDarkly projects, feature flags, and audit-log events - including flag state per environment, kind, and recent rollout changes.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
npm install @rawdash/connector-launchdarkly
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Authentication
|
|
17
|
+
|
|
18
|
+
A LaunchDarkly API access token with read access is required. Personal or service tokens both work; a reader-role service token is the recommended minimum.
|
|
19
|
+
|
|
20
|
+
1. Open LaunchDarkly -> Account settings -> Authorization -> Access tokens.
|
|
21
|
+
2. Create an access token with the Reader role (or a custom role that grants read access to projects, flags, and the audit log).
|
|
22
|
+
3. Copy the generated token and store it as a secret, referencing it from the connector config as `apiToken: secret("LD_API_TOKEN")`.
|
|
23
|
+
|
|
24
|
+
## Configuration
|
|
25
|
+
|
|
26
|
+
| Field | Type | Required | Description |
|
|
27
|
+
| ---------------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
28
|
+
| `apiToken` | secret | Yes | LaunchDarkly API access token with read access. Create one at LaunchDarkly -> Account settings -> Authorization -> Access tokens. |
|
|
29
|
+
| `projects` | array | No | Restrict the sync to specific LaunchDarkly project keys. Omit to sync every project the token can see. |
|
|
30
|
+
| `resources` | array | No | Which LaunchDarkly resources to sync. Omit to sync all of them. feature_flags depends on projects being fetched - enabling it without projects still runs the projects query, but skips writing project entities. |
|
|
31
|
+
| `auditLogLookbackDays` | number | No | How many days back to fetch audit-log events on a full sync. Defaults to 30. LaunchDarkly returns audit events newest-first; this caps the backfill window. |
|
|
32
|
+
|
|
33
|
+
## Resources
|
|
34
|
+
|
|
35
|
+
- **`launchdarkly_project`** _(entity)_ - LaunchDarkly projects, with their key, display name, and tags.
|
|
36
|
+
- Endpoint: `GET /api/v2/projects`
|
|
37
|
+
- `key`: Project key (stable identifier).
|
|
38
|
+
- `name`: Project display name.
|
|
39
|
+
- `tags`: Project tags.
|
|
40
|
+
- **`launchdarkly_feature_flag`** _(entity)_ - Feature flags across one or more projects, including kind (boolean | multivariate | other), archived state, tags, variations, and per-environment on/off + last-modified.
|
|
41
|
+
- Endpoint: `GET /api/v2/flags/{projectKey}`
|
|
42
|
+
- `key`: Flag key (stable identifier).
|
|
43
|
+
- `name`: Flag display name.
|
|
44
|
+
- `kind`: Flag kind: boolean | multivariate | other.
|
|
45
|
+
- `projectKey`: Project key the flag belongs to.
|
|
46
|
+
- `archived`: Whether the flag is archived.
|
|
47
|
+
- `tags`: Flag tags.
|
|
48
|
+
- `variationCount`: Number of variations on the flag.
|
|
49
|
+
- `environments`: Map of envKey -> { on, archived, lastModified } summarizing flag state per environment.
|
|
50
|
+
- `creationDate`: Flag creation timestamp (epoch ms).
|
|
51
|
+
- **`launchdarkly_flag_event`** _(event)_ - Audit-log entries for flag-related changes (flag created / modified / toggled / archived), with the acting member and target resources.
|
|
52
|
+
- Endpoint: `GET /api/v2/auditlog`
|
|
53
|
+
- Filtered to entries newer than the lookback window (default 30 days) and incrementally bounded by options.since on subsequent syncs. LaunchDarkly returns events newest-first.
|
|
54
|
+
- `auditId`: LaunchDarkly audit-log entry id.
|
|
55
|
+
- `kind`: Audit entry kind (e.g. flag, project, environment).
|
|
56
|
+
- `titleVerb`: Verb describing the action (e.g. "updated", "created").
|
|
57
|
+
- `memberEmail`: Email of the member who performed the action.
|
|
58
|
+
- `targetName`: Name of the target resource (e.g. flag key).
|
|
59
|
+
- `targetResources`: Resource paths the action touched (e.g. proj/<key>:env/<env>:flag/<key>).
|
|
60
|
+
|
|
61
|
+
## Example
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
import {
|
|
65
|
+
defineConfig,
|
|
66
|
+
defineDashboard,
|
|
67
|
+
defineMetric,
|
|
68
|
+
secret,
|
|
69
|
+
} from '@rawdash/core';
|
|
70
|
+
|
|
71
|
+
const launchdarkly = {
|
|
72
|
+
name: 'launchdarkly',
|
|
73
|
+
connectorId: 'launchdarkly',
|
|
74
|
+
config: {
|
|
75
|
+
apiToken: secret('LD_API_TOKEN'),
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export default defineConfig({
|
|
80
|
+
connectors: [launchdarkly],
|
|
81
|
+
dashboards: {
|
|
82
|
+
engineering: defineDashboard({
|
|
83
|
+
widgets: {
|
|
84
|
+
active_flags: {
|
|
85
|
+
kind: 'stat',
|
|
86
|
+
title: 'Active feature flags',
|
|
87
|
+
metric: defineMetric({
|
|
88
|
+
connector: launchdarkly,
|
|
89
|
+
shape: 'entity',
|
|
90
|
+
entityType: 'launchdarkly_feature_flag',
|
|
91
|
+
fn: 'count',
|
|
92
|
+
filter: [{ field: 'archived', op: 'eq', value: false }],
|
|
93
|
+
}),
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
}),
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Rate limits
|
|
102
|
+
|
|
103
|
+
LaunchDarkly defaults to 5 requests/second per token; X-Ratelimit-Global-Remaining and X-Ratelimit-Reset (Unix ms) headers are honored. Retry-After is honored on 429.
|
|
104
|
+
|
|
105
|
+
## Limitations
|
|
106
|
+
|
|
107
|
+
- Flag-level served counts (Data Export) and the Experimentation API are out of scope.
|
|
108
|
+
- Feature flags are fetched per project; the audit log is a single global stream filtered by created-after timestamp.
|
|
109
|
+
- Custom hosts / federal instances are out of scope (pagination URLs are pinned to app.launchdarkly.com).
|
|
110
|
+
|
|
111
|
+
## Links
|
|
112
|
+
|
|
113
|
+
- [Rawdash docs](https://rawdash.dev/docs/connectors/)
|
|
114
|
+
- [LaunchDarkly API docs](https://apidocs.launchdarkly.com/)
|
|
115
|
+
- [GitHub](https://github.com/rawdash/rawdash)
|
|
116
|
+
|
|
117
|
+
## License
|
|
118
|
+
|
|
119
|
+
Apache-2.0
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
import { BaseConnector, ConnectorContext, SyncOptions, StorageHandle, SyncResult, ConnectorDoc } from '@rawdash/core';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
declare const configFields: z.ZodObject<{
|
|
5
|
+
apiToken: z.ZodObject<{
|
|
6
|
+
$secret: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
projects: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
|
+
resources: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
10
|
+
projects: "projects";
|
|
11
|
+
feature_flags: "feature_flags";
|
|
12
|
+
flag_events: "flag_events";
|
|
13
|
+
}>>>;
|
|
14
|
+
auditLogLookbackDays: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
declare const doc: ConnectorDoc;
|
|
17
|
+
type LaunchDarklyResource = 'projects' | 'feature_flags' | 'flag_events';
|
|
18
|
+
interface LaunchDarklySettings {
|
|
19
|
+
projects?: readonly string[];
|
|
20
|
+
resources?: readonly LaunchDarklyResource[];
|
|
21
|
+
auditLogLookbackDays?: number;
|
|
22
|
+
}
|
|
23
|
+
declare const launchDarklyCredentials: {
|
|
24
|
+
apiToken: {
|
|
25
|
+
description: string;
|
|
26
|
+
auth: "required";
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
type LaunchDarklyCredentials = typeof launchDarklyCredentials;
|
|
30
|
+
declare const launchdarklyResources: {
|
|
31
|
+
readonly launchdarkly_project: {
|
|
32
|
+
readonly shape: "entity";
|
|
33
|
+
readonly description: "LaunchDarkly projects, with their key, display name, and tags.";
|
|
34
|
+
readonly endpoint: "GET /api/v2/projects";
|
|
35
|
+
readonly fields: [{
|
|
36
|
+
readonly name: "key";
|
|
37
|
+
readonly description: "Project key (stable identifier).";
|
|
38
|
+
}, {
|
|
39
|
+
readonly name: "name";
|
|
40
|
+
readonly description: "Project display name.";
|
|
41
|
+
}, {
|
|
42
|
+
readonly name: "tags";
|
|
43
|
+
readonly description: "Project tags.";
|
|
44
|
+
}];
|
|
45
|
+
readonly responses: {
|
|
46
|
+
readonly projects: z.ZodObject<{
|
|
47
|
+
items: z.ZodArray<z.ZodObject<{
|
|
48
|
+
_id: z.ZodString;
|
|
49
|
+
key: z.ZodString;
|
|
50
|
+
name: z.ZodString;
|
|
51
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
_links: z.ZodOptional<z.ZodObject<{
|
|
54
|
+
next: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
href: z.ZodString;
|
|
56
|
+
type: z.ZodOptional<z.ZodString>;
|
|
57
|
+
}, z.core.$strip>>;
|
|
58
|
+
self: z.ZodOptional<z.ZodObject<{
|
|
59
|
+
href: z.ZodString;
|
|
60
|
+
type: z.ZodOptional<z.ZodString>;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
}, z.core.$strip>>;
|
|
63
|
+
totalCount: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
readonly launchdarkly_feature_flag: {
|
|
68
|
+
readonly shape: "entity";
|
|
69
|
+
readonly description: "Feature flags across one or more projects, including kind (boolean | multivariate | other), archived state, tags, variations, and per-environment on/off + last-modified.";
|
|
70
|
+
readonly endpoint: "GET /api/v2/flags/{projectKey}";
|
|
71
|
+
readonly fields: [{
|
|
72
|
+
readonly name: "key";
|
|
73
|
+
readonly description: "Flag key (stable identifier).";
|
|
74
|
+
}, {
|
|
75
|
+
readonly name: "name";
|
|
76
|
+
readonly description: "Flag display name.";
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "kind";
|
|
79
|
+
readonly description: "Flag kind: boolean | multivariate | other.";
|
|
80
|
+
}, {
|
|
81
|
+
readonly name: "projectKey";
|
|
82
|
+
readonly description: "Project key the flag belongs to.";
|
|
83
|
+
}, {
|
|
84
|
+
readonly name: "archived";
|
|
85
|
+
readonly description: "Whether the flag is archived.";
|
|
86
|
+
}, {
|
|
87
|
+
readonly name: "tags";
|
|
88
|
+
readonly description: "Flag tags.";
|
|
89
|
+
}, {
|
|
90
|
+
readonly name: "variationCount";
|
|
91
|
+
readonly description: "Number of variations on the flag.";
|
|
92
|
+
}, {
|
|
93
|
+
readonly name: "environments";
|
|
94
|
+
readonly description: "Map of envKey -> { on, archived, lastModified } summarizing flag state per environment.";
|
|
95
|
+
}, {
|
|
96
|
+
readonly name: "creationDate";
|
|
97
|
+
readonly description: "Flag creation timestamp (epoch ms).";
|
|
98
|
+
}];
|
|
99
|
+
readonly responses: {
|
|
100
|
+
readonly feature_flags: z.ZodObject<{
|
|
101
|
+
items: z.ZodArray<z.ZodObject<{
|
|
102
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
103
|
+
key: z.ZodString;
|
|
104
|
+
name: z.ZodString;
|
|
105
|
+
description: z.ZodOptional<z.ZodString>;
|
|
106
|
+
kind: z.ZodString;
|
|
107
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
108
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
109
|
+
creationDate: z.ZodOptional<z.ZodNumber>;
|
|
110
|
+
variations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
111
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
112
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
113
|
+
value: z.ZodUnknown;
|
|
114
|
+
}, z.core.$strip>>>;
|
|
115
|
+
environments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
116
|
+
on: z.ZodOptional<z.ZodBoolean>;
|
|
117
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
118
|
+
salt: z.ZodOptional<z.ZodString>;
|
|
119
|
+
lastModified: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
}, z.core.$strip>>>;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
_links: z.ZodOptional<z.ZodObject<{
|
|
123
|
+
next: z.ZodOptional<z.ZodObject<{
|
|
124
|
+
href: z.ZodString;
|
|
125
|
+
type: z.ZodOptional<z.ZodString>;
|
|
126
|
+
}, z.core.$strip>>;
|
|
127
|
+
self: z.ZodOptional<z.ZodObject<{
|
|
128
|
+
href: z.ZodString;
|
|
129
|
+
type: z.ZodOptional<z.ZodString>;
|
|
130
|
+
}, z.core.$strip>>;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
totalCount: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
}, z.core.$strip>;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
readonly launchdarkly_flag_event: {
|
|
137
|
+
readonly shape: "event";
|
|
138
|
+
readonly description: "Audit-log entries for flag-related changes (flag created / modified / toggled / archived), with the acting member and target resources.";
|
|
139
|
+
readonly endpoint: "GET /api/v2/auditlog";
|
|
140
|
+
readonly notes: "Filtered to entries newer than the lookback window (default 30 days) and incrementally bounded by options.since on subsequent syncs. LaunchDarkly returns events newest-first.";
|
|
141
|
+
readonly fields: [{
|
|
142
|
+
readonly name: "auditId";
|
|
143
|
+
readonly description: "LaunchDarkly audit-log entry id.";
|
|
144
|
+
}, {
|
|
145
|
+
readonly name: "kind";
|
|
146
|
+
readonly description: "Audit entry kind (e.g. flag, project, environment).";
|
|
147
|
+
}, {
|
|
148
|
+
readonly name: "titleVerb";
|
|
149
|
+
readonly description: "Verb describing the action (e.g. \"updated\", \"created\").";
|
|
150
|
+
}, {
|
|
151
|
+
readonly name: "memberEmail";
|
|
152
|
+
readonly description: "Email of the member who performed the action.";
|
|
153
|
+
}, {
|
|
154
|
+
readonly name: "targetName";
|
|
155
|
+
readonly description: "Name of the target resource (e.g. flag key).";
|
|
156
|
+
}, {
|
|
157
|
+
readonly name: "targetResources";
|
|
158
|
+
readonly description: "Resource paths the action touched (e.g. proj/<key>:env/<env>:flag/<key>).";
|
|
159
|
+
}];
|
|
160
|
+
readonly responses: {
|
|
161
|
+
readonly audit_log: z.ZodObject<{
|
|
162
|
+
items: z.ZodArray<z.ZodObject<{
|
|
163
|
+
_id: z.ZodString;
|
|
164
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
165
|
+
name: z.ZodOptional<z.ZodString>;
|
|
166
|
+
description: z.ZodOptional<z.ZodString>;
|
|
167
|
+
shortDescription: z.ZodOptional<z.ZodString>;
|
|
168
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
169
|
+
date: z.ZodNumber;
|
|
170
|
+
member: z.ZodOptional<z.ZodObject<{
|
|
171
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
172
|
+
email: z.ZodOptional<z.ZodString>;
|
|
173
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
174
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
175
|
+
}, z.core.$strip>>;
|
|
176
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
177
|
+
name: z.ZodOptional<z.ZodString>;
|
|
178
|
+
resources: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
179
|
+
}, z.core.$strip>>;
|
|
180
|
+
titleVerb: z.ZodOptional<z.ZodString>;
|
|
181
|
+
title: z.ZodOptional<z.ZodString>;
|
|
182
|
+
}, z.core.$strip>>;
|
|
183
|
+
_links: z.ZodOptional<z.ZodObject<{
|
|
184
|
+
next: z.ZodOptional<z.ZodObject<{
|
|
185
|
+
href: z.ZodString;
|
|
186
|
+
type: z.ZodOptional<z.ZodString>;
|
|
187
|
+
}, z.core.$strip>>;
|
|
188
|
+
self: z.ZodOptional<z.ZodObject<{
|
|
189
|
+
href: z.ZodString;
|
|
190
|
+
type: z.ZodOptional<z.ZodString>;
|
|
191
|
+
}, z.core.$strip>>;
|
|
192
|
+
}, z.core.$strip>>;
|
|
193
|
+
totalCount: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
}, z.core.$strip>;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
declare const id = "launchdarkly";
|
|
199
|
+
declare class LaunchDarklyConnector extends BaseConnector<LaunchDarklySettings, LaunchDarklyCredentials> {
|
|
200
|
+
static readonly id = "launchdarkly";
|
|
201
|
+
static readonly resources: {
|
|
202
|
+
readonly launchdarkly_project: {
|
|
203
|
+
readonly shape: "entity";
|
|
204
|
+
readonly description: "LaunchDarkly projects, with their key, display name, and tags.";
|
|
205
|
+
readonly endpoint: "GET /api/v2/projects";
|
|
206
|
+
readonly fields: [{
|
|
207
|
+
readonly name: "key";
|
|
208
|
+
readonly description: "Project key (stable identifier).";
|
|
209
|
+
}, {
|
|
210
|
+
readonly name: "name";
|
|
211
|
+
readonly description: "Project display name.";
|
|
212
|
+
}, {
|
|
213
|
+
readonly name: "tags";
|
|
214
|
+
readonly description: "Project tags.";
|
|
215
|
+
}];
|
|
216
|
+
readonly responses: {
|
|
217
|
+
readonly projects: z.ZodObject<{
|
|
218
|
+
items: z.ZodArray<z.ZodObject<{
|
|
219
|
+
_id: z.ZodString;
|
|
220
|
+
key: z.ZodString;
|
|
221
|
+
name: z.ZodString;
|
|
222
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
223
|
+
}, z.core.$strip>>;
|
|
224
|
+
_links: z.ZodOptional<z.ZodObject<{
|
|
225
|
+
next: z.ZodOptional<z.ZodObject<{
|
|
226
|
+
href: z.ZodString;
|
|
227
|
+
type: z.ZodOptional<z.ZodString>;
|
|
228
|
+
}, z.core.$strip>>;
|
|
229
|
+
self: z.ZodOptional<z.ZodObject<{
|
|
230
|
+
href: z.ZodString;
|
|
231
|
+
type: z.ZodOptional<z.ZodString>;
|
|
232
|
+
}, z.core.$strip>>;
|
|
233
|
+
}, z.core.$strip>>;
|
|
234
|
+
totalCount: z.ZodOptional<z.ZodNumber>;
|
|
235
|
+
}, z.core.$strip>;
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
readonly launchdarkly_feature_flag: {
|
|
239
|
+
readonly shape: "entity";
|
|
240
|
+
readonly description: "Feature flags across one or more projects, including kind (boolean | multivariate | other), archived state, tags, variations, and per-environment on/off + last-modified.";
|
|
241
|
+
readonly endpoint: "GET /api/v2/flags/{projectKey}";
|
|
242
|
+
readonly fields: [{
|
|
243
|
+
readonly name: "key";
|
|
244
|
+
readonly description: "Flag key (stable identifier).";
|
|
245
|
+
}, {
|
|
246
|
+
readonly name: "name";
|
|
247
|
+
readonly description: "Flag display name.";
|
|
248
|
+
}, {
|
|
249
|
+
readonly name: "kind";
|
|
250
|
+
readonly description: "Flag kind: boolean | multivariate | other.";
|
|
251
|
+
}, {
|
|
252
|
+
readonly name: "projectKey";
|
|
253
|
+
readonly description: "Project key the flag belongs to.";
|
|
254
|
+
}, {
|
|
255
|
+
readonly name: "archived";
|
|
256
|
+
readonly description: "Whether the flag is archived.";
|
|
257
|
+
}, {
|
|
258
|
+
readonly name: "tags";
|
|
259
|
+
readonly description: "Flag tags.";
|
|
260
|
+
}, {
|
|
261
|
+
readonly name: "variationCount";
|
|
262
|
+
readonly description: "Number of variations on the flag.";
|
|
263
|
+
}, {
|
|
264
|
+
readonly name: "environments";
|
|
265
|
+
readonly description: "Map of envKey -> { on, archived, lastModified } summarizing flag state per environment.";
|
|
266
|
+
}, {
|
|
267
|
+
readonly name: "creationDate";
|
|
268
|
+
readonly description: "Flag creation timestamp (epoch ms).";
|
|
269
|
+
}];
|
|
270
|
+
readonly responses: {
|
|
271
|
+
readonly feature_flags: z.ZodObject<{
|
|
272
|
+
items: z.ZodArray<z.ZodObject<{
|
|
273
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
274
|
+
key: z.ZodString;
|
|
275
|
+
name: z.ZodString;
|
|
276
|
+
description: z.ZodOptional<z.ZodString>;
|
|
277
|
+
kind: z.ZodString;
|
|
278
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
279
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
280
|
+
creationDate: z.ZodOptional<z.ZodNumber>;
|
|
281
|
+
variations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
282
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
283
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
284
|
+
value: z.ZodUnknown;
|
|
285
|
+
}, z.core.$strip>>>;
|
|
286
|
+
environments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
287
|
+
on: z.ZodOptional<z.ZodBoolean>;
|
|
288
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
289
|
+
salt: z.ZodOptional<z.ZodString>;
|
|
290
|
+
lastModified: z.ZodOptional<z.ZodNumber>;
|
|
291
|
+
}, z.core.$strip>>>;
|
|
292
|
+
}, z.core.$strip>>;
|
|
293
|
+
_links: z.ZodOptional<z.ZodObject<{
|
|
294
|
+
next: z.ZodOptional<z.ZodObject<{
|
|
295
|
+
href: z.ZodString;
|
|
296
|
+
type: z.ZodOptional<z.ZodString>;
|
|
297
|
+
}, z.core.$strip>>;
|
|
298
|
+
self: z.ZodOptional<z.ZodObject<{
|
|
299
|
+
href: z.ZodString;
|
|
300
|
+
type: z.ZodOptional<z.ZodString>;
|
|
301
|
+
}, z.core.$strip>>;
|
|
302
|
+
}, z.core.$strip>>;
|
|
303
|
+
totalCount: z.ZodOptional<z.ZodNumber>;
|
|
304
|
+
}, z.core.$strip>;
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
readonly launchdarkly_flag_event: {
|
|
308
|
+
readonly shape: "event";
|
|
309
|
+
readonly description: "Audit-log entries for flag-related changes (flag created / modified / toggled / archived), with the acting member and target resources.";
|
|
310
|
+
readonly endpoint: "GET /api/v2/auditlog";
|
|
311
|
+
readonly notes: "Filtered to entries newer than the lookback window (default 30 days) and incrementally bounded by options.since on subsequent syncs. LaunchDarkly returns events newest-first.";
|
|
312
|
+
readonly fields: [{
|
|
313
|
+
readonly name: "auditId";
|
|
314
|
+
readonly description: "LaunchDarkly audit-log entry id.";
|
|
315
|
+
}, {
|
|
316
|
+
readonly name: "kind";
|
|
317
|
+
readonly description: "Audit entry kind (e.g. flag, project, environment).";
|
|
318
|
+
}, {
|
|
319
|
+
readonly name: "titleVerb";
|
|
320
|
+
readonly description: "Verb describing the action (e.g. \"updated\", \"created\").";
|
|
321
|
+
}, {
|
|
322
|
+
readonly name: "memberEmail";
|
|
323
|
+
readonly description: "Email of the member who performed the action.";
|
|
324
|
+
}, {
|
|
325
|
+
readonly name: "targetName";
|
|
326
|
+
readonly description: "Name of the target resource (e.g. flag key).";
|
|
327
|
+
}, {
|
|
328
|
+
readonly name: "targetResources";
|
|
329
|
+
readonly description: "Resource paths the action touched (e.g. proj/<key>:env/<env>:flag/<key>).";
|
|
330
|
+
}];
|
|
331
|
+
readonly responses: {
|
|
332
|
+
readonly audit_log: z.ZodObject<{
|
|
333
|
+
items: z.ZodArray<z.ZodObject<{
|
|
334
|
+
_id: z.ZodString;
|
|
335
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
336
|
+
name: z.ZodOptional<z.ZodString>;
|
|
337
|
+
description: z.ZodOptional<z.ZodString>;
|
|
338
|
+
shortDescription: z.ZodOptional<z.ZodString>;
|
|
339
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
340
|
+
date: z.ZodNumber;
|
|
341
|
+
member: z.ZodOptional<z.ZodObject<{
|
|
342
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
343
|
+
email: z.ZodOptional<z.ZodString>;
|
|
344
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
345
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
346
|
+
}, z.core.$strip>>;
|
|
347
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
348
|
+
name: z.ZodOptional<z.ZodString>;
|
|
349
|
+
resources: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
350
|
+
}, z.core.$strip>>;
|
|
351
|
+
titleVerb: z.ZodOptional<z.ZodString>;
|
|
352
|
+
title: z.ZodOptional<z.ZodString>;
|
|
353
|
+
}, z.core.$strip>>;
|
|
354
|
+
_links: z.ZodOptional<z.ZodObject<{
|
|
355
|
+
next: z.ZodOptional<z.ZodObject<{
|
|
356
|
+
href: z.ZodString;
|
|
357
|
+
type: z.ZodOptional<z.ZodString>;
|
|
358
|
+
}, z.core.$strip>>;
|
|
359
|
+
self: z.ZodOptional<z.ZodObject<{
|
|
360
|
+
href: z.ZodString;
|
|
361
|
+
type: z.ZodOptional<z.ZodString>;
|
|
362
|
+
}, z.core.$strip>>;
|
|
363
|
+
}, z.core.$strip>>;
|
|
364
|
+
totalCount: z.ZodOptional<z.ZodNumber>;
|
|
365
|
+
}, z.core.$strip>;
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
static readonly schemas: {
|
|
370
|
+
readonly projects: z.ZodObject<{
|
|
371
|
+
items: z.ZodArray<z.ZodObject<{
|
|
372
|
+
_id: z.ZodString;
|
|
373
|
+
key: z.ZodString;
|
|
374
|
+
name: z.ZodString;
|
|
375
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
376
|
+
}, z.core.$strip>>;
|
|
377
|
+
_links: z.ZodOptional<z.ZodObject<{
|
|
378
|
+
next: z.ZodOptional<z.ZodObject<{
|
|
379
|
+
href: z.ZodString;
|
|
380
|
+
type: z.ZodOptional<z.ZodString>;
|
|
381
|
+
}, z.core.$strip>>;
|
|
382
|
+
self: z.ZodOptional<z.ZodObject<{
|
|
383
|
+
href: z.ZodString;
|
|
384
|
+
type: z.ZodOptional<z.ZodString>;
|
|
385
|
+
}, z.core.$strip>>;
|
|
386
|
+
}, z.core.$strip>>;
|
|
387
|
+
totalCount: z.ZodOptional<z.ZodNumber>;
|
|
388
|
+
}, z.core.$strip>;
|
|
389
|
+
} & {
|
|
390
|
+
readonly feature_flags: z.ZodObject<{
|
|
391
|
+
items: z.ZodArray<z.ZodObject<{
|
|
392
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
393
|
+
key: z.ZodString;
|
|
394
|
+
name: z.ZodString;
|
|
395
|
+
description: z.ZodOptional<z.ZodString>;
|
|
396
|
+
kind: z.ZodString;
|
|
397
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
398
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
399
|
+
creationDate: z.ZodOptional<z.ZodNumber>;
|
|
400
|
+
variations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
401
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
402
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
403
|
+
value: z.ZodUnknown;
|
|
404
|
+
}, z.core.$strip>>>;
|
|
405
|
+
environments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
406
|
+
on: z.ZodOptional<z.ZodBoolean>;
|
|
407
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
408
|
+
salt: z.ZodOptional<z.ZodString>;
|
|
409
|
+
lastModified: z.ZodOptional<z.ZodNumber>;
|
|
410
|
+
}, z.core.$strip>>>;
|
|
411
|
+
}, z.core.$strip>>;
|
|
412
|
+
_links: z.ZodOptional<z.ZodObject<{
|
|
413
|
+
next: z.ZodOptional<z.ZodObject<{
|
|
414
|
+
href: z.ZodString;
|
|
415
|
+
type: z.ZodOptional<z.ZodString>;
|
|
416
|
+
}, z.core.$strip>>;
|
|
417
|
+
self: z.ZodOptional<z.ZodObject<{
|
|
418
|
+
href: z.ZodString;
|
|
419
|
+
type: z.ZodOptional<z.ZodString>;
|
|
420
|
+
}, z.core.$strip>>;
|
|
421
|
+
}, z.core.$strip>>;
|
|
422
|
+
totalCount: z.ZodOptional<z.ZodNumber>;
|
|
423
|
+
}, z.core.$strip>;
|
|
424
|
+
} & {
|
|
425
|
+
readonly audit_log: z.ZodObject<{
|
|
426
|
+
items: z.ZodArray<z.ZodObject<{
|
|
427
|
+
_id: z.ZodString;
|
|
428
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
429
|
+
name: z.ZodOptional<z.ZodString>;
|
|
430
|
+
description: z.ZodOptional<z.ZodString>;
|
|
431
|
+
shortDescription: z.ZodOptional<z.ZodString>;
|
|
432
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
433
|
+
date: z.ZodNumber;
|
|
434
|
+
member: z.ZodOptional<z.ZodObject<{
|
|
435
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
436
|
+
email: z.ZodOptional<z.ZodString>;
|
|
437
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
438
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
439
|
+
}, z.core.$strip>>;
|
|
440
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
441
|
+
name: z.ZodOptional<z.ZodString>;
|
|
442
|
+
resources: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
443
|
+
}, z.core.$strip>>;
|
|
444
|
+
titleVerb: z.ZodOptional<z.ZodString>;
|
|
445
|
+
title: z.ZodOptional<z.ZodString>;
|
|
446
|
+
}, z.core.$strip>>;
|
|
447
|
+
_links: z.ZodOptional<z.ZodObject<{
|
|
448
|
+
next: z.ZodOptional<z.ZodObject<{
|
|
449
|
+
href: z.ZodString;
|
|
450
|
+
type: z.ZodOptional<z.ZodString>;
|
|
451
|
+
}, z.core.$strip>>;
|
|
452
|
+
self: z.ZodOptional<z.ZodObject<{
|
|
453
|
+
href: z.ZodString;
|
|
454
|
+
type: z.ZodOptional<z.ZodString>;
|
|
455
|
+
}, z.core.$strip>>;
|
|
456
|
+
}, z.core.$strip>>;
|
|
457
|
+
totalCount: z.ZodOptional<z.ZodNumber>;
|
|
458
|
+
}, z.core.$strip>;
|
|
459
|
+
} & Readonly<Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
460
|
+
static create(input: unknown, ctx?: ConnectorContext): LaunchDarklyConnector;
|
|
461
|
+
readonly id = "launchdarkly";
|
|
462
|
+
readonly credentials: {
|
|
463
|
+
apiToken: {
|
|
464
|
+
description: string;
|
|
465
|
+
auth: "required";
|
|
466
|
+
};
|
|
467
|
+
};
|
|
468
|
+
private discoveredProjectKeys;
|
|
469
|
+
private discoveredProjectKeysComplete;
|
|
470
|
+
private buildHeaders;
|
|
471
|
+
private fetch;
|
|
472
|
+
private activePhases;
|
|
473
|
+
private allowedPagePath;
|
|
474
|
+
private sanitizePageUrl;
|
|
475
|
+
private resolveCursor;
|
|
476
|
+
private resolveNextHref;
|
|
477
|
+
private buildInitialProjectsUrl;
|
|
478
|
+
private buildInitialFlagsUrl;
|
|
479
|
+
private buildInitialAuditLogUrl;
|
|
480
|
+
private computeAuditSinceMs;
|
|
481
|
+
private resolveProjectKeysForFlags;
|
|
482
|
+
private fetchProjectsPage;
|
|
483
|
+
private fetchFlagsPage;
|
|
484
|
+
private fetchFlagsPageInProject;
|
|
485
|
+
private fetchAuditLogPage;
|
|
486
|
+
private writeProjects;
|
|
487
|
+
private writeFlags;
|
|
488
|
+
private writeAuditEntries;
|
|
489
|
+
sync(options: SyncOptions, storage: StorageHandle, signal?: AbortSignal): Promise<SyncResult>;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
export { LaunchDarklyConnector, type LaunchDarklyResource, type LaunchDarklySettings, configFields, LaunchDarklyConnector as default, doc, id, launchdarklyResources as resources };
|