-
Notifications
You must be signed in to change notification settings - Fork 378
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
Oliva Kar
committed
Jan 11, 2024
1 parent
5d343d5
commit f05037e
Showing
10 changed files
with
240 additions
and
173 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# -------------------------------------------------------------------------- | ||
from typing import Any, Union, Dict, List, Tuple, Callable, Awaitable, TypeVar | ||
from typing_extensions import TypedDict, ParamSpec | ||
|
||
|
||
_P = ParamSpec("_P") | ||
_R = TypeVar("_R") | ||
FunctionOrCoroutine = Union[Callable[_P, _R], Callable[_P, Awaitable[_R]]] | ||
|
||
|
||
# typing does not support recursion, so we must use forward references here (PEP484) | ||
JSONSerializable = Union[ | ||
Dict[str, "JSONSerializable"], | ||
List["JSONSerializable"], | ||
Tuple["JSONSerializable", ...], | ||
str, | ||
int, | ||
float, | ||
bool, | ||
None, | ||
] | ||
# TODO: verify that the JSON specification requires str as keys in dict. Not sure why that's defined here. | ||
|
||
|
||
Twin = Dict[str, Dict[str, JSONSerializable]] | ||
TwinPatch = Dict[str, JSONSerializable] | ||
|
||
|
||
class StorageInfo(TypedDict): | ||
correlationId: str | ||
hostName: str | ||
containerName: str | ||
blobName: str | ||
sasToken: str | ||
|
||
|
||
ProvisioningPayload = Union[Dict[str, Any], str, int] |
Oops, something went wrong.