damsel/proto/walker.thrift

163 lines
5.6 KiB
Thrift
Raw Normal View History

HG-192: Introduce multiclaims (#131) * DC-23: changed PartyManagement interface to claims (#122) * DC-23: changed PartyManagement interface to work with claims as primary editing method DC-25: changed PartyChangeset to match with new interface (DC-23) Moved ShopLocation to Shop level * added ContractExpiered status and creation timestamp * changed contracts & shops IDs types from Int to String * extracted ShopUpdate fields to ShopModification level * added InvalidChangeset exception * Claim effects added (v0.1) * Claim effects v1.0 * Claim effects v1.1 added created_at in all party objects * Added ShopProxyChanged effect produced by ProxyModification changeset * added ClaimUpdated event and ClaimRevision property * added revision check to AcceptClaim * added revision to deny/revoke methods for uniformity * added ShopContractChanged to make one-to-one relations beetween change & effect * Category is back to ShopParams as optional field * AcceptClaim can throw InvalidChangeset exception * Added AnonymousEntity to fulfill contract creation requirements * Renamed AninymousEntity to RegisteredUser * Added PayoutToolType to distinguish test and live payout tools * Removed payout tool type due to redundancy * Added PayoutToolPrototype to incapsulate test payout tool params * Walker2 API (#125) * Walker 2 api new Methods for CRUD operations fro Claims, Comments and history(Actions) WALK-20 * rename to wc_deploy * add deploy_epic_nexus to list * fix make cmd * fixed suspension naming * elastico interface get end search party methods Ft/walk 27/elastico (#133) * Syncronize walker and payment processing thrifts * WALK-27: Bump to rbkmoney/image-build@efd28e5 (#138) * DC-27: added timestamp and revision to claim related events * DC-27: added updated timestamp to claim Added timestamp to blocking/suspension statuses (party & shop) for same reason. * DC-27: removed unnecessary timestamp from accepted status (#143) * Added missed InvalidContractStatus exception (#144) * Removed timestamp from ContractTermination changeset rebased to newest master * jenkins pr crutch * update walker 2 interface * fix signature * replace strings * add update and create date * Event batching v0.1 (obvious one) (#160) * HG-227: Publish formerly internal events (#161) * HG-227: Streamline event payload definitions * HG-227: Publish formerly internal events * HG-227: Introduce session-level result * HG-227: Start classifying operation failures * HG-227: Differentiate between domain and payproc invoicing models * HG-227: Strip domain models further * HG-227: Make risk score, route and cash flow required * HG-227: Give shop location back to proxies (#164)
2017-07-17 10:21:41 +00:00
include "domain.thrift"
include "base.thrift"
include "payment_processing.thrift"
namespace java com.rbkmoney.damsel.walker
namespace erlang walker
typedef i64 ClaimID
typedef domain.PartyID PartyID
typedef domain.ShopID ShopID
//Контейнер для хранения всех ченжсетов
struct PartyModificationUnit {
1: required list<payment_processing.PartyModification> modifications
}
enum ActionType {
assigned,
comment,
status_changed,
claim_changed
}
struct ClaimInfo {
// id мерчанта
1: required string party_id
// идентификатор заявки в рамках орги
2: required ClaimID claim_id
// статус Claim-a
3: required string status
// id пользователя на каторого назначенная заявка
4: optional string assigned_user_id
//текстовое описание заявки
5: optional string description
// причина отмены или отзыва завяки
6: optional string reason
// полный набор изменений Claim-a
7: required PartyModificationUnit modifications
// ревизия Claim-a
8: required string revision
// создан
9: required string created_at
// обновлен
10: required string updated_at
}
struct ClaimSearchRequest {
1: optional string party_id
2: optional set<ClaimID> claim_id
3: optional string contains
4: optional string assigned_user_id
5: optional string claim_status
}
struct Comment {
1: required string text
2: required string created_at
3: required UserInformation user
}
/**
* Действия связанные с клеймом - история событий
**/
struct Action {
1: required string created_at
2: required UserInformation user
3: required ActionType type
4: optional string before
5: required string after
}
struct UserInformation{
1: required string userID
2: optional string user_name
3: optional string email
}
typedef payment_processing.InvalidUser InvalidUser
typedef payment_processing.InvalidChangeset InvalidChangeset
typedef payment_processing.PartyNotFound PartyNotFound
typedef payment_processing.InvalidPartyStatus InvalidPartyStatus
typedef payment_processing.ClaimNotFound ClaimNotFound
typedef payment_processing.InvalidClaimRevision InvalidClaimRevision
typedef payment_processing.ChangesetConflict ChangesetConflict
typedef payment_processing.InvalidClaimStatus InvalidClaimStatus
HG-192: Introduce multiclaims (#131) * DC-23: changed PartyManagement interface to claims (#122) * DC-23: changed PartyManagement interface to work with claims as primary editing method DC-25: changed PartyChangeset to match with new interface (DC-23) Moved ShopLocation to Shop level * added ContractExpiered status and creation timestamp * changed contracts & shops IDs types from Int to String * extracted ShopUpdate fields to ShopModification level * added InvalidChangeset exception * Claim effects added (v0.1) * Claim effects v1.0 * Claim effects v1.1 added created_at in all party objects * Added ShopProxyChanged effect produced by ProxyModification changeset * added ClaimUpdated event and ClaimRevision property * added revision check to AcceptClaim * added revision to deny/revoke methods for uniformity * added ShopContractChanged to make one-to-one relations beetween change & effect * Category is back to ShopParams as optional field * AcceptClaim can throw InvalidChangeset exception * Added AnonymousEntity to fulfill contract creation requirements * Renamed AninymousEntity to RegisteredUser * Added PayoutToolType to distinguish test and live payout tools * Removed payout tool type due to redundancy * Added PayoutToolPrototype to incapsulate test payout tool params * Walker2 API (#125) * Walker 2 api new Methods for CRUD operations fro Claims, Comments and history(Actions) WALK-20 * rename to wc_deploy * add deploy_epic_nexus to list * fix make cmd * fixed suspension naming * elastico interface get end search party methods Ft/walk 27/elastico (#133) * Syncronize walker and payment processing thrifts * WALK-27: Bump to rbkmoney/image-build@efd28e5 (#138) * DC-27: added timestamp and revision to claim related events * DC-27: added updated timestamp to claim Added timestamp to blocking/suspension statuses (party & shop) for same reason. * DC-27: removed unnecessary timestamp from accepted status (#143) * Added missed InvalidContractStatus exception (#144) * Removed timestamp from ContractTermination changeset rebased to newest master * jenkins pr crutch * update walker 2 interface * fix signature * replace strings * add update and create date * Event batching v0.1 (obvious one) (#160) * HG-227: Publish formerly internal events (#161) * HG-227: Streamline event payload definitions * HG-227: Publish formerly internal events * HG-227: Introduce session-level result * HG-227: Start classifying operation failures * HG-227: Differentiate between domain and payproc invoicing models * HG-227: Strip domain models further * HG-227: Make risk score, route and cash flow required * HG-227: Give shop location back to proxies (#164)
2017-07-17 10:21:41 +00:00
service Walker {
/**
* Подтвердить и применить заявку пользователя
**/
void AcceptClaim(1: string party_id, 2: ClaimID claim_id, 3: UserInformation user, 4: i32 revision) throws (
1: InvalidUser ex1,
2: PartyNotFound ex2,
3: ClaimNotFound ex3,
4: InvalidClaimStatus ex4,
5: InvalidClaimRevision ex5,
6: InvalidChangeset ex6
HG-192: Introduce multiclaims (#131) * DC-23: changed PartyManagement interface to claims (#122) * DC-23: changed PartyManagement interface to work with claims as primary editing method DC-25: changed PartyChangeset to match with new interface (DC-23) Moved ShopLocation to Shop level * added ContractExpiered status and creation timestamp * changed contracts & shops IDs types from Int to String * extracted ShopUpdate fields to ShopModification level * added InvalidChangeset exception * Claim effects added (v0.1) * Claim effects v1.0 * Claim effects v1.1 added created_at in all party objects * Added ShopProxyChanged effect produced by ProxyModification changeset * added ClaimUpdated event and ClaimRevision property * added revision check to AcceptClaim * added revision to deny/revoke methods for uniformity * added ShopContractChanged to make one-to-one relations beetween change & effect * Category is back to ShopParams as optional field * AcceptClaim can throw InvalidChangeset exception * Added AnonymousEntity to fulfill contract creation requirements * Renamed AninymousEntity to RegisteredUser * Added PayoutToolType to distinguish test and live payout tools * Removed payout tool type due to redundancy * Added PayoutToolPrototype to incapsulate test payout tool params * Walker2 API (#125) * Walker 2 api new Methods for CRUD operations fro Claims, Comments and history(Actions) WALK-20 * rename to wc_deploy * add deploy_epic_nexus to list * fix make cmd * fixed suspension naming * elastico interface get end search party methods Ft/walk 27/elastico (#133) * Syncronize walker and payment processing thrifts * WALK-27: Bump to rbkmoney/image-build@efd28e5 (#138) * DC-27: added timestamp and revision to claim related events * DC-27: added updated timestamp to claim Added timestamp to blocking/suspension statuses (party & shop) for same reason. * DC-27: removed unnecessary timestamp from accepted status (#143) * Added missed InvalidContractStatus exception (#144) * Removed timestamp from ContractTermination changeset rebased to newest master * jenkins pr crutch * update walker 2 interface * fix signature * replace strings * add update and create date * Event batching v0.1 (obvious one) (#160) * HG-227: Publish formerly internal events (#161) * HG-227: Streamline event payload definitions * HG-227: Publish formerly internal events * HG-227: Introduce session-level result * HG-227: Start classifying operation failures * HG-227: Differentiate between domain and payproc invoicing models * HG-227: Strip domain models further * HG-227: Make risk score, route and cash flow required * HG-227: Give shop location back to proxies (#164)
2017-07-17 10:21:41 +00:00
)
/**
* Отклонить заявку
**/
void DenyClaim(1: string party_id, 2: ClaimID claim_id, 3: UserInformation user, 4: string reason, 5: i32 revision) throws (
1: InvalidUser ex1,
2: PartyNotFound ex2,
3: ClaimNotFound ex3,
4: InvalidClaimStatus ex4,
5: InvalidClaimRevision ex5)
HG-192: Introduce multiclaims (#131) * DC-23: changed PartyManagement interface to claims (#122) * DC-23: changed PartyManagement interface to work with claims as primary editing method DC-25: changed PartyChangeset to match with new interface (DC-23) Moved ShopLocation to Shop level * added ContractExpiered status and creation timestamp * changed contracts & shops IDs types from Int to String * extracted ShopUpdate fields to ShopModification level * added InvalidChangeset exception * Claim effects added (v0.1) * Claim effects v1.0 * Claim effects v1.1 added created_at in all party objects * Added ShopProxyChanged effect produced by ProxyModification changeset * added ClaimUpdated event and ClaimRevision property * added revision check to AcceptClaim * added revision to deny/revoke methods for uniformity * added ShopContractChanged to make one-to-one relations beetween change & effect * Category is back to ShopParams as optional field * AcceptClaim can throw InvalidChangeset exception * Added AnonymousEntity to fulfill contract creation requirements * Renamed AninymousEntity to RegisteredUser * Added PayoutToolType to distinguish test and live payout tools * Removed payout tool type due to redundancy * Added PayoutToolPrototype to incapsulate test payout tool params * Walker2 API (#125) * Walker 2 api new Methods for CRUD operations fro Claims, Comments and history(Actions) WALK-20 * rename to wc_deploy * add deploy_epic_nexus to list * fix make cmd * fixed suspension naming * elastico interface get end search party methods Ft/walk 27/elastico (#133) * Syncronize walker and payment processing thrifts * WALK-27: Bump to rbkmoney/image-build@efd28e5 (#138) * DC-27: added timestamp and revision to claim related events * DC-27: added updated timestamp to claim Added timestamp to blocking/suspension statuses (party & shop) for same reason. * DC-27: removed unnecessary timestamp from accepted status (#143) * Added missed InvalidContractStatus exception (#144) * Removed timestamp from ContractTermination changeset rebased to newest master * jenkins pr crutch * update walker 2 interface * fix signature * replace strings * add update and create date * Event batching v0.1 (obvious one) (#160) * HG-227: Publish formerly internal events (#161) * HG-227: Streamline event payload definitions * HG-227: Publish formerly internal events * HG-227: Introduce session-level result * HG-227: Start classifying operation failures * HG-227: Differentiate between domain and payproc invoicing models * HG-227: Strip domain models further * HG-227: Make risk score, route and cash flow required * HG-227: Give shop location back to proxies (#164)
2017-07-17 10:21:41 +00:00
/**
* Получить информацию о заявке
**/
ClaimInfo GetClaim(1: string party_id, 2: ClaimID claim_id) throws (
1: ClaimNotFound ex1)
HG-192: Introduce multiclaims (#131) * DC-23: changed PartyManagement interface to claims (#122) * DC-23: changed PartyManagement interface to work with claims as primary editing method DC-25: changed PartyChangeset to match with new interface (DC-23) Moved ShopLocation to Shop level * added ContractExpiered status and creation timestamp * changed contracts & shops IDs types from Int to String * extracted ShopUpdate fields to ShopModification level * added InvalidChangeset exception * Claim effects added (v0.1) * Claim effects v1.0 * Claim effects v1.1 added created_at in all party objects * Added ShopProxyChanged effect produced by ProxyModification changeset * added ClaimUpdated event and ClaimRevision property * added revision check to AcceptClaim * added revision to deny/revoke methods for uniformity * added ShopContractChanged to make one-to-one relations beetween change & effect * Category is back to ShopParams as optional field * AcceptClaim can throw InvalidChangeset exception * Added AnonymousEntity to fulfill contract creation requirements * Renamed AninymousEntity to RegisteredUser * Added PayoutToolType to distinguish test and live payout tools * Removed payout tool type due to redundancy * Added PayoutToolPrototype to incapsulate test payout tool params * Walker2 API (#125) * Walker 2 api new Methods for CRUD operations fro Claims, Comments and history(Actions) WALK-20 * rename to wc_deploy * add deploy_epic_nexus to list * fix make cmd * fixed suspension naming * elastico interface get end search party methods Ft/walk 27/elastico (#133) * Syncronize walker and payment processing thrifts * WALK-27: Bump to rbkmoney/image-build@efd28e5 (#138) * DC-27: added timestamp and revision to claim related events * DC-27: added updated timestamp to claim Added timestamp to blocking/suspension statuses (party & shop) for same reason. * DC-27: removed unnecessary timestamp from accepted status (#143) * Added missed InvalidContractStatus exception (#144) * Removed timestamp from ContractTermination changeset rebased to newest master * jenkins pr crutch * update walker 2 interface * fix signature * replace strings * add update and create date * Event batching v0.1 (obvious one) (#160) * HG-227: Publish formerly internal events (#161) * HG-227: Streamline event payload definitions * HG-227: Publish formerly internal events * HG-227: Introduce session-level result * HG-227: Start classifying operation failures * HG-227: Differentiate between domain and payproc invoicing models * HG-227: Strip domain models further * HG-227: Make risk score, route and cash flow required * HG-227: Give shop location back to proxies (#164)
2017-07-17 10:21:41 +00:00
/**
* Создать заявку
**/
payment_processing.Claim CreateClaim (1: UserInformation user, 2: PartyID party_id, 3: PartyModificationUnit changeset) throws (
1: InvalidUser ex1,
2: PartyNotFound ex2,
3: InvalidPartyStatus ex3,
4: ChangesetConflict ex4,
5: InvalidChangeset ex5,
6: base.InvalidRequest ex6)
HG-192: Introduce multiclaims (#131) * DC-23: changed PartyManagement interface to claims (#122) * DC-23: changed PartyManagement interface to work with claims as primary editing method DC-25: changed PartyChangeset to match with new interface (DC-23) Moved ShopLocation to Shop level * added ContractExpiered status and creation timestamp * changed contracts & shops IDs types from Int to String * extracted ShopUpdate fields to ShopModification level * added InvalidChangeset exception * Claim effects added (v0.1) * Claim effects v1.0 * Claim effects v1.1 added created_at in all party objects * Added ShopProxyChanged effect produced by ProxyModification changeset * added ClaimUpdated event and ClaimRevision property * added revision check to AcceptClaim * added revision to deny/revoke methods for uniformity * added ShopContractChanged to make one-to-one relations beetween change & effect * Category is back to ShopParams as optional field * AcceptClaim can throw InvalidChangeset exception * Added AnonymousEntity to fulfill contract creation requirements * Renamed AninymousEntity to RegisteredUser * Added PayoutToolType to distinguish test and live payout tools * Removed payout tool type due to redundancy * Added PayoutToolPrototype to incapsulate test payout tool params * Walker2 API (#125) * Walker 2 api new Methods for CRUD operations fro Claims, Comments and history(Actions) WALK-20 * rename to wc_deploy * add deploy_epic_nexus to list * fix make cmd * fixed suspension naming * elastico interface get end search party methods Ft/walk 27/elastico (#133) * Syncronize walker and payment processing thrifts * WALK-27: Bump to rbkmoney/image-build@efd28e5 (#138) * DC-27: added timestamp and revision to claim related events * DC-27: added updated timestamp to claim Added timestamp to blocking/suspension statuses (party & shop) for same reason. * DC-27: removed unnecessary timestamp from accepted status (#143) * Added missed InvalidContractStatus exception (#144) * Removed timestamp from ContractTermination changeset rebased to newest master * jenkins pr crutch * update walker 2 interface * fix signature * replace strings * add update and create date * Event batching v0.1 (obvious one) (#160) * HG-227: Publish formerly internal events (#161) * HG-227: Streamline event payload definitions * HG-227: Publish formerly internal events * HG-227: Introduce session-level result * HG-227: Start classifying operation failures * HG-227: Differentiate between domain and payproc invoicing models * HG-227: Strip domain models further * HG-227: Make risk score, route and cash flow required * HG-227: Give shop location back to proxies (#164)
2017-07-17 10:21:41 +00:00
/**
* Передает список изменений для заявки
**/
void UpdateClaim(1: string party_id, 2: ClaimID claim_id, 3: UserInformation user, 4: PartyModificationUnit changeset, 5: i32 revision) throws (
1: InvalidUser ex1,
2: PartyNotFound ex2,
3: InvalidPartyStatus ex3,
4: ClaimNotFound ex4,
5: InvalidClaimStatus ex5,
6: InvalidClaimRevision ex6,
7: ChangesetConflict ex7,
8: InvalidChangeset ex8,
9: base.InvalidRequest ex9
HG-192: Introduce multiclaims (#131) * DC-23: changed PartyManagement interface to claims (#122) * DC-23: changed PartyManagement interface to work with claims as primary editing method DC-25: changed PartyChangeset to match with new interface (DC-23) Moved ShopLocation to Shop level * added ContractExpiered status and creation timestamp * changed contracts & shops IDs types from Int to String * extracted ShopUpdate fields to ShopModification level * added InvalidChangeset exception * Claim effects added (v0.1) * Claim effects v1.0 * Claim effects v1.1 added created_at in all party objects * Added ShopProxyChanged effect produced by ProxyModification changeset * added ClaimUpdated event and ClaimRevision property * added revision check to AcceptClaim * added revision to deny/revoke methods for uniformity * added ShopContractChanged to make one-to-one relations beetween change & effect * Category is back to ShopParams as optional field * AcceptClaim can throw InvalidChangeset exception * Added AnonymousEntity to fulfill contract creation requirements * Renamed AninymousEntity to RegisteredUser * Added PayoutToolType to distinguish test and live payout tools * Removed payout tool type due to redundancy * Added PayoutToolPrototype to incapsulate test payout tool params * Walker2 API (#125) * Walker 2 api new Methods for CRUD operations fro Claims, Comments and history(Actions) WALK-20 * rename to wc_deploy * add deploy_epic_nexus to list * fix make cmd * fixed suspension naming * elastico interface get end search party methods Ft/walk 27/elastico (#133) * Syncronize walker and payment processing thrifts * WALK-27: Bump to rbkmoney/image-build@efd28e5 (#138) * DC-27: added timestamp and revision to claim related events * DC-27: added updated timestamp to claim Added timestamp to blocking/suspension statuses (party & shop) for same reason. * DC-27: removed unnecessary timestamp from accepted status (#143) * Added missed InvalidContractStatus exception (#144) * Removed timestamp from ContractTermination changeset rebased to newest master * jenkins pr crutch * update walker 2 interface * fix signature * replace strings * add update and create date * Event batching v0.1 (obvious one) (#160) * HG-227: Publish formerly internal events (#161) * HG-227: Streamline event payload definitions * HG-227: Publish formerly internal events * HG-227: Introduce session-level result * HG-227: Start classifying operation failures * HG-227: Differentiate between domain and payproc invoicing models * HG-227: Strip domain models further * HG-227: Make risk score, route and cash flow required * HG-227: Give shop location back to proxies (#164)
2017-07-17 10:21:41 +00:00
)
/**
* Поиск заявки по атрибутам
**/
list<ClaimInfo> SearchClaims(1: ClaimSearchRequest request)
/**
* Добавить комментарий к заявке
**/
void AddComment(1: string party_id, 2: ClaimID claim_id, 3: UserInformation user, 4: string text)
/**
* Получить список комментариев к заявке
**/
list<Comment> GetComments(1: string party_id, 2: ClaimID claim_id)
/**
* Получитить историю событий связанных с заявкой
**/
list<Action> GetActions(1: string party_id, 2: ClaimID claim_id)
}