Skip to content

Commit

Permalink
Merge pull request #89 from infinimesh/dev-device-last-updated
Browse files Browse the repository at this point in the history
Added last_updated field
  • Loading branch information
dimquaa authored Feb 16, 2024
2 parents 3f8696c + 49b1689 commit 7e4b00e
Show file tree
Hide file tree
Showing 11 changed files with 775 additions and 430 deletions.
556 changes: 315 additions & 241 deletions api.swagger.json

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion build/es/node/devices/devices_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/* eslint-disable */
// @ts-nocheck

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage, Struct } from "@bufbuild/protobuf";
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage, Struct, Timestamp } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
import type { Access } from "../access/access_pb.js";

Expand Down Expand Up @@ -71,6 +71,11 @@ export declare class Device extends Message<Device> {
*/
config?: Struct;

/**
* @generated from field: google.protobuf.Timestamp last_updated = 10;
*/
lastUpdated?: Timestamp;

constructor(data?: PartialMessage<Device>);

static readonly runtime: typeof proto3;
Expand Down
3 changes: 2 additions & 1 deletion build/es/node/devices/devices_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/* eslint-disable */
// @ts-nocheck

import { proto3, Struct } from "@bufbuild/protobuf";
import { proto3, Struct, Timestamp } from "@bufbuild/protobuf";
import { Access } from "../access/access_pb.js";

/**
Expand All @@ -36,6 +36,7 @@ export const Device = proto3.makeMessageType(
{ no: 7, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 8, name: "access", kind: "message", T: Access, opt: true },
{ no: 9, name: "config", kind: "message", T: Struct },
{ no: 10, name: "last_updated", kind: "message", T: Timestamp },
],
);

Expand Down
21 changes: 16 additions & 5 deletions handsfree/handsfreeconnect/handsfree.connect.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

105 changes: 61 additions & 44 deletions node/devices/devices.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions node/devices/devices.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 22 additions & 16 deletions node/devices/devices.proto
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
/*
Copyright © 2021-2023 Infinite Devices GmbH
Copyright © 2021-2023 Infinite Devices GmbH
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
syntax = "proto3";
package infinimesh.node.devices;

import "node/access/access.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "node/access/access.proto";

message Device {
string uuid = 1;
Expand All @@ -29,6 +30,7 @@ message Device {
string token = 7;
optional infinimesh.node.access.Access access = 8;
google.protobuf.Struct config = 9;
google.protobuf.Timestamp last_updated = 10;
}

message Certificate {
Expand All @@ -37,7 +39,7 @@ message Certificate {
bytes fingerprint = 3;
}

message Devices {
message Devices {
repeated Device devices = 1;
int64 total = 2;
}
Expand All @@ -49,11 +51,15 @@ message HandsfreeCreate {

message CreateRequest {
Device device = 1;
string namespace = 2; // Namespace to put device under
string namespace = 2; // Namespace to put device under
optional HandsfreeCreate handsfree = 3; // if present, will attempt to obtain
// cert from handsfree control packet
// cert from handsfree control packet
}

message CreateResponse { Device device = 1; }
message CreateResponse {
Device device = 1;
}

message GetByFingerprintRequest { bytes fingerprint = 1; }
message GetByFingerprintRequest {
bytes fingerprint = 1;
}
Loading

0 comments on commit 7e4b00e

Please sign in to comment.