Merge pull request #826 from Gara-Dorta/add-required-to-json-schema

Add required to json schema
This commit is contained in:
Bernhard B. 2026-04-06 21:05:52 +02:00 committed by GitHub
commit b3ba748dd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 974 additions and 43 deletions

View File

@ -142,7 +142,7 @@ COPY src/plugin_loader.go /tmp/signal-cli-rest-api-src/
# build signal-cli-rest-api # build signal-cli-rest-api
RUN ls -la /tmp/signal-cli-rest-api-src RUN ls -la /tmp/signal-cli-rest-api-src
RUN cd /tmp/signal-cli-rest-api-src && ${GOPATH}/bin/swag init RUN cd /tmp/signal-cli-rest-api-src && ${GOPATH}/bin/swag init --requiredByDefault
RUN cd /tmp/signal-cli-rest-api-src && go build -o signal-cli-rest-api main.go RUN cd /tmp/signal-cli-rest-api-src && go build -o signal-cli-rest-api main.go
RUN cd /tmp/signal-cli-rest-api-src && go test ./client -v && go test ./utils -v RUN cd /tmp/signal-cli-rest-api-src && go test ./client -v && go test ./utils -v

View File

@ -34,32 +34,32 @@ const (
type UpdateContactRequest struct { type UpdateContactRequest struct {
Recipient string `json:"recipient"` Recipient string `json:"recipient"`
Name *string `json:"name"` Name *string `json:"name,omitempty"`
ExpirationInSeconds *int `json:"expiration_in_seconds"` ExpirationInSeconds *int `json:"expiration_in_seconds,omitempty"`
} }
type CreateGroupRequest struct { type CreateGroupRequest struct {
Name string `json:"name"` Name string `json:"name"`
Members []string `json:"members"` Members []string `json:"members"`
Description string `json:"description"` Description string `json:"description,omitempty"`
Permissions ds.GroupPermissions `json:"permissions"` Permissions ds.GroupPermissions `json:"permissions,omitempty"`
GroupLinkState string `json:"group_link" enums:"disabled,enabled,enabled-with-approval"` GroupLinkState string `json:"group_link,omitempty" enums:"disabled,enabled,enabled-with-approval"`
ExpirationTime *int `json:"expiration_time"` ExpirationTime *int `json:"expiration_time,omitempty"`
} }
type UpdateGroupRequest struct { type UpdateGroupRequest struct {
Base64Avatar *string `json:"base64_avatar"` Base64Avatar *string `json:"base64_avatar,omitempty"`
Description *string `json:"description"` Description *string `json:"description,omitempty"`
Name *string `json:"name"` Name *string `json:"name,omitempty"`
ExpirationTime *int `json:"expiration_time"` ExpirationTime *int `json:"expiration_time,omitempty"`
GroupLinkState *string `json:"group_link" enums:"disabled,enabled,enabled-with-approval"` GroupLinkState *string `json:"group_link,omitempty" enums:"disabled,enabled,enabled-with-approval"`
Permissions *ds.GroupPermissions `json:"permissions"` Permissions *ds.GroupPermissions `json:"permissions,omitempty"`
} }
type PinMessageInGroupRequest struct { type PinMessageInGroupRequest struct {
TargetAuthor string `json:"target_author"` TargetAuthor string `json:"target_author"`
Timestamp int64 `json:"timestamp"` Timestamp int64 `json:"timestamp"`
Duration *int `json:"duration"` Duration *int `json:"duration,omitempty"`
} }
type UnpinMessageInGroupRequest struct { type UnpinMessageInGroupRequest struct {
@ -84,17 +84,17 @@ type Configuration struct {
} }
type RegisterNumberRequest struct { type RegisterNumberRequest struct {
UseVoice bool `json:"use_voice"` UseVoice bool `json:"use_voice,omitempty"`
Captcha string `json:"captcha"` Captcha string `json:"captcha,omitempty"`
} }
type UnregisterNumberRequest struct { type UnregisterNumberRequest struct {
DeleteAccount bool `json:"delete_account" example:"false"` DeleteAccount bool `json:"delete_account,omitempty" example:"false"`
DeleteLocalData bool `json:"delete_local_data" example:"false"` DeleteLocalData bool `json:"delete_local_data,omitempty" example:"false"`
} }
type VerifyNumberSettings struct { type VerifyNumberSettings struct {
Pin string `json:"pin"` Pin string `json:"pin,omitempty"`
} }
type Reaction struct { type Reaction struct {
@ -114,27 +114,27 @@ type SendMessageV1 struct {
Number string `json:"number"` Number string `json:"number"`
Recipients []string `json:"recipients"` Recipients []string `json:"recipients"`
Message string `json:"message"` Message string `json:"message"`
Base64Attachment string `json:"base64_attachment" example:"'<BASE64 ENCODED DATA>' OR 'data:<MIME-TYPE>;base64,<BASE64 ENCODED DATA>' OR 'data:<MIME-TYPE>;filename=<FILENAME>;base64,<BASE64 ENCODED DATA>'"` Base64Attachment string `json:"base64_attachment,omitempty" example:"'<BASE64 ENCODED DATA>' OR 'data:<MIME-TYPE>;base64,<BASE64 ENCODED DATA>' OR 'data:<MIME-TYPE>;filename=<FILENAME>;base64,<BASE64 ENCODED DATA>'"`
IsGroup bool `json:"is_group"` IsGroup bool `json:"is_group,omitempty"`
} }
type SendMessageV2 struct { type SendMessageV2 struct {
Number string `json:"number"` Number string `json:"number"`
Recipients []string `json:"recipients"` Recipients []string `json:"recipients"`
Recipient string `json:"recipient" swaggerignore:"true"` //some REST API consumers (like the Synology NAS) do not support an array as recipients, so we provide this string parameter here as backup. In order to not confuse anyone, the parameter won't be exposed in the Swagger UI (most users are fine with the recipients parameter). Recipient string `json:"recipient,omitempty" swaggerignore:"true"` //some REST API consumers (like the Synology NAS) do not support an array as recipients, so we provide this string parameter here as backup. In order to not confuse anyone, the parameter won't be exposed in the Swagger UI (most users are fine with the recipients parameter).
Message string `json:"message"` Message string `json:"message"`
Base64Attachments []string `json:"base64_attachments" example:"<BASE64 ENCODED DATA>,data:<MIME-TYPE>;base64<comma><BASE64 ENCODED DATA>,data:<MIME-TYPE>;filename=<FILENAME>;base64<comma><BASE64 ENCODED DATA>"` Base64Attachments []string `json:"base64_attachments,omitempty" example:"<BASE64 ENCODED DATA>,data:<MIME-TYPE>;base64<comma><BASE64 ENCODED DATA>,data:<MIME-TYPE>;filename=<FILENAME>;base64<comma><BASE64 ENCODED DATA>"`
Sticker string `json:"sticker"` Sticker string `json:"sticker,omitempty"`
Mentions []ds.MessageMention `json:"mentions"` Mentions []ds.MessageMention `json:"mentions,omitempty"`
QuoteTimestamp *int64 `json:"quote_timestamp"` QuoteTimestamp *int64 `json:"quote_timestamp,omitempty"`
QuoteAuthor *string `json:"quote_author"` QuoteAuthor *string `json:"quote_author,omitempty"`
QuoteMessage *string `json:"quote_message"` QuoteMessage *string `json:"quote_message,omitempty"`
QuoteMentions []ds.MessageMention `json:"quote_mentions"` QuoteMentions []ds.MessageMention `json:"quote_mentions,omitempty"`
TextMode *string `json:"text_mode" enums:"normal,styled"` TextMode *string `json:"text_mode,omitempty" enums:"normal,styled"`
EditTimestamp *int64 `json:"edit_timestamp"` EditTimestamp *int64 `json:"edit_timestamp,omitempty"`
NotifySelf *bool `json:"notify_self"` NotifySelf *bool `json:"notify_self,omitempty"`
LinkPreview *ds.LinkPreviewType `json:"link_preview"` LinkPreview *ds.LinkPreviewType `json:"link_preview,omitempty"`
ViewOnce *bool `json:"view_once"` ViewOnce *bool `json:"view_once,omitempty"`
} }
type TypingIndicatorRequest struct { type TypingIndicatorRequest struct {
@ -157,13 +157,13 @@ type CreateGroupResponse struct {
type UpdateProfileRequest struct { type UpdateProfileRequest struct {
Name string `json:"name"` Name string `json:"name"`
Base64Avatar string `json:"base64_avatar"` Base64Avatar string `json:"base64_avatar,omitempty"`
About *string `json:"about"` About *string `json:"about,omitempty"`
} }
type TrustIdentityRequest struct { type TrustIdentityRequest struct {
VerifiedSafetyNumber *string `json:"verified_safety_number"` VerifiedSafetyNumber *string `json:"verified_safety_number,omitempty"`
TrustAllKnownKeys *bool `json:"trust_all_known_keys" example:"false"` TrustAllKnownKeys *bool `json:"trust_all_known_keys,omitempty" example:"false"`
} }
type SendMessageResponse struct { type SendMessageResponse struct {
@ -203,8 +203,8 @@ type RateLimitChallengeRequest struct {
} }
type UpdateAccountSettingsRequest struct { type UpdateAccountSettingsRequest struct {
DiscoverableByNumber *bool `json:"discoverable_by_number"` DiscoverableByNumber *bool `json:"discoverable_by_number,omitempty"`
ShareNumber *bool `json:"share_number"` ShareNumber *bool `json:"share_number,omitempty"`
} }
type SetUsernameRequest struct { type SetUsernameRequest struct {
@ -226,7 +226,7 @@ type RemoteDeleteRequest struct {
} }
type DeleteLocalAccountDataRequest struct { type DeleteLocalAccountDataRequest struct {
IgnoreRegistered bool `json:"ignore_registered" example:"false"` IgnoreRegistered bool `json:"ignore_registered,omitempty" example:"false"`
} }
type DeviceLinkUriResponse struct { type DeviceLinkUriResponse struct {
@ -237,7 +237,7 @@ type CreatePollRequest struct {
Recipient string `json:"recipient" example:"<phone number> OR <username> OR <group id>"` Recipient string `json:"recipient" example:"<phone number> OR <username> OR <group id>"`
Question string `json:"question" example:"What's your favourite fruit?"` Question string `json:"question" example:"What's your favourite fruit?"`
Answers []string `json:"answers" example:"apple,banana,orange"` Answers []string `json:"answers" example:"apple,banana,orange"`
AllowMultipleSelections *bool `json:"allow_multiple_selections" example:"true"` AllowMultipleSelections *bool `json:"allow_multiple_selections,omitempty" example:"true"`
} }
type CreatePollResponse struct { type CreatePollResponse struct {

View File

@ -9,7 +9,7 @@ docker run --rm -v $(pwd):/code ghcr.io/swaggo/swag:latest init
Or, if you have `swag` installed: Or, if you have `swag` installed:
```bash ```bash
swag init swag init --requiredByDefault
``` ```
Then run the app in `/src` Then run the app in `/src`

View File

@ -1482,6 +1482,112 @@ const docTemplate = `{
} }
} }
}, },
"/v1/groups/{number}/{groupid}/pin-message": {
"post": {
"description": "Pin a message in a Signal Group.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Groups"
],
"summary": "Pin a message in a Signal Group.",
"parameters": [
{
"description": "Pin",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/api.PinMessageInGroupRequest"
}
},
{
"type": "string",
"description": "Registered Phone Number",
"name": "number",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Group Id",
"name": "groupid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/api.Error"
}
}
}
},
"delete": {
"description": "Unpin a message in a Signal Group.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Groups"
],
"summary": "Unpin a message in a Signal Group.",
"parameters": [
{
"description": "Unpin",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/api.UnpinMessageInGroupRequest"
}
},
{
"type": "string",
"description": "Registered Phone Number",
"name": "number",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Group Id",
"name": "groupid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/api.Error"
}
}
}
}
},
"/v1/groups/{number}/{groupid}/quit": { "/v1/groups/{number}/{groupid}/quit": {
"post": { "post": {
"description": "Quit the specified Signal Group.", "description": "Quit the specified Signal Group.",
@ -2600,6 +2706,9 @@ const docTemplate = `{
"definitions": { "definitions": {
"api.AddDeviceRequest": { "api.AddDeviceRequest": {
"type": "object", "type": "object",
"required": [
"uri"
],
"properties": { "properties": {
"uri": { "uri": {
"type": "string" "type": "string"
@ -2608,6 +2717,10 @@ const docTemplate = `{
}, },
"api.AddStickerPackRequest": { "api.AddStickerPackRequest": {
"type": "object", "type": "object",
"required": [
"pack_id",
"pack_key"
],
"properties": { "properties": {
"pack_id": { "pack_id": {
"type": "string", "type": "string",
@ -2621,6 +2734,9 @@ const docTemplate = `{
}, },
"api.ChangeGroupAdminsRequest": { "api.ChangeGroupAdminsRequest": {
"type": "object", "type": "object",
"required": [
"admins"
],
"properties": { "properties": {
"admins": { "admins": {
"type": "array", "type": "array",
@ -2632,6 +2748,9 @@ const docTemplate = `{
}, },
"api.ChangeGroupMembersRequest": { "api.ChangeGroupMembersRequest": {
"type": "object", "type": "object",
"required": [
"members"
],
"properties": { "properties": {
"members": { "members": {
"type": "array", "type": "array",
@ -2643,6 +2762,10 @@ const docTemplate = `{
}, },
"api.ClosePollRequest": { "api.ClosePollRequest": {
"type": "object", "type": "object",
"required": [
"poll_timestamp",
"recipient"
],
"properties": { "properties": {
"poll_timestamp": { "poll_timestamp": {
"type": "string", "type": "string",
@ -2656,6 +2779,9 @@ const docTemplate = `{
}, },
"api.Configuration": { "api.Configuration": {
"type": "object", "type": "object",
"required": [
"logging"
],
"properties": { "properties": {
"logging": { "logging": {
"$ref": "#/definitions/api.LoggingConfiguration" "$ref": "#/definitions/api.LoggingConfiguration"
@ -2664,6 +2790,10 @@ const docTemplate = `{
}, },
"api.CreateGroupRequest": { "api.CreateGroupRequest": {
"type": "object", "type": "object",
"required": [
"members",
"name"
],
"properties": { "properties": {
"description": { "description": {
"type": "string" "type": "string"
@ -2695,6 +2825,9 @@ const docTemplate = `{
}, },
"api.CreateGroupResponse": { "api.CreateGroupResponse": {
"type": "object", "type": "object",
"required": [
"id"
],
"properties": { "properties": {
"id": { "id": {
"type": "string" "type": "string"
@ -2703,6 +2836,11 @@ const docTemplate = `{
}, },
"api.CreatePollRequest": { "api.CreatePollRequest": {
"type": "object", "type": "object",
"required": [
"answers",
"question",
"recipient"
],
"properties": { "properties": {
"allow_multiple_selections": { "allow_multiple_selections": {
"type": "boolean", "type": "boolean",
@ -2731,6 +2869,9 @@ const docTemplate = `{
}, },
"api.CreatePollResponse": { "api.CreatePollResponse": {
"type": "object", "type": "object",
"required": [
"timestamp"
],
"properties": { "properties": {
"timestamp": { "timestamp": {
"type": "string", "type": "string",
@ -2749,6 +2890,9 @@ const docTemplate = `{
}, },
"api.DeviceLinkUriResponse": { "api.DeviceLinkUriResponse": {
"type": "object", "type": "object",
"required": [
"device_link_uri"
],
"properties": { "properties": {
"device_link_uri": { "device_link_uri": {
"type": "string" "type": "string"
@ -2757,6 +2901,9 @@ const docTemplate = `{
}, },
"api.Error": { "api.Error": {
"type": "object", "type": "object",
"required": [
"error"
],
"properties": { "properties": {
"error": { "error": {
"type": "string" "type": "string"
@ -2765,14 +2912,39 @@ const docTemplate = `{
}, },
"api.LoggingConfiguration": { "api.LoggingConfiguration": {
"type": "object", "type": "object",
"required": [
"Level"
],
"properties": { "properties": {
"Level": { "Level": {
"type": "string" "type": "string"
} }
} }
}, },
"api.PinMessageInGroupRequest": {
"type": "object",
"required": [
"target_author",
"timestamp"
],
"properties": {
"duration": {
"type": "integer"
},
"target_author": {
"type": "string"
},
"timestamp": {
"type": "integer"
}
}
},
"api.RateLimitChallengeRequest": { "api.RateLimitChallengeRequest": {
"type": "object", "type": "object",
"required": [
"captcha",
"challenge_token"
],
"properties": { "properties": {
"captcha": { "captcha": {
"type": "string", "type": "string",
@ -2786,6 +2958,12 @@ const docTemplate = `{
}, },
"api.Reaction": { "api.Reaction": {
"type": "object", "type": "object",
"required": [
"reaction",
"recipient",
"target_author",
"timestamp"
],
"properties": { "properties": {
"reaction": { "reaction": {
"type": "string" "type": "string"
@ -2803,6 +2981,11 @@ const docTemplate = `{
}, },
"api.Receipt": { "api.Receipt": {
"type": "object", "type": "object",
"required": [
"receipt_type",
"recipient",
"timestamp"
],
"properties": { "properties": {
"receipt_type": { "receipt_type": {
"type": "string", "type": "string",
@ -2832,6 +3015,10 @@ const docTemplate = `{
}, },
"api.RemoteDeleteRequest": { "api.RemoteDeleteRequest": {
"type": "object", "type": "object",
"required": [
"recipient",
"timestamp"
],
"properties": { "properties": {
"recipient": { "recipient": {
"type": "string" "type": "string"
@ -2843,6 +3030,9 @@ const docTemplate = `{
}, },
"api.RemoteDeleteResponse": { "api.RemoteDeleteResponse": {
"type": "object", "type": "object",
"required": [
"timestamp"
],
"properties": { "properties": {
"timestamp": { "timestamp": {
"type": "string" "type": "string"
@ -2851,6 +3041,10 @@ const docTemplate = `{
}, },
"api.SearchResponse": { "api.SearchResponse": {
"type": "object", "type": "object",
"required": [
"number",
"registered"
],
"properties": { "properties": {
"number": { "number": {
"type": "string" "type": "string"
@ -2862,6 +3056,10 @@ const docTemplate = `{
}, },
"api.SendMessageError": { "api.SendMessageError": {
"type": "object", "type": "object",
"required": [
"account",
"error"
],
"properties": { "properties": {
"account": { "account": {
"type": "string" "type": "string"
@ -2879,6 +3077,9 @@ const docTemplate = `{
}, },
"api.SendMessageResponse": { "api.SendMessageResponse": {
"type": "object", "type": "object",
"required": [
"timestamp"
],
"properties": { "properties": {
"timestamp": { "timestamp": {
"type": "string" "type": "string"
@ -2887,6 +3088,11 @@ const docTemplate = `{
}, },
"api.SendMessageV1": { "api.SendMessageV1": {
"type": "object", "type": "object",
"required": [
"message",
"number",
"recipients"
],
"properties": { "properties": {
"base64_attachment": { "base64_attachment": {
"type": "string", "type": "string",
@ -2911,6 +3117,11 @@ const docTemplate = `{
}, },
"api.SendMessageV2": { "api.SendMessageV2": {
"type": "object", "type": "object",
"required": [
"message",
"number",
"recipients"
],
"properties": { "properties": {
"base64_attachments": { "base64_attachments": {
"type": "array", "type": "array",
@ -2982,6 +3193,9 @@ const docTemplate = `{
}, },
"api.SetPinRequest": { "api.SetPinRequest": {
"type": "object", "type": "object",
"required": [
"pin"
],
"properties": { "properties": {
"pin": { "pin": {
"type": "string" "type": "string"
@ -2990,6 +3204,9 @@ const docTemplate = `{
}, },
"api.SetUsernameRequest": { "api.SetUsernameRequest": {
"type": "object", "type": "object",
"required": [
"username"
],
"properties": { "properties": {
"username": { "username": {
"type": "string", "type": "string",
@ -3011,6 +3228,9 @@ const docTemplate = `{
}, },
"api.TrustModeRequest": { "api.TrustModeRequest": {
"type": "object", "type": "object",
"required": [
"trust_mode"
],
"properties": { "properties": {
"trust_mode": { "trust_mode": {
"type": "string" "type": "string"
@ -3019,6 +3239,9 @@ const docTemplate = `{
}, },
"api.TrustModeResponse": { "api.TrustModeResponse": {
"type": "object", "type": "object",
"required": [
"trust_mode"
],
"properties": { "properties": {
"trust_mode": { "trust_mode": {
"type": "string" "type": "string"
@ -3027,12 +3250,30 @@ const docTemplate = `{
}, },
"api.TypingIndicatorRequest": { "api.TypingIndicatorRequest": {
"type": "object", "type": "object",
"required": [
"recipient"
],
"properties": { "properties": {
"recipient": { "recipient": {
"type": "string" "type": "string"
} }
} }
}, },
"api.UnpinMessageInGroupRequest": {
"type": "object",
"required": [
"target_author",
"timestamp"
],
"properties": {
"target_author": {
"type": "string"
},
"timestamp": {
"type": "integer"
}
}
},
"api.UnregisterNumberRequest": { "api.UnregisterNumberRequest": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -3059,6 +3300,9 @@ const docTemplate = `{
}, },
"api.UpdateContactRequest": { "api.UpdateContactRequest": {
"type": "object", "type": "object",
"required": [
"recipient"
],
"properties": { "properties": {
"expiration_in_seconds": { "expiration_in_seconds": {
"type": "integer" "type": "integer"
@ -3101,6 +3345,9 @@ const docTemplate = `{
}, },
"api.UpdateProfileRequest": { "api.UpdateProfileRequest": {
"type": "object", "type": "object",
"required": [
"name"
],
"properties": { "properties": {
"about": { "about": {
"type": "string" "type": "string"
@ -3123,6 +3370,12 @@ const docTemplate = `{
}, },
"api.VoteRequest": { "api.VoteRequest": {
"type": "object", "type": "object",
"required": [
"poll_author",
"poll_timestamp",
"recipient",
"selected_answers"
],
"properties": { "properties": {
"poll_author": { "poll_author": {
"type": "string", "type": "string",
@ -3149,6 +3402,13 @@ const docTemplate = `{
}, },
"client.About": { "client.About": {
"type": "object", "type": "object",
"required": [
"build",
"capabilities",
"mode",
"version",
"versions"
],
"properties": { "properties": {
"build": { "build": {
"type": "integer" "type": "integer"
@ -3178,6 +3438,13 @@ const docTemplate = `{
}, },
"client.ContactProfile": { "client.ContactProfile": {
"type": "object", "type": "object",
"required": [
"about",
"given_name",
"has_avatar",
"last_updated_timestamp",
"lastname"
],
"properties": { "properties": {
"about": { "about": {
"type": "string" "type": "string"
@ -3198,6 +3465,19 @@ const docTemplate = `{
}, },
"client.GroupEntry": { "client.GroupEntry": {
"type": "object", "type": "object",
"required": [
"admins",
"blocked",
"description",
"id",
"internal_id",
"invite_link",
"members",
"name",
"pending_invites",
"pending_requests",
"permissions"
],
"properties": { "properties": {
"admins": { "admins": {
"type": "array", "type": "array",
@ -3248,6 +3528,14 @@ const docTemplate = `{
}, },
"client.IdentityEntry": { "client.IdentityEntry": {
"type": "object", "type": "object",
"required": [
"added",
"fingerprint",
"number",
"safety_number",
"status",
"uuid"
],
"properties": { "properties": {
"added": { "added": {
"type": "string" "type": "string"
@ -3271,6 +3559,20 @@ const docTemplate = `{
}, },
"client.ListContactsResponse": { "client.ListContactsResponse": {
"type": "object", "type": "object",
"required": [
"blocked",
"color",
"given_name",
"message_expiration",
"name",
"nickname",
"note",
"number",
"profile",
"profile_name",
"username",
"uuid"
],
"properties": { "properties": {
"blocked": { "blocked": {
"type": "boolean" "type": "boolean"
@ -3312,6 +3614,12 @@ const docTemplate = `{
}, },
"client.ListDevicesResponse": { "client.ListDevicesResponse": {
"type": "object", "type": "object",
"required": [
"creation_timestamp",
"id",
"last_seen_timestamp",
"name"
],
"properties": { "properties": {
"creation_timestamp": { "creation_timestamp": {
"type": "integer" "type": "integer"
@ -3329,6 +3637,13 @@ const docTemplate = `{
}, },
"client.ListInstalledStickerPacksResponse": { "client.ListInstalledStickerPacksResponse": {
"type": "object", "type": "object",
"required": [
"author",
"installed",
"pack_id",
"title",
"url"
],
"properties": { "properties": {
"author": { "author": {
"type": "string" "type": "string"
@ -3349,6 +3664,11 @@ const docTemplate = `{
}, },
"client.Nickname": { "client.Nickname": {
"type": "object", "type": "object",
"required": [
"family_name",
"given_name",
"name"
],
"properties": { "properties": {
"family_name": { "family_name": {
"type": "string" "type": "string"
@ -3363,6 +3683,10 @@ const docTemplate = `{
}, },
"client.SetUsernameResponse": { "client.SetUsernameResponse": {
"type": "object", "type": "object",
"required": [
"username",
"username_link"
],
"properties": { "properties": {
"username": { "username": {
"type": "string" "type": "string"
@ -3374,6 +3698,11 @@ const docTemplate = `{
}, },
"data.GroupPermissions": { "data.GroupPermissions": {
"type": "object", "type": "object",
"required": [
"add_members",
"edit_group",
"send_messages"
],
"properties": { "properties": {
"add_members": { "add_members": {
"type": "string", "type": "string",
@ -3400,6 +3729,12 @@ const docTemplate = `{
}, },
"data.LinkPreviewType": { "data.LinkPreviewType": {
"type": "object", "type": "object",
"required": [
"base64_thumbnail",
"description",
"title",
"url"
],
"properties": { "properties": {
"base64_thumbnail": { "base64_thumbnail": {
"type": "string" "type": "string"
@ -3417,6 +3752,11 @@ const docTemplate = `{
}, },
"data.MessageMention": { "data.MessageMention": {
"type": "object", "type": "object",
"required": [
"author",
"length",
"start"
],
"properties": { "properties": {
"author": { "author": {
"type": "string" "type": "string"

View File

@ -1479,6 +1479,112 @@
} }
} }
}, },
"/v1/groups/{number}/{groupid}/pin-message": {
"post": {
"description": "Pin a message in a Signal Group.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Groups"
],
"summary": "Pin a message in a Signal Group.",
"parameters": [
{
"description": "Pin",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/api.PinMessageInGroupRequest"
}
},
{
"type": "string",
"description": "Registered Phone Number",
"name": "number",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Group Id",
"name": "groupid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/api.Error"
}
}
}
},
"delete": {
"description": "Unpin a message in a Signal Group.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Groups"
],
"summary": "Unpin a message in a Signal Group.",
"parameters": [
{
"description": "Unpin",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/api.UnpinMessageInGroupRequest"
}
},
{
"type": "string",
"description": "Registered Phone Number",
"name": "number",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Group Id",
"name": "groupid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/api.Error"
}
}
}
}
},
"/v1/groups/{number}/{groupid}/quit": { "/v1/groups/{number}/{groupid}/quit": {
"post": { "post": {
"description": "Quit the specified Signal Group.", "description": "Quit the specified Signal Group.",
@ -2597,6 +2703,9 @@
"definitions": { "definitions": {
"api.AddDeviceRequest": { "api.AddDeviceRequest": {
"type": "object", "type": "object",
"required": [
"uri"
],
"properties": { "properties": {
"uri": { "uri": {
"type": "string" "type": "string"
@ -2605,6 +2714,10 @@
}, },
"api.AddStickerPackRequest": { "api.AddStickerPackRequest": {
"type": "object", "type": "object",
"required": [
"pack_id",
"pack_key"
],
"properties": { "properties": {
"pack_id": { "pack_id": {
"type": "string", "type": "string",
@ -2618,6 +2731,9 @@
}, },
"api.ChangeGroupAdminsRequest": { "api.ChangeGroupAdminsRequest": {
"type": "object", "type": "object",
"required": [
"admins"
],
"properties": { "properties": {
"admins": { "admins": {
"type": "array", "type": "array",
@ -2629,6 +2745,9 @@
}, },
"api.ChangeGroupMembersRequest": { "api.ChangeGroupMembersRequest": {
"type": "object", "type": "object",
"required": [
"members"
],
"properties": { "properties": {
"members": { "members": {
"type": "array", "type": "array",
@ -2640,6 +2759,10 @@
}, },
"api.ClosePollRequest": { "api.ClosePollRequest": {
"type": "object", "type": "object",
"required": [
"poll_timestamp",
"recipient"
],
"properties": { "properties": {
"poll_timestamp": { "poll_timestamp": {
"type": "string", "type": "string",
@ -2653,6 +2776,9 @@
}, },
"api.Configuration": { "api.Configuration": {
"type": "object", "type": "object",
"required": [
"logging"
],
"properties": { "properties": {
"logging": { "logging": {
"$ref": "#/definitions/api.LoggingConfiguration" "$ref": "#/definitions/api.LoggingConfiguration"
@ -2661,6 +2787,10 @@
}, },
"api.CreateGroupRequest": { "api.CreateGroupRequest": {
"type": "object", "type": "object",
"required": [
"members",
"name"
],
"properties": { "properties": {
"description": { "description": {
"type": "string" "type": "string"
@ -2692,6 +2822,9 @@
}, },
"api.CreateGroupResponse": { "api.CreateGroupResponse": {
"type": "object", "type": "object",
"required": [
"id"
],
"properties": { "properties": {
"id": { "id": {
"type": "string" "type": "string"
@ -2700,6 +2833,11 @@
}, },
"api.CreatePollRequest": { "api.CreatePollRequest": {
"type": "object", "type": "object",
"required": [
"answers",
"question",
"recipient"
],
"properties": { "properties": {
"allow_multiple_selections": { "allow_multiple_selections": {
"type": "boolean", "type": "boolean",
@ -2728,6 +2866,9 @@
}, },
"api.CreatePollResponse": { "api.CreatePollResponse": {
"type": "object", "type": "object",
"required": [
"timestamp"
],
"properties": { "properties": {
"timestamp": { "timestamp": {
"type": "string", "type": "string",
@ -2746,6 +2887,9 @@
}, },
"api.DeviceLinkUriResponse": { "api.DeviceLinkUriResponse": {
"type": "object", "type": "object",
"required": [
"device_link_uri"
],
"properties": { "properties": {
"device_link_uri": { "device_link_uri": {
"type": "string" "type": "string"
@ -2754,6 +2898,9 @@
}, },
"api.Error": { "api.Error": {
"type": "object", "type": "object",
"required": [
"error"
],
"properties": { "properties": {
"error": { "error": {
"type": "string" "type": "string"
@ -2762,14 +2909,39 @@
}, },
"api.LoggingConfiguration": { "api.LoggingConfiguration": {
"type": "object", "type": "object",
"required": [
"Level"
],
"properties": { "properties": {
"Level": { "Level": {
"type": "string" "type": "string"
} }
} }
}, },
"api.PinMessageInGroupRequest": {
"type": "object",
"required": [
"target_author",
"timestamp"
],
"properties": {
"duration": {
"type": "integer"
},
"target_author": {
"type": "string"
},
"timestamp": {
"type": "integer"
}
}
},
"api.RateLimitChallengeRequest": { "api.RateLimitChallengeRequest": {
"type": "object", "type": "object",
"required": [
"captcha",
"challenge_token"
],
"properties": { "properties": {
"captcha": { "captcha": {
"type": "string", "type": "string",
@ -2783,6 +2955,12 @@
}, },
"api.Reaction": { "api.Reaction": {
"type": "object", "type": "object",
"required": [
"reaction",
"recipient",
"target_author",
"timestamp"
],
"properties": { "properties": {
"reaction": { "reaction": {
"type": "string" "type": "string"
@ -2800,6 +2978,11 @@
}, },
"api.Receipt": { "api.Receipt": {
"type": "object", "type": "object",
"required": [
"receipt_type",
"recipient",
"timestamp"
],
"properties": { "properties": {
"receipt_type": { "receipt_type": {
"type": "string", "type": "string",
@ -2829,6 +3012,10 @@
}, },
"api.RemoteDeleteRequest": { "api.RemoteDeleteRequest": {
"type": "object", "type": "object",
"required": [
"recipient",
"timestamp"
],
"properties": { "properties": {
"recipient": { "recipient": {
"type": "string" "type": "string"
@ -2840,6 +3027,9 @@
}, },
"api.RemoteDeleteResponse": { "api.RemoteDeleteResponse": {
"type": "object", "type": "object",
"required": [
"timestamp"
],
"properties": { "properties": {
"timestamp": { "timestamp": {
"type": "string" "type": "string"
@ -2848,6 +3038,10 @@
}, },
"api.SearchResponse": { "api.SearchResponse": {
"type": "object", "type": "object",
"required": [
"number",
"registered"
],
"properties": { "properties": {
"number": { "number": {
"type": "string" "type": "string"
@ -2859,6 +3053,10 @@
}, },
"api.SendMessageError": { "api.SendMessageError": {
"type": "object", "type": "object",
"required": [
"account",
"error"
],
"properties": { "properties": {
"account": { "account": {
"type": "string" "type": "string"
@ -2876,6 +3074,9 @@
}, },
"api.SendMessageResponse": { "api.SendMessageResponse": {
"type": "object", "type": "object",
"required": [
"timestamp"
],
"properties": { "properties": {
"timestamp": { "timestamp": {
"type": "string" "type": "string"
@ -2884,6 +3085,11 @@
}, },
"api.SendMessageV1": { "api.SendMessageV1": {
"type": "object", "type": "object",
"required": [
"message",
"number",
"recipients"
],
"properties": { "properties": {
"base64_attachment": { "base64_attachment": {
"type": "string", "type": "string",
@ -2908,6 +3114,11 @@
}, },
"api.SendMessageV2": { "api.SendMessageV2": {
"type": "object", "type": "object",
"required": [
"message",
"number",
"recipients"
],
"properties": { "properties": {
"base64_attachments": { "base64_attachments": {
"type": "array", "type": "array",
@ -2979,6 +3190,9 @@
}, },
"api.SetPinRequest": { "api.SetPinRequest": {
"type": "object", "type": "object",
"required": [
"pin"
],
"properties": { "properties": {
"pin": { "pin": {
"type": "string" "type": "string"
@ -2987,6 +3201,9 @@
}, },
"api.SetUsernameRequest": { "api.SetUsernameRequest": {
"type": "object", "type": "object",
"required": [
"username"
],
"properties": { "properties": {
"username": { "username": {
"type": "string", "type": "string",
@ -3008,6 +3225,9 @@
}, },
"api.TrustModeRequest": { "api.TrustModeRequest": {
"type": "object", "type": "object",
"required": [
"trust_mode"
],
"properties": { "properties": {
"trust_mode": { "trust_mode": {
"type": "string" "type": "string"
@ -3016,6 +3236,9 @@
}, },
"api.TrustModeResponse": { "api.TrustModeResponse": {
"type": "object", "type": "object",
"required": [
"trust_mode"
],
"properties": { "properties": {
"trust_mode": { "trust_mode": {
"type": "string" "type": "string"
@ -3024,12 +3247,30 @@
}, },
"api.TypingIndicatorRequest": { "api.TypingIndicatorRequest": {
"type": "object", "type": "object",
"required": [
"recipient"
],
"properties": { "properties": {
"recipient": { "recipient": {
"type": "string" "type": "string"
} }
} }
}, },
"api.UnpinMessageInGroupRequest": {
"type": "object",
"required": [
"target_author",
"timestamp"
],
"properties": {
"target_author": {
"type": "string"
},
"timestamp": {
"type": "integer"
}
}
},
"api.UnregisterNumberRequest": { "api.UnregisterNumberRequest": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -3056,6 +3297,9 @@
}, },
"api.UpdateContactRequest": { "api.UpdateContactRequest": {
"type": "object", "type": "object",
"required": [
"recipient"
],
"properties": { "properties": {
"expiration_in_seconds": { "expiration_in_seconds": {
"type": "integer" "type": "integer"
@ -3098,6 +3342,9 @@
}, },
"api.UpdateProfileRequest": { "api.UpdateProfileRequest": {
"type": "object", "type": "object",
"required": [
"name"
],
"properties": { "properties": {
"about": { "about": {
"type": "string" "type": "string"
@ -3120,6 +3367,12 @@
}, },
"api.VoteRequest": { "api.VoteRequest": {
"type": "object", "type": "object",
"required": [
"poll_author",
"poll_timestamp",
"recipient",
"selected_answers"
],
"properties": { "properties": {
"poll_author": { "poll_author": {
"type": "string", "type": "string",
@ -3146,6 +3399,13 @@
}, },
"client.About": { "client.About": {
"type": "object", "type": "object",
"required": [
"build",
"capabilities",
"mode",
"version",
"versions"
],
"properties": { "properties": {
"build": { "build": {
"type": "integer" "type": "integer"
@ -3175,6 +3435,13 @@
}, },
"client.ContactProfile": { "client.ContactProfile": {
"type": "object", "type": "object",
"required": [
"about",
"given_name",
"has_avatar",
"last_updated_timestamp",
"lastname"
],
"properties": { "properties": {
"about": { "about": {
"type": "string" "type": "string"
@ -3195,6 +3462,19 @@
}, },
"client.GroupEntry": { "client.GroupEntry": {
"type": "object", "type": "object",
"required": [
"admins",
"blocked",
"description",
"id",
"internal_id",
"invite_link",
"members",
"name",
"pending_invites",
"pending_requests",
"permissions"
],
"properties": { "properties": {
"admins": { "admins": {
"type": "array", "type": "array",
@ -3245,6 +3525,14 @@
}, },
"client.IdentityEntry": { "client.IdentityEntry": {
"type": "object", "type": "object",
"required": [
"added",
"fingerprint",
"number",
"safety_number",
"status",
"uuid"
],
"properties": { "properties": {
"added": { "added": {
"type": "string" "type": "string"
@ -3268,6 +3556,20 @@
}, },
"client.ListContactsResponse": { "client.ListContactsResponse": {
"type": "object", "type": "object",
"required": [
"blocked",
"color",
"given_name",
"message_expiration",
"name",
"nickname",
"note",
"number",
"profile",
"profile_name",
"username",
"uuid"
],
"properties": { "properties": {
"blocked": { "blocked": {
"type": "boolean" "type": "boolean"
@ -3309,6 +3611,12 @@
}, },
"client.ListDevicesResponse": { "client.ListDevicesResponse": {
"type": "object", "type": "object",
"required": [
"creation_timestamp",
"id",
"last_seen_timestamp",
"name"
],
"properties": { "properties": {
"creation_timestamp": { "creation_timestamp": {
"type": "integer" "type": "integer"
@ -3326,6 +3634,13 @@
}, },
"client.ListInstalledStickerPacksResponse": { "client.ListInstalledStickerPacksResponse": {
"type": "object", "type": "object",
"required": [
"author",
"installed",
"pack_id",
"title",
"url"
],
"properties": { "properties": {
"author": { "author": {
"type": "string" "type": "string"
@ -3346,6 +3661,11 @@
}, },
"client.Nickname": { "client.Nickname": {
"type": "object", "type": "object",
"required": [
"family_name",
"given_name",
"name"
],
"properties": { "properties": {
"family_name": { "family_name": {
"type": "string" "type": "string"
@ -3360,6 +3680,10 @@
}, },
"client.SetUsernameResponse": { "client.SetUsernameResponse": {
"type": "object", "type": "object",
"required": [
"username",
"username_link"
],
"properties": { "properties": {
"username": { "username": {
"type": "string" "type": "string"
@ -3371,6 +3695,11 @@
}, },
"data.GroupPermissions": { "data.GroupPermissions": {
"type": "object", "type": "object",
"required": [
"add_members",
"edit_group",
"send_messages"
],
"properties": { "properties": {
"add_members": { "add_members": {
"type": "string", "type": "string",
@ -3397,6 +3726,12 @@
}, },
"data.LinkPreviewType": { "data.LinkPreviewType": {
"type": "object", "type": "object",
"required": [
"base64_thumbnail",
"description",
"title",
"url"
],
"properties": { "properties": {
"base64_thumbnail": { "base64_thumbnail": {
"type": "string" "type": "string"
@ -3414,6 +3749,11 @@
}, },
"data.MessageMention": { "data.MessageMention": {
"type": "object", "type": "object",
"required": [
"author",
"length",
"start"
],
"properties": { "properties": {
"author": { "author": {
"type": "string" "type": "string"

View File

@ -4,6 +4,8 @@ definitions:
properties: properties:
uri: uri:
type: string type: string
required:
- uri
type: object type: object
api.AddStickerPackRequest: api.AddStickerPackRequest:
properties: properties:
@ -13,6 +15,9 @@ definitions:
pack_key: pack_key:
example: 19546e18eba0ff69dea78eb591465289d39e16f35e58389ae779d4f9455aff3a example: 19546e18eba0ff69dea78eb591465289d39e16f35e58389ae779d4f9455aff3a
type: string type: string
required:
- pack_id
- pack_key
type: object type: object
api.ChangeGroupAdminsRequest: api.ChangeGroupAdminsRequest:
properties: properties:
@ -20,6 +25,8 @@ definitions:
items: items:
type: string type: string
type: array type: array
required:
- admins
type: object type: object
api.ChangeGroupMembersRequest: api.ChangeGroupMembersRequest:
properties: properties:
@ -27,6 +34,8 @@ definitions:
items: items:
type: string type: string
type: array type: array
required:
- members
type: object type: object
api.ClosePollRequest: api.ClosePollRequest:
properties: properties:
@ -36,11 +45,16 @@ definitions:
recipient: recipient:
example: <phone number> OR <username> OR <group id> example: <phone number> OR <username> OR <group id>
type: string type: string
required:
- poll_timestamp
- recipient
type: object type: object
api.Configuration: api.Configuration:
properties: properties:
logging: logging:
$ref: '#/definitions/api.LoggingConfiguration' $ref: '#/definitions/api.LoggingConfiguration'
required:
- logging
type: object type: object
api.CreateGroupRequest: api.CreateGroupRequest:
properties: properties:
@ -62,11 +76,16 @@ definitions:
type: string type: string
permissions: permissions:
$ref: '#/definitions/data.GroupPermissions' $ref: '#/definitions/data.GroupPermissions'
required:
- members
- name
type: object type: object
api.CreateGroupResponse: api.CreateGroupResponse:
properties: properties:
id: id:
type: string type: string
required:
- id
type: object type: object
api.CreatePollRequest: api.CreatePollRequest:
properties: properties:
@ -87,12 +106,18 @@ definitions:
recipient: recipient:
example: <phone number> OR <username> OR <group id> example: <phone number> OR <username> OR <group id>
type: string type: string
required:
- answers
- question
- recipient
type: object type: object
api.CreatePollResponse: api.CreatePollResponse:
properties: properties:
timestamp: timestamp:
example: "1769271479" example: "1769271479"
type: string type: string
required:
- timestamp
type: object type: object
api.DeleteLocalAccountDataRequest: api.DeleteLocalAccountDataRequest:
properties: properties:
@ -104,16 +129,34 @@ definitions:
properties: properties:
device_link_uri: device_link_uri:
type: string type: string
required:
- device_link_uri
type: object type: object
api.Error: api.Error:
properties: properties:
error: error:
type: string type: string
required:
- error
type: object type: object
api.LoggingConfiguration: api.LoggingConfiguration:
properties: properties:
Level: Level:
type: string type: string
required:
- Level
type: object
api.PinMessageInGroupRequest:
properties:
duration:
type: integer
target_author:
type: string
timestamp:
type: integer
required:
- target_author
- timestamp
type: object type: object
api.RateLimitChallengeRequest: api.RateLimitChallengeRequest:
properties: properties:
@ -123,6 +166,9 @@ definitions:
challenge_token: challenge_token:
example: <challenge token> example: <challenge token>
type: string type: string
required:
- captcha
- challenge_token
type: object type: object
api.Reaction: api.Reaction:
properties: properties:
@ -134,6 +180,11 @@ definitions:
type: string type: string
timestamp: timestamp:
type: integer type: integer
required:
- reaction
- recipient
- target_author
- timestamp
type: object type: object
api.Receipt: api.Receipt:
properties: properties:
@ -146,6 +197,10 @@ definitions:
type: string type: string
timestamp: timestamp:
type: integer type: integer
required:
- receipt_type
- recipient
- timestamp
type: object type: object
api.RegisterNumberRequest: api.RegisterNumberRequest:
properties: properties:
@ -160,11 +215,16 @@ definitions:
type: string type: string
timestamp: timestamp:
type: integer type: integer
required:
- recipient
- timestamp
type: object type: object
api.RemoteDeleteResponse: api.RemoteDeleteResponse:
properties: properties:
timestamp: timestamp:
type: string type: string
required:
- timestamp
type: object type: object
api.SearchResponse: api.SearchResponse:
properties: properties:
@ -172,6 +232,9 @@ definitions:
type: string type: string
registered: registered:
type: boolean type: boolean
required:
- number
- registered
type: object type: object
api.SendMessageError: api.SendMessageError:
properties: properties:
@ -183,11 +246,16 @@ definitions:
type: array type: array
error: error:
type: string type: string
required:
- account
- error
type: object type: object
api.SendMessageResponse: api.SendMessageResponse:
properties: properties:
timestamp: timestamp:
type: string type: string
required:
- timestamp
type: object type: object
api.SendMessageV1: api.SendMessageV1:
properties: properties:
@ -206,6 +274,10 @@ definitions:
items: items:
type: string type: string
type: array type: array
required:
- message
- number
- recipients
type: object type: object
api.SendMessageV2: api.SendMessageV2:
properties: properties:
@ -254,17 +326,25 @@ definitions:
type: string type: string
view_once: view_once:
type: boolean type: boolean
required:
- message
- number
- recipients
type: object type: object
api.SetPinRequest: api.SetPinRequest:
properties: properties:
pin: pin:
type: string type: string
required:
- pin
type: object type: object
api.SetUsernameRequest: api.SetUsernameRequest:
properties: properties:
username: username:
example: test example: test
type: string type: string
required:
- username
type: object type: object
api.TrustIdentityRequest: api.TrustIdentityRequest:
properties: properties:
@ -278,16 +358,32 @@ definitions:
properties: properties:
trust_mode: trust_mode:
type: string type: string
required:
- trust_mode
type: object type: object
api.TrustModeResponse: api.TrustModeResponse:
properties: properties:
trust_mode: trust_mode:
type: string type: string
required:
- trust_mode
type: object type: object
api.TypingIndicatorRequest: api.TypingIndicatorRequest:
properties: properties:
recipient: recipient:
type: string type: string
required:
- recipient
type: object
api.UnpinMessageInGroupRequest:
properties:
target_author:
type: string
timestamp:
type: integer
required:
- target_author
- timestamp
type: object type: object
api.UnregisterNumberRequest: api.UnregisterNumberRequest:
properties: properties:
@ -313,6 +409,8 @@ definitions:
type: string type: string
recipient: recipient:
type: string type: string
required:
- recipient
type: object type: object
api.UpdateGroupRequest: api.UpdateGroupRequest:
properties: properties:
@ -341,6 +439,8 @@ definitions:
type: string type: string
name: name:
type: string type: string
required:
- name
type: object type: object
api.VerifyNumberSettings: api.VerifyNumberSettings:
properties: properties:
@ -364,6 +464,11 @@ definitions:
items: items:
type: integer type: integer
type: array type: array
required:
- poll_author
- poll_timestamp
- recipient
- selected_answers
type: object type: object
client.About: client.About:
properties: properties:
@ -383,6 +488,12 @@ definitions:
items: items:
type: string type: string
type: array type: array
required:
- build
- capabilities
- mode
- version
- versions
type: object type: object
client.ContactProfile: client.ContactProfile:
properties: properties:
@ -396,6 +507,12 @@ definitions:
type: integer type: integer
lastname: lastname:
type: string type: string
required:
- about
- given_name
- has_avatar
- last_updated_timestamp
- lastname
type: object type: object
client.GroupEntry: client.GroupEntry:
properties: properties:
@ -429,6 +546,18 @@ definitions:
type: array type: array
permissions: permissions:
$ref: '#/definitions/data.GroupPermissions' $ref: '#/definitions/data.GroupPermissions'
required:
- admins
- blocked
- description
- id
- internal_id
- invite_link
- members
- name
- pending_invites
- pending_requests
- permissions
type: object type: object
client.IdentityEntry: client.IdentityEntry:
properties: properties:
@ -444,6 +573,13 @@ definitions:
type: string type: string
uuid: uuid:
type: string type: string
required:
- added
- fingerprint
- number
- safety_number
- status
- uuid
type: object type: object
client.ListContactsResponse: client.ListContactsResponse:
properties: properties:
@ -471,6 +607,19 @@ definitions:
type: string type: string
uuid: uuid:
type: string type: string
required:
- blocked
- color
- given_name
- message_expiration
- name
- nickname
- note
- number
- profile
- profile_name
- username
- uuid
type: object type: object
client.ListDevicesResponse: client.ListDevicesResponse:
properties: properties:
@ -482,6 +631,11 @@ definitions:
type: integer type: integer
name: name:
type: string type: string
required:
- creation_timestamp
- id
- last_seen_timestamp
- name
type: object type: object
client.ListInstalledStickerPacksResponse: client.ListInstalledStickerPacksResponse:
properties: properties:
@ -495,6 +649,12 @@ definitions:
type: string type: string
url: url:
type: string type: string
required:
- author
- installed
- pack_id
- title
- url
type: object type: object
client.Nickname: client.Nickname:
properties: properties:
@ -504,6 +664,10 @@ definitions:
type: string type: string
name: name:
type: string type: string
required:
- family_name
- given_name
- name
type: object type: object
client.SetUsernameResponse: client.SetUsernameResponse:
properties: properties:
@ -511,6 +675,9 @@ definitions:
type: string type: string
username_link: username_link:
type: string type: string
required:
- username
- username_link
type: object type: object
data.GroupPermissions: data.GroupPermissions:
properties: properties:
@ -529,6 +696,10 @@ definitions:
- only-admins - only-admins
- every-member - every-member
type: string type: string
required:
- add_members
- edit_group
- send_messages
type: object type: object
data.LinkPreviewType: data.LinkPreviewType:
properties: properties:
@ -540,6 +711,11 @@ definitions:
type: string type: string
url: url:
type: string type: string
required:
- base64_thumbnail
- description
- title
- url
type: object type: object
data.MessageMention: data.MessageMention:
properties: properties:
@ -549,6 +725,10 @@ definitions:
type: integer type: integer
start: start:
type: integer type: integer
required:
- author
- length
- start
type: object type: object
host: localhost:8080 host: localhost:8080
info: info:
@ -1543,6 +1723,77 @@ paths:
summary: Add one or more members to an existing Signal Group. summary: Add one or more members to an existing Signal Group.
tags: tags:
- Groups - Groups
/v1/groups/{number}/{groupid}/pin-message:
delete:
consumes:
- application/json
description: Unpin a message in a Signal Group.
parameters:
- description: Unpin
in: body
name: data
required: true
schema:
$ref: '#/definitions/api.UnpinMessageInGroupRequest'
- description: Registered Phone Number
in: path
name: number
required: true
type: string
- description: Group Id
in: path
name: groupid
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"400":
description: Bad Request
schema:
$ref: '#/definitions/api.Error'
summary: Unpin a message in a Signal Group.
tags:
- Groups
post:
consumes:
- application/json
description: Pin a message in a Signal Group.
parameters:
- description: Pin
in: body
name: data
required: true
schema:
$ref: '#/definitions/api.PinMessageInGroupRequest'
- description: Registered Phone Number
in: path
name: number
required: true
type: string
- description: Group Id
in: path
name: groupid
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"400":
description: Bad Request
schema:
$ref: '#/definitions/api.Error'
summary: Pin a message in a Signal Group.
tags:
- Groups
/v1/groups/{number}/{groupid}/quit: /v1/groups/{number}/{groupid}/quit:
post: post:
consumes: consumes: