Skip to content

Commit 7f9ce72

Browse files
authored
Merge pull request #555 from zigbee-alliance/#538-Add-CommissionerRemoteUiFlowUrl-field-into-Model-schema
#538 Add commissioner remote UI flow url field into model schema
2 parents b0304a0 + dfbbf38 commit 7f9ce72

File tree

15 files changed

+460
-151
lines changed

15 files changed

+460
-151
lines changed

docs/static/openapi.yml

+10
Original file line numberDiff line numberDiff line change
@@ -8468,6 +8468,8 @@ paths:
84688468
schemaVersion:
84698469
type: integer
84708470
format: int64
8471+
commissionerRemoteUiFlowUrl:
8472+
type: string
84718473
pagination:
84728474
type: object
84738475
properties:
@@ -8693,6 +8695,8 @@ paths:
86938695
schemaVersion:
86948696
type: integer
86958697
format: int64
8698+
commissionerRemoteUiFlowUrl:
8699+
type: string
86968700
default:
86978701
description: An unexpected error response.
86988702
schema:
@@ -21186,6 +21190,8 @@ definitions:
2118621190
schemaVersion:
2118721191
type: integer
2118821192
format: int64
21193+
commissionerRemoteUiFlowUrl:
21194+
type: string
2118921195
zigbeealliance.distributedcomplianceledger.model.ModelVersion:
2119021196
type: object
2119121197
properties:
@@ -21308,6 +21314,8 @@ definitions:
2130821314
schemaVersion:
2130921315
type: integer
2131021316
format: int64
21317+
commissionerRemoteUiFlowUrl:
21318+
type: string
2131121319
pagination:
2131221320
type: object
2131321321
properties:
@@ -21385,6 +21393,8 @@ definitions:
2138521393
schemaVersion:
2138621394
type: integer
2138721395
format: int64
21396+
commissionerRemoteUiFlowUrl:
21397+
type: string
2138821398
zigbeealliance.distributedcomplianceledger.model.QueryGetModelVersionResponse:
2138921399
type: object
2139021400
properties:

docs/transactions.md

+2
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ Not all fields can be edited (see `EDIT_MODEL`).
207207
- commissioningModeInitialStepsInstruction: `optional(string)` - commissioningModeInitialStepsInstruction SHALL contain text which relates to specific values of CommissioningModeInitialStepsHint. Certain values of CommissioningModeInitialStepsHint, as defined in the Pairing Hint Table, indicate a Pairing Instruction (PI) dependency, and for these values the commissioningModeInitialStepsInstruction SHALL be set
208208
- commissioningModeSecondaryStepsHint: `optional(uint32)` - commissioningModeSecondaryStepsHint SHALL identify a hint for steps that can be used to put into commissioning mode a device that has already been commissioned. This field is a bitmap with values defined in the Pairing Hint Table. For example, a value of 4 (bit 2 is set) indicates that a device that has already been commissioned will require the user to visit a current CHIP Administrator to put the device into commissioning mode.
209209
- commissioningModeSecondaryStepInstruction: `optional(string)` - commissioningModeSecondaryStepInstruction SHALL contain text which relates to specific values of commissioningModeSecondaryStepsHint. Certain values of commissioningModeSecondaryStepsHint, as defined in the Pairing Hint Table, indicate a Pairing Instruction (PI) dependency, and for these values the commissioningModeSecondaryStepInstruction SHALL be set
210+
- commissionerRemoteUiFlowURL `optional(string)` - commissionerRemoteUiFlowURL SHALL identify URL to show a custom flow UI for the commissioner
210211
- userManualURL: `optional(string)` - URL that contains product specific web page that contains user manual for the device model.
211212
- supportURL: `optional(string)` - URL that contains product specific web page that contains support details for the device model.
212213
- productURL: `optional(string)` - URL that contains product specific web page that contains details for the device model.
@@ -253,6 +254,7 @@ All non-edited fields remain the same.
253254
- commissioningCustomFlowURL: `optional(string)` - commissioningCustomFlowURL SHALL identify a vendor specific commissioning URL for the device model when the commissioningCustomFlow field is set to '2'
254255
- commissioningModeInitialStepsInstruction: `optional(string)` - commissioningModeInitialStepsInstruction SHALL contain text which relates to specific values of CommissioningModeInitialStepsHint. Certain values of CommissioningModeInitialStepsHint, as defined in the Pairing Hint Table, indicate a Pairing Instruction (PI) dependency, and for these values the commissioningModeInitialStepsInstruction SHALL be set
255256
- commissioningModeSecondaryStepInstruction: `optional(string)` - commissioningModeSecondaryStepInstruction SHALL contain text which relates to specific values of commissioningModeSecondaryStepsHint. Certain values of commissioningModeSecondaryStepsHint, as defined in the Pairing Hint Table, indicate a Pairing Instruction (PI) dependency, and for these values the commissioningModeSecondaryStepInstruction SHALL be set
257+
- commissionerRemoteUiFlowURL `optional(string)` - commissionerRemoteUiFlowURL SHALL identify URL to show a custom flow UI for the commissioner
256258
- userManualURL: `optional(string)` - URL that contains product specific web page that contains user manual for the device model.
257259
- supportURL: `optional(string)` - URL that contains product specific web page that contains support details for the device model.
258260
- productURL: `optional(string)` - URL that contains product specific web page that contains details for the device model.

integration_tests/cli/model-demo.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ test_divider
6060
productLabel="Device #1"
6161
schema_version_0=0
6262
schema_version_2=2
63+
commissionerRemoteUiFlowURL="https://commissionerRemoteUiFlowURL.dclmodel"
6364
echo "Add Model with VID: $vid PID: $pid"
64-
result=$(echo "test1234" | dcld tx model add-model --vid=$vid --pid=$pid --deviceTypeID=1 --productName=TestProduct --productLabel="$productLabel" --partNumber=1 --commissioningCustomFlow=0 --schemaVersion=$schema_version_2 --from=$vendor_account --yes)
65+
result=$(echo "test1234" | dcld tx model add-model --vid=$vid --pid=$pid --deviceTypeID=1 --productName=TestProduct --productLabel="$productLabel" --partNumber=1 --commissioningCustomFlow=0 --commissionerRemoteUiFlowURL="$commissionerRemoteUiFlowURL" --schemaVersion=$schema_version_2 --from=$vendor_account --yes)
6566
check_response "$result" "\"code\": 0"
6667
echo "$result"
6768

@@ -81,6 +82,7 @@ check_response "$result" "\"vid\": $vid"
8182
check_response "$result" "\"pid\": $pid"
8283
check_response "$result" "\"productLabel\": \"$productLabel\""
8384
check_response "$result" "\"schemaVersion\": $schema_version_2"
85+
check_response "$result" "\"commissionerRemoteUiFlowUrl\": \"$commissionerRemoteUiFlowURL\""
8486
echo "$result"
8587

8688
echo "Get Model with VID: $vid_with_pids PID: $pid"
@@ -124,10 +126,11 @@ echo "$result"
124126

125127
test_divider
126128

127-
echo "Update Model with VID: ${vid} PID: ${pid} with new description"
129+
echo "Update Model with VID: ${vid} PID: ${pid} with new description and commissionerRemoteUiFlowURL"
128130
description="New Device Description"
129131
schema_version_3=3
130-
result=$(echo "test1234" | dcld tx model update-model --vid=$vid --pid=$pid --from $vendor_account --yes --productLabel "$description" --schemaVersion=$schema_version_3)
132+
newCommissionerRemoteUiFlowURL="https://commissionerRemoteUiFlowURL.dclmodel.updated"
133+
result=$(echo "test1234" | dcld tx model update-model --vid=$vid --pid=$pid --from $vendor_account --yes --productLabel "$description" --schemaVersion=$schema_version_3 --commissionerRemoteUiFlowURL="$newCommissionerRemoteUiFlowURL")
131134
check_response "$result" "\"code\": 0"
132135
echo "$result"
133136

@@ -146,6 +149,7 @@ check_response "$result" "\"vid\": $vid"
146149
check_response "$result" "\"pid\": $pid"
147150
check_response "$result" "\"productLabel\": \"$description\""
148151
check_response "$result" "\"schemaVersion\": $schema_version_3"
152+
check_response "$result" "\"commissionerRemoteUiFlowUrl\": \"$newCommissionerRemoteUiFlowURL\""
149153
echo "$result"
150154

151155
test_divider

proto/model/model.proto

+1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ message Model {
2525
int32 lsfRevision = 17;
2626
string creator = 18 [(cosmos_proto.scalar) = "cosmos.AddressString"];
2727
uint32 schemaVersion = 19;
28+
string commissionerRemoteUiFlowUrl = 20;
2829
}
2930

proto/model/tx.proto

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ message MsgCreateModel {
4141
string productUrl = 16 [(gogoproto.moretags) = "validate:\"omitempty,url,startsnotwith=http:,max=256\""];
4242
string lsfUrl = 17 [(gogoproto.moretags) = "validate:\"omitempty,url,startsnotwith=http:,max=256\""];
4343
uint32 schemaVersion = 18 [(gogoproto.moretags) = "validate:\"gte=0,lte=65535\""];
44+
string commissionerRemoteUiFlowUrl = 19 [(gogoproto.moretags) = "validate:\"omitempty,url,startsnotwith=http:,max=256\""];
4445
}
4546
message MsgCreateModelResponse {}
4647

@@ -61,6 +62,7 @@ message MsgUpdateModel {
6162
string lsfUrl = 13 [(gogoproto.moretags) = "validate:\"omitempty,url,startsnotwith=http:,max=256\""];
6263
int32 lsfRevision = 14 [(gogoproto.moretags) = "validate:\"gte=0,lte=65535\""];
6364
uint32 schemaVersion = 15 [(gogoproto.moretags) = "validate:\"gte=0,lte=65535\""];
65+
string commissionerRemoteUiFlowUrl = 16 [(gogoproto.moretags) = "validate:\"omitempty,url,startsnotwith=http:,max=256\""];
6466
}
6567
message MsgUpdateModelResponse {}
6668

vue/src/store/generated/zigbee-alliance/distributed-compliance-ledger/zigbeealliance.distributedcomplianceledger.model/module/rest.ts

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export interface ModelModel {
4444

4545
/** @format int64 */
4646
schemaVersion?: number;
47+
commissionerRemoteUiFlowUrl?: string;
4748
}
4849

4950
export interface ModelModelVersion {

vue/src/store/generated/zigbee-alliance/distributed-compliance-ledger/zigbeealliance.distributedcomplianceledger.model/module/types/model/model.ts

+20-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export interface Model {
2323
lsfRevision: number
2424
creator: string
2525
schemaVersion: number
26+
commissionerRemoteUiFlowUrl: string
2627
}
2728

2829
const baseModel: object = {
@@ -44,7 +45,8 @@ const baseModel: object = {
4445
lsfUrl: '',
4546
lsfRevision: 0,
4647
creator: '',
47-
schemaVersion: 0
48+
schemaVersion: 0,
49+
commissionerRemoteUiFlowUrl: ''
4850
}
4951

5052
export const Model = {
@@ -106,6 +108,9 @@ export const Model = {
106108
if (message.schemaVersion !== 0) {
107109
writer.uint32(152).uint32(message.schemaVersion)
108110
}
111+
if (message.commissionerRemoteUiFlowUrl !== '') {
112+
writer.uint32(162).string(message.commissionerRemoteUiFlowUrl)
113+
}
109114
return writer
110115
},
111116

@@ -173,6 +178,9 @@ export const Model = {
173178
case 19:
174179
message.schemaVersion = reader.uint32()
175180
break
181+
case 20:
182+
message.commissionerRemoteUiFlowUrl = reader.string()
183+
break
176184
default:
177185
reader.skipType(tag & 7)
178186
break
@@ -278,6 +286,11 @@ export const Model = {
278286
} else {
279287
message.schemaVersion = 0
280288
}
289+
if (object.commissionerRemoteUiFlowUrl !== undefined && object.commissionerRemoteUiFlowUrl !== null) {
290+
message.commissionerRemoteUiFlowUrl = String(object.commissionerRemoteUiFlowUrl)
291+
} else {
292+
message.commissionerRemoteUiFlowUrl = ''
293+
}
281294
return message
282295
},
283296

@@ -304,6 +317,7 @@ export const Model = {
304317
message.lsfRevision !== undefined && (obj.lsfRevision = message.lsfRevision)
305318
message.creator !== undefined && (obj.creator = message.creator)
306319
message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion)
320+
message.commissionerRemoteUiFlowUrl !== undefined && (obj.commissionerRemoteUiFlowUrl = message.commissionerRemoteUiFlowUrl)
307321
return obj
308322
},
309323

@@ -404,6 +418,11 @@ export const Model = {
404418
} else {
405419
message.schemaVersion = 0
406420
}
421+
if (object.commissionerRemoteUiFlowUrl !== undefined && object.commissionerRemoteUiFlowUrl !== null) {
422+
message.commissionerRemoteUiFlowUrl = object.commissionerRemoteUiFlowUrl
423+
} else {
424+
message.commissionerRemoteUiFlowUrl = ''
425+
}
407426
return message
408427
}
409428
}

vue/src/store/generated/zigbee-alliance/distributed-compliance-ledger/zigbeealliance.distributedcomplianceledger.model/module/types/model/tx.ts

+40-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export interface MsgCreateModel {
2323
productUrl: string
2424
lsfUrl: string
2525
schemaVersion: number
26+
commissionerRemoteUiFlowUrl: string
2627
}
2728

2829
export interface MsgCreateModelResponse {}
@@ -43,6 +44,7 @@ export interface MsgUpdateModel {
4344
lsfUrl: string
4445
lsfRevision: number
4546
schemaVersion: number
47+
commissionerRemoteUiFlowUrl: string
4648
}
4749

4850
export interface MsgUpdateModelResponse {}
@@ -120,7 +122,8 @@ const baseMsgCreateModel: object = {
120122
supportUrl: '',
121123
productUrl: '',
122124
lsfUrl: '',
123-
schemaVersion: 0
125+
schemaVersion: 0,
126+
commissionerRemoteUiFlowUrl: ''
124127
}
125128

126129
export const MsgCreateModel = {
@@ -179,6 +182,9 @@ export const MsgCreateModel = {
179182
if (message.schemaVersion !== 0) {
180183
writer.uint32(144).uint32(message.schemaVersion)
181184
}
185+
if (message.commissionerRemoteUiFlowUrl !== '') {
186+
writer.uint32(154).string(message.commissionerRemoteUiFlowUrl)
187+
}
182188
return writer
183189
},
184190

@@ -243,6 +249,9 @@ export const MsgCreateModel = {
243249
case 18:
244250
message.schemaVersion = reader.uint32()
245251
break
252+
case 19:
253+
message.commissionerRemoteUiFlowUrl = reader.string()
254+
break
246255
default:
247256
reader.skipType(tag & 7)
248257
break
@@ -343,6 +352,11 @@ export const MsgCreateModel = {
343352
} else {
344353
message.schemaVersion = 0
345354
}
355+
if (object.commissionerRemoteUiFlowUrl !== undefined && object.commissionerRemoteUiFlowUrl !== null) {
356+
message.commissionerRemoteUiFlowUrl = String(object.commissionerRemoteUiFlowUrl)
357+
} else {
358+
message.commissionerRemoteUiFlowUrl = ''
359+
}
346360
return message
347361
},
348362

@@ -368,6 +382,7 @@ export const MsgCreateModel = {
368382
message.productUrl !== undefined && (obj.productUrl = message.productUrl)
369383
message.lsfUrl !== undefined && (obj.lsfUrl = message.lsfUrl)
370384
message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion)
385+
message.commissionerRemoteUiFlowUrl !== undefined && (obj.commissionerRemoteUiFlowUrl = message.commissionerRemoteUiFlowUrl)
371386
return obj
372387
},
373388

@@ -463,6 +478,11 @@ export const MsgCreateModel = {
463478
} else {
464479
message.schemaVersion = 0
465480
}
481+
if (object.commissionerRemoteUiFlowUrl !== undefined && object.commissionerRemoteUiFlowUrl !== null) {
482+
message.commissionerRemoteUiFlowUrl = object.commissionerRemoteUiFlowUrl
483+
} else {
484+
message.commissionerRemoteUiFlowUrl = ''
485+
}
466486
return message
467487
}
468488
}
@@ -520,7 +540,8 @@ const baseMsgUpdateModel: object = {
520540
productUrl: '',
521541
lsfUrl: '',
522542
lsfRevision: 0,
523-
schemaVersion: 0
543+
schemaVersion: 0,
544+
commissionerRemoteUiFlowUrl: ''
524545
}
525546

526547
export const MsgUpdateModel = {
@@ -570,6 +591,9 @@ export const MsgUpdateModel = {
570591
if (message.schemaVersion !== 0) {
571592
writer.uint32(120).uint32(message.schemaVersion)
572593
}
594+
if (message.commissionerRemoteUiFlowUrl !== '') {
595+
writer.uint32(130).string(message.commissionerRemoteUiFlowUrl)
596+
}
573597
return writer
574598
},
575599

@@ -625,6 +649,9 @@ export const MsgUpdateModel = {
625649
case 15:
626650
message.schemaVersion = reader.uint32()
627651
break
652+
case 16:
653+
message.commissionerRemoteUiFlowUrl = reader.string()
654+
break
628655
default:
629656
reader.skipType(tag & 7)
630657
break
@@ -710,6 +737,11 @@ export const MsgUpdateModel = {
710737
} else {
711738
message.schemaVersion = 0
712739
}
740+
if (object.commissionerRemoteUiFlowUrl !== undefined && object.commissionerRemoteUiFlowUrl !== null) {
741+
message.commissionerRemoteUiFlowUrl = String(object.commissionerRemoteUiFlowUrl)
742+
} else {
743+
message.commissionerRemoteUiFlowUrl = ''
744+
}
713745
return message
714746
},
715747

@@ -732,6 +764,7 @@ export const MsgUpdateModel = {
732764
message.lsfUrl !== undefined && (obj.lsfUrl = message.lsfUrl)
733765
message.lsfRevision !== undefined && (obj.lsfRevision = message.lsfRevision)
734766
message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion)
767+
message.commissionerRemoteUiFlowUrl !== undefined && (obj.commissionerRemoteUiFlowUrl = message.commissionerRemoteUiFlowUrl)
735768
return obj
736769
},
737770

@@ -812,6 +845,11 @@ export const MsgUpdateModel = {
812845
} else {
813846
message.schemaVersion = 0
814847
}
848+
if (object.commissionerRemoteUiFlowUrl !== undefined && object.commissionerRemoteUiFlowUrl !== null) {
849+
message.commissionerRemoteUiFlowUrl = object.commissionerRemoteUiFlowUrl
850+
} else {
851+
message.commissionerRemoteUiFlowUrl = ''
852+
}
815853
return message
816854
}
817855
}

x/model/client/cli/flags.go

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const (
1616
FlagCommissioningModeInitialStepsInstruction = "commissioningModeInitialStepsInstruction"
1717
FlagCommissioningModeSecondaryStepsHint = "commissioningModeSecondaryStepsHint"
1818
FlagCommissioningModeSecondaryStepsInstruction = "commissioningModeSecondaryStepsInstruction"
19+
FlagCommissionerRemoteUIFlowURL = "commissionerRemoteUiFlowURL"
1920
FlagUserManualURL = "userManualURL"
2021
FlagSupportURL = "supportURL"
2122
FlagProductURL = "productURL"

0 commit comments

Comments
 (0)