@sylphx/management 0.4.1 → 0.5.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.
Files changed (79) hide show
  1. package/CHANGELOG.md +38 -2
  2. package/README.md +6 -6
  3. package/dist/adminEnvsSpec.d.ts +11 -0
  4. package/dist/adminEnvsSpec.d.ts.map +1 -0
  5. package/dist/adminEnvsSpec.js +12 -0
  6. package/dist/adminSecrets.d.ts +3 -3
  7. package/dist/adminSecrets.d.ts.map +1 -1
  8. package/dist/adminSecrets.js +2 -2
  9. package/dist/auth.d.ts +7 -18
  10. package/dist/auth.d.ts.map +1 -1
  11. package/dist/auth.js +1 -2
  12. package/dist/authSettings.d.ts +7 -60
  13. package/dist/authSettings.d.ts.map +1 -1
  14. package/dist/authSettings.js +11 -19
  15. package/dist/backups.d.ts +8 -25
  16. package/dist/backups.d.ts.map +1 -1
  17. package/dist/backups.js +21 -7
  18. package/dist/client.d.ts +5 -2
  19. package/dist/client.d.ts.map +1 -1
  20. package/dist/client.js +3 -2
  21. package/dist/deployments.d.ts +11 -4
  22. package/dist/deployments.d.ts.map +1 -1
  23. package/dist/deployments.js +10 -3
  24. package/dist/domains.d.ts +1 -1
  25. package/dist/domains.d.ts.map +1 -1
  26. package/dist/domains.js +1 -1
  27. package/dist/email.d.ts +22 -29
  28. package/dist/email.d.ts.map +1 -1
  29. package/dist/email.js +52 -12
  30. package/dist/environments.d.ts.map +1 -1
  31. package/dist/environments.js +4 -1
  32. package/dist/http.d.ts.map +1 -1
  33. package/dist/http.js +6 -3
  34. package/dist/index.d.ts +2 -1
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +1 -0
  37. package/dist/kv.d.ts +1 -2
  38. package/dist/kv.d.ts.map +1 -1
  39. package/dist/management.d.ts +10 -11
  40. package/dist/management.d.ts.map +1 -1
  41. package/dist/management.js +5 -5
  42. package/dist/newsletter.d.ts +32 -257
  43. package/dist/newsletter.d.ts.map +1 -1
  44. package/dist/newsletter.js +135 -95
  45. package/dist/oidc.d.ts +6 -27
  46. package/dist/oidc.d.ts.map +1 -1
  47. package/dist/oidc.js +16 -6
  48. package/dist/organizations.d.ts +3 -1
  49. package/dist/organizations.d.ts.map +1 -1
  50. package/dist/organizations.js +8 -0
  51. package/dist/privacy.d.ts +3 -98
  52. package/dist/privacy.d.ts.map +1 -1
  53. package/dist/privacy.js +57 -25
  54. package/dist/realtime.d.ts +4 -6
  55. package/dist/realtime.d.ts.map +1 -1
  56. package/dist/realtime.js +4 -5
  57. package/dist/refresh.d.ts +11 -12
  58. package/dist/refresh.d.ts.map +1 -1
  59. package/dist/refresh.js +10 -2
  60. package/dist/runners.d.ts +7 -58
  61. package/dist/runners.d.ts.map +1 -1
  62. package/dist/runners.js +18 -17
  63. package/dist/sandboxes.d.ts +1 -1
  64. package/dist/sandboxes.js +1 -1
  65. package/dist/search.d.ts +7 -40
  66. package/dist/search.d.ts.map +1 -1
  67. package/dist/search.js +28 -18
  68. package/dist/serviceTokens.d.ts +8 -44
  69. package/dist/serviceTokens.d.ts.map +1 -1
  70. package/dist/serviceTokens.js +24 -8
  71. package/dist/tasks.d.ts +3 -6
  72. package/dist/tasks.d.ts.map +1 -1
  73. package/dist/types.d.ts +8 -22
  74. package/dist/types.d.ts.map +1 -1
  75. package/dist/types.js +1 -1
  76. package/dist/volumes.d.ts +6 -5
  77. package/dist/volumes.d.ts.map +1 -1
  78. package/dist/volumes.js +40 -7
  79. package/package.json +6 -2
@@ -1,279 +1,54 @@
1
1
  /**
2
- * Newsletter subscribers, automation sequences, steps, enrollments.
2
+ * Newsletter management SDK.
3
3
  *
4
- * All routes mount under `/newsletter` in the Platform API.
5
- *
6
- * Subscribers
7
- * GET /newsletter/subscribers — list
8
- * GET /newsletter/subscribers/by-email — by email
9
- * GET /newsletter/subscribers/preferences — preferences by email
10
- * GET /newsletter/subscribers/export — CSV export
11
- * GET /newsletter/subscribers/stats — aggregate stats
12
- * DELETE /newsletter/subscribers — GDPR delete
13
- * POST /newsletter/subscribers/bulk-delete
14
- * POST /newsletter/subscribers/resend-verification
15
- *
16
- * Sequences (automation workflows)
17
- * GET /newsletter/sequences
18
- * GET /newsletter/sequences/:sequenceId
19
- * POST /newsletter/sequences
20
- * PATCH /newsletter/sequences/:sequenceId
21
- * DELETE /newsletter/sequences/:sequenceId
22
- * GET /newsletter/sequences/:sequenceId/analytics
23
- *
24
- * Steps (inside sequences)
25
- * POST /newsletter/steps
26
- * PATCH /newsletter/steps/:stepId
27
- * DELETE /newsletter/steps/:stepId
28
- * POST /newsletter/steps/reorder
29
- *
30
- * Enrollments (subscribers inside sequences)
31
- * GET /newsletter/enrollments
32
- * GET /newsletter/enrollments/:enrollmentId
33
- * POST /newsletter/enrollments
34
- * POST /newsletter/enrollments/:enrollmentId/cancel
35
- * POST /newsletter/enrollments/:enrollmentId/pause
36
- * POST /newsletter/enrollments/:enrollmentId/resume
37
- *
38
- * `SubscriberPreferences` is returned as an object keyed on preference ID;
39
- * the service stores the underlying rows as an array but flattens for wire.
4
+ * Wire paths, methods, and public response/body shapes are sourced from
5
+ * `@sylphx/contract`. This module only adapts the ergonomic SDK call shape
6
+ * where callers pass booleans/numbers and the HTTP query contract carries
7
+ * strings.
40
8
  */
9
+ import { type AddStepInput, type BulkDeleteSubscribersInput, type BulkDeleteSubscribersResult, type CreateSequenceInput, type DeleteSubscriberResult, type Enrollment, type EnrollmentStatus, type EnrollSubscriberInput, type ExportSubscribersQuery, type ExportSubscribersResult, type ListEnrollmentsQuery, type ListEnrollmentsResult, type ListSequencesQuery, type ListSequencesResult, type ListSubscribersQuery, type ListSubscribersResult, type NewsletterSuccessResult, type ReorderStepsInput, type ResendVerificationResult, type Sequence, type SequenceAnalytics, type SequenceTrigger, type SequenceWithSteps, type Step, type StepConfig, type StepType, type Subscriber, type SubscriberDetail, type SubscriberPreferences, type SubscriberSource, type SubscriberStatsResult, type TriggerConditions, type UpdateSequenceInput, type UpdateStepInput } from '@sylphx/contract';
41
10
  import type { Client } from './client.js';
42
- export type SubscriberSource = 'website' | 'waitlist' | 'referral' | 'api' | 'import';
43
- export type PreferenceKey = 'newsletter' | 'product_updates' | 'promotions' | 'changelog' | 'security_alerts';
44
- export type SubscriberPreferences = Readonly<Partial<Record<PreferenceKey, boolean>>>;
45
- export interface Subscriber {
46
- readonly id: string;
47
- readonly email: string;
48
- readonly name: string | null;
49
- readonly source: SubscriberSource;
50
- readonly emailVerified: boolean;
51
- readonly subscribedAt: string | null;
52
- readonly unsubscribedAt: string | null;
53
- readonly createdAt: string;
54
- readonly preferences: SubscriberPreferences | null;
55
- }
56
- export interface SubscriberDetail extends Subscriber {
57
- readonly metadata: Readonly<Record<string, unknown>> | null;
58
- readonly updatedAt: string;
59
- }
60
- export interface ListSubscribersOptions {
61
- readonly projectId?: string;
11
+ export type { AddStepInput, BulkDeleteSubscribersInput, BulkDeleteSubscribersResult, CreateSequenceInput, DeleteSubscriberResult, Enrollment, EnrollmentStatus, EnrollSubscriberInput, ExportSubscribersResult, ListEnrollmentsResult, ListSequencesResult, ListSubscribersResult, NewsletterSuccessResult, ReorderStepsInput, ResendVerificationResult, Sequence, SequenceAnalytics, SequenceTrigger, SequenceWithSteps, Step, StepConfig, StepType, Subscriber, SubscriberDetail, SubscriberPreferences, SubscriberSource, SubscriberStatsResult, TriggerConditions, UpdateSequenceInput, UpdateStepInput, };
12
+ export type SubscriberStats = SubscriberStatsResult;
13
+ export type ListSubscribersOptions = Omit<ListSubscribersQuery, 'verified' | 'includeUnsubscribed' | 'limit' | 'offset'> & {
14
+ readonly verified?: boolean;
15
+ readonly includeUnsubscribed?: boolean;
16
+ readonly limit?: number;
17
+ readonly offset?: number;
18
+ };
19
+ export type ExportSubscribersOptions = Omit<ExportSubscribersQuery, 'verified' | 'includeUnsubscribed'> & {
62
20
  readonly verified?: boolean;
63
- readonly source?: SubscriberSource;
64
- readonly search?: string;
65
21
  readonly includeUnsubscribed?: boolean;
22
+ };
23
+ export type ListSequencesOptions = Omit<ListSequencesQuery, 'projectId' | 'includeInactive'> & {
24
+ readonly includeInactive?: boolean;
25
+ };
26
+ export type ListEnrollmentsOptions = Omit<ListEnrollmentsQuery, 'sequenceId' | 'limit' | 'offset'> & {
66
27
  readonly limit?: number;
67
28
  readonly offset?: number;
68
- }
69
- export interface ListSubscribersResult {
70
- readonly subscribers: readonly Subscriber[];
71
- readonly total: number;
72
- readonly hasMore: boolean;
73
- }
29
+ };
74
30
  export declare const listSubscribers: (client: Client, options?: ListSubscribersOptions) => Promise<ListSubscribersResult>;
75
31
  export declare const getSubscriber: (client: Client, email: string) => Promise<SubscriberDetail>;
76
32
  export declare const getPreferences: (client: Client, email: string) => Promise<SubscriberPreferences>;
77
- export interface ExportSubscribersOptions {
78
- readonly verified?: boolean;
79
- readonly includeUnsubscribed?: boolean;
80
- }
81
- export interface ExportSubscribersResult {
82
- readonly csv: string;
83
- readonly filename: string;
84
- }
85
33
  export declare const exportSubscribers: (client: Client, options?: ExportSubscribersOptions) => Promise<ExportSubscribersResult>;
86
- export interface SubscriberStats {
87
- readonly total: number;
88
- readonly verified: number;
89
- readonly unsubscribed: number;
90
- readonly bySource: Readonly<Record<string, number>>;
91
- }
92
- export declare const subscriberStats: (client: Client) => Promise<SubscriberStats>;
93
- export declare const deleteSubscriber: (client: Client, email: string) => Promise<{
94
- success: boolean;
95
- message: string;
96
- }>;
97
- export interface BulkDeleteSubscribersInput {
98
- readonly projectId: string;
99
- readonly subscriberIds: readonly string[];
100
- }
101
- export interface BulkDeleteSubscribersResult {
102
- readonly deleted: number;
103
- readonly errors?: readonly {
104
- readonly id: string;
105
- readonly error: string;
106
- }[];
107
- }
34
+ export declare const subscriberStats: (client: Client) => Promise<SubscriberStatsResult>;
35
+ export declare const deleteSubscriber: (client: Client, email: string) => Promise<DeleteSubscriberResult>;
108
36
  export declare const bulkDeleteSubscribers: (client: Client, input: BulkDeleteSubscribersInput) => Promise<BulkDeleteSubscribersResult>;
109
- export declare const resendVerification: (client: Client, email: string) => Promise<{
110
- sent: boolean;
111
- }>;
112
- export type SequenceTrigger = 'subscribe' | 'verify_email' | 'tag_added' | 'manual' | 'event';
113
- export type StepType = 'email' | 'delay' | 'condition' | 'tag' | 'webhook';
114
- export type EnrollmentStatus = 'active' | 'completed' | 'paused' | 'cancelled' | 'unsubscribed';
115
- export interface TriggerCondition {
116
- readonly field: string;
117
- readonly operator: 'eq' | 'neq' | 'contains' | 'exists';
118
- readonly value?: string;
119
- }
120
- export interface TriggerConditions {
121
- readonly tag?: string;
122
- readonly event?: string;
123
- readonly conditions?: readonly TriggerCondition[];
124
- }
125
- export type StepConfig = {
126
- readonly type: 'email';
127
- readonly templateId?: string;
128
- readonly subject: string;
129
- readonly body: string;
130
- readonly fromName?: string;
131
- } | {
132
- readonly type: 'delay';
133
- readonly duration: number;
134
- readonly unit: 'minutes' | 'hours' | 'days' | 'weeks';
135
- } | {
136
- readonly type: 'condition';
137
- readonly field: string;
138
- readonly operator: 'eq' | 'neq' | 'contains' | 'exists' | 'opened_email' | 'clicked_link';
139
- readonly value?: string;
140
- readonly trueBranch?: string;
141
- readonly falseBranch?: string;
142
- } | {
143
- readonly type: 'tag';
144
- readonly action: 'add' | 'remove';
145
- readonly tag: string;
146
- } | {
147
- readonly type: 'webhook';
148
- readonly url: string;
149
- readonly method: 'GET' | 'POST';
150
- readonly headers?: Readonly<Record<string, string>>;
151
- readonly body?: Readonly<Record<string, unknown>>;
152
- };
153
- export interface Sequence {
154
- readonly id: string;
155
- readonly projectId: string;
156
- readonly name: string;
157
- readonly description: string | null;
158
- readonly trigger: SequenceTrigger;
159
- readonly triggerConditions: TriggerConditions | null;
160
- readonly isActive: boolean;
161
- readonly allowReenrollment: boolean;
162
- readonly exitOnUnsubscribe: boolean;
163
- readonly createdAt: string;
164
- readonly updatedAt: string;
165
- }
166
- export interface Step {
167
- readonly id: string;
168
- readonly sequenceId: string;
169
- readonly stepNumber: number;
170
- readonly type: StepType;
171
- readonly name: string;
172
- readonly config: StepConfig;
173
- readonly isEnabled: boolean;
174
- readonly createdAt: string;
175
- readonly updatedAt: string;
176
- }
177
- export interface SequenceWithSteps extends Sequence {
178
- readonly steps: readonly Step[];
179
- }
180
- export interface ListSequencesOptions {
181
- readonly includeInactive?: boolean;
182
- }
183
- export declare const listSequences: (client: Client, projectId: string, options?: ListSequencesOptions) => Promise<readonly Sequence[]>;
37
+ export declare const resendVerification: (client: Client, email: string) => Promise<ResendVerificationResult>;
38
+ export declare const listSequences: (client: Client, projectId: string, options?: ListSequencesOptions) => Promise<ListSequencesResult>;
184
39
  export declare const getSequence: (client: Client, sequenceId: string) => Promise<SequenceWithSteps>;
185
- export interface CreateSequenceInput {
186
- readonly projectId: string;
187
- readonly name: string;
188
- readonly description?: string;
189
- readonly trigger: SequenceTrigger;
190
- readonly triggerConditions?: TriggerConditions;
191
- readonly allowReenrollment?: boolean;
192
- readonly exitOnUnsubscribe?: boolean;
193
- }
194
40
  export declare const createSequence: (client: Client, input: CreateSequenceInput) => Promise<SequenceWithSteps>;
195
- export interface UpdateSequenceInput {
196
- readonly name?: string;
197
- readonly description?: string;
198
- readonly trigger?: SequenceTrigger;
199
- readonly triggerConditions?: TriggerConditions;
200
- readonly isActive?: boolean;
201
- readonly allowReenrollment?: boolean;
202
- readonly exitOnUnsubscribe?: boolean;
203
- }
204
41
  export declare const updateSequence: (client: Client, sequenceId: string, input: UpdateSequenceInput) => Promise<SequenceWithSteps>;
205
- export declare const deleteSequence: (client: Client, sequenceId: string) => Promise<{
206
- success: boolean;
207
- }>;
208
- export interface StepAnalytics {
209
- readonly stepId: string;
210
- readonly stepName: string;
211
- readonly reached: number;
212
- readonly completed: number;
213
- readonly avgDurationMs: number | null;
214
- }
215
- export interface SequenceAnalytics {
216
- readonly sequenceId: string;
217
- readonly totalEnrollments: number;
218
- readonly activeEnrollments: number;
219
- readonly completedEnrollments: number;
220
- readonly cancelledEnrollments: number;
221
- readonly unsubscribedEnrollments: number;
222
- readonly stepAnalytics: readonly StepAnalytics[];
223
- }
42
+ export declare const deleteSequence: (client: Client, sequenceId: string) => Promise<NewsletterSuccessResult>;
224
43
  export declare const sequenceAnalytics: (client: Client, sequenceId: string) => Promise<SequenceAnalytics>;
225
- export interface AddStepInput {
226
- readonly sequenceId: string;
227
- readonly stepNumber: number;
228
- readonly type: StepType;
229
- readonly name: string;
230
- readonly config: StepConfig;
231
- readonly isEnabled?: boolean;
232
- }
233
44
  export declare const addStep: (client: Client, input: AddStepInput) => Promise<Step>;
234
- export interface UpdateStepInput {
235
- readonly stepNumber?: number;
236
- readonly name?: string;
237
- readonly config?: StepConfig;
238
- readonly isEnabled?: boolean;
239
- }
240
45
  export declare const updateStep: (client: Client, stepId: string, input: UpdateStepInput) => Promise<Step>;
241
- export declare const deleteStep: (client: Client, stepId: string) => Promise<{
242
- success: boolean;
243
- }>;
244
- export declare const reorderSteps: (client: Client, sequenceId: string, stepOrder: readonly string[]) => Promise<{
245
- success: boolean;
246
- }>;
247
- export interface Enrollment {
248
- readonly id: string;
249
- readonly sequenceId: string;
250
- readonly subscriberId: string;
251
- readonly status: EnrollmentStatus;
252
- readonly currentStep: number;
253
- readonly context: Readonly<Record<string, unknown>> | null;
254
- readonly enrolledAt: string;
255
- readonly completedAt: string | null;
256
- }
257
- export interface ListEnrollmentsOptions {
258
- readonly status?: EnrollmentStatus;
259
- readonly limit?: number;
260
- readonly offset?: number;
261
- }
262
- export declare const listEnrollments: (client: Client, sequenceId: string, options?: ListEnrollmentsOptions) => Promise<readonly Enrollment[]>;
46
+ export declare const deleteStep: (client: Client, stepId: string) => Promise<NewsletterSuccessResult>;
47
+ export declare const reorderSteps: (client: Client, sequenceId: string, stepOrder: readonly string[]) => Promise<NewsletterSuccessResult>;
48
+ export declare const listEnrollments: (client: Client, sequenceId: string, options?: ListEnrollmentsOptions) => Promise<ListEnrollmentsResult>;
263
49
  export declare const getEnrollment: (client: Client, enrollmentId: string) => Promise<Enrollment>;
264
- export interface EnrollSubscriberInput {
265
- readonly sequenceId: string;
266
- readonly subscriberId: string;
267
- readonly context?: Readonly<Record<string, unknown>>;
268
- }
269
50
  export declare const enrollSubscriber: (client: Client, input: EnrollSubscriberInput) => Promise<Enrollment>;
270
- export declare const cancelEnrollment: (client: Client, enrollmentId: string) => Promise<{
271
- success: boolean;
272
- }>;
273
- export declare const pauseEnrollment: (client: Client, enrollmentId: string) => Promise<{
274
- success: boolean;
275
- }>;
276
- export declare const resumeEnrollment: (client: Client, enrollmentId: string) => Promise<{
277
- success: boolean;
278
- }>;
51
+ export declare const cancelEnrollment: (client: Client, enrollmentId: string) => Promise<NewsletterSuccessResult>;
52
+ export declare const pauseEnrollment: (client: Client, enrollmentId: string) => Promise<NewsletterSuccessResult>;
53
+ export declare const resumeEnrollment: (client: Client, enrollmentId: string) => Promise<NewsletterSuccessResult>;
279
54
  //# sourceMappingURL=newsletter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"newsletter.d.ts","sourceRoot":"","sources":["../src/newsletter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAKzC,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,KAAK,GAAG,QAAQ,CAAA;AACrF,MAAM,MAAM,aAAa,GACtB,YAAY,GACZ,iBAAiB,GACjB,YAAY,GACZ,WAAW,GACX,iBAAiB,CAAA;AAEpB,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;AAErF,MAAM,WAAW,UAAU;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,QAAQ,CAAC,MAAM,EAAE,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B,QAAQ,MAAM,EACd,YAAY,MAAM,EAClB,UAAU,sBAAsB,KAC9B,OAAO,CAAC,qBAAqB,CAU/B,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,QAAQ,MAAM,EAAE,cAAc,MAAM,KAAG,OAAO,CAAC,UAAU,CAGtF,CAAA;AAED,eAAO,MAAM,gBAAgB,GAC5B,QAAQ,MAAM,EACd,OAAO,qBAAqB,KAC1B,OAAO,CAAC,UAAU,CAGpB,CAAA;AAED,eAAO,MAAM,gBAAgB,GAC5B,QAAQ,MAAM,EACd,cAAc,MAAM,KAClB,OAAO,CAAC,uBAAuB,CAGjC,CAAA;AAED,eAAO,MAAM,eAAe,GAC3B,QAAQ,MAAM,EACd,cAAc,MAAM,KAClB,OAAO,CAAC,uBAAuB,CAGjC,CAAA;AAED,eAAO,MAAM,gBAAgB,GAC5B,QAAQ,MAAM,EACd,cAAc,MAAM,KAClB,OAAO,CAAC,uBAAuB,CAGjC,CAAA"}
@@ -1,98 +1,138 @@
1
1
  /**
2
- * Newsletter subscribers, automation sequences, steps, enrollments.
2
+ * Newsletter management SDK.
3
3
  *
4
- * All routes mount under `/newsletter` in the Platform API.
5
- *
6
- * Subscribers
7
- * GET /newsletter/subscribers — list
8
- * GET /newsletter/subscribers/by-email — by email
9
- * GET /newsletter/subscribers/preferences — preferences by email
10
- * GET /newsletter/subscribers/export — CSV export
11
- * GET /newsletter/subscribers/stats — aggregate stats
12
- * DELETE /newsletter/subscribers — GDPR delete
13
- * POST /newsletter/subscribers/bulk-delete
14
- * POST /newsletter/subscribers/resend-verification
15
- *
16
- * Sequences (automation workflows)
17
- * GET /newsletter/sequences
18
- * GET /newsletter/sequences/:sequenceId
19
- * POST /newsletter/sequences
20
- * PATCH /newsletter/sequences/:sequenceId
21
- * DELETE /newsletter/sequences/:sequenceId
22
- * GET /newsletter/sequences/:sequenceId/analytics
23
- *
24
- * Steps (inside sequences)
25
- * POST /newsletter/steps
26
- * PATCH /newsletter/steps/:stepId
27
- * DELETE /newsletter/steps/:stepId
28
- * POST /newsletter/steps/reorder
29
- *
30
- * Enrollments (subscribers inside sequences)
31
- * GET /newsletter/enrollments
32
- * GET /newsletter/enrollments/:enrollmentId
33
- * POST /newsletter/enrollments
34
- * POST /newsletter/enrollments/:enrollmentId/cancel
35
- * POST /newsletter/enrollments/:enrollmentId/pause
36
- * POST /newsletter/enrollments/:enrollmentId/resume
37
- *
38
- * `SubscriberPreferences` is returned as an object keyed on preference ID;
39
- * the service stores the underlying rows as an array but flattens for wire.
4
+ * Wire paths, methods, and public response/body shapes are sourced from
5
+ * `@sylphx/contract`. This module only adapts the ergonomic SDK call shape
6
+ * where callers pass booleans/numbers and the HTTP query contract carries
7
+ * strings.
40
8
  */
41
- import { request } from './http.js';
42
- export const listSubscribers = (client, options) => request(client, 'GET', '/newsletter/subscribers', {
43
- query: {
44
- projectId: options?.projectId,
45
- verified: options?.verified !== undefined ? String(options.verified) : undefined,
46
- source: options?.source,
47
- search: options?.search,
48
- includeUnsubscribed: options?.includeUnsubscribed !== undefined
49
- ? String(options.includeUnsubscribed)
50
- : undefined,
51
- limit: options?.limit !== undefined ? String(options.limit) : undefined,
52
- offset: options?.offset !== undefined ? String(options.offset) : undefined,
53
- },
54
- });
55
- export const getSubscriber = (client, email) => request(client, 'GET', '/newsletter/subscribers/by-email', { query: { email } });
56
- export const getPreferences = (client, email) => request(client, 'GET', '/newsletter/subscribers/preferences', { query: { email } });
57
- export const exportSubscribers = (client, options) => request(client, 'GET', '/newsletter/subscribers/export', {
58
- query: {
59
- verified: options?.verified !== undefined ? String(options.verified) : undefined,
60
- includeUnsubscribed: options?.includeUnsubscribed !== undefined
61
- ? String(options.includeUnsubscribed)
62
- : undefined,
63
- },
64
- });
65
- export const subscriberStats = (client) => request(client, 'GET', '/newsletter/subscribers/stats');
66
- export const deleteSubscriber = (client, email) => request(client, 'DELETE', '/newsletter/subscribers', { body: { email } });
67
- export const bulkDeleteSubscribers = (client, input) => request(client, 'POST', '/newsletter/subscribers/bulk-delete', { body: input });
68
- export const resendVerification = (client, email) => request(client, 'POST', '/newsletter/subscribers/resend-verification', { body: { email } });
69
- export const listSequences = (client, projectId, options) => request(client, 'GET', '/newsletter/sequences', {
70
- query: {
71
- projectId,
72
- includeInactive: options?.includeInactive !== undefined ? String(options.includeInactive) : undefined,
73
- },
74
- });
75
- export const getSequence = (client, sequenceId) => request(client, 'GET', `/newsletter/sequences/${encodeURIComponent(sequenceId)}`);
76
- export const createSequence = (client, input) => request(client, 'POST', '/newsletter/sequences', { body: input });
77
- export const updateSequence = (client, sequenceId, input) => request(client, 'PATCH', `/newsletter/sequences/${encodeURIComponent(sequenceId)}`, {
78
- body: input,
79
- });
80
- export const deleteSequence = (client, sequenceId) => request(client, 'DELETE', `/newsletter/sequences/${encodeURIComponent(sequenceId)}`);
81
- export const sequenceAnalytics = (client, sequenceId) => request(client, 'GET', `/newsletter/sequences/${encodeURIComponent(sequenceId)}/analytics`);
82
- export const addStep = (client, input) => request(client, 'POST', '/newsletter/steps', { body: input });
83
- export const updateStep = (client, stepId, input) => request(client, 'PATCH', `/newsletter/steps/${encodeURIComponent(stepId)}`, { body: input });
84
- export const deleteStep = (client, stepId) => request(client, 'DELETE', `/newsletter/steps/${encodeURIComponent(stepId)}`);
85
- export const reorderSteps = (client, sequenceId, stepOrder) => request(client, 'POST', '/newsletter/steps/reorder', { body: { sequenceId, stepOrder } });
86
- export const listEnrollments = (client, sequenceId, options) => request(client, 'GET', '/newsletter/enrollments', {
87
- query: {
88
- sequenceId,
89
- status: options?.status,
90
- limit: options?.limit !== undefined ? String(options.limit) : undefined,
91
- offset: options?.offset !== undefined ? String(options.offset) : undefined,
92
- },
93
- });
94
- export const getEnrollment = (client, enrollmentId) => request(client, 'GET', `/newsletter/enrollments/${encodeURIComponent(enrollmentId)}`);
95
- export const enrollSubscriber = (client, input) => request(client, 'POST', '/newsletter/enrollments', { body: input });
96
- export const cancelEnrollment = (client, enrollmentId) => request(client, 'POST', `/newsletter/enrollments/${encodeURIComponent(enrollmentId)}/cancel`);
97
- export const pauseEnrollment = (client, enrollmentId) => request(client, 'POST', `/newsletter/enrollments/${encodeURIComponent(enrollmentId)}/pause`);
98
- export const resumeEnrollment = (client, enrollmentId) => request(client, 'POST', `/newsletter/enrollments/${encodeURIComponent(enrollmentId)}/resume`);
9
+ import { newsletterEndpoints, } from '@sylphx/contract';
10
+ import { interpolatePath, request } from './http.js';
11
+ const asBooleanQuery = (value) => value === undefined ? undefined : String(value);
12
+ const asNumberQuery = (value) => value === undefined ? undefined : String(value);
13
+ export const listSubscribers = (client, options) => {
14
+ const { method, path } = newsletterEndpoints.listSubscribers;
15
+ return request(client, method, path, {
16
+ query: {
17
+ projectId: options?.projectId,
18
+ verified: asBooleanQuery(options?.verified),
19
+ source: options?.source,
20
+ search: options?.search,
21
+ includeUnsubscribed: asBooleanQuery(options?.includeUnsubscribed),
22
+ limit: asNumberQuery(options?.limit),
23
+ offset: asNumberQuery(options?.offset),
24
+ },
25
+ });
26
+ };
27
+ export const getSubscriber = (client, email) => {
28
+ const { method, path } = newsletterEndpoints.getSubscriber;
29
+ return request(client, method, path, { query: { email } });
30
+ };
31
+ export const getPreferences = (client, email) => {
32
+ const { method, path } = newsletterEndpoints.getPreferences;
33
+ return request(client, method, path, { query: { email } });
34
+ };
35
+ export const exportSubscribers = (client, options) => {
36
+ const { method, path } = newsletterEndpoints.exportSubscribers;
37
+ return request(client, method, path, {
38
+ query: {
39
+ verified: asBooleanQuery(options?.verified),
40
+ includeUnsubscribed: asBooleanQuery(options?.includeUnsubscribed),
41
+ },
42
+ });
43
+ };
44
+ export const subscriberStats = (client) => {
45
+ const { method, path } = newsletterEndpoints.subscriberStats;
46
+ return request(client, method, path);
47
+ };
48
+ export const deleteSubscriber = (client, email) => {
49
+ const { method, path } = newsletterEndpoints.deleteSubscriber;
50
+ const body = { email };
51
+ return request(client, method, path, { body });
52
+ };
53
+ export const bulkDeleteSubscribers = (client, input) => {
54
+ const { method, path } = newsletterEndpoints.bulkDeleteSubscribers;
55
+ return request(client, method, path, { body: input });
56
+ };
57
+ export const resendVerification = (client, email) => {
58
+ const { method, path } = newsletterEndpoints.resendVerification;
59
+ const body = { email };
60
+ return request(client, method, path, { body });
61
+ };
62
+ export const listSequences = (client, projectId, options) => {
63
+ const { method, path } = newsletterEndpoints.listSequences;
64
+ return request(client, method, path, {
65
+ query: {
66
+ projectId,
67
+ includeInactive: asBooleanQuery(options?.includeInactive),
68
+ },
69
+ });
70
+ };
71
+ export const getSequence = (client, sequenceId) => {
72
+ const { method, path } = newsletterEndpoints.getSequence;
73
+ return request(client, method, interpolatePath(path, { sequenceId }));
74
+ };
75
+ export const createSequence = (client, input) => {
76
+ const { method, path } = newsletterEndpoints.createSequence;
77
+ return request(client, method, path, { body: input });
78
+ };
79
+ export const updateSequence = (client, sequenceId, input) => {
80
+ const { method, path } = newsletterEndpoints.updateSequence;
81
+ return request(client, method, interpolatePath(path, { sequenceId }), { body: input });
82
+ };
83
+ export const deleteSequence = (client, sequenceId) => {
84
+ const { method, path } = newsletterEndpoints.deleteSequence;
85
+ return request(client, method, interpolatePath(path, { sequenceId }));
86
+ };
87
+ export const sequenceAnalytics = (client, sequenceId) => {
88
+ const { method, path } = newsletterEndpoints.getSequenceAnalytics;
89
+ return request(client, method, interpolatePath(path, { sequenceId }));
90
+ };
91
+ export const addStep = (client, input) => {
92
+ const { method, path } = newsletterEndpoints.addStep;
93
+ return request(client, method, path, { body: input });
94
+ };
95
+ export const updateStep = (client, stepId, input) => {
96
+ const { method, path } = newsletterEndpoints.updateStep;
97
+ return request(client, method, interpolatePath(path, { stepId }), { body: input });
98
+ };
99
+ export const deleteStep = (client, stepId) => {
100
+ const { method, path } = newsletterEndpoints.deleteStep;
101
+ return request(client, method, interpolatePath(path, { stepId }));
102
+ };
103
+ export const reorderSteps = (client, sequenceId, stepOrder) => {
104
+ const { method, path } = newsletterEndpoints.reorderSteps;
105
+ const body = { sequenceId, stepOrder };
106
+ return request(client, method, path, { body });
107
+ };
108
+ export const listEnrollments = (client, sequenceId, options) => {
109
+ const { method, path } = newsletterEndpoints.listEnrollments;
110
+ return request(client, method, path, {
111
+ query: {
112
+ sequenceId,
113
+ status: options?.status,
114
+ limit: asNumberQuery(options?.limit),
115
+ offset: asNumberQuery(options?.offset),
116
+ },
117
+ });
118
+ };
119
+ export const getEnrollment = (client, enrollmentId) => {
120
+ const { method, path } = newsletterEndpoints.getEnrollment;
121
+ return request(client, method, interpolatePath(path, { enrollmentId }));
122
+ };
123
+ export const enrollSubscriber = (client, input) => {
124
+ const { method, path } = newsletterEndpoints.enrollSubscriber;
125
+ return request(client, method, path, { body: input });
126
+ };
127
+ export const cancelEnrollment = (client, enrollmentId) => {
128
+ const { method, path } = newsletterEndpoints.cancelEnrollment;
129
+ return request(client, method, interpolatePath(path, { enrollmentId }));
130
+ };
131
+ export const pauseEnrollment = (client, enrollmentId) => {
132
+ const { method, path } = newsletterEndpoints.pauseEnrollment;
133
+ return request(client, method, interpolatePath(path, { enrollmentId }));
134
+ };
135
+ export const resumeEnrollment = (client, enrollmentId) => {
136
+ const { method, path } = newsletterEndpoints.resumeEnrollment;
137
+ return request(client, method, interpolatePath(path, { enrollmentId }));
138
+ };
package/dist/oidc.d.ts CHANGED
@@ -10,37 +10,16 @@
10
10
  * custom. Each policy pins an issuer + subject pattern + allowed scope
11
11
  * set; tokens exchanged through the policy inherit exactly those scopes.
12
12
  */
13
+ import type { CreateOidcPolicyInput, DeleteOidcPolicyResult, ListOidcPoliciesResult, OidcPolicyView } from '@sylphx/contract';
13
14
  import type { Client } from './client.js';
14
15
  export type OidcProvider = 'github-actions' | 'gitlab-ci' | 'bitbucket-pipelines' | 'custom';
15
16
  export declare const SUPPORTED_PROVIDERS: readonly OidcProvider[];
16
- export interface OidcPolicy {
17
- readonly id: string;
18
- readonly projectId: string;
19
- readonly name: string;
20
- readonly provider: string;
21
- readonly issuer: string;
22
- readonly audience: string | null;
23
- readonly subjectPattern: string;
24
- readonly allowedScopes: readonly string[];
25
- readonly isActive: boolean;
26
- readonly createdBy: string | null;
27
- readonly createdAt: string;
28
- readonly updatedAt: string;
29
- }
30
- export declare const list: (client: Client, projectId: string) => Promise<{
31
- policies: readonly OidcPolicy[];
32
- }>;
33
- export interface CreateInput {
34
- readonly name: string;
17
+ export type OidcPolicy = OidcPolicyView;
18
+ export declare const list: (client: Client, projectId: string) => Promise<ListOidcPoliciesResult>;
19
+ export type CreateInput = Omit<CreateOidcPolicyInput, 'provider'> & {
35
20
  readonly provider: OidcProvider;
36
- readonly issuer: string;
37
- readonly subjectPattern: string;
38
- readonly allowedScopes: readonly string[];
39
- readonly audience?: string | null;
40
- }
21
+ };
41
22
  export declare const create: (client: Client, projectId: string, input: CreateInput) => Promise<OidcPolicy>;
42
- declare const _delete: (client: Client, projectId: string, policyId: string) => Promise<{
43
- deleted: boolean;
44
- }>;
23
+ declare const _delete: (client: Client, projectId: string, policyId: string) => Promise<DeleteOidcPolicyResult>;
45
24
  export { _delete as delete };
46
25
  //# sourceMappingURL=oidc.d.ts.map