Skip to content

Commit 2fe9e7e

Browse files
authored
Merge pull request #4 from BehnH/bot/generate-client
[Automated] OpenAPI Spec Update
2 parents 15d82ac + 6b11cef commit 2fe9e7e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+974
-79
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,3 @@ _testmain.go
2222
*.exe
2323
*.test
2424
*.prof
25-
26-
.idea/
27-
.vscode/

.openapi-generator/FILES

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ api/openapi.yaml
55
api_contacts.go
66
api_custom_fields.go
77
api_events.go
8+
api_mailing_lists.go
89
api_transactional_emails.go
910
client.go
1011
configuration.go
@@ -22,6 +23,8 @@ docs/EventFailureResponse.md
2223
docs/EventRequest.md
2324
docs/EventSuccessResponse.md
2425
docs/EventsAPI.md
26+
docs/MailingList.md
27+
docs/MailingListsAPI.md
2528
docs/TransactionalEmailsAPI.md
2629
docs/TransactionalFailure2Response.md
2730
docs/TransactionalFailure2ResponseError.md
@@ -45,11 +48,13 @@ model_custom_field.go
4548
model_event_failure_response.go
4649
model_event_request.go
4750
model_event_success_response.go
51+
model_mailing_list.go
4852
model_transactional_failure2_response.go
4953
model_transactional_failure2_response_error.go
5054
model_transactional_failure3_response.go
5155
model_transactional_failure_response.go
5256
model_transactional_request.go
5357
model_transactional_success_response.go
5458
response.go
59+
test/api_mailing_lists_test.go
5560
utils.go

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.2.0
1+
7.7.0

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ This is the OpenAPI Spec for the [Loops API](https://loops.so/docs/api).
55
## Overview
66
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
77

8-
- API version: 1.0.1
8+
- API version: 1.3.0
99
- Package version: 1.0.2
10+
- Generator version: 7.7.0
1011
- Build package: org.openapitools.codegen.languages.GoClientCodegen
1112

1213
## Installation
@@ -83,6 +84,7 @@ Class | Method | HTTP request | Description
8384
*ContactsAPI* | [**ContactsUpdatePut**](docs/ContactsAPI.md#contactsupdateput) | **Put** /contacts/update | Update a contact
8485
*CustomFieldsAPI* | [**ContactsCustomFieldsGet**](docs/CustomFieldsAPI.md#contactscustomfieldsget) | **Get** /contacts/customFields | Get a list of custom contact properties
8586
*EventsAPI* | [**EventsSendPost**](docs/EventsAPI.md#eventssendpost) | **Post** /events/send | Send an event
87+
*MailingListsAPI* | [**ListsGet**](docs/MailingListsAPI.md#listsget) | **Get** /lists | Get a list of mailing lists
8688
*TransactionalEmailsAPI* | [**TransactionalPost**](docs/TransactionalEmailsAPI.md#transactionalpost) | **Post** /transactional | Send a transactional email
8789

8890

@@ -99,6 +101,7 @@ Class | Method | HTTP request | Description
99101
- [EventFailureResponse](docs/EventFailureResponse.md)
100102
- [EventRequest](docs/EventRequest.md)
101103
- [EventSuccessResponse](docs/EventSuccessResponse.md)
104+
- [MailingList](docs/MailingList.md)
102105
- [TransactionalFailure2Response](docs/TransactionalFailure2Response.md)
103106
- [TransactionalFailure2ResponseError](docs/TransactionalFailure2ResponseError.md)
104107
- [TransactionalFailure3Response](docs/TransactionalFailure3Response.md)

api/openapi.yaml

Lines changed: 97 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@ openapi: 3.0.3
22
info:
33
description: "This is the OpenAPI Spec for the [Loops API](https://loops.so/docs/api)."
44
title: Loops OpenAPI Spec
5-
version: 1.0.1
5+
version: 1.3.0
66
servers:
77
- url: https://app.loops.so/api/v1
88
tags:
99
- description: Manage contacts in your audience
1010
name: Contacts
11+
- description: View mailing lists
12+
name: Mailing lists
1113
- description: Trigger email sending with events
1214
name: Events
1315
- description: Send transactional emails
1416
name: Transactional emails
15-
- description: Custom contact properties
17+
- description: View custom contact properties
1618
name: Custom fields
1719
paths:
1820
/contacts/create:
@@ -80,7 +82,7 @@ paths:
8082
application/json:
8183
schema:
8284
$ref: '#/components/schemas/ContactSuccessResponse'
83-
description: Successful update
85+
description: Successful update.
8486
"400":
8587
content:
8688
application/json:
@@ -100,13 +102,21 @@ paths:
100102
- Contacts
101103
/contacts/find:
102104
get:
103-
description: Search for a contact by `email`.
105+
description: Search for a contact by `email` or `userId`. Only one parameter
106+
is allowed.
104107
parameters:
105108
- description: Email address (URI-encoded)
106109
explode: true
107110
in: query
108111
name: email
109-
required: true
112+
required: false
113+
schema:
114+
type: string
115+
style: form
116+
- explode: true
117+
in: query
118+
name: userId
119+
required: false
110120
schema:
111121
type: string
112122
style: form
@@ -149,7 +159,7 @@ paths:
149159
application/json:
150160
schema:
151161
$ref: '#/components/schemas/ContactDeleteResponse'
152-
description: Successful delete
162+
description: Successful delete.
153163
"400":
154164
content:
155165
application/json:
@@ -175,6 +185,25 @@ paths:
175185
summary: Delete a contact
176186
tags:
177187
- Contacts
188+
/lists:
189+
get:
190+
description: Retrieve a list of your account's mailing lists.
191+
responses:
192+
"200":
193+
content:
194+
application/json:
195+
schema:
196+
items:
197+
$ref: '#/components/schemas/MailingList'
198+
type: array
199+
description: Successful.
200+
"405":
201+
description: Wrong HTTP request method.
202+
security:
203+
- apiKey: []
204+
summary: Get a list of mailing lists
205+
tags:
206+
- Mailing lists
178207
/events/send:
179208
post:
180209
description: Send events to trigger emails in Loops.
@@ -185,9 +214,12 @@ paths:
185214
$ref: '#/components/schemas/EventRequest'
186215
description: "Provide either `email` or `userId` to identify the contact ([read\
187216
\ more](https://loops.so/docs/api-reference/send-event#body)).<br>You can\
188-
\ add custom contact properties as keys in this request (of type `string`,\
189-
\ `number`, `boolean` or `date` ([see available date formats](https://loops.so/docs/contacts/properties#dates))).<br>Make\
190-
\ sure to create the properties in Loops before using them in API calls."
217+
\ add event properties, which will be available in emails sent by this event.\
218+
\ Values can be of type string, number, boolean or date ([see allowed date\
219+
\ formats](https://loops.so/docs/events/properties#important-information-about-event-properties)).<br>Make\
220+
\ sure to create the properties in Loops before using them in API calls.<br>You\
221+
\ can add contact properties as keys in this request (of type `string`,\
222+
\ `number`, `boolean` or `date` ([see available date formats](https://loops.so/docs/contacts/properties#dates)))."
191223
required: true
192224
responses:
193225
"200":
@@ -255,7 +287,7 @@ paths:
255287
items:
256288
$ref: '#/components/schemas/CustomField'
257289
type: array
258-
description: Successful send.
290+
description: Successful.
259291
"405":
260292
description: Wrong HTTP request method.
261293
security:
@@ -301,6 +333,8 @@ components:
301333
userGroup: userGroup
302334
userId: userId
303335
email: email
336+
mailingLists:
337+
list_123: true
304338
properties:
305339
email:
306340
type: string
@@ -314,6 +348,11 @@ components:
314348
type: string
315349
userId:
316350
type: string
351+
mailingLists:
352+
description: An object of mailing list IDs and boolean subscription statuses.
353+
example:
354+
list_123: true
355+
type: object
317356
required:
318357
- email
319358
type: object
@@ -329,6 +368,9 @@ components:
329368
type: string
330369
type: object
331370
ContactFailureResponse:
371+
example:
372+
success: false
373+
message: message
332374
properties:
333375
success:
334376
example: false
@@ -363,13 +405,25 @@ components:
363405
eventName: eventName
364406
userId: userId
365407
email: email
408+
eventProperties: "{}"
409+
mailingLists:
410+
list_123: true
366411
properties:
367412
email:
368413
type: string
369414
userId:
370415
type: string
371416
eventName:
372417
type: string
418+
eventProperties:
419+
description: "An object containing event property data for the event, available\
420+
\ in emails sent by the event."
421+
type: object
422+
mailingLists:
423+
description: An object of mailing list IDs and boolean subscription statuses.
424+
example:
425+
list_123: true
426+
type: object
373427
required:
374428
- eventName
375429
type: object
@@ -382,6 +436,9 @@ components:
382436
type: boolean
383437
type: object
384438
EventFailureResponse:
439+
example:
440+
success: false
441+
message: message
385442
properties:
386443
success:
387444
example: false
@@ -391,6 +448,7 @@ components:
391448
type: object
392449
TransactionalRequest:
393450
example:
451+
addToAudience: true
394452
dataVariables: "{}"
395453
transactionalId: transactionalId
396454
email: email
@@ -400,6 +458,10 @@ components:
400458
transactionalId:
401459
description: The ID of the transactional email to send.
402460
type: string
461+
addToAudience:
462+
description: "If `true`, a contact will be created in your audience using\
463+
\ the `email` value (if a matching contact doesn't already exist)."
464+
type: boolean
403465
dataVariables:
404466
description: An object containing contact data as defined by the data variables
405467
added to the transactional email template.
@@ -417,6 +479,10 @@ components:
417479
type: boolean
418480
type: object
419481
TransactionalFailureResponse:
482+
example:
483+
path: path
484+
success: false
485+
message: message
420486
properties:
421487
success:
422488
example: false
@@ -427,6 +493,11 @@ components:
427493
type: string
428494
type: object
429495
TransactionalFailure2Response:
496+
example:
497+
success: false
498+
error:
499+
path: path
500+
message: message
430501
properties:
431502
success:
432503
example: false
@@ -446,7 +517,7 @@ components:
446517
example:
447518
key: favoriteColor
448519
label: Favorite color
449-
type: string
520+
type: type
450521
properties:
451522
key:
452523
type: string
@@ -455,7 +526,19 @@ components:
455526
type:
456527
type: string
457528
type: object
529+
MailingList:
530+
example:
531+
id: list_123
532+
name: Main mailing list
533+
properties:
534+
id:
535+
type: string
536+
name:
537+
type: string
538+
type: object
458539
_contacts_delete_post_500_response:
540+
example:
541+
success: false
459542
properties:
460543
success:
461544
example: false
@@ -467,6 +550,9 @@ components:
467550
- $ref: '#/components/schemas/TransactionalFailure2Response'
468551
- $ref: '#/components/schemas/TransactionalFailure3Response'
469552
TransactionalFailure2Response_error:
553+
example:
554+
path: path
555+
message: message
470556
properties:
471557
path:
472558
type: string

api_contacts.go

Lines changed: 14 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api_custom_fields.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)