-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuilder.ridl
88 lines (76 loc) · 2.59 KB
/
builder.ridl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
webrpc = v1 # TODO, use v2
name = sequence-builder
version = v0.1.0
# db table: "email_templates"
struct EmailTemplate
- id: uint64
+ go.field.name = ID
+ go.tag.db = id,omitempty
- templateType?: EmailTemplateType
+ go.field.name = TemplateType
+ go.tag.db = template_type
- projectId: uint64
+ go.field.name = ProjectID
+ go.tag.db = project_id
- subject: string
+ go.tag.db = subject
- introText: string
+ go.tag.db = intro_text
- logoUrl: string
+ go.field.name = LogoURL
+ go.tag.db = logo_url
- template?: string
+ go.field.name = Template
+ go.tag.db = template
- fromEmail?: string
+ go.tag.db = from_email
- placeholders: []string
+ go.tag.db = placeholders
- sesConfig?: SESSettings
+ go.tag.db = ses_config
- createdAt: timestamp
+ json = createdAt
+ go.tag.db = created_at
- updatedAt: timestamp
+ json = updatedAt
+ go.tag.db = updated_at
- deletedAt?: timestamp
+ go.tag.db = deleted_at,omitempty
+ go.tag.json = deletedAt,omitempty
+ go.field.type = *time.Time
struct SESSettings
- accessRoleARN: string
+ go.field.name = AccessRoleARN
- sourceARN: string
+ go.field.name = SourceARN
enum EmailTemplateType: uint8
- UNKNOWN
- LOGIN
- GUARD
##
## Errors
##
error 1000 Unauthorized "Unauthorized access" HTTP 401
error 1001 PermissionDenied "Permission denied" HTTP 403
error 1002 SessionExpired "Session expired" HTTP 403
error 1003 MethodNotFound "Method not found" HTTP 404
error 1004 RequestConflict "Conflict with target resource" HTTP 409
error 2000 Timeout "Request timed out" HTTP 408
error 2001 InvalidArgument "Invalid argument" HTTP 400
error 3000 NotFound "Resource not found" HTTP 400
error 3001 UserNotFound "User not found" HTTP 400
error 3002 ProjectNotFound "Project not found" HTTP 400
error 3003 InvalidTier "Invalid subscription tier" HTTP 400
error 3004 EmailTemplateExists "Email Template exists" HTTP 409
error 3005 SubscriptionLimit "Subscription limit reached" HTTP 402
error 3006 FeatureNotIncluded "Feature not included" HTTP 402
error 3007 InvalidNetwork "Invalid network" HTTP 400
error 4000 InvitationExpired "Invitation code is expired" HTTP 400
error 4001 AlreadyCollaborator "Already a collaborator" HTTP 409
##
## Builder rpc service
##
service Builder
# Project > Email Templates
#
- GetEmailTemplate(projectId: uint64, templateType?: EmailTemplateType) => (emailTemplate: EmailTemplate)