Skip to content

Commit 3ca8cf9

Browse files
AnandChowdharygithub-actions[bot]
authored andcommitted
chore(app): Generate updated SDKs
1 parent 8a6d131 commit 3ca8cf9

File tree

138 files changed

+17527
-1
lines changed

Some content is hidden

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

138 files changed

+17527
-1
lines changed

go-client/.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Compiled Object files, Static and Dynamic libs (Shared Objects)
2+
*.o
3+
*.a
4+
*.so
5+
6+
# Folders
7+
_obj
8+
_test
9+
10+
# Architecture specific extensions/prefixes
11+
*.[568vq]
12+
[568vq].out
13+
14+
*.cgo1.go
15+
*.cgo2.c
16+
_cgo_defun.c
17+
_cgo_gotypes.go
18+
_cgo_export.*
19+
20+
_testmain.go
21+
22+
*.exe
23+
*.test
24+
*.prof

go-client/.openapi-generator-ignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

go-client/.openapi-generator/FILES

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.gitignore
2+
.openapi-generator-ignore
3+
.travis.yml
4+
README.md
5+
api/openapi.yaml
6+
api_incoming_webhooks.go
7+
api_teams.go
8+
client.go
9+
configuration.go
10+
docs/IncomingWebhooksApi.md
11+
docs/MarkConversationAsWonBody.md
12+
docs/Success.md
13+
docs/Team.md
14+
docs/TeamsApi.md
15+
git_push.sh
16+
go.mod
17+
go.sum
18+
model_mark_conversation_as_won_body.go
19+
model_success.go
20+
model_team.go
21+
response.go
22+
test/api_incoming_webhooks_test.go
23+
test/api_teams_test.go
24+
utils.go

go-client/.openapi-generator/VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6.6.0-SNAPSHOT

go-client/.travis.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
language: go
2+
3+
install:
4+
- go get -d -v .
5+
6+
script:
7+
- go build -v ./
8+

go-client/README.md

+123
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# Go API client for openapi
2+
3+
The FirstQuadrant API is used to interact with FirstQuadrant programmatically. We also have SDKs available (coming soon).
4+
5+
## Overview
6+
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.
7+
8+
- API version: 0.0.0
9+
- Package version: 1.0.0
10+
- Build package: org.openapitools.codegen.languages.GoClientCodegen
11+
12+
## Installation
13+
14+
Install the following dependencies:
15+
16+
```shell
17+
go get github.com/stretchr/testify/assert
18+
go get golang.org/x/net/context
19+
```
20+
21+
Put the package under your project folder and add the following in import:
22+
23+
```golang
24+
import openapi "github.com/GIT_USER_ID/GIT_REPO_ID"
25+
```
26+
27+
To use a proxy, set the environment variable `HTTP_PROXY`:
28+
29+
```golang
30+
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
31+
```
32+
33+
## Configuration of Server URL
34+
35+
Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification.
36+
37+
### Select Server Configuration
38+
39+
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
40+
41+
```golang
42+
ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1)
43+
```
44+
45+
### Templated Server URL
46+
47+
Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
48+
49+
```golang
50+
ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{
51+
"basePath": "v2",
52+
})
53+
```
54+
55+
Note, enum values are always validated and all unused variables are silently ignored.
56+
57+
### URLs Configuration per Operation
58+
59+
Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
60+
An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
61+
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
62+
63+
```golang
64+
ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{
65+
"{classname}Service.{nickname}": 2,
66+
})
67+
ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{
68+
"{classname}Service.{nickname}": {
69+
"port": "8443",
70+
},
71+
})
72+
```
73+
74+
## Documentation for API Endpoints
75+
76+
All URIs are relative to *https://api.firstquadrant.ai*
77+
78+
Class | Method | HTTP request | Description
79+
------------ | ------------- | ------------- | -------------
80+
*IncomingWebhooksApi* | [**IncomingWebhooksMarkConversationsAsWonPost**](docs/IncomingWebhooksApi.md#incomingwebhooksmarkconversationsaswonpost) | **Post** /incoming-webhooks/mark-conversations-as-won | Mark conversations as won
81+
*TeamsApi* | [**TeamsMeGet**](docs/TeamsApi.md#teamsmeget) | **Get** /teams/me | Get team
82+
83+
84+
## Documentation For Models
85+
86+
- [MarkConversationAsWonBody](docs/MarkConversationAsWonBody.md)
87+
- [Success](docs/Success.md)
88+
- [Team](docs/Team.md)
89+
90+
91+
## Documentation For Authorization
92+
93+
94+
95+
### api_key
96+
97+
- **Type**: API key
98+
- **API key parameter name**: Authorization
99+
- **Location**: HTTP header
100+
101+
Note, each API key must be added to a map of `map[string]APIKey` where the key is: Authorization and passed in as the auth context for each request.
102+
103+
104+
## Documentation for Utility Methods
105+
106+
Due to the fact that model structure members are all pointers, this package contains
107+
a number of utility functions to easily obtain pointers to values of basic types.
108+
Each of these functions takes a value of the given basic type and returns a pointer to it:
109+
110+
* `PtrBool`
111+
* `PtrInt`
112+
* `PtrInt32`
113+
* `PtrInt64`
114+
* `PtrFloat`
115+
* `PtrFloat32`
116+
* `PtrFloat64`
117+
* `PtrString`
118+
* `PtrTime`
119+
120+
## Author
121+
122+
123+

go-client/api/openapi.yaml

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
openapi: 3.1.0
2+
info:
3+
contact:
4+
5+
description: The FirstQuadrant API is used to interact with FirstQuadrant programmatically.
6+
We also have SDKs available (coming soon).
7+
termsOfService: https://firstquadrant.ai/terms
8+
title: FirstQuadrant API
9+
version: 0.0.0
10+
externalDocs:
11+
description: FirstQuadrant API documentation
12+
url: https://docs.firstquadrant.ai
13+
servers:
14+
- url: https://api.firstquadrant.ai
15+
tags:
16+
- description: Operations about your team
17+
name: teams
18+
- description: Inform FirstQuadrant about events using incoming webhooks
19+
name: incoming-webhooks
20+
paths:
21+
/teams/me:
22+
get:
23+
description: Get the team associated with the API key.
24+
responses:
25+
"200":
26+
content:
27+
application/json:
28+
schema:
29+
$ref: '#/components/schemas/Team'
30+
description: Team object
31+
security:
32+
- api_key:
33+
- write:team
34+
- read:team
35+
summary: Get team
36+
tags:
37+
- teams
38+
/incoming-webhooks/mark-conversations-as-won:
39+
post:
40+
description: Mark any open conversations with a particular lead as "Won" as
41+
a custom goal.
42+
requestBody:
43+
content:
44+
application/json:
45+
schema:
46+
$ref: '#/components/schemas/MarkConversationAsWonBody'
47+
description: Find conversations using the given email address and create unique
48+
goal events based on the idempotency key.
49+
required: true
50+
responses:
51+
"200":
52+
content:
53+
application/json:
54+
schema:
55+
$ref: '#/components/schemas/Success'
56+
description: Successfully queued operation
57+
security:
58+
- api_key:
59+
- write:team
60+
- read:team
61+
summary: Mark conversations as won
62+
tags:
63+
- incoming-webhooks
64+
components:
65+
requestBodies:
66+
MarkConversationAsWonBody:
67+
content:
68+
application/json:
69+
schema:
70+
$ref: '#/components/schemas/MarkConversationAsWonBody'
71+
description: Success response
72+
schemas:
73+
MarkConversationAsWonBody:
74+
example:
75+
idempotencyKey: aac843f5-69ab-4f88-9afb-0ed33a383ee4
76+
77+
properties:
78+
email:
79+
80+
idempotencyKey:
81+
example: aac843f5-69ab-4f88-9afb-0ed33a383ee4
82+
required:
83+
- email
84+
- idempotencyKey
85+
Success:
86+
example:
87+
success: true
88+
properties:
89+
success:
90+
enum:
91+
- true
92+
example: true
93+
required:
94+
- success
95+
Team:
96+
example:
97+
createdAt: 2022-29-12T00:00:00.000Z
98+
name: My Team
99+
timeZone: America/Los_Angeles
100+
id: tea_2MSb8jd6VDptcAcVJuPcJhte3Yc
101+
updatedAt: 2022-29-12T00:00:00.000Z
102+
properties:
103+
id:
104+
example: tea_2MSb8jd6VDptcAcVJuPcJhte3Yc
105+
name:
106+
example: My Team
107+
createdAt:
108+
example: 2022-29-12T00:00:00.000Z
109+
format: date-time
110+
updatedAt:
111+
example: 2022-29-12T00:00:00.000Z
112+
format: date-time
113+
timeZone:
114+
example: America/Los_Angeles
115+
required:
116+
- createdAt
117+
- id
118+
- name
119+
- timeZone
120+
- updatedAt
121+
securitySchemes:
122+
api_key:
123+
description: You can generate an API key by logging in to your FirstQuadrant
124+
account and navigating to Settings -> Apps and enabling "FirstQuadrant API".
125+
The API key should begin with "fqa_".
126+
in: header
127+
name: Authorization
128+
type: apiKey

0 commit comments

Comments
 (0)