gitee.com/larksuite/oapi-sdk-go/v3@v3.0.3/service/contact/v3/ext_model.go (about)

     1  /*
     2   * MIT License
     3   *
     4   * Copyright (c) 2022 Lark Technologies Pte. Ltd.
     5   *
     6   * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
     7   *
     8   * The above copyright notice and this permission notice, shall be included in all copies or substantial portions of the Software.
     9   *
    10   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    11   */
    12  
    13  package larkcontact
    14  
    15  import larkevent "gitee.com/larksuite/oapi-sdk-go/v3/event"
    16  
    17  type P1UserChangedV3Data struct {
    18  	Type       string `json:"type"`               // 事件类型
    19  	AppID      string `json:"app_id"`             // 应用ID
    20  	TenantKey  string `json:"tenant_key"`         // 企业标识
    21  	OpenID     string `json:"open_id,omitempty"`  // 员工对此应用的唯一标识,同一员工对不同应用的open_id不同
    22  	EmployeeId string `json:"employee_id"`        // 即“用户ID”,仅企业自建应用会返回
    23  	UnionId    string `json:"union_id,omitempty"` // 员工对此ISV的唯一标识,同一员工对同一个ISV名下所有应用的union_id相同
    24  }
    25  
    26  type P1UserChangedV3 struct {
    27  	*larkevent.EventBase
    28  	*larkevent.EventReq
    29  	Event *P1UserChangedV3Data `json:"event"`
    30  }
    31  
    32  func (m *P1UserChangedV3) RawReq(req *larkevent.EventReq) {
    33  	m.EventReq = req
    34  }
    35  
    36  type P1UserStatusV3 struct {
    37  	IsActive   bool `json:"is_active"`   // 账号是否已激活
    38  	IsFrozen   bool `json:"is_frozen"`   // 账号是否冻结
    39  	IsResigned bool `json:"is_resigned"` // 是否离职
    40  }
    41  type P1UserStatusChangedV3Data struct {
    42  	Type          string          `json:"type"`               // 事件类型
    43  	AppID         string          `json:"app_id"`             // 应用ID
    44  	TenantKey     string          `json:"tenant_key"`         // 企业标识
    45  	OpenID        string          `json:"open_id,omitempty"`  // 员工对此应用的唯一标识,同一员工对不同应用的open_id不同
    46  	EmployeeId    string          `json:"employee_id"`        // 即“用户ID”,仅企业自建应用会返回
    47  	UnionId       string          `json:"union_id,omitempty"` // 员工对此ISV的唯一标识,同一员工对同一个ISV名下所有应用的union_id相同
    48  	BeforeStatus  *P1UserStatusV3 `json:"before_status"`      // 变化前的状态
    49  	CurrentStatus *P1UserStatusV3 `json:"current_status"`     // 变化后的状态
    50  	ChangeTime    string          `json:"change_time"`        // 状态更新的时间
    51  }
    52  
    53  type P1UserStatusChangedV3 struct {
    54  	*larkevent.EventBase
    55  	*larkevent.EventReq
    56  	Event *P1UserStatusChangedV3Data `json:"event"`
    57  }
    58  
    59  func (m *P1UserStatusChangedV3) RawReq(req *larkevent.EventReq) {
    60  	m.EventReq = req
    61  }
    62  
    63  type P1DepartmentChangedV3Data struct {
    64  	Type             string `json:"type"`               // 事件类型,包括 dept_add, dept_update, dept_delete
    65  	AppID            string `json:"app_id"`             // 应用ID
    66  	TenantKey        string `json:"tenant_key"`         // 企业标识
    67  	OpenID           string `json:"open_id,omitempty"`  // 员工对此应用的唯一标识,同一员工对不同应用的open_id不同
    68  	OpenDepartmentId string `json:"open_department_id"` // 部门的Id,已废弃
    69  }
    70  
    71  type P1DepartmentChangedV3 struct {
    72  	*larkevent.EventBase
    73  	*larkevent.EventReq
    74  	Event *P1DepartmentChangedV3Data `json:"event"`
    75  }
    76  
    77  func (m *P1DepartmentChangedV3) RawReq(req *larkevent.EventReq) {
    78  	m.EventReq = req
    79  }
    80  
    81  type P1ContactScopeChangedV3Data struct {
    82  	Type      string `json:"type"`       // 事件类型
    83  	AppID     string `json:"app_id"`     // 应用ID
    84  	TenantKey string `json:"tenant_key"` //企业标识
    85  }
    86  
    87  type P1ContactScopeChangedV3 struct {
    88  	*larkevent.EventBase
    89  	*larkevent.EventReq
    90  	Event *P1ContactScopeChangedV3Data `json:"event"`
    91  }
    92  
    93  func (m *P1ContactScopeChangedV3) RawReq(req *larkevent.EventReq) {
    94  	m.EventReq = req
    95  }