omnata-plugin-runtime 0.9.0a208__tar.gz → 0.9.0a209__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {omnata_plugin_runtime-0.9.0a208 → omnata_plugin_runtime-0.9.0a209}/PKG-INFO +1 -1
- {omnata_plugin_runtime-0.9.0a208 → omnata_plugin_runtime-0.9.0a209}/pyproject.toml +1 -1
- {omnata_plugin_runtime-0.9.0a208 → omnata_plugin_runtime-0.9.0a209}/src/omnata_plugin_runtime/configuration.py +40 -0
- {omnata_plugin_runtime-0.9.0a208 → omnata_plugin_runtime-0.9.0a209}/src/omnata_plugin_runtime/omnata_plugin.py +2 -41
- {omnata_plugin_runtime-0.9.0a208 → omnata_plugin_runtime-0.9.0a209}/LICENSE +0 -0
- {omnata_plugin_runtime-0.9.0a208 → omnata_plugin_runtime-0.9.0a209}/README.md +0 -0
- {omnata_plugin_runtime-0.9.0a208 → omnata_plugin_runtime-0.9.0a209}/src/omnata_plugin_runtime/__init__.py +0 -0
- {omnata_plugin_runtime-0.9.0a208 → omnata_plugin_runtime-0.9.0a209}/src/omnata_plugin_runtime/api.py +0 -0
- {omnata_plugin_runtime-0.9.0a208 → omnata_plugin_runtime-0.9.0a209}/src/omnata_plugin_runtime/forms.py +0 -0
- {omnata_plugin_runtime-0.9.0a208 → omnata_plugin_runtime-0.9.0a209}/src/omnata_plugin_runtime/logging.py +0 -0
- {omnata_plugin_runtime-0.9.0a208 → omnata_plugin_runtime-0.9.0a209}/src/omnata_plugin_runtime/plugin_entrypoints.py +0 -0
- {omnata_plugin_runtime-0.9.0a208 → omnata_plugin_runtime-0.9.0a209}/src/omnata_plugin_runtime/rate_limiting.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "omnata-plugin-runtime"
|
3
|
-
version = "0.9.0-
|
3
|
+
version = "0.9.0-a209"
|
4
4
|
description = "Classes and common runtime components for building and running Omnata Plugins"
|
5
5
|
authors = ["James Weakley <james.weakley@omnata.com>"]
|
6
6
|
readme = "README.md"
|
@@ -220,6 +220,46 @@ STANDARD_OUTBOUND_SYNC_ACTIONS: Dict[str, OutboundSyncAction] = {
|
|
220
220
|
"Recreate": RecreateSyncAction,
|
221
221
|
}
|
222
222
|
|
223
|
+
class OutboundTargetParameter(BaseModel):
|
224
|
+
"""
|
225
|
+
Accomodates testing outbound syncs in production by nominating a form field who's value stays in the branch.
|
226
|
+
The reason this information is set statically here instead of as a flag on the FormField, is so that the sync engine
|
227
|
+
can have this information readily available without calling the plugin.
|
228
|
+
"""
|
229
|
+
field_name: str = Field(title="""The name of the form field that toggles the location, e.g. 'channel','customer_list'.
|
230
|
+
This must match a field which will be returned by the outbound_configuration_form for this target type.""")
|
231
|
+
is_branching_toggle: bool = Field(title="""Whether or not this field is a target toggle for branching.
|
232
|
+
If true, the value of this field will be used to determine the location of the sync in production.
|
233
|
+
For example, a messaging plugin could have a "channel" field to route messages to an alternate location.
|
234
|
+
Or, a marketing platform could have an alternate customer list name which is connected to test campaigns that don't actually send.
|
235
|
+
|
236
|
+
This should only be used in situations where all other sync parameters and field mappings can remain consistent between branches.""")
|
237
|
+
label: str = Field(title="""Used in the UI when describing the location., e.g. 'Channel','Customer List'.
|
238
|
+
It should completely describe the behaviour when used in a sentence like this:
|
239
|
+
'Changes will be tested against a different <label> when running in a branch.'""")
|
240
|
+
|
241
|
+
class OutboundTargetType(BaseModel):
|
242
|
+
"""
|
243
|
+
Some products have APIs that can be grouped together in ways that support different strategies and may or may not support toggling.
|
244
|
+
The label should answer the question: "What would you like to sync to?"
|
245
|
+
Examples:
|
246
|
+
- A CRM system may have "Standard objects", "Custom objects" or "Events"
|
247
|
+
- A messaging platform may have "Channels", "Users" or "Messages"
|
248
|
+
- A marketing platform may have "Customer lists", "Campaigns" or "Automations"
|
249
|
+
- An Ad platform may have "Campaigns", "Ad groups" or "Ads"
|
250
|
+
The target type cannot be changed after the sync is created.
|
251
|
+
"""
|
252
|
+
label: str
|
253
|
+
supported_strategies: List[str] = Field(
|
254
|
+
title="The names of the sync strategies supported by this target. Each one must match the name of a sync strategy declared in supported_outbound_strategies."
|
255
|
+
)
|
256
|
+
target_parameter: Optional[OutboundTargetParameter] = Field(
|
257
|
+
default=None,
|
258
|
+
title="""The sync configuration parameter that designates the target object, if applicable. For example, 'object_name' or 'channel_name'.
|
259
|
+
This will be used for two purposes:
|
260
|
+
1. To show a more readable indication of what this sync is doing in the UI, e.g. Standard object: Account
|
261
|
+
2. Designates this field as serving as a br toggle for testing in production.""")
|
262
|
+
|
223
263
|
|
224
264
|
class OutboundSyncStrategy(SubscriptableBaseModel, ABC):
|
225
265
|
"""OutboundSyncStrategy is a base class for all outbound sync strategies.
|
@@ -74,7 +74,8 @@ from .configuration import (
|
|
74
74
|
SubscriptableBaseModel,
|
75
75
|
SyncConfigurationParameters,
|
76
76
|
get_secrets,
|
77
|
-
ConnectivityOption
|
77
|
+
ConnectivityOption,
|
78
|
+
OutboundTargetType,
|
78
79
|
)
|
79
80
|
from .forms import (
|
80
81
|
ConnectionMethod,
|
@@ -122,46 +123,6 @@ class PluginManifest(SubscriptableBaseModel):
|
|
122
123
|
title="An optional list of target types that the plugin can support."
|
123
124
|
)
|
124
125
|
|
125
|
-
class OutboundTargetType(BaseModel):
|
126
|
-
"""
|
127
|
-
Some products have APIs that can be grouped together in ways that support different strategies and may or may not support toggling.
|
128
|
-
The label should answer the question: "What would you like to sync to?"
|
129
|
-
Examples:
|
130
|
-
- A CRM system may have "Standard objects", "Custom objects" or "Events"
|
131
|
-
- A messaging platform may have "Channels", "Users" or "Messages"
|
132
|
-
- A marketing platform may have "Customer lists", "Campaigns" or "Automations"
|
133
|
-
- An Ad platform may have "Campaigns", "Ad groups" or "Ads"
|
134
|
-
The target type cannot be changed after the sync is created.
|
135
|
-
"""
|
136
|
-
label: str
|
137
|
-
supported_strategies: List[str] = Field(
|
138
|
-
title="The names of the sync strategies supported by this target. Each one must match the name of a sync strategy declared in supported_outbound_strategies."
|
139
|
-
)
|
140
|
-
target_parameter: Optional[OutboundTargetParameter] = Field(
|
141
|
-
default=None,
|
142
|
-
title="""The sync configuration parameter that designates the target object, if applicable. For example, 'object_name' or 'channel_name'.
|
143
|
-
This will be used for two purposes:
|
144
|
-
1. To show a more readable indication of what this sync is doing in the UI, e.g. Standard object: Account
|
145
|
-
2. Designates this field as serving as a br toggle for testing in production.""")
|
146
|
-
|
147
|
-
class OutboundTargetParameter(BaseModel):
|
148
|
-
"""
|
149
|
-
Accomodates testing outbound syncs in production by nominating a form field who's value stays in the branch.
|
150
|
-
The reason this information is set statically here instead of as a flag on the FormField, is so that the sync engine
|
151
|
-
can have this information readily available without calling the plugin.
|
152
|
-
"""
|
153
|
-
field_name: str = Field(title="""The name of the form field that toggles the location, e.g. 'channel','customer_list'.
|
154
|
-
This must match a field which will be returned by the outbound_configuration_form for this target type.""")
|
155
|
-
is_branching_toggle: bool = Field(title="""Whether or not this field is a target toggle for branching.
|
156
|
-
If true, the value of this field will be used to determine the location of the sync in production.
|
157
|
-
For example, a messaging plugin could have a "channel" field to route messages to an alternate location.
|
158
|
-
Or, a marketing platform could have an alternate customer list name which is connected to test campaigns that don't actually send.
|
159
|
-
|
160
|
-
This should only be used in situations where all other sync parameters and field mappings can remain consistent between branches.""")
|
161
|
-
label: str = Field(title="""Used in the UI when describing the location., e.g. 'Channel','Customer List'.
|
162
|
-
It should completely describe the behaviour when used in a sentence like this:
|
163
|
-
'Changes will be tested against a different <label> when running in a branch.'""")
|
164
|
-
|
165
126
|
class SnowflakeFunctionParameter(BaseModel):
|
166
127
|
"""
|
167
128
|
Represents a parameter for a Snowflake UDF or UDTF
|
File without changes
|
File without changes
|
File without changes
|
{omnata_plugin_runtime-0.9.0a208 → omnata_plugin_runtime-0.9.0a209}/src/omnata_plugin_runtime/api.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|