-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,249 changed files
with
59,708 additions
and
54,967 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,47 @@ | ||
from . import tenant | ||
from . import translation | ||
from . import compensation | ||
from . import ehr | ||
from . import task | ||
from . import block | ||
from . import okr | ||
from . import report | ||
from . import document_ai | ||
from . import docx | ||
from . import drive | ||
from . import hire | ||
from . import mdm | ||
from . import attendance | ||
from . import bitable | ||
from . import corehr | ||
from . import personal_settings | ||
from . import wiki | ||
from . import vc | ||
from . import acs | ||
from . import drive | ||
from . import im | ||
from . import lingo | ||
from . import passport | ||
from . import search | ||
from . import moments | ||
from . import report | ||
from . import security_and_compliance | ||
from . import sheets | ||
from . import aily | ||
from . import baike | ||
from . import optical_char_recognition | ||
from . import admin | ||
from . import wiki | ||
from . import speech_to_text | ||
from . import workplace | ||
from . import calendar | ||
from . import helpdesk | ||
from . import lingo | ||
from . import mail | ||
from . import board | ||
from . import gray_test_open_sg | ||
from . import human_authentication | ||
from . import search | ||
from . import task | ||
from . import tenant | ||
from . import application | ||
from . import compensation | ||
from . import authen | ||
from . import attendance | ||
from . import baike | ||
from . import calendar | ||
from . import meeting_room | ||
from . import personal_settings | ||
from . import verification | ||
from . import admin | ||
from . import acs | ||
from . import document_ai | ||
from . import okr | ||
from . import translation | ||
from . import board | ||
from . import corehr | ||
from . import optical_char_recognition | ||
from . import passport | ||
from . import contact | ||
from . import approval | ||
from . import auth | ||
from . import authen | ||
from . import ehr | ||
from . import human_authentication | ||
from . import aily | ||
from . import docx | ||
from . import event | ||
from . import security_and_compliance | ||
from . import application | ||
from . import approval | ||
from . import contact | ||
from . import gray_test_open_sg | ||
from . import hire | ||
from . import mdm | ||
from . import vc | ||
from . import workplace | ||
from . import block |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Code generated by Lark OpenAPI. | ||
|
||
from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type | ||
from lark_oapi.core.model import BaseRequest | ||
from lark_oapi.core.enum import HttpMethod, AccessTokenType | ||
|
||
|
||
class ApplyScopeRequest(BaseRequest): | ||
def __init__(self) -> None: | ||
super().__init__() | ||
|
||
@staticmethod | ||
def builder() -> "ApplyScopeRequestBuilder": | ||
return ApplyScopeRequestBuilder() | ||
|
||
|
||
class ApplyScopeRequestBuilder(object): | ||
|
||
def __init__(self) -> None: | ||
apply_scope_request = ApplyScopeRequest() | ||
apply_scope_request.http_method = HttpMethod.POST | ||
apply_scope_request.uri = "/open-apis/application/v6/scopes/apply" | ||
apply_scope_request.token_types = {AccessTokenType.TENANT} | ||
self._apply_scope_request: ApplyScopeRequest = apply_scope_request | ||
|
||
def build(self) -> ApplyScopeRequest: | ||
return self._apply_scope_request |
16 changes: 16 additions & 0 deletions
16
lark_oapi/api/application/v6/model/apply_scope_response.py
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 @@ | ||
# Code generated by Lark OpenAPI. | ||
|
||
from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type | ||
from lark_oapi.core.construct import init | ||
from lark_oapi.core.model import BaseResponse | ||
|
||
|
||
class ApplyScopeResponse(BaseResponse): | ||
_types = { | ||
|
||
} | ||
|
||
def __init__(self, d=None): | ||
super().__init__(d) | ||
|
||
init(self, d, self._types) |
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,27 @@ | ||
# Code generated by Lark OpenAPI. | ||
|
||
from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type | ||
from lark_oapi.core.model import BaseRequest | ||
from lark_oapi.core.enum import HttpMethod, AccessTokenType | ||
|
||
|
||
class ListScopeRequest(BaseRequest): | ||
def __init__(self) -> None: | ||
super().__init__() | ||
|
||
@staticmethod | ||
def builder() -> "ListScopeRequestBuilder": | ||
return ListScopeRequestBuilder() | ||
|
||
|
||
class ListScopeRequestBuilder(object): | ||
|
||
def __init__(self) -> None: | ||
list_scope_request = ListScopeRequest() | ||
list_scope_request.http_method = HttpMethod.GET | ||
list_scope_request.uri = "/open-apis/application/v6/scopes" | ||
list_scope_request.token_types = {AccessTokenType.TENANT} | ||
self._list_scope_request: ListScopeRequest = list_scope_request | ||
|
||
def build(self) -> ListScopeRequest: | ||
return self._list_scope_request |
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,17 @@ | ||
# Code generated by Lark OpenAPI. | ||
|
||
from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type | ||
from lark_oapi.core.construct import init | ||
from lark_oapi.core.model import BaseResponse | ||
from .list_scope_response_body import ListScopeResponseBody | ||
|
||
|
||
class ListScopeResponse(BaseResponse): | ||
_types = { | ||
"data": ListScopeResponseBody | ||
} | ||
|
||
def __init__(self, d=None): | ||
super().__init__(d) | ||
self.data: Optional[ListScopeResponseBody] = None | ||
init(self, d, self._types) |
31 changes: 31 additions & 0 deletions
31
lark_oapi/api/application/v6/model/list_scope_response_body.py
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,31 @@ | ||
# Code generated by Lark OpenAPI. | ||
|
||
from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type | ||
from lark_oapi.core.construct import init | ||
from .scope import Scope | ||
|
||
|
||
class ListScopeResponseBody(object): | ||
_types = { | ||
"scopes": List[Scope], | ||
} | ||
|
||
def __init__(self, d=None): | ||
self.scopes: Optional[List[Scope]] = None | ||
init(self, d, self._types) | ||
|
||
@staticmethod | ||
def builder() -> "ListScopeResponseBodyBuilder": | ||
return ListScopeResponseBodyBuilder() | ||
|
||
|
||
class ListScopeResponseBodyBuilder(object): | ||
def __init__(self) -> None: | ||
self._list_scope_response_body = ListScopeResponseBody() | ||
|
||
def scopes(self, scopes: List[Scope]) -> "ListScopeResponseBodyBuilder": | ||
self._list_scope_response_body.scopes = scopes | ||
return self | ||
|
||
def build(self) -> "ListScopeResponseBody": | ||
return self._list_scope_response_body |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# Code generated by Lark OpenAPI. | ||
|
||
import io | ||
from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type | ||
from lark_oapi.core.const import UTF_8, CONTENT_TYPE, APPLICATION_JSON | ||
from lark_oapi.core import JSON | ||
from lark_oapi.core.token import verify | ||
from lark_oapi.core.http import Transport | ||
from lark_oapi.core.model import Config, RequestOption, RawResponse | ||
from lark_oapi.core.utils import Files | ||
from requests_toolbelt import MultipartEncoder | ||
from ..model.apply_scope_request import ApplyScopeRequest | ||
from ..model.apply_scope_response import ApplyScopeResponse | ||
from ..model.list_scope_request import ListScopeRequest | ||
from ..model.list_scope_response import ListScopeResponse | ||
|
||
|
||
class Scope(object): | ||
def __init__(self, config: Config) -> None: | ||
self.config: Config = config | ||
|
||
def apply(self, request: ApplyScopeRequest, option: Optional[RequestOption] = None) -> ApplyScopeResponse: | ||
if option is None: | ||
option = RequestOption() | ||
|
||
# 鉴权、获取 token | ||
verify(self.config, request, option) | ||
|
||
# 添加 content-type | ||
if request.body is not None: | ||
option.headers[CONTENT_TYPE] = f"{APPLICATION_JSON}; charset=utf-8" | ||
|
||
# 发起请求 | ||
resp: RawResponse = Transport.execute(self.config, request, option) | ||
|
||
# 反序列化 | ||
response: ApplyScopeResponse = JSON.unmarshal(str(resp.content, UTF_8), ApplyScopeResponse) | ||
response.raw = resp | ||
|
||
return response | ||
|
||
async def aapply(self, request: ApplyScopeRequest, option: Optional[RequestOption] = None) -> ApplyScopeResponse: | ||
if option is None: | ||
option = RequestOption() | ||
|
||
# 鉴权、获取 token | ||
verify(self.config, request, option) | ||
|
||
# 发起请求 | ||
resp: RawResponse = await Transport.aexecute(self.config, request, option) | ||
|
||
# 反序列化 | ||
response: ApplyScopeResponse = JSON.unmarshal(str(resp.content, UTF_8), ApplyScopeResponse) | ||
response.raw = resp | ||
|
||
return response | ||
|
||
def list(self, request: ListScopeRequest, option: Optional[RequestOption] = None) -> ListScopeResponse: | ||
if option is None: | ||
option = RequestOption() | ||
|
||
# 鉴权、获取 token | ||
verify(self.config, request, option) | ||
|
||
# 添加 content-type | ||
if request.body is not None: | ||
option.headers[CONTENT_TYPE] = f"{APPLICATION_JSON}; charset=utf-8" | ||
|
||
# 发起请求 | ||
resp: RawResponse = Transport.execute(self.config, request, option) | ||
|
||
# 反序列化 | ||
response: ListScopeResponse = JSON.unmarshal(str(resp.content, UTF_8), ListScopeResponse) | ||
response.raw = resp | ||
|
||
return response | ||
|
||
async def alist(self, request: ListScopeRequest, option: Optional[RequestOption] = None) -> ListScopeResponse: | ||
if option is None: | ||
option = RequestOption() | ||
|
||
# 鉴权、获取 token | ||
verify(self.config, request, option) | ||
|
||
# 发起请求 | ||
resp: RawResponse = await Transport.aexecute(self.config, request, option) | ||
|
||
# 反序列化 | ||
response: ListScopeResponse = JSON.unmarshal(str(resp.content, UTF_8), ListScopeResponse) | ||
response.raw = resp | ||
|
||
return response |
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.