-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
19 changed files
with
379 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
src/main/java/com/whatsapp/api/domain/organization/Apikeys.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.whatsapp.api.domain.organization; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@JsonInclude(value = JsonInclude.Include.NON_NULL) | ||
public class Apikeys { | ||
|
||
/** | ||
* 组织id | ||
*/ | ||
@JsonProperty("org_id") String orgId; | ||
|
||
/** | ||
* whatsapp 商业账户的编号 | ||
*/ | ||
@JsonProperty("waba_id") String wabaId; | ||
|
||
/** | ||
* API 秘钥的描述信息 | ||
*/ | ||
@JsonProperty("description") String description; | ||
|
||
/** | ||
* 设置该 API 秘钥允许使用的发送号列表,如果完全不允许使用 Message API,则不要设置该信息,或值为空 | ||
*/ | ||
@JsonProperty("message_api_phone_list") List<String> phoneList; | ||
|
||
/** | ||
* 设置该 API 秘钥是否允许使用模板 API,true:开启,false:关闭(默认) | ||
*/ | ||
@JsonProperty("template_api") boolean templateApi = true; | ||
|
||
/** | ||
* IP 白名单列表,设置后代表仅这些 IP 地址才能使用该 API 秘钥,默认不控制。 | ||
*/ | ||
@JsonProperty("ip_white_list") List<String> ipWhiteList; | ||
|
||
/** | ||
* 有效日期,时间戳,精确到秒 | ||
*/ | ||
@JsonProperty("valid_time") long validTime; | ||
|
||
|
||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/com/whatsapp/api/domain/organization/ApikeysResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.whatsapp.api.domain.organization; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Data; | ||
|
||
@Data | ||
@JsonInclude(value = JsonInclude.Include.NON_NULL) | ||
public class ApikeysResponse { | ||
|
||
/** | ||
* API 秘钥key | ||
*/ | ||
@JsonProperty("whatsapp_dev_key") String devKey; | ||
|
||
/** | ||
* API 秘钥的密码 | ||
*/ | ||
@JsonProperty("whatsapp_dev_secret") | ||
String devSecret; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/com/whatsapp/api/domain/webhook/engaglab/SelectEvents.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.whatsapp.api.domain.webhook.engaglab; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@JsonInclude(value = JsonInclude.Include.NON_NULL) | ||
public class SelectEvents { | ||
|
||
/** | ||
* 消息状态事件 | ||
*/ | ||
@JsonProperty("status") List<String> status; | ||
|
||
/** | ||
* 消息响应事件 | ||
*/ | ||
@JsonProperty("response") List<String> response; | ||
|
||
|
||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/com/whatsapp/api/domain/webhook/engaglab/SetWebhook.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.whatsapp.api.domain.webhook.engaglab; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Data; | ||
|
||
@Data | ||
@JsonInclude(value = JsonInclude.Include.NON_NULL) | ||
public class SetWebhook { | ||
|
||
/** | ||
* 描述信息 | ||
*/ | ||
@JsonProperty("description") String description; | ||
|
||
/** | ||
* 回调地址 | ||
*/ | ||
@JsonProperty("notify_url") String notifyUrl; | ||
|
||
/** | ||
* 事件 | ||
*/ | ||
@JsonProperty("select_events") SelectEvents selectEvents; | ||
|
||
|
||
|
||
|
||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/com/whatsapp/api/domain/webhook/engaglab/SetWebhookResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.whatsapp.api.domain.webhook.engaglab; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Data; | ||
|
||
@Data | ||
@JsonInclude(value = JsonInclude.Include.NON_NULL) | ||
public class SetWebhookResponse { | ||
|
||
/** | ||
* webhook id | ||
*/ | ||
@JsonProperty("webhook_id") String webhookId; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.