Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 4.4.0 #21

Merged
merged 11 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .github/workflows/maven.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish package to the Maven Central Repository
on:
push:
tags:
- *
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'

- name: Publish Artifacts
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.PGP_SECRET }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.PGP_PASSPHRASE }}
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-configuration-cache --no-daemon
2 changes: 2 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ docs/WhatsAppLanguage.md
docs/WhatsAppMedia.md
docs/WhatsAppParameter.md
docs/WhatsAppTemplate.md
docs/WhatsAppText.md
git_push.sh
gradle.properties
gradle/wrapper/gradle-wrapper.jar
Expand Down Expand Up @@ -163,6 +164,7 @@ src/main/java/com/messente/api/WhatsAppLanguage.java
src/main/java/com/messente/api/WhatsAppMedia.java
src/main/java/com/messente/api/WhatsAppParameter.java
src/main/java/com/messente/api/WhatsAppTemplate.java
src/main/java/com/messente/api/WhatsAppText.java
src/main/java/com/messente/auth/ApiKeyAuth.java
src/main/java/com/messente/auth/Authentication.java
src/main/java/com/messente/auth/HttpBasicAuth.java
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Messente API Library

- Messente API version: 2.0.0
- Java artifact version: 4.3.0
- Java artifact version: 4.4.0

[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.

Expand All @@ -13,7 +13,7 @@ Install Messente API library via Maven, Gradle, Ivy or manual build.

```groovy
dependencies {
implementation 'com.messente.api:messente-api:4.3.0'
implementation 'com.messente.api:messente-api:4.4.0'
}
```

Expand All @@ -23,14 +23,14 @@ dependencies {
<dependency>
<groupId>com.messente.api</groupId>
<artifactId>messente-api</artifactId>
<version>4.3.0</version>
<version>4.4.0</version>
</dependency>
```

### Ivy

```xml
<dependency org='com.messente.api' name='messente-api' rev='4.3.0'/>
<dependency org='com.messente.api' name='messente-api' rev='4.4.0'/>
```

### Manual Build
Expand All @@ -43,7 +43,7 @@ mvn clean package

Install

- `target/messente-api-4.3.0.jar`
- `target/messente-api-4.4.0.jar`
- `target/lib/*.jar`

## Features
Expand Down
22 changes: 22 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2218,6 +2218,8 @@ components:
type: integer
template:
$ref: '#/components/schemas/WhatsAppTemplate'
text:
$ref: '#/components/schemas/WhatsAppText'
channel:
default: whatsapp
description: The channel used to deliver the message
Expand Down Expand Up @@ -2418,9 +2420,29 @@ components:
$ref: '#/components/schemas/WhatsAppMedia'
video:
$ref: '#/components/schemas/WhatsAppMedia'
coupon_code:
description: A coupon code.
type: string
payload:
description: A payload.
type: string
required:
- type
type: object
WhatsAppText:
description: A text
properties:
preview_url:
default: true
description: Whether to display link preview if the message contains a hyperlink
type: boolean
body:
description: "Plaintext content for WhatsApp, can contain URLs, emojis and\
\ formatting"
type: string
required:
- body
type: object
ErrorCodeOmnichannel:
description: |-
Matches the following error title.
Expand Down
82 changes: 30 additions & 52 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ buildscript {

plugins {
id "java-library"
id "maven-publish"
id "signing"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
id "com.vanniktech.maven.publish" version "0.30.0"

}

apply plugin: 'idea'
Expand All @@ -22,7 +21,7 @@ apply plugin: 'java'
apply plugin: 'com.diffplug.spotless'

group = 'com.messente.api'
version = '4.3.0'
version = '4.4.0'

ext {
jakarta_annotation_version = "1.3.5"
Expand All @@ -45,58 +44,38 @@ dependencies {
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifactId = 'messente-api'

pom {
name = "messente-api"
description = "Messente API - Connecting Services to People"
url = "https://github.com/messente/messente-api-java"
inceptionYear = "2019"
licenses {
license {
name = "The Apache Software License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution = "repo"
}
}
developers {
developer {
id = "messente"
name = "Messente Communications OU"
email = "[email protected]"
}
}
scm {
connection = "scm:https://github.com/messente/messente-api-java.git"
developerConnection = "scm:[email protected]:messente/messente-api-java.git"
url = "https://github.com/messente/messente-api-java"
}
import com.vanniktech.maven.publish.SonatypeHost
mavenPublishing {
publishToMavenCentral(SonatypeHost.DEFAULT)
signAllPublications()

pom {
name = "messente-api"
description = "Messente API - Connecting Services to People"
url = "https://github.com/messente/messente-api-java"
inceptionYear = "2019"
licenses {
license {
name = "The Apache Software License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution = "repo"
}
}
}
repositories {
mavenCentral()
}
}

nexusPublishing {
repositories {
sonatype()
developers {
developer {
id = "messente"
name = "Messente Communications OU"
email = "[email protected]"
}
}
scm {
connection = "scm:https://github.com/messente/messente-api-java.git"
developerConnection = "scm:[email protected]:messente/messente-api-java.git"
url = "https://github.com/messente/messente-api-java"
}
}
}

def skipSigning = project.hasProperty('skipSigning')

// Configure signing only if skipSigning property is not set
if (!skipSigning) {
signing {
sign publishing.publications.mavenJava
}
}

repositories {
mavenCentral()
Expand All @@ -109,7 +88,6 @@ sourceSets {
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}

Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "com.messente.api",
name := "messente-api",
version := "4.3.0",
version := "4.4.0",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
Expand Down
1 change: 1 addition & 0 deletions docs/WhatsApp.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ WhatsApp message content. Only one of \"text\", \"image\", \"document\" or \"a
|**validity** | **Integer** | After how many minutes this channel is considered as failed and the next channel is attempted | [optional] |
|**ttl** | **Integer** | After how many seconds this channel is considered as failed and the next channel is attempted. Only one of \&quot;ttl\&quot; and \&quot;validity\&quot; can be used. | [optional] |
|**template** | [**WhatsAppTemplate**](WhatsAppTemplate.md) | | [optional] |
|**text** | [**WhatsAppText**](WhatsAppText.md) | | [optional] |
|**channel** | [**ChannelEnum**](#ChannelEnum) | The channel used to deliver the message | [optional] |


Expand Down
2 changes: 2 additions & 0 deletions docs/WhatsAppParameter.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Whatsapp component parameter.
|**image** | [**WhatsAppMedia**](WhatsAppMedia.md) | | [optional] |
|**document** | [**WhatsAppMedia**](WhatsAppMedia.md) | | [optional] |
|**video** | [**WhatsAppMedia**](WhatsAppMedia.md) | | [optional] |
|**couponCode** | **String** | A coupon code. | [optional] |
|**payload** | **String** | A payload. | [optional] |



15 changes: 15 additions & 0 deletions docs/WhatsAppText.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@


# WhatsAppText

A text

## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**previewUrl** | **Boolean** | Whether to display link preview if the message contains a hyperlink | [optional] |
|**body** | **String** | Plaintext content for WhatsApp, can contain URLs, emojis and formatting | |



Empty file modified gradlew
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>messente-api</artifactId>
<packaging>jar</packaging>
<name>messente-api</name>
<version>4.3.0</version>
<version>4.4.0</version>
<url>https://github.com/messente/messente-api-java</url>
<description>Java library for Messente API</description>
<scm>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/messente/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private void init() {
json = new JSON();

// Set default User-Agent.
setUserAgent("OpenAPI-Generator/4.3.0/java");
setUserAgent("OpenAPI-Generator/4.4.0/java");

authentications = new HashMap<String, Authentication>();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/messente/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.6.0")
public class Configuration {
public static final String VERSION = "4.3.0";
public static final String VERSION = "4.4.0";

private static ApiClient defaultApiClient = new ApiClient();

Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/messente/JSON.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new com.messente.api.WhatsAppMedia.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.messente.api.WhatsAppParameter.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.messente.api.WhatsAppTemplate.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.messente.api.WhatsAppText.CustomTypeAdapterFactory());
gson = gsonBuilder.create();
}

Expand Down
Loading
Loading