Where can I find the full list of filter event subscription names for Outgoing WebHooks? - circuit-sdk

So far I have found these:
CONVERSATION.CREATE
CONVERSATION.UPDATE
CONVERSATION.ADD_ITEM
USER.SUBMIT_FORM_DATA
I'd like to know all available. Thanks!

You can see them on the swagger page of the spec.
See https://circuitsandbox.net/rest/v2/swagger/ui/index.html or at the sepc at https://circuitsandbox.net/rest/v2/swagger
"enum": [
"CONVERSATION.CREATE",
"CONVERSATION.UPDATE",
"CONVERSATION.ADD_ITEM",
"CONVERSATION.UPDATE_ITEM",
"USER.INCOMING_CALL",
"USER.USER_UPDATED",
"USER.USER_SETTING_UPDATED",
"USER.SUBMIT_FORM_DATA"
]

I haven't found an official list, but this is what I've gathered so far:
CONVERSATION.CREATE
CONVERSATION.UPDATE
CONVERSATION.ADD_ITEM
CONVERSATION.UPDATE_ITEM
USER.USER_UPDATED
USER.USER_SETTING_UPDATED
USER.SUBMIT_FORM_DATA

Related

Writing the correct SQL statement in AWS IoT rule

I am working on AWS IoT to develop my custom solution based on a set of sensors, and I have a problem regarding how to write the SQL statement related to the kind of data I receive from a Zigbee sensor.
An example of what I receive from my sensor is reported here:
{
"type": "reportAttribute",
"from": "WIFI",
"deviceCode": "aws_device_code",
"to": "CLOUD",
"mac": "30:ae:7b:e2:e1:e6",
"time": 1668506014,
"data": {...}
}
What I would like to do is to select messages that have the from field equal to GREENPOWER, something along the lines of SELECT * FROM 'test' WHERE from = 'GREENPOWER', but from is also a keyword in SQL hence my problem. I am no expert whatsoever in SQL, so I am not sure how this can be done. I am also looking for a way to modify the received data, but solving this problem on AWS would be much easier.
Thank you very much for your help!
There are quite a lot of SQL functions that exist in AWS IoT Rule. You can find them here: https://docs.aws.amazon.com/iot/latest/developerguide/iot-sql-functions.html
In your case, something like this should work:
SELECT * FROM 'test' WHERE get(*, "from") = "GREENPOWER"

Apply multiple format rules to a single rjsf field

I like the rjsf format api, it works great for me:
"format": "alphanumeric"
But I would like to assign multiple format rules to a single field, and use transformErrors api to display a different message for each, giving user more precise feedback about what's wrong. Something along the lines of:
"format": ["alphanumeric", "mustBeginWithLetter"]
but this array notation doesn't work and breaks the formatting instead :)
Is there a clean way to achieve what I want?
"allOf": [ {"format": "alphanumeric"}, {"format": "mustBeginWithLetter"} ]

Missing } after property list, can't find it

I don't fully understand jquery yet but I am in the middle of a course to learn some.
Part of my course required me to enter:
db.grades.aggregate(
{'$group':{'_id':'$student_id', 'average':{'$avg':'$score'}}},
{'$sort':{'average':-1}},
{'$limit':1}
)
It is throwing this error:
[thread1] SyntaxError: missing } after property list #(shell)1:39
I can't see the missing }, can someone please help me?
You should use array
db.grades.aggregate([
{'$group':{'_id':'$student_id', 'average':{'$avg':'$score'}}},
{'$sort':{'average':-1}},
{'$limit':1}
])
Aggregate pipes must be in an array, check the docs here: https://docs.mongodb.com/v3.2/reference/method/db.collection.aggregate/
db.grades.aggregate([
{'$group':{'_id':'$student_id', 'average':{'$avg':'$score'}}},
{'$sort':{'average':-1}},
{'$limit':1}
])

Azure HBASE REST - simple get failing for colfam:col

This should be a very simple one (been searching for a solution all day - read a thousand and a half posts).
I put a test row in my HBASE table in hbase shell:
put 'iEngine','testrow','SVA:SourceName','Journal of Fun'
I can get the value for a column family using the REST API in DHC Chrome:
https://ienginemaster.azurehdinsight.net/hbaserest/iEngine/testrow/SVA
I can't seem to get it for the specific cell: https://ienginemaster.azurehdinsight.net/hbaserest/iEngine/testrow/SVA:SourceName
{
"Row": [{
"key": "dGVzdHJvdw==",
"Cell": [{
"column": "U1ZBOlNvdXJjZU5hbWU=",
"timestamp": 1440602453975,
"$": "Sm91cm5hbCBvZiBGdW4="
}]
}]
}
I get back a 400 error.
When successfully asking for just the family, I get back:
I tried replacing the encoded value for SVA:SourceName, and a thousand other things. I'm assuming I'm missing something simple.
Also, the following works:
hbase(main):012:0> get 'iEngine', 'testrow', 'SVA:SourceName'
COLUMN CELL
SVA:SourceName timestamp=1440602453975, value=Journal of Fun
1 row(s) in 0.0120 seconds
hbase(main):013:0>
I opened a case with Microsoft support. I received confirmation that it is a bug (IIS and the colon separator not working). They are working on a fix - they are slightly delayed as the decide on the "best" way to fix it.

Query Appcelerator Cloud services Place with LIKE operator and case insensitive

Q) Is it possible to query Appcelerator cloud services Places objects (insensitive) where: - name LIKE 'fred' - SQL would be something like?
SELECT * FROM Places WHERE name like '%fred%'
I.e. query would return (if existing):
Fred
Alfred
Winnefred
Please tell me if this is possible with a simple code block using Ti.Cloud or REST or anything!
Note: I've read the documentation thoroughly but can't find an answer there. Please don't direct me to the documentation for the answer. Thanks.
Thanks.
Possibly. What you want is a $regex in the "where" parameter of Places.Query. The docs say it only supports prefix searches, but maybe it can do more. The below would be the equivalent of your select.
Ti.Cloud.Places.query({
where: {
name: { $regex: 'fred', $options: 'i' }
}
}, ...);
If it doesn't work, then you'll need to open up a feature request for it.
http://cloud.appcelerator.com/docs/api/v1/places/query
http://cloud.appcelerator.com/docs/search_query