@emulates/brevo 0.0.0-stage → 0.1.1
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/CHANGELOG.md +9 -0
- package/DISCOVERY.md +55 -0
- package/README.md +81 -2
- package/SUPPORT.md +14 -0
- package/dist/chunk-3R7R4JQ7.js +820 -0
- package/dist/chunk-3R7R4JQ7.js.map +7 -0
- package/dist/chunk-JD2SD3O3.js +3338 -0
- package/dist/chunk-JD2SD3O3.js.map +7 -0
- package/dist/cli.js +19 -0
- package/dist/cli.js.map +7 -0
- package/dist/index.d.ts +911 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +7 -0
- package/dist/server.d.ts +1354 -0
- package/dist/server.js +12 -0
- package/dist/server.js.map +7 -0
- package/openapi.yaml +119 -0
- package/package.json +122 -4
package/dist/server.js
ADDED
package/openapi.yaml
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
openapi: 3.1.0
|
|
2
|
+
info:
|
|
3
|
+
title: Brevo contacts subset
|
|
4
|
+
version: v3
|
|
5
|
+
x-emulates-upstream:
|
|
6
|
+
url: https://developers.brevo.com/reference/create-contact
|
|
7
|
+
servers:
|
|
8
|
+
- url: https://api.brevo.com
|
|
9
|
+
security:
|
|
10
|
+
- apiKey: []
|
|
11
|
+
paths:
|
|
12
|
+
/v3/contacts:
|
|
13
|
+
post:
|
|
14
|
+
operationId: CreateContact
|
|
15
|
+
requestBody:
|
|
16
|
+
required: true
|
|
17
|
+
content:
|
|
18
|
+
application/json:
|
|
19
|
+
example: { email: synthetic@example.invalid, ext_id: mock-contact, listIds: [1], updateEnabled: false }
|
|
20
|
+
schema:
|
|
21
|
+
allOf:
|
|
22
|
+
- { $ref: '#/components/schemas/contact_write' }
|
|
23
|
+
- type: object
|
|
24
|
+
properties:
|
|
25
|
+
email: { type: string, maxLength: 254 }
|
|
26
|
+
updateEnabled: { type: boolean }
|
|
27
|
+
responses:
|
|
28
|
+
'201':
|
|
29
|
+
description: Contact created
|
|
30
|
+
content:
|
|
31
|
+
application/json:
|
|
32
|
+
schema:
|
|
33
|
+
type: object
|
|
34
|
+
required: [id]
|
|
35
|
+
properties:
|
|
36
|
+
id: { type: integer }
|
|
37
|
+
'204': { description: Existing contact updated }
|
|
38
|
+
'400': { $ref: '#/components/responses/Error' }
|
|
39
|
+
'401': { $ref: '#/components/responses/Error' }
|
|
40
|
+
x-emulates: { supported: true, parity: { enabled: true, safe: false } }
|
|
41
|
+
/v3/contacts/{identifier}:
|
|
42
|
+
parameters:
|
|
43
|
+
- name: identifier
|
|
44
|
+
in: path
|
|
45
|
+
required: true
|
|
46
|
+
schema: { type: string, minLength: 1, maxLength: 254 }
|
|
47
|
+
- name: identifierType
|
|
48
|
+
in: query
|
|
49
|
+
schema: { type: string, enum: [email_id, contact_id, ext_id] }
|
|
50
|
+
get:
|
|
51
|
+
operationId: GetContact
|
|
52
|
+
responses:
|
|
53
|
+
'200':
|
|
54
|
+
description: Contact details
|
|
55
|
+
content:
|
|
56
|
+
application/json:
|
|
57
|
+
schema: { $ref: '#/components/schemas/contact' }
|
|
58
|
+
'400': { $ref: '#/components/responses/Error' }
|
|
59
|
+
'401': { $ref: '#/components/responses/Error' }
|
|
60
|
+
'404': { $ref: '#/components/responses/Error' }
|
|
61
|
+
x-emulates: { supported: true, parity: { enabled: true, safe: true } }
|
|
62
|
+
put:
|
|
63
|
+
operationId: UpdateContact
|
|
64
|
+
requestBody:
|
|
65
|
+
required: true
|
|
66
|
+
content:
|
|
67
|
+
application/json:
|
|
68
|
+
schema: { $ref: '#/components/schemas/contact_write' }
|
|
69
|
+
responses:
|
|
70
|
+
'204': { description: Contact updated }
|
|
71
|
+
'400': { $ref: '#/components/responses/Error' }
|
|
72
|
+
'401': { $ref: '#/components/responses/Error' }
|
|
73
|
+
'404': { $ref: '#/components/responses/Error' }
|
|
74
|
+
x-emulates: { supported: true, parity: { enabled: true, safe: false } }
|
|
75
|
+
delete:
|
|
76
|
+
operationId: DeleteContact
|
|
77
|
+
responses:
|
|
78
|
+
'204': { description: Contact deleted }
|
|
79
|
+
'400': { $ref: '#/components/responses/Error' }
|
|
80
|
+
'401': { $ref: '#/components/responses/Error' }
|
|
81
|
+
'404': { $ref: '#/components/responses/Error' }
|
|
82
|
+
x-emulates: { supported: true, parity: { enabled: true, safe: false } }
|
|
83
|
+
components:
|
|
84
|
+
securitySchemes:
|
|
85
|
+
apiKey: { type: apiKey, in: header, name: api-key }
|
|
86
|
+
responses:
|
|
87
|
+
Error:
|
|
88
|
+
description: Brevo error envelope
|
|
89
|
+
content:
|
|
90
|
+
application/json:
|
|
91
|
+
schema:
|
|
92
|
+
type: object
|
|
93
|
+
required: [code, message]
|
|
94
|
+
properties:
|
|
95
|
+
code: { type: string }
|
|
96
|
+
message: { type: string }
|
|
97
|
+
schemas:
|
|
98
|
+
contact_write:
|
|
99
|
+
type: object
|
|
100
|
+
properties:
|
|
101
|
+
ext_id: { type: string, maxLength: 200 }
|
|
102
|
+
attributes: { type: object, additionalProperties: true }
|
|
103
|
+
listIds: { type: array, maxItems: 20, items: { type: integer, minimum: 1 } }
|
|
104
|
+
unlinkListIds: { type: array, maxItems: 20, items: { type: integer, minimum: 1 } }
|
|
105
|
+
emailBlacklisted: { type: boolean }
|
|
106
|
+
smsBlacklisted: { type: boolean }
|
|
107
|
+
contact:
|
|
108
|
+
type: object
|
|
109
|
+
required: [id, attributes, listIds, createdAt, modifiedAt, emailBlacklisted, smsBlacklisted]
|
|
110
|
+
properties:
|
|
111
|
+
id: { type: integer }
|
|
112
|
+
email: { type: string }
|
|
113
|
+
ext_id: { type: string }
|
|
114
|
+
attributes: { type: object, additionalProperties: true }
|
|
115
|
+
listIds: { type: array, items: { type: integer } }
|
|
116
|
+
createdAt: { type: string, format: date-time }
|
|
117
|
+
modifiedAt: { type: string, format: date-time }
|
|
118
|
+
emailBlacklisted: { type: boolean }
|
|
119
|
+
smsBlacklisted: { type: boolean }
|
package/package.json
CHANGED
|
@@ -1,6 +1,124 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emulates/brevo",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Stateful Brevo contact creation, external-id updates and email deletion emulator.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md",
|
|
11
|
+
"CHANGELOG.md",
|
|
12
|
+
"DISCOVERY.md",
|
|
13
|
+
"SUPPORT.md",
|
|
14
|
+
"openapi.yaml"
|
|
15
|
+
],
|
|
16
|
+
"main": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"default": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./server": {
|
|
24
|
+
"types": "./dist/server.d.ts",
|
|
25
|
+
"default": "./dist/server.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"bin": {
|
|
29
|
+
"emulates-brevo": "./dist/cli.js"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public",
|
|
33
|
+
"provenance": true
|
|
34
|
+
},
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/crvouga/emulators.git",
|
|
38
|
+
"directory": "packages/service/brevo"
|
|
39
|
+
},
|
|
40
|
+
"homepage": "https://github.com/crvouga/emulators/tree/main/packages/service/brevo#readme",
|
|
41
|
+
"keywords": [
|
|
42
|
+
"emulates",
|
|
43
|
+
"service",
|
|
44
|
+
"brevo",
|
|
45
|
+
"contacts"
|
|
46
|
+
],
|
|
47
|
+
"emulates": {
|
|
48
|
+
"runtime": "portable",
|
|
49
|
+
"entries": {
|
|
50
|
+
"server": "node",
|
|
51
|
+
"cli": "node"
|
|
52
|
+
},
|
|
53
|
+
"layer": "service",
|
|
54
|
+
"category": "marketing",
|
|
55
|
+
"displayName": "Brevo",
|
|
56
|
+
"vendor": {
|
|
57
|
+
"website": "https://www.brevo.com",
|
|
58
|
+
"docs": "https://developers.brevo.com/reference/create-contact",
|
|
59
|
+
"description": "Brevo contact management and customer identifiers."
|
|
60
|
+
},
|
|
61
|
+
"parity": "Contact identity and CRUD",
|
|
62
|
+
"parityTier": "cold",
|
|
63
|
+
"playground": {
|
|
64
|
+
"headers": {
|
|
65
|
+
"api-key": "mock_brevo_key"
|
|
66
|
+
},
|
|
67
|
+
"operation": "CreateContact"
|
|
68
|
+
},
|
|
69
|
+
"status": "wip",
|
|
70
|
+
"discovery": {
|
|
71
|
+
"guide": "DISCOVERY.md",
|
|
72
|
+
"behavior": "README.md",
|
|
73
|
+
"capabilities": "SUPPORT.md",
|
|
74
|
+
"contract": "openapi.yaml",
|
|
75
|
+
"types": "dist/index.d.ts",
|
|
76
|
+
"oracle": {
|
|
77
|
+
"kind": "Live vendor API or sandbox",
|
|
78
|
+
"command": "bun run parity:service -- brevo",
|
|
79
|
+
"note": "Run from an Emulates checkout; credentials come only from .env.local or GitHub Actions secrets. Missing credentials exit 2."
|
|
80
|
+
},
|
|
81
|
+
"introspection": [
|
|
82
|
+
"GET /__admin/health",
|
|
83
|
+
"GET /__admin",
|
|
84
|
+
"GET /__admin/state",
|
|
85
|
+
"GET /__admin/requests",
|
|
86
|
+
"GET /__admin/metrics",
|
|
87
|
+
"GET /__admin/faults/presets",
|
|
88
|
+
"GET /__admin/ui"
|
|
89
|
+
],
|
|
90
|
+
"reporting": "https://github.com/crvouga/emulators/blob/main/docs/REPORTING_ISSUES.md"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"scripts": {
|
|
94
|
+
"generate": "bun ../../openapi/codegen/dist/cli.js",
|
|
95
|
+
"generate:check": "bun ../../openapi/codegen/dist/cli.js --check",
|
|
96
|
+
"openapi:check": "bun ../../openapi/codegen/dist/cli.js --validate",
|
|
97
|
+
"build": "bun ../../../scripts/bundle-service.ts",
|
|
98
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
99
|
+
"lint": "biome check .",
|
|
100
|
+
"test": "bun test",
|
|
101
|
+
"parity": "bun scripts/parity.ts",
|
|
102
|
+
"portability": "bun ../../../scripts/portability.ts",
|
|
103
|
+
"pack:check": "bun ../../../scripts/pack-check.ts"
|
|
104
|
+
},
|
|
105
|
+
"dependencies": {
|
|
106
|
+
"@emulates/sqlite": "2.1.2",
|
|
107
|
+
"hono": "4.11.9"
|
|
108
|
+
},
|
|
109
|
+
"devDependencies": {
|
|
110
|
+
"fast-check": "4.9.0",
|
|
111
|
+
"@emulates/testing": "0.1.0",
|
|
112
|
+
"@emulates/sqlite": "0.0.0-development",
|
|
113
|
+
"@emulates/parity": "0.0.0-development",
|
|
114
|
+
"@emulates/credentials": "0.0.0-development",
|
|
115
|
+
"@emulates/openapi-codegen": "0.1.0",
|
|
116
|
+
"@emulates/openapi-metadata": "0.0.0-development",
|
|
117
|
+
"@emulates/core": "0.0.0-development",
|
|
118
|
+
"@emulates/sqlite-client": "0.0.0-development",
|
|
119
|
+
"@emulates/openapi": "0.0.0-development",
|
|
120
|
+
"@emulates/service": "0.0.0-development",
|
|
121
|
+
"@emulates/http-codec": "0.0.0-development",
|
|
122
|
+
"@emulates/adapter-node": "0.0.0-development"
|
|
123
|
+
}
|
|
124
|
+
}
|